1 2003-02-18 Zack Weinberg <zack@codesourcery.com>
3 * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
4 (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
7 2003-02-18 Mark Mitchell <mark@codesourcery.com>
10 * class.c (layout_class_type): In the 3.2 ABI, take into account
11 trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
13 2003-02-18 Matt Austern <austern@apple.com>
15 * cp/cp-lang.c: Change lang hooks so that final_write_globals does
17 * cp/decl.c (wrapup_globals_for_namespace): Remove special
18 handling of global namespace.
20 2003-02-18 Geoffrey Keating <geoffk@apple.com>
22 * cp-tree.h (rid_to_yy): Delete.
23 (C_RID_YYCODE): Delete.
24 (finish_file): Delete redundant declaration.
26 2003-02-18 Jason Merrill <jason@redhat.com>
29 * decl.c (reshape_init): Don't mess with initializer labels.
31 2003-02-18 Ben Elliston <bje@redhat.com>
34 * decl.c (duplicate_decls): Fix typo in comment.
36 2003-02-17 Michael Elizabeth Chastain <mec@shout.net>
39 * class.c (build_base_field): Mark fields for base classes with
42 2003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
45 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
46 CONSTRUCTOR_ELTS only once.
48 2003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
51 * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
52 (dump_type_suffix): Likewise.
54 2003-02-14 Nathan Sidwell <nathan@codesourcery.com>
56 * search.c: ANSIfy function declarations and definitions.
57 * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
58 * call.c (build_method_call, resolve_scoped_fn_name,
59 build_java_interface_fn_ref): Adjust lookup_field, lookup_member
61 * class.c (handle_using_decl): Likewise.
62 * decl.c (make_typename_type, make_unmound_class_template,
63 start_decl, compute_array_index_type): Likewise.
64 * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
65 * init.c (expand_member_init, build_member_call): Likewise.
66 * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
67 resolve_typename_type): Likewise.
68 * typeck.c (lookup_destructor, finish_class_member_access_exprm
69 build_prememfunc_access_expr): Likewise.
71 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
73 * decl2.c: Include "timevar.h".
74 (namespace_ancestor): Time name lookup.
75 (add_using_namespace): Likewise.
76 (lookup_using_namespace): Likewise.
77 (qualified_lookup_using_namespace): Likewise.
78 (decl_namespace): Likewise.
79 (lookup_arg_dependent): Likewise.
80 * lex.c (do_identifier): Likewise.
81 (do_scoped_id): Likewise.
82 * pt.c (lookup_template_class): Likewise.
84 2003-02-14 Andrew Pinski <pinskia@physics.uc.edu>
86 * decl.c: (define_label): Fix warning for return 0 instead of NULL.
88 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
90 * decl.c: Include "timevar.h".
91 (poplevel): Time name lookup.
92 (find_binding): Likewise.
93 (push_namespace): Likewise.
94 (pop_nested_namespace): Likewise.
95 (store_bindings): Likewise.
96 (maybe_push_to_top_level): Likewise.
97 (pop_from_top_level): Likewise.
98 (push_local_name): Likewise.
100 (pushdecl): Likewise.
101 (pushdecl_with_scope): Likewise.
102 (pushdecl_namespace_level): Likewise.
103 (pushdecl_top_level): Likewise.
104 (pushdecl_class_level): Likewise.
105 (push_class_level_binding): Likewise.
106 (push_using_decl): Likewise.
107 (push_using_directive): Likewise.
108 (push_overloaded_decl): Likewise.
109 (lookup_label): Likewise.
110 (define_label): Likewise.
111 (lookup_tag): Likewise.
112 (lookup_tag_reverse): Likewise.
113 (lookup_namespace_name): Likewise.
114 (select_decl): Likewise.
115 (unqualified_namespace_lookup): Likewise.
116 (lookup_name_real): Likewise.
117 (lookup_name_current_level): Likewise.
118 (lookup_type_current_level): Likewise.
119 (maybe_inject_for_scope_var): Likewise.
120 (xref_tag): Likewise.
122 * Make-lang.in (cp/decl.o): Add dependency on timevar.h
124 2003-02-12 Phil Edwards <pme@gcc.gnu.org>
126 * decl.c (build_enumerator): Remove unneeded test.
128 2003-02-09 Dan Nicolaescu <dann@ics.uci.edu>
130 * cp-tree.h (struct lang_type_header): Make all fields unsigned
133 2003-02-03 Mark Mitchell <mark@codesourcery.com>
136 * call.c (z_candidate): Add args.
137 (convert_class_to_reference): Set it.
138 (implicit_conversion): Tidy.
139 (add_candidate): Add args parameter.
140 (add_function_candidate): Adjust call to add_candidate.
141 (add_conv_candidate): Likewise.
142 (build_builtin_candidate): Likewise.
143 (build_user_type_conversion_1): Eliminate wasteful tree_cons
145 (build_new_function_call): Likewise.
146 (build_object_call): Likewise.
147 (add_candidates): New function.
148 (build_new_op): Use it.
149 (covert_like_real): Adjust call to build_over_call.
150 (build_over_call): Remove args parameter.
151 * operators.def: Add <?= and >?=.
153 2003-02-01 Richard Sandiford <rsandifo@redhat.com>
155 * typeck.c (build_indirect_ref): Don't check flag_volatile.
157 2003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
160 * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
162 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
164 * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
165 BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
166 (BINFO_LANG_ELTS): New #define.
167 * tree.c (make_binfo): Use BINFO_LANG_ELTS.
169 2003-01-30 Geoffrey Keating <geoffk@apple.com>
171 * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
173 2003-01-30 Mark Mitchell <mark@codesourcery.com>
175 * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
177 * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
178 rather than TYPE_LANG_FLAG_0.
179 (TYPE_BUILT_IN): Remove.
180 (TYPE_DEPENDENT_P): New macro.
181 (TYPE_DEPENDENT_P_VALID): Likewise.
182 (lang_type_class): Add fields_readonly.
183 * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
184 * pt.c (dependent_type_p_r): New function, split out from ...
185 (dependent_type_p): ... here. Memoize results.
186 * search.c (dependent_base_p): Use dependent_type_p, not
188 * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
191 2003-01-29 Mark Mitchell <mark@codesourcery.com>
193 * call.c (build_field_call): Use build_new_op, not build_opfncall.
194 (prep_operand): New function.
195 (build_new_op): Use it. Remove dead code.
196 * class.c (pushclass): Change "modify" parameter type from int to
198 (currently_open_class): Use same_type_p, not pointer equality.
199 (push_nested_class): Adjust calls to pushclass, remove modify
201 * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
202 (pushclass): Change prototype.
203 (push_nested_class): Likewise.
204 (grokoptypename): Remove.
205 (build_opfncall): Remove.
206 (value_dependent_expression_p): Declare.
207 (resolve_typename_type): Likewise.
208 (resolve_typename_type_in_current_instantiation): Likewise.
209 (enter_scope_of): Remove.
211 (tsubst_expr): Likewise.
212 (tsubst_copy): Likewise.
213 (tsubst_copy_and_build): Likewise.
214 * decl.c (warn_about_implicit_typename_lookup): Remove.
215 (finish_case_label): Return error_mark_node for erroneous labels.
216 (start_decl): Adjust calls to push_nested_class.
217 (grokfndecl): Call push_scope/pop_scope around call to
219 (grokdeclarator): Do not call tsubst.
220 (start_function): Adjust calls to push_nested_class.
221 * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
222 (check_classfn): Use push_scope/pop_scope around type comparisions.
223 (grokoptypename): Remove.
224 (push_sscope): Adjust call to push_nested_class.
225 * error.c (dump_type): Show cv-qualification of typename types.
226 * init.c (build_member_call): Use build_new_op, not
228 * method.c (build_opfncall): Remove.
229 * parser.c (cp_parser): Add allow_non_constant_expression_p and
230 non_constant_expression_p.
231 (cp_parser_constant_expression): Adjust prototype.
232 (cp_parser_resolve_typename_type): Remove.
233 (cp_parser_non_constant_expression): New function.
234 (cp_parser_non_constant_id_expression): Likewise.
235 (cp_parser_new): Set allow_non_constant_expression_p and
236 non_constant_expression_p.
237 (cp_parser_primary_expression): Reject `this' and `va_arg' in
238 constant-expressions. Note that dependent names aren't really
240 (cp_parser_postfix_expression): Reject conversions to non-integral
241 types in constant-expressions. Neither are increments or
243 (cp_parser_unary_expression): Reject increments and decrements in
244 constant-expressions.
245 (cp_parser_direct_new_declarator): Adjust call to
246 cp_parser_constant_expression.
247 (cp_parser_cast_expression): Reject conversions to non-integral
248 types in constant-expressions.
249 (cp_parser_assignment_expression): Rejects assignments in
250 constant-expressions.
251 (cp_parser_expression): Reject commas in constant-expressions.
252 (cp_parser_labeled_statement): Adjust call to
253 cp_parser_constant_expression.
254 (cp_parser_direct_declarator): Simplify array bounds, even in
255 templates, when they are non-dependent. Use
256 resolve_typename_type, not cp_parser_resolve_typename_type.
257 (cp_parser_class_head): Use resolve_typename_type, not
258 cp_parser_resolve_typename_type.
259 (cp_parser_member_declaration): Adjust call to
260 cp_parser_constant_expression.
261 (cp_parser_constant_initializer): Likewise.
262 (cp_parser_constructor_declarator): Use resolve_typename_type, not
263 cp_parser_resolve_typename_type.
264 (cp_parser_late_parsing_default_args): Adjust call to
266 * pt.c (tsubst): Give it internal linkage.
267 (tsubst_expr): Likewise.
268 (tsubst_copy): Likewise.
269 (tsubst_copy_and_build): Likewise.
270 (push_access_scope_real): Likewise.
271 (tsubst_friend_class): Likewise.
272 (instantiate_class_template): Adjust call to pushclass.
273 (value_dependent_expression_p): Give it external linkage.
275 (resolve_typename_type): New function.
276 * semantics.c (finish_call_expr): Use build_new_op, not
278 (begin_constructor_declarator): Remove.
279 (begin_class_definition): Adjust call to pushclass.
280 (enter_scope_of): Remove.
281 * typeck.c (comptypes): Resolve typename types as appropriate.
282 (build_x_indirect_ref): Use build_new_op, not build_opfncall.
283 (build_x_compound_expr): Likewise.
284 (build_modify_expr): Likewise.
285 (build_x_modify_expr): Likewise.
286 * typeck2.c (build_x_arrow): Likewise.
288 2003-01-29 Fariborz Jahanian <fjahanian@apple.com>
290 * pt.c (last_pending_template) Declare GTY().
292 2003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
295 * parser.c (cp_parser_elaborated_type_specifier): Convert
296 TEMPLATE_DECL to TYPE_DECL only when processing template friends.
297 (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
299 2003-01-28 Nathan Sidwell <nathan@codesourcery.com>
302 * pt.c (unify): Don't unify '*T' with 'U C::*'.
305 * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
308 2003-01-27 Nathan Sidwell <nathan@codesourcery.com>
310 * class.c (update_vtable_entry_for_fn): Add index parameter.
311 Generate vcall thunk for covariant overriding from a virtual
313 (dfs_modify_vtables): Adjust.
315 2003-01-25 Nathan Sidwell <nathan@codesourcery.com>
318 * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
320 (cp_parser_base_specifier): Look for and consume a
321 TEMPLATE keyword. Replace switch with array index.
324 * semantics.c (finish_non_static_data_member): Remember the
325 field's type even in a template.
328 * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
332 * parser.c (cp_parser_cast_expression): Be more tentative.
334 2003-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
336 * cp-tree.h (flagged_type_tree_s): Remove.
337 (check_for_new_type): Likewise.
338 * typeck2.c (check_for_new_type): Likewise.
340 2003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
342 * dump.c: ANSIfy function declarations and definitions.
344 * cp-tree.h, decl.h: Get rid of PARAMS. Again.
346 2003-01-22 Mark Mitchell <mark@codesourcery.com>
349 * init.c (build_new): Set the type of the new-expression, even
350 when processing_templte_decl.
353 * parser.c (cp_parser_primary_expression): Improve error message
354 for templates used in an expression context.
357 * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
358 parse when encountering "typedef".
360 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
362 * class.c, parser.c: ANSIfy function definitions and declarations.
364 2003-01-22 Mark Mitchell <mark@codesourcery.com>
367 * error.c (dump_decl): For an OVERLOAD, just print the name of the
368 function; it doesn't make sense to try to print its type.
369 * semantics.c (finish_typeof): Issue errors about invalid uses.
372 * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
374 (cp_parser_expression_statement): Use it.
375 (cp_parser_explicit_instantiation): Likewise.
376 * pt.c (do_decl_instantiation): Improve error handling logic.
378 2003-01-22 Mark Mitchell <mark@codesourcery.com>
381 * parser.c (cp_parser_using_declaration): Issue error messages
382 about name resolution failures here.
385 * class.c (currently_open_derived_class): Use dependent_type_p.
386 * cp-tree.h (dependent_type_p): New function.
387 (dependent_template_arg_p): Likewise.
388 (dependent_template_p): Likewise.
389 (type_dependent_expression_p): Likewise.
390 * parser.c (cp_parser_dependent_type_p): Remove.
391 (cp_parser_value_dependent_type_p): Likewise.
392 (cp_parser_type_dependent_expression_p): Likewise.
393 (cp_parser_dependent_template_arg_p): Likewise.
394 (cp_parser_dependent_template_id_p): Likewise.
395 (cp_parser_dependent_template_p): Likewise.
396 (cp_parser_diagnose_invalid_type_name): Replace
397 cp_parser_dependent_type_p with dependent_type_p, etc.
398 (cp_parser_primary_expresion): Likewise.
399 (cp_parser_nested_name_specifier_opt): Likewise.
400 (cp_parser_postfix_expression): Likewise.
401 (cp_parser_unary_expression): Likewise.
402 (cp_parser_template_name): Likewise.
403 (cp_parser_class_name): Likewise.
404 (cp_parser_lookup_name): Likewise.
405 * pt.c (dependent_type_p): New function.
406 (value_dependent_expression_p): Likewise.
407 (type_dependent_expression_p): Likewise.
408 (dependent_template_arg_p): Likewise.
409 (dependent_template_id_p): Likewise.
410 (dependent_template_p): Likewise.
414 * parser.c (cp_parser_simple_declaration): Return quickly when
417 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
419 Make-lang.in (cp/decl.o-warn): Add -Wno-error.
421 2003-01-17 Jason Merrill <jason@redhat.com>
423 PR c++/9167, c++/9358
424 * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
426 2003-01-17 Jason Merrill <jason@redhat.com>
429 * call.c (build_conditional_expr): Always do lvalue-rvalue
432 2003-01-17 Mark Mitchell <mark@codesourcery.com>
435 * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
436 * cp-tree.h (BASELINK_BINFO): Adjust.
437 (BASELINK_FUNCTIONS): Likewise.
438 (BASELINK_ACCESS_BINFO): Likewise.
439 (tree_baselink): New structure.
440 (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
441 (lang_tree_node): Add baselink.
442 * decl.c (cp_tree_node_structure): Add BASELINK case.
443 * search.c (build_baselink): Adjust.
444 * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P
445 test from TREE_LIST case.
448 * parser.c (cp_parser_constructor_declarator_p): Do not assume
449 that a constructor cannot be declared outside of its own class.
451 * parser.c (cp_parser_resolve_typename_type): If the scope cannot
452 be resolved, neither can the qualified name.
454 * rtti.c (get_pseudo_ti_desc): Fix thinko.
456 2003-01-16 Jason Merrill <jason@redhat.com>
459 * init.c (build_vec_init): Re-add maxindex parm.
460 (perform_member_init, build_aggr_init): Pass it.
461 (build_new_1): Pass it. Use an incomplete array type for full_type.
462 * typeck.c (build_modify_expr): Pass it.
465 2003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
467 * cp-tree.h (tsubst_copy_and_build): New declaration.
468 * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
469 (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment.
470 (tsubst_copy_and_build): New function.
472 2003-01-16 Mark Mitchell <mark@codesourcery.com>
474 * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
475 (PARTIAL_INSTANTIATION_P): Remove.
476 (IMPLICIT_TYPENAME_P): Likewise.
477 (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
478 (build_typename_type): Remove declaration.
479 (parmlist_is_exprlist): Likewise.
480 * decl.c (build_typename_type): Make it static, remove third
482 (push_class_binding): Don't do implicit typename stuff.
483 (make_typename_type): Likewise.
484 (lookup_name_real): Likewise.
485 (grokdeclarator): Don't try to convert declarations into
486 initializations. Don't do implicit typename stuff.
487 (parmlist_is_exprlist): Remove.
488 (xref_basetypes): Simplify.
489 * decl2.c (grokfield): Don't try to convert declarations into
491 (build_anon_union_vars): Do this while processing templates, too.
492 (finish_anon_union): Likewise.
493 * error.c (dump_type): Remove implicit typename handling.
494 * parser.c (cp_parser_diagnose_invalid_type_name): New method.
495 (cp_parser_primary_expression): Correct handling of names not
496 found by unqualified name lookup in templates.
497 (cp_parser_nested_name_specifier_opt): Avoid checking dependency
498 of types when possible.
499 (cp_parser_simple_declaration): Complain intelligently about some
500 invalid declarations.
501 (cp_parser_member_declaration): Likewise.
502 (cp_parser_constructor_declarator_p): Don't check when we're in a
504 * pt.c (instantiate_class_template): Remove
505 PARTIAL_INSTANTIATION_P gunk.
506 * search.c (lookup_field_r): Don't build implicit typenames.
507 (marked_pushdecls_p): Don't enter dependent base types.
508 (unmarked_pushdecls_p): Likewise.
509 * semantics.c (begin_class_definition): Remove implicit typename
512 2003-01-16 Nathan Sidwell <nathan@codesourcery.com>
515 * parser.c (cp_parser_direct_declarator): If accepting either
516 abstract or named, the name must be an unqualified-id.
518 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
520 * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
522 2003-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
524 * decl2.c (check_classfn): Fix uninitialized warning.
525 (build_anon_union_vars): Likewise.
526 * pt.c (tsubst_copy): Likewise.
528 2003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
530 Further conform g++'s __vmi_class_type_info to the C++ ABI
532 * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
534 (class_hint_flags): Likewise.
536 2003-01-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
538 * config-lang.in: Add semantics.c to gtfiles.
539 * cp-tree.h (flagged_type_tree_s): Remove lookups field.
540 (saved_scope): Likewise.
541 (type_lookups): Remove.
542 (deferred_access): New structure.
543 (type_access_control): Remove.
544 (save_type_access_control): Likewise.
545 (reset_type_access_control): Likewise.
546 (decl_type_access_control): Likewise.
547 (push_deferring_access_checks): Declare.
548 (resume_deferring_access_checks): Likewise.
549 (stop_deferring_access_checks): Likewise.
550 (pop_deferring_access_checks): Likewise.
551 (get_deferred_access_checks): Likewise.
552 (pop_to_parent_deferring_access_checks): Likewise.
553 (perform_deferred_access_checks): Likewise.
554 (perform_or_defer_access_check): Likewise.
555 * decl.c (make_typename_type): Use perform_or_defer_access_check.
556 (make_unbound_class_template): Likewise.
557 (grokdeclarator): Don't call decl_type_access_control.
558 * parser.c (cp_parser_context): Remove deferred_access_checks
559 and deferring_access_checks_p fields.
560 (cp_parser_context_new): Adjust.
561 (cp_parser): Remove access_checks_lists.
562 (cp_parser_defer_access_check): Remove.
563 (cp_parser_start_deferring_access_checks): Remove.
564 (cp_parser_stop_deferring_access_checks): Remove.
565 (cp_parser_perform_deferred_access_checks): Remove.
566 (cp_parser_nested_name_specifier_opt): Use new deferred access
568 (cp_parser_simple_declaration): Likewise.
569 (cp_parser_template_id): Likewise.
570 (cp_parser_function_definition): Likewise.
571 (cp_parser_class_specifier): Likewise.
572 (cp_parser_lookup_name): Likewise.
573 (cp_parser_single_declaration): Likewise.
574 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
575 (cp_parser_parse_tentatively): Likewise.
576 (cp_parser_parse_definitely): Likewise.
578 (cp_parser_init_declarator): Remove access_checks parameter.
579 Use new deferred access functions.
580 (cp_parser_function_definition_from_specifiers_and_declarator):
582 (cp_parser_class_head): Remove deferring_access_checks_p and
583 saved_access_checks parameters. Use new deferred access functions.
584 (cp_parser_member_specification_opt): Don't call
585 reset_type_access_control.
586 * search.c (type_access_control): Remove.
587 * semantics.c: Include "gt-cp-semantics.h".
588 (deferred_type_access_control): Remove.
589 (deferred_access_stack): New variable.
590 (deferred_access_free_list): Likewise.
591 (push_deferring_access_checks): New function.
592 (resume_deferring_access_checks): Likewise.
593 (stop_deferring_access_checks): Likewise.
594 (pop_deferring_access_checks): Likewise.
595 (get_deferred_access_checks): Likewise.
596 (pop_to_parent_deferring_access_checks): Likewise.
597 (perform_deferred_access_checks): New function, adapted from
598 cp_parser_perform_deferred_access_checks.
599 (perform_or_defer_access_check): New function, adapted from
600 cp_parser_defer_access_check.
601 (current_type_lookups): Remove.
602 (deferred_type_access_control): Likewise.
603 (decl_type_access_control): Likewise.
604 (save_type_access_control): Likewise.
605 (reset_type_access_control): Likewise.
606 (begin_function_definition): Adjust.
607 (begin_class_definiton): Likewise.
609 2003-01-13 Jason Merrill <jason@redhat.com>
612 * class.c (build_base_path): Take the address before calling save_expr.
614 * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
615 all the ambiguous conversions are bad.
617 * class.c (maybe_warn_about_overly_private_class): Don't stop
618 searching when we find a nonprivate method.
620 * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
622 2003-01-12 Mark Mitchell <mark@codesourcery.com>
624 * cp-tree.h (get_arglist_len_in_bytes): Remove.
627 * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
628 typeame types more robustly.
630 2003-01-11 Phil Edwards <pme@gcc.gnu.org>
632 * parser.c: Fix comment typos.
634 2003-01-10 Mark Mitchell <mark@codesourcery.com>
637 * parser.c (cp_parser_scope_through_which_access_occurs): Handle
638 an object_type which is not a class type.
640 2003-01-10 Geoffrey Keating <geoffk@apple.com>
642 * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
643 (cp_parser_late_parsing_default_args): Likewise.
645 2003-01-10 Nathanael Nerode <neroden@gcc.gnu.org>
647 * cfns.gperf: ANSIfy function declarations.
648 * cfns.h: Regenerate.
649 * cp-tree.h: ANSIfy function declarations.
651 2003-01-10 Mark Mitchell <mark@codesourcery.com>
653 * cp-tree.h (reparse_absdcl_as_expr): Remove.
654 (reparse_absdcl_as_casts): Likewise.
655 (reparse_decl_as_expr): Likewise.
656 (finish_decl_parsing): Likewise.
657 * decl2.c (reparse_absdcl_as_expr): Remove.
658 (reparse_absdcl_as_casts): Likewise.
659 (repase_decl_as_expr): Likewise.
660 (finish_decl_parsing): Likewise.
665 * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
667 (cp_parser_nested_name_specifier_opt): Correct the
668 check_dependency_p false.
669 (cp_parser_postfix_expression): Fix formatting.
670 (cp_parser_decl_specifier_seq): Avoid looking for constructor
671 declarators when possible.
672 (cp_parser_template_id): Avoid performing name-lookup when
674 (cp_parser_class_head): Do not count specializations when counting
676 (cp_parser_constructor_declarator_p): Return immediately if
677 there's no chance that the tokens form a constructor declarator.
678 * rtti.c (throw_bad_typeid): Add comment. Do not return an
679 expression with reference type.
680 (get_tinfo_decl_dynamic): Do not return an expression with
682 (build_typeid): Add comment. Do not return an expression with
684 * typeck.c (build_class_member_access_expr): Improve handling of
685 conditionals and comma-expressions as objects.
687 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
689 * cfns.gperf: ANSIfy function declarations.
690 * cfns.h: Regenerate.
691 * cp-tree.h: ANSIfy function declarations.
692 * parser.c: ANSIfy function declarations & definitions.
694 * decl.c (bad_specifiers): Fix parameter order error I introduced.
696 2003-01-09 Geoffrey Keating <geoffk@apple.com>
698 Merge from pch-branch:
700 2003-01-09 Geoffrey Keating <geoffk@apple.com>
702 Merge to tag pch-merge-20030102:
704 * semantics.c (finish_translation_unit): Don't call finish_file.
705 * parser.c: Don't include ggc.h.
706 (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
707 read first token here. Don't allow PCH files after the first
709 (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
710 (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
711 (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
712 (cp_parser_late_parsing_for_member): Don't duplicate call to
713 cp_lexer_set_source_position_from_token.
714 (cp_parser_late_parsing_default_args): Likewise.
715 (yyparse): Call finish_file after clearing the_parser.
717 2002-12-11 Geoffrey Keating <geoffk@apple.com>
719 * Make-lang.in: Remove $(GGC_H) from all dependencies.
720 (CXX_TREE_H): Add $(GGC_H).
721 * class.c: Don't include ggc.h.
722 (field_decl_cmp): Make parameters be 'const void *' to match qsort.
723 (method_name_cmp): Likewise.
724 (resort_data): New variable.
725 (resort_field_decl_cmp): New.
726 (resort_method_name_cmp): New.
727 (resort_sorted_fields): New.
728 (resort_type_method_vec): New.
729 (finish_struct_methods): Delete cast.
730 (finish_struct_1): Delete cast.
731 * cp-tree.h: Include ggc.h.
732 (struct lang_type_class): Add reorder attribute to field `methods'.
733 (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
734 (resort_sorted_fields): New prototype.
735 (resort_type_method_vec): New prototype.
736 * call.c: Don't include ggc.h.
741 * method.c: Likewise.
742 * optimize.c: Likewise.
746 * search.c: Likewise.
747 * semantics.c: Likewise.
751 * lang-specs.h: Remove comment.
753 2002-12-03 Geoffrey Keating <geoffk@apple.com>
755 * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
756 (operator_name_info): Mark to be saved for PCH, specify size.
757 (assignment_operator_name_info): Likewise.
759 2002-11-19 Geoffrey Keating <geoffk@apple.com>
761 * decl.c (anon_cnt): Mark to be saved for PCH.
763 2002-10-25 Geoffrey Keating <geoffk@apple.com>
765 * lex.c (init_reswords): Delete now-untrue comment.
766 Allocate ridpointers using GGC.
768 2002-10-04 Geoffrey Keating <geoffk@apple.com>
770 * cp-tree.h (union lang_decl_u2): Add tags to all fields.
772 * g++spec.c (lang_specific_driver): Don't include standard
773 libraries in `added'.
775 2002-08-27 Geoffrey Keating <geoffk@redhat.com>
777 * decl2.c (finish_file): Call c_common_write_pch.
778 * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
780 2002-08-17 Geoffrey Keating <geoffk@redhat.com>
782 * g++spec.c (lang_specific_driver): Treat .h files as C++ header
783 files when using g++.
784 * lang-specs.h: Handle compiling C++ header files.
786 2003-01-09 Jakub Jelinek <jakub@redhat.com>
788 * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
790 2003-01-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
792 * pt.c (push_access_scope_real): Call push_to_top_level for
793 function in namespace scope.
794 (pop_access_scope): Call pop_from_top_level for function in
797 2003-01-09 Jakub Jelinek <jakub@redhat.com>
799 * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
801 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
803 * Make-lang.in (c++.install-common, c++.install-man,
804 c++.uninstall): Prepend $(DESTDIR) to destination paths in
805 all (un)installation commands.
806 (c++.install-common): Rewrite $(LN) commands to support
807 DESTDIR with "ln" as well as with "ln -s".
809 2003-01-08 Jason Merrill <jason@redhat.com>
811 * parser.c (cp_parser_primary_expression): See through explicitly
812 scoped ALIAS_DECLs, too.
814 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
816 * decl.c: Remove some #if 0 code.
818 * decl.c: ANSIfy function declarations.
820 2003-01-07 Mark Mitchell <mark@codesourcery.com>
822 * parser.c (cp_parser_asm_definition): Correct handling of omitted
825 2003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
828 * decl.c (make_typename_type): Check access only when tf_error.
829 (make_unbound_class_template): Likewise.
830 * pt.c (saved_access_scope): New variable.
831 (push_access_scope_real): New function.
832 (push_access_scope): Likewise.
833 (pop_access_scope): Likewise.
834 (tsubst_default_argument): Use them.
835 (instantiate_template): Likewise.
836 (regenerate_decl_from_template): Likewise.
837 (instantiate_decl): Likewise.
838 (get_mostly_instantiated_function_type): Likewise.
840 2003-01-07 Nathanael Nerode <neroden@gcc.gnu.org>
842 * tree.c: Delete bogus #if 0 code.
844 2003-01-07 Andreas Schwab <schwab@suse.de>
846 * class.c (layout_class_type): Don't use
847 PCC_BITFIELD_TYPE_MATTERS if not defined.
849 2003-01-06 Mark Mitchell <mark@codesourcery.com>
852 * decl2.c (build_cleanup): Mark the object as used.
854 * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
855 (hash_local_specialization): New function.
856 (register_local_specialization): Revert 2003-01-05 change.
857 (instantiate_decl): Use hash_local_specialization when creating
858 the local_specializations table.
860 * decl2.c (mark_used): Do not synthesize thunks.
862 * class.c (layout_class_type): Correct handling of unnamed
863 bitfields wider than their types.
866 * parser.c (cp_parser): Remove default_arg_types. Update
867 documentation for unparsed_functions_queues.
868 (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
870 (cp_parser_new): Don't set parser->default_arg_types.
871 (cp_parser_function_definition): Adjust usage of
872 unparsed_funtions_queues.
873 (cp_parser_class_specifier): Don't mess with
874 parser->default_arg_types. Handle default argument processing in
875 a separate phase from function body processing.
876 (cp_parser_template_declaration_after_export): Adjust usage of
877 unparsed_functions_queues.
878 (cp_parser_late_parsing_for_member): Do not handle default
881 2003-01-06 Nathan Sidwell <nathan@codesourcery.com>
884 * parser.c (cp_parser_declarator_kind): New enum.
885 (cp_parser_declarator): Adjust.
886 (cp_parser_direct_declarator): Adjust. Allow for either named or
887 abstract declarator. Prefer abstract, if possible. Allow
888 parenthesized function name.
889 (cp_parser_condition): Adjust cp_parser_declarator call.
890 (cp_parser_explicit_instantiation): Likewise.
891 (cp_parser_init_declarator): Likewise.
892 (cp_parser_type_id): Likewise.
893 (cp_parser_function_definition): Likewise.
894 (cp_parser_member_declaration): Likewise.
895 (cp_parser_parameter_declaration): Use cp_parser_declarator to do
896 the tentative parsing.
897 (cp_parser_exception_declaration): Likewise.
899 2003-01-05 Mark Mitchell <mark@codesourcery.com>
901 * parser.c (cp_parser_template_parameter): Adjust call to
902 cp_parser_parameter_declaration.
903 (cp_parser_parameter_declaration_list): Likewise.
904 (cp_parser_parameter_declaration): Replace
905 greater_than_is_operator_p with template_parm_p parameter. Do not
906 cache tokens for template default arguments.
908 * pt.c (retrieve_local_specialization): Use htab_find, not
910 (register_local_specialization): Use htab_find_slot, not
911 htab_find_slot_with_hash.
912 (instantiate_decl): Pass a hash function to htab_create.
914 2003-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
916 * parser.c (cp_parser_binary_expression,
917 cp_parser_multiplicative_expression,
918 cp_parser_additive_expression, cp_parser_shift_expression,
919 cp_parser_relational_expression, cp_parser_equality_expression,
920 cp_parser_and_expression, cp_parser_exclusive_or_expression,
921 cp_parser_inclusive_or_expression,
922 cp_parser_logical_and_expression, cp_parser_logical_or_expression,
923 cp_parser_binary_expression): Const-ify.
925 2003-01-04 Mark Mitchell <mark@codesourcery.com>
927 * method.c (use_thunk): Disable access control while building the
930 2003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
932 * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
935 2003-01-03 Matt Austern <austern@apple.com>
937 * cp-tree.h (struct lang_type_class): add field for key method
938 (cp_global_trees): rename dynamic_classes to keyed_classes
939 (key_method): add definition
940 * class.c (finish_struct_1): compute class's key method, and add
941 the class to keyed_classes list if there is no key method.
942 * decl.c (finish_function): add class to keyed_classes list if we
943 see a definition of the class's key method.
944 * pt.c (instantiate_class_template): add template specialization
945 of a dynamic class to keyed_classes list.
946 * decl2.c (key_method): remove
947 (finish_file): iterate only through keyed_classes list when
948 deciding whether to emit vtables, remove class from its list after
951 2003-01-02 Jason Merrill <jason@redhat.com>
953 * call.c (build_conditional_expr): Stabilize lvalues properly.
954 * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
955 * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
956 Don't allow CALL_EXPR or VA_ARG_EXPR, either.
958 * call.c (convert_like_real): Call decl_constant_value for an
959 IDENTITY_CONV even if there are no more conversions.
961 * cvt.c (build_up_reference): Don't push unnamed temps.
963 * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
965 * dump.c (cp_dump_tree): Don't try to dump class-specific fields
966 for a backend struct.
968 * except.c (wrap_cleanups_r, build_throw): Make
969 MUST_NOT_THROW_EXPRs void.
970 * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
972 * init.c (build_vec_delete_1): Pre-evaluate the base address.
974 * init.c (get_temp_regvar): Simplify logic.
976 * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
977 our replacement is a decl.
979 * decl.c (cp_make_fname_decl): Push the decls inside the
982 2003-01-03 Nathan Sidwell <nathan@codesourcery.com>
985 * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
988 2003-01-03 Graham Stott <graham.stott@btinternet.com>
990 * parser.c (struct cp_parser): Add access_checks_lists field
991 (cp_parser_simple_declaration): Use.
992 (cp_parser_init_declarator): Likewise.
994 2003-01-02 Mark Mitchell <mark@codesourcery.com>
996 * parser.c (cp_parser_declaration): Accept the __extension__
997 keyword before the declaration.
1000 * parser.c (cp_parser_parameter_declaration): Allow attributes to
1001 appear after the declarator.
1003 * call.c (build_new_method_call): Fix typo in message format
1006 2003-01-02 Mark Mitchell <mark@codesourcery.com>
1008 * parser.c (cp_lexer_next_token_is): Declare it inline.
1009 (cp_lexer_set_source_position_from_token): Likewise.
1010 (cp_lexer_debugging_p): Likewise.
1011 (cp_parser_parsing_tentatively): Likewise.
1012 (cp_parser_nested_name_specifier_opt): Reduce the number of calls
1013 to the cp_lexer_peek_token.
1015 * parser.c (cp_parser_sizeof_operand): Do not evaluate the
1018 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
1020 * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
1021 cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
1022 cp/repo.c: Fix copyright years.
1024 2003-01-01 Neil Booth <neil@daikokuya.co.uk>
1026 * lex.c: Remove superfluous include of cpplib.h.
1027 (CONSTRAINT): Define without conditions.
1028 (init_cp_pragma): Use c_register_pragma.
1030 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
1032 * .cvsignore: Remove.
1034 2002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl>
1036 * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
1037 except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
1038 lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
1039 pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
1040 typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
1042 * lex.h: parse.y is dead, so don't mention it. Also replace the
1043 copyright header with the default GNU copyright header.
1045 2002-12-31 Mark Mitchell <mark@codesourcery.com>
1047 * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
1048 (lookup_name_namespace_only): Likewise.
1049 (begin_only_namespace_names): Likewise.
1050 (end_only_namespace_names): Likewise.
1051 * decl.c (only_namespace_names): Remove.
1052 (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
1053 (lookup_name_real): Do not check only_namespace_names.
1054 (lookup_name_namespace_only): Remove.
1055 (begin_only_namespace_names): Likewise.
1056 (end_only_namespace_names): Likewise.
1057 * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
1058 nested-name-specifiers more gracefully.
1059 (cp_parser_class_or_namespace_name): Avoid looking up namespace
1060 names when they cannot possibly appear.
1061 (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
1062 (cp_parser_elaborated_type_specifier): Likewise.
1063 (cp_parser_namespace_name): Only look for namespace names.
1064 (cp_parser_lookup_name): Add is_namespace parameter.
1065 (cp_parser_lookup_name_simple): Adjust call to
1066 cp_parser_lookup_name.
1068 * parser.c (cp_parser_dependent_type_p): Fix thinko.
1070 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
1072 * .cvsignore: Update.
1074 2002-12-31 Nathan Sidwell <nathan@codesourcery.com>
1076 * class.c (modify_vtable_entry): Remove unused variable.
1077 (get_vcall_index): Always expect a non-thunk.
1078 (update_vtable_entry_for_fn): Combine covariant adjustments, when
1079 overriding a thunk. Pass get_vcall_index a non-thunk.
1081 * decl2.c (finish_file): Mark undefined inlines as extern.
1083 2002-12-31 Mark Mitchell <mark@codesourcery.com>
1085 * cp-tree.def (RETURN_INIT): Remove.
1086 * cp-tree.h (DECL_IN_MEMORY_P): Remove.
1087 (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
1088 (note_level_for_for): Remove.
1089 (note_level_for_try): Likewise.
1090 (note_level_for_catch): Likewise.
1091 (finish_named_return_value): Likewise.
1092 (do_pushlevel): Change prototype.
1093 (pending_lang_change): Remove.
1094 * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
1096 (note_level_for_for): Remove.
1097 (note_level_for_try): Likewise.
1098 (note_level_for_catch): Likewise.
1099 (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
1100 * parser.c (cp_parser_context_free_list): Make it "deletable".
1101 (cp_parser_template_argument): Remove misleading comment.
1102 * pt.c (tsubst_expr): Remove RETURN_INIT code.
1103 * semantics.c (genrtl_named_return_value): Remove.
1104 (do_pushlevel): Take a scope kind as an argument.
1105 (begin_if_stmt): Adjust.
1106 (begin_while_stmt): Likewise.
1107 (begin_for_stmt): Likewise.
1108 (finish_for_init_stmt): Likewise.
1109 (begin_switch_stmt): Likewise.
1110 (begin_handler): Likewise.
1111 (begin_compound_stmt): Likewise.
1112 (finish_named_return_value): Remove.
1113 (cp_expand_stmt): Remove RETURN_INIT case.
1114 * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
1116 2002-12-31 Mark Mitchell <mark@codesourcery.com>
1119 * parser.c (cp_parser_direct_declarator): Handle erroneous
1120 parenthesized declarators correctly.
1122 2002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1124 * cp-tree.h (pending_lang_change): Declare.
1126 2002-12-30 Mark Mitchell <mark@codesourcery.com>
1128 * parser.c (cp_parser_context_free_list): New variable.
1129 (cp_parser_context_new): Use it.
1130 (cp_parser_error): Check return code from
1131 cp_parser_simulate_error.
1132 (cp_parser_simulate_error): Return a value.
1133 (cp_parser_id_expression): Optimize common case.
1134 (cp_parser_class_name): Likewise.
1135 (cp_parser_class_specifier): Adjust call to
1136 cp_parser_late_parsing_default_args.
1137 (cp_parser_lookup_name): Optimize common case.
1138 (cp_parser_late_parsing_for_member): Adjust call to
1139 cp_parser_late_parsing_default_args.
1140 (cp_parser_late_parsing_default_args): Add scope parameter.
1141 (cp_parser_require): Avoid creating the error message unless it's
1143 (cp_parser_parse_definitely): Place free'd contexts on the free
1146 * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
1148 2002-12-30 David Edelsohn <edelsohn@gnu.org>
1150 * parser.c (cp_parser_parameter_declaration_clause): Treat system
1151 header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
1153 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
1155 * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
1158 2002-12-30 Mark Mitchell <mark@codesourcery.com>
1162 * Make-lang.in (gt-cp-spew.h): Remove.
1163 * cp-tree.h (do_pending_lang_change): Remove.
1164 (do_identifier): Change prototype.
1165 (finish_id_expr): Remove.
1166 * decl.c (lookup_name_real): Remove yylex variable.
1167 * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
1168 * lex.c (init_cpp_parse): Remove.
1169 (reduce_cmp): Likewise.
1170 (token_cmp): Likewise.
1172 (lastiddecl): Likewise.
1173 (token_count): Likewise.
1174 (reduce_count): Likewise.
1176 (print_parse_statistics): Likewise.
1177 (do_pending_lang_change): Likewise.
1178 (do_identifier): Remove parsing parameter.
1179 * lex.h (lastiddecl): Remove.
1180 (looking_for_typename): Remove.
1181 (looking_for_template): Likewise.
1182 (pending_lang_change): Likewise.
1184 * semantics.c (finish_id_expr): Remove.
1186 * decl.c (grokdeclarator): Diagnost "extern thread" and "static
1189 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
1191 * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
1192 end, not the C front end.
1194 2002-12-30 Nathan Sidwell <nathan@codesourcery.com>
1196 * cp-tree.h (THUNK_TARGET): New macro.
1197 (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
1198 (finish_thunk): Remove offset parms.
1199 * class.c (find_final_overrider): Look through thunks.
1200 (get_vcall_index): Use THUNK_TARGET.
1201 (update_vtable_entry_for_fn): Look through thunks. Set covariant
1202 fixed offset here. Adjust finish_thunk call.
1203 (build_vtbl_initializer): Adjust finish_thunk calls.
1204 * mangle.c (mangle_call_offset): Remove superfluous if.
1205 (mangle_thunk): Adjust.
1206 * method.c (make_thunk): Adjust.
1207 (finish_thunk): Adjust.
1208 (thunk_adjust): Remove assert.
1209 (use_thunk): Use THUNK_TARGET
1210 * dump1.c (cp_dump_tree): Adjust thunk dumping.
1213 * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
1214 * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
1216 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
1218 Remove traditional C constructs 4/n.
1219 * decl2.c (grok_method_quals, warn_if_unknown_interface,
1220 grok_x_components, cp_build_parm_decl, build_artificial_parm,
1221 maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
1222 delete_sanity, check_member_template, check_java_method,
1223 check_classfn, finish_static_data_member_decl, grokfield,
1224 grokbitfield, grokoptypename, grok_function_init,
1225 cplus_decl_attributes, constructor_name, defer_fn,
1226 build_anon_union_vars, finish_anon_union, coerce_new_type,
1227 coerce_delete_type, comdat_linkage, maybe_make_one_only,
1228 key_method, import_export_vtable, import_export_class,
1229 output_vtable_inherit, import_export_decl, import_export_tinfo,
1230 build_cleanup, get_guard, get_guard_bits, get_guard_cond,
1231 set_guard, start_objects, finish_objects,
1232 start_static_storage_duration_function,
1233 finish_static_storage_duration_function, get_priority_info,
1234 start_static_initialization_or_destruction,
1235 finish_static_initialization_or_destruction,
1236 do_static_initialization, do_static_destruction,
1237 prune_vars_needing_no_initialization, write_out_vars,
1238 reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
1239 add_using_namespace, merge_functions, ambiguous_decl,
1240 lookup_using_namespace, lookup_using_namespace,
1241 qualified_lookup_using_namespace, set_decl_namespace,
1242 decl_namespace, current_decl_namespace, push_decl_namespace,
1243 pop_decl_namespace, push_scope, pop_scope, add_function,
1244 arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
1245 lookup_arg_dependent, do_namespace_alias,
1246 validate_nonmember_using_decl, do_nonmember_using_decl,
1247 do_toplevel_using_decl, do_local_using_decl,
1248 do_class_using_decl, do_using_directive, check_default_args,
1249 mark_used, handle_class_head): Use C90 prototypings. Use booleans.
1250 * parser.c (cp_parser_class_head): Use booleanss.
1251 * decl.c (walk_globals, walk_vtables): Likewise.
1252 * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
1253 walk_globals): Change return type from 'int' to 'bool'.
1254 * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
1255 throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
1256 build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
1257 get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
1258 qualifier_flags, tinfo_base_init, generic_initializer,
1259 ptr_initializer, dfs_class_hint_mark, ptm_initializer,
1260 dfs_class_hint_unmark, class_hint_flags, class_initializer,
1261 typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
1262 get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
1263 unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
1264 * repo.c (repo_compile_flags, repo_template_declared,
1265 repo_template_defined, repo_class_defined, repo_get_id,
1266 repo_template_used, repo_vtable_used, repo_inline_used,
1267 repo_tinfo_used, repo_template_instantiated, extract_string,
1268 open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
1269 finish_repo): Likewise.
1270 * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
1271 cxx_print_xnode): Likewise..
1272 * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
1273 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
1274 * cxxfilt.c (demangle_it, print_demangler_list, usage,
1275 standard_symbol_characters, hp_symbol_characters, main, fatal):
1277 (strip_underscore): Change type from 'int' to 'bool'.
1278 (main): Use boolean constants.
1280 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
1282 Remove traditional C constructs 3/n.
1283 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
1284 build_up_reference, warn_ref_binding, convert_to_reference,
1285 convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
1286 convert_to_void, convert, convert_force, build_type_conversion,
1287 build_expr_type_conversion, type_promotes_to,
1288 perform_qualification_conversions): Use C90 prototyping style.
1289 * decl2.c (grok_array_decl): Use boolean constant.
1290 (delete_sanity): Likewise.
1291 * typeck.c (build_unary_op): Likewise.
1292 * semantics.c (finish_switch_cond): Likewise.
1293 * parser.c (cp_parser_direct_new_declarator): Likewise.
1294 * init.c (build_new): Likewise.
1296 2002-12-27 Mark Mitchell <mark@codesourcery.com>
1298 * Make-lang.in (po-generated): Remove parse.c.
1299 (CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
1300 ($(srcdir)/cp/parse.h): Remove target.
1301 ($(srcdir)/cp/parse.c): Likewise.
1302 (gt-cp-parse.h): Likewise.
1303 (gt-cp-parser.h): New target.
1304 (c++.distclean): Do not remove parse.output.
1305 (c++.maintainer-clean): Do not remove parse.c or parse.h.
1306 (cp/spew.o): Remove target.
1307 (cp/lex.o): Adjust dependencies.
1308 (cp/pt.o): Likewise.
1309 (cp/parse.o): Likewise.
1310 (cp/TAGS): Do not mention parse.c.
1311 (cp/parser.o): New target.
1312 * NEWS: Mention the new parser.
1313 * call.c (build_scoped_method_call): Simplify.
1314 (build_method_call): Likewise.
1315 (build_new_function_call): Adjust calls to add_function_candidate
1316 and add_template_candidate.
1317 (build_new_op): Improve handling of erroroneous operands.
1318 (convert_default_arg): Remove circular argument processing.
1319 (name_as_c_string): New function.
1320 (build_new_method_call): Use it.
1321 (perform_implicit_conversion): Use error_operand_p.
1322 * class.c (finish_struct_anon): Use constructor_name_p.
1323 (check_field_decls): Likewise.
1324 (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
1325 (resolve_address_of_overloaded_function): Likewise.
1326 (instantiate_type): Tweak pointer-to-member handling.
1327 (get_primary_binfo): Remove incorrect assertion.
1328 * config-lang.in (gtfiles): Add parser.c, remove parse.c.
1329 * cp-tree.h (DEFARG_TOKENS): New macro.
1330 (default_arg): New structure.
1331 (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
1332 (lang_tree_node): Add default_arg.
1333 (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
1334 (type_info_ref_type): New macro.
1335 (saved_scope): Make processing_explicit_instantiation a boolean.
1336 (check_access): New field.
1337 (unparsed_text): Remove.
1338 (language_function): Remove unparsed_inlines.
1339 (error_operand_p): New macro.
1340 (lang_decl): Adjust pending_inline_info.
1341 (DEFARG_POINTER): Remove.
1342 (tag_types): Add typenames.
1343 (lookup_ualified_name): Declare.
1344 (lookup_name_real): Likewise.
1345 (shadow_tag): Adjust prototype.
1346 (get_scope_of_declarator): Declare it.
1347 (process_next_inline): Remove it.
1348 (check_for_missing_semicolon): Likewise.
1349 (maybe_get_template_decl_from_type_decl): Declare it.
1350 (finish_label_stmt): Adjust prototype.
1351 (finish_non_static_data_meber): Declare it.
1352 (finish_pseudo_destructor_call_expr): Rename to ...
1353 (finish_pseudo_destructor_expr): ... this.
1354 (finish_compound_literal): Declare it.
1355 (begin_inline_definitions): Remove it.
1356 (init_spew): Remove.
1357 (peekyylex): Likewise.
1358 (arbitrate_lookup): Likewise.
1359 (frob_opname): Likewise.
1360 (maybe_snarf_defarg): Likewise.
1361 (add_defarg_fn): Likewise.
1362 (do_pending_defargs): Likewise.
1363 (done_pending_defargs): Likewise.
1364 (unprocessed_defarg_fn): Likewise.
1365 (replace_defarg): Likewise.
1366 (end_input): Likewise.
1367 (get_overloaded_fn): Likewise.
1368 * cvt.c (convert_to_reference): Improve error handling.
1369 * decl.c (lookup_name_real): Do not declare it static.
1370 (maybe_push_to_top_level): Set check_access.
1371 (identifier_type_value): Adjust call to lookup_name_real.
1372 (lookup_qualified_name): New method.
1373 (lookup_name_real): Remove special-case parsing code.
1374 (lookup_name-nonclass): Adjust call to lookup_name_real.
1375 (lookup_name_namespace_only): Likewise.
1376 (lookup_name): Likewise.
1377 (check_tag_decl): Return the type declared.
1378 (shadow_tag): Likewise.
1379 (register_dtor_fn): Tweak check_access.
1380 (grokfndecl): Use constructor_name_p.
1381 (get_scope_of_declarator): New function.
1382 (grokdeclarator): Obscure tweaks for slightly different declarator
1384 (start_method): Return error_mark_node to indicate failure.
1385 (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
1386 * decl2.c (constructor_name_full): Simplify.
1387 (constructor_name): Use it.
1388 (build_expr_from_tree): Adjust for changes to do new parser.
1389 (push_scope): Improve robustness.
1390 (validate_nonmember_using_decl): Process declarations, not names.
1391 (do_class_using_decl): Likewise.
1392 (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
1394 * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
1395 * expr.c (cxx_expand_expr): Handle BASELINKs.
1396 * init.c (member_init_ok_or_else): Issue more errors.
1397 (build_offset_ref): Tweak handling of FUNCTION_DECLs.
1398 * lex.c: Do not include parse.h.
1399 (yypring): Do not declare.
1401 (make_reference_declarator): Remove error-generating code.
1402 (rid_to_yy): Remove.
1403 (cxx_init): Do not call init_spew.
1405 (check_for_missing_semicolon): Remove.
1406 * lex.h (got_scope): Remove.
1407 (got_object): Remove.
1408 * method.c (hack_identifier): Use finish_non_static_data_member.
1409 (implicitly_declare_fn): Adjust use of constructor_name.
1410 * parser.c: New file.
1411 * pt.c (parse.h): Do not include it.
1412 (maybe_get_template_decl_from_template): Do not declare it.
1413 (finish_member_template_decl): Tweak.
1414 (begin_explicit_instantiation): Adjust for
1415 processing_explicit_instantiation being boolean.
1416 (end_explicit_instantiation): Likewise.
1417 (maybe_process_partial_specialization): Tighten specialization
1419 (retrieve_local_specialization): Adjust ue of hash table.
1420 (eq_local_specializations): New function.
1421 (register_local_specialization): Likewise.
1422 (push_template_decl_real): Remove unnecessary test.
1423 (maybe_get_template_decl_from_type_decl): Don't make it static.
1424 (for_each_template_parm_r): Handle TYPEOF_TYPE.
1425 (tsubst_copy): Use retrieive_local_specialization to handle
1426 PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
1427 Handle COMPONENT_REFs with pseudo-destructor-expressions.
1428 Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
1429 (tsubst_expr): Pass decls, not names, to do_local_using_decl.
1430 (unify): Tweak handling of CONST_DECLs.
1431 (regenerate_decl_from_template): Use push_nested_class.
1432 (template_for_substitution): New funciton.
1433 (instantiate_decl): Use it. Register parameters as local
1435 * rtti.c (init_rtti_processing): Set type_info_ref_type.
1436 (build_typeid): Use it.
1437 (get_typeid): Likeise.
1438 * search.c (accessible_p): Use check_access, not
1439 flag_access_control.
1440 (adjust_result_of_qualified_name_lookup): Pay attention to the
1442 * semantics.c (finish_asm_stmt): Adjust error handling.
1443 (finish_label_stmt): Return the statement.
1444 (finish_non_static_data_member): New function.
1445 (finish_class_expr): Handle BASELINKs.
1446 (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
1447 (finish_object_call_expr): Simplify handling during templates.
1448 (finish_pseudo_destructor_call_expr): Rename to ...
1449 (finish_pseudo_dtor_expr): ... this.
1450 (finish_compound_literal): New function.
1451 (begin_inline_definitions): Remove.
1452 (finish_sizeof): Remove special template handling.
1453 * spew.c: Do not include parse.h.
1454 * tree.c (get_overloaded_fn): Remove.
1455 * typeck.c (build_class_member_access_expr): Handle
1456 PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
1457 (lookup_destructor): New function.
1458 (finish_class_member_access_expr): Use it.
1459 (convert_arguments): Simplify.
1460 (build_unary_op): Handle BASELINKs.
1462 2002-12-26 Nathan Sidwell <nathan@codesourcery.com>
1465 * decl2.c (mark_used): Defer inline functions.
1466 (finish_file): Merge deferred_fns loops. Check all used
1467 inline functions have a definition.
1468 * method.c (make_thunk): Thunks are not inline.
1470 PR c++/5116, c++/764
1471 * call.c (build_new_op): Make sure template class operands are
1474 2002-12-24 Nathan Sidwell <nathan@codesourcery.com>
1477 * cp-tree.h (resolve_scoped_fn_name): Prototype.
1478 * call.c (resolve_scoped_fn_name): New function. Deal with
1479 more template expansion. Broken out of ...
1480 * parse.y (parse_finish_call_expr): ... here. Call it.
1481 * decl2.c (build_expr_from_tree, CALL_EXPR): Use
1482 resolve_scoped_fn_name and build_call_from_tree.
1485 * decl.c (duplicate_decls): Templates may be disambiguated by
1489 * decl2.c (check_classfn): Use lookup_fnfield_1. List all
1490 conversion operators on failure.
1492 2002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1494 Remove traditional C constructs 2/n.
1495 * call.c (tourney, build_field_call, equal_functions, joust,
1496 compare_ics, build_over_call, build_java_interface_fn_ref,
1497 convert_like_real, op_error, build_object_call, resolve_args,
1498 build_vfield_ref, check_dtor_name, build_scoped_method_call,
1499 build_addr_func, build_call, build_method_call, null_ptr_cst_p,
1500 sufficient_parms_p, build_conv, non_reference, strip_top_quals,
1501 standard_conversion, reference_related_p,
1502 reference_compatible_p, convert_class_to_reference,
1503 direct_reference_binding, reference_binding,
1504 ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
1505 add_template_conv_candidate, any_viable, any_strictly_viable,
1506 build_this, splice_viable, print_z_candidates,
1507 build_user_type_conversion, build_new_function_call,
1508 conditional_conversion, build_conditional_expr, build_new_op,
1509 build_op_delete_call, enforce_access, call_builtin_trap,
1510 convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
1511 convert_default_arg, type_passed_as, convert_for_arg_passing,
1512 in_charge_arg_for_name, is_properly_derived_from,
1513 maybe_handle_implicit_object, maybe_handle_ref_bind,
1514 source_type, add_warning, can_convert, can_convert_arg,
1515 perform_implicit_conversion, can_convert_arg_bad,
1516 initialize_reference, add_conv_candidate,
1517 add_template_candidate_real, add_template_candidate): Ansify.
1519 2002-12-22 Nathan Sidwell <nathan@codesourcery.com>
1522 * cp-tree.h (grokoptypename): Add SCOPE parameter.
1523 * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
1524 if in a template scope.
1525 * parse.y (unoperator): Return the scope.
1526 (operator_name): Adjust grokoptypename call.
1528 2002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1530 * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
1531 * decl.c (make_unbound_class_template): Adjust. Check for tf_error.
1532 * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
1534 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
1536 * ChangeLog: Fix a typo.
1537 * class.c: Fix comment typos.
1538 * cp-tree.h: Likewise.
1540 2002-12-18 Jason Merrill <jason@redhat.com>
1542 Handle anonymous unions at the tree level.
1543 C++ ABI change: Mangle anonymous unions using the name of their
1544 first named field (by depth-first search). Should not cause
1545 binary compatibility problems, though, as the compiler previously
1546 didn't emit anything for affected unions.
1547 * cp-tree.def (ALIAS_DECL): New tree code.
1548 * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
1549 first field, not the largest.
1550 (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
1551 push the decl, and write it out at namespace scope.
1552 * decl.c (lookup_name_real): See through an ALIAS_DECL.
1553 (pushdecl): Add namespace bindings for ALIAS_DECLs.
1554 * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
1555 of a decl which doesn't have one.
1556 * typeck.c (build_class_member_access_expr): Don't recurse if
1557 we already have the type we want.
1559 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1562 * friend.c (make_friend_class): Allow partial specialization
1563 when declaration is not a template friend.
1565 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1568 * pt.c (lookup_template_class): Copy TREE_PRIVATE and
1569 TREE_PROTECTED to created decl nodes.
1571 2002-12-18 Mark Mitchell <mark@codesourcery.com>
1573 * class.c (build_base_field): Do not set DECL_PACKED on the
1576 2002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
1578 * cp-tree.h (struct tree_srcloc): Use location_t.
1579 (SOURCE_LOCUS): New.
1580 (SRCLOC_FILE, SRCLOC_LINE): Adjust.
1582 2002-12-17 Jason Merrill <jason@redhat.com>
1584 * decl.c (finish_function): Also complain about no return in
1586 * semantics.c (finish_return_stmt): Also call check_return_expr in
1588 * typeck.c (check_return_expr): In a template, just remember that we
1591 2002-12-16 Jason Merrill <jason@redhat.com>
1593 * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
1596 * semantics.c (do_pushlevel): Call pushlevel after adding the
1598 (do_poplevel): Call poplevel before adding the SCOPE_STMT.
1599 * parse.y (function_body): Go back to using compstmt.
1600 * decl.c (pushdecl): Skip another level to get to the parms level.
1602 * call.c (build_new_method_call): Use is_dummy_object to determine
1603 whether or not to evaluate the object parameter to a static member
1606 2002-12-14 Jason Merrill <jason@redhat.com>
1608 * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
1609 return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
1610 * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
1611 don't bother with an AGGR_INIT_EXPR.
1612 (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
1613 just generate a new decl normally. Take return slot parm.
1614 * cp-tree.h: Adjust prototype.
1616 2002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
1619 * cvt.c (convert_to_pointer_force): Don't try comparing against
1622 2002-12-13 Geoffrey Keating <geoffk@apple.com>
1624 * cp-tree.h: Have the multiple-include guards around
1627 2002-12-10 David Edelsohn <edelsohn@gnu.org>
1629 * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
1631 (snarf_method): Same.
1632 (snarf_defarg): Same.
1634 2002-12-10 Mark Mitchell <mark@codesourcery.com>
1637 * pt.c (tsubst_copy): Handle destructor names more correctly.
1639 2002-12-10 Matt Austern <austern@apple.com>
1641 * cp-tree.h: get rid of needs_virtual_reinit bit.
1643 2002-12-09 Mark Mitchell <mark@codesourcery.com>
1645 * NEWS: Document removal of in-class initialization extension for
1646 static data members of non-arithmetic, non-enumeration type.
1647 * decl.c (check_static_variable_definition): Do not allow that
1649 * decl2.c (grokfield): Do not call digest_init when processing
1652 2002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1654 * error.c (dump_expr): Fix format specifier warning.
1656 2002-12-04 Geoffrey Keating <geoffk@apple.com>
1658 * class.c (finish_struct_1): Correct comment.
1659 * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
1661 2002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1664 * error.c (dump_expr): Don't ever try to dump a non-existent
1667 2002-12-03 Nathan Sidwell <nathan@codesourcery.com>
1669 Implement covariant returns.
1670 * cp-tree.h (IS_AGGR_TYPE_2): Remove.
1671 (struct lang_decl_flags): Add this_thunk_p flag.
1672 Rename vcall_offset to virtual_offset.
1673 (struct lang_decl): Rename delta to fixed_offset.
1674 (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
1675 (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
1676 (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
1677 (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
1678 (make_thunk): Add this_adjusting arg.
1679 (finish_thunk): Declare.
1680 (mangle_thunk): Add this_adjusting arg.
1681 * class.c (get_vcall_index): Use base function for lookup.
1682 (update_vtable_entry_for_fn): Generate covariant thunk.
1683 (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
1684 (build_vtbl_initializer): Use base function for lookup.
1685 Finish covariant thunk here. Adjust thunk generation.
1686 * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
1687 Adjust thunk dumping.
1688 * mangle.c (mangle_call_offset): New function.
1689 (mangle_thunk): Adjust for covariant thunks.
1690 * method.c (make_thunk): Adjust. Do not set name here.
1691 (finish_thunk): New function. Set name here.
1692 (use_thunk): Generate covariant thunks too.
1693 (thunk_adjust): New function.
1694 * search.c (covariant_return_p): Remove. Fold into ...
1695 (check_final_overrider): ... here. Simplify.
1696 * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
1698 2002-12-03 Jason Merrill <jason@redhat.com>
1701 * call.c (build_over_call): Check specifically for TARGET_EXPR
1704 PR c++/8461, c++/8625
1705 * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
1706 (cp_convert_parm_for_inlining): Remove.
1707 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
1709 * cp-tree.h (ADDR_IS_INVISIREF): Remove.
1710 * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
1712 * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
1713 an ambiguous conversion.
1715 2002-12-03 Mark Mitchell <mark@codesourcery.com>
1718 * decl.c (reshape_init): Handle erroneous initializers.
1720 2002-12-02 Mark Mitchell <mark@codesourcery.com>
1723 * spew.c (remove_last_token): Make sure that last_chunk is set
1727 * error.c (dump_expr): Handle character constants with
1730 2002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1733 * decl.c (grokdeclarator): Require class-key for all friend class.
1734 Output the correct type and context in the error message.
1736 2002-12-01 Mark Mitchell <mark@codesourcery.com>
1739 * pt.c (unify): Use variably_modified_type_p to test validity of
1740 template argument types.
1743 * cp-tree.h (lang_type_class): Add typeinfo_var.
1744 (CLASSTYPE_TYPEINFO_VAR): New macro.
1745 * rtti.c (get_tinfo_decl): Use it.
1748 * init.c (expand_member_init): Always get the main variant of a
1751 2002-12-01 Mark Mitchell <mark@codesourcery.com>
1755 * decl.c (cxx_init_decl_processing): Use size_type_node, not
1757 * decl2.c (coerce_new_type): Likewise.
1758 * except.c (do_allocate_exception): Likewise.
1760 2002-11-30 Zack Weinberg <zack@codesourcery.com>
1762 * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
1763 dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
1764 lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
1765 repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
1766 typeck2.c: Include coretypes.h and tm.h.
1767 * Make-lang.in: Update dependencies.
1769 2002-11-30 Mark Mitchell <mark@codesourcery.com>
1772 * decl.c (layout_var_decl): Deal gracefully with erroneous types.
1773 (check_initializer): Validate the type of the initialized
1774 variable, even if the initializer is absent.
1775 * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
1778 * typeck.c (convert_for_assignment): Do not use
1779 decl_constant_value on the operand.
1782 * pt.c (instantiate_decl): Handle template friends defined outside
1783 of the class correctly.
1785 2002-11-29 Joe Buck <jbuck@synopsys.com>
1787 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
1790 2002-11-29 Mark Mitchell <mark@codesourcery.com>
1792 * class.c (walk_subobject_offsets): Recur on binfos as well as on
1794 (layout_nonempty_base_or_field): Pass it a binfo when processing a
1796 (layout_empty_base): Likewise.
1797 (build_base_field): Likewise.
1799 2002-11-27 Mark Mitchell <mark@codesourcery.com>
1801 * class.c (build_base_field): Make sure we get the canonical base
1802 when descending through primary bases.
1804 2002-11-26 Geoffrey Keating <geoffk@apple.com>
1806 * decl.c (check_initializer): Don't error on initialisation of
1807 a scalar with a brace-enclosed expression.
1809 2002-11-26 Nathan Sidwell <nathan@codesourcery.com>
1811 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
1812 (template_parms_equal): Remove prototype.
1813 * typeck.c (buuld_indirect_ref): Reformat.
1815 2002-11-25 Jason Merrill <jason@redhat.com>
1817 * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
1820 2002-11-25 Mark Mitchell <mark@codesourcery.com>
1822 * tree.c (cp_build_qualified_type_real): Correct handling of
1824 * class.c (walk_subobject_offsets): Fix thinko.
1825 (build_base_field): Record offsets of empty bases in primary
1827 (layout_class_type): Record offsets of empty bases in fields.
1829 * search.c (is_subobject_of_p_1): Fix thinko.
1830 (lookup_field_queue_p): Likewise.
1832 2002-11-24 Mark Mitchell <mark@codesourcery.com>
1834 * class.c (layout_class_type): Reuse tail padding when laying out
1837 2002-11-22 Mark Mitchell <mark@codesourcery.com>
1839 * rtti.c (qualifier_flags): Fix thinko.
1841 2002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
1843 Remove traditional C constructs 1/n.
1844 * cp-tree.h (init_method, set_mangled_name_for_decl,
1845 build_opfncall, hack_identifier, make_thunk, use_thunk,
1846 synthesize_method, implicitly_declare_fn,
1847 skip_artificial_parms_for, optimize_function, calls_setjmp_p,
1848 maybe_clone_body): Remove use of PARAMS.
1850 * method.c (do_build_assign_ref, do_build_copy_constructor,
1851 synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
1853 (synthesize_method): Use 'bool' type and constants instead of
1855 (locate_copy): Likewise.
1856 (implicitly_declare_fn): Likewise.
1858 * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
1859 Remove old-style declaration.
1860 (maybe_clone_body): Use 'bool' type and constants.
1862 2002-11-21 Glen Nakamura <glen@imodulo.com>
1865 * typeck.c (get_member_function_from_ptrfunc): Make sure that a
1866 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
1867 of the branches of a COND_EXPR.
1869 2002-11-19 Mark Mitchell <mark@codesourcery.com>
1871 * pt.c (for_each_template_parm): Free allocated memory.
1872 * search.c (is_subobject_of_p_1): New function.
1873 (is_subobject_of_p): Avoid walking virtual bases multiple times.
1875 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
1877 * g++spec.c (lang_specific_spec_functions): New.
1879 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
1881 * ChangeLog: Follow spelling conventions.
1882 * class.c: Likewise.
1883 * decl2.c: Likewise.
1885 2002-11-14 Zack Weinberg <zack@codesourcery.com>
1887 * search.c (dfs_push_decls): Do not try to reorder elements
1888 3..n of method_vec if method_vec has only two elements.
1889 Reverse order of two tests to avoid accessing unallocated
1892 2002-11-14 Mark Mitchell <mark@codesourcery.com>
1894 * class.c (dfs_find_final_overrider): Adjust so that the most
1895 derived object is a binfo, rather than a class type.
1896 (find_final_overrider): Likewise.
1897 (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
1898 (add_vcall_offset): Likewise.
1900 2002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1903 * pt.c (instantiate_template): Push class scope for member
1905 (get_mostly_instantiated_function_type): Likewise. Don't call
1906 tsubst on context. Remove CONTEXTP and TPARMSP parameters.
1907 * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
1908 * mangle.c (write_encoding, write_unqualified_name): Adjust.
1910 2002-11-07 Mark Mitchell <mark@codesourcery.com>
1912 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
1913 vcall offfsets. Split out ...
1914 (add_vcall_offset): ... new function.
1917 * pt.c (for_each_template_parm): Add htab parameter.
1918 (process_partial_specialization): Adjust call.
1919 (push_template_decl_real): Likewise.
1920 (pair_fn_data): Add visited.
1921 (for_each_template_parm_r): Avoid walking duplicates more than
1923 (uses_template_parms): Adjust call to for_each_template_parm.
1925 2002-11-07 Mark Mitchell <mark@codesourcery.com>
1927 * class.c (add_implicitly_declared_members): Put implicitly
1928 declared functions at the end of TYPE_METHODs when -fabi-version
1931 2002-11-05 Geoffrey Keating <geoffk@apple.com>
1933 * decl2.c (finish_file): Correct spelling.
1935 2002-11-03 Mark Mitchell <mark@codesourcery.com>
1937 * call.c (build_special_member_call): Do not try to lookup VTTs by
1939 * class.c (vtbl_init_data): Add generate_vcall_entries.
1940 (get_vtable_decl): Do not look up virtual tables by name.
1941 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
1942 (set_primary_base): Do not set CLASSTYPE_RTTI.
1943 (determine_primary_base): Likewise.
1944 (get_matching_virtual): Remove.
1945 (get_vcall_index): New function.
1946 (update_vtable_entry_for_fn): Do not try to use virtual thunks
1947 when they are not required. Assign vcall indices at this point.
1948 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
1949 Do update dynamic_classes.
1950 (build_vtt): Do not add VTTs to the symbol table.
1951 (build_ctor_vtbl_group): Likewise.
1952 (build_vtbl_initializer): Simplify handling of vcall indices.
1953 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
1954 for the most derived class.
1955 (add_vcall_offset_vtbl_entries_1): But do not actually add them to
1957 * cp-tree.h (dynamic_classes): New macro.
1958 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
1959 (CLASSTYPE_RTTI): Remove.
1960 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
1961 (CLASSTYPE_VCALL_INDICES): New macro.
1962 (CLASSTYPE_VTABLES): Likewise.
1963 (BV_USE_VCALL_INDEX_P): Remove.
1964 (build_vtable_path): Remove.
1965 * decl2.c (finish_vtable_vardecl): Remove.
1966 (key_method): Remove #if 0'd code.
1967 (finish_vtable_vardecl): Rename to ...
1968 (maybe_emit_vtables): ... this.
1969 (finish_file): Use it.
1970 * search.c (look_for_overrides_here): Update comment.
1972 2002-11-01 Zack Weinberg <zack@codesourcery.com>
1975 * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
1977 2002-10-30 Jason Merrill <jason@redhat.com>
1980 * cp-tree.h (ADDR_IS_INVISIREF): New macro.
1981 * call.c (convert_for_arg_passing): Set it.
1982 * except.c (stabilize_throw_expr): Recurse for such an arg.
1984 2002-10-31 Mark Mitchell <mark@codesourcery.com>
1986 * cp-tree.h (lang_decl_flags): Remove init_priority.
1987 (lang_decl): Add delta.
1988 (GLOBAL_INIT_PRIORITY): Remove.
1989 (THUNK_DELTA): Revise definition.
1990 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
1991 * dump.c (cp_dump_tree): Don't dump it.
1993 2002-10-30 Mark Mitchell <mark@codesourcery.com>
1996 * typeck2.c (process_init_constructor): Call complete_array_type.
1999 * decl.c (make_typename_type): Issue errors about invalid results.
2001 2002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2003 Core issue 287, PR c++/7639
2004 * cp-tree.h (lang_type_class): Add decl_list field.
2005 (CLASSTYPE_DECL_LIST): New macro.
2006 (maybe_add_class_template_decl_list): Add declaration.
2007 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
2008 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
2009 (maybe_add_class_template_decl_list): New function.
2010 (add_implicitly_declared_members): Use it.
2011 * decl.c (maybe_process_template_type_declaration): Likewise.
2012 (pushtag): Likewise.
2013 * friend.c (add_friend): Likewise.
2014 (make_friend_class): Likewise.
2015 * semantics.c (finish_member_declaration): Likewise.
2016 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
2017 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
2018 to process members and friends in the order of declaration.
2020 2002-10-29 Mark Mitchell <mark@codesourcery.com>
2023 * decl.c (finish_destructor_body): Create the label to jump to
2024 when returning from a destructor here.
2025 (finish_function_body): Rather than here.
2027 2002-10-25 Zack Weinberg <zack@codesourcery.com>
2030 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
2031 SCOPE_REF is not null before dereferencing it.
2033 2002-10-25 Mark Mitchell <mark@codesourcery.com>
2035 * call.c (build_over_call): Use DECL_CONTEXT, not
2036 DECL_VIRTUAL_CONTEXT.
2037 * class.c (modify_vtable_entry): Don't mess with
2038 DECL_VIRTUAL_CONTEXT.
2039 (set_vindex): Remove.
2040 (set_primary_base): Remove vfuns_p parameter.
2041 (determine_primary_base): Likewise.
2042 (modify_all_vtables): Likewise.
2043 (layout_class_type): Likewise. Adjust calls to other functions
2045 (finish_struct_1): Adjust calls to modified functions. Set
2047 * cp-tree.h (lang_type_class): Remove vsize.
2048 (CLASSTYPE_VSIZE): Remove.
2049 (lang_decl): Remove thunks.
2050 (DECL_THUNKS): Adjust.
2051 (DECL_VIRTUAL_CONTEXT): Remove.
2052 (duplicate_decls): Don't copy it.
2053 * pt.c (build_template_decl): Don't set it.
2054 (tsubst_decl): Likewise.
2055 * typeck.c (expand_ptrmemfunc_cst): Don't use it.
2057 * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
2058 (build_vtable_entry): Remove.
2059 * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
2060 (lang_decl): Add thunks.
2061 (DECL_THUNKS): New macro.
2062 * decl.c (duplicate_decls): Copy it.
2063 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
2064 * semantics.c (emit_associated_thunks): Simplify.
2066 2002-10-24 David Edelsohn <edelsohn@gnu.org>
2069 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
2070 lang_type structure exists before accessing field.
2071 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
2072 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
2073 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
2074 * class.c (check_field_decls): Use new macros.
2075 * typeck2.c (process_init_constructor): Remove redundant check for
2076 existence of lang_type structure.
2078 2002-10-24 Mark Mitchell <mark@codesourcery.com>
2080 * class.c (end_of_base): New method.
2081 (end_of_class): Use it. Check indirect virtual bases.
2083 * class.c (check_field_decls): Fix typo.
2085 2002-10-23 Mark Mitchell <mark@codesourcery.com>
2088 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
2092 * spew.c (next_token): Do not return an endless stream of
2093 END_OF_SAVED_INPUT tokens.
2094 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
2095 the cached token stream.
2096 (snarf_defarg): Likewise.
2098 2002-10-23 Zack Weinberg <zack@codesourcery.com>
2100 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
2101 variably_modified_type_p.
2102 * cp-tree.h: Remove prototype of variably_modified_type_p.
2103 * tree.c (variably_modified_type_p): Remove; now implemented
2104 in language-independent code.
2106 2002-10-22 Mark Mitchell <mark@codesourcery.com>
2109 * spew.c (snarf_parenthesized_expression): New function.
2110 (snarf_block): Use it.
2112 2002-10-22 Richard Henderson <rth@redhat.com>
2114 * method.c (use_thunk): Always compute vcall_value; assert that
2115 it is not zero. Use can_output_mi_thunk; use output_mi_thunk
2116 for vcall thunks as well.
2118 2002-10-21 Mark Mitchell <mark@codesourcery.com>
2120 * class.c (empty_base_at_nonzero_offset_p): New function.
2121 (layout_nonempty_base_or_field): Do not check for conflicts when
2122 laying out a virtual base using the GCC 3.2 ABI.
2123 (build_base_field): Correct checking for presence of empty classes
2124 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
2126 * class.c (include_empty_classes): Use normalize_rli.
2127 (layout_class_type): Likewise.
2129 * decl.c (reshape_init): Tweak handling of character arrays.
2132 * cp-tree.h (lang_type_class): Add contains_empty_class_p.
2133 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
2134 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
2135 (check_field_decls): Likewise.
2136 (layout_class_type): Likewise.
2137 (finish_struct_1): Initialize it.
2138 (walk_subobject_offsets): Use it to prune searches.
2140 2002-10-20 Mark Mitchell <mark@codesourcery.com>
2142 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
2143 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
2144 TARGET_ASM_OUTPUT_MI_THUNK in comments.
2146 2002-10-18 Zack Weinberg <zack@codesourcery.com>
2148 * decl.c (start_decl): Point users of the old initialized-
2149 typedef extension at __typeof__.
2151 2002-10-18 Mark Mitchell <mark@codesourcery.com>
2153 * Make-lang.in (method.o): Depend on TARGET_H.
2154 * method.c (target.h): Include it.
2155 (use_thunk): Use target hooks. Use vcall thunks, if available.
2157 2002-10-18 Mark Mitchell <mark@codesourcery.com>
2159 * class.c (base_derived_from): Make sure return value is a bool.
2161 2002-10-18 Mark Mitchell <mark@codesourcery.com>
2163 * class.c (find_final_overrider_data_s): Remove overriding_fn and
2165 (dfs_base_derived_from): New function.
2166 (base_derived_from): Likewise.
2167 (dfs_find_final_overrider): Use base_derived_from.
2168 (find_final_overrider): Adjust.
2170 2002-10-18 Jason Merrill <jason@redhat.com>
2173 * semantics.c (finish_for_cond, finish_while_cond): Don't mess
2174 with condition decls in a template.
2176 2002-10-17 Nathan Sidwell <nathan@codesourcery.com>
2178 * class.c (add_method): Compare template parms too.
2180 2002-10-17 Mark Mitchell <mark@codesourcery.com>
2183 * class.c (handle_using_decl): Allow the declaration used to be
2184 from an ambiguous base.
2186 * pt.c (convert_template_argument): Revert this change:
2187 2002-10-16 Mark Mitchell <mark@codesourcery.com>
2188 * pt.c (convert_template_argument): Do not fold non-type
2189 template rguments when inside a template.
2191 * init.c (expand_default_init): Handle brace-enclosed initializers
2194 2002-10-16 Mark Mitchell <mark@codesourcery.com>
2196 * mangle.c (write_expression): Correct handling of enumeration
2198 (write_template_arg): Likewise.
2199 * pt.c (convert_template_argument): Do not fold non-type template
2200 arguments when inside a template.
2203 * cvt.c (convert_to_reference): Allow references as the incoming
2206 2002-10-16 Mark Mitchell <mark@codesourcery.com>
2209 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
2210 build_qualified_type.
2212 2002-10-15 Richard Henderson <rth@redhat.com>
2214 * error.c (dump_expr): Use real_to_decimal directly, and with
2217 2002-10-15 Mark Mitchell <mark@codesourcery.com>
2219 * decl.c (reshape_init): Fix typo.
2221 * cp-tree.h (operator_name_info_t): Add arity.
2222 * lex.c (init_operators): Initialize it.
2223 * mangle.c (write_conversion_operator_name): New function.
2224 (write_unqualified_name): Use it.
2225 (write_template_args): Accept template arguments as a TREE_LIST.
2226 (write_expression): Adjust handling of qualified names to match
2229 2002-10-15 Jason Merrill <jason@redhat.com>
2231 * call.c (call_builtin_trap): New fn.
2232 (convert_arg_to_ellipsis): Use it. Downgrade error to warning.
2233 (build_call): Don't set current_function_returns_abnormally outside
2236 2002-10-14 Mark Mitchell <mark@codesourcery.com>
2238 * class.c (check_field_decls): Remove empty_p parameter. Instead,
2239 clear CLASSTYPE_EMPTY_P.
2240 (build_base_field): Likewise.
2241 (build_base_fields): Likewise.
2242 (check_bases_and_members): Likewise.
2243 (create_vtbl_ptr): Likewise.
2244 (layout_class_type): Likewise. Ensure that empty classes have
2245 size zero when used as base classes in the 3.2 ABI.
2246 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
2247 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
2249 (is_empty_class): Correct definition when using post-3.2 ABI.
2250 * cp-tree.h (lang_type_class): Add empty_p.
2251 (CLASSTYPE_EMPTY_P): New macro.
2253 2002-10-12 Nathan Sidwell <nathan@codesourcery.com>
2255 * init.c (build_delete): Do not apply save_expr for arrays.
2256 (build_vec_delete): Likewise.
2258 2002-10-14 Mark Mitchell <mark@codesourcery.com>
2260 * decl.c (layout_var_decl): Call layout_decl even for variables
2261 whose type is an array with unspecified bounds.
2264 * lex.c (do_identifier): Add another option for the parsing
2266 * parse.y (do_id): Use it.
2268 2002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
2270 PRs C++/6803, C++/7721 and C++/7803
2271 * decl.c (grokdeclarator): Gracefully handle template-name as
2274 2002-10-11 Jason Molenda <jmolenda@apple.com>
2276 * init.c (build_field_list): Provide uses_unions_p with a default
2279 2002-10-11 Mark Mitchell <mark@codesourcery.com>
2282 * cp-tree.h (variably_modified_type_p): New function.
2283 (grokdeclarator) Tighten check for variably modified types as
2285 * pt.c (convert_template_argument): Do not allow variably modified
2286 types as template arguments.
2287 * tree.c (variably_modified_type_p): New function.
2289 * NEWS: Document removal of "new X = ..." extension.
2290 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
2291 brace-enclosed initializers.
2292 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
2293 (initialize_local_var): Remove declaration.
2294 (expand_static_init): Likewise.
2295 * decl.c (next_initializable_field): New function.
2296 (reshape_init): Likewise.
2297 (check_initializer): Use them. Build dynamic initializer for
2298 aggregates here too.
2299 (initialize_local_var): Simplify, and incorporate cleanup
2300 insertion code as well.
2301 (destroy_local_var): Remove.
2302 (cp_finish_decl): Tidy.
2303 (expand_static_init): Fold checks for whether or not a variable
2304 needs initialization into this function. Simplify.
2305 * decl2.c (do_static_initialization): Simplify.
2306 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
2307 be done for us automatically.
2308 (expand_default_init): Handle brace-enclosed initializers
2310 (expand_aggr_init_1): Remove RTL-generation code.
2311 (build_vec_init): Remove "new X = ..." support.
2312 * parse.y (new_initializer): Likewise.
2313 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
2314 brace-enclosed initializer.
2315 (create_pseudo_type_info): Likewise.
2316 * typeck2.c (store_init_value): Don't try to handle digest_init
2317 being called more than once.
2318 (digest_init): Tidy handling of brace-enclosed initializers.
2320 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2322 * decl.c (typename_hash): Use htab_hash_pointer.
2324 2002-10-10 Jim Wilson <wilson@redhat.com>
2326 * decl.c (duplicate_decls): Don't call decl_attributes.
2328 2002-10-09 Zack Weinberg <zack@codesourcery.com>
2331 * decl.c (start_decl): Unconditionally issue error for
2332 'typedef foo = bar'.
2333 (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
2334 (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
2336 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2338 * decl2.c (prune_vtable_vardecl): Delete unused function.
2340 2002-10-03 Mark Mitchell <mark@codesourcery.com>
2343 * decl2.c (finish_anon_union): Do not expand anonymous unions when
2344 procesing template functions.
2345 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
2346 type. Call layout_decl.
2347 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
2349 2002-10-07 Richard Henderson <rth@redhat.com>
2351 * decl2.c, pt.c: Revert c++/7754 fix.
2353 2002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2356 * error.c (dump_expr) [REAL_CST]: Output in decimal format.
2358 2002-10-03 Mark Mitchell <mark@codesourcery.com>
2361 * pt.c (for_each_template_parm_r): Handle BASELINKs.
2364 * decl2.c (finish_anon_union): Do not expand anonymous unions when
2365 procesing template functions.
2366 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
2367 type. Call layout_decl.
2368 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
2370 2002-10-03 Mark Mitchell <mark@codesourcery.com>
2373 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
2374 template parameters.
2375 (globals): Add entity and need_abi_warning.
2376 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
2377 CLASSTYPE_TEMPLATE_INFO.
2378 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
2380 (write_prefix): Handle typename types correctly.
2381 (write_template_prefix): Handle template template parameters
2383 (start_mangling): Add entity parameter.
2384 (finish_mangling): Warn about names whose mangling will change.
2385 (mangle_decl_string): Adjust.
2386 (mangle_type_string): Likewise.
2387 (mangle_special_for_type): Likewise.
2388 (mangle_ctor_vtbl_for_type): Likewise.
2389 (mangle_thunk): Likewise.
2390 (mangle_guard_variable): Likewise.
2391 (mangle_ref_init_variable): Likewise.
2393 2002-10-02 Mark Mitchell <mark@codesourcery.com>
2396 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
2397 * cp-tree.h (emit_base_init): Rename to ....
2398 (emit_mem_initializers): ... this.
2399 (expand_member_init): Change prototype.
2400 * init.c (perform_member_init): Compute explicit, rather than
2401 requiring it as a parameter.
2402 (sort_member_init): Rename to ...
2403 (sort_mem_initializers): ... this. Process bases and data members
2405 (sort_base_init): Remove.
2406 (emit_base_init): Rename to ...
2407 (emit_mem_initializers): ... this.
2408 (expand_aggr_vbase_init_1): Remove.
2409 (construct_virtual_bases): Rename to ...
2410 (construct_virtual_base): ... this.
2411 (expand_member_init): Rework handling of base initializers.
2412 * method.c (do_build_copy_constructor): Use
2413 finish_mem_initializers.
2414 * parse.y (member_init): Adjust calls to expand_member_init.
2415 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
2416 (tsubst_initializer_list): Use expand_member_init.
2417 * semantics.c (finish_mem_intiailizers): Simplify.
2419 2002-10-02 Matt Austern <austern@apple.com>
2420 * decl.c (walk_vtables_r): Fixed typo that caused result to
2421 never get a nonzero value.
2423 2002-10-02 Roger Sayle <roger@eyesopen.com>
2425 PR optimization/6627
2426 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
2427 from here, and move it to tree.h.
2428 * decl.c (cxx_init_decl_processing): If storing the vbit
2429 in function pointers, ensure that force_align_functions_log
2432 2002-10-02 Matt Austern <austern@apple.com>
2434 * class.c (check_field_decls): Changed warning about const member
2435 variables so that it doesn't get issued for a class aggregate.
2437 2002-10-01 Mark Mitchell <mark@codesourcery.com>
2439 * decl.c (cp_finish_decl): Make sure array types are laid out,
2440 even if the array bounds are unknown.
2442 2002-10-01 Steve Ellcey <sje@cup.hp.com>
2444 * class.c (build_vtbl_initializer): Change build_c_cast
2447 2002-10-01 Mark Mitchell <mark@codesourcery.com>
2449 * decl.c (cp_finish_decl): Make sure array types are laid out,
2450 even if the array bounds are unknown.
2452 * decl.c (cp_finish_decl): Correct check for dynamic
2453 initialization of thread-local storage.
2455 2002-09-30 Nathan Sidwell <nathan@codesourcery.com>
2457 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
2460 2002-09-30 Steve Ellcey <sje@cup.hp.com>
2462 * class.c (build_vtbl_initializer): Add cast.
2463 (add_vcall_offset_vtbl_entries_1):
2464 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
2466 2002-09-30 Mark Mitchell <mark@codesourcery.com>
2468 * class.c (walk_subobject_offsets): Correct the calculation of
2469 offsets for virtual bases. Correct the counting of array
2471 (layout_nonempty_base_or_field): Simplify. Correct the
2472 calculation of offsets to be propagated through the binfo
2474 (build_base_field): Avoid creating a FIELD_DECL for empty bases.
2475 Add the FIELD_DECL to TYPE_FIELDS.
2476 (build_base_fields): Adjust accordingly.
2477 (layout_virtual_bases): Use build_base_field.
2478 (end_of_class): Return a tree, not an integer.
2479 (warn_about_ambiguous_direct_bases): Rename to ...
2480 (warn_about_ambiguous_bases): ... this.
2481 (include_empty_classes): New function.
2482 (layout_class_type): Create an alternative version of the type to
2483 be used when as a base class type. Do not call
2484 finish_record_layout until we are done laying out the class.
2485 * cp-tree.h (lang_type_class): Remove size, size_unit. Add
2487 (CLASSTYPE_SIZE): Reimplement.
2488 (CLASSTYPE_SIZE_UNIT): Likewise.
2489 (CLASSTYPE_ALIGN): Likweise.
2490 (CLASSTYPE_USER_ALIGN): Likewise.
2491 (CLASSTYPE_AS_BASE): New macro.
2492 (DECL_INITIALIZED_P): Likewise.
2493 (extract_init): Remove prototype.
2494 (build_forced_zero_init): Rename to ...
2495 (build_zero_init): ... this.
2496 (force_store_init_value): Remove.
2497 * decl.c (obscure_complex_init): Remove.
2498 (duplicate_decls): Copy DECL_INITIALIZED_P.
2499 (check_initializer): Do not leave junk in DECL_INITIAL.
2500 (cp_finish_decl): Handle zero-initialization of entities with
2501 static storage duration.
2502 * expr.c (extract_init): Remove.
2503 * init.c (build_forced_zero_init): Remove.
2504 (build_zero_init): New function.
2505 (build_default_init): Use it.
2506 (build_field_list): Skip FIELD_DECLs for base subobjects.
2507 (push_base_cleanups): Likewise.
2508 * method.c (do_build_assign_ref): Likewise.
2509 (synthesize_exception_spec): Likewise.
2510 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
2511 (regenerate_decl_from_template): To not set DECL_INITIAL for a
2512 static data member whose initialization took place in its class.
2513 (instantiate_decl): Do not pass an initializer to cp_finish_decl
2515 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
2516 (dfs_unuse_fields): Likewise.
2517 * tree.c (pod_type_p): Handle error_mark_node.
2518 (zero_init_p): Likewise.
2519 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
2521 * typeck2.c (store_init_value): Remove #if 0'd code.
2522 (force_store_init_value): Remove.
2523 (process_init_constructor): Use build_zero_init.
2525 2002-09-29 Nathan Sidwell <nathan@codesourcery.com>
2528 * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
2530 2002-09-29 Kazu Hirata <kazu@cs.umass.edu>
2532 * cp-tree.h: Fix comment typos.
2536 2002-09-25 Mark Mitchell <mark@codesourcery.com>
2538 * cp/class.c (contains_empty_class_p): New method.
2539 (walk_subobject_offsets): Correct computation of field offset.
2540 (layout_empty_base): Correct placement of emtpy base classes.
2541 (layout_class_type): Warn about ABI changes.
2543 2002-09-23 Mark Mitchell <mark@codesourcery.com>
2545 * cp/class.c (layout_virtual_bases): Do not round the size of the
2546 type to a multiple of the alignment before laying out virtual bases.
2547 (layout_class_type): Correct handling of bit-fields that are wider
2548 than their type inside unions. Round the size of the type to a
2549 even number of bytes when computing the size without virtual
2551 * cp/cp-tree.h (abi_version_at_least): New macro.
2553 2002-09-21 Kazu Hirata <kazu@cs.umass.edu>
2555 * ChangeLog: Follow spelling conventions.
2556 * ChangeLog.2: Likewise.
2558 * class.c: Likewise.
2559 * cp-tree.h: Likewise.
2562 * decl2.c: Likewise.
2563 * except.c: Likewise.
2564 * friend.c: Likewise.
2565 * g++spec.c: Likewise.
2568 * mangle.c: Likewise.
2569 * method.c: Likewise.
2570 * operators.def: Likewise.
2571 * optimize.c: Likewise.
2574 * search.c: Likewise.
2575 * semantics.c: Likewise.
2578 * typeck.c: Likewise.
2580 2002-09-18 Devang Patel <dpatel@apple.com>
2582 * cp/cp-tree.h: New prototype for walk_vtabls().
2583 * cp/decl.c (walk_vtables_r): New function.
2584 (struct cp_binding_level): Add new members, namespaces,
2585 names_size and vtables.
2586 (add_decl_to_level): Add decl in namespaces or vtables
2587 chain, if conditions match.
2588 (walk_vtables): New function.
2589 (walk_namespaces_r): Travers separate namespace chain
2590 for namespace decls.
2591 (wrapup_globals_for_namespace): Use names_size instead
2593 * cp/decl2.c (finish_file): Use walk_vtables() instead of
2594 walk_globals() to walk vtable decls.
2596 2002-09-18 Nathan Sidwell <nathan@codesourcery.com>
2598 * decl.c (grokdeclarator): Use assert, not internal_error. Don't
2599 ICE with invalid pointers & references.
2601 2002-09-17 Zack Weinberg <zack@codesourcery.com>
2603 * Make-lang.in: Remove all references to the demangler.
2604 * cxxfilt.c: Moved to binutils.
2606 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
2609 * pt.c (tsubst_decl): Remove assert.
2611 Remove DR 295 implementation.
2612 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
2613 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
2614 about ignoring volatile qualifiers.
2616 * search.c (lookup_member): Correct documentation.
2618 2002-09-16 Geoffrey Keating <geoffk@apple.com>
2620 * cp-tree.h (union lang_tree_node): Add chain_next option.
2622 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
2624 * parse.y (parse_finish_call_expr): Check lookup_member result.
2627 * semantic.c (finish_asm_stmt): Fix operand/output_operands
2629 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
2631 2002-09-15 Nathan Sidwell <nathan@codesourcery.com>
2634 * call.c (build_over_call): Convert this pointer for fns found by
2637 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
2639 * ChangeLog: Follow spelling conventions.
2640 * ChangeLog.1: Likewise.
2642 2002-09-14 Nathan Sidwell <nathan@codesourcery.com>
2645 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
2647 2002-09-14 Kazu Hirata <kazu@cs.umass.edu>
2649 * error.c: Fix comment formatting.
2650 * except.c: Likewise.
2652 * friend.c: Likewise.
2653 * g++spec.c: Likewise.
2656 * mangle.c: Likewise.
2657 * method.c: Likewise.
2658 * optimize.c: Likewise.
2661 * search.c: Likewise.
2662 * semantics.c: Likewise.
2665 * typeck.c: Likewise.
2666 * typeck2.c: Likewise.
2668 2002-09-13 Matt Austern <austern@apple.com>
2671 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
2672 * cp/call.c: Change call-by-const-reference mechanism to use
2673 non_cast_lvalue_p when deciding whether the create a temporary.
2674 We need a temporary when passing, e.g. (long) x by const ref.
2676 2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
2678 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
2680 2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
2682 * decl.c: Fix comment formatting.
2683 * decl2.c: Likewise.
2685 2002-09-12 Kazu Hirata <kazu@cs.umass.edu>
2687 * call.c: Fix comment formatting.
2688 * class.c: Likewise.
2689 * cp-lang.c: Likewise.
2690 * cp-tree.h: Likewise.
2693 2002-09-11 Zack Weinberg <zack@codesourcery.com>
2695 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
2696 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
2697 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
2698 minor adjustments (use version_string, eliminate yet another
2699 duplicate of xmalloc)
2701 2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2703 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
2705 2002-09-05 Jason Merrill <jason@redhat.com>
2707 * typeck2.c (add_exception_specifier): Only pedwarn for an
2709 (require_complete_eh_spec_types): New fn.
2710 (cxx_incomplete_type_diagnostic): Also support pedwarning.
2711 * typeck.c (complete_type_or_diagnostic): Likewise.
2712 * call.c (build_call): Call require_complete_eh_spec_types.
2713 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
2714 on an incomplete type.
2716 2002-09-04 Jakub Jelinek <jakub@redhat.com>
2718 * decl.c (start_cleanup_fn): Clear interface_only before
2719 start_function, restore it afterwards.
2721 2002-09-02 Nathan Sidwell <nathan@codesourcery.com>
2723 * cp-tree.h (finish_builtin_type): Remove.
2724 * decl2.c (finish_builtin_type): Move to common code.
2725 * decl.c (build_ptrmemfunc_type): Adjust.
2726 * rtti.c (create_pseudo_type_info): Adjust.
2727 (create_tinfo_types): Adjust.
2729 2002-08-31 Jason Merrill <jason@redhat.com>
2731 * cp-lang.c (cp_expr_size): Allow initialization from a
2734 2002-08-30 Richard Henderson <rth@redhat.com>
2737 * tree.c: Include target.h.
2738 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
2740 * Makefile.in (tree.o): Update.
2742 2002-08-27 Mark Mitchell <mark@codesourcery.com>
2744 * class.c (layout_virtual_bases): Warn about bugs in G++ that
2745 result in incorrect object layouts.
2746 (layout_class_type): Likewise.
2748 2002-08-24 Matt Austern <austern@apple.com>
2750 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
2752 (real_lvalue_p): Update caller.
2754 (non_cast_lvalue_or_else): New.
2755 * tree.h: Declare it.
2756 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
2758 2002-08-22 Mark Mitchell <mark@codesourcery.com>
2760 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
2761 and COND_EXPR specially; fix error message output.
2763 2002-08-22 Jason Merrill <jason@redhat.com>
2765 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
2766 * semantics.c (nullify_returns_r): Likewise.
2768 2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
2771 * typeck.c (finish_class_member_access_expr): Diagnose cases where
2772 name lookup finds nothing.
2774 2002-08-15 Jason Merrill <jason@redhat.com>
2776 * semantics.c (finish_then_clause): Remove redundant assignment.
2777 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
2778 extra binding level outside the if/switch statement.
2779 (finish_while_cond, finish_for_cond): Rewrite complex condition
2782 2002-08-15 Alexandre Oliva <aoliva@redhat.com>
2784 * parse.y (sizeof, alignof, typeof): New non-terminals to
2785 increment skip_evaluation. Replace terminals with them and
2786 decrement skip_evaluation at the end of rules using them.
2787 * decl2.c (mark_used): Don't assemble_external if
2788 skipping evaluation.
2790 2002-08-15 Gabriel Dos Reis <gdr@nerim.net>
2793 * parse.y (parse_finish_call_expr): Handle incomplete
2794 type used to name a scope.
2796 2002-08-15 Nathan Sidwell <nathan@codesourcery.com>
2799 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
2800 regression caused by my 2002-08-08 patch.
2802 2002-08-13 Mark Mitchell <mark@codesourcery.com>
2804 * decl.c (pushdecl_class_level): Honor requests to bind names to
2807 2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2809 * decl2.c (build_call_from_tree): Fix uninitialized variable.
2810 * parse.y (parse_finish_call_expr): Likewise.
2811 * repo.c (old_args, old_dir, old_main): Const-ify.
2813 2002-08-11 Gabriel Dos Reis <gdr@nerim.net>
2815 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE +
2816 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
2817 * optimize.c (maybe_clone_body): Likewise.
2818 * pt.c (tsubst_enum): Likewise.
2819 (lookup_template_class): Likewise.
2820 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
2822 2002-08-10 Neil Booth <neil@daikokuya.co.uk>
2824 * lang-specs.h: Remove -ansi.
2826 2002-08-10 Nathan Sidwell <nathan@codesourcery.com>
2828 * tree.c (maybe_dummy_object): Replace // with /* */
2830 2002-08-09 Mark Mitchell <mark@codesourcery.com>
2832 * call.c (standard_conversion): Use build_ptrmem_type.
2833 * cp-tree.h (build_ptrmem_type): New function.
2834 (adjust_result_of_qualified_name_lookup): Likewise.
2835 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
2836 static data members.
2837 (build_ptrmem_type): New function.
2838 (grokdeclarator): Do not use build_offset_type when encountering a
2840 * parse.y (parse_finish_call_expr): Use
2841 adjust_result_of_qualified_name_lookup.
2842 * search.c (adjust_result_of_qualified_name_lookup): New function.
2843 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
2844 accessing OFFSET_TYPEs directly.
2846 2002-08-08 Mike Stump <mrs@apple.com>
2848 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
2849 (type_decays_to): Likewise.
2850 * class.c (find_final_overrider): Likewise.
2851 (maybe_note_name_used_in_class): Likewise.
2852 * decl.c (current_tmpl_spec_kind): Likewise.
2853 (add_binding): Likewise.
2854 (push_class_binding): Likewise.
2855 (duplicate_decls): Likewise.
2856 (layout_var_decl): Likewise.
2857 (grokfndecl): Likewise.
2858 (grokdeclarator): Likewise.
2859 (check_default_argument): Likewise.
2860 * decl2.c (handle_class_head): Likewise.
2861 * error.c (dump_template_decl): Likewise.
2862 * init.c (build_offset_ref): Likewise.
2863 * pt.c (check_specialization_scope): Likewise.
2864 (determine_specialization): Likewise.
2865 (check_explicit_specialization): Likewise.
2866 (maybe_check_template_type): Likewise.
2867 (process_partial_specialization): Likewise.
2868 (check_default_tmpl_args): Likewise.
2869 (push_template_decl_real): Likewise.
2870 (convert_template_argument): Likewise.
2871 (try_class_unification): Likewise.
2872 (get_bindings_real): Likewise.
2873 (do_decl_instantiation): Likewise.
2874 * semantics.c (begin_function_definition): Likewise.
2875 (finish_member_declaration): Likewise.
2876 (check_multiple_declarators): Likewise.
2877 * typeck.c (comp_array_types): Likewise.
2878 (comptypes): Likewise.
2879 (expr_sizeof): Likewise.
2880 (build_binary_op): Likewise.
2881 (dubious_conversion_warnings): Likewise.
2882 (check_return_expr): Likewise.
2884 2002-08-08 Mark Mitchell <mark@codesourcery.com>
2886 * typeck.c (build_class_member_access_expr): Do not return
2887 error_mark_node when no error has occurred.
2889 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
2891 * typeck.c (build_component_addr): Remove.
2892 (build_unary_op): Just check it's not a bitfield, and then build
2895 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
2897 * class.c (convert_to_base): Correct check for error_mark_node.
2898 (create_vtable_ptr): Remove unused VFUNS_P parm.
2900 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
2902 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
2904 2002-08-07 Mark Mitchell <mark@codesourcery.com>
2906 Rework build_component_ref.
2907 * call.c (build_vfield_ref): Do not go through build_component_ref.
2908 (build_field_call): Use build_class_member_access_expr.
2909 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
2910 (build_object_call): Likewise.
2911 * class.c (convert_to_base): New function.
2912 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
2913 (instantiate_type): Handle BASELINKs.
2914 * cp-tree.def (BASELINK): New tree code.
2915 * cp-tree.h (BASELINK_P): Reimplement.
2916 (SET_BASELINK_P): Remove.
2917 (BASELINK_BINFO): Reimplement.
2918 (BASELINK_FUNCTIONS): Likewise.
2919 (BASELINK_ACCESS_BINFO): Likewise.
2920 (BASELINK_OPTYPE): Likewise.
2921 (convert_to_base): New function.
2923 (build_object_ref): Remove.
2924 (build_component_ref_1): Likewise.
2925 (build_component_ref): Likewise.
2926 (build_x_component_ref): Likewise.
2927 (build_class_member_access_expr): New function.
2928 (finish_class_member_access_expr): Likewise.
2929 (build_ptrmemfunc_access_expr): Likewise.
2930 * decl.c (grokdeclarator): Handle BASELINKs.
2931 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
2932 finish_class_member_access_expr.
2933 (arg_assoc): Handle BASELINKs.
2934 (do_class_using_decl): Likewise.
2935 * error.c (dump_decl): Likewise.
2936 (dump_expr): Use build_ptrmemfunc_access_expr.
2937 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
2939 (build_throw): Use BASELINK_FUNCTIONS.
2940 * init.c (perform_member_init): Use
2941 build_class_member_access_expr.
2942 (build_offset_ref): Handle BASELINKs. Use
2943 build_class_member_access_expr.
2944 * method.c (hack_identifier): Likewise.
2945 * parse.y (do_id): Use BASELINK, not TREE_LIST.
2946 (primary): Remove uses of build_object_ref.
2947 * pt.c (lookup_template_function): Handle BASELINKs.
2948 (resolve_overloaded_unification): Likewise.
2949 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
2950 (lookup_field): Use BASELINK, not TREE_LIST.
2951 (lookup_fnfiels): Likewise.
2952 (setup_class_bindings): Likewise.
2953 * semantics.c (finish_object_call_expr): Do not use
2954 build_method_call when we already know what function is being
2956 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
2957 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
2959 (name_p): New function.
2960 * typeck.c (build_object_ref): Remove.
2961 (build_component_ref_1): Likewise.
2962 (build_x_component_ref): Likewise.
2963 (build_class_member_access_expr): New function.
2964 (finish_class_member_access_expr): Likewise.
2965 (build_ptrmemfunc_access_expr): Likewise.
2966 (get_member_function_from_ptrfunc): Use
2967 build_ptrmemfunc_access_expr.
2968 (build_binary_op): Likewise.
2969 (build_unary_op): Likewise.
2970 (build_ptrmemfunc): Likewise.
2971 (pfn_from_ptrmemfunc): Likewise.
2972 * typeck2.c (build_m_component_ref): Adjust comment.
2974 2002-08-07 Neil Booth <neil@daikokuya.co.uk>
2976 * Make-lang.in (CXX_C_OBJS): Update.
2977 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
2978 * cp-tree.h (cxx_decode_option): Remove.
2979 * decl2.c (compare_options, lang_f_options, unsupported_options,
2980 cxx_decode_option): Remove.
2982 2002-08-06 Gabriel Dos Reis <gdr@nerim.net>
2984 * typeck.c (build_x_unary_op): Handle pointer-to-member.
2986 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
2988 * class.c: Don't include obstack.h.
2990 * decl2.c: Delete bogus comment.
2991 * error.c: Don't include obstack.h.
2992 * except.c: Likewise.
2993 (dump_type): Correct comment.
2994 * method.c: Don't include obstack.h.
2997 2002-08-04 Gabriel Dos Reis <gdr@nerim.net>
3000 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
3001 expressions to pointer-to-data-member of pointer-to-member-functions.
3003 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
3005 * cvt.c (ocp_convert): Delete obsolete code.
3006 * parse.y (permanent_obstack): Delete declaration.
3007 * pt.c (permanent_obstack): Delete declaration.
3008 * repo.c (permanent_obstack): Delete declaration.
3009 (open_repo_file): Use xmalloc instead of permanent_obstack.
3010 (init_repo): Use xstrdup instead of permanent_obstack.
3012 2002-08-04 Nathan Sidwell <nathan@codesourcery.com>
3014 * cp-tree.h (VF_DERIVED_VALUE): Remove.
3015 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
3017 2002-08-03 Nathan Sidwell <nathan@codesourcery.com>
3020 C++ ABI change - vfunc ordering.
3021 * class.c (add_virtual_function): Remove.
3022 (dfs_modify_all_vtables): Take list of all declared
3023 virtuals. Assign all that are not in primary base.
3024 (check_for_override): Adjust comments.
3025 (create_vtable_ptr): Take single list of virtuals. Build chain
3026 of declared virtuals here.
3027 (layout_class_type): Take single list of virtuals. Adjust.
3028 (finish_struct_1): Keep virtuals on single list. Adjust.
3030 2002-08-02 Mark Mitchell <mark@codesourcery.com>
3032 * init.c (build_member_call): Use build_new_method_call, not
3035 2002-08-02 Krister Walfridsson <cato@df.lth.se>
3037 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
3039 2002-08-02 Mark Mitchell <mark@codesourcery.com>
3041 * call.c (build_method_call): Issue a more helpful error message
3042 about ambiguous method names.
3044 2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
3046 * tree.c (build_shared_int_cst): Make cache file scope, and
3049 2002-08-02 Jason Merrill <jason@redhat.com>
3051 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
3052 (cp_expr_size): New fn.
3053 * call.c (build_over_call): Lose empty class hackery.
3054 (convert_arg_to_ellipsis): Promote non-POD warning to error.
3055 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
3057 * semantics.c (expand_body): Do tree optimization in the function
3060 2002-08-01 Neil Booth <neil@daikokuya.co.uk>
3062 * cp-tree.h: Move all warning and flag declarations to c-common.h.
3063 * decl.c: Move all warning and flag variables to c-common.c.
3064 * decl2.c: Move all warning and flag variables to c-common.c.
3065 * lex.c (flag_digraphs): Remove.
3066 (warn_traditional): Now in c-common.c.
3068 2002-07-31 Mark Mitchell <mark@codesourcery.com>
3070 * call.c (build_field_call): Do not look up the field by name.
3071 (build_method_call): Simplify.
3072 (struct z_candidate): Add access_path and conversion_path. Remove
3074 (convert_class_to_reference): Adjust use of
3075 add_function_candidate.
3076 (add_candidate): Add conversion_path argument.
3077 (add_function_candidate): Use it.
3078 (add_conv_dndidate): Likewise.
3079 (build_builtin_candidate): Likewise.
3080 (add_template_candidate_real): Add conversion_path argument.
3081 (add_template_conv_candidate): Likewise.
3082 (add_template_candidate): Likewise.
3083 (build_user_type_conversion_1): Use it.
3084 (build_new_function_call): Remove name lookup code. Adjust use of
3085 add_template_candidate and add_function_candidate.
3086 (build_new_op): Likewise.
3087 (convert_like_real): Use build_special_member_call.
3088 (build_over_call): Use cand->conversion_path.
3089 (build_special_member_call): New method.
3090 (build_new_method_call): Remove name lookup code.
3091 * cp-tree.def (OFFSET_REF): Update documentation.
3092 (TEMPLATE_ID_EXPR): Likewise.
3093 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
3094 (BASELINK_OPTYPE): Likewise.
3095 (build_new_method_call): Adjust prototype.
3096 (build_special_member_call): New method.
3097 (build_baselink): New method.
3098 (build_offset_ref_call_from_tree): Likewise.
3099 (build_call_from_tree): Likewise.
3100 (finish_qualified_call_expr): Remove.
3101 (finish_call_expr): Adjust prototype.
3102 (build_x_function_call): Remove.
3103 * cvt.c (ocp_convert): Use build_special_member_call.
3104 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
3105 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
3107 (build_offset_ref_call_from_tree): New function.
3108 (build_call_from_tree): Likewise.
3109 * init.c (expand_cleanup): Use build_special_member_call.
3110 (expand_default_init): Likewise.
3111 (build_member_call): Use finish_call_expr.
3112 (build_new_1): Use build_special_member_call.
3113 (push_base_cleanups): Likewise.
3114 * method.c (do_build_assign_ref): Likewise.
3115 * parse.y (template_id): Do not pass a COMPONENT_REF to
3116 lookup_template_function.
3117 (primary): Use parse_finish_call_epxr, not finish_call_expr.
3118 (parse_finish_call_expr): New function.
3119 * pt.c (lookup_template_function): Add assertions.
3120 * search.c (lookup_base): Allow T to be a binfo.
3121 (build_baselink): New function.
3122 (lookup_member): Use it.
3123 * semantics.c (finish_call_expr): Do not do name lookup.
3124 (finish_object_call_expr): Remove #if 0'd code.
3125 (finish_qualified_call_expr): Remove.
3126 * typeck.c (build_x_function_call): Remove.
3127 (build_static_case): Use build_special_member_call.
3128 * typeck2.c (build_functional_cast): Likewise.
3130 2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
3132 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
3134 2002-07-30 Gabriel Dos Reis <gdr@nerim.net>
3136 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
3138 2002-07-30 Nathan Sidwell <nathan@codesourcery.com>
3140 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
3143 2002-07-29 Alan Modra <amodra@bigpond.net.au>
3145 * cp-tree.h: Comment typo fix.
3147 2002-07-29 Richard Earnshaw <rearnsha@arm.com>
3149 * spew.c (space_for_token): Allocate zeroed memory for a new token
3152 2002-07-27 Roger Sayle <roger@eyesopen.com>
3154 * decl.c (builtin_function_1): No need to explicitly mark
3155 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
3157 2002-07-27 Roger Sayle <roger@eyesopen.com>
3159 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
3161 2002-07-26 Jason Merrill <jason@redhat.com>
3163 * call.c (build_over_call): Likewise.
3164 (cp_convert_parm_for_inlining): New fn.
3165 (convert_for_arg_passing): New fn.
3166 (convert_default_arg, build_over_call): Use it.
3167 (type_passed_as): New fn.
3168 * pt.c (tsubst_decl): Use it.
3169 * decl2.c (cp_build_parm_decl): New fn.
3170 (build_artificial_parm): Use it.
3171 (start_static_storage_duration_function): Likewise.
3172 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
3173 (grokparms): Don't mess with DECL_ARG_TYPE.
3174 * typeck.c (convert_arguments): Use convert_for_arg_passing.
3175 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
3177 * cp-tree.h: Declare new fns.
3179 2002-07-26 Neil Booth <neil@daikokuya.co.uk>
3181 * cp-tree.h (flag_operator_names): Remove.
3182 * decl2.c (flag_operator_names): Remove.
3183 (lang_f_options): Remove operator-names.
3184 * lex.c (D_OPNAME): Remove.
3185 (reswords): Remove operator names.
3186 (rid_to_yy): Remove operator names.
3187 (init_reswords): No need to handle D_OPNAME.
3188 * spew.c (read_process_identifier): There are no operator
3191 2002-07-26 Jason Merrill <jason@redhat.com>
3193 * dump.c (cp_dump_tree): Call c_dump_tree.
3194 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
3196 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
3198 * error.c (print_whitespace): Remove.
3199 * g++spec.c (LIBUNWIND): Move.
3200 * mangle.c (mangled_position, write_signed_number): Remove.
3202 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
3204 * decl2.c (cxx_decode_option): Similarly.
3206 2002-07-25 Gabriel Dos Reis <gdr@nerim.net>
3208 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
3209 (cxx_sizeof_or_alignof_type): Take a third argument.
3210 (cxx_sizeof): Adjust definition.
3211 (cxx_alignof): Likewise.
3212 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
3213 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
3215 (c_sizeof_nowarn): Remove definition.
3216 (build_unary_op): Use cxx_sizeof_nowarn.
3218 2002-07-24 Geoffrey Keating <geoffk@redhat.com>
3220 * tree.c (cp_build_qualified_type_real): When copying
3221 pointer-to-method types, unshare the record that holds
3222 the cached pointer-to-member-function type.
3224 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
3226 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
3228 2002-07-23 Gabriel Dos Reis <gdr@nerim.net>
3231 * typeck.c (cxx_sizeof_or_alignof_type): New function.
3232 (c_sizeof): Remove definition.
3233 (expr_sizeof): Use cxx_sizeof.
3234 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
3235 * decl.c (finish_destructor_body): Use cxx_sizeof.
3236 * semantics.c (finish_alignof): Likewise.
3237 (finish_alignof): Use cxx_alignof.
3238 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
3239 (cxx_sizeof_or_alignof_type): Declare.
3240 (my_friendly_assert): Move to ../c-common.h.
3242 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
3244 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
3246 2002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3248 PR c++/7347, c++/7348
3249 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
3250 * decl.c (make_typename_type): Use it.
3251 (make_unbound_class_template): Likewise.
3252 (lookup_name_real): Don't call type_access_control if scope is
3253 template parameter dependent.
3254 * parse.y (template_arg): Call make_unbound_class_template with
3256 (nest_name_specifier): Call make_typename_type with tf_parsing set.
3257 (typename_sub0): Likewise.
3258 (typename_sub1): Likewise.
3259 (instantiate_decl): Push class scope.
3260 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
3261 for both static variable and member function template.
3262 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
3264 * search.c (type_access_control): Do type access for TEMPLATE_DECL
3267 2002-07-20 Roger Sayle <roger@eyesopen.com>
3269 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
3270 test by using positive_option. Make whitespace consistent.
3272 2002-07-20 Gabriel Dos Reis <gdr@nerim.net>
3274 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
3275 members with 'locus'. Adjust use throughout.
3276 (struct feed): Likewise.
3277 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
3279 (snarf_defarg): Use error(), not error_with_file_and_line().
3281 2002-07-19 Chris Demetriou <cgd@broadcom.com>
3283 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
3284 cpp_options is included.
3286 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3288 PR c++/2862, c++/2863
3289 * pt.c (determine_specialization): Compare the length of
3290 TYPE_ARG_TYPES. Tidy.
3292 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3295 * decl.c (duplicate_decls): Don't propagate inlining parameters from
3296 olddecl to newdecl when newdecl is a specialization of the
3297 instantiation olddecl.
3299 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3301 PR c++/4802, c++/5387
3302 * decl.c (make_typename_type): Use enforce_access.
3304 2002-07-17 Scott Snyder <snyder@fnal.gov>
3307 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
3309 2002-07-12 Mark Mitchell <mark@codesourcery.com>
3311 * class.c (add_method): Correct handling of conversion operators.
3313 2002-07-11 Mark Mitchell <mark@codesourcery.com>
3316 * class.c (add_method): Simplify.
3318 2002-07-11 Jason Merrill <jason@redhat.com>
3321 * tree.c (cp_copy_res_decl_for_inlining): Also copy
3324 2002-07-10 Graham Stott <graham.stott@btinternet.com>
3326 * pt.c (template_parm_this_level_p, push_template_decl_real):
3327 Pass depth as int pointer.
3329 2002-07-11 Tim Josling <tej@melbpc.org.au>
3331 Remove front end hard coding from gengtype.c.
3333 * config-lang.in (gtfiles): Add files needed for this front end.
3335 2002-07-10 Mark Mitchell <mark@codesourcery.com>
3337 * cp-tree.h (unqualified_name_lookup_error): Declare it.
3338 (begin_function_definition): Adjust prototype.
3339 * lex.c (unqualified_name_lookup_error): New function, split out
3341 (do_identifier): ... here.
3342 * parse.y (parse_begin_function_definition): New function.
3344 * semantics.c (begin_function_definition): Accept decl-specifiers
3345 and attributes as separate parameters.
3347 2002-07-10 Jason Merrill <jason@redhat.com>
3350 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
3351 modifying the old one.
3353 2002-07-09 Mark Mitchell <mark@codesourcery.com>
3355 * cp-tree.h (constructor_name_p): Declare it.
3356 (check_template_template_default_arg): Likewise.
3357 * class.c (handle_using_decl): Use constructor_name_p.
3358 * decl.c (grokdeclarator): Likewise.
3359 * decl2.c (constructor_name_p): Define it.
3360 * init.c (build_member_call): Use constructor_name_p.
3361 * parse.y (template_parm): Use check_template_template_default_arg.
3362 * pt.c (check_explicit_specialization): Use constructor_name_p.
3363 * semantics.c (check_template_template_default_arg): New function.
3365 2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3367 * pt.c (can_complete_type_without_circularity): Add static to
3368 function definition.
3370 2002-07-08 Mark Mitchell <mark@codesourcery.com>
3372 * cp-tree.h (have_extern_spec): Declare it
3373 * decl.c (have_extern_spec): Define it.
3374 (start_decl): Eliminate use of used_extern_spec.
3375 (start_function): Likewise.
3376 * parse.y (have_extern_spec): Remove declaration.
3377 (used_extern_spec): Likewise.
3378 (frob_specs): Eliminate use of used_extern_spec.
3379 (.hush_warning): Likewise.
3381 2002-07-07 Mark Mitchell <mark@codesourcery.com>
3383 * Make-lang.in (cp/parse.o): Depend on decl.h.
3384 * cp-tree.h (do_decl_instantiation): Change prototype.
3385 * parse.y: Include decl.h.
3386 (parse_decl_instantiation): New function.
3387 (explicit_instantiation): Use it.
3388 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
3391 2002-07-07 Roger Sayle <roger@eyesopen.com>
3393 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
3394 constructor and destructor tests when passed a TEMPLATE_DECL.
3396 2002-07-05 Jason Merrill <jason@redhat.com>
3398 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
3401 PR optimization/7145
3402 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
3404 2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
3406 Repair damage on weak-impared targets caused by my previous patch.
3407 * cp-tree.h (import_export_tinfo): Add parameter.
3408 * decl2.c (import_export_tinfo): Add parameter, post adjust
3410 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
3411 import_export_tinfo.
3413 2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3416 * init.c (build_aggr_init): Remove qualifiers of init before calling
3418 (build_vec_init): Flatten multi-dimensional array during cleanup.
3419 (build_vec_delete_1): Abort if the type of each element is array.
3421 2002-07-03 Graham Stott <graham.stott@btinternet.com>
3423 * pt.c (instantiate_class_template): Fix typo.
3425 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3427 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
3428 by CVS conflict in my last patch.
3430 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3433 * pt.c (can_complete_type_without_circularity): New function.
3434 (instantiate_class_template): Use it.
3435 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
3436 message due to incomplete fields.
3438 2002-07-01 Mark Mitchell <mark@codesourcery.com>
3441 * mangle.c (write_expression): Add mangling for sizeof when
3443 * operators.def: Remove stale comment.
3445 2002-06-30 Nathan Sidwell <nathan@codesourcery.com>
3447 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
3448 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
3449 (tinfo_decl_type): Replace with ...
3450 (type_info_ptr_type): ... this.
3451 (import_export_tinfo): Declare.
3452 (tinfo_decl_p): Rename to ...
3453 (unemitted_tinfo_decl_p): ... this.
3454 * decl2.c (import_export_decl): Break out tinfo handling into ...
3455 (import_export_tinfo): ... here. New function.
3456 (finish_file): Adjust.
3457 * rtti.c (TINFO_REAL_NAME): New macro.
3458 (init_rtti_processing): Create the tinfo types.
3459 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
3460 (get_tinfo_decl): Adjust.
3461 (get_tinfo_ptr): New function.
3462 (get_type_id): Use it.
3463 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
3464 (ptr_initializer): Use get_tinfo_ptr.
3465 (ptm_initializer): Likewise.
3466 (synthesize_tinfo_var): Break into ...
3467 (get_pseudo_ti_init): ... this. Just create the initializer.
3468 (get_pseudo_ti_desc): .. and this.
3469 (create_real_tinfo_var): Remove.
3470 (create_pseudo_type_info): Don't create the vtable decl here.
3471 (get_vmi_pseudo_type_info): Remove.
3472 (create_tinfo_types): Adjust.
3473 (tinfo_decl_p): Rename to ...
3474 (unemitted_tinfo_decl_p): ... here. Adjust.
3475 (emit_tinfo_decl): Adjust. Create the initializer.
3477 2002-06-27 Mark Mitchell <mark@codesourcery.com>
3480 * pt.c (tsubst_friend_class): Substitute into the context of the
3481 friend before using it.
3483 2002-06-26 Mark Mitchell <mark@codesourcery.com>
3485 * cp-tree.h (xref_tag): Change prototype.
3486 (handle_class_head): Likewise.
3487 (build_x_component_ref): Likewise.
3488 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
3489 (xref_tag): Take attributes as a separate parameter.
3490 (xref_tag_from_type): Adjust call to xref_tag.
3491 * decl2.c (build_expr_from_tree): Adjust call to
3492 build_x_component_ref.
3493 (handle_class_head): Take attributes as a separate parameter.
3494 * parse.y (parse_xref_tag): New function.
3495 (parse_handle_class_head): Likewise.
3496 (primary): Use parse_xref_tag.
3497 (class_head_decl): Use parse_handle_class_head.
3498 (class_head_defn): Likewise.
3499 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
3500 (build_dynamic_cast_1): Likewise.
3501 (create_pseudo_type_info): Likewise.
3502 (emit_support_tinfos): Likewise.
3503 * typeck.c (build_object_ref): Adjust call to
3504 build_x_component_ref.
3505 (build_x_component_ref): Remove protect parameter.
3507 2002-06-25 Mark Mitchell <mark@codesourcery.com>
3509 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
3510 * class.c (handle_using_decl): Likewise.
3511 (instantiate_type): Likewise.
3512 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
3513 (xref_basetypes): Change prototype.
3514 (begin_mem_initializers): New function.
3515 (get_overloaded_fn): Likewise.
3516 * decl.c (xref_basetypes): Simplify.
3517 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
3518 * init.c (build_offset_ref): Likewise.
3519 * parse.y (base_init): Use begin_mem_initializers().
3520 (structsp): Adjust call to xref_basetypes.
3521 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
3522 (instantiate_class_template): Adjust call to xref_basetypes.
3523 * semantics.c (begin_mem_initializers): New function.
3524 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
3525 (really_overlaoded_fn): Likewise.
3526 (get_overloaded_fn): New function.'
3527 (get_first_fn): USe BASELINK_FUNCTIONS.
3529 2002-06-24 Mark Mitchell <mark@codesourcery.com>
3531 * cp-tree.h (SCALAR_TYPE_P): New macro.
3532 (check_for_out_of_scope_variable): New function.
3533 (at_class_scope_p): Likewise.
3534 (finish_fname): Likewise.
3535 * class.c (finish_struct): Use at_function_scope_p.
3536 * decl.c (check_for_out_of_scope_variable): New function, split
3537 out from do_identifier.
3538 (finish_enum): Use at_function_scope_p.
3539 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
3540 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
3541 (primary): Use at_function_scope_p.
3542 * search.c (at_class_scope_p): New function.
3543 * semantics.c (finish_fname): Likewise.
3544 (check_multiple_declarators): Use at_function_scope_p.
3546 2002-06-23 Mark Mitchell <mark@codesourcery.com>
3548 * parse.y (parse_scoped_id): New function.
3550 * cp-tree.h (do_scoped_id): Adjust declaration.
3551 * lex.c (do_scoped_id): Remove call to yylex.
3552 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
3553 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
3554 expanding it inline.
3556 2002-06-23 Matt Thomas <matt@3am-software.com>
3558 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
3561 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3563 * mangle.c (integer_type_codes): Const-ify.
3565 2002-06-20 Richard Henderson <rth@redhat.com>
3568 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
3569 Call put_var_into_stack.
3571 2002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3573 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
3574 array size calculation.
3576 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3579 * pt.c (tsubst_expr): Handle FILE_STMT.
3581 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3584 * pt.c (lookup_template_class): Don't build complete argument of
3585 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
3588 2002-06-19 Akim Demaille <akim@epita.fr>
3590 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
3592 * spew.c, lex.c: Adjust.
3593 * parse.y (explicit_instantiation): Add empty action to override
3594 the default $$ = $1 where it introduces a type clash.
3596 2002-06-14 Jason Merrill <jason@redhat.com>
3598 * semantics.c (begin_for_stmt): Push the 'for' scope before
3599 adding the FOR_STMT.
3602 * class.c (build_base_field): Set DECL_PACKED.
3603 (layout_class_type): Don't use tail padding of PODs.
3604 * mangle.c (write_unqualified_name): Fix template conversion op
3607 2002-06-16 Richard Henderson <rth@redhat.com>
3610 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
3611 after template instantiation.
3613 2002-06-16 Richard Henderson <rth@redhat.com>
3615 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
3617 2002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
3619 * cp-tree.h (compiler_error): Remove declaration.
3620 * lex.c (compiler_error): Remove definition.
3622 2002-06-14 Steve Ellcey <sje@cup.hp.com>
3624 * g++spec.c (LIBUNWIND): New.
3625 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
3627 2002-06-13 Jessica Han <jessica@cup.hp.com>
3629 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
3630 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
3631 (build_vbase_offset_vtbl_entries): Likewise.
3632 * rtti.c (build_headof): Likewise.
3633 (get_tinfo_decl_dynamic): Likewise.
3634 (create_pseudo_type_info): Likewise.
3636 2002-06-12 Stan Shebs <shebs@apple.com>
3638 * mpw-config.in: Remove file, no longer used.
3639 * mpw-make.sed: Ditto.
3641 2002-06-07 Zack Weinberg <zack@codesourcery.com>
3643 * decl2.c: Update call to cpp_handle_option.
3645 2002-06-07 H.J. Lu (hjl@gnu.org)
3647 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
3649 2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
3651 * error.c (cp_error_at): Fix typo.
3653 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
3655 * error.c (cp_diagnostic_starter): Adjust call.
3656 (maybe_print_instantiation_context): Change prototype to take a
3657 'diagnostic_info *'.
3658 (print_instantiation_full_context): Likewise.
3659 (print_instantiation_partial_context): Likewise.
3660 (cp_diagnostic_starter): Likewise.
3661 (cp_diagnostic_finalizer): Likewise.
3662 (cp_print_error_function): Likewise.
3663 (cp_printer): Take a secondary parameter as a 'text_info *'.
3664 Remove output_state savings. Adjust calls.
3666 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
3668 * pt.c (inline_parm_levels): Mark for GC.
3670 * mangle.c (start_mangling): Allocate G.substitutions here...
3671 (init_mangle): ... rather than here.
3672 (finish_mangling): Clear the varray pointer when done with it.
3673 * spew.c (yylexstring): Don't use VARRAY_FREE.
3674 * search.c (bfs_walk): Don't use VARRAY_FREE.
3675 * decl2.c (pending_statics): Use gengtype to mark.
3676 (deferred_fns): Likewise.
3677 (ssdf_decls): Likewise.
3678 (init_decl2): Delete.
3679 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
3680 (cxx_init_decl_processing): Don't call init_decl2.
3681 (cxx_pop_function_context): Don't use VARRAY_FREE.
3682 * cp-tree.h (struct saved_scope): No need for special marking
3684 (struct language_function): Likewise.
3685 (local_classes): Use gengtype to mark.
3686 (init_decl2): Delete prototype.
3687 * class.c (init_class_processing): Don't use
3688 ggc_add_tree_varray_root.
3689 (build_vtbl_initializer): Don't use VARRAY_FREE.
3691 * decl.c (typename_compare): Don't use same_type_p.
3693 * decl.c: Include hashtab.h instead of hash.h.
3694 (typename_hash): Update to use htab_h.
3695 (typename_compare): Likewise.
3696 (typename_htab): Use gengtype to mark.
3697 (build_typename_type): Update to use htab_h.
3698 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
3700 * Make-lang.in (gt-cp-tree.h): New rule.
3701 (cp/tree.o): Depend on gt-cp-tree.h.
3702 * config-lang.in (gtfiles): Add cp/tree.c.
3703 * tree.c: Include gt-cp-tree.h.
3704 (list_hash_table): Use gengtype to mark.
3705 (init_tree): Use gengtype to mark trees.
3707 * Make-lang.in (cp/decl.o): Add debug.h dependency.
3708 * call.c (struct z_candidate): Use gengtype.
3709 (USER_CONV_CAND): Use WRAPPER_ZC.
3710 (convert_class_to_reference): Use build_zc_wrapper.
3711 (build_type_conversion_1): Likewise.
3712 (build_over_call): Use WRAPPER_ZC.
3713 (add_warning): Use build_zc_wrapper.
3714 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
3715 * cp-tree.h (struct lang_identifier): Use gengtype.
3716 (struct template_parm_index_s): Likewise.
3717 (struct ptrmem_cst): Likewise.
3718 (struct tree_binding): Likewise.
3719 (struct tree_overload): Likewise.
3720 (struct tree_srcloc): Likewise.
3721 (struct tree_wrapper): Likewise. Also modify to have a pointer
3722 to struct z_candidate rather than void.
3723 (enum cp_tree_node_structure_enum): New.
3724 (union lang_tree_node): New.
3725 (cxx_mark_tree): Delete prototype.
3726 (cp_tree_node_structure): New prototype.
3727 (build_ptr_wrapper): Delete prototype.
3728 (build_int_wrapper): Delete prototype.
3729 (build_zc_wrapper): New prototype.
3730 * decl.c: Include debug.h
3731 (cxx_mark_tree): Delete.
3732 (cp_tree_node_structure): New.
3733 * tree.c (build_ptr_wrapper): Delete.
3734 (build_int_wrapper): Delete.
3735 (build_zc_wrapper): New.
3737 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
3738 Correct typo. Patch from k_fukui@highway.ne.jp.
3740 * semantics.c (current_stmt_tree): Update for change to
3741 struct language_function.
3742 (finish_mem_initializers): Likewise.
3743 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
3744 * cp-tree.h (struct language_function): Rename from
3745 cp_language_function. Change all uses.
3746 (cp_function_chain): Don't need to cast.
3748 * class.c (duplicate_tag_error): Reset discriminator.
3749 (check_bases_and_members): Update for data structure changes.
3750 * cp-tree.h (struct lang_id2): Use gengtype.
3751 (flagged_type_tree): Likewise.
3752 (SET_LANG_ID): Use GGC on struct lang_id2.
3753 (struct cp_language_function): Use gengtype. Remove field
3754 'x_vcalls_possible_p'.
3755 (current_vcalls_possible_p): Delete.
3756 (struct lang_type_header): New.
3757 (struct lang_type_class): Rename from struct lang_type. Include
3758 struct lang_type_header.
3759 (struct lang_type_ptrmem): New.
3760 (struct lang_type): New.
3761 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
3762 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
3763 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
3764 (struct lang_decl_flags): Use gengtype. Add discriminators.
3765 (struct lang_decl): Use gengtype. Add and use discriminators.
3766 Update the macros that reference moved fields.
3767 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
3768 (SET_DECL_THUNK_P): Set discriminator too.
3769 (clear_inline_text_obstack): Delete prototype.
3770 (finish_inline_definitions): Delete prototype.
3771 (mark_pending_inlines): Delete prototype.
3772 (lang_check_failed): New prototype.
3773 * decl.c (struct named_label_use_list): Use gengtype.
3774 (struct named_label_list): Likewise.
3775 (mark_binding_level): Delete.
3776 (mark_named_label_lists): Delete.
3777 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
3778 (cxx_init_decl_processing): Use generated marker routine.
3779 (begin_destructor_body): Delete dead set to
3780 current_vcalls_possible_p.
3781 (mark_lang_function): Delete.
3782 (mark_cp_function_context): Delete.
3783 (lang_mark_tree): Use generated marker routines.
3784 * decl2.c (start_objects): Set discriminator when setting
3785 GLOBAL_INIT_PRIORITY.
3786 * lex.c (retrofit_lang_decl): Set discriminators.
3787 (copy_lang_type): Update for changes to lang_type structure.
3788 (cp_make_lang_type): Set discriminator.
3789 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
3790 * search.c: Include ggc.h.
3791 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
3792 (finish_inline_definitions): Delete.
3793 * spew.c (struct token): Use gengtype.
3794 (struct token_chunk): New.
3795 (struct unparsed_text): Use gengtype. Store tokens in chunks.
3796 (struct feed): Use gengtype.
3797 (feed_obstack): Delete.
3798 (feed): Mark as GC root.
3799 (pending_inlines): Mark as GC root.
3800 (pending_inlines_tail): Likewise.
3801 (processing_these_inlines): Likewise.
3802 (token_obstack): Make static.
3803 (first_token): Likewise.
3804 (init_spew): Don't initialize deleted things; use gengtype for roots.
3805 (clear_inline_text_obstack): Delete.
3806 (feed_input): Use GC for struct feed. Update for changes to
3807 struct unparsed_text.
3808 (mark_pending_inlines): Delete.
3809 (next_token): Rename from add_token. Change all callers. Update
3810 for changes to struct unparsed_text.
3811 (space_for_token): New.
3812 (remove_last_token): New.
3813 (alloc_unparsed_text): New.
3814 (snarf_block): Take an unparsed_text. Update for changes to struct
3816 (snarf_method): Update for changes to struct unparsed_text.
3817 (snarf_defarg): Update for changes to struct unparsed_text.
3818 * tree.c (lang_check_failed): New.
3820 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
3821 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
3822 (cp/spew.o): Add dependency on gt-<filename>.h.
3823 (cp/decl2.o): Add dependency on gt-<filename>.h.
3824 (cp/call.o): Add dependency on gt-<filename>.h.
3825 (cp/pt.o): Add dependency on gt-<filename>.h.
3826 (cp/repo.o): Add dependency on gt-<filename>.h.
3827 (cp/parse.o): Add dependency on gt-<filename>.h.
3828 * call.c: Use gengtype for roots.
3829 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
3830 decl2.c parse.y pt.c repo.c spew.c.
3831 * cp-tree.h: Use gengtype for roots.
3832 (struct saved_scope): Use GGC, gengtype.
3833 (cp_parse_init): Delete prototype.
3834 (init_pt): Delete prototype.
3835 * decl.c: Use gengtype for roots.
3836 (mark_saved_scope): Delete.
3837 (cxx_init_decl_processing): Don't call deleted initilisation
3839 (signed_size_zero_node): Delete, unused.
3840 * decl.h: Use gengtype for roots.
3841 * decl2.c: Use gengtype for roots.
3842 * lex.h: Use gengtype for roots.
3843 * parse.y: Use gengtype for roots.
3844 (cp_parse_init): Delete.
3845 * pt.c: Use gengtype for roots.
3847 * repo.c: Use gengtype for roots.
3848 * spew.c: Use gengtype for roots.
3850 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
3851 (cp/decl.o): Add dependency on gtype-cp.h.
3852 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
3853 Include gtype-cp.h. Allow for filename changes.
3855 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
3856 (cp/decl.o): Add cp/gt-decl.h dependency.
3857 * config-lang.in (gtfiles): New.
3858 * tree.h: Rename struct binding_level to struct cp_binding_level.
3859 * decl.c: Rename struct binding_level to struct cp_binding_level.
3860 Include cp/gt-decl.h.
3861 (struct cp_binding_level): Use gengtype.
3862 (make_binding_level): Use GGC on struct cp_binding_level.
3863 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
3864 (cxx_init_decl_processing): Mark free_binding_level as
3867 * decl.c (mark_cp_function_context): Update calling sequence.
3869 * decl.c (start_function): Don't free 'struct
3870 cp_language_function'.
3871 (pop_cp_function_context): Likewise.
3872 (save_function_data): Allocate it using GC.
3873 * semantics.c (genrtl_start_function): Don't free 'struct
3874 cp_language_function'.
3876 2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
3878 * lang-specs.h: Use cpp_debug_options.
3880 2002-05-28 Zack Weinberg <zack@codesourcery.com>
3882 * mangle.c, tree.c: Include real.h.
3883 * Make-lang.in: Update dependency lists.
3885 2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
3887 * lex.c: Don't include c-lex.h.
3888 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
3890 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
3892 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
3894 2002-05-22 Richard Henderson <rth@redhat.com>
3896 * decl.c (obscure_complex_init): Check for VAR_DECL
3897 before using DECL_THREAD_LOCAL.
3899 2002-05-22 Richard Henderson <rth@redhat.com>
3901 * decl.c (check_tag_decl): Handle RID_THREAD.
3902 (obscure_complex_init): Reject run-time init of tls.
3903 (grokvardecl, grokdeclarator): Handle RID_THREAD.
3904 * lex.c (reswords): Add __thread.
3905 (rid_to_yy): Map RID_THREAD to SCSPEC.
3907 2002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
3909 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
3910 * cp-tree.h (cxx_post_options): Kill.
3911 * cp-lex.c (cxx_post_options): Kill.
3913 2002-05-21 Richard Henderson <rth@redhat.com>
3915 * lex.c (rid_to_yy): Add RID_THREAD.
3917 2002-05-21 Alexandre Oliva <aoliva@redhat.com>
3919 * init.c (build_vec_init): Test for trivial copy-assignment when
3920 copy-assigning arrays.
3922 2002-05-20 Andreas Jaeger <aj@suse.de>
3924 * init.c (build_default_init): Remove unused variable.
3926 2002-05-20 Alexandre Oliva <aoliva@redhat.com>
3928 * call.c (any_strictly_viable): New.
3929 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
3931 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3933 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
3935 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3938 * pt.c (do_decl_instantiation): Don't complain explicit
3939 instantiation after explicit specialization.
3940 (do_type_instantiation): Likewise.
3942 2002-05-19 Alexandre Oliva <aoliva@redhat.com>
3944 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
3946 (complete_type_or_else): ... this. Redefined as macro.
3947 (cxx_incomplete_type_diagnostic): Declare.
3948 (cxx_incomplete_type_error): Define as macro.
3949 * init.c (build_delete): Warn about incomplete types other than
3950 void, and use the built-in operator delete for them.
3951 * typeck.c (complete_type_or_diagnostic): Renamed from
3952 complete_type_or_else. Added warn_only argument, passed to...
3953 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
3954 warnings or errors depending on new warn_only argument. Renamed
3956 (cxx_incomplete_type_error): ... this. New implementation in
3957 terms of cxx_incomplete_type_diagnostic.
3959 2002-05-18 Jason Merrill <jason@redhat.com>
3962 * decl2.c (import_export_decl): If we clear
3963 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
3965 2002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3968 * pt.c (verify_class_unification): Don't check if PARM is template
3969 parameter dependent. Simplify.
3970 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
3971 parameter dependent expression.
3973 2002-05-14 Jason Merrill <jason@redhat.com>
3975 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
3977 (synthesize_tinfo_var): Take the public decl.
3978 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
3979 (emit_tinfo_decl): Adjust. Call import_export_decl.
3980 * decl2.c (import_export_decl): Simplify tinfo decl handling.
3982 2002-05-14 Alexandre Oliva <aoliva@redhat.com>
3984 * cp-tree.h (struct lang_type): Added non_zero_init.
3985 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
3986 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
3987 * class.c (check_field_decls): Test non_zero_init.
3988 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
3989 zero-to-NULL conversions.
3990 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
3991 type that needs zero-initialization without zeros.
3992 (check_initializer_decl): Compute zero-initializer for types
3993 that require a non-trivial one.
3994 * init.c (build_forced_zero_init): New function.
3995 (build_default_init): Use it.
3996 * tree.c (zero_init_p): New function.
3997 * typeck2.c (force_store_init_value): New function.
3998 (process_init_constructor): Create non-trivial zero-initializers
3999 for array members and class fields.
4001 2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
4003 * lang-specs.h: Remove redundant -lang-c++.
4005 2002-05-13 Jason Merrill <jason@redhat.com>
4007 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
4008 (fixed_type_or_null): See through reference vars.
4009 (build_base_path): Vtable contents are constant.
4010 * typeck.c (get_member_function_from_ptrfunc): Likewise.
4012 2002-05-12 Jason Merrill <jason@redhat.com>
4014 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
4017 2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
4019 * cp-tree.h (flag_ansi): Remove.
4020 * decl2.c (flag_ansi): Remove.
4021 (cxx_decode_option): Set flag_iso and flag_undef.
4023 2002-05-09 Jason Merrill <jason@redhat.com>
4025 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
4026 Use subtraction rather than a bitmask to get the index.
4027 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
4029 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
4031 2002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
4033 * Make-lang.in (decl2.o): Update.
4034 * cp-tree.h (warn_multichar): Remove.
4035 * decl2.c: Include c-common.h.
4036 (warn_multichar): Remove.
4038 2002-05-03 Jason Merrill <jason@redhat.com>
4040 * tree.c (build_cplus_array_type): Only const and volatile get
4043 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
4045 2002-04-30 Mark Mitchell <mark@codesourcery.com>
4047 ABI change, returning simple classes from functions.
4048 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
4049 TYPE_HAS_TRIVIAL_INIT_REF is false or
4050 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
4052 2002-04-30 Jason Merrill <jason@redhat.com>
4055 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
4056 anonymous class with a typedef if there are attributes.
4058 2002-04-29 Paul Eggert <eggert@twinsun.com>
4060 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
4062 2002-04-29 Jakub Jelinek <jakub@redhat.com>
4065 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
4068 2002-04-29 Mark Mitchell <mark@codesourcery.com>
4071 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
4072 enter that scope before name lookup.
4075 * method.c (do_build_copy_constructor): Avoid building
4076 cv-qualified reference types.
4078 2002-04-29 Nathan Sidwell <nathan@codesourcery.com>
4081 * decl.c (grok_op_properties): Assignment ops don't have to return
4082 by value. operator% should.
4084 2002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
4087 * decl.c (duplicate_decls): Call merge_weak.
4089 2002-04-26 Richard Henderson <rth@redhat.com>
4091 * parse.y (malloced_yyss, malloced_yyvs): New.
4092 (yyoverflow): Re-add. Set them.
4093 (free_parser_stacks): New.
4095 2002-04-26 Mark Mitchell <mark@codesourcery.com>
4098 * method.c (do_build_assign_ref): Pass a derivation to
4099 build_method_call when calling base class assignment operators.
4101 2002-04-26 Richard Henderson <rth@redhat.com>
4103 * parse.y (yyoverflow): Revert.
4105 2002-04-26 Richard Henderson <rth@redhat.com>
4108 * parse.y (string): Remove. Update all uses to use STRING
4109 instead, and not call combine_strings.
4110 * rtti.c (tinfo_name): Use fix_string_type.
4111 * semantics.c (finish_asm_stmt): Don't call combine_strings.
4112 * spew.c (yylexstring): New.
4113 (read_token): Use it.
4115 2002-04-25 Richard Henderson <rth@redhat.com>
4118 * parse.y (yyoverflow): New.
4120 2002-04-25 Jason Merrill <jason@redhat.com>
4123 * search.c (check_final_overrider): No longer static.
4124 * class.c (update_vtable_entry_for_fn): Call it.
4125 * cp-tree.h: Adjust.
4127 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
4129 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
4130 * cp-tree.h (cxx_set_yydebug): Die.
4131 * lex.c (YYDEBUG): Get from c-lex.h.
4132 (cxx_set_yydebug): Remove.
4133 * parse.y: Include c-lex.h.
4134 (YYDEBUG): Get from c-lex.h.
4136 2002-04-24 Mark Mitchell <mark@codesourcery.com>
4139 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
4142 2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
4144 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
4145 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
4147 * cp-tree.h (cp_attribute_table): Rename.
4148 * decl.c (lang_attribute_table): Remove declaration.
4149 (cxx_init_decl_processing): Don't set it.
4150 * tree.c (cp_attribute_table): Rename.
4152 2002-04-24 Jason Merrill <jason@redhat.com>
4155 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
4156 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
4157 The pedwarn for array assignment is now unconditional.
4158 * tree.c (build_cplus_array_type_1): Still process simple array types
4159 normally in templates.
4162 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
4165 2002-04-23 Jakub Jelinek <jakub@redhat.com>
4167 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
4168 node with attributes.
4170 2002-2-23 David O'Brien <obrien@FreeBSD.org>
4172 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
4173 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
4175 2002-04-23 Mark Mitchell <mark@codesourcery.com>
4178 * pt.c (tsubst_friend_class): Handle templates with explicit
4182 * typeck.c (merge_types): Remember the cv-qualification of pointer
4183 types when merging them.
4185 2002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
4187 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
4188 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
4189 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
4190 cxx_mark_function_context): New.
4191 * decl.c (push_cp_function_context, pop_cp_function_context,
4192 mark_cp_function_context): Rename for consistency.
4193 (cxx_init_decl_processing): Don't set old hooks.
4195 2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
4197 * call.c (convert_type_from_ellipsis): Rename, update.
4198 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
4199 * cp-tree.h (convert_type_from_ellipsis): Rename.
4200 * decl.c (cxx_init_decl_processing): Don't set hook.
4202 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
4204 * call.c (build_new_method_call): Update.
4205 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
4206 * cp-tree.h (cxx_incomplete_type_error): New.
4207 * decl.c (grokdeclarator, grokparms): Update.
4208 * decl2.c (check_classfn): Update.
4209 * pt.c (tsubst): Update.
4210 * typeck.c (complete_type_or_else, expr_sizeof,
4211 decay_conversion): Update.
4212 * typeck2.c (incomplete_type_error): Rename.
4213 (add_exception_specifier): Update.
4215 2002-04-18 Jason Merrill <jason@redhat.com>
4218 * search.c (setup_class_bindings): A class template qualifies as a
4221 2002-04-17 Jakub Jelinek <jakub@redhat.com>
4224 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
4227 2002-04-16 Mark Mitchell <mark@codesourcery.com>
4229 * init.c (begin_init_stmts): Remove commented out code.
4230 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
4231 * semantics.c (begin_gobal_stmt_expr): Adjust call to
4232 expand_start_stmt_expr.
4234 2002-04-15 Mark Mitchell <mark@codesourcery.com>
4236 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
4237 dso_handle itself, to __cxa_atexit.
4239 2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
4241 * error.c (cxx_print_error_function): Adjust call to macros.
4243 2002-04-14 Jakub Jelinek <jakub@redhat.com>
4245 * class.c (layout_virtual_bases): Do all dsize computation on trees.
4247 2002-04-14 Jason Merrill <jason@redhat.com>
4249 * typeck.c (get_member_function_from_ptrfunc): Don't do
4250 gratuitious division and multiplication on
4251 ptrmemfunc_vbit_in_delta targets.
4253 2002-04-12 Mark Mitchell <mark@codesourcery.com>
4256 * semantics.c (finish_expr_stmt): Remember the type of the
4257 expression before any conversions are performed.
4259 2002-04-12 Mark Mitchell <mark@codesourcery.com>
4262 * call.c (add_template_candidate_real): Do not treat member
4263 templates as copy constructors.
4265 2002-04-12 Mark Mitchell <mark@codesourcery.com>
4267 * decl.c (duplicate_decls): Do not copy the RTL for a variable
4268 declaration if the old variable had an incomplete type and the new
4270 (complete_vars): Do not call layout_decl for completed variables.
4272 2002-04-12 Richard Sandiford <rsandifo@redhat.com>
4274 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
4275 with an explicit one.
4276 (follow_tag_typedef): New.
4277 (lookup_tag): Use it to extract the tag of an explicit typedef.
4278 (xref_tag): Likewise.
4280 2002-04-11 Andrew Haley <aph@redhat.com>
4282 * typeck.c (type_after_usual_arithmetic_conversions):
4283 If two types have the same variant, return immediately.
4284 When two floating-point operands are the same precision:
4285 convert to float if one of the operands is float;
4286 if neither operand is one of the standard types, return the type
4287 of the first operand.
4289 2002-04-10 Nathan Sidwell <nathan@codesourcery.com>
4292 * decl.c (make_typename_type): Remove implicit typenameness.
4294 2002-04-09 Jason Merrill <jason@redhat.com>
4296 PR optimization/6189
4297 * semantics.c (genrtl_start_function): Don't free
4298 DECL_SAVED_FUNCTION_DATA for inline functions.
4300 * init.c (build_member_call): For now, don't convert to
4301 intermediate base if it would cause an error.
4303 2002-04-08 Paolo Carlini <pcarlini@unitus.it>
4305 * parse.y (namespace_qualifier, maybe_identifier,
4306 begin_explicit_instantiation, end_explicit_instantiation,
4307 apparent_template_type, .finish_template_type,
4308 do_id, maybe_init, defarg_again, component_decl_1):
4309 Add ending ';', in accordance with POSIX.
4311 2002-04-06 Mark Mitchell <mark@codesourcery.com>
4314 * class.c (layout_class_type): Remember incomplete static
4316 (finish_struct_1): Call complete_vars, not
4317 hack_incomplete_structures.
4318 * cp-tree.h (hack_incomplete_structures): Rename to ...
4319 (complete_vars): ... this.
4320 (struct saved_scope): Remove incomplete.
4321 (namespace_scope_incomplete): Remove.
4322 * decl.c (struct binding_level): Remove incomplete.
4323 (incomplete_vars): New variable.
4324 (mark_binding_level): Don't mark incomplete.
4325 (print_binding_level): Don't print it.
4326 (mark_saved_scope): Don't mark incomplete.
4327 (pushdecl): Use maybe_register_incopmlete_var.
4328 (cxx_init_decl_processing): Register incomplete_vars for GC.
4329 (start_decl_1): Clarify error message.
4330 (hack_incomplete_vars): Remove.
4331 (maybe_register_incomplete_var): New function.
4332 (complete_vars): Likewise.
4334 2002-04-06 Jason Merrill <jason@redhat.com>
4337 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
4338 set before checking it.
4341 * init.c (build_member_call): Use build_scoped_ref.
4342 (resolve_offset_ref): Likewise.
4343 * call.c (build_scoped_method_call): Likewise.
4344 * tree.c (maybe_dummy_object): Kludge around current_class_type being
4346 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
4347 * cp-tree.h: Adjust.
4349 * init.c (push_base_cleanups): Just use build_scoped_method_call.
4352 * method.c (implicitly_declare_fn): Pass unqualified type to
4353 synthesize_exception_spec.
4355 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
4357 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
4358 * cvt.c: Update comment.
4359 * init.c (expand_cleanup_for_base): Update.
4360 * semantics.c (finish_parenthesized_expr): Update.
4361 * typeck.c (cp_truthvalue_conversion): Update.
4363 2002-04-04 Jason Merrill <jason@redhat.com>
4365 * semantics.c (finish_eh_cleanup): New fn.
4366 * cp-tree.h: Add prototype.
4367 * init.c (perform_member_init, expand_cleanup_for_base): Use
4369 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
4370 * cp-tree.h: Remove references.
4371 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
4372 * dump.c (cp_dump_tree): Likewise.
4373 * pt.c (tsubst_expr): Likewise.
4374 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
4375 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
4376 * tree.c (cp_statement_code_p): Likewise.
4378 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
4381 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
4385 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
4387 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
4389 2002-04-03 Richard Henderson <rth@redhat.com>
4391 * cp-lang.c (cxx_warn_unused_global_decl): New.
4392 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
4394 2002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
4396 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
4397 * tree.c (init_tree): Don't set hook.
4399 2002-04-03 Roger Sayle <roger@eyesopen.com>
4402 * decl.c (duplicate_decls): Don't mess with assembler names when
4403 redeclaring builtin functions as static.
4405 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
4407 * call.c (build_addr_func): Update.
4408 * class.c (resolve_address_of_overloaded_function): Update.
4409 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
4410 * cp-tree.h (cxx_mark_addressable): New.
4411 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
4412 * decl2.c (build_cleanup): Update.
4413 * except.c (build_throw): Update.
4414 * init.c (resolve_offset_ref): Update.
4415 * pt.c (convert_nontype_argument): Update.
4416 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
4417 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
4418 unary_complex_lvalue): Update.
4419 (mark_addressable): Rename.
4421 2002-04-01 Roger Sayle <roger@eyesopen.com>
4424 * decl.c (duplicate_decls): Overwrite the RTL when (and only
4425 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
4426 but follow the SET_DECL_RTL idiom used elsewhere in the function.
4428 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
4430 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
4431 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
4432 * decl.c (grokdeclarator): Update.
4433 * mangle.c (write_integer_cst): Update.
4434 * typeck.c (build_binary_op): Update.
4436 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
4438 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
4439 * lex.c (cxx_init): Don't set hook.
4441 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
4443 * Make-lang.in (error.o): Update.
4444 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
4445 * cp-tree.h (struct diagnostic_context): Predeclare.
4446 (cxx_print_error_function): New.
4447 * error.c: Include langhooks-def.h.
4448 (lang_print_error_function): Rename. Update.
4449 (init_error): Don't set hook.
4451 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
4453 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
4455 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
4456 * decl.c (finish_enum): Similarly.
4457 * error.c (dump_type): Similarly.
4458 * lex.c (cxx_init): Similarly.
4459 * mangle.c (write_builtin_type): Similarly.
4460 * typeck.c (comptypes): Similarly.
4462 2002-03-28 Roger Sayle <roger@eyesopen.com>
4465 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
4466 in the g++ front-end.
4467 (duplicate_decl): Allow redefinition of anticipated built-ins.
4468 Fix inlining problem by over-writing the old DECL_RTL.
4469 (lookup_namespace_name): Fail to find an identifier in the
4470 specified namespace if its still anticipated.
4471 (builtin_function_1): New function split out from builtin_function
4472 to create a builtin in the current namespace with given context.
4473 (builtin_function): Call builtin_function_1 to define the
4474 appropriate builtins in both the std and global namespaces.
4475 (select_decl): Don't test for anticipated decls here.
4476 (unqualified_namespace_lookup): Instead ignore them whilst
4477 searching through scopes and namespaces.
4478 * decl2.c (do_nonmember_using_decl): If a using declaration
4479 specifies an anticipated built-in function, mark it as no longer
4480 anticipated in that scope.
4481 (ambiguous_decl): Avoid resolving to an anticipated decl.
4482 * lex.c (do_scoped_id): Fail to find an identifier in the global
4483 namespace if its still anticipated.
4485 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
4487 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
4488 * cp-tree.h (cp_make_lang_type): Rename.
4489 * lex.c (cp_make_lang_type): Rename.
4490 (make_aggr_type): Update.
4491 * tree.c (init_tree): Don't set make_lang_type_fn.
4493 2002-03-29 Jakub Jelinek <jakub@redhat.com>
4496 * class.c (finish_struct_1): Update static field's DECL_MODE even
4497 if its type is a variant of t.
4499 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
4501 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
4502 * cp-tree.h (cxx_insert_default_attributes): New.
4503 * decl.c (insert_default_attributes): Rename.
4505 2002-03-27 Mark Mitchell <mark@codesourcery.com>
4508 * call.c (build_op_delete_call): Allow for the fact the placement
4509 may be a COMPOUND_EXPR.
4511 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
4513 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
4514 * cp-tree.h (init_cplus_expand): Remove.
4515 (cxx_expand_expr): New.
4516 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
4518 (init_cplus_expand): Remove.
4519 * lex.c (cxx_init): Don't call init_cplus_expand.
4521 2002-03-26 Mark Mitchell <mark@codesourcery.com>
4524 * init.c (build_new_1): Allow for the fact the result of
4525 build_function_call may be a COMPOUND_EXPR.
4527 2002-03-26 Nathan Sidwell <nathan@codesourcery.com>
4530 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
4531 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
4532 (dfs_skip_nonprimary_vbases_markedp): Remove.
4533 * search.c (get_shared_vbase_if_not_primary): Remove.
4534 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
4535 (dfs_skip_nonprimary_vbases_markedp): Remove.
4536 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
4537 (dfs_marked_real_bases_queue_p): Likewise.
4539 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
4541 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
4542 * cp-tree.h (cxx_mark_tree): New.
4543 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
4545 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
4547 * cp-tree.h (cxx_maybe_build_cleanup): New.
4548 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
4549 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
4550 * tree.c (build_target_expr): Update.
4551 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
4553 2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
4555 * decl2.c (cxx_decode_option): Handle -E.
4556 * lang-specs.h (default_compilers): Preprocess with cc1plus.
4557 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
4559 2002-03-23 Jakub Jelinek <jakub@redhat.com>
4562 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
4564 2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
4566 * error.c (dump_type): Be careful about implicit typenames.
4568 2002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
4571 * semantics.c (finish_base_specifier): Handle erronous base
4574 2002-03-22 Zack Weinberg <zack@codesourcery.com>
4576 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
4579 2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
4581 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
4582 an index into the vtable_entry array regardless of
4583 TARGET_PTRMEMFUNC_VBIT_LOCATION.
4585 2002-03-21 Aldy Hernandez <aldyh@redhat.com>
4587 * tree.c (cp_cannot_inline_tree_fn): Same.
4589 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
4591 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
4592 insert_block, getdecls, global_bindings_p): New.
4594 2002-03-20 Nathan Sidwell <nathan@codesourcery.com>
4597 * mangle.c (struct globals) Add internal_mangling_p member.
4598 (write_template_param): Do internal mangling, if needed.
4599 (mangle_conv_op_name_for_type): Request internal mangling.
4601 2002-03-20 Jason Merrill <jason@redhat.com>
4604 * init.c (build_delete): Check access for a member op delete here.
4605 * decl2.c (delete_sanity): Not here.
4607 2002-03-19 Jason Merrill <jason@redhat.com>
4610 * class.c (get_vfield_name): Use the constructor_name.
4612 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
4614 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
4615 * cp-tree.h (lang_printable_name): Rename.
4616 * error.c (lang_decl_name): Use new hook.
4617 * lex.c (cxx_init): Remove old hook.
4618 * pt.c (tsubst_decl): Use new hook.
4619 * tree.c (lang_printable_name): Rename.
4621 2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
4624 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
4625 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
4626 only after recording the declaration.
4628 2002-03-18 Jason Merrill <jason@redhat.com>
4631 * init.c (resolve_offset_ref): Hand off to build_component_ref.
4633 PR c++/4222, c++/5995
4634 * call.c (build_over_call): Fix empty class logic.
4637 * cp-tree.h (struct saved_scope): Add last_parms field.
4638 * decl.c (maybe_push_to_top_level): Save last_function_parms.
4639 (pop_from_top_level): Restore it.
4642 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
4646 * pt.c (tsubst_friend_function): Use decl_namespace_context.
4648 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
4649 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
4650 type with a nontrivial destructor.
4652 2002-03-17 Jason Merrill <jason@redhat.com>
4655 * class.c (build_base_path): Virtual base layout is fixed in
4658 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
4660 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
4661 * parse.y (yyparse): Remove macro.
4663 2002-03-17 Jason Merrill <jason@redhat.com>
4666 * init.c (build_new_1): Pass the right pointer to op delete.
4668 2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
4671 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
4672 conversion operators go.
4673 (struct lang_decl_flags): Add template_conv_p and unused
4675 (DECL_TEMPLATE_CONV_FN_P): New macro.
4676 * call.c (build_user_type_conversion_1): Don't check second type
4677 conversion of overload set first.
4678 * class.c (add_method): Make sure templated conversion operators
4679 all end up on slot 2.
4680 * lex.c (do_identifier): A conversion operator token might be
4681 satisfied by a templated conversion operator.
4682 * pt.c (check_explicit_specialization): Use
4683 CLASSTYPE_FIRST_CONVERSION_SLOT.
4684 (template_parm_this_level_p): New function.
4685 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
4686 * search.c (lookup_fnfields_1): Template conversions will be on
4688 * typeck.c (build_component_ref): Preserve the type of an
4689 conversion operator name on the overload type.
4690 (build_x_function_call): Retrieve the conversion operator name.
4692 2002-03-15 Richard Henderson <rth@redhat.com>
4694 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
4696 2002-03-15 Mark Mitchell <mark@codesourcery.com>
4698 * cp-tree.h (CLEANUP_DECL): Remove.
4699 (CLEANUP_EXPR): Likewise.
4700 * decl.c (destroy_local_var): Simplify.
4701 (maybe_build_cleanup): Tidy.
4702 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
4703 * semantics.c (cp_expand_stmt): Likewise.
4704 * cp/tree.c (cp_statement_code_p): Likewise.
4706 2002-03-15 Jason Merrill <jason@redhat.com>
4709 * decl.c (duplicate_decls): Use merge_types instead of common_type.
4710 * typeck.c (common_type): Just hand off to
4711 type_after_usual_arithmetic_conversions and
4712 composite_pointer_type.
4713 (merge_types): New fn.
4714 (commonparms): Use it instead of common_type.
4715 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
4716 (composite_pointer_type): Also handle attributes.
4717 * cp-tree.h: Declare merge_types.
4719 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
4721 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
4723 2002-03-14 Richard Henderson <rth@redhat.com>
4725 * decl.c: Include c-pragma.h.
4726 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
4727 * Make-lang.in: Update dependencies.
4729 2002-03-14 Jakub Jelinek <jakub@redhat.com>
4732 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
4733 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
4735 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
4737 * mangle.c (write_builtin_type): Handle 128-bit integers even if
4738 they are not a standard integer type.
4740 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
4742 * cp-tree.h (init_init_processing): Remove declaration.
4743 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
4744 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
4746 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4748 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
4750 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
4752 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
4753 cplus_tree_code_name): Delete.
4754 (cxx_init): Don't call add_c_tree_codes, instead set
4755 lang_unsafe_for_reeval. Don't try to copy into the various
4758 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
4761 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
4762 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
4765 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
4767 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
4768 DR209 is now not a defect.
4769 * cp-tree.h (skip_type_access_control): Remove.
4770 * decl.c (grokdeclarator): Do type access control for friend
4772 * semantics.c (decl_type_access_control): Don't reset
4773 current_type_lookups.
4774 (save_type_access_control): Always save the lookups.
4775 (skip_type_access_control): Remove.
4776 (finish_class_definition): Don't change type_lookups.
4778 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
4780 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
4782 * typeck.c (build_static_cast): Compare non-qualified types
4783 with pointer to member conversions.
4785 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
4786 Daniel Berlin <dan@dberlin.org>
4788 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
4789 (cxx_get_alias_set): Use it.
4791 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4793 * cp-tree.h (stabilize_expr): Prototype.
4795 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
4797 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
4798 conditional return void.
4800 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
4802 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
4803 * cp-tree.h (cxx_unsave): New.
4804 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
4805 (init_tree): Update.
4807 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4809 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
4810 explicit sizeof/sizeof.
4811 * decl2.c (cxx_decode_option): Likewise.
4812 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
4814 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
4817 * decl.c (lookup_tag): Only reject enum/class mismatch, not
4818 class/union mismatch.
4819 * parse.y (check_class_key): New function.
4820 (structsp): Call it.
4822 2002-03-01 Michael Matz <matz@suse.de>
4824 * typeck.c (cp_pointer_int_sum): Complete inner type which is
4825 used later by size_in_bytes().
4827 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
4829 * cp-tree.h: Require __GNUC__ to be #defined.
4830 (build_init): Add missing prototype.
4832 2002-03-01 Jason Merrill <jason@redhat.com>
4834 * except.c: Don't include decl.h or obstack.h. Do include
4836 (build_throw): Destroy temporaries from the thrown
4837 expression before calling __cxa_throw. Construct a thrown
4838 temporary directly into the exception object.
4839 (stabilize_throw_expr): New function.
4840 (wrap_cleanups_r): New function.
4841 * tree.c (stabilize_expr): New function.
4842 * init.c (build_init): New function.
4843 * Make-lang.in (cp/except.o): Adjust .h deps.
4845 2002-02-28 Jason Merrill <jason@redhat.com>
4847 * search.c (lookup_base_r): Don't clear is_non_public just because
4848 we found a friendly scope.
4850 * decl.c (finish_function): Only warn about missing return
4851 statement with -Wreturn-type.
4853 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
4855 * class.c (build_clone): Update.
4856 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
4857 * cp-tree.h (cxx_dup_lang_specific_decl): New.
4858 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
4859 (copy_decl): Update.
4860 * method.c (make_thunk): Update.
4862 2002-02-27 Zack Weinberg <zack@codesourcery.com>
4864 * decl2.c: Delete traditional-mode-related code copied from
4865 the C front end but not used, or used only to permit the
4868 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
4871 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
4874 2002-02-22 Jakub Jelinek <jakub@redhat.com>
4877 * semantics.c (finish_switch_cond): Don't call get_unwidened
4880 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
4883 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
4885 (make_typename_type): Use tsubst_flags_t.
4886 * decl.c (make_typename_type): Adjust. Return non-artificial
4887 TYPE_DECLs, if required.
4888 (grokdeclarator): Simplify CVR qualification handling. Allow bad
4889 qualifiers on typedef types.
4890 * decl2.c (handle_class_head): Adjust make_typename_type call.
4891 * parse.y (nested_name_specifier): Likewise.
4892 (typename_sub0): Likewise.
4893 (typename_sub1): Likewise.
4894 * pt.c (convert_template_argument): Adjust make_typename_type
4896 (tsubst): Adjust cp_build_qualified_type_real calls.
4897 (check_cv_quals_for_unify): Cope with allowing bad qualifications
4898 on template type parms.
4899 (instantiate_decl): Recheck substitutions to give warnings on bad
4901 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
4903 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
4905 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
4907 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
4908 unless DECL_ALWAYS_INLINE.
4910 2002-02-20 Jakub Jelinek <jakub@redhat.com>
4912 * typeck.c (cp_pointer_int_sum): Renamed from
4913 pointer_int_sum, call pointer_int_sum.
4915 2002-02-20 Jakub Jelinek <jakub@redhat.com>
4917 * decl.c (duplicate_decls): Return 0 if issued error about
4920 2002-02-19 Jason Merrill <jason@redhat.com>
4922 ABI change: Mangle `void (A::*)() const' as
4923 M1AKFvvE, not MK1AFvvE.
4924 * mangle.c (write_function_type): Write cv-quals for member
4926 (write_pointer_to_member_type): Not here.
4928 2002-02-18 Jason Merrill <jason@redhat.com>
4930 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
4931 (do_decl_instantiation): Likewise.
4933 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
4936 * decl.c (duplicate_decls): Make warning unconditional
4937 if duplicate default argument declarations are present.
4939 2002-02-17 Jakub Jelinek <jakub@redhat.com>
4941 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
4944 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
4946 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
4947 remove incorrect comment. Move #if 0'd code to common path. Use
4948 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
4950 2002-02-13 Jason Merrill <jason@redhat.com>
4952 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
4953 (finish_function): Don't warn if current_function_returns_null.
4955 * typeck2.c (digest_init): Do handle values of vector type.
4957 * typeck2.c (digest_init, process_init_constructor): Treat vectors
4960 2002-02-11 Jason Merrill <jason@redhat.com>
4962 * parse.y (reserved_declspecs): Don't handle attributes.
4963 (reserved_typespecquals): Handle them here.
4964 * Make-lang.in (parse.c): Adjust expected conflicts.
4966 2002-02-08 Jakub Jelinek <jakub@redhat.com>
4968 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
4969 instead of compstmt.
4970 (compstmt_or_stmtexpr): Renamed from compstmt.
4971 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
4973 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
4975 Rename instantiate_type_flags to tsubst_flags_t & expand use.
4976 * cp-tree.h (instantiate_type_flags): Rename to ...
4977 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
4978 add tf_warning flag.
4979 (instantiate_type): Adjust prototype.
4980 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
4981 do_type_instantiation, cp_build_qualified_type_real): Likewise.
4982 cp_build_qualified_type: Adjust.
4983 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
4985 * call.c (standard_conversion): Rename itf_* to tf_*.
4986 (reference_binding): Likewise.
4987 (convert_like_real): Likewise.
4988 * cvt.c (cp_convert_to_pointer): Likewise.
4989 (convert_to_reference): Likewise.
4990 * decl.c (lookup_namespace_name): Use tf_* flags.
4991 (make_typename_type): Likewise.
4992 (grokdeclarator): Likewise.
4993 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
4994 (coerce_template_template_parms, convert_template_argument,
4995 coerce_template_parms, maybe_get_template_decl_from_type_decl,
4996 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
4997 instantiate_class_template, tsubst_template_arg_vector,
4998 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
4999 tsubst_decl, tsubst_arg_types, tsubst_function_type,
5000 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
5001 instantiate_template, fn_type_unification,
5002 resolve_overloaded_unification, verify_class_unification,
5003 unify, get_bindings_real, do_type_instantiation,
5004 regenerate_decl_from_template, instantiate_decl,
5005 tsubst_initializer_list, tsubst_enum,
5006 get_mostly_instantiated_function_type,
5007 invalid_nontype_parm_type_p): Likewise.
5008 * tree.c (cp_build_qualified_type_real): Likewise.
5009 * typeck.c (build_binary_op): Rename itf_* to tf_*.
5010 (build_ptrmemfunc): Likewise.
5011 (convert_for_assignment): Likewise.
5013 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
5016 * decl.c (grokdeclarator): Allow friend declarations from
5018 * decl2.c (handle_class_head): Don't push into template parm contexts.
5019 * pt.c (push_template_decl_real): Template parm contexts are never
5022 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
5024 * class.c: Include target.h.
5025 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
5026 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
5028 * Make-lang.in: Adjust deps.
5030 2002-02-05 Jason Merrill <jason@redhat.com>
5032 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
5034 2002-02-04 Jakub Jelinek <jakub@redhat.com>
5036 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
5037 (finish_switch_cond): Set SWITCH_TYPE.
5039 2002-02-04 Richard Henderson <rth@redhat.com>
5041 * method.c (use_thunk): Always initialize the block tree. Reindent.
5042 * semantics.c (expand_body): Emit thunks after function, not before.
5044 2002-02-04 Jason Merrill <jason@redhat.com>
5046 * decl.c (start_function): Call cplus_decl_attributes immediately
5047 after grokdeclarator.
5049 * decl.c (start_function): Combine DECL_RESULT handling code.
5051 2002-02-03 Jason Merrill <jason@redhat.com>
5054 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
5055 (cp/xref.o): Remove dependencies.
5056 * class.c (finish_struct_1, check_methods): Don't call xref fns.
5057 (finish_struct_1): Likewise.
5058 * friend.c (make_friend_class): Likewise.
5059 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
5060 * spew.c (read_process_identifier): Likewise.
5062 2002-02-01 Jason Merrill <jason@redhat.com>
5065 * decl.c (finish_function): Warn about a non-void function with
5066 no return statement and no abnormal exit.
5067 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
5068 (current_function_returns_abnormally): New macro.
5069 * call.c (build_call): Set it.
5071 * typeck.c (build_component_ref): Always complain about offsetof
5072 constructs on non-PODs. Only make it an error for members of
5075 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
5076 (dump_function_decl): Always dump parms.
5078 * decl2.c (finish_static_data_member_decl): Complain about a local
5079 class with a static data member.
5082 * search.c (lookup_field_1): Don't xref a static data member
5083 just because we looked it up.
5085 2002-01-31 Jason Merrill <jason@redhat.com>
5087 * Make-lang.in (parse.c): Handle .output file.
5090 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
5092 * semantics.c (finish_class_definition): Adjust.
5094 Allow attributes in parms and casts.
5095 * parse.y (named_parm): Don't strip attrs.
5096 (declmods): Remove 'attributes' production.
5097 (nonempty_cv_qualifiers): Accept attributes.
5098 (ATTRIBUTE): Give precedence.
5099 * decl.c (groktypename): Handle attributes.
5100 (grokparms): Likewise.
5102 2002-01-29 Jakub Jelinek <jakub@redhat.com>
5104 * decl2.c (cxx_decode_option): Pass 0 as last argument to
5106 * lang-specs.h: Use cpp_unique_options instead of cpp_options
5107 when used together with cc1_options.
5109 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
5112 * typeck2.c (digest_init): Make sure non-array core type is
5114 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
5115 constructor, rather than build a new one.
5116 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
5117 PURPOSE of constructor elts.
5119 2002-01-23 Zack Weinberg <zack@codesourcery.com>
5121 * Make-lang.in (parse.c): Adjust expected number of
5122 shift-reduce conflicts.
5123 (decl.o): Depend on diagnostic.h.
5124 * decl.c: Include diagnostic.h.
5125 (grokdeclarator): Check for null pointer.
5126 (finish_function): Don't abort when
5127 current_binding_level->parm_flag != 1, if errors have
5128 occurred; throw away the statement tree and extra binding
5129 levels, and continue.
5130 * lex.c (note_list_got_semicolon): Check for null pointer.
5131 * method.c (hack_identifier): Just return error_mark_node if
5132 value is error_mark_node.
5133 * parse.y (primary: TYPEID(type_id)): No need to use
5134 TYPE_MAIN_VARIANT here.
5135 (handler_seq): Accept an empty list of catch clauses and
5136 generate a fake handler block to avoid later crashes.
5137 (ansi_raise_identifier): Accept the error token too.
5138 * semantics.c (begin_class_definition,
5139 finish_class_definition): Check for error_mark_node.
5141 2002-01-23 Zack Weinberg <zack@codesourcery.com>
5143 * typeck2.c (friendly_abort): Delete definition.
5144 * cp-tree.h (friendly_abort): Don't prototype.
5145 (my_friendly_assert): Use fancy_abort.
5147 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
5149 * cp-tree.h (my_friendly_abort): Remove.
5151 2002-01-23 Jakub Jelinek <jakub@redhat.com>
5153 * spew.c (pending_inlines, pending_inlines_tail,
5154 processing_these_inlines): Make static.
5155 (mark_pending_inlines): Remove static.
5156 (begin_parsing_inclass_inline): If in function, save pi
5157 for GC to cp_function_chain->unparsed_inlines instead.
5158 (process_next_inline): Likewise.
5159 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
5160 (mark_pending_inlines): Add prototype.
5161 * decl.c (spew_debug): Remove unused extern.
5162 (mark_lang_function): Call mark_pending_inlines.
5164 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
5166 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
5167 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
5168 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
5169 Change my_fancy_abort() to abort().
5171 2002-01-23 Jason Merrill <jason@redhat.com>
5174 * class.c (fixed_type_or_null): Fix thinko.
5177 * init.c (resolve_offset_ref): Use build_indirect_ref.
5179 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
5181 2002-01-22 Jason Merrill <jason@redhat.com>
5183 * parse.y (function_body): Suppress the block for the outermost
5185 * decl.c (pushdecl): Don't try to skip it.
5186 (begin_function_body): Keep the block we create, not the next one.
5187 * init.c (emit_base_init): Don't mess with keep_next_level.
5189 * class.c (build_base_path): Tweak formatting.
5191 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
5193 Fix regression introduced with patch for c++/775
5194 * parse.y (class_head_defn): Check for template specializations
5195 with a different class-key.
5197 2002-01-17 Jason Merrill <jason@redhat.com>
5199 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
5200 (begin_function_body): Call them and keep_next_level.
5201 * init.c (emit_base_init): Call keep_next_level.
5202 * semantics.c (setup_vtbl_ptr): Lose.
5203 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
5204 (vtbls_set_up_p): Lose.
5205 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
5206 * method.c (do_build_copy_constructor): Likewise.
5207 (synthesize_method): Call finish_mem_initializers.
5208 * parse.y (nodecls): Likewise.
5210 * error.c (dump_type_suffix): Print the exception specs before
5212 (dump_function_decl): Here, too.
5214 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
5216 2002-01-10 Ira Ruben <ira@apple.com>
5219 * decl.c (start_method): Handle attrlist.
5221 2002-01-10 Jakub Jelinek <jakub@redhat.com>
5223 * decl2.c (max_tinst_depth): Increase default limit to 500.
5225 2002-01-10 Graham Stott <grahams@redhat.com>
5227 * spew.c (YYCHAR): Uppercase macro parameter and add
5230 (NAME): Uppercase macro parameter.
5232 2002-01-09 Graham Stott <grahams@redhat.com>
5234 * decl.h (grokdeclarator): Wrap long line.
5236 * semantics.c (FINISH_COND): Uppercase macro paramaters and
5239 2002-01-08 Graham Stott <grahams@redhat.com>
5241 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
5242 (PALLOC): Uppercase macro parameter and whitespace.
5243 (SALLOC): Uppercase macro parameter.
5244 (SFREE): Uppercase macros parameter, add parenthese and
5246 (STREQL): Uppercase macro parameter and whitespace.
5253 * call.c (convert_like): Add parenthesis and wrap.
5254 (convert_like_with_context): Likewise.
5255 (ICS_RANK): Whitespace.
5256 (NEED_TEMPORARY_P): Remove parenthesis.
5258 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
5260 (VTT_MARKED_BINFO_P): Likewise.
5262 * decl.c (BINDING_LEVEL): Add parenthesis.
5263 (DEF_OPERATOR): Likewise.
5265 * mangle.c (MANGLE_TRACE): Add parenthesis.
5266 (MANGLE_TRACE_TREE): Likewise.
5267 (write_signed_number): Likewise.
5268 (write_unsigned_number): Likewise.
5270 * pt.c (ccat): Uppercase macro parameter.
5273 * search.c (SET_BINFO_ACCESS): Add parenthesis.
5275 2002-01-07 Jason Merrill <jason@redhat.com>
5277 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
5281 * method.c (make_thunk): If !flag_weak, give the thunk the
5283 (use_thunk): Here, too.
5285 2002-01-07 Graham Stott <grahams@redhat.com>
5287 * error.c: Update copyright date.
5288 (print_scope_operator): Add parenthesis.
5289 (print_left_paren): Likewise.
5290 (print_right_paren): Likewise.
5291 (print_left_bracket): Likewise.
5292 (print_right_bracket): Likewise.
5293 (print_template_argument_list_start): Likewise.
5294 (print_template_argument_list_end): Likewise.
5295 (print_non_consecutive_character): Likewise.
5296 (print_tree_identifier): Likewise.
5297 (print_identifier): Likewise.
5298 (NEXT_CODE): Uppercase macro parameter.
5299 (ident_fndecl): Delete unused.
5300 (GLOBAL_THING): Likewise.
5302 2002-01-06 Graham Stott <grahams@redhat.com>
5304 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
5305 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
5306 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
5307 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
5308 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
5309 (C_IS_RESERVED_WORD): Uppercase macro parameter.
5310 (C_RID_YYCODE) Likewise.
5311 (ptrmem_cst): Use rtx.
5312 (LOCAL_BINDING_P): Add whitespace.
5313 (INHERITED_VALUE_BINDING_P): Likewise.
5314 (BINDING_SCOPE): Wrap long line.
5315 (BINDING_HAS_LEVEL_P): Remove parenthesis.
5316 (BINDING_VALUE): Wrap long line.
5317 (BINDING_TYPE): Whitespace.
5318 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
5319 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
5320 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
5321 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
5322 (same_type_p): Uppercase macro parameters.
5323 (same_type_ignoring_top_level_qualifiers_p): Likewise.
5324 (OVL_FUNCTION): Wrap long line.
5325 (OVL_CHAIN): Whitespace.
5326 (OVL_CURRENT): Add parenthesis and whitespace.
5327 (OVL_NEXT): Whitespace.
5328 (OVL_USED): Likewise.
5329 (IDENTIFIER_TYPE_VALUE): Likewise.
5330 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
5331 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
5332 (LANG_ID_FIELD): Whitespace.
5333 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
5334 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
5335 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
5336 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
5337 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
5338 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
5339 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
5340 (IDENTIFIER_VIRTUAL_P): Likewise.
5341 (IDENTIFIER_OPNAME_P): Likewise.
5342 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
5343 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
5344 (C_SET_EXP_ORIGINAL_CODE): Likewise.
5345 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
5346 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
5347 (IS_AGGR_TYPE): Uppercase macro parameter.
5348 (CLASS_TYPE_P): Likewise.
5349 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
5350 (IS_AGGR_TYPE_2): Whitespace.
5351 (TAGGED_TYPE_P): Uppercase macro parameter.
5352 (TYPE_BUILT_IN): Whitespace.
5353 (TYPE_FOR_JAVA): Likewise.
5354 (FUNCTION_ARG_CHAIN): Remove parenthesis.
5355 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
5356 (FUNCTION_FIRST_USER_PARAM): Likewise.
5357 (PROMOTES_TO_AGGR_TYPE): Whitespace.
5358 (DERIVED_FROM_P): Add parenthesis and wrap.
5359 (UNIQUELY_DERIVED_FROM_P): Likewise.
5360 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
5361 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
5362 (CLASSTYPE_USE_TEMPLATE): Whitespace.
5363 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
5364 (TYPE_GETS_DELETE): Add parenthesis.
5365 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
5366 (TYPE_HAS_ASSIGN_REF): Likewise,
5367 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
5368 (TYPE_HAS_INIT_REF): Likewise.
5369 (TYPE_HAS_CONST_INIT_REF): Likewise.
5370 (TYPE_BEING_DEFINED): Likewise.
5371 (TYPE_LANG_SPECIFIC): Likewise.
5372 (CLASSTYPE_RTTI): Likewise.
5373 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
5374 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
5375 (TYPE_OVERLOADS_ARROW): Likewise.
5376 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
5377 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
5378 (CLASSTYPE_METHOD_VEC): Likewise.
5379 (CLASSTYPE_MARKED_N): Likewise.
5380 (CLASSTYPE_MARKED): Likewise.
5381 (CLASSTYPE_MARKED2): Likewise.
5382 (CLASSTYPE_MARKED3): Likewise.
5383 (CLASSTYPE_MARKED4): Likewise.
5384 (CLASSTYPE_MARKED5): Likewise.
5385 (CLASSTYPE_MARKED6): Likewise.
5386 (SET_CLASSTYPE_MARKED): Whitespace.
5387 (CLEAR_CLASSTYPE_MARKED): Likewise.
5388 (SET_CLASSTYPE_MARKED2): Likewise.
5389 (CLEAR_CLASSTYPE_MARKED2): Likewise.
5390 (SET_CLASSTYPE_MARKED3): Likewise.
5391 (CLEAR_CLASSTYPE_MARKED3): Likewise.
5392 (SET_CLASSTYPE_MARKED4): Likewise.
5393 (CLEAR_CLASSTYPE_MARKED4): Likewise.
5394 (SET_CLASSTYPE_MARKED5): Likewise.
5395 (CLEAR_CLASSTYPE_MARKED5): Likewise.
5396 (SET_CLASSTYPE_MARKED6): Likewise.
5397 (CLEAR_CLASSTYPE_MARKED6): Likewise.
5398 (CLASSTYPE_TAGS): Likewise.
5399 (CLASSTYPE_VSIZE): Likewise.
5400 (CLASSTYPE_VBASECLASSES): Likewise.
5401 (CANONICAL_BINFO): Add parenthesis.
5402 (CLASSTYPE_SIZE(NODE): Likewise.
5403 (CLASSTYPE_SIZE_UNIT): Likewise.
5404 (CLASSTYPE_ALIGN(NODE): Likewise.
5405 (CLASSTYPE_USER_ALIGN): Likewise.
5406 (TYPE_JAVA_INTERFACE): Likewise.
5407 (CLASSTYPE_PURE_VIRTUALS): Likewise.
5408 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
5409 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
5410 (CLASSTYPE_HAS_MUTABLE): Likewise.
5411 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
5412 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
5413 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
5414 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
5415 (CLASSTYPE_INTERFACE_ONLY): Likewise.
5416 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
5417 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
5418 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
5419 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
5420 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
5421 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
5422 (BINFO_UNSHARED_MARKED): Whitespace.
5423 (BINFO_MARKED): Whitespace and wrap.
5424 (SET_BINFO_MARKED): Likewise.
5425 (CLEAR_BINFO_MARKED): Likewise.
5426 (BINFO_VTABLE_PATH_MARKED): Likewise.
5427 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
5428 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
5429 (BINFO_SUBVTT_INDEX): Remove parenthesis.
5430 (BINFO_VPTR_INDEX): Likewise.
5431 (BINFO_PRIMARY_BASE_OF): Likewise,
5432 (CLASSTYPE_VFIELDS): Whitespace.
5433 (VF_DERIVED_VALUE): Wrap long line.
5434 (NAMESPACE_LEVEL): Whitespace.
5435 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
5436 (DEFARG_POINTER): Whitespace.
5437 (DECL_NEEDED_P): Remove parenthesis.
5438 (DECL_LANGUAGE): Whitespace.
5439 (SET_DECL_LANGUAGE): Add parenthesis.
5440 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
5441 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
5442 (DECL_IN_AGGR_P): Whitespace.
5443 (DECL_FRIEND_P): Likewise.
5444 (DECL_BEFRIENDING_CLASSES): Likewise.
5445 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
5446 (DECL_NONCONVERTING_P): Whitespace.
5447 (DECL_PURE_VIRTUAL_P): Likewise.
5448 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
5449 (DECL_PENDING_INLINE_INFO): Whitespace.
5450 (DECL_SORTED_FIELDS): Likewise.
5451 (DECL_DEFERRED_FN): Likewise.
5452 (DECL_TEMPLATE_INFO): Likewise.
5453 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
5454 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
5455 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
5456 (TMPL_ARGS_LEVEL): Likewise.
5457 (SET_TMPL_ARGS_LEVEL): Likewise.
5458 (INNERMOST_TEMPLATE_PARMS): Whitespace.
5459 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
5460 (INTEGRAL_CODE_P(CODE): Add parenthesis.
5461 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
5462 (TYPE_HAS_CONSTRUCTOR): Whitespace.
5463 (TREE_HAS_CONSTRUCTOR): Likewise.
5464 (TYPE_HAS_DESTRUCTOR): Likewise.
5465 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
5466 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
5467 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
5468 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
5469 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
5470 (TYPE_PTRMEMFUNC_P): Likewise.
5471 (TYPE_PTRMEMFUNC_FLAG): Likewise.
5472 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
5473 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
5474 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
5475 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
5476 (DECL_ACCESS): Whitespace.
5477 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
5478 (DECL_GLOBAL_DTOR_P): Likewise.
5479 (GLOBAL_INIT_PRIORITY): Likewise.
5480 (DECL_TEMPLATE_PARMS): Likewise.
5481 (DECL_TEMPLATE_RESULT): Likewise.
5482 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
5483 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
5484 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
5485 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
5486 (PRIMARY_TEMPLATE_P): Add parenthesis.
5487 (DECL_USE_TEMPLATE): Whitespace.
5488 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
5489 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
5490 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
5491 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
5492 (CALL_DECLARATOR_PARMS): Remove parenthesis.
5493 (CALL_DECLARATOR_QUALS): Likewise.
5494 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
5495 (TEMP_NAME_P): Wrap.
5496 (VFIELD_NAME_P): Likewise.
5497 (B_SET): Uppercase macro parameters and add parenthesis.
5500 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
5501 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
5502 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
5503 (same_or_base_type_p): Likewise.
5504 (cp_deprecated): Likewise.
5506 2002-01-05 Richard Henderson <rth@redhat.com>
5508 * semantics.c (expand_body): Revert last change.
5510 2002-01-04 Jason Merrill <jason@redhat.com>
5513 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
5516 * class.c (build_vtbl_initializer): Check for a lost primary
5517 before calculating the vtable entry to throw away.
5519 2002-01-02 Jason Merrill <jason@redhat.com>
5521 * semantics.c (expand_body): Call outlining_inline_function when
5522 emitting an inline function out of line.
5524 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
5526 PR c++/5116, c++/764 reversion
5527 * call.c (build_new_op): Revert the instantiations. They are
5530 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
5533 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
5535 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
5538 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
5539 (tsubst, case POINTER_TYPE): Handle pmfs here.
5540 (tsubst, case OFFSET_TYPE): Check it is not an offset to
5541 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
5543 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
5546 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
5547 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
5548 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
5550 (tsubst_template_parms): Break up loop statements.
5551 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
5552 parm PARM_DECLs don't get promoted.
5554 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
5557 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
5558 (build_x_function_call): Cope with a COMPONENT_REF containing a
5561 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
5564 * pt.c (convert_template_argument): Be more careful determining
5565 when RECORD_TYPE templates are or are not templates.
5567 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
5570 * cp-tree.h (handle_class_head): Adjust prototype.
5571 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
5572 parameters. Use for all class heads.
5573 * parse.y (named_class_head_sans_basetype, named_class_head,
5574 named_complex_class_head_sans_basetype,
5575 named_class_head_sans_basetype_defn,
5576 unnamed_class_head): Remove.
5577 (class_head, class_head_apparent_template): Recognize class heads
5578 (class_head_decl, class_head_defn): New reductions. Process class
5580 (structsp): Adjust class definition and class declaration
5582 (maybe_base_class_list): Give diagnostic on empty list.
5584 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
5587 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
5588 single non-static member.
5589 (unary_complex_lvalue): If it cannot be a pointer to member, don't
5590 make it so. Check it is not pointer to reference.
5592 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
5595 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
5596 are processing a template decl.
5598 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
5600 PR c++/5116, c++/764
5601 * call.c (build_new_op): Make sure template class operands are
5602 instantiated. Simplify arglist construction.
5604 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
5606 * call.c (build_user_type_conversion_1): Use my_friendly_assert
5607 rather than if ... abort.
5608 * cvt.c (convert_to_reference): Likewise.
5609 * semantics.c (setup_vtbl_ptr): Likewise.
5610 * pt.c (lookup_template_class): Comment typo.
5612 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
5615 * pt.c (push_template_decl_real): Make sure DECL has
5618 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
5621 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
5622 for non-reference fields.
5623 * typeck.c (require_complete_type): Use resolve_offset_ref).
5625 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
5628 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
5630 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
5633 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
5634 up. Don't stabilize_references when initializing a reference.
5636 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5638 * decl2.c (lang_f_options): Const-ify.
5640 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
5642 * config-lang.in (diff_excludes): Remove.
5644 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
5647 * typeck.c (build_function_call_real): Use original function
5648 expression for errors.
5650 2001-12-18 Jason Merrill <jason@redhat.com>
5653 * class.c (add_method): Do compare 'this' quals when trying to match a
5654 used function. Don't defer to another used function.
5656 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
5658 * pt.c (instantiate_clone): Remove, fold into ...
5659 (instantiate_template): ... here. Simplify by removing mutual
5661 * typeck2.c (build_m_component_ref): Don't cv qualify the function
5662 pointed to by a pointer to function.
5663 * class.c (delete_duplicate_fields_1): Typo.
5665 2001-12-18 Jason Merrill <jason@redhat.com>
5667 C++ ABI change: destroy value arguments in caller.
5668 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
5669 create an extra binding level for the parameters.
5670 * decl.c (store_parm_decls): Don't do parameter cleanups.
5672 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
5674 * call.c (build_new_method_call): Use '%#V'.
5675 * error.c (cv_to_string): Use V parameter to determine padding.
5677 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
5679 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
5680 spellings in messages.
5682 2001-12-17 Zack Weinberg <zack@codesourcery.com>
5684 * cp-tree.h: Delete #defines for cp_error, cp_warning,
5685 cp_pedwarn, and cp_compiler_error.
5686 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
5687 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
5688 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
5689 typeck2.c: Change calls to the above macros to use their
5690 language-independent equivalents: error, warning, pedwarn, and
5691 internal_error respectively.
5693 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
5695 * decl2.c (finish_file): Remove back_end_hook.
5697 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
5699 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
5700 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
5701 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
5703 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
5705 * lang-options.h: Use American spelling in messages.
5707 2001-12-13 Jason Merrill <jason@redhat.com>
5709 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
5711 Use cleanups to run base and member destructors.
5712 * init.c (push_base_cleanups): New function, split out from...
5713 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
5714 * decl.c (finish_destructor_body): Move vbase destruction code to
5716 (begin_function_body, finish_function_body): New fns.
5717 (finish_function): Move [cd]tor handling and call_poplevel to
5718 finish_function_body.
5719 (pushdecl): Skip the new level.
5720 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
5721 (setup_vtbl_ptr): Call push_base_cleanups.
5722 * method.c (synthesize_method): Call {begin,end}_function_body.
5723 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
5724 * cp-tree.h: Declare new fns.
5725 * parse.y (function_body, .begin_function_body): New nonterminals.
5726 (fndef, pending_inline, function_try_block): Use function_body.
5727 (ctor_initializer_opt, function_try_block): No longer has a value.
5728 (base_init): Remove .set_base_init token.
5729 (.set_base_init, compstmt_or_error): Remove.
5730 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
5732 * optimize.c (maybe_clone_body): Fix parameter updating.
5734 2001-12-12 Jason Merrill <jason@redhat.com>
5736 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
5737 * semantics.c (genrtl_start_function): Don't pass
5738 parms_have_cleanups or push an extra binding level.
5739 (genrtl_finish_function): Lose cleanup_label cruft.
5741 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
5742 (ctor_label): Remove.
5743 * semantics.c (finish_return_stmt): Lose ctor_label support.
5744 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
5745 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
5748 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
5750 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
5752 * decl.c (finish_function): Check VMS_TARGET, not VMS.
5754 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
5755 (end_cleanup_fn): And poplevel.
5757 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
5758 if we're in a template.
5760 2001-12-12 Jakub Jelinek <jakub@redhat.com>
5762 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
5763 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
5764 THIS_NAME_P): Delete.
5765 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
5766 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
5767 with internal naming scheme.
5768 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
5770 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
5772 * decl.c (grokdeclarator): Deprecated implicit typename use.
5774 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
5777 * parse.y (frob_specs): Indicate it is a language linkage which
5778 contained the extern.
5779 * decl.c (grokdeclarator): Allow extern language linkage with
5782 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
5785 * decl.c (add_binding): Don't reject duplicate typedefs involving
5786 template parameters.
5788 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
5790 * parse.y, semantics.c: Similarly.
5792 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
5795 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
5796 (copy_args_p): Rename to ...
5797 (copy_fn_p): ... here.
5798 (grok_special_member_properties): New function.
5799 (grok_op_properties): Lose VIRTUALP parameter.
5800 (copy_assignment_arg_p): Remove.
5801 * call.c (build_over_call): Use copy_fn_p.
5802 * decl.c (grokfndecl): Reformat. Adjust call to
5804 (copy_args_p): Rename to ...
5805 (copy_fn_p): ... here. Reject template functions. Check for pass
5807 (grok_special_member_properties): Remember special functions.
5808 (grok_ctor_properties): Don't remember them here, just check.
5809 (grok_op_properties): Likewise.
5810 (start_method): Call grok_special_member_properties.
5811 * decl2.c (grokfield): Likewise.
5812 (copy_assignment_arg_p): Remove.
5813 (grok_function_init): Don't remember abstract assignment here.
5814 * pt.c (instantiate_class_template): Call
5815 grok_special_member_properties.
5816 (tsubst_decl): Adjust grok_op_properties call.
5818 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
5820 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
5821 RID_TYPES_COMPATIBLE_P.
5823 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
5825 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
5826 call to build_aggr_init.
5827 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
5829 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
5831 * parse.y: Replace uses of the string non-terminal with STRING.
5832 Don't perform string concatentaion here.
5833 (string): Remove non-terminal.
5834 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
5836 2001-12-05 Jason Merrill <jason@redhat.com>
5838 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
5839 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
5840 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
5841 * pt.c (push_tinst_level): No longer static.
5842 * cp-tree.h: Declare them.
5844 * init.c (resolve_offset_ref): Don't check access for the base
5845 conversion to access a FIELD_DECL.
5847 * cp-tree.h (TYPE_REFFN_P): New macro.
5848 * decl.c (bad_specifiers): Check it, too.
5850 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
5851 on the __*_type_info type if we haven't seen a definition.
5853 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
5855 * decl.c: Include c-common.h.
5856 (shadow_warning): Move to c-common.c.
5858 Wed Dec 5 17:00:49 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5860 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
5862 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
5864 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
5866 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
5869 * init.c (sort_base_init): Allow binfos to be directly specified.
5870 * method.c (do_build_copy_constructor): Explicitly convert to the
5872 (do_build_assign_ref): Likewise.
5874 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
5876 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
5877 declaration and initialization.
5879 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
5881 * typeck2.c: Remove leading capital from diagnostic messages, as
5882 per GNU coding standards.
5884 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
5887 * decl.c (xref_basetypes): Handle attributes between
5890 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
5893 * parse.y (named_complex_class_head_sans_basetype): Add new
5895 * Make-lang.in (parse.c): Adjust expected conflict count.
5897 2001-12-03 Jason Merrill <jason@redhat.com>
5899 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
5900 immediate binfos for our virtual bases.
5902 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
5904 * call.c (build_java_interface_fn_ref): Similarly.
5905 * except.c (is_admissible_throw_operand): Similarly.
5906 * init.c (build_java_class_ref): Similarly.
5907 * xref.c (open_xref_file): Similarly.
5909 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
5911 * class.c (finish_struct): Remove trailing periods from messages.
5912 * decl.c (check_tag_decl): Similarly.
5913 * lex.c (cxx_set_yydebug): Similarly.
5914 * typeck2.c (friendly_abort): Similarly.
5916 2001-11-29 Mark Mitchell <mark@codesourcery.com>
5919 * cp-tree.h (ovl_member): Remove.
5920 * decl2.c (merge_functions): Handle extern "C" functions
5922 * tree.c (ovl_member): Remove.
5924 2001-11-29 Mark Mitchell <mark@codesourcery.com>
5927 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
5928 FUNCTION_DECL, as input.
5929 (mark_overriders): Remove.
5930 (warn_hidden): Rework for the new ABI.
5932 2001-11-29 Mark Mitchell <mark@codesourcery.com>
5935 * call.c (convert_like_real): Do not build additional temporaries
5936 for rvalues of class type.
5938 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
5940 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
5941 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
5942 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
5943 (DERIVED_FROM_P): Likewise.
5944 (enum base_access): Renumber, add ba_quiet bit mask.
5945 (get_binfo): Remove.
5946 (get_base_distance): Remove.
5947 (binfo_value): Remove.
5948 (ACCESSIBLY_DERIVED_FROM_P): Remove.
5949 * call.c (standard_conversion): Use lookup_base.
5950 * class.c (strictly_overrides): Likewise.
5951 (layout_virtual_bases): Likewise.
5952 (warn_about_ambiguous_direct_bases): Likewise.
5953 (is_base_of_enclosing_class): Likewise.
5954 (add_vcall_offset_vtbl_entries_1): Likewise.
5955 * cvt.c (build_up_reference): Adjust comment.
5956 * init.c (build_member_call): Reformat.
5957 * search.c (get_binfo): Remove.
5958 (get_base_distance_recursive): Remove.
5959 (get_base_distance): Remove.
5960 (lookup_base_r): Tweak.
5961 (lookup_base): Add ba_quiet control. Complete the types here.
5962 (covariant_return_p): Use lookup_base.
5963 * tree.c (binfo_value): Remove.
5964 (maybe_dummy_object): Use lookup_base.
5965 * typeck.c (build_static_cast): Use lookup_base.
5966 (get_delta_difference): Likewise.
5967 * typeck2.c (binfo_or_else): Use lookup_base.
5968 (build_scoped_ref): Add back error_mark_check.
5969 (build_m_component_ref): Use lookup_base.
5971 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
5973 * Make-lang.in (c++.generated-manpages): New dummy target.
5975 Tue Nov 27 09:03:47 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5977 * Make-lang.in (cp-lang.o): Depends on c-common.h.
5978 * cp-lang.c (c-common.h): Include.
5979 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
5980 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
5981 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
5983 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
5985 * decl2.c (c_language): Move to c-common.c.
5986 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
5990 2001-11-26 Jason Merrill <jason@redhat.com>
5992 * call.c (joust): Remove COND_EXPR hack.
5994 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
5996 * search.c (lookup_base_r): Declare bk in variable declaration
5999 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
6002 * class.c (build_vbase_pointer): Remove.
6003 (build_vbase_path): Remove.
6004 (build_base_path): New function.
6005 * cp-tree.h (base_access, base_kind): New enumerations.
6006 (build_base_path): Declare.
6007 (convert_pointer_to_real): Remove.
6008 (convert_pointer_to): Remove.
6009 (lookup_base): Declare.
6010 (convert_pointer_to_vbase): Remove.
6011 * call.c (build_scoped_method_call): Use lookup_base &
6012 build_base_path instead of convert_pointer_to_real,
6013 get_base_distance & get_binfo.
6014 (build_over_call): Likewise.
6015 * cvt.c (cp_convert_to_pointer): Likewise.
6016 (convert_to_pointer_force): Likewise.
6017 (build_up_reference): Likewise.
6018 (convert_pointer_to_real): Remove.
6019 (convert_pointer_to): Remove.
6020 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
6021 instead of convert_pointer_to_vbase & build_vbase_path.
6022 (emit_base_init): Use build_base_path instead of
6023 convert_pointer_to_real.
6024 (expand_virtual_init): Lose unrequired conversions.
6025 (resolve_offset_ref): Use lookup_base and build_base_path
6026 instead of convert_pointer_to.
6027 * rtti.c (build_dynamic_cast_1): Use lookup_base &
6028 build_base_path instead of get_base_distance & build_vbase_path.
6029 * search.c (get_vbase_1): Remove.
6030 (get_vbase): Remove.
6031 (convert_pointer_to_vbase): Remove.
6032 (lookup_base_r): New function.
6033 (lookup_base): New function.
6034 * typeck.c (require_complete_type): Use lookup_base &
6035 build_base_path instead of convert_pointer_to.
6036 (build_component_ref): Likewise.
6037 (build_x_function_call): Likewise.
6038 (get_member_function_from_ptrfunc): Likewise.
6039 (build_component_addr): Likewise.
6040 * typeck2.c (build_scoped_ref): Likewise.
6042 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
6044 * cp-tree.h (CP_TYPE_QUALS): Removed.
6045 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
6046 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
6047 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
6048 * dump.c (cp_dump_tree): Use void* dump_info argument to match
6049 lang-hooks prototype.
6050 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
6051 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
6052 CP_TYPE_QUALS changed to cp_type_quals.
6053 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
6054 (CXX_C_OBJS): Remove c-dump.o.
6056 2001-11-21 Mark Mitchell <mark@codesourcery.com>
6059 * pt.c (lookup_template_class): Ensure that all specializations
6060 are registered on the list corresponding to the most general
6063 2001-11-20 Mark Mitchell <mark@codesourcery.com>
6065 * call.c (non_reference): Add documentation.
6066 (convert_class_to_reference): Do not strip reference types
6067 from conversion operators.
6068 (maybe_handle_ref_bind): Simplify.
6069 (compare_ics): Correct handling of references.
6071 2001-11-19 John Wilkinson <johnw@research.att.com>
6073 * dump.c (dump_op): New function.
6074 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
6075 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
6076 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
6078 2001-11-19 Mark Mitchell <mark@codesourcery.com>
6081 * semantics.c (finish_sizeof): Make sure that expression created
6082 while processing a template do not have a type.
6083 (finish_alignof): Likewise.
6084 * typeck.c (c_sizeof): Likewise.
6085 (expr_sizeof): Likewise.
6087 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
6089 * lex.c (cxx_finish): Call c_common_finish.
6090 (finish_parse): Remove.
6092 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6094 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
6095 when displaying error message about missing array bounds.
6097 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6099 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
6101 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
6103 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
6105 * cp-tree.h (print_class_statistics): Restore.
6107 2001-11-15 Jason Merrill <jason@redhat.com>
6109 * method.c (use_thunk): Don't emit debugging information for thunks.
6111 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
6112 * decl.c (make_typename_type): Handle getting a class template.
6113 * search.c (lookup_field_r): A class template is good enough for
6116 * call.c (convert_like_real): Only use cp_convert for the bad part.
6117 (standard_conversion): Also allow bad int->enum.
6118 * typeck.c (ptr_reasonably_similar): Also allow functions to
6119 interconvert. Pointers to same-size integers are reasonably
6122 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
6125 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
6128 * init.c (sort_base_init): Remove unreachable code.
6129 (expand_member_init): Adjust comment to reflect reality. Simplify
6130 and remove unreachable code.
6132 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
6134 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
6135 (cxx_init): Update prototype.
6136 * decl.c (init_decl_processing): Rename. Move null node init
6137 to its creation time.
6138 * lex.c (cxx_init_options): Update.
6139 (cxx_init): Combine with old init_parse; also call
6140 cxx_init_decl_processing.
6142 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
6144 * decl.c (check_initializer): Try to complete the type of an
6145 array element before checking whether it's complete. Don't
6146 complain about arrays with complete element types but an
6148 (cp_finish_decl): Build the hierarchical constructor before
6149 calling maybe_deduce_size_from_array_init.
6151 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
6153 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
6155 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
6158 * parse.y (already_scoped_stmt): Remove.
6159 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
6161 2001-11-12 H.J. Lu <hjl@gnu.org>
6163 * cvt.c (ocp_convert): Don't warn the address of a weak
6164 function is always `true'.
6166 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
6168 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
6169 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
6170 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
6171 * cp-tree.h (print_class_statistics): Remove.
6172 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
6173 cxx_print_identifier, cxx_set_yydebug): New.
6174 * lex.c (set_yydebug): Rename c_set_yydebug.
6175 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
6176 lang_print_xnode): Rename.
6177 * tree.c (print_lang_statistics): Rename.
6179 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6181 * class.c (dump_array): Fix format specifier warning.
6183 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
6185 * cp-lang.c (LANG_HOOKS_NAME): Override.
6186 (struct lang_hooks): Constify.
6187 * lex.c (cxx_init_options): Update.
6188 (lang_identify): Remove.
6189 * parse.y (language_string): Remove.
6191 2001-11-08 Andreas Franck <afranck@gmx.de>
6193 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
6194 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
6195 suggested by autoconf.
6196 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
6197 (c++.install-common): Use the transformed target alias names.
6199 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
6201 * Make-lang.in: Update.
6202 * cp-lang.c: Include langhooks-def.h.
6204 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6206 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
6208 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6210 * lex.c (copy_lang_type): Add static prototype.
6212 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6214 * pt.c (unify): Handle SCOPE_REF.
6216 2001-11-01 Jakub Jelinek <jakub@redhat.com>
6218 * tree.c (cp_copy_res_decl_for_inlining): Adjust
6219 DECL_ABSTRACT_ORIGIN for the return variable.
6221 2001-10-31 Zack Weinberg <zack@codesourcery.com>
6223 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
6225 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
6227 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
6228 semantics.c, spew.c: Fix spelling errors.
6230 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6232 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
6234 2001-10-25 Zack Weinberg <zack@codesourcery.com>
6236 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
6239 Tue Oct 23 14:00:20 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6241 * cp-lang.c (cxx_get_alias_set): New function.
6242 Point LANG_HOOKS_GET_ALIAS_SET to it.
6244 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6246 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
6247 * cp-tree.h (make_unbound_class_template): Prototype new function.
6248 * decl.c (make_unbound_class_template): New function.
6249 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
6250 * error.c (dump_type): Likewise.
6251 * mangle.c (write_type): Likewise.
6252 * parse.y (template_parm): Likewise.
6253 (template_argument): Use make_unbound_class_template.
6254 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
6256 (tsubst_copy): Likewise.
6258 * tree.c (walk_tree): Likewise.
6259 * typeck.c (comptypes): Likewise.
6261 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6263 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
6264 extra calls into fewer ones.
6266 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
6268 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
6269 Warn when merging inline with attribute noinline.
6270 (start_decl, start_function): Warn if inline and attribute
6271 noinline appear in the same declaration.
6273 2001-10-16 H.J. Lu <hjl@gnu.org>
6275 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
6276 for tree checking disabled.
6278 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
6280 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
6281 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
6283 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
6285 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
6286 (unify): Only handle MINUS_EXPR specially if the above flag is set
6287 and the subtracted constant is 1. Clear the flag on recursive calls.
6288 Set it when unifying the maximum value in an INTEGER_TYPE's range.
6290 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
6292 * decl.c (bad_specifiers): Don't allow exception specifications
6295 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
6297 * cp/lex.c (init_cp_pragma): Similarly.
6299 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6301 * pt.c (lookup_template_class): Build complete template arguments
6302 for BOUND_TEMPLATE_TEMPLATE_PARM.
6304 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6306 * cp-tree.h (TYPE_BINFO): Update comment.
6307 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
6308 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
6309 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
6310 (copy_type): Prototype new function.
6311 * lex.c (copy_lang_decl): Gather tree node statistics.
6312 (copy_lang_type): New function.
6313 (copy_type): Likewise.
6314 (cp_make_lang_type): Create lang_type for
6315 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
6316 and BOUND_TEMPLATE_TEMPLATE_PARM.
6317 * pt.c (tsubst): Use copy_type instead of copy_node.
6318 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
6320 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6322 * pt.c (determine_specialization): Ignore functions without
6325 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
6328 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
6330 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
6332 * typeck2.c (store_init_value): Don't re-digest a bracketed
6335 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
6338 2001-10-11 Richard Henderson <rth@redhat.com>
6340 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
6341 of an asm statement.
6342 (build_vtbl_ref_1): Split out from build_vtbl_ref.
6343 (build_vfn_ref): Use it to handle vtable descriptors before
6344 calling build_vtable_entry_ref.
6345 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
6347 2001-10-10 Richard Henderson <rth@redhat.com>
6349 * parse.y (asm_operand): Allow named operands.
6350 * semantics.c (finish_asm_stmt): Tweek for changed location
6351 of the operand constraint.
6353 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
6355 * call.c (standard_conversion): Add bad conversion between
6356 integers and pointers.
6357 (convert_like_real): Don't use convert_for_initialization for bad
6358 conversions; complain here and use cp_convert.
6359 (build_over_call): Don't handle bad conversions specially.
6360 (perform_implicit_conversion): Allow bad conversions.
6361 (can_convert_arg_bad): New fn.
6362 * cp-tree.h: Declare it.
6363 * typeck.c (convert_for_assignment): Use it.
6364 (ptr_reasonably_similar): Any target type is similar to void.
6366 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
6368 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
6369 (cp/cp-lang.o): New rule.
6370 * cp-tree.h: Declare hooks.
6371 * tree.c: Make hooks non-static.
6372 (init_tree): Don't initialize hooks here.
6373 * lex.c: Likewise. Move definition of lang_hooks to...
6374 * cp-lang.c: ... new file.
6376 2001-10-08 Richard Henderson <rth@redhat.com>
6378 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
6379 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
6381 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6383 * class.c (build_vtable_entry_ref): Const-ify.
6384 * decl.c (predefined_identifier,
6385 initialize_predefined_identifiers): Likewise.
6386 * init.c (build_new_1): Likewise.
6387 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
6390 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
6392 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
6393 (INSNS_PER_STMT): Likewise.
6394 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
6395 (copy_body, initialize_inlined_parameters): Likewise.
6396 (declare_return_variable, inlinable_function_p): Likewise.
6397 (expand_call_inline, expand_calls_inline): Likewise.
6398 (optimize_inline_calls, clone_body): Likewise.
6399 * tree.c (walk_tree): Moved to ../tree-inline.c.
6400 (walk_tree_without_duplicates): Likewise.
6401 (copy_tree_r, remap_save_expr): Likewise.
6403 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
6405 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
6406 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
6407 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
6408 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
6409 (flag_inline_trees): Moved declaration to ../tree-inline.h.
6410 (walk_tree): Moved declaration to ../tree-inline.h.
6411 (walk_tree_without_duplicates, copy_tree_r): Likewise.
6412 (remap_save_expr): Likewise.
6413 * decl.c: Include tree-inline.h.
6414 (lang_mark_tree): Don't mark inlined_fns.
6415 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
6416 * optimize.c: Include tree-inline.h.
6417 (optimize_inline_calls): Move declaration to ../tree.h, as
6419 (remap_decl): Use language-independent constructs and hooks.
6420 (remap_block, copy_body_r, declare_return_variable): Likewise.
6421 (inlinable_function_p): Likewise. Don't test for
6422 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
6423 no longer language-specific.
6424 (optimize_inline_calls): Likewise. Make it non-static. Moved
6425 call of dump_function to...
6426 (optimize_function): Here...
6427 (clone_body): New function, extracted from...
6428 (maybe_clone_body): ... here. Build decl_map locally and pass
6429 it on to clone_body.
6430 * pt.c, semantics.c: Include tree-inline.h.
6432 (cp_walk_subtrees): New language-specific hook for tree inlining.
6433 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
6434 cp_is_overload_p, cp_auto_var_in_fn_p,
6435 cp_copy_res_decl_for_inlining): Likewise.
6436 (walk_tree): Move language-specific constructs into...
6437 (cp_walk_subtrees): this new function.
6438 (copy_tree_r): Use language-independent constructs and hooks.
6439 (init_tree): Initialize tree inlining hooks.
6440 (remap_save_expr): Adjust prototype so that the declaration
6441 does not require the definition of splay_tree.
6443 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
6445 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
6446 to build the declaration instead of the declaration itself.
6448 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
6450 * decl2.c (cxx_decode_option): Add 'else'.
6452 * spew.c (end_input): No longer static.
6453 * cp-tree.h: Declare it.
6454 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
6456 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
6458 * call.c (build_over_call), typeck.c (build_function_call_real):
6459 Pass type attributes to check_function_format rather than name or
6460 assembler name. Don't require there to be a name or assembler
6461 name to check formats.
6463 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
6465 * decl.c (init_decl_processing): Don't call
6466 init_function_format_info. Initialize lang_attribute_table
6468 (builtin_function): Call decl_attributes.
6469 (insert_default_attributes): New.
6471 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
6473 * decl.c (grokdeclarator): Copy array typedef handling from C
6476 * decl.c (grokdeclarator): Copy too-large array handling from C
6479 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
6481 * config-lang.in (target_libs): Added target-gperf, so that we
6482 don't try to build it if C++ is disabled.
6484 2001-09-23 Zack Weinberg <zack@codesourcery.com>
6486 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
6487 (cp/errfn.o): Delete rule.
6488 (cp/error.o): Depend on flags.h.
6489 * errfn.c: Delete file.
6490 * cp-tree.h: Declare warn_deprecated. Remove definitions of
6491 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
6492 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
6493 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
6494 internal_error respectively. Make cp_deprecated into a macro.
6495 Don't define cp_printer typedef or declare cp_printers.
6496 * error.c: Include flags.h.
6497 Delete: struct tree_formatting_info, print_function_argument_list,
6498 print_declaration, print_expression, print_function_declaration,
6499 print_function_parameter, print_type_id, print_cv_qualifier_seq,
6500 print_type_specifier_seq, print_simple_type_specifier,
6501 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
6502 print_parameter_declaration_clause, print_exception_specification,
6503 print_nested_name_specifier, and definition of cp_printers.
6504 (locate_error): New function.
6505 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
6506 rewritten in terms of locate_error and diagnostic.c.
6507 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
6508 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
6509 (init_error): Adjust to match.
6511 Sat Sep 22 09:15:31 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6513 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
6515 2001-09-21 Richard Henderson <rth@redhat.com>
6517 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
6518 (build_vtbl_initializer): Likewise.
6519 (build_vfn_ref): New.
6520 * cp-tree.h: Declare it.
6521 * call.c (build_over_call): Use it.
6522 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
6523 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
6525 Fri Sep 21 08:16:19 2001 J"orn Rennecke <amylaar@redhat.com>
6527 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
6529 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
6531 Table-driven attributes.
6532 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
6533 * decl2.c (cplus_decl_attributes): Only take one attributes
6535 * cp-tree.c (cplus_decl_attributes): Update prototype.
6536 * class.c (finish_struct), decl.c (start_decl, start_function),
6537 decl2.c (grokfield), friend.c (do_friend), parse.y
6538 (parse_bitfield): Update calls to cplus_decl_attributes.
6539 * decl.c (grokdeclarator): Take a pointer to a single ordinary
6541 * decl.h (grokdeclarator): Update prototype.
6542 * decl2.c (grokfield): Take a single ordinary attribute list.
6543 * friend.c (do_friend): Likewise.
6544 * decl.c (shadow_tag, groktypename, start_decl,
6545 start_handler_parms, grokdeclarator, grokparms, start_function,
6546 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
6547 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
6548 (process_template_parm, do_decl_instantiation): Pass single
6549 ordinary attribute lists around.
6550 * decl.c (grokdeclarator): Correct handling of nested attributes.
6552 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
6553 * decl.c (grokdeclarator): Embedded attrs bind to the right,
6556 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
6557 (cp_attribute_table): Declare.
6558 * decl.c (valid_lang_attribute): Don't define.
6559 (lang_attribute_table): Define.
6560 (init_decl_processing): Initialize lang_attribute_table instead of
6561 valid_lang_attribute.
6562 * tree.c (cp_valid_lang_attribute): Remove.
6563 (handle_java_interface_attribute, handle_com_interface_attribute,
6564 handle_init_priority_attribute): New functions.
6565 (cp_attribute_table): New array.
6566 * decl2.c (import_export_class): Don't use
6567 targetm.valid_type_attribute.
6569 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
6571 * Make-lang.in (cp/error.o): Depend on real.h
6572 * error.c: #include "real.h"
6574 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6576 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
6577 xmalloc/strcpy/strcat.
6579 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6581 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
6583 * pt.c (tsubst_decl): Likewise.
6585 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6587 * decl2.c (lang_f_options): Const-ification.
6588 * lex.c (cplus_tree_code_name): Likewise.
6589 * spew.c (yyerror): Likewise.
6591 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
6594 * class.c (force_canonical_binfo_r): Check & move an indirect
6596 (force_canonical_binfo): Check that it's not already
6598 (mark_primary_virtual_base): Remove BINFO parameter.
6599 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
6601 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
6603 Remove TYPE_NONCOPIED_PARTS.
6604 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
6605 CLASSTYPE_PURE_VIRTUALS.
6606 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
6607 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
6608 (layout_class_type): Don't call fixup_inline_methods here ...
6609 (finish_struct_1): ... call it here.
6611 2001-09-04 Mark Mitchell <mark@codesourcery.com>
6613 * decl.c (duplicate_decls): Remove code deadling with
6615 * decl2.c (finish_file): Likewise.
6616 * pt.c (instantiate_decl): Likewise.
6617 * semantics.c (expand_body): Don't defer local functions if
6618 they wouldn't be deferred for some other reason. Don't
6619 generate RTL for functions that will not be emitted.
6620 (genrtl_start_function): Remove code deadling with
6622 (genrtl_finish_function): Likewise.
6624 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
6627 * call.c (build_over_call): Do not optimize any empty base
6630 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6632 * error.c (dump_template_decl): Output template parameters
6633 together with their specifiers.
6634 Output `class' prefix for template template parameter.
6635 (dump_decl): Fix formatting.
6637 2001-08-30 Kurt Garloff <garloff@suse.de>
6639 * optimize.c (inlinable_function_p): Allow only smaller single
6640 functions. Halve inline limit after reaching recursive limit.
6642 2001-08-30 Joern Rennecke <amylaar@redhat.com>
6643 Jason Merrill <jason_merrill@redhat.com>
6645 * class.c (build_vtable_entry_ref): Subtract in char*, not
6648 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
6650 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
6651 (build_cplus_array_type): Use cp_build_qualified_type, not
6652 TYPE_MAIN_VARIANT, to get an unqualified version.
6654 * decl2.c (grok_alignof): Lose.
6655 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
6656 * typeck.c (c_alignof): Lose.
6657 * semantics.c (finish_sizeof, finish_alignof): New.
6658 * parse.y: Use them.
6659 * cp-tree.h: Declare them.
6661 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
6663 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
6664 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
6665 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
6667 2001-08-19 Jakub Jelinek <jakub@redhat.com>
6669 * typeck2.c (add_exception_specifier): Only require complete type if
6670 not in processing template declaration.
6672 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6674 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
6675 GNU_xref_start_scope and GNU_xref_end_scope.
6677 * tree.c (TYPE_HASH): Moved to ../tree.h.
6679 2001-08-16 Mark Mitchell <mark@codesourcery.com>
6681 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
6684 2001-08-14 Richard Henderson <rth@redhat.com>
6686 * class.c, cp-tree.h (build_vfn_ref): Remove.
6687 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
6689 2001-08-13 Mark Mitchell <mark@codesourcery.com>
6691 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
6692 empty class assignment as having side-effects to avoid
6695 2001-08-13 Zack Weinberg <zackw@panix.com>
6697 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
6698 * except.c: Include libfuncs.h.
6700 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
6702 * decl.c (grokdeclarator): Clarify diagnostic message.
6704 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6706 * decl2.c (do_nonmember_using_decl): Replace using directive
6707 with using declaration in the error message.
6709 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6711 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
6712 criterion to avoid rebuilding expression tree instead of
6713 processing_template_decl.
6715 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
6717 Support named return value optimization for inlines, too.
6718 * decl.c (finish_function): Nullify returns here.
6719 * semantics.c (genrtl_start_function): Not here.
6720 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
6721 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
6722 Also nullify the CLEANUP_STMT for the nrv.
6723 * cp-tree.h: Declare it.
6724 * optimize.c (declare_return_variable): Replace the nrv with the
6726 * typeck.c (check_return_expr): Be more flexible on alignment check.
6727 Ignore cv-quals when checking for a matching type.
6729 2001-08-09 Richard Henderson <rth@redhat.com>
6731 * decl2.c (finish_objects): Use target hooks instead of
6732 assemble_constructor and assemble_destructor.
6734 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
6736 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
6738 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
6741 Stop using TYPE_NONCOPIED_PARTS.
6742 * call.c (build_over_call): Be careful when copy constructing
6743 or assigning to an empty class.
6744 * class.c (check_bases_and_members): It has a
6745 COMPLEX_ASSIGN_REF if it has a vptr.
6746 (layout_class_type): Don't add empty class padding to
6747 TYPE_NONCOPIED_PARTS.
6748 (finish_struct_1): Don't add the VFIELD either.
6749 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
6752 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
6754 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
6756 2001-08-06 Richard Henderson <rth@redhat.com>
6758 * decl2.c (finish_objects): Pass a symbol_ref and priority to
6759 assemble_{constructor,destructor}. Remove priority handling.
6761 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
6763 Don't allow template-id in using-declaration.
6764 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
6765 (do_class_using_decl): Likewise.
6767 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
6769 * cp/spew.c (read_token): No need to pop buffers.
6771 2001-08-02 Stan Shebs <shebs@apple.com>
6773 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
6774 (fnaddr_from_vtable_entry): Remove decl.
6775 * method.c (use_thunk): Update comment.
6777 2001-08-01 Andrew Cagney <ac131313@redhat.com>
6779 * repo.c (get_base_filename): Change return value to const char
6782 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
6786 * cp-tree.h (flag_honor_std): Remove.
6787 (CPTI_FAKE_STD): Remove.
6788 (std_node): Remove comment about it being NULL.
6789 (fake_std_node): Remove.
6790 * decl.c (in_fake_std): Remove.
6791 (walk_namespaces_r): Remove fake_std_node check.
6792 (push_namespace): Remove in_fake_std code.
6793 (pop_namespace): Likewise.
6794 (lookup_name_real): Remove fake_std_node check.
6795 (init_decl_processing): Always create std_node. Always add
6797 (builtin_function): Always put non '_' fns in std.
6798 * decl2.c (flag_honor_std): Remove.
6799 (lang_f_options): Remove honor-std.
6800 (unsupported_options): Add honor-std.
6801 (set_decl_namespace): Remove fake_std_node check.
6802 (validate_nonmember_using_decl): Likewise.
6803 (do_using_directive): Likewise.
6804 (handle_class_head): Likewise.
6805 * dump.c (cp_dump_tree): Likewise.
6806 * except.c (init_exception_processing): Adjust.
6807 * init.c (build_member_call): Remove fake_std_node check.
6808 (build_offset_ref): Likewise.
6809 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
6810 * rtti.c (init_rtti_processing): Adjust.
6812 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
6814 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
6815 operand while calling cp_tree_equal.
6817 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
6819 The 3.0 ABI no longer has vbase pointer fields.
6820 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
6821 FORMAT_VBASE_NAME): Remove.
6822 * method.c (do_build_copy_constructor): Adjust.
6823 (do_build_assign_ref): Adjust.
6824 * search.c (lookup_field_r): Adjust.
6825 * typeck.c (build_component_ref): Adjust.
6827 The 3.0 ABI always has a vtable pointer at the start of every
6829 * rtti.c (build_headof_sub): Remove.
6830 (build_headof): Adjust.
6831 (get_tinfo_decl_dynamic): No need to check flag_rtti
6833 (create_real_tinfo_var): Explain why we need a hidden name.
6835 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
6838 * class.c (update_vtable_entry_for_fn): The fixed adjustment
6839 of a virtual thunk should be from declaring base.
6841 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
6843 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
6844 the shared virtual base, so preserving inheritance graph order.
6846 2001-07-30 Andreas Jaeger <aj@suse.de>
6848 * decl2.c: Remove unused var global_temp_name_counter.
6850 2001-07-28 Richard Henderson <rth@redhat.com>
6852 * method.c (pending_inlines): Remove.
6854 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
6856 * class.c (mark_primary_virtual_base): Don't adjust base
6858 (dfs_unshared_virtual_bases): Adjust them here.
6859 (mark_primary_bases): Explain why we adjust at the end.
6861 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
6863 * class.c (finish_struct_1): When copying the primary base's
6864 VFIELD, make sure we find it is at offset zero.
6866 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6868 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
6869 tsubst_expr for default template arguments.
6871 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
6874 * spew.c (yylex): Only copy the token's lineno, if it is
6877 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
6880 * call.c (resolve_args): Simplify, call
6881 convert_from_reference.
6882 (build_new_op): Resolve and convert from reference ARG1
6883 earlier. Adjust ARG2 & ARG3 resolve and conversion.
6885 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
6887 * decl.c (last_function_parm_tags): Remove.
6888 (current_function_parm_tags): Remove.
6889 (init_decl_processing): Adjust.
6890 (start_function): Adjust.
6891 (store_parm_decls): Adjust.
6894 * decl.c (grokdeclarator): Detect when a function typedef is
6895 declaring a function, and create last_function_parms correctly.
6897 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
6899 * call.c (joust): Only prefer a non-builtin candidate to a builtin
6900 one if they have the same signature.
6902 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
6903 it rather than toplevel_bindings_p. Give it a mangled name if static.
6904 (convert_to_reference): Adjust.
6905 * decl2.c (get_temp_name): Lose.
6906 * mangle.c (mangle_ref_init_variable): New fn.
6907 (mangle_guard_variable): Strip the ref-init header.
6908 * cp-tree.h: Adjust.
6909 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
6911 (grok_reference_init): Always use DECL_INITIAL.
6913 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
6916 * call.c (build_conditional_expr): Recheck args after
6918 * cp-tree.h (build_conditional_expr): Move to correct file.
6919 * typeck.c (decay_conversion): Diagnose any unknown types
6921 (build_binary_op): Don't do initial decay or default
6922 conversions on overloaded functions.
6923 (build_static_cast): Don't do a decay conversion here.
6925 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
6928 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
6929 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
6931 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
6933 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
6934 (create_vtbl_ptr): ... here.
6936 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
6938 * class.c (build_vbase_offset_vbtl_entries): Look for
6939 non-primary base of which we are a sub vtable.
6941 2001-07-24 Phil Edwards <pme@sources.redhat.com>
6943 * semantics.c (finish_this_expr): Remove unused code.
6945 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
6947 Simplify rtti, now we've only one ABI.
6948 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
6950 (tinfo_decl_id, tinfo_var_id): Remove.
6951 (get_typeid_1): Remove.
6953 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
6954 (typeid_ok_p): New function.
6955 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
6956 (get_tinfo_decl): Remove old abi documentation.
6957 (tinfo_from_decl): Remove.
6958 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
6959 (get_typeid_1): Remove.
6960 (get_base_offset): Remove.
6961 (synthesize_tinfo_var): Absorb get_base_offset.
6962 (create_real_tinfo_var): Don't use tinfo_decl_id.
6964 2001-07-23 Graham Stott <grahams@redhat.com>
6966 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
6967 variable has_two_argument_delete_p.
6969 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
6971 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
6972 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
6973 (CPTI_INDEX_IDENTIFIER): Remove.
6974 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
6975 (delta2_identifier): Remove.
6976 (index_identifier): Remove.
6977 (pfn_or_delta2_identifier): Remove.
6978 (flag_vtable_thunks): Remove.
6979 (VTABLE_DELTA2_NAME): Remove.
6980 (VTABLE_INDEX_NAME): Remove.
6981 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
6982 (vfunc_ptr_type_node): Adjust.
6983 (VTABLE_NAME_PREFIX): Adjust.
6984 (build_vfn_ref): Lose first parameter.
6985 (fixup_all_virtual_upcast_offsets): Remove.
6986 * decl.c (initialize_predefined_identifiers): Remove
6987 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
6988 (init_decl_processing): Remove no-vtable-thunk code.
6989 * decl2.c (flag_vtable_thunks): Remove.
6990 (mark_vtable_entries): Remove no-vtable-thunk code.
6991 * error.c (dump_decl): Remove no-vtable-thunk code.
6992 (dump_expr): Adjust ptr to member function code.
6993 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
6995 * rtti.c (build_headof): Remove no-vtable-thunk code.
6996 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
6997 * search.c (get_base_distance): Remove expand_upcast_fixups case.
6998 (virtual_context) Remove.
6999 (expand_upcast_fixups): Remove.
7000 (fixup_virtual_upcast_offsets): Remove.
7001 (fixup_all_virtual_upcast_offsets): Remove.
7002 * typeck.c (get_member_function_from_ptrfunc): Remove
7003 no-vtable-thunk code.
7004 * call.c (build_over_call): Adjust call to build_vfn_ref.
7005 * class.c (build_vfn_ref): Lose first parameter. Remove
7006 no-vtable-thunk code.
7007 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
7008 (build_vtable_entry): Remove no-vtable-thunk code.
7010 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
7012 Remove old-abi remnants. Remove comments about old abi
7013 behavior. Remove references to 'new-abi' in comments.
7014 * cp-tree.h: Adjust comments.
7015 (vbase_offsets_in_vtable_p): Delete.
7016 (vcall_offsets_in_vtable_p): Delete.
7017 (vptrs_present_everywhere_p): Delete.
7018 (all_overridden_vfuns_in_vtables_p): Delete.
7019 (merge_primary_and_secondary_vtables_p): Delete.
7020 (TYPE_CONTAINS_VPTR_P): Adjust.
7021 (VTT_NAME_PREFIX): Remove.
7022 (CTOR_VTBL_NAME_PREFIX): Remove.
7023 (init_vbase_pointers): Remove.
7024 * class.c: Adjust coments.
7025 (build_vbase_pointer_fields): Delete.
7026 (build_vbase_pointer): Remove old-abi code.
7027 (build_secondary_vtable): Likewise.
7028 (modify_all_vtables): Likewise.
7029 (create_vtable_ptr): Likewise.
7030 (layout_class_type): Likewise.
7031 (finish_struct_1): Likewise.
7032 (finish_vtbls): Likewise.
7033 (dfs_finish_vtbls): Delete.
7034 (build_vbase_offset_vtbl_entries): Remove old-abi code.
7035 * cvt.c: Adjust comments.
7036 * decl.c: Adjust comments.
7037 * decl2.c: Adjust comments.
7038 * init.c: Adjust comments.
7039 (construct_virtual_bases): Remove old-abi code.
7040 * lang-specs.h: Remove -fno-new-abi.
7041 * mangle.c: Adjust comments.
7042 * rtti.c: Adjust comments.
7043 (get_base_offset): Remove old-abi-code.
7044 * search.c: Adjust comments.
7045 (dfs_init_vbase_pointers): Remove.
7046 (dfs_vtable_path_unmark): Remove.
7047 (init_vbase_pointers): Remove.
7048 * semantics.c: Adjust comments.
7049 (emit_associated_thunks): Remove old-abi code.
7050 * typeck.c: Adjust comments.
7052 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
7054 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
7057 2001-07-19 Mark Mitchell <mark@codesourcery.com>
7059 * class.c (finish_struct_anon): Forbid nested classes.
7061 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
7063 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
7064 * optimize.c: Include debug.h.
7065 (maybe_clone_body): Use debug hook.
7066 * semantics.c: Include debug.h.
7067 (expand_body): Use debug hook.
7069 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
7071 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
7073 2001-07-18 Mark Mitchell <mark@codesourcery.com>
7075 * class.c (type_requires_array_cookie): New function.
7076 (check_methods): Don't try to figure out whether the type needs a
7078 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
7079 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
7080 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
7081 * pt.c (instantiate_class_template): Don't set
7082 TYPE_VEC_DELETE_TAKES_SIZE.
7083 * NEWS: Document ABI changes from GCC 3.0.
7085 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
7086 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
7088 * NEWS (Changes in GCC 3.0): Fix typo.
7090 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
7092 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
7093 which attributes are to be attached, and a flags argument. Update
7094 call to decl_attributes.
7095 (grokfield): Update call to decl_attributes.
7096 * class.c (finish_struct): Update call to cplus_decl_attributes.
7097 * cp-tree.h (cplus_decl_attributes): Update prototype.
7098 * decl.c (start_decl, grokdeclarator, start_function): Update
7099 calls to decl_attributes and cplus_decl_attributes.
7100 * friend.c (do_friend): Update call to cplus_decl_attributes.
7101 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
7103 2001-07-12 Mark Mitchell <mark@codesourcery.com>
7105 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
7106 for `register' variables with an asm-specification.
7108 2001-07-11 Mark Mitchell <mark@codesourcery.com>
7110 * semantics.c (finish_asm_stmt): Mark the output operands
7111 to an asm addressable, if necessary.
7113 2001-07-11 Ben Elliston <bje@redhat.com>
7115 * Revert this change -- there is a subtle bug.
7118 * decl.c (finish_enum): New "attributes" argument; pass it to
7119 cplus_decl_attributes. Use a narrower type if the enum is packed.
7120 * cp-tree.h (finish_enum): Adjust prototype.
7121 * parse.y (enum_head): New non-terminal.
7122 (structsp): Use it. Enums now may be preceded or followed by
7123 optional attributes -- pass their chained tree to finish_enum().
7124 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
7126 2001-07-10 Mark Mitchell <mark@codesourcery.com>
7128 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
7131 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
7133 * semantics.c (cp_expand_stmt): Fix for null
7134 current_function_return_value.
7136 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
7138 * call.c (build_op_delete_call): Initialize fn.
7139 (convert_like_real): Delete conditional.
7140 (joust): Initialize *w and *l.
7141 * class.c: Add prototype for binfo_ctor_vtable.
7142 (get_primary_binfo): Initialize result.
7143 * init.c (build_java_class_ref): Initialize name.
7145 2001-07-09 Erik Rozendaal <dlr@acm.org>
7147 * typeck.c (unary_complex_lvalue): Do not duplicate the
7148 argument to modify, pre-, or post-increment when used as an
7149 lvalue and when the argument has side-effects.
7151 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
7153 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
7154 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
7155 cplus_decl_attributes even if attrs is NULL.
7156 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
7158 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
7160 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
7161 calls to decl_attributes.
7163 2001-07-06 Ira Ruben <ira@apple.com>
7165 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
7166 be DECL_TEMPLATE_RESULT.
7168 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7170 * cp-tree.h (copy_template_template_parm): Rename to ...
7171 (bind_template_template_parm): ... here.
7172 * tree.c (copy_template_template_parm): Rename to ...
7173 (bind_template_template_parm): ... here. Remove the case when
7174 NEWARGS is NULL_TREE.
7175 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
7176 BOUND_TEMPLATE_TEMPLATE_PARM.
7177 * pt.c (lookup_template_class): Adjust.
7179 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
7181 * cvt.c (convert_lvalue): New fn.
7182 * cp-tree.h: Declare it.
7183 * method.c (do_build_assign_ref): Use it.
7184 (do_build_copy_constructor): Convert parm to base types
7185 before calling base constructors.
7187 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
7188 DECL_USER_ALIGN. Check flag_elide_constructors instead of
7190 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
7192 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
7194 * optimize.c (optimize_inline_calls): New function, broken out
7196 (optimize_function): ... here. Call it. Don't inline if it is
7198 (dump_function): Print name of dump flag causing this dump.
7199 * semantics.c (expand_body): Move thunk inline check to
7202 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
7204 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
7205 (comptypes): Use target.comp_type_attributes.
7207 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
7209 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
7211 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
7213 * error.c (lang_print_error_function): Add a `diagnostic_context *'
7216 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
7218 * decl2.c (import_export_class): Update.
7220 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
7222 * error.c (init_error): Adjust settings.
7224 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
7226 * error.c (init_error): Adjust settings.
7228 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
7230 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
7231 return pointers to data members by reference rather than by value.
7233 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
7235 Implement the Named Return Value optimization.
7236 * cp-tree.h (struct cp_language_function): Add x_return_value.
7237 (current_function_return_value): Now a macro.
7238 * decl.c: Don't define it.
7239 (define_label, finish_case_label): Don't clear it.
7240 (init_decl_processing): Don't register it with GC.
7241 * semantics.c (genrtl_finish_function): Don't check it for
7242 no_return_label. Copy the RTL from the return value to
7243 current_function_return_value and walk, calling...
7244 (nullify_returns_r): ...this new fn.
7245 * typeck.c (check_return_expr): Set current_function_return_value.
7247 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
7249 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
7250 sharing a ctor vtable with. Merge code for cases 1 and 2.
7251 (binfo_ctor_vtable): New fn.
7252 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
7254 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
7256 * class.c (dfs_find_final_overrider): Fix logic.
7258 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
7259 virtual thunk instead of non-virtual.
7260 (get_matching_virtual): Uncomment.
7262 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
7263 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
7266 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
7268 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
7269 we've not emerged from the hierarchy of RTTI_BINFO on reaching
7272 2001-06-13 Mark Mitchell <mark@codesourcery.com>
7274 * NEWS: Update release number.
7276 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
7278 PR c++/3130, c++/3131, c++/3132
7279 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
7280 * class.c (force_canonical_binfo_r): Move
7281 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
7282 virtual bases unless they're primary and what they're primary
7284 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
7285 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
7286 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
7288 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
7289 (layout_nonempty_base_or_field): Add most derived type
7291 (layout_empty_base): Likewise.
7292 (build_base_field): Likewise.
7293 (build_base_fields): Likewise.
7294 (propagate_binfo_offsets): Add most derived type
7295 parameter. Skip non canonical virtual bases too.
7296 (dfs_set_offset_for_unshared_vbases): Don't skip primary
7297 bases. Do skip canonical bases.
7298 (layout_virtual_bases): Adjust.
7299 (layout_class_type): Adjust.
7300 (dfs_get_primary_binfo): Build list of virtual primary base
7302 (get_primary_binfo): Check that the shared virtual primary
7303 base candidate was found first.
7304 (accumulate_vtbl_inits): Don't do anything for non-vptr
7305 containing binfos. For case 1 primary virtual bases, keep
7306 checking that we've not emerged from the hierarchy of RTTI_BINFO.
7308 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
7311 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
7312 hierarchy looking for primary bases for a ctor
7313 vtable. Recursively call oneself, if we meet our primary via
7314 this route and haven't met it yet via inheritance graph order.
7316 2001-06-11 Mark Mitchell <mark@codesourcery.com>
7318 * lang-options.h: Emit documentation for -fno-honor-std, not
7321 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
7323 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
7324 Don't clobber delta.
7325 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
7327 2001-06-10 Mark Mitchell <mark@codesourcery.com>
7328 Gabriel Dos Reis <gdr@codesourcery.com>
7330 * Make-lang.in (cp/call.o): Depend on diagnostic.h
7331 (cp/typeck.o): Depend on diagnostic.h
7332 (cp/typeck2.o): Depend on diagnostic.h
7333 (cp/repo.o): Depend on dignostic.h
7334 * typeck.c: #include diagnostic.h
7335 (convert_for_initialization): Remove extern declaration for
7336 warningcount and errorcount.
7338 * call.c: #include diagnostic.h
7339 (convert_like_real): Remove extern declaration for warnincount and
7342 * repo.c: #include diagnostic.h
7343 * typeck2.c: #include diagnostic.h
7345 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
7347 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
7350 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
7353 * friend.c (do_friend): Use push_decl_namespace for classes at
7356 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
7357 Jason Merrill <jason_merrill@redhat.com>
7360 * class.c (build_secondary_vtable): Use assert, rather than an error
7362 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
7363 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
7364 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
7365 Don't set BINFO_VTABLE for a primary virtual base.
7367 2001-06-07 Mark Mitchell <mark@codesourcery.com>
7369 * decl.c (duplicate_decls): Update source position information
7370 when a template function is defined.
7372 2001-06-07 Phil Edwards <pme@sources.redhat.com>
7374 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
7376 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
7379 * decl.c (pushtag): Don't push into a complete type's scope.
7381 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
7383 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
7384 (struct lang_decl_flags): Lose generate_with_vtable_p.
7385 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
7386 * class.c (copy_virtuals): Adjust.
7387 * decl2.c (mark_vtable_entries): Adjust.
7388 * method.c (make_thunk, build_vtable_entry): Adjust.
7389 * class.c (update_vtable_entry_for_fn): Only look as far as the
7390 first defining class.
7391 (build_vtbl_initializer): Put nothing in the slot for a function only
7392 defined in a lost primary virtual base.
7393 (add_vcall_offset_vtbl_entries_1): Use the same code for
7394 the lost primary case and the normal case.
7395 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
7396 (get_vfield_offset, get_derived_offset): Lose.
7397 (dfs_find_final_overrider): Use look_for_overrides_here.
7398 (get_matching_virtual): New fn.
7399 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
7401 * search.c (look_for_overrides_here): Split out from...
7402 (look_for_overrides_r): Here.
7404 * class.c (find_final_overrider): Return error_mark_node on error.
7406 * decl2.c (key_method): #if 0 accidental change.
7408 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
7410 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
7411 (build_over_call): Likewise.
7412 * decl.c (grokparms): Likewise.
7413 * pt.c (tsubst_decl): Likewise.
7414 * typeck.c (convert_arguments): Likewise.
7416 2001-06-05 Mark Mitchell <mark@codesourcery.com>
7418 * semantics.c (begin_class_definition): Robustify.
7420 * pt.c (instantiate_decl): Tell the repository code about the
7421 clones, not the cloned functions.
7422 * repo.c (repo_template_used): Explicitly instantiate the cloned
7423 function, not the clones.
7425 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
7427 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
7428 ICS_BAD_FLAG on created conversion.
7429 (compare_ics): Break out rank.
7431 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
7433 * decl.c (xref_tag): Remove extraneous %s on dependent name
7436 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
7438 * class.c (layout_vtable_decl): Fix off by one error on
7440 (build_vtt): Likewise.
7441 (build_ctor_vtbl_group): Likewise.
7443 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
7445 * class.c (maybe_indent_hierarchy): New function.
7446 (dump_class_hierarchy_r): Add flags. Dump extra binfo
7447 information, if enabled. Use maybe_indent_hierarchy. Adjust
7449 (dump_class_hierarchy): Adjust prototype. Adjust output format.
7450 (dump_array, dump_vtable, dump_vtt): New functions.
7451 (finish_struct_1): Adjust hierarchy dumping.
7452 (initialize_vtable): Call dump_vtable.
7453 (build_vtt): Call dump_vtt.
7454 (build_ctor_vtbl_group): Call dump_vtable.
7455 * decl2.c (flag_dump_class_layout): Remove.
7456 (cxx_decode_option): Remove dump translation unit
7457 and dump class hierarchy check. Call dump_switch_p.
7458 (finish_file): Adjust dumping.
7459 (dump.c): Only dump base classes if not TDF_SLIM.
7460 Only dump namespace members if not TDF_SLIM.
7461 * optimize.c (dump_function): New function.
7462 (optimize_function): Call dump_function.
7463 * semantics.c (expand_body): Use dump_enabled_p.
7465 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
7468 Part missed from first commit
7469 * decl2.c (finish_anon_union): Copy context.
7471 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
7474 * optimize.c (remap_decl): Remap anonymous aggregate members too.
7476 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
7479 * semantics.c (expand_body): Don't optimize thunks.
7481 2001-05-25 Sam TH <sam@uchicago.edu>
7483 * cp-tree.h lex.h: Fix header include guards.
7485 2001-05-25 Mark Mitchell <mark@codesourcery.com>
7487 * decl.c (init_decl_processing): Tweak.
7489 2001-05-24 Mark Mitchell <mark@codesourcery.com>
7491 * decl.c (duplicate_decls): Tidy.
7492 (init_decl_processing): Always set flag_no_builtin.
7494 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
7497 * decl2.c (do_local_using_decl): Push the decls, even in a
7500 2001-05-22 Mark Mitchell <mark@codesourcery.com>
7502 * optimize.c (initialize_inlined_parameters): Don't set
7503 TREE_READONLY for a VAR_DECL taking the place of an inlined
7506 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
7508 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
7509 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
7512 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
7514 * parse.y: Refer to compound literals as such, not as
7515 constructor-expressions.
7517 2001-05-21 Mark Mitchell <mark@codesourcery.com>
7519 * call.c (build_op_delete_call): Ignore exception-specifications
7520 when looking for matching delete operators.
7521 * init.c (build_new_1): Compute whether or not the allocation
7522 function used is a placement allocation function or not, and
7523 communicate this information to build_op_delete_call.
7525 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
7527 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
7528 (build_vtbl_ref): Adjust.
7529 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
7530 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
7532 (unsupported_options): Correspondingly.
7534 * decl2.c (maybe_make_one_only): Check flag_weak, not
7535 supports_one_only().
7537 * cp-tree.def (START_CATCH_STMT): Lose.
7538 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
7539 * tree.c (cp_statement_code_p): Don't case it.
7540 * semantics.c (cp_expand_stmt): Likewise.
7541 * cp-tree.h (START_CATCH_TYPE): Lose.
7542 (HANDLER_TYPE): New.
7543 * except.c (expand_start_catch_block): Don't start any blocks.
7545 (expand_end_catch_block): Don't end any blocks.
7546 * parse.y (handler): Don't pass anything from finish_handler_parms
7548 * pt.c (tsubst_expr): Likewise.
7549 * semantics.c (begin_handler): Call note_level_for_catch here.
7550 (finish_handler_parms): Don't return anything.
7551 (genrtl_catch_block, begin_catch_block): Lose.
7552 (genrtl_handler): Call expand_start_catch here.
7554 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
7556 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
7557 (get_vtable_decl, build_vtt): Not here.
7559 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
7562 * optimize.c (update_cloned_parm): Copy addressability and other
7565 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7567 * pt.c (determine_specialization): Ignore artificial functions.
7569 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
7571 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
7572 (C_RID_CODE): Remove.
7573 * lex.c (cxx_init_options): Call set_identifier_size. Update.
7574 (init_parse): Don't do it here.
7576 2001-05-18 Diego Novillo <dnovillo@redhat.com>
7578 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
7579 function declaration to avoid stripping the symbol's attributes.
7581 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
7583 * decl.c (pushdecl): Adjust error string.
7584 (xref_tag): Adjust friend class injection warning. Remove the
7585 inherited name from the class shadowed scope.
7587 2001-05-17 Mark Mitchell <mark@codesourcery.com>
7589 * except.c (cp_protect_cleanup_actions): New function.
7590 (init_exception_processing): Don't set protect_cleanup_actions
7591 here. Do set lang_protect_cleanup_actions.
7593 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
7595 * spew.c (read_token): Call yyerror on all unexpected tokens.
7597 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
7599 * init.c (member_init_ok_or_else): Take a tree rather than
7601 (expand_member_init): Adjust.
7603 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
7605 * decl.c (duplicate_decls): Suppress warning about duplicate
7606 decls if the first decl is a friend.
7608 2001-05-12 Zack Weinberg <zackw@stanford.edu>
7610 * except.c (choose_personality_routine): Export. Add
7611 explanatory comment. Take an enum languages, not a boolean.
7612 (initialize_handler_parm): Adjust to match.
7613 * cp-tree.h: Prototype choose_personality_routine.
7614 * lex.c (handle_pragma_java_exceptions): New function.
7615 (init_cp_pragma): Register #pragma GCC java_exceptions.
7617 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
7619 * method.c (build_mangled_C99_name): Remove unused prototype.
7621 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
7623 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
7624 * typeck.c (get_member_function_from_ptrfunc,
7625 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
7626 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
7628 Reverted Geoff Keating's 2001-05-03's patch.
7630 2001-05-11 Ira Ruben <ira@apple.com>
7632 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
7634 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
7636 * cp-tree.h (finish_label_expr, lookup_label): Delete.
7637 * parse.y: Update for '&&'; don't issue warning here.
7638 * semantics.c (finish_label_expr): Delete.
7640 2001-05-07 Mark Mitchell <mark@codesourcery.com>
7642 * splay-tree.h (splay_tree_max): New function.
7643 (splay_tree_min): Likewise.
7645 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
7647 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
7648 (pfn_vflag_identifier): Define.
7649 Update comment about layout of pointer functions.
7650 (build_ptrmemfunc1): Update prototype.
7651 (expand_ptrmemfunc_cst): Update prototype.
7652 * decl.c (initialize_predefined_identifiers): Initialize
7653 pfn_vflag_identifier.
7654 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
7655 an extra field to the type.
7656 * expr.c (cplus_expand_constant): Pass 'flag' between
7657 expand_ptrmemfunc_cst and build_ptrmemfunc1.
7658 * typeck.c (get_member_function_from_ptrfunc): When
7659 FUNCTION_BOUNDARY < 16, look at additional field to determine
7660 if a pointer-to-member is a real pointer or a vtable offset.
7661 (build_ptrmemfunc1): Add new parameter to contain extra field.
7662 (build_ptrmemfunc): Pass the extra field around.
7663 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
7664 (pfn_from_ptrmemfunc): Ignore the extra field.
7666 2001-05-03 Mark Mitchell <mark@codesourcery.com>
7668 * cp-tree.h (flag_inline_trees): Update documentation.
7669 * decl.c (init_decl_processing): Adjust handling of
7670 flag_inline_functions and flag_inline_trees to support -O3.
7671 (grokfndecl): Set DECL_INLINE on all functions if that's what
7673 (save_function_data): Clear DECL_INLINE in
7674 current_function_cannot_inline is non-NULL.
7675 * decl2.c (flag_inline_trees): Update documentation.
7677 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
7679 * dump.c (cp_dump_tree, USING_STMT case): New case.
7680 * tree.c (cp_statement_code_p): Add USING_STMT.
7681 * decl2.c (do_using_directive): Add the using directive statement.
7683 * tree.c (walk_tree): Reformat an if block.
7685 2001-05-02 Mark Mitchell <mark@codesourcery.com>
7687 * decl.c (compute_array_index_type): Don't try to do anything with
7688 the indices when processing a template.
7690 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7692 * call.c: NULL_PTR -> NULL.
7693 * class.c: Likewise.
7696 * decl2.c: Likewise.
7697 * except.c: Likewise.
7700 * search.c: Likewise.
7702 * typeck.c: Likewise.
7703 * typeck2.c: Likewise.
7705 2001-05-02 Mark Mitchell <mark@codesourcery.com>
7707 * decl2.c (do_using_directive): Revert previous patch.
7709 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
7711 * cp-tree.def (USING_STMT): New statement node.
7712 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
7713 * decl2.c (do_using_directive): Add USING_STMT to statement
7714 tree. Don't emit errors when processing template decl.
7715 * pt.c (tsubst_expr, USING_STMT case): New case.
7716 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
7718 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
7720 * call.c (build_new_op): Convert args from reference here.
7721 (build_conditional_expr): Don't convert here.
7723 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
7725 * spew.c (last_token_id): New static variable.
7726 (read_token): Set it here.
7727 (yyerror): Use it here.
7729 2001-04-30 Richard Henderson <rth@redhat.com>
7731 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
7734 2001-04-30 Mark Mitchell <mark@codesourcery.com>
7736 * gxxint.texi: Remove.
7737 * Make-lang.in: Remove all traces of gxxint.texi.
7739 Mon Apr 30 16:14:10 2001 Mark P Mitchell <mark@codesourcery.com>
7741 * decl2.c (start_static_initialization_or_destruction): Correct
7742 logic to handle the -fno-use-cxa-atexit case.
7744 2001-04-30 Mark Mitchell <mark@codesourcery.com>
7746 * optimize.c (update_cloned_parm): New function.
7747 (maybe_clone_body): Use it. Update the `this' parameter too.
7749 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
7751 * decl2.c (unsupported_options): Add new-abi.
7752 * lang-options.h: Remove no longer supported options.
7754 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
7756 * except.c (can_convert_eh): Don't check template parms,
7759 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
7761 * optimize.c (maybe_clone_body): Copy parameter names and locations.
7763 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
7765 * cp-tree.h (adjust_clone_args): Prototype new function.
7766 * class.c (adjust_clone_args): New function.
7767 * decl.c (start_function): Call it for in charge ctors.
7769 2001-04-26 Mark Mitchell <mark@codesourcery.com>
7771 * method.c (use_thunk): Make sure that thunks really are emitted
7774 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
7776 * mangle.c (write_chars): New macro.
7777 (hwint_to_ascii): New function
7778 (write_number): Use it.
7779 (write_integer_cst): Deal with really big numbers.
7781 2001-04-25 Mark Mitchell <mark@codesourcery.com>
7783 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
7786 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
7788 * decl.c (grokdeclarator): Set context of namespace scope
7791 2001-04-24 Zack Weinberg <zackw@stanford.edu>
7793 * cp/optimize.c: Include hashtab.h.
7794 (struct inline_data): Add tree_pruner.
7795 (expand_call_inline, expand_calls_inline): Use it when calling
7797 (optimize_function): Initialize and free tree_pruner.
7799 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
7801 Lazy __FUNCTION__ generation.
7802 * cp-tree.def (FUNCTION_NAME): Remove.
7803 * cp-tree.h (function_name_declared_p): Remove.
7804 (cp_fname_init): Prototype.
7805 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
7806 don't call declare_function_name. Call start_fname_decls.
7807 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
7808 clobber the line number.
7809 (cp_fname_init): New function.
7810 (start_function): Call start_fname_decls.
7811 (finish_function): Call finish_fname_decls.
7812 * lex.c (reswords): Add slots for __FUNCTION__ et al.
7813 (rid_to_yy): Add mappings for __FUNCTION__ et al.
7814 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
7815 * parse.y (VAR_FUNC_NAME): New token.
7816 (primary): Add VAR_FUNC_NAME.
7817 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
7819 (tsubst, FUNCTION_NAME case): Remove.
7820 (tsubst_copy, FUNCTION_NAME case): Remove.
7821 (tsubst_expr, DECL_STMT case): Be careful with a
7822 DECL_PRETTY_FUNCTION_P.
7823 (instantiate_decl): Remove function_name_declared_p.
7824 * semantics.c (begin_compound_statement): Don't call
7825 declare_function_name here.
7826 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
7827 (finish_translation_unit): Call finish_fname_decls.
7828 (expand_body): Remove function_name_declared_p.
7829 * typeck2.c (digest_init): Allow any ERROR_MARK.
7831 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
7833 * pt.c (tsubst_decl): Use VOID_TYPE_P.
7834 * semantics.c: Fix some typos.
7836 2001-04-23 Phil Edwards <pme@sources.redhat.com>
7838 * cp/decl2.c (flag_honor_std): Always initialize to 1.
7840 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7842 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
7844 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
7846 * except.c (build_throw): Wrap the initialization of the exception
7847 object in a MUST_NOT_THROW_EXPR.
7848 (do_free_exception): #if 0.
7850 2001-04-20 Mark Mitchell <mark@codesourcery.com>
7852 * cp-tree.h (finish_enum): Change prototype.
7853 * decl.c (finish_enum): Reorganize.
7854 * parse.y (structsp): Adjust calls to finish_enum.
7856 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
7858 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
7861 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
7863 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
7864 (layout_empty_base): Return at end flag.
7865 (build_base_field): Likewise.
7866 (build_base_fields): Likewise.
7867 (layout_virtual_bases): Don't add 1 to eoc value.
7868 (end_of_class): Use full size for empty bases.
7869 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
7870 empty bases. Don't add 1 to eoc value. Only add trailing padding
7871 if we're an empty class with no empty bases.
7872 (dump_class_hierarchy): Dump size and alignment.
7874 2001-04-20 Jakub Jelinek <jakub@redhat.com>
7876 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
7879 2001-04-20 Jakub Jelinek <jakub@redhat.com>
7881 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
7882 is found, look first if name does not match the structure name.
7884 2001-04-19 Mark Mitchell <mark@codesourcery.com>
7886 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
7888 (SET_DECL_LANGUAGE): New macro.
7889 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
7890 (pushdecl): Likewise.
7891 (build_library_fn_1): Likewise.
7892 (build_cp_library_fn): Likewise.
7893 (grokfndecl): Likewise.
7894 (grokvardecl): Mark `extern "C"' variables as having C linkage.
7895 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
7896 * lex.c (retrofit_lang_decl): Likewise.
7897 * mangle.c (mangle_decl_string): Don't mangle the names of
7898 variables declared with C language linkage.
7899 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
7901 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
7903 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
7904 flag_access_control from uninitialized storage.
7906 2001-04-15 Mark Mitchell <mark@codesourcery.com>
7908 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
7909 * mangle.c (write_pointer_to_member_type): Fix mangling of
7910 pointers to cv-qualified member function types.
7912 * init.c (build_delete): Create a SAVE_EXPR for the address if
7913 we're going to use it more than once.
7915 2001-04-13 Mark Mitchell <mark@codesourcery.com>
7917 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
7918 (expand_ptremfunc_cst): Change prototype.
7919 (delta2_from_ptrmemfunc): Remove.
7920 * expr.c (cplus_expand_constant): Adjust call to
7921 expand_ptrmemfunc_cst.
7922 * typeck.c (build_ptrmemfunc1): Simplify.
7923 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
7924 results in a constant.
7925 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
7926 (delta2_from_ptrmemfunc): Remove.
7927 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
7929 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
7931 * cp-tree.h (decl_namespace_list): New macro.
7932 (struct saved_scope): Add decl_ns_list.
7933 * decl.c (mark_saved_scope): Mark it.
7934 * decl2.c: Lose static decl_namespace_list.
7935 (init_decl2): Don't save it.
7937 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7939 * cp-tree.h (warn_return_type, yylex): Delete redundant
7942 * decl.c (current_class_depth, global_namespace): Likewise.
7944 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
7946 * repo.c (flag_use_repository): Likewise.
7948 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7950 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
7951 set_block, pushdecl, getdecls, gettags, init_decl_processing,
7952 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
7953 lvalue_or_else, print_lang_statistics, comp_target_types,
7954 unsigned_type, signed_type, signed_or_unsigned_type,
7955 build_function_call, mark_addressable, incomplete_type_error):
7956 Delete redundant declarations.
7958 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
7960 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
7961 (TYPE_ANONYMOUS_P): New macro.
7962 (TAGGED_TYPE_P): New macro.
7963 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
7964 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
7965 * tree.c (no_linkage_helper): Likewise.
7966 * semantics.c (begin_class_definition): Likewise.
7967 * pt.c (convert_template_argument): Likewise.
7968 * lex.c (check_for_missing_semicolon): Likewise.
7970 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
7972 * class.c (dfs_unshared_virtual_bases): New function.
7973 (mark_primary_bases): Call it.
7974 (check_bases): Ignore virtual bases when determining
7977 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
7979 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
7981 2001-04-11 Mark Mitchell <mark@codesourcery.com>
7983 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
7984 cloned function to the clone.
7986 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7988 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
7990 * semantics.c: Include expr.h.
7992 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
7994 * method.c (implicitly_declare_fn): Commonize code for copy ctor
7995 and assignment op. Set TREE_USED for parameter.
7997 2001-04-10 Mark Mitchell <mark@codesourcery.com>
7999 * class.c (find_final_overrider_data): Add `candidates'.
8000 (dfs_find_final_overrider): Don't issue error messages
8002 (find_final_overrider): Issue error messages here.
8003 (build_base_field): Don't warn about amgibuous direct bases here.
8004 (warn_about_ambiguous_direct_bases): New function.
8005 (layout_class_type): Use it.
8007 2001-04-10 Richard Henderson <rth@redhat.com>
8009 * typeck.c (build_array_ref): Push the array reference inside
8010 COMPOUND_EXPR and COND_EXPR.
8012 2001-04-05 Mark Mitchell <mark@codesourcery.com>
8014 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
8015 * decl.c (duplicate_decls): Adjust accordingly.
8016 (maybe_commonize_var): Likewise.
8017 (grokfndecl): Likewise.
8018 (start_function): Likewise.
8019 (start_method): Likewise.
8020 * decl2.c (key_method): Likewise.
8021 (import_export_decl): Likewise.
8022 * method.c (implicitly_declare_fn): Likewise.
8023 * optimize.c (maybe_clone_body): Likewise.
8025 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
8027 * lang-specs.h: Add __DEPRECATED.
8029 Thu Apr 5 16:54:29 2001 J"orn Rennecke <amylaar@redhat.com>
8031 * search.c (get_dynamic_cast_base_type): When building a new
8032 constant, set its type to ssizetype.
8034 2001-04-04 Jakub Jelinek <jakub@redhat.com>
8036 * optimize.c (expand_call_inline): Only add newly inlined statements
8039 2001-04-03 Mark Mitchell <mark@codesourcery.com>
8041 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
8042 (OPERATOR_FORMAT): Likewise.
8043 (OPERATOR_TYPENAME_FORMAT): Likewise.
8044 * operators.def: Remove old name-mangling information.
8045 * decl.c (grok_op_properties): Adjust accordingly.
8046 * lex.c (init_operators): Likewise.
8047 * rtti.c (get_tinfo_decl): Issue error messages about types that
8050 2001-04-03 Mark Mitchell <mark@codesourcery.com>
8052 * decl2.c (import_export_decl): Don't call import_export_class
8053 when processing an inline member function.
8054 * semantics.c (expand_body): Call import_export_decl before
8055 emitting inline functions.
8057 2001-03-28 Richard Henderson <rth@redhat.com>
8059 IA-64 ABI Exception Handling:
8060 * cp-tree.def (EH_SPEC_BLOCK): New.
8061 (MUST_NOT_THROW_EXPR): New.
8062 * cp-tree.h: Update changed function declarations.
8063 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
8064 (CPTI_CALL_UNEXPECTED): New.
8065 (struct cp_language_function): Rename x_eh_spec_try_block
8067 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
8068 * decl.c (current_binding_level): If no current function
8069 bindings, revert to scope_chain.
8070 (initialize_predefined_identifiers): Remove __cp_push_exception.
8071 (store_parm_decls): Use begin_eh_spec_block.
8072 (finish_function): Use finish_eh_spec_block.
8073 (mark_lang_function): Update for name changes.
8074 * decl2.c (finish_file): No mark_all_runtime_matches.
8075 * dump.c (cp_dump_tree): Handle new tree codes.
8076 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
8077 * except.c (catch_language_init, catch_language): Remove.
8078 (init_exception_processing): Don't set language code.
8079 Initialize call_unexpected_node, protect_cleanup_actions,
8080 eh_personality_libfunc, lang_eh_runtime_type.
8081 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
8082 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
8083 (prepare_eh_type): Split out type canonicalizations ...
8084 (build_eh_type_type): ... from here.
8085 (build_eh_type_type_ref): Remove.
8086 (mark_all_runtime_matches): Remove.
8087 (build_exc_ptr): New.
8088 (do_begin_catch, do_end_catch): New.
8089 (do_pop_exception): Remove.
8090 (build_terminate_handler): Remove.
8091 (choose_personality_routine): Split out language choice from ...
8092 (initialize_handler_parm): ... here.
8093 Use MUST_NOT_THROW_EXPR.
8094 (expand_start_catch_block): Use do_begin_catch. Simplify Java
8095 exception object handling.
8096 (expand_start_eh_spec, expand_end_eh_spec): Remove.
8097 (expand_exception_blocks, alloc_eh_object): Remove.
8098 (begin_eh_spec_block, finish_eh_spec_block): New.
8099 (do_allocate_exception, do_free_exception): New.
8100 (expand_throw): Merge into ...
8101 (build_throw): ... here. Update for abi.
8102 * expr.c (cplus_expand_expr): No expand_internal_throw.
8103 Handle MUST_NOT_THROW_EXPR.
8104 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
8105 * semantics.c (*) Update for except.h name changes.
8106 (genrtl_try_block): No protect_with_terminate.
8107 (genrtl_eh_spec_block): New.
8108 (genrtl_handler): Don't emit the goto here.
8109 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
8110 (genrtl_finish_function): Don't expand_exception_blocks.
8111 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
8113 2001-03-28 Richard Henderson <rth@redhat.com>
8115 * decl.c (struct named_label_list): Rename eh_region to
8116 in_try_scope, add in_catch_scope.
8117 (struct binding_level): Rename eh_region to is_try_scope,
8119 (note_level_for_try): Rename from note_level_for_eh.
8120 (note_level_for_catch): New.
8121 (poplevel): Copy both is_try_scope and is_catch_scope to
8122 the named_label_list struct.
8123 (check_previous_goto_1): Don't check for catch block via
8124 DECL_ARTIFICIAL; use in_try_scope instead.
8125 (check_goto): Likewise.
8126 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
8127 * except.c (expand_start_catch_block): Call note_level_for_catch.
8128 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
8130 2001-03-27 Richard Henderson <rth@redhat.com>
8132 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
8133 exceptions_via_longjmp.
8135 2001-03-27 Phil Edwards <pme@sources.redhat.com>
8137 * pt.c (check_default_tmpl_args): Make error messages clearer.
8139 2001-03-26 Phil Edwards <pme@sources.redhat.com>
8141 * error.c: Also undefine 'A' macro used for cp_printers definition.
8143 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8145 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
8147 2001-03-26 Mike Yang <yang@research.att.com>
8148 Mark Mitchell <mark@codesourcery.com>
8150 * dump.c (dump_access): New function.
8151 (cp_dump_tree): Use it. Dump basetype information for class
8154 2001-03-26 Mark Mitchell <mark@codesourcery.com>
8156 * Makefile.in (optimize.o): Depend on params.h.
8157 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
8158 (init_decl_processing): Set flag_no_inline when doing
8160 * optimize.c: Include params.h.
8161 (struct inline_data): Improve documentation of FNS. Add
8162 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
8163 (INSNS_PER_STMT): New macro.
8164 (remap_block): Use CLONING_P.
8165 (inlinable_function_p): Don't inline big functions.
8166 (expand_call_inline): Keep track of how much inlining we've done.
8167 (optimize_function): Set FIRST_INLINED_FN.
8168 (maybe_clone_body): Set CLONING_P.
8169 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
8171 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
8172 rest_of_compilation. Clear DECL_RTL for local variables
8174 (clear_decl_rtl): New function.
8176 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
8179 * cp-tree.h (skip_type_access_control,
8180 reset_type_access_control): Prototype.
8181 * decl.c (grokdeclarator): Access of friends is not checked.
8182 * parse.y (component_decl_list): Reset type access control.
8183 * semantics.c (decl_type_access_control): Clear
8184 current_type_lookups.
8185 (save_type_access_control): Don't save if not deferring.
8186 (skip_type_access_control, reset_type_access_control): New
8188 (begin_class_definition): Do type access control for basetypes.
8189 Start deferred access control.
8190 (finish_class_definition): Resume immediate access control if
8191 this is a local class.
8193 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8195 * class.c (add_method): Use memcpy/memmove, not bcopy.
8197 * decl.c (duplicate_decls): Likewise.
8199 2001-03-23 Jakub Jelinek <jakub@redhat.com>
8201 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
8204 2001-03-23 Jakub Jelinek <jakub@redhat.com>
8206 * decl.c (local_names): Define.
8207 (push_local_name): New.
8208 (grok_reference_init): Return init if initializing static reference
8209 variable with non-constant instead of emitting it.
8210 Move expand_static_init call to cp_finish_decl.
8211 (layout_var_decl): Call push_local_name.
8212 (maybe_commonize_var): Allow inlining functions even if they have
8213 static local variables, use comdat_linkage for them if flag_weak.
8214 (check_initializer): Call obscure_complex_init if
8215 grok_reference_init returned nonzero.
8216 (save_function_data): Clear x_local_names.
8217 (pop_cp_function_context): Free x_local_names.
8218 (mark_inlined_fns): Remove.
8219 (mark_lang_function): Mark x_local_names.
8220 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
8221 Mark inlined_fns as tree, remove call to mark_inlined_fns.
8222 * class.c (alter_access): Ensure DECL_ACCESS is never set if
8223 DECL_DISCRIMINATOR_P.
8224 * cp-tree.h (cp_language_function): Add x_local_names.
8225 (lang_decl_flags): Add discriminator into u2.
8226 (lang_decl_inlined_fns): Remove.
8227 (lang_decl): inlined_fns is now a TREE_VEC.
8228 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
8229 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
8230 TREE_VEC, not a custom structure.
8231 (optimize_function): Likewise.
8232 * mangle.c (discriminator_for_local_entity): Discriminate among
8233 VAR_DECL local entities.
8234 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
8237 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
8239 Add support for Java interface method calls.
8240 * cp-tree.h (struct lang_type): Add java_interface flag.
8241 (TYPE_JAVA_INTERFACE): New macro.
8242 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
8243 by setting TYPE_JAVA_INTERFACE.
8244 * call.c (java_iface_lookup_fn): New static.
8245 (build_over_call): If calling a method declared in a
8246 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
8247 expression which resolves the function address.
8248 (build_java_interface_fn_ref): New function.
8250 2001-03-22 Richard Henderson <rth@redhat.com>
8252 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
8253 * except.c: Don't include it.
8255 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
8256 based on an idea from Joe Buck <jbuck@synopsys.com>
8258 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
8260 (data_def, component_decl): Add reductions to bad_decl.
8262 2001-03-22 Jakub Jelinek <jakub@redhat.com>
8264 * method.c (do_build_assign_ref): Don't use build_modify_expr for
8265 anonymous aggregates, since they don't have assignment operator
8267 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
8268 assignment operators for anonymous structure fields.
8270 2001-03-21 Jason Merrill <jason@redhat.com>
8272 * pt.c (instantiate_decl): Abort if we see a member constant
8273 instantiation that doesn't already have its initializer.
8274 Downgrade explicit instantiation without definition to pedwarn.
8276 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
8277 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
8278 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
8280 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
8281 (pending_vtables): Remove.
8282 * decl2.c (pending_vtables): Remove.
8283 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
8284 CLASSTYPE_VTABLE_NEEDS_WRITING.
8285 (import_export_class): Likewise.
8286 (init_decl2): Don't mark pending_vtables.
8287 * lex.c (handle_pragma_vtable): Just sorry.
8288 * pt.c (instantiate_class_template): Don't mess with
8289 CLASSTYPE_VTABLE_NEEDS_WRITING.
8290 (mark_class_instantiated): Likewise.
8291 * ptree.c (print_lang_type): Don't print it.
8292 * semantics.c (begin_class_definition): Don't set it.
8294 * pt.c (template_tail): Replace with last_pending_template.
8295 (maybe_templates, maybe_template_tail): Remove.
8296 (add_pending_template): Adjust.
8297 (instantiate_pending_templates): Adjust.
8299 * cp-tree.h (struct saved_scope): Remove lang_stack field.
8300 (current_lang_stack): Remove.
8301 * decl.c (maybe_push_to_top_level): Don't initialize it.
8302 (duplicate_decls): Use current_lang_depth.
8303 (xref_basetypes): Likewise.
8304 * class.c (current_lang_depth): New fn.
8305 (push_lang_context): Use more varray functionality.
8306 (pop_lang_context): Likewise.
8308 * error.c (GLOBAL_THING): Always use '__'.
8310 2001-03-21 Mark Mitchell <mark@codesourcery.com>
8312 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
8314 * mangle.c (mangle_decl_string): Mangle the names of overloaded
8315 operators, even when they have `extern "C"' linkage.
8317 2001-03-19 Mark Mitchell <mark@codesourcery.com>
8319 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
8320 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
8321 where it's not necessary.
8322 (add_method): Remove optimization involving comparison of
8323 DECL_ASSEMBLER_NAME.
8324 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
8325 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
8326 where it's not necessary.
8327 (check_methods): Likewise.
8328 (build_clone): Likewise.
8329 (built_vtt): Likewise.
8330 * cp-tree.h (DECL_NEEDED_P): Likewise.
8331 * decl.c (pushtag): Likewise.
8332 (duplicate_decls): Likewise.
8333 (pushdecl): Likewise.
8334 (builtin_function): Likewise.
8335 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
8336 (build_cp_library_fn): Likewise.
8337 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
8338 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
8339 where it's not necessary.
8340 (make_rtl_for_nonlocal_decl): Likewise.
8341 (cp_finish_decl): Likewise.
8342 (grokfndecl): Likewise.
8343 (grokvardecl): Likewise.
8344 (grokdeclarator): Likewise.
8345 (start_function): Likewise.
8346 (cp_missing_return_ok_p): Likewise.
8347 * decl2.c (grokclassfn): Likewise.
8348 (check_classfn): Likewise.
8349 (finish_static_data_member_decl): Likewise.
8350 (grokfield): Likewise.
8351 * error.c (GLOBAL_IORD_P): Remove.
8352 (dump_global_iord): Improve output.
8353 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
8354 * except.c (nothrow_libfn_p): Summarily reject any function not in
8356 * init.c (build_java_class_ref): Don't explicitly set
8357 DECL_ASSEMBLER_NAME after calling mangle_decl.
8358 * mangle.c (mangle_decl_string): Handle extern "C" functions.
8359 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
8360 * method.c (set_mangled_name_for_decl): Don't explicitly set
8361 DECL_ASSEMBLER_NAME after calling mangle_decl.
8362 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
8363 IDENTIFIER_GLOBAL_VALUE for the thunk.
8364 * pt.c (set_mangled_name_for_template_decl): Remove.
8365 (check_explicit_specialization): Don't use it.
8366 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
8367 (tsubst_friend_function): Likewise.
8368 (tsubst_decl): Likewise.
8369 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
8370 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
8371 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
8372 where it's not necessary.
8373 (tinfo_base_init): Likewise.
8374 (create_real_tinfo_var): Likewise.
8375 * search.c (looup_field_1): Likewise.
8376 * semantics.c (finish_named_return_value): Likewise.
8377 * tree.c (init_tree): Set lang_set_decl_assembler_name.
8379 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
8381 Correct semantics restrictions checking in throw-expression.
8382 * except.c (is_admissible_throw_operand): New function.
8383 (build_throw): Use it.
8385 2001-03-14 Mark Mitchell <mark@codesourcery.com>
8387 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
8390 2001-03-14 Mark Mitchell <mark@codesourcery.com>
8392 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
8393 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
8394 * decl.c (duplicate_decls): Likewise.
8395 (builtin_function): Likewise.
8396 (build_library_fn): Likewise.
8397 (build_cp_library_fn): Likewise.
8398 (check_initializer): Likewise.
8399 (cp_finish_decl): Likewise.
8400 * decl2.c (grokfield): Likewise.
8401 (grok_function_init): Remove #if 0'd code.
8402 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
8403 * friend.c (do_friend): Likewise.
8404 * init.c (get_temp_regvar): Likewise.
8405 * method.c (make_thunk): Likewise.
8406 * pt.c (tsubst_friend_function): Likewise.
8407 (tsubst_decl): Likewise.
8408 (regenerate_decl_from_template): Likewise.
8409 * semantics.c (genrtl_named_return_value): Likewise.
8410 (expand_body): Likewise.
8411 (genrtl_finish_function): Likewise.
8412 * tree.c (cp_tree_equal): Likewise.
8414 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
8416 * call.c (convert_like_real): Add extra semantics to INNER
8417 parameter. Don't convert to temporary if a user conversion
8418 gives us an lvalue that we're about to bind to a reference.
8419 Set INNER to indicate pending reference binding on recursive
8422 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
8424 * cp/lex.c: Delete duplicate pending_lang_change.
8426 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
8428 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
8430 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
8431 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
8433 2001-03-09 Zack Weinberg <zackw@stanford.edu>
8435 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
8437 2001-03-08 Stan Shebs <shebs@apple.com>
8439 * cp-tree.h (set_identifier_local_value): Remove unused decl.
8441 2001-03-06 Zack Weinberg <zackw@stanford.edu>
8443 * spew.c: Remove references to CPP_OSTRING.
8445 2001-03-06 Andrew Haley <aph@redhat.com>
8447 * typeck.c (convert_arguments): Check that we have an fndecl.
8449 2001-03-05 Andrew Haley <aph@redhat.com>
8451 * typeck.c (convert_arguments): Don't do ellipsis conversion for
8452 __built_in_constant_p.
8454 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
8456 * typeck.c (build_static_cast): Allow enum to enum conversions
8459 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
8461 * class.c (check_field_decls): Pointers to member do not a
8462 non-pod struct make, as per DR 148.
8464 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
8466 * call.c (joust): cp_pedwarn when using gnu extension concerning
8467 worst conversion sequences.
8469 2001-03-01 Zack Weinberg <zackw@stanford.edu>
8471 * decl.c: Replace all uses of 'boolean' with 'bool'.
8473 2001-03-01 Zack Weinberg <zackw@stanford.edu>
8475 * lang-specs.h: Add zero initializer for cpp_spec field to
8476 all array elements that need one. Don't put an #ifdef inside
8477 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
8480 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
8482 Implement using decls inside template functions.
8483 * decl2.c (validate_nonmember_using_decl): Don't special case
8484 fake_std_node in the global namespace. Don't reject early when
8485 processing a template.
8486 (do_local_using_decl): Add to statement tree. Don't do further
8487 processing when building a template.
8488 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
8490 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
8492 * decl2.c (do_nonmember_using_decl): Don't complain if we find
8493 same function. Do complain about ambiguating extern "C"
8496 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
8498 Remove floating point and complex type template constant parms.
8499 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
8500 COMPLEX_TYPE extensions.
8501 (invalid_nontype_parm_type_p): Likewise.
8503 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
8505 * except.c (call_eh_info): Revert "match_function"'s type.
8507 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
8509 Fix ctor vtable vcall offsets.
8510 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
8511 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
8512 (get_matching_base): Remove.
8513 (get_original_base): New function.
8514 (build_vtbl_initializer): Initialize vid.rtti_binfo.
8515 Use a virtual thunk for a ctor vtable with an index
8516 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
8517 primary base within a constructor vtable. Only set
8518 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
8519 when primary base has been lost.
8520 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
8522 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
8524 * call.c (joust): Ensure more_specialized()'s argument length
8525 parameter has correct value for constructors.
8527 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
8529 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
8531 * decl.c (mark_inlined_fns): Prototype.
8533 2001-02-22 Mark Mitchell <mark@codesourcery.com>
8535 * spew.c (yylex): Correct handling of friends.
8537 2001-02-22 Mark Mitchell <mark@codesourcery.com>
8539 * mangle.c (write_encoding): Pass write_function_type the
8540 FUNCTION_DECL for the function being encoded.
8541 (write_function_type): Pass it along to write_bare_function_type.
8542 (write_bare_function_type): Pass it along to write_method_parms.
8543 (write_method_parms): Don't mangle the compiler-generated
8544 parameters to a constructor or destructor.
8546 2001-02-22 Andreas Jaeger <aj@suse.de>
8548 * optimize.c: Include toplev.h for
8549 note_deferral_of_defined_inline_function prototype.
8551 2001-02-22 Jakub Jelinek <jakub@redhat.com>
8553 * cp-tree.h (struct lang_decl_inlined_fns): New.
8554 (struct lang_decls): Add inlined_fns.
8555 (DECL_INLINED_FNS): New macro.
8556 * optimize.c (struct inline_data): Add inlined_fns.
8557 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
8558 (inlinable_function_p): Likewise, fix typo in comment,
8559 function is not inlinable if it already inlined function currently
8561 (expand_call_inline): Add fn to inlined_fns if necessary.
8562 (optimize_function): Initialize inlined_fns.
8563 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
8564 * decl.c (mark_inlined_fns): New function.
8565 (lang_mark_tree): Call it.
8567 2001-02-21 Jason Merrill <jason@redhat.com>
8569 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
8570 (DECL_UNINLINABLE): Move to middle-end.
8572 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
8573 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
8574 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
8575 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
8576 parms and outer BLOCK. note_deferral_of_defined_inline_function.
8578 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
8581 2001-02-19 Mark Mitchell <mark@codesourcery.com>
8583 * decl2.c (set_decl_namespace): Allow explicit instantiations in
8586 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8588 * optimize.c (expand_call_inline): Don't walk subtrees of type
8591 2001-02-18 Mark Mitchell <mark@codesourcery.com>
8593 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
8596 2001-02-18 Jason Merrill <jason@redhat.com>
8598 Do put the VTT parameter in DECL_ARGUMENTS.
8599 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
8600 (current_vtt_parm): New macro.
8601 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
8602 (DECL_HAS_VTT_PARM_P): New macro.
8603 (DECL_VTT_PARM): Remove.
8604 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
8605 * decl.c (duplicate_decls): Only copy the operator code if
8607 (start_function): Set current_vtt_parm.
8608 (lang_mark_tree): Don't mark vtt_parm.
8609 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
8610 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
8611 * class.c (build_clone): Maybe remove the VTT parm.
8612 * optimize.c (maybe_clone_body): Set up the VTT parm.
8613 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
8614 * call.c (build_over_call): Just allow the VTT arg.
8615 * method.c (make_thunk): Don't set DECL_VTT_PARM.
8616 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
8617 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
8618 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
8619 * error.c (dump_function_decl): Likewise.
8620 * call.c (build_user_type_conversion_1, convert_like_real): Abort
8621 if we try to call a constructor with in-charge or VTT parms.
8622 * method.c (skip_artificial_parms_for): New fn.
8623 * call.c (add_function_candidate, build_over_call): Call it.
8624 * call.c (build_new_method_call): Use current_vtt_parm.
8625 * init.c (expand_virtual_init): Likewise.
8626 * class.c (same_signature_p): No longer static.
8627 * cp-tree.h: Declare it.
8628 * search.c (look_for_overrides_r): Use it.
8630 2001-02-17 Mark Mitchell <mark@codesourcery.com>
8632 * cp-tree.h (new_abi_rtti_p): Remove.
8633 (name_mangling_version): Likewise.
8634 (flag_do_squangling): Likewise.
8635 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
8636 * decl.c (grokfndecl): Likewise.
8637 * decl2.c (name_mangling_version): Remove.
8638 (flag_do_squangling): Likewise.
8639 (lang_f_options): Remove `squangle'.
8640 (unsupported_options): Add `squangle'.
8641 (cxx_decode_option): Issue a warning about uses of
8642 -fname-mangling-version.
8643 (finish_file): Remove old ABI support.
8644 * pt.c (check_explicit_specialization): Likewise.
8645 (tsubst_decl): Likewise.
8646 * rtti.c (init_rtti_processing): Likewise.
8647 (build_headof): Likewise.
8648 (get_tinfo_decl_dynamic): Likewise.
8649 (tinfo_from_decl): Likewise.
8650 (build_dynamic_cast_1): Likewise.
8651 (synthesize_tinfo_var): Likewise.
8652 * init.c (build_new): Allow enumeration types for the array-bounds
8653 in a direct-new-declarator.
8655 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
8657 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
8658 TREE_PROTECTED from the template being specialized.
8660 2001-02-17 Jason Merrill <jason@redhat.com>
8662 * decl2.c (build_artificial_parm): Set TREE_READONLY.
8664 * decl.c (bad_specifiers): Allow throw specs on things with
8665 pointer-to-function or -member-function type.
8666 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
8669 2001-02-17 Mark Mitchell <mark@codesourcery.com>
8671 * call.c (check_dtor_name): Handle template names correctly.
8673 2001-02-16 Jason Merrill <jason@redhat.com>
8675 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
8676 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
8677 * optimize.c (maybe_clone_body): Don't substitute it.
8678 * call.c (build_new_method_call): Check in_chrg instead.
8679 * init.c (expand_virtual_init): Likewise.
8681 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
8683 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
8684 class-type introduces at least a type-name.
8686 2001-02-16 Jakub Jelinek <jakub@redhat.com>
8688 * call.c (convert_like_real): Create a temporary for non-lvalue.
8690 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
8692 * cp-tree.h: Fix typos in comments.
8694 2001-02-16 Jason Merrill <jason@redhat.com>
8696 * optimize.c (remap_block): If we're compiling a clone, pass the
8697 new block to insert_block.
8699 2001-02-16 Mark Mitchell <mark@codesourcery.com>
8701 * semantics.c (finish_asm_stmt): Robustify.
8703 2001-02-15 Mark Mitchell <mark@codesourcery.com>
8705 * pt.c (push_template_decl_real): Don't remangle the name of a
8708 2001-02-15 Jim Meyering <meyering@lucent.com>
8710 * Make-lang.in (c++.install-common): Depend on installdirs.
8711 (c++.install-info): Likewise.
8712 (c++.install-man): Likewise.
8714 2001-02-15 Mark Mitchell <mark@codesourcery.com>
8716 * typeck2.c (build_m_component_ref): Robustify.
8718 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
8720 * friend.c (do_friend): Don't take the nested [template] class
8721 into account when deciding whether to warn about the friend
8722 function not referring to a template function.
8724 2001-02-14 Jakub Jelinek <jakub@redhat.com>
8726 * typeck.c (build_unary_op): Clarify error message.
8728 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
8730 * parse.y (component_constructor_declarator): allow optional
8731 parentheses around constructor class name.
8733 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
8735 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
8737 * init.c (emit_base_init): Remove incorrect comment about
8739 * method.c (make_thunk): Fix comment alignment.
8741 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
8743 Kill remnants of this is variable.
8744 * cp-tree.h (flag_this_is_variable): Remove.
8745 * decl2.c (flag_this_is_variable): Remove.
8746 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
8747 (build_vbase_path): The path is non-static, even in a cdtor.
8748 (resolves_to_fixed_type_p): Add additional return value.
8749 * search.c (init_vbase_pointers): Adjust.
8750 * tree.c (lvalue_p_1): Adjust.
8751 * typeck.c (mark_addressable): Adjust.
8753 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
8755 * pt.c (unify): Don't check cv quals of array types.
8757 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
8759 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
8760 check whether we already have the type.
8762 2001-02-13 Mark Mitchell <mark@codesourcery.com>
8764 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
8765 * call.c (build_op_delete_call): Simplify to remove duplicate
8767 * class.c (clone_function_decl): Don't build the deleting variant
8768 of a non-virtual destructor.
8769 * decl.c (finish_destructor_body): Don't call delete if this is a
8770 non-virtual destructor.
8771 * init.c (build_delete): Explicitly call `operator delete' when
8772 deleting an object with a non-virtual destructor.
8774 2001-02-13 Jason Merrill <jason@redhat.com>
8776 * lang-specs.h: Add more __EXCEPTIONS.
8778 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
8780 * typeck2.c (process_init_constructor): Check
8781 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
8783 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
8785 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
8786 Remove spurious information in comment. Allow further
8787 adjustments of REFERENCE_TYPE args.
8789 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
8791 * errfn.c (cp_deprecated): Tweak diagnostic text.
8792 * parse.y (new_initializer): Deprecate initializer lists
8795 2001-02-12 Mark Mitchell <mark@codesourcery.com>
8797 Remove old ABI support.
8799 2001-02-11 Mark Mitchell <mark@codesourcery.com>
8801 * decl2.c (flag_vtable_thunks): Always set it to 1.
8802 (flag_new_abi): Likewise.
8803 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
8805 * Makefile.in (g++spec.o): Fix typo.
8807 2001-02-09 Jason Merrill <jason@redhat.com>
8809 * lang-specs.h: Restore definition of __EXCEPTIONS.
8811 2001-02-08 Jason Merrill <jason@redhat.com>
8813 * search.c (shared_member_p): New function.
8814 (lookup_field_r): Use it.
8815 * cp-tree.h (SHARED_MEMBER_P): Remove.
8817 * method.c (process_overload_item): Handle template-dependent array
8819 * pt.c (type_unification_real): If we end up with undeduced nontype
8822 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
8825 * typeck2.c (friendly_abort): Don't say anything if we have
8826 earlier errors or sorries.
8828 * decl.c (check_tag_decl): Notice attempts to redefine bool and
8829 wchar_t. Ignore if in_system_header.
8831 * decl.c (maybe_push_cleanup_level): New fn...
8832 (start_decl_1): ...split out from here.
8833 * cvt.c (build_up_reference): Use it.
8834 * cp-tree.h: Declare it.
8836 2001-02-07 Mark Mitchell <mark@codesourcery.com>
8838 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
8841 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
8843 * pt.c (lookup_template_class): Make sure it's a primary
8844 template or template_template_parm when called from the parser.
8845 (instantiate_template_class): Add assertion.
8847 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
8849 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
8850 from error_mark_node.
8852 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
8854 Fix specification and implementation bugs in V3 ABI
8855 construction vtables.
8856 * cp-tree.h (flag_dump_class_layout): New flag.
8857 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
8858 (BINFO_LOST_PRIMARY_P): New flag.
8859 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
8860 (BINFO_PRIMARY_MARKED_P): Rename to ...
8861 (BINFO_PRIMARY_P): ... here.
8862 (binfo_via_virtual): New prototype.
8863 * decl2.c (flag_dump_class_layout): New flag.
8864 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
8865 use `=' as a file name separator.
8866 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
8868 (build_vtbl_address): If this is a virtual primary base, then
8869 get the vtbl of what it is ultimately primary for.
8870 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
8871 for BINFO_PRIMARY_P.
8872 (dfs_skip_nonprimary_vbases_markedp): Likewise.
8873 (get_shared_vbase_if_not_primary): Likewise.
8874 (dfs_get_pure_virtuals): Likewise.
8875 (expand_upcast_fixups): Likewise.
8876 (fixup_virtual_upcast_offsets): Likewise.
8877 (dfs_find_vbase_instance): Likewise.
8878 (find_vbase_instance): Likewise.
8879 (binfo_from_vbase): Adjust comment to reflect reality.
8880 (binfo_via_virtual): New function.
8881 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
8882 for binfo walking during VTT construction.
8883 (dfs_mark_primary_bases): Remove.
8884 (force_canonical_binfo_r): New function.
8885 (force_canonical_binfo): New function.
8886 (mark_primary_virtual_base): New function.
8887 (mark_primary_bases): Walk in inheritance graph order, use
8888 mark_primary_virtual_base.
8889 (determine_primary_base): Use some more intermediate variables.
8890 (dfs_find_final_overrider): Don't check for overriding along a
8892 (dfs_modify_vtables): Walk into primary virtual bases too.
8893 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
8894 (build_base_fields): Likewise.
8895 (dfs_set_offset_for_unshared_vbases): Likewise.
8896 (layout_virtual_bases): Likewise.
8897 (end_of_class): Likewise.
8898 (finish_struct_1): Call dump_class_hierarchy, if requested.
8899 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
8900 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
8901 (dump_class_hierarchy): Add file parameter. Append to file, if
8903 (finish_vtbls): Adjust accumulate_vtbl_inits call.
8904 Use canonical base for virtual bases.
8905 (build_vtt): Add more comments. Adjust build_vtt_inits call.
8906 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
8907 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
8908 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
8910 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
8911 from DATA. We want virtual primary bases and all bases via virtual.
8912 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
8913 virtual base when not a construction vtable.
8914 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
8915 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
8916 Use canonical bases when processing virtual bases.
8917 (accumulate_vtbl_inits): We're interested in any base via a
8919 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
8920 within a construction vtable, determine what is being overridden.
8921 (build_vtbl_initializer): Add more comments
8922 (add_vcall_offset_vtbl_entries_1): Adjust comment.
8923 (build_rtti_vtbl_entries): Check if the base has lost its
8926 2001-02-05 Mark Mitchell <mark@codesourcery.com>
8928 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
8930 Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8932 * decl.c (pushdecl): Call abort instead of fatal.
8933 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
8934 * init.c (build_new_1): Likewise.
8935 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
8936 * decl.c (build_typename_type): hash_table_init now returns void.
8937 decl.c (init_decl_processing): Make an error non-fatal.
8939 2001-02-04 Mark Mitchell <mark@codesourcery.com>
8941 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
8943 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
8944 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
8945 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
8946 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
8947 * decl.c (maybe_commonize_var): Use the new name-mangling where
8949 * decl2.c (comdat_linkage): Enhance comments. Make all
8950 compiler-generated things static, if COMDAT is not available.
8951 (get_tinfo_decl): Do not make typeinfo objects that belong in the
8953 (tinfo_base_init): Use the correct mangled name for typeinfo
8954 strings, and push them into the global scope.
8955 (typeinfo_in_lib_p): New function.
8956 (synthesize_tinfo_var): Use it.
8957 (create_real_tinfo_var): Likewise.
8959 2001-02-03 Jakub Jelinek <jakub@redhat.com>
8961 * decl.c (push_class_binding): Use context_for_name_lookup instead
8963 * search.c (context_for_name_lookup): Remove static. Check for NULL
8964 context in the loop.
8965 * cp-tree.h (context_for_name_lookup): Add prototype.
8967 2001-02-02 Jakub Jelinek <jakub@redhat.com>
8969 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
8970 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
8972 * call.c (convert_class_to_reference, build_user_type_conversion_1,
8973 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
8975 2001-02-02 Mark Mitchell <mark@codesourcery.com>
8977 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
8978 of macros used when compiling g++spec.c.
8979 * g++spec.c (lang_specific_driver): Link with the shared
8982 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
8984 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
8985 make_reference_declarator, make_call_declarator), method.c
8986 (implicitly_declare_fn), parse.y (namespace_using_decl,
8987 notype_unqualified_id, expr_or_declarator, new_type_id,
8988 after_type_declarator, direct_after_type_declarator,
8989 notype_declarator, complex_notype_declarator,
8990 complex_direct_notype_declarator, qualified_id,
8991 notype_qualified_id, overqualified_id, direct_new_declarator,
8992 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
8993 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
8994 instead of build_parse_node.
8996 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8998 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
8999 (minus_one_node): Moved to top level gcc directory. Renamed
9000 to integer_minus_one_node.
9002 * init.c (init_init_processing): Don't set minus_one_node.
9003 (build_vec_init): Use integer_minus_one_node.
9005 * rtti.c (get_tinfo_decl_dynamic): Likewise.
9007 2001-01-28 Jakub Jelinek <jakub@redhat.com>
9009 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
9010 identical and they would be replaced with constant, remove
9011 MODIFY_EXPR from the tree.
9013 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9015 * Make-lang.in: Remove all dependencies on defaults.h.
9016 * call.c: Don't include defaults.h.
9018 * decl2.c: Likewise.
9019 * except.c: Likewise.
9023 * typeck.c: Likewise.
9025 2001-01-25 Jakub Jelinek <jakub@redhat.com>
9027 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
9028 operators even in "C" linkage.
9029 * method.c (set_mangled_name_for_decl): Likewise.
9030 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
9031 overloaded operators in "C" linkage.
9033 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
9035 * pt.c (tsubst_decl): Remove IN_DECL parameter.
9036 (tsubst_arg_types): Check parameter is not void.
9037 (tsubst): Adjust tsubst_decl call.
9039 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
9041 * call.c (add_builtin_candidate): Quote std properly, from
9044 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9046 * pt.c (check_explicit_specialization): Clone constructors and
9049 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
9051 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
9052 indicates anything special about template depth. Make sure we
9053 only count the user visible template classes.
9055 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
9057 * call.c (build_conv): Typo in comment.
9058 (add_builtin_candidate): Add more explanation.
9059 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
9060 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
9061 when we have enumeral types.
9062 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
9063 candidates for relops and eqops.
9064 (joust): Simplify control flow. Allow a non-template user
9065 function to hide a builtin.
9067 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
9069 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
9070 (more_specialized): Add deduction parameter.
9071 * call.c (joust): Adjust more_specialized call.
9072 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
9073 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
9074 (get_bindings_order): Remove.
9075 (get_bindings_real): Add DEDUCE parameter.
9076 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
9077 REFERENCE_TYPE jig for DEDUCE_ORDER.
9078 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
9079 maybe_adjust_types_for_deduction.
9080 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
9082 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
9083 (check_cv_quals_for_unify): Use new unify qualifier flags.
9084 (unify): Clear new unify qualifier flags.
9085 (get_bindings_real): Add DEDUCE parameter.
9086 (get_bindings): Adjust call to get_bindings_real.
9087 (get_bindings_overload): Likewise.
9088 (most_specialized_instantiation): Adjust call to
9091 2001-01-19 Jason Merrill <jason@redhat.com>
9093 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
9095 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
9098 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
9100 * decl2.c (arg_assoc_class): Fix double iteration logic.
9102 2001-01-19 Jason Merrill <jason@redhat.com>
9104 * init.c (build_delete): Always call convert_force to strip cv-quals.
9106 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
9107 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
9108 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
9110 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
9112 * search.c (get_vbase_1): Count only virtual bases.
9114 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
9116 * class.c (duplicate_tag_error): Robustify flag clearing.
9118 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
9120 * cp-tree.h (lookup_template_class): Add complain parm.
9121 * decl.c (lookup_namespace_name): Adjust call to
9122 lookup_template_class.
9123 (make_typename_type): Likewise.
9124 * semantics.c (finish_template_type): Likewise.
9125 * pt.c (lookup_template_class): Add complain parm. Adjust.
9126 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
9129 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
9131 * pt.c (copy_default_args_to_explicit_spec): Preserve
9132 object's CV quals. Reorganize.
9134 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
9136 * typeck.c (build_modify_expr): Say `initialization' for
9138 * init.c (build_default_init): Convert to enumeral type, if
9141 2001-01-18 Jakub Jelinek <jakub@redhat.com>
9143 * parse.y (nomods_initdcl0): Properly set things up for
9146 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
9148 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
9149 (type_unification_real): Set it.
9152 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
9154 * decl.c (finish_destructor_body): Convert to vbase pointer here.
9156 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
9158 * semantics.c (begin_class_definition): Check we're not inside a
9161 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
9163 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
9166 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9168 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
9169 * call.c (build_over_call): Add comment.
9171 2001-01-16 Daniel Berlin <dberlin@redhat.com>
9173 * cvt.c (ocp_convert): Handle vector type conversion
9174 * typeck2.c (digest_init): Handle vector type initializations
9176 2001-01-16 Phil Edwards <pme@sources.redhat.com>
9178 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
9181 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
9183 * pt.c (check_nontype_parm): Rename to ...
9184 (invalid_nontype_parm_type_p): ... here.
9185 (process_template_parm): Adjust.
9186 (convert_template_argument): Adjust.
9188 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
9190 * pt.c (check_nontype_parm): New function.
9191 (process_template_parm): Use it.
9192 (convert_template_argument): Use it.
9193 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
9196 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
9198 * tree.c: Add defaults.h
9199 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
9200 * Make-lang.in (cp/tree.o): Add defaults.h.
9202 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
9204 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
9206 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
9208 * g++.1: Change to be ".so man1/gcc.1".
9210 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
9212 * Make-lang.in (c++.info, c++.install-info): Build and install g++
9214 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
9215 ($(srcdir)/cp/g++int.info): New target.
9216 * gxxint.texi: Add info directory entry. Use @@ in email address.
9217 * .cvsignore: Update.
9219 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
9221 * typeck.c (build_c_cast): Do template processing earlier.
9222 Always pedwarn on array casts.
9224 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
9226 * friend.c (make_friend_class): Make sure a templated class is
9227 actually a template.
9229 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
9231 * decl2.c (get_guard): Set linkage from guarded decl.
9233 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
9235 * call.c (convert_default_arg): Check for unprocessed
9237 * cp-tree.h (replace_defarg): Move to spew.c.
9238 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
9239 spew.c, which is where they really are.
9240 (done_pending_defargs): Declare.
9241 (unprocessed_defarg_fn): Declare.
9242 * decl.c (replace_defarg): Move to spew.c
9243 * parse.y (structsp): Call done_pending_defargs.
9244 * spew.c (defarg_fns): Rearrange list structure.
9245 (defarg_fnsdone): New static variable.
9246 (defarg_depfns): New static variable.
9247 (init_spew): Adjust.
9248 (add_defarg_fn): Store the type in TREE_TYPE.
9249 (do_pending_defargs): Detect and deal with ordering constraints
9251 (done_pending_defargs): New function.
9252 (unprocessed_defarg_fn): New function.
9253 (replace_defarg): Moved from decl.c. Robustify. Don't save
9254 if circularity detected.
9256 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
9258 * pt.c (unify): Check array has a domain, before checking
9259 whether it is variable sized.
9261 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
9263 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
9264 parameters with pointers to arrays of unknown bound.
9266 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
9268 * parse.y (template_parm_header, template_spec_header): New
9269 reductions. Split out from ...
9270 (template_header): ... here. Use them.
9271 (template_template_parm): Use template_parm_header.
9272 * semantics.c (finish_template_template_parm): Add assert.
9274 2001-01-10 Mark Mitchell <mark@codesourcery.com>
9276 * mangle.c (write_builtin_type): Fix thinko.
9278 * pt.c (copy_default_args_to_explicit_spec_1): New function.
9279 (copy_default_args_to_explicit_spec): Likewise.
9280 (check_explicit_specialization): Use it.
9282 * class.c (finish_struct_1): Remove last argument in call to
9283 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
9284 * decl.c (builtin_function): Likewise.
9285 (build_cp_library_fn): Likewise.
9286 (check_initializer): Likewise.
9287 (make_rtl_for_nonlocal_decl): Likewise.
9288 (cp_finish_decl): Likewise.
9289 (start_function): Likewise.
9290 * decl2.c (finish_anon_union): Likewise.
9291 * friend.c (do_friend): Likewise.
9292 * init.c (build_java_class_ref): Likewise.
9293 * method.c (make_thunk): Likewise.
9294 * pt.c (tsubst_friend_function): Likewise.
9295 * semantics.c (expand_body): Likewise.
9297 2001-01-10 Mark Mitchell <mark@codesourcery.com>
9299 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
9300 looking at DECL_CLONED_FUNCTION for non-functions.
9302 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
9304 * error.c (dump_template_parameter): Use parm to determine how
9305 to print default value.
9307 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
9309 * class.c (duplicate_tag_error): Clear more flags.
9311 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
9313 * call.c (build_new_method_call): Use binfo_for_vbase.
9315 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
9317 * cp-tree.h (flag_cond_mismatch): Don't declare.
9318 * decl2.c (flag_cond_mismatch): Don't define.
9319 (lang_f_options): Remove cond-mismatch.
9320 (unsupported_options): Add cond-mismatch.
9322 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
9324 * class.c (handle_using_decl): Reject using of constructor name
9325 of sourcing class. Allow injecting of a method with same name as
9326 nested class. Fixup error messages.
9328 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
9330 * decl2.c (lang_decode_option): Handle -Wformat=2.
9332 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
9334 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
9335 initialized_in_class.
9336 (DECL_DEFINED_IN_CLASS_P): Rename to ...
9337 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
9338 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
9339 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
9340 * pt.c (check_default_tmpl_args): Adjust for
9341 DECL_INITIALIZED_IN_CLASS_P.
9342 (instantiate_class_template): Likewise.
9343 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
9345 * class.c (finish_struct): Constify saved_filename.
9347 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
9349 * class.c (duplicate_tag_error): Adjust diagnostic.
9350 (finish_struct): Locally set location to start of struct.
9351 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
9353 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
9355 * decl.c (struct binding_level): Adjust class_shadowed comments
9357 (push_class_level_binding): Adjust comments to reflect reality.
9358 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
9359 Don't set TREE_VALUE on the class_shadowed list.
9361 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
9363 * decl2.c (acceptable_java_type): Allow references too.
9364 * init.c (build_java_class_ref): When using the new ABI, search
9365 `class$' and have it mangled with `mangle_decl.'
9366 * mangle.c (write_java_integer_type_codes): New function.
9367 (write_builtin_type): Detect and mangle Java integer and real
9370 2001-01-07 Mark Mitchell <mark@codesourcery.com>
9372 * decl2.c (grokfield): Don't accept `asm' specifiers for
9373 non-static data members.
9375 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9377 * expr.c (cplus_expand_expr): Don't reset `target'.
9379 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
9381 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
9383 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
9385 * parse.y (template_datadef): Check for error_mark_node.
9387 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
9389 * cp-tree.def (DEFAULT_ARG): Make `x' class.
9391 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
9393 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
9394 (record_builtin_type): Make non-static.
9395 (flag_short_double): Don't declare.
9396 (init_decl_processing): Remove the creation of many tree nodes now
9397 in c_common_nodes_and_builtins.
9398 (build_void_list_node): New function.
9399 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
9400 * cp-tree.h (flag_short_wchar): Don't declare.
9402 2001-01-04 Mark Mitchell <mark@codesourcery.com>
9404 * call.c (build_conv): Don't use build1 for USER_CONV.
9405 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
9407 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
9409 * lex.c (lang_init): Call c_common_lang_init.
9411 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
9413 * search.c (lookup_fnfields_here): Remove.
9414 (look_for_overrides_r): Use lookup_fnfields_1.
9415 Ignore functions from using declarations.
9417 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
9419 Implement exceptions specifiers for implicit member functions.
9420 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
9421 * method.c (synthesize_exception_spec): New function.
9422 (locate_dtor, locate_ctor, locate_copy): New functions.
9423 (implicitly_declare_fn): Generate the exception spec too.
9424 * search.c (check_final_overrider): Check artificial functions
9426 * typeck2.c (merge_exception_specifiers): New function.
9428 2001-01-03 Jason Merrill <jason@redhat.com>
9430 * init.c (build_default_init): New fn.
9431 (perform_member_init): Split out from here.
9432 (build_new_1): Use it. Simplify initialization logic.
9433 (build_vec_init): Take an array, rather than a pointer and maxindex.
9434 Speed up simple initializations. Don't clean up if we're assigning.
9435 * cp-tree.h: Adjust.
9436 * decl2.c (do_static_initialization): Remove TREE_VEC case.
9437 * parse.y (new_initializer): Return void_zero_node for ().
9438 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
9439 * typeck2.c (digest_init): Only complain about user-written
9442 2000-12-22 Mike Stump <mrs@wrs.com>
9444 * decl2.c: (max_tinst_depth): Increase to 50.
9446 2001-01-02 Mark Mitchell <mark@codesourcery.com>
9448 * class.c (invalidate_class_lookup_cache): Zero the
9449 previous_class_values.
9450 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
9452 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
9453 * decl.c (free_bindings): New variable.
9454 (push_binding): Don't create a new binding if we have one on the
9456 (pop_binding): Put old bindings on the free list.
9457 (init_decl_processing): Use size_int, not build_int_2.
9458 Register free_bindings as a GC root.
9459 (cp_make_fname_decl): Use size_int, not build_int_2.
9460 (push_inline_template_parms_recursive): Likewise.
9461 (end_template_parm_list): Likewise.
9462 (for_each_template_parm): Do not use walk_tree_without_duplicates.
9463 (tsubst_template_parms): Use size_int, not build_int_2.
9465 * rtti.c (get_vmi_pseudo_type_info): Likewise.
9467 2001-01-02 Richard Henderson <rth@redhat.com>
9469 * parse.y (asm): Set ASM_INPUT_P.
9471 2001-01-02 Jason Merrill <jason@redhat.com>
9473 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
9476 * typeck.c (cp_truthvalue_conversion): New fn.
9477 * cvt.c (ocp_convert): Use it.
9479 * cp-tree.h: Lose c-common.c decls.
9481 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
9482 * cvt.c (convert_to_void): Use type_unknown_p.
9484 * typeck.c (strip_all_pointer_quals): Also strip quals from
9485 pointer-to-member types.
9487 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
9490 * call.c (build_new_method_call): Do evaluate the object parameter
9491 when accessing a static member.
9492 * typeck.c (build_component_ref): Likewise.
9494 2001-01-02 Andreas Jaeger <aj@suse.de>
9496 * decl.c (cp_missing_noreturn_ok_p): New.
9497 (init_decl_processing): Set lang_missing_noreturn_ok_p.
9499 2000-12-29 Jakub Jelinek <jakub@redhat.com>
9501 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
9503 2000-12-29 Mark Mitchell <mark@codesourcery.com>
9505 * class.c (pushclass): Remove #if 0'd code.
9506 * cp-tree.h (overload_template_name): Remove.
9507 * decl.c (store_bindings): Simplify.
9508 (pop_from_top_level): Likewise.
9509 * pt.c (overload_template_name): Remove.
9510 (instantiate_decl): Don't call push_to_top_level if it's not
9513 2000-12-28 Mark Mitchell <mark@codesourcery.com>
9515 * pt.c (register_local_specialization): Don't return a value.
9516 (lookup_template_class): Use move-to-front heuristic when looking
9517 up template instantiations.
9518 (instantiate_decl): Only push_to_top_level when we're actually
9519 going to instantiate the template.
9521 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
9523 * search.c (binfo_for_vtable): Return least derived class, not
9524 most. Handle secondary vtables.
9526 2000-12-22 Jason Merrill <jason@redhat.com>
9528 * pt.c (more_specialized): Don't optimize len==0.
9529 (fn_type_unification): If we're adding the return type, increase len.
9531 * typeck.c (build_binary_op): Fix pmf comparison logic.
9533 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
9534 DECL_STATIC_FUNCTION_P.
9536 * semantics.c (genrtl_finish_function): Don't try to jump to
9537 return_label unless it exists.
9539 In partial ordering for a call, ignore parms for which we don't have
9541 * call.c (joust): Pass len to more_specialized.
9542 (add_template_candidate_real): Strip 'this', pass len.
9543 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
9544 (get_bindings_order): New fn. Pass len down.
9545 (get_bindings_real): Strip 'this', pass len.
9546 (fn_type_unification): Likewise.
9547 (type_unification_real): Succeed after checking 'len' args.
9548 (most_specialized_instantiation): Lose explicit_args parm.
9549 * class.c (resolve_address_of_overloaded_function): Strip 'this',
9552 2000-12-21 Jason Merrill <jason@redhat.com>
9554 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
9555 DECL_TEMPLATE_RESULT.
9557 * search.c (lookup_field_r): Call lookup_fnfields_1, not
9558 lookup_fnfields_here.
9560 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
9562 * call.c (build_object_call): Also allow conversions that return
9563 reference to pointer to function.
9564 (add_conv_candidate): Handle totype being ref to ptr to fn.
9565 (build_field_call): Also allow members of type reference to function.
9566 Lose support for calling pointer to METHOD_TYPE fields.
9568 * error.c (dump_expr): Handle *_CAST_EXPR.
9570 * typeck2.c (build_scoped_ref): Always convert to the naming class.
9572 * tree.c (break_out_cleanups): Lose.
9573 * cp-tree.h: Remove prototype.
9574 * typeck.c (build_component_ref): Don't break_out_cleanups.
9575 (build_compound_expr): Likewise.
9576 * semantics.c (finish_expr_stmt): Likewise.
9578 2000-12-20 Richard Henderson <rth@redhat.com>
9580 * cp-tree.h: Update declarations.
9581 * decl.c (finish_case_label): Return the new stmt node.
9582 * semantics.c (finish_goto_stmt): Likewise.
9583 (finish_expr_stmt, finish_return_stmt): Likewise.
9584 (finish_break_stmt, finish_continue_stmt): Likewise.
9585 (finish_asm_stmt): Likewise.
9586 * parse.y (already_scoped_stmt): Set STMT_LINENO.
9587 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
9588 (simple_if, simple_stmt): Return the new stmt node.
9591 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
9593 * cp-tree.h: Don't declare warn_long_long.
9595 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9597 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
9600 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9602 * pt.c (unify): Handle when both ARG and PARM are
9603 BOUND_TEMPLATE_TEMPLATE_PARM.
9605 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9607 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
9608 DECL_TEMPLATE_PARM_P.
9610 2000-12-15 Jason Merrill <jason@redhat.com>
9612 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
9614 * init.c (build_new_1): Don't strip quals from type.
9616 * decl.c (pushdecl): Don't check for linkage on a non-decl.
9618 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
9620 * call.c (build_new_function_call): Lose space before paren in
9622 (build_new_method_call): Likewise.
9624 * typeck2.c (build_m_component_ref): Propagate quals from datum.
9626 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9628 * pt.c (check_explicit_specialization): Propagate default
9629 function arguments to explicit specializations.
9631 2000-12-13 DJ Delorie <dj@redhat.com>
9633 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
9636 2000-12-08 Jason Merrill <jason@redhat.com>
9638 * error.c (dump_function_name): Don't let the user see __comp_ctor.
9640 Clean up copy-initialization in overloading code.
9641 * call.c (build_user_type_conversion_1): Die if we are asked to
9642 convert to the same or a base type.
9643 (implicit_conversion): Avoid doing so. Lose reference binding code.
9644 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
9645 direct-initialization. Also do direct-init part of copy-init.
9646 (build_user_type_conversion): Don't provide context to convert_like.
9647 * cvt.c (ocp_convert): build_user_type_conversion will now provide
9648 the constructor call for copy-init.
9650 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
9651 instantiation of a member template.
9652 (do_decl_instantiation): Not here.
9654 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
9656 * class.c (check_field_decls): Don't special case anonymous
9657 fields in error messages.
9658 (note_name_declared_in_class): Use %D on diagnostic.
9660 * tree.c (pod_type_p): Use strip_array_types.
9661 (cp_valid_lang_attribute): Likewise.
9662 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
9663 multiple evaluations.
9664 (cp_has_mutable_p): Use strip_array_types.
9666 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
9668 * cp-tree.h (sufficient_parms_p): Declare new function.
9669 * call.c (sufficient_parms_p): New function, broken out of ...
9670 (add_function_candidate): ... here. Use it.
9671 (add_conv_candidate): Use it.
9672 * decl.c (grok_ctor_properties): Use it.
9674 2000-12-07 Jakub Jelinek <jakub@redhat.com>
9676 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
9678 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
9680 * decl2.c (lang_decode_option): Handle -Wformat-security.
9682 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9684 * pt.c (verify_class_unification): New function.
9685 (get_class_bindings): Use it.
9686 (try_class_unification): Tidy.
9687 (unify): Handle when argument of a template-id is not
9688 template parameter dependent.
9689 (template_args_equal): Handle when TREE_CODE's do not match.
9691 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
9693 * lang-specs.h (c++): When invoking the stand-alone preprocessor
9694 for -save-temps, pass all relevant -Defines to it, and then don't
9695 pass them to cc1plus.
9697 2000-12-05 Will Cohen <wcohen@redhat.com>
9699 * decl.c (finish_case_label): Cleared
9700 more_cleanups_ok in surrounding function scopes.
9701 (define_label): Likewise.
9703 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
9705 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
9706 (get_matching_virtual): Remove.
9707 (look_for_overrides): Declare new function.
9708 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
9710 * class.c (check_for_override): Move base class iteration code
9711 to look_for_overrides.
9712 * search.c (next_baselink): Remove.
9713 (get_virtuals_named_this): Remove.
9714 (get_virtual_destructor): Remove.
9715 (tree_has_any_destructors_p): Remove.
9716 (struct gvnt_info): Remove.
9717 (check_final_overrider): Remove `virtual' from error messages.
9718 (get_matching_virtuals): Remove. Move functionality to ...
9719 (look_for_overrides): ... here, and ...
9720 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
9723 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
9725 * typeck.c (get_delta_difference): If via a virtual base,
9727 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
9730 2000-12-04 Richard Henderson <rth@redhat.com>
9732 * error.c (dump_tree): Use output_add_string not OB_PUTS.
9734 2000-12-04 Jason Merrill <jason@redhat.com>
9736 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
9737 (write_builtin_type): Pass intSI_type_node and the like through
9739 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
9740 Pass intSI_type_node and the like through type_for_mode.
9741 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
9742 * pt.c (tsubst, unify): Likewise.
9743 * tree.c (walk_tree): Likewise.
9744 * error.c (dump_type): Likewise.
9745 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
9747 * Make-lang.in: Tweak top comment for emacs.
9750 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
9752 * class.c (clone_function_decl): Robustify.
9754 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
9756 * decl.c (store_bindings): Only search in the non modified
9757 old_bindings for duplicates.
9759 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
9761 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
9764 * typeck.c (build_static_cast): Remove unused variable.
9766 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9768 * pt.c: Fix typo in comment.
9770 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
9772 * decl2.c (warn_format): Remove definition.
9773 (lang_decode_option): Handle -Wformat-nonliteral,
9774 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
9776 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
9778 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
9779 (init_decl_processing): Don't create string_type_node,
9780 const_string_type_node, wint_type_node, intmax_type_node,
9781 uintmax_type_node, default_function_type, ptrdiff_type_node and
9782 unsigned_ptrdiff_type_node. Adjust position of call to
9783 c_common_nodes_and_builtins.
9784 (identifier_global_value): New function.
9786 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
9788 * call.c (standard_conversion): Reject pointer to member
9789 conversions from ambiguous, inaccessible or virtual bases.
9790 * typeck.c (build_static_cast): Don't check pointers to members
9793 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
9795 * method.c (do_build_copy_constructor): Preserve cv
9796 qualifications when accessing source object members.
9797 (do_build_assign_ref): Likewise. Remove separate diagnostics for
9800 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
9802 * method.c (do_build_assign_ref): Construct appropriately
9803 CV-qualified base reference. Don't allow const casts in base
9806 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
9808 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
9809 incomplete return type.
9811 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
9813 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
9814 * semantics.c (finish_base_specifier): Accept a _TYPE not a
9817 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
9819 * spew.c (yyerror): Cope if yylval.ttype is NULL.
9821 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
9823 * decl.c (grokdeclarator): Diagnose undefined template contexts.
9825 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
9827 * decl.c (grokdeclarator): Do type access control on friend
9830 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
9832 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
9833 bison parser ickiness.
9834 * pt.c (tsubst_friend_function): Enter namespace scope when
9835 tsubsting the function name.
9836 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
9838 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
9840 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
9841 * cvt.c (cp_convert_to_pointer): Add force parameter.
9842 Allow conversions via virtual base if forced.
9843 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
9844 (ocp_convert): Likewise.
9845 * search.c (binfo_from_vbase): Return the virtual base's binfo.
9846 * typeck.c (get_delta_difference): Adjust handling of virtual
9849 2000-11-26 Mark Mitchell <mark@codesourcery.com>
9851 * tree.c (struct list_hash): Remove.
9852 (list_hash_table): Make it be an htab.
9853 (struct list_proxy): New type.
9854 (list_hash_eq): New function.
9855 (list_hash_pieces): Renamed from ...
9856 (list_hash): ... this.
9857 (list_hash_lookup): Remove.
9858 (list_hash_add): Remove.
9859 (hash_tree_cons): Use the generic hashtable.
9860 (mark_list_hash): Remove.
9861 (init_tree): Create the hashtable.
9863 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
9865 * method.c (build_mangled_C9x_name): Rename to
9866 build_mangled_C99_name. Change C9X references in comments to
9869 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
9871 * parse.y (unary_expr): Move VA_ARG from here ...
9872 (primary): ... to here.
9874 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
9876 * semantics.c (finish_id_expr): If type is error_mark, return
9879 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
9881 * pt.c (lookup_template_class): Simplify loop exit constructs.
9882 Cope when there is no partial instantiation of a template
9885 Thu Nov 23 02:16:47 2000 J"orn Rennecke <amylaar@redhat.com>
9887 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
9889 2000-11-22 Mark Mitchell <mark@codesourcery.com>
9891 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
9894 * pt.c (do_decl_instantiate): Explicitly clone constructors and
9895 destructors that haven't already been cloned.
9897 2000-11-20 Richard Henderson <rth@redhat.com>
9899 * parse.y (yyparse_1): Rename the parser entry point.
9901 2000-11-20 Alex Samuel <samuel@codesourcery.com>
9903 * mangle.c (write_name): Use <unscoped-name> for names directly in
9905 (write_unscoped_name): Accept names directly in function scope.
9907 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
9909 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
9910 * parse.y (extdef): Add EXPORT reduction.
9911 * spew.c (yylex): Don't skip export here.
9913 2000-11-19 Mark Mitchell <mark@codesourcery.com>
9915 * decl.c (init_decl_processing): Correct name of pure virtual
9916 function under the new ABI.
9917 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
9918 (throw_bad_typeid): Likewise for bad typeid function.
9920 2000-11-18 Mark Mitchell <mark@codesourcery.com>
9922 * decl.c (grokparms): Don't even function types of `void' type,
9924 * mangle.c (write_type): Don't crash when confronted with the
9927 * decl.c (grokparms): Don't create parameters of `void' type.
9929 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
9931 * lex.c (mark_impl_file_chain): Delete.
9932 (init_parse): Remove call to ggc_add_string_root. No need to
9933 ggc_strdup a string constant. Do not add impl_file_chain to GC
9935 (handle_pragma_implementation): No need to ggc_strdup main_filename.
9937 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
9939 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
9941 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
9943 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
9944 * decl.c (grokdeclarator): Don't reject void parms here.
9945 (require_complete_types_for_parms): Simplify, use
9946 complete_type_or_else.
9947 (grokparms): Remove bitrot. Remove funcdef parm.
9948 Deal with ellipsis parm lists here.
9949 * semantics.c (finish_parmlist): Don't append void_list_node
9950 here. Set PARMLIST_ELLIPSIS_P.
9952 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
9954 * typeck2.c (incomplete_type_error): Reorganize to avoid
9955 excessive diagnostics.
9957 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
9959 * lex.c (struct impl_files, internal_filename): Constify a char *.
9961 2000-11-16 Mark Mitchell <mark@codesourcery.com>
9963 * mangle.c (write_special_name_constructor): Don't generate
9964 assembler junk when confronted with an old-style constructor.
9965 (write_special_name_destructor): Likewise.
9966 (mangle_decl_string): Do it here instead.
9968 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
9970 * call.c (op_error): Make error messages clearer.
9972 2000-11-15 Mark Mitchell <mark@codesourcery.com>
9974 * decl.c (wrapup_globals_for_namespace): Don't mark things
9975 TREE_ASM_WRITTEN when they're not.
9977 2000-11-15 Jason Merrill <jason@redhat.com>
9979 * typeck2.c (friendly_abort): Uncount the error before handing
9982 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
9984 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
9986 2000-11-14 Mark Mitchell <mark@codesourcery.com>
9988 * class.c (build_vtbl_initializer): Fix typo in comment.
9989 * typeck.c (expr_sizeof): Don't crash on errors.
9991 2000-11-14 Jim Wilson <wilson@redhat.com>
9993 * lang-specs.h: Add %2 after %(cc1_options).
9995 2000-11-14 Richard Henderson <rth@redhat.com>
9997 * typeck.c (c_sizeof): Be strict about casting result value
9998 back to c_size_type_node.
9999 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
10001 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
10003 * typeck.c (build_unary_op): Use boolean_increment from
10004 c-common.c, moving the relevant code there.
10006 2000-11-11 Jason Merrill <jason@redhat.com>
10008 * typeck.c (mark_addressable): Don't call put_var_into_stack.
10010 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
10013 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10015 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
10016 * lex.c (copy_lang_decl): Likewise.
10018 2000-11-09 Mark Mitchell <mark@codesourcery.com>
10020 * dump.c (cp_dump_tree): Don't dump function bodies here.
10022 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
10023 (dump.o): Update dependency list.
10024 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
10025 (flag_dump_translation_unit): Likewise.
10026 (CP_TYPE_QUALS): Adjust definition.
10027 (DECL_C_BIT_FIELD): Remove.
10028 (SET_DECL_C_BIT_FIELD): Likewise.
10029 (CLEAR_DECL_C_BIT_FIELD): Likewise.
10030 (add_maybe_template): Likewise.
10031 (strip_array_types): Likewise.
10032 (dump_node_to_file): Likewise.
10033 (cp_dump_tree): New function.
10034 * decl.c (init_decl_processing): Set lang_dump_tree.
10035 * decl2.c (flag_dump_translation_unit): Remove.
10036 * dump.c: Move most of it to ../c-dump.c.
10037 (cp_dump_tree): New function.
10038 * pt.c (add_maybe_template): Remove.
10039 * typeck.c (strip_array_types): Likewise.
10041 2000-11-07 Eric Christopher <echristo@redhat.com>
10043 * decl.c (init_decl_processing): Change definition of
10044 __wchar_t to wchar_t. Remove artificial declaration of
10046 * lex.c: Change instances of __wchar_t to wchar_t.
10048 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
10050 * lex.c (do_identifier): Don't lookup_name for operators.
10051 * parse.y (operator): Save looking_for_typename.
10052 (unoperator): Restore it.
10053 * spew.c (frob_opname): Use nth_token for lookahead.
10055 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
10057 * decl.c (grok_op_properties): Always use coerce_new_type and
10058 coerce_delete_type.
10059 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
10060 exception specification. Tidy up.
10061 (coerce_delete_type): Preserve exception specification. Tidy up.
10063 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
10065 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
10066 (push_binding_level), error.c (cp_tree_printer), pt.c
10067 (process_partial_specialization, tsubst_template_arg_vector),
10068 search.c (lookup_member): Use memset () instead of bzero ().
10070 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
10072 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
10074 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
10076 * Make-lang.in (c++.distdir): Remove.
10078 2000-11-04 Mark Mitchell <mark@codesourcery.com>
10080 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
10081 declarations from different namespaces to be combined.
10083 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
10085 * decl.c: Include tm_p.h.
10087 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
10089 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
10091 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
10093 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
10094 (build_overload_value), repo.c (open_repo_file), xref.c
10095 (open_xref_file): Use strchr () and strrchr () instead of index ()
10098 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
10100 * call.c (build_over_call): Call fold on the CALL_EXPR.
10102 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
10104 * error.c (dump_template_decl): Separate template hearders with
10107 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
10109 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
10110 TS_* flags with corresponding TFF_*. Adjust prototypes of
10111 functions (which used to take a tree_string_flags) to take an int.
10113 * cp-tree.h (enum tree_string_flags): Remove
10114 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
10115 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
10116 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
10117 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
10118 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
10119 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
10120 (type_as_string, decl_as_string, expr_as_string,
10121 context_as_string): Adjust prototype.
10123 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
10124 instead of TS_PLAIN.
10126 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
10127 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
10130 2000-10-30 Mark Mitchell <mark@codesourcery.com>
10132 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
10133 (linkage_kind): New enumeration.
10134 (decl_linkage): New function.
10135 * decl2.c (comdat_linkage): Extend comment.
10136 * error.c (dump_function_decl): Print the arguments used to
10137 instantiate a template, even when not printing the type of the
10139 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
10140 not TREE_PUBLIC, to test for external linkage.
10141 * tree.c (decl_linkage): New function.
10143 2000-10-28 Mark Mitchell <mark@codesourcery.com>
10145 * pt.c (instantiate_decl): Always instantiate static data members
10146 initialized in-class.
10148 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
10150 * Make-lang.in: Move all build rules here from Makefile.in,
10151 adapt to new context. Wrap all rules that change the current
10152 directory in parentheses. Expunge all references to $(P).
10153 When one command depends on another and they're run all at
10154 once, use && to separate them, not ;. Add OUTPUT_OPTION to
10155 all object-file generation rules. Delete obsolete variables.
10157 * Makefile.in: Delete.
10158 * config-lang.in: Delete outputs= line.
10160 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
10162 * error.c (dump_function_decl): Print no space between
10163 `ptr-operator' the `type-specifier' of the return type.
10164 (dump_type_prefix): Make sure we put space at the appropriate
10167 2000-10-23 Jason Merrill <jason@redhat.com>
10169 * call.c (equal_functions): Also call decls_match for extern "C" fns.
10171 2000-10-22 Jason Merrill <jason@redhat.com>
10173 * call.c (build_conditional_expr): Use ocp_convert to force
10176 2000-10-22 Mark Mitchell <mark@codesourcery.com>
10178 * call.c (standard_conversion): Use RVALUE_CONVs for all
10179 expressions that satisfy lvalue_p, not just those that satisfy
10182 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
10184 * typeck.c (c_sizeof): Return an expression of `size_t' type,
10185 not one with TYPE_IS_SIZETYPE set.
10186 (dubious_conversion_warnings): Remove special-case code.
10188 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
10190 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
10191 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
10192 (dump_type_prefix): Print vector-of-int as 'int vector'.
10193 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
10194 * tree.c (walk_tree): Handle VECTOR_TYPE.
10196 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
10198 2000-10-21 Jason Merrill <jason@redhat.com>
10200 * parse.y (operator): Set got_object from got_scope.
10201 Set looking_for_typename.
10202 * decl.c (lookup_name_real): Clear val after setting from_obj.
10203 Reorganize diagnostic.
10205 2000-10-20 Jason Merrill <jason@redhat.com>
10207 * tree.c (walk_tree): Don't walk into default args.
10209 * error.c (dump_expr): Use host_integerp.
10211 2000-10-20 David Edelsohn <edelsohn@gnu.org>
10213 * typeck2.c (abstract_virtuals_error): Use "because" instead of
10214 "since" in error message.
10216 Fri Oct 20 13:54:59 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10218 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
10220 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
10222 * decl.c (revert_static_member_fn): Fixed typo.
10224 2000-10-19 Mark Mitchell <mark@codesourcery.com>
10226 * class.c (subobject_offset_fn): New type.
10227 (dfs_record_base_offsets): Remove.
10228 (record_base_offsets): Likewise.
10229 (dfs_search_base_offsets): Likewise.
10230 (record_subobject_offset): New function.
10231 (check_subobject_offset): Likewise.
10232 (walk_subobject_offsets): Likewise.
10233 (record_subobject_offsets): Likewise.
10234 (layout_conflict_p): Reimplement.
10235 (layout_nonempty_base_or_field): Correct handling of type
10236 conflicts during layout.
10237 (layout_empty_base): Likewise.
10238 (build_base_field): Adjust to handle new representation of empty
10240 (build_base_fields): Likewise.
10241 (layout_virtual_bases): Likewise.
10242 (splay_tree_compare_integer_csts): New function.
10243 (layout_class_type): Use a splay_tree, rather than a varray, to
10244 represent the offsets of empty bases.
10246 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
10247 * decl.c (select_decl): Don't return declarations that are
10250 2000-10-18 Mark Mitchell <mark@codesourcery.com>
10252 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
10253 (fake_std_node): New macro.
10254 * decl.c (in_std): Rename to ...
10255 (in_fake_std): ... this.
10256 (flag_no_builtin): Remove.
10257 (flag_no_nonansi_builtin): Likewise.
10258 (walk_namespaces_r): Use fake_std_node.
10259 (push_namespace): Use std_identifier.
10260 (pop_namespace): Use in_fake_std.
10261 (lookup_name_real): Use fake_std_node.
10262 (init_decl_processing): When -fhonor-std, create the `std'
10263 namespace. Don't create a dummy fake_std_node in that case.
10264 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
10265 (builtin_function): Put builtins whose names don't begin
10266 with `_' in the std namespace.
10267 * decl2.c (flag_no_builtin): Remove.
10268 (flag_no_nonansi_builtin): Likewise.
10269 (set_decl_namespace): Use fake_std_node.
10270 (validate_nonmember_using_decl): Likewise.
10271 (do_using_directive): Likewise.
10272 (handle_class_head): Likewise.
10273 * dump.c (dequeue_and_dump): Likewise.
10274 * except.c (init_exception_processing): Use std_identifier.
10275 * init.c (build_member_call): Use fake_std_node.
10276 * rtti.c (init_rtti_processing): Use std_identifier.
10278 2000-10-17 Mark Mitchell <mark@codesourcery.com>
10280 * cp-tree.h (back_end_hook): Remove declaration.
10281 * decl2.c (back_end_hook): Remove definition.
10283 * dump.c (dequeue_and_dump): Dump TREE_USED.
10285 Tue Oct 17 20:19:06 2000 Brad Lucier <lucier@math.purdue.edu>
10287 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
10289 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
10291 * decl.c (WINT_TYPE): Define.
10292 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
10293 c_size_type_node, signed_size_type_node and wint_type_node.
10295 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
10297 * decl2.c (warn_missing_format_attribute): New variable.
10298 (lang_decode_option): Decode -Wmissing-format-attribute.
10300 2000-10-16 Mark Mitchell <mark@codesourcery.com>
10302 * typeck.c (qualify_type): Remove.
10303 (composite_pointer_type): Fix handling of conversions to `cv void*'.
10305 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10307 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
10309 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10311 * Makefile.in (parse.c, parse.h): Create atomically.
10313 2000-10-12 Mark Mitchell <mark@codesourcery.com>
10315 * class.c (current_obstack): Remove.
10316 * decl.c (ggc_p): Remove.
10317 (start_decl): Don't use decl_tree_cons.
10318 (grokdeclarator): Don't use build_decl_list.
10319 (start_function): Don't use decl_tree_cons.
10320 (finish_function): Don't mess with obstacks.
10321 * decl2.c (grok_x_components): Don't use build_decl_list.
10322 * lex.c (make_call_declarator): Don't call decl_tree_cons.
10323 (implicitly_declare_fn): Don't call build_decl_list.
10324 * parse.y (frob_specs): Don't call build_decl_list or
10326 (expr_or_declarator_intern): Don't call decl_tree_cons.
10327 (primary): Don't call build_decl_list.
10328 (fcast_or_absdcl): Likewise.
10329 (typed_declspecs): Don't call decl_tree_cons.
10330 (reserved_declspecs): Don't call build_decl_list.
10331 (declmods): Likewise.
10332 (reserved_typespecquals): Likewise.
10334 (new_type_id): Likewise.
10335 (cv_qualifiers): Likewise.
10336 (after_type_declarator_intern): Likewise.
10337 (notype_declarator_intern): Likewise.
10338 (absdcl_intern): Likewise.
10339 (named_parm): Likewise.
10340 * pt.c (most_specialized_class): Likewise.
10341 * repo.c (temporary_obstack): Make it a structure, not a pointer.
10342 (init_repo): Initialize it.
10343 * search.c (current_obstack): Remove.
10344 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
10346 2000-10-09 Richard Henderson <rth@cygnus.com>
10348 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
10349 (c++ language support bits for libgcc): Remove.
10350 (c++.clean): Remove cplib2.txt cleanup.
10351 * config-lang.in (headers, lib2funcs): Remove.
10353 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
10354 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
10355 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
10356 * inc/new.h, inc/typeinfo: Remove files.
10358 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
10360 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
10362 (init_decl_processing): Initialize intmax_type_node and
10365 2000-10-06 Richard Henderson <rth@cygnus.com>
10367 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
10368 (original_result_rtx): Remove.
10369 * decl.c (save_function_data): Don't clear x_result_rtx.
10370 (mark_lang_function): Don't mark it either.
10371 * expr.c (fixup_result_decl): Remove.
10372 * semantics.c (genrtl_named_return_value): Frob the return decl
10373 before calling emit_local_var.
10374 (genrtl_finish_function): Don't call fixup_result_decl.
10375 Always emit the jump to return_label.
10377 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
10379 * pt.c (lookup_template_class): Set current access for enum.
10380 (tsubst_enum): Set file & line for enum decl.
10382 * spew.c (yylex): Remove unused variable.
10384 2000-10-05 Richard Henderson <rth@cygnus.com>
10386 * semantics.c (genrtl_finish_function): Don't init or check
10387 can_reach_end; remove noreturn and return value checks.
10389 2000-10-05 Tom Tromey <tromey@cygnus.com>
10391 * init.c (build_java_class_ref): Use `build_static_name' with a
10392 suffix, not a prefix, to build the class object's name.
10394 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
10396 * cp-tree.h (access_kind): Fix comment typo.
10397 * decl2.c (grokfield): Fix diagnostic typo.
10398 * semantics.c (finish_template_type): Fix comment typo.
10399 (finish_qualified_object_call_expr): Likewise.
10401 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
10403 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
10406 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
10408 * spew.c (frob_id): New static function.
10409 (frob_opname): Use it.
10412 2000-10-01 Mark Mitchell <mark@codesourcery.com>
10414 * decl.c (lang_mark_false_label_stack): Remove.
10415 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
10417 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
10419 * gxxint.texi: Use @email for formatting email addresses.
10421 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
10423 * error.c: Remove direct obstack manipulation. Replace with
10424 output_buffer-based formatting. Adjust calls to removed macros.
10425 (obstack_chunk_alloc, obstack_chunk_free): Remove.
10426 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
10427 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
10429 2000-09-24 Mark Mitchell <mark@codesourcery.com>
10431 * ir.texi: Move to ../c-tree.texi.
10433 2000-09-20 Jason Merrill <jason@redhat.com>
10435 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
10437 2000-09-21 Andreas Jaeger <aj@suse.de>
10439 * errfn.c: Move declaration of cp_printer and cp_printers to ...
10440 * cp-tree.h: ... here.
10442 * error.c: Remove declaration of cp_printer.
10444 2000-09-20 Mark Mitchell <mark@codesourcery.com>
10446 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
10448 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
10450 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
10453 2000-09-18 Mark Mitchell <mark@codesourcery.com>
10455 * decl.c (start_function): Robustify.
10457 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10459 * cp-tree.h (check_function_format): Accept a `status' parameter.
10461 * call.c, typeck.c: Updates calls to `check_function_format'.
10463 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
10465 * decl2.c (handle_class_head): Always push some scope even
10468 2000-09-16 Mark Mitchell <mark@codesourcery.com>
10470 * cp-tree.h (struct cp_language_function): Remove
10471 x_scope_stmt_stack and name_declared.
10472 (current_scope_stmt_stack): Remove.
10473 (function_name_declared_p): New macro.
10474 (struct lang_decl_flags): Use c_lang_decl as a base class.
10476 (struct lang_decl): Replace saved_tree with context.
10477 (DECL_FRIEND_CONTEXT): Adjust accordingly.
10478 (SET_DECL_FRIEND_CONTEXT): Likewise.
10479 (DECL_VIRTUAL_CONTEXT): Likewise.
10480 (DECL_SAVED_TREE): Remove.
10481 (C_DECLARED_LABEL_FLAG): Likewise.
10482 (cplus_expand_expr_stmt): Don't declare.
10483 (add_decl_stmt): Likewise.
10484 (add_scope_stmt): Likewise.
10485 * decl.c (mark_stmt_tree): Remove.
10486 (case_compare): Likewise.
10487 (finish_case_label): Use c_add_case_label.
10488 (init_decl_processing): Set more language-specific hooks.
10489 (build_enumerator): Fix typo in comment.
10490 (cplus_expand_expr_stmt): Remove.
10491 (mark_lang_function): Use mark_c_language_function.
10492 (lang_mark_tree): Use c_mark_lang_decl.
10493 * decl2.c: Change order of inclusion.
10494 * except.c: Likewise.
10495 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
10496 back on c_expand_expr.
10497 * friend.c: Include expr.h.
10498 * init.c: Change order of inclusion.
10499 * Makefile.in: Update dependencies.
10500 * lex.h (free_lang_decl_chain): Remove.
10501 * optimize.c (maybe_clone_body): Use function_name_declared_p.
10502 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
10504 (instantiate_decl): Use function_name_declared_p.
10505 * semantics.c (lang_expand_expr_stmt): Remove.
10506 (set_current_function_name_declared): Likewise.
10507 (current_function_name_declared): Likewise.
10508 (begin_compound_stmt): Use function_name_declared_p.
10509 (add_decl_stmt): Remove.
10510 (setup_vtbl_ptr): Use function_name_declared_p.
10511 (add_scope_stmt): Remove.
10512 (current_scope_stmt_stack): New function.
10513 (cp_expand_stmt): Don't handle SCOPE_STMTs.
10514 (expand_body): Use function_name_declared_p.
10515 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
10516 * typeck.c: Change order of includes.
10517 (convert_sequence): Remove.
10519 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
10521 * lex.c (reswords): Add _Complex.
10523 Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10525 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
10527 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
10529 * init.c (begin_init_stmts): Don't use // comments.
10531 2000-09-12 Jason Merrill <jason@redhat.com>
10533 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
10534 all non-extern arrays.
10536 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
10537 typenames, too. Downgrade complaint to pedwarn.
10538 (xref_tag): Warn about surprising behavior of 'friend struct T'.
10539 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
10540 'class This::Inherited'.
10542 2000-09-12 Mark Mitchell <mark@codesourcery.com>
10544 * decl.c (finish_case_label): Given the LABEL_DECL a
10547 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
10549 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
10550 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
10551 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
10552 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
10553 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
10555 (sorry_for_unsupported_tree, print_scope_operator,
10556 print_left_paren, print_right_paren, print_left_bracket,
10557 print_right_bracket, print_whitespace): Likewise.
10558 (aggr_variety): Rename to class_key_or_enum.
10559 (print_type): Rename to print_type_id.
10560 (print_type_specifier_seq, print_simple_type_specifier,
10561 print_elaborated_type_specifier,
10562 print_rest_of_abstract_declarator,
10563 print_parameter_declaration_clause, print_exception_specification,
10564 print_nested_name_specifier, print_template_id,
10565 typedef_original_name, print_template_argument_list_start,
10566 print_template_argument_list_end): New functions.
10568 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
10570 * ir.texi: Add more documentation.
10572 2000-09-11 Mark Mitchell <mark@codesourcery.com>
10574 * cp-tree.h (struct saved_scope): Remove x_function_parms.
10575 (current_function_parms): Don't define.
10576 (struct cp_language_function): Remove parms_stored.
10577 (current_function_just_assigned_this): Don't define.
10578 (current_function_parms_stored): Likewise.
10579 (static_ctors): Declare.
10580 (static_dtors): Likewise.
10581 (SF_EXPAND): Don't define.
10582 (expand_start_early_try_stmts): Remove declaration.
10583 (store_parm_decls): Likewise.
10584 * decl.c (static_ctors): Don't declare.
10585 (static_dtors): Likewise.
10586 (struct binding_level): Remove this_block.
10587 (poplevel): Remove dead code.
10588 (set_block): Likewise.
10589 (mark_binding_level): Don't mark this_block.
10590 (mark_saved_scope): Don't mark x_function_parms.
10591 (init_decl_processing): Don't add current_function_parms as a GC
10593 (check_function_type): Change prototype.
10594 (start_function): Remove RTL-generation code.
10595 (expand_start_early_try_stmts): Remove.
10596 (store_parm_decls): Give it internal linkage. Remove
10597 RTL-generation code.
10598 (finish_function): Remove RTL-generation code.
10599 * decl2.c (static_ctors): Fix formatting.
10600 (static_dtors): Likewise.
10601 * method.c (use_thunk): Don't call store_parm_decls.
10602 (synthesize_method): Likewise.
10603 * optimize.c (maybe_clone_body): Likewise.
10604 * parse.y (fn.def2): Likewise.
10605 (.set_base_init): Likewise.
10606 (nodecls): Likewise.
10607 * pt.c (instantiate_decl): Likewise.
10608 * rtti.c (synthesize_tinfo_fn): Likewise.
10609 * semantics.c (genrtl_try_block): Simplify.
10610 (expand_body): Use genrtl_start_function and
10611 genrtl_finish_function.
10612 (genrtl_start_function): New function.
10613 (genrtl_finish_function): Likewise.
10615 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
10617 * error.c (cp_tree_printer, case 'P'): Append break.
10619 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
10621 * cp-tree.h (frob_opname): Declare.
10622 * parse.y (saved_scopes): New static variable.
10623 (cp_parse_init): Adjust.
10624 (do_id): If lastiddecl is NULL, do do_identifier.
10625 (operator): Save scope information.
10626 (unoperator): New reduction. Restore scope information.
10627 (operator_name): Append unoperator. Call frob_opname.
10628 * spew.c (frob_opname): Define.
10630 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
10632 * decl.c, rtti.c: Include defaults.h if not already included.
10633 Don't define the *_TYPE_SIZE macros.
10635 2000-09-09 Mark Mitchell <mark@codesourcery.com>
10637 * cp-tree.h (push_switch): Change prototype.
10638 (check_cp_case_value): Remove declaration.
10639 (decl_constant_value): Likewise.
10640 * decl.c (struct cp_switch): Add switch_stmt and cases.
10641 (case_compare): New function.
10642 (push_switch): Set switch_stmt. Initialize cases.
10643 (pop_switch): Clean up cases.
10644 (define_case_label): Rename to ...
10645 (finish_case_label): ... this. Do semantic analysis for case
10647 (start_function): Correct comment.
10648 * decl2.c (check_cp_case_value): Remove.
10649 * expr.c (do_case): Remove.
10650 * pt.c (tsubst_expr): Adjust call to finish_case_label.
10651 * semantics.c (genrtl_do_poplevel): Remove declaration.
10652 (RECHAIN_STMTS): Remove.
10653 (finish_break_stmt): Use build_break_stmt.
10654 (finish_continue_stmt): Use build_continue_stmt.
10655 (finish_switch_cond): Adjust condition here, rater than in
10656 c_expand_start_case.
10657 (finish_case_label): Remove.
10658 * typeck.c (c_expand_return): Remove.
10659 (c_expand_start_case): Likewise.
10661 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
10663 * ir.texi: Document type nodes.
10665 2000-09-06 Mark Mitchell <mark@codesourcery.com>
10667 * cp-tree.h (init_cp_semantics): Declare.
10668 (genrtl_try_block): Don't declare.
10669 (genrtl_handler): Likewise.
10670 (genrtl_catch_block): Likewise.
10671 (genrtl_ctor_stmt): Likewise.
10672 (genrtl_subobject): Likewise.
10673 (genrtl_do_poplevel): Likewise.
10674 (genrtl_named_return_value): Likewise.
10675 * lex.c (init_parse): Call init_cp_semantics.
10676 * semantics.c (genrtl_try_block): Give it internal linkage.
10677 (genrtl_handler): Likewise.
10678 (genrtl_catch_block): Likewise.
10679 (genrtl_ctor_stmt): Likewise.
10680 (genrtl_subobject): Likewise.
10681 (genrtl_do_poplevel): Likewise.
10682 (genrtl_named_return_value): Likewise.
10683 (lang_expand_stmt): Rename to ...
10684 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
10685 (init_cp_semantics): Define.
10687 * decl.c (initialize_local_var): Remove RTL-generating code.
10688 * semantics.c (genrtl_try_block): Fix formatting.
10690 Move statement-tree facilities from C++ to C front-end.
10691 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
10692 (void_zero_node): Remove.
10693 (stmt_tree): Likewise.
10694 (scope_chain): Adjust.
10695 (language_function): Rename to cp_language_function.
10696 (cp_function_chain): Adjust.
10697 (current_stmt_tree): Remove.
10698 (last_tree): Likewise.
10699 (last_expr_type): Likewise.
10700 (struct lang_decl): Adjust.
10701 (STMT_IS_FULL_EXPR_P): Remove.
10702 (add_tree): Remove.
10703 (begin_stmt_tree): Likewise.
10704 (finish_stmt_tree): Likewise.
10705 (walk_tree_fn): Likewise.
10706 (walk_stmt_tree): Likewise.
10707 * class.c (finish_struct): Replace use of add_tree with add_stmt.
10708 * decl.c (mark_stmt_tree): Adjust type.
10709 (init_decl_processing): Don't build void_zero_node.
10710 (initialize_local_var): Adjust usage of current_stmt_tree.
10711 (finish_enum): Use add_stmt, not add_tree.
10712 (save_function_data): Adjust use of language_function.
10713 (finish_constructor_body): Use add_stmt, not add_tree.
10714 (finish_destructor_body): Likewise.
10715 (push_cp_function_context): Adjust use of language_function.
10716 (pop_cp_function_context): Likewise.
10717 (mark_lang_function): Likewise.
10718 (mark_cp_function_context): Likewise.
10719 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
10720 (build_vec_init): Likewise.
10721 * semantics.c (SET_LAST_STMT): Remove.
10722 (RECHAIN_STMTS): Don't use it.
10723 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
10724 (current_stmt_tree): Define.
10725 (add_tree): Remove.
10726 (finish_goto_stmt): Use add_stmt, not add_tree.
10727 (finish_expr_stmt): Likewise.
10728 (begin_if_stmt): Likewise.
10729 (finish_then_clause): Likewise.
10730 (begin_while_stmt): Likewise.
10731 (begin_do_stmt): Likewise.
10732 (finish_return_stmt): Likewise.
10733 (begin_for_stmt): Likewise.
10734 (finish_break_stmt): Likewise.
10735 (finish_continue_stmt): Likewise.
10736 (begin_switch_stmt): Likewise.
10737 (finish_case_label): Likewise.
10738 (begin_try_block): Likewise.
10739 (begin_function_try_block): Likewise.
10740 (begin_handler): Likewise.
10741 (begin_catch_block): Likewise.
10742 (begin_compound_stmt): Likewise.
10743 (begin_asm_stmt): Likewise.
10744 (finish_asm_stmt): Likewise.
10745 (finish_label_stmt): Likewise.
10746 (add_decl_stmt): Likewise.
10747 (finish_subobject): Likewise.
10748 (finish_decl_cleanup): Likewise.
10749 (finish_named_return_value): Likewise.
10750 (setup_vtbl_ptr): Likewise.
10751 (add_scope_stmt): Likewise.
10752 (finish_stmt_expr): Likewise.
10753 (prune_unused_decls): Remove.
10754 (begin_stmt_tree): Likewise.
10755 (finish_stmt_tree): Likewise.
10756 (prep_stmt): Adjust use of current_stmt_tree.
10757 (lang_expand_stmt): Likewise.
10758 * tree.c (statement_code_p): Remove.
10759 (cp_statement_code_p): New function.
10760 (walk_stmt_tree): Remove.
10761 (init_tree): Set lang_statement_code_p.
10763 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
10765 Integrated preprocessor.
10767 * Make-lang.in, Makefile.in: Remove all references to input.c,
10768 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
10769 * gxx.gperf, hash.h, input.c: Delete.
10770 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
10771 initialized properly.
10773 * class.c (fixup_pending_inline): Take a tree, not a
10774 struct pending_inline *. All callers changed.
10775 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
10776 RID_PROTECTED entries in ridpointers[] array here.
10777 * decl.c (duplicate_decls): Do not refer to struct
10779 (record_builtin_type, init_decl_processing): Use RID_MAX not
10781 (grokdeclarator): Use C_IS_RESERVED_WORD.
10782 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
10784 (grok_x_components): Do not inspect pending_inlines chain.
10786 * cp-tree.h (struct lang_identifier): Add rid_code entry.
10787 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
10788 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
10789 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
10790 TIME_IDENTIFIER_FILEINFO): Kill.
10792 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
10793 single 32-bit word.
10794 * parse.y: Call do_pending_inlines unconditionally.
10795 reinit_parse_for_method is now snarf_method. fn.defpen is no
10796 longer necessary. Remove unnecessary <itype> annotation on
10797 SCOPE. Do not refer to end_of_file or struct pending_inline.
10798 * semantics.c (begin_inline_definitions): Call
10799 do_pending_inlines unconditionally.
10801 * lex.c: Remove all code now shared with C front end.
10802 Initialize cpplib properly if USE_CPPLIB. Put reserved words
10803 into the get_identifier table. Rewrite pragma handling to
10804 work with the registry. Move code to save tokens for later
10805 processing to spew.c.
10807 * spew.c: Rewrite everything in terms of token streams instead
10808 of text. Move routines here from lex.c / input.c as
10809 appropriate. GC-mark trees hanging off the pending inlines
10812 2000-09-06 Mark Mitchell <mark@codesourcery.com>
10814 * NEWS: Mention that the named return value extension has been
10816 * cp-tree.h (original_result_rtx): Define.
10817 (TREE_REFERENCE_EXPR): Remove.
10818 (DECL_VPARENT): Likewise.
10819 (pushdecl_nonclass_level): Likewise.
10820 (store_return_init): Likewise.
10821 (reinit_lang_specific): Likewise.
10822 (genrtl_named_return_value): Change prototype.
10823 * decl.c (original_result_rtx): Remove.
10824 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
10825 Do not generate RTL for local variables here.
10826 (store_return_init): Remove.
10827 * semantics.c (genrtl_named_return_value): Simplify. Fold in
10829 (finish_named_return_value): Adjust accordingly. Warn that this
10830 extension is deprecated.
10831 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
10833 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
10835 * pt.c (type_unification_real): Replace switch with if.
10836 (unify): Tsubst non-type parms before comparing.
10838 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
10840 * error.c (dump_typename): New function, broken out of ...
10841 (dump_type): ... here. Use it.
10842 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
10844 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
10846 * init.c (build_offset_ref): Deal with namespace scoped
10849 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
10851 * class.c (resolve_address_of_overloaded_function): Add
10852 explanation message.
10853 * decl.c (define_case_label): Reformat explanation.
10854 * decl2.c (finish_static_data_member_decl): Likewise.
10855 (grokfield): Likewise.
10856 * friend.c (do_friend): Likewise.
10858 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
10860 * tree.c (walk_tree): Expose tail recursion.
10861 (walk_stmt_tree): New function.
10862 * cp-tree.h: Prototype walk_stmt_tree.
10863 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
10864 the BLOCKs directly. If a BLOCK has no variables after
10865 pruning, discard it.
10866 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
10867 restore the line number.
10869 2000-09-05 Mark Mitchell <mark@codesourcery.com>
10871 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
10872 (pt.o): Remove dependency on HTAB_H.
10873 * cp-tree.h: Include hashtab.h.
10874 (walk_tree): Change prototype.
10875 (walk_tree_without_duplicates): New function.
10876 * decl.c (check_default_argument): Use it.
10877 * optimize.c (remap_decl): Adjust calls to walk_tree.
10878 (copy_body): Likewise.
10879 (expand_calls_inline): Likewise.
10880 (calls_setjmp_p): Use walk_tree_without_duplicates.
10881 * pt.c: Don't include hashtab.h.
10882 (for_each_template_parm): Use walk_tree_without_duplicates.
10883 * semantics.c (finish-stmt_tree): Likewise.
10884 (expand_body): Likewise.
10885 * tree.c (walk_tree): Add additional parameter.
10886 (walk_tree_without_duplicates): New function.
10887 (count_trees): Use it.
10888 (verify_stmt_tree): Adjust call to walk_tree.
10889 (find_tree): Use walk_tree_without_duplicates.
10890 (no_linkage_check): Likewise.
10891 (break_out_target_exprs): Adjust call to walk_tree.
10892 (cp_unsave): Likewise.
10894 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10896 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
10897 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
10898 * cp-tree.h (TYPE_BINFO): Adjust comment.
10899 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
10900 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
10901 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
10902 (TYPE_TEMPLATE_INFO): Likewise.
10903 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
10904 * class.c (push_nested_class): Likewise.
10905 * decl.c (lookup_name_real): Likewise.
10906 (grokdeclarator): Likewise.
10907 (grok_op_properties): Likewise.
10908 (xref_tag): Likewise.
10909 (xref_basetypes): Likewise.
10910 * decl2.c (constructor_name_full): Likewise.
10911 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
10912 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
10913 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
10914 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10915 (dump_type_suffix): Likewise.
10916 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
10918 (get_aggr_from_typedef): Likewise.
10919 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
10920 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10921 (write_template_parm): Likewise.
10922 (write_template_template_parm): Check tree code instead of
10923 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10924 * method.c (build_overload_nested_name): Add
10925 BOUND_TEMPLATE_TEMPLATE_PARM.
10926 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
10927 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10928 * pt.c (convert_template_argument): Check tree code instead of
10929 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10930 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
10931 (for_each_template_parm): Adjust comment.
10932 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
10933 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10934 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
10935 template_args_equal to compare template template parameter cases.
10936 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10937 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
10939 * tree.c (copy_template_template_parm): Decide whether to create
10940 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
10941 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10942 (copy_tree_r): Likewise.
10943 * typeck.c (comptypes): Likewise. Check tree code instead of
10944 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10946 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
10948 * decl.c (finish_function): Move the code for handling functions
10949 marked with the constructor and destructor attributes inside the
10952 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
10954 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
10956 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
10958 * pt.c (lookup_template_class): Remove abort.
10959 * tree.c (get_type_decl): Allow error_mark_node.
10961 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
10963 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
10966 2000-09-03 Mark Mitchell <mark@codesourcery.com>
10968 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
10971 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
10973 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
10974 union tag mismatch error reporting.
10976 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
10978 * call.c (build_scoped_method_call): Check it is not a namespace.
10980 2000-08-30 Jason Merrill <jason@redhat.com>
10982 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
10984 * tree.c (bot_manip): Check TREE_CONSTANT rather than
10985 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
10986 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
10988 * decl.c (start_function): Always call make_function_rtl.
10990 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
10992 * semantics.c (prune_unused_decls): New function.
10993 (finish_stmt_tree): Call it via walk_tree.
10995 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
10997 * class.c (build_secondary_vtable): Constify a char *.
10998 * decl.c (init_decl_processing): Initialize function_id_node,
10999 pretty_function_id_node, and func_id_node.
11000 * input.c (struct input_source): Constify 'str'.
11001 (feed_input): Constify first argument.
11002 * mangle.c (write_identifier): Constify argument.
11003 * pt.c (mangle_class_name_for_template): Constify argument.
11005 2000-08-29 Mark Mitchell <mark@codesourcery.com>
11007 * typeck.c (mark_addressable): Remove code that pokes around in
11010 2000-08-28 Jason Merrill <jason@redhat.com>
11012 * lex.c (file_name_nondirectory): Move to toplev.c.
11014 * cp-tree.h (LOCAL_CLASS_P): New macro.
11015 * class.c (finish_struct_1): Use it.
11017 2000-08-27 Alex Samuel <samuel@codesourcery.com>
11019 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
11020 (write_encoding): Pass another argument to write_name.
11021 (write_name): Add ignore_local_scope parameter. Fix handling of
11023 (write_nested_name): Use write_unqualified_name.
11024 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
11025 (write_template_prefix): Use write_unqualified_name.
11026 (write_component): Remove.
11027 (write_local_name): Add parameter. Use direct local entity to
11028 discriminator calculation.
11029 (write_class_enum_type): Pass another argument to write_name.
11030 (write_template_template_arg): Likewise.
11031 (make_guard_variable): Likewise.
11033 2000-08-27 Jason Merrill <jason@redhat.com>
11035 * decl.c (pushdecl): Matching decls for local externs are found in
11036 the current level. Propagate linkage information from previous
11039 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
11041 * ir.texi (Expressions): Fix typo.
11043 2000-08-25 Greg McGary <greg@mcgary.org>
11045 * tree.c (init_tree): Use ARRAY_SIZE.
11047 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
11049 * error.c (cp_tree_printer): Rework.
11051 2000-08-25 Mark Mitchell <mark@codesourcery.com>
11053 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
11055 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
11056 (cp-demangle.o): Remove target.
11057 (dyn-string.o): Likewise.
11059 * decl.c (grokfndecl): Require that `main' return an `int'.
11060 * mangle.c (write_encoding): Don't mangle return types for
11061 conversion functions.
11063 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
11065 * error.c (tree_formatting_info): New data type.
11066 (tree_being_formatted): New macro.
11067 (tree_formatting_flags): Likewise.
11068 (put_whitespace): Likewise.
11069 (print_tree_identifier): Likewise.
11070 (print_identifier): Likewise.
11071 (cp_tree_printer, print_function_argument_list, print_declaration,
11072 print_expression, print_function_declaration,
11073 print_function_parameter, print_type, print_cv_qualifier): New
11075 (init_error): Initialize lang_printer.
11077 2000-08-24 Jason Merrill <jason@redhat.com>
11079 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
11080 adjustment necessary.
11082 2000-08-24 Greg McGary <greg@mcgary.org>
11084 * cp-tree.h (MAIN_NAME_P): Remove macro.
11086 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
11088 * error.c (print_instantiation_context): Don't forget to flush the
11091 2000-08-23 Jason Merrill <jason@redhat.com>
11093 * typeck.c (build_ptrmemfunc): Save the input pmf.
11095 * method.c (process_modifiers): Use same_type_p.
11097 2000-08-23 Mark Mitchell <mark@codesourcery.com>
11099 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
11100 * mangle.c (write_function_type): Change prototype.
11101 (write_encoding): Don't mangle return types for
11102 constructors or destructors.
11103 (write_type): Adjust call to write_function_type.
11104 * pt.c (instantiate_template): Instantiate alternate entry points
11105 when instantiating the main function.
11107 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
11109 * error.c (cp_print_error_function): Don't use embedded '\n' in
11112 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
11114 * decl.c (init_decl_processing): Remove bogus initialization.
11115 * error.c (lang_print_error_function): Restore here.
11116 (init_error): Initialize print_error_function.
11118 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11120 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
11122 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
11124 * Makefile.in (error.o): Depends on diagnostic.h
11126 * cp-tree.h (problematic_instantiation_changed,
11127 record_last_problematic_instantiation, current_instantiation,
11128 print_instantiation_context): Declare.
11129 (maybe_print_template_context): Remove.
11131 * decl.c (init_decl_processing): Set print_error_function to NULL.
11132 (lang_print_error_function): Remove, since we're using a new
11135 * error.c: #include diagnostic.h
11136 (function_category): New function.
11137 (cp_diagnostic_starter): Likewise.
11138 (cp_diagnostic_finalizer): Likewise.
11139 (cp_print_error_function): Likewise.
11140 (maybe_print_instantiation_context): Likewise.
11141 (print_instantiation_full_context): Likewise.
11142 (print_instantiation_partial_context): Likewise.
11143 (print_instantiation_context): Define.
11144 (init_error): Initialize diagnostic pager and finalizer.
11146 * pt.c (problematic_instantiation_changed): Define.
11147 (record_last_problematic_instantiation): Likewise.
11148 (current_instantiation): Likewise.
11149 (maybe_print_template_context): Remove.
11150 (print_template_context): Likewise.
11151 (current_tinst_level): Make static to reflect Brendan Kehoe's
11152 change of 1995-04-13.
11153 (push_tinst_level): Call print_instantiation_context.
11155 2000-08-21 Nix <nix@esperi.demon.co.uk>
11157 * lang-specs.h: Do not process -o or run the assembler if
11160 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
11162 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
11164 * decl2.c (lang_decode_option): Disable gettext attributes for
11167 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
11169 * lex.c (lang_init_options): Default diagnostic message maximum
11170 length to 80, when line-wrapping.
11172 2000-08-20 Mark Mitchell <mark@codesourcery.com>
11174 * class.c (build_vtbl_initializer): Clear the entire
11175 vtbl_init_data. Start keeping track of the functions for which we
11176 have created vcall offsets here.
11177 (dfs_build_vcall_offset_vtbl_entries): Remove.
11178 (build_vcall_offset_vtbl_entries): Reimplement.
11179 (add_vcall_offset_vtbl_entries_r): New function.
11180 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
11181 computing when vcall offsets are necessary.
11183 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
11185 * decl.c (member_function_or_else): Use cp_error ... %T.
11186 (grokdeclarator): Likewise.
11187 (start_method): Likewise.
11188 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
11190 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
11192 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
11195 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
11197 * cp-tree.h (PTRMEM_OK_P): New macro.
11198 (itf_ptrmem_ok): New enumeration value.
11199 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
11200 argument. Diagnose implicit pointer to member.
11201 (instantiate_type): Don't diagnose implicit pointer to member
11202 here. Pass itf_ptrmem_ok if ok. Adjust calls to
11203 resolve_address_of_overloaded_function.
11204 * init.c (build_offset_ref): Set PTRMEM_OK_P.
11205 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
11206 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
11207 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
11208 (build_unary_op): Deal with single non-static member in
11211 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
11213 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
11215 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
11217 * cp-tree.h (enum_name_string): Remove prototype.
11218 (report_case_error): Remove prototype.
11219 * cp/typeck2.c (enum_name_string): Remove.
11220 (report_case_error): Remove.
11221 * error.c (dump_expr): Deal with enum values directly.
11222 Correctly negate integer constant.
11224 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
11226 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
11227 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
11228 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
11229 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
11230 (__cxa_vec_new): Use __cxa_vec_new2.
11231 (__cxa_vec_delete): Use __cxa_vec_delete2.
11233 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
11235 * vec.cc (__cxa_vec_new): Set "C" linkage.
11236 (__cxa_vec_ctor): Likewise.
11237 (__cxa_vec_cctor): Likewise.
11238 (__cxa_vec_dtor): Likewise.
11239 (__cxa_vec_delete): Likewise.
11240 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
11241 (__cxa_vec_ctor): Likewise.
11242 (__cxa_vec_cctor): Likewise.
11243 (__cxa_vec_dtor): Likewise.
11244 (__cxa_vec_delete): Likewise.
11246 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
11248 * class.c (instantiate_type): Reinstate local variable
11249 deleted in previous change.
11251 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
11254 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
11256 * cp-tree.h (instantiate_type_flags): New enumeration.
11257 (instantiate_type): Change parameter.
11258 * class.c (instantiate_type): Adjust prototype. Adjust.
11259 * call.c (standard_conversion): Adjust instantiate_type call.
11260 (reference_binding): Likewise.
11261 (build_op_delete_call): Likewise.
11262 (convert_like_real): Likewise.
11263 * cvt.c (cp_convert_to_pointer): Likewise.
11264 (convert_to_reference): Likewise.
11265 * pt.c (convert_nontype_argument): Likewise.
11266 * typeck.c (build_binary_op): Likewise.
11267 (build_ptrmemfunc): Likewise.
11268 (convert_for_assignment): Likewise.
11270 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
11272 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
11273 (current_aggr): Define.
11274 * decl.c (grokdeclarator): Make sure a friend class is an
11275 elaborated type specifier.
11276 * parse.y (current_aggr): Remove static definition.
11277 (cp_parse_init): Adjust.
11278 (structsp): Clear and restore current_aggr.
11279 (component_decl_list): Clear current_aggr.
11281 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
11282 aggregate tag on the typename's context.
11284 * pt.c (tsubst_friend_class): Return error_mark_node, if
11285 parms becomes NULL.
11286 (instantiate_class_template): Ignore error_mark_node friend types.
11288 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
11290 * cvt.c (warn_ref_binding): New static function, broken out of ...
11291 (convert_to_reference): ... here. Use it.
11293 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
11295 * parse.y (template_arg): Add rule for template qualified with
11298 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11300 * decl2.c (add_function): Reorganize.
11301 (arg_assoc): Do not consider function template decls.
11303 2000-08-11 Jason Merrill <jason@redhat.com>
11305 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
11308 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
11310 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
11311 (lookup_nested_tag): Likewise.
11313 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
11316 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
11318 * parse.y (named_complex_class_head_sans_basetype): Remove
11321 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
11323 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
11324 explicit TEMPLATE_ID_EXPR args.
11325 (build_expr_from_tree, case CALL_EXPR): Likewise.
11327 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
11329 * decl.c (check_tag_decl): Diagnose typename's which don't
11332 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
11334 * init.c (build_aggr_init): Reject bogus array initializers
11337 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
11339 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
11341 * cp/tinfo.cc (__dynamic_cast): Likewise.
11342 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
11344 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
11346 * cvt.c (convert_to_pointer_force): Fix error message when
11347 attempting to cast from ambiguous base.
11349 2000-08-08 Jason Merrill <jason@redhat.com>
11351 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
11352 (tsubst_template_arg_vector): Likewise.
11354 * decl2.c (build_anon_union_vars): Choose the largest field; don't
11355 assume that one will be as large as the union.
11357 2000-08-07 Kazu Hirata <kazu@hxi.com>
11359 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
11360 * decl.c (pop_labels): Likewise.
11362 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
11364 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
11366 (__pointer_to_member_type_info): Likewise.
11367 (__base_class_info): Likewise.
11368 (__class_type_info): Likewise.
11369 (__si_class_type_info): Likewise.
11370 (__vmi_class_type_info): Likewise.
11371 * tinfo.cc (__si_class_type_info::__do_find_public_src):
11372 Changed member names to match specifications.
11373 (__vmi_class_type_info::__do_find_public_src): Likewise.
11374 (__si_class_type_info::__do_dyncast): Likewise.
11375 (__vmi_class_type_info::__do_dyncast): Likewise.
11376 (__si_class_type_info::__do_upcast): Likewise.
11377 (__vmi_class_type_info::__do_upcast): Likewise.
11378 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
11379 (__pbase_type_info::__pointer_catch): Likewise.
11380 (__pointer_type_info::__pointer_catch): Likewise.
11381 (__pointer_to_member_type_info::__pointer_catch): Likewise.
11383 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
11385 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
11386 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
11387 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
11389 2000-08-04 Mark Mitchell <mark@codesourcery.com>
11391 * cp-tree.h (add_method): Change prototype.
11392 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
11393 Don't double the size of the method vector in the error case.
11394 (handle_using_decl): Adjust call to add_method.
11395 (add_implicitly_declared_members): Likewise.
11396 (clone_function_decl): Likewise.
11397 * decl2.c (check_classfn): Likewise.
11398 * semantics.c (finish_member_declaration): Likewise.
11400 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
11402 * decl.c (flag_isoc94): New variable.
11404 2000-08-02 Jason Merrill <jason@redhat.com>
11406 * pt.c (do_type_instantiation): Add complain parm; don't complain
11407 if called recursively.
11408 * cp-tree.h, parse.y: Adjust.
11410 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
11412 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
11413 -Wno-strict-prototypes.
11415 * g++spec.c: Adjust type of second argument to
11416 lang_specific_driver, and update code as necessary.
11418 * cp-tree.h: Don't prototype min_precision here.
11419 (my_friendly_assert): Cast expression to void.
11420 * semantics.c (do_poplevel): Initialize scope_stmts.
11422 2000-08-02 Mark Mitchell <mark@codesourcery.com>
11424 * cp-tree.h (DECL_NEEDED_P): Tweak.
11426 2000-07-28 Jason Merrill <jason@redhat.com>
11428 * lang-specs.h: Use %i in rule for .ii files.
11430 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
11432 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
11434 2000-07-30 Mark Mitchell <mark@codesourcery.com>
11436 Allow indirect primary bases.
11437 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
11439 (CLASSTYPE_VFIELD_PARENT): Remove.
11440 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
11441 (BINFO_PRIMARY_BINFO): Remove.
11442 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
11443 (BINFO_VBASE_PRIMARY_P): Likewise.
11444 (BINFO_PRIMARY_BASE_OF): New macro.
11445 (BINFO_INDIRECT_PRIMARY_P): Likewise.
11446 (get_primary_binfo): New function.
11447 * decl.c (lang_mark_tree): Make lang_type::primary_base.
11448 * class.c (vcall_offset_data_s): Rename to ...
11449 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
11450 and add ctor_vtbl_p.
11451 (get_derived_offset): Use get_primary_binfo.
11452 (dfs_mark_primary_bases): Adjust handling of virtual primary
11454 (mark_primary_bases): Likewise.
11455 (set_primary_base): Take a binfo, not an integer, as a
11456 representation of the primary base.
11457 (indirect_primary_base_p): Remove.
11458 (determine_primary_base): Adjust for indirect primary bases.
11459 (dfs_find_final_overrider): Fix typo in coment.
11460 (update_vtable_entry_for_fn): Use get_primary_binfo.
11461 (layout_nonempty_base_or_field): Tweak.
11462 (build_base_fields): Adjust for new primary base semantics.
11463 (dfs_propagate_binfo_offsets): Remove.
11464 (propagate_binfo_offsets): Rewrite.
11465 (dfs_set_offset_for_shared_vbases): Remove.
11466 (layout_virtual_bases): Don't use it.
11467 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
11469 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
11470 CLASSTYPE_VFIELD_PARENT.
11471 (dfs_get_primary_binfo): New function.
11472 (get_primary_binfo): Likewise.
11473 (dump_class_hierarchy_r): Tweak printing of primary bases.
11474 (build_vtbl_initializer): Fix typo in comments. Use
11476 (build_vcall_and_vbase_vtbl_entries): Likewise.
11477 (build_vbaes_offset_vtbl_entries): Likewise.
11478 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
11479 BV_VCALL_INDEX to handle indirect primary bases.
11480 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
11481 (build_rtti_vtbl_entries): Likewise.
11482 * search.c (get_shared_vbase_if_not_primary): Tweak.
11483 (find_vbase_instance): Likewise.
11484 (binfo_for_vtable): Simplify.
11485 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
11486 (make_binfo): Make it have 11 entries.
11488 2000-07-30 Alex Samuel <samuel@codesourcery.com>
11490 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
11491 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
11492 ascertaining primaryness.
11493 (G): Remove template_args.
11494 (decl_is_template_id): New function.
11495 (write_encoding): Use decl_is_template_id.
11496 (write_name): Likewise. Handle type_decls. Get main variant of
11498 (write_nested_name): Likewise.
11499 (write_prefix): Likewise.
11500 (write_template_prefix): Likewise.
11501 (write_special_name_constructor): Remove defunct production from
11503 (write_bare_function_type): Remove comment about absent parameter.
11504 (write_template_template_arg): Add missing grammar production to
11507 2000-07-27 Jason Merrill <jason@redhat.com>
11509 * decl.c (duplicate_decls): If common_type produces a non-typedef
11510 type for a typedef, just use the old type.
11512 2000-07-27 Mark Mitchell <mark@codesourcery.com>
11514 * cp-tree.h (function_depth): Declare.
11515 (verify_stmt_tree): Likewise.
11516 (find_tree): Likewise.
11517 * decl.c (function_depth): Give it external linkage.
11518 * optimize.c (optimize_function): Increment and decrement it.
11519 * tree.c (verify_stmt_tree_r): New function.
11520 (verify_stmt_tree): Likewise.
11521 (find_tree_r): Likewise.
11522 (find_tree): Likewise.
11524 2000-07-27 Jason Merrill <jason@redhat.com>
11526 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
11528 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
11530 2000-07-26 Mark Mitchell <mark@codesourcery.com>
11532 * decl.c (start_cleanup_fn): Mark the function as `inline'.
11533 * decl2.c (get_guard): Call cp_finish_decl, not
11534 rest_of_decl_compilation, for local guards.
11535 * lex.c (do_identifier): Remove unused variable.
11537 Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
11539 * parse.y: Add missing ';'.
11541 2000-07-26 Mark Mitchell <mark@codesourcery.com>
11543 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
11546 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
11548 Kill strict_prototype. Backwards compatibility only for
11549 non NO_IMPLICIT_EXTERN_C systems.
11550 * cp-tree.h (flag_strict_prototype): Remove.
11551 (strict_prototype): Remove.
11552 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
11553 * decl.c (maybe_push_to_top_level): Adjust.
11554 (pop_from_top_level): Adjust.
11555 (decls_match): Only allow sloppy parm matching for ancient
11557 (init_decl_processing): Adjust.
11558 (grokdeclarator): Adjust.
11559 * decl2.c (flag_strict_prototype): Remove.
11560 (strict_prototype): Remove.
11561 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
11562 (lang_f_options): Remove "strict-prototype".
11563 (unsupported-options): Add "strict-prototype".
11564 * lex.c (do_identifier): Adjust.
11565 (do_scoped_id): Adjust.
11566 * parse.y (empty_parms): Adjust.
11567 * class.c (push_lang_context): Adjust.
11568 (pop_lang_context): Adjust.
11569 * typeck.c (comp_target_parms): Adjust.
11571 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
11573 * decl.c (poplevel): Deal with anonymous variables at for scope.
11574 (maybe_inject_for_scope_var): Likewise.
11576 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
11578 * decl.c: Remove all signal handling code, now done in toplev.c.
11580 2000-07-23 Mark Mitchell <mark@codesourcery.com>
11582 * decl.c (make_rtl_for_nonlocal_decl): Rework.
11584 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
11587 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
11589 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
11590 Define my_friendly_assert and my_friendly_abort as macros
11591 which may call friendly_abort. Prototype friendly abort, not
11592 my_friendly_abort or my_friendly_assert.
11593 * decl.c (signal_catch): Report the signal caught in the error
11594 message. Call fatal directly.
11595 * typeck2.c (ack, my_friendly_assert): Delete.
11596 (my_friendly_abort): Rename to friendly_abort. Expect file,
11597 line, and function parameters. Report the abort code, then
11598 call fancy_abort. Do not mask an abort if errors have
11601 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
11603 * typeck.c (comp_target_parms): Remove obsolete parameter.
11604 (comp_target_types): Adjust.
11606 2000-07-17 Jason Merrill <jason@redhat.com>
11608 * typeck.c (mark_addressable): Never set TREE_USED.
11609 * call.c (build_call): Don't abort on calls to library functions
11610 that have been declared normally.
11612 * typeck.c (build_binary_op): Fix grammar in warning.
11614 * exception.cc (__eh_free): Fix prototype.
11616 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
11618 * decl.c (pushdecl): Handle seeing an OVERLOAD in
11619 IDENTIFIER_NAMESPACE_VALUE.
11621 2000-07-16 Mark Mitchell <mark@codesourcery.com>
11623 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
11624 * method.c (use_thunk): Correct handling of vcall offsets.
11626 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
11628 * .cvsignore: parse.h and parse.c have no cp- prefix.
11630 2000-07-13 Mark Mitchell <mark@codesourcery.com>
11632 * .cvsignore: New file.
11634 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
11636 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
11638 2000-07-12 Mark Mitchell <mark@codesourcery.com>
11640 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
11642 * parse.h: Likewise.
11644 2000-07-11 Mark Mitchell <mark@codesourcery.com>
11646 * class.c (layout_class_type): Add pointers to virtual bases after
11647 base classes under the old ABI.
11649 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
11651 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
11652 (finish_continue_stmt): Likewise.
11653 (begin_for_stmt): Remove call to note_level_for_for.
11654 (finish_goto_stmt): Change call from build_min_nt
11656 (finish_expr_stmt): Likewise.
11657 (begin_if_stmt): Likewise.
11658 (begin_while_stmt): Likewise.
11659 (finish_while_stmt): Likewise.
11660 (finish_return_stmt): Likewise.
11661 (begin_for_stmt): Likewise.
11662 (finish_for_stmt): Likewise.
11663 (finish_break_stmt): Likewise.
11664 (begin_switch_stmt): Likewise.
11665 (finish_case_label): Likewise.
11666 (genrtl_try_block): Likewise.
11667 (begin_try_block): Likewise.
11668 (begin_handler): Likewise.
11669 (begin_compound_stmt): Likewise.
11670 (finish_asm_stmt): Likewise.
11671 (finish_label_stmt): Likewise.
11672 (add_decl_stmt): Likewise.
11673 (finish_subobject): Likewise.
11674 (finish_decl_cleanup): Likewise.
11675 (finish_named_return_value): Likewise.
11676 (setup_vtbl_ptr): Likewise.
11677 (add_scope_stmt): Likewise.
11678 * decl.c (finish_constructor_body): Likewise.
11679 (finish_destructor_body): Likewise.
11680 * optimize.c (copy_body_r): Likewise.
11681 (initialize_inlined_parameters): Likewise.
11682 (declare_return_variable): Likewise.
11683 (expand_call_inline): Likewise.
11685 2000-07-10 Jakub Jelinek <jakub@redhat.com>
11687 * semantics.c (expand_body): Sync interface information
11688 at the end of function body expansion.
11690 2000-07-09 Jason Merrill <jason@redhat.com>
11692 * init.c (build_new_1): Bail early if the call to new fails.
11694 * decl.c (compute_array_index_type): Check specifically for
11695 an INTEGER_CST, not just TREE_CONSTANT.
11697 * decl.c (duplicate_decls): Don't call duplicate_decls on
11698 the DECL_TEMPLATE_RESULT.
11699 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
11702 * error.c (dump_template_bindings): Don't crash if we had an
11703 invalid argument list.
11705 * typeck.c (c_expand_start_case): Do narrowing here.
11706 * semantics.c (finish_switch_cond): Not here.
11708 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
11710 * parse.y (asm_clobbers): Do string concatenation.
11712 2000-07-09 Mark Mitchell <mark@codesourcery.com>
11714 * decl.c (pushtag): Don't put local classes in template functions
11715 on the local_classes list.
11717 2000-07-04 Scott Snyder <snyder@fnal.gov>
11719 * decl2.c (get_guard): Add missing return for old ABI local
11722 2000-07-09 Mark Mitchell <mark@codesourcery.com>
11724 * cp-tree.h (char_type_p): New function.
11725 * decl.c (init_decl_processing): Don't initialize
11726 signed_wchar_type_node or unsigned_wchar_type_node.
11727 (complete_array_type): Handle brace-enclosed string-constants.
11728 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
11729 * tree.c (char_type_p): New function.
11730 * typeck2.c (digest_init): Use char_type_p.
11732 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
11734 * pt.c (tsubst): Don't layout type, if it's error_mark.
11736 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
11738 * pt.c (instantiate_pending_templates): Reset template level.
11740 2000-07-05 Jason Merrill <jason@redhat.com>
11742 * call.c (joust): Don't complain about `operator char *()' beating
11743 `operator const char *() const'.
11745 2000-07-04 scott snyder <snyder@fnal.gov>
11746 Jason Merrill <jason@redhat.com>
11748 * repo.c (repo_get_id): Handle the case where a class with virtual
11749 bases has a null TYPE_BINFO_VTABLE.
11751 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
11752 Jason Merrill <jason@redhat.com>
11754 * parse.y (member_init): Just pass in the type.
11755 * init.c (expand_member_init): Handle getting a type.
11757 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
11758 Jason Merrill <jason@redhat.com>
11760 * decl.c (finish_function): Warn if a function has no return
11762 Suggested by Andrew Koenig.
11763 * typeck.c (check_return_expr): Do set current_function_returns_value
11764 if we got an error_mark_node.
11766 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
11768 * decl2.c (push_decl_namespace): Push the original namespace.
11770 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
11772 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
11773 * semantics.c (begin_class_definition): Clear it.
11775 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
11777 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
11778 (genrtl_expr_stmt): Likewise.
11779 (genrtl_decl_stmt): Likewise.
11780 (genrtl_if_stmt): Likewise.
11781 (genrtl_while_stmt): Likewise.
11782 (genrtl_do_stmt): Likewise.
11783 (genrtl_return_stmt): Likewise.
11784 (genrtl_for_stmt): Likewise.
11785 (genrtl_break_stmt): Likewise.
11786 (genrtl_continue_stmt): Likewise.
11787 (genrtl_scope_stmt): Likewise.
11788 (genrtl_switch_stmt): Likewise.
11789 (genrtl_case_label): Likewise.
11790 (genrtl_begin_compound_stmt): Likewise.
11791 (genrtl_finish_compound_stmt): Likewise.
11792 (genrtl_compound_stmt): Likewise.
11793 (genrtl_asm_stmt): Likewise.
11795 * init.c (begin_init_stmts): Remove call to
11796 genrtl_begin_compound_stmt.
11797 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
11799 * semantics.c (lang_expand_stmt): Changed call to
11800 genrtl_compound_stmt to ignore return value.
11802 2000-07-02 Mark Mitchell <mark@codesourcery.com>
11804 * mangle.c (canonicalize_for_substitution): Return the canonical
11807 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
11809 * typeck.c (commonparms): Remove obstack manipulations.
11811 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
11813 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
11815 * Makefile.in (OBJS): Added ../c-semantics.o.
11816 (OBJDEPS): Likewise.
11818 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
11820 (struct stmt_tree): Added comment.
11821 (current_function_name_declared): Removed.
11822 (stmts_are_full_exprs_p): Likewise.
11823 (genrtl_do_pushlevel): Likewise.
11824 (genrtl_clear_out_block): Likewise.
11825 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
11826 (DECL_ANON_UNION_ELEMS): Likewise.
11827 (emit_local_var): Likewise.
11828 (make_rtl_for_local_static): Likewise.
11829 (do_case): Likewise.
11830 (expand_stmt): Likewise.
11831 (genrtl_decl_cleanup): Likewise.
11832 (c_expand_asm_operands): Likewise.
11833 (c_expand_return): Likewise.
11834 (c_expand_start_case): Likewise.
11836 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
11837 (emit_local_var): Likewise.
11838 (initialize_local_var): Change reference to
11839 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
11840 Change reference to stmts_are_full_exprs_p to
11841 current_stmt_tree->stmts_are_full_exprs_p.
11842 (push_cp_function_context): Likewise.
11844 * expect.c (expand_throw): Change reference to
11845 stmts_are_full_exprs_p.
11847 * init.c (build_aggr_init): Change reference to
11848 stmts_are_full_exprs_p.
11849 (build_vec_init): Likewise.
11851 * optimize.c (maybe_clone_body): Change reference to
11852 current_function_name_declared to
11853 cp_function_chain->name_declared.
11855 * pt.c (instantiate_decl): Change reference to
11856 current_function_name_declared to
11857 cp_function_chain->name_declared.
11859 * semantics.c (expand_cond): Moved declaration to c-common.h.
11860 (genrtl_do_pushlevel): Moved to c-semantics.c.
11861 (genrtl_clear_out_block): Likewise.
11862 (genrtl_goto_stmt): Likewise.
11863 (genrtl_expr_stmt): Likewise.
11864 (genrtl_decl_stmt): Likewise.
11865 (gerntl_if_stmt): Likewise.
11866 (genrtl_while_stmt): Likewise.
11867 (genrtl_do_stmt): Likewise.
11868 (genrtl_return_stmt): Likewise.
11869 (genrtl_for_stmt): Likewise.
11870 (genrtl_break_stmt): Likewise.
11871 (genrtl_continue_stmt): Likewise.
11872 (genrtl_scope_stmt): Likewise.
11873 (genrtl_switch_stmt): Likewise.
11874 (genrtl_case_label): Likewise.
11875 (genrtl_begin_compound_stmt): Likewise.
11876 (genrtl_finish_compound_stmt): Likewise.
11877 (genrtl_compound_stmt): Likewise.
11878 (genrtl_asm_stmt): Likewise.
11879 (genrtl_decl_cleanup): Likewise.
11880 (expand_cond): Likewise.
11881 (expand_stmt): Renamed to ...
11882 (lang_expand_stmt): ... this.
11883 (lang_expand_expr_stmt): Initialize.
11884 (set_current_function_name_declared): Likewise.
11885 (stmts_are_full_exprs_p): Likewise.
11886 (current_function_name_declared): Likewise.
11887 (anon_aggr_type_p): Likewise.
11888 (do_poplevel): Change reference to
11889 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
11890 Change reference to stmts_are_full_exprs_p to
11891 current_stmt_tree->stmts_are_full_exprs_p.
11892 (add_tree): Likewise.
11893 (finish_expr_stmt): Likewise.
11894 (prep_stmt): Likewise.
11895 (lang_expand_stmt): Likewise.
11896 (begin_compound_stmt): Change reference to
11897 current_function_name_declared to
11898 cp_function_chain->name_declared and call to
11899 current_function_name_declared().
11900 (setup_vtbl_ptr): Likewise.
11901 (genrtl_do_poplevel): Removed.
11903 2000-06-30 Jason Merrill <jason@redhat.com>
11905 * init.c (init_init_processing): Go back to aligning like
11906 double_type_node for old ABI.
11907 (get_cookie_size): Make cookie larger if we get a type that needs
11909 (build_vec_delete): Call it.
11911 * typeck.c (qualify_type_recursive): New fn.
11912 (composite_pointer_type): Use it.
11913 (build_binary_op): Use composite_pointer_type.
11915 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
11916 Jason Merrill <jason@redhat.com>
11918 * typeck.c (check_return_expr): Don't complain about returning
11919 NULL from operator new if -fcheck-new.
11920 * cp-tree.h: Declare flag_check_new here.
11921 * init.c: Not here.
11923 2000-06-28 Alex Samuel <samuel@codesourcery.com>
11925 * mangle.c (find_substitution): Use same_type_p.
11926 (write_encoding): Don't check for substitutions.
11928 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
11930 * parse.y (expr_no_comma_rangle): New non-terminal.
11931 (template_parm): Use it for default parameter case.
11932 (template_arg): Use it.
11933 (expr_no_commas): Remove commented out undefined extensions.
11934 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
11935 * parse.h, parse.c: Rebuilt.
11937 2000-06-30 Mark Mitchell <mark@codesourcery.com>
11939 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
11940 (finish_asm_stmt): Do it here, instead.
11942 * cp-tree.h (ridpointers): Don't declare.
11943 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
11944 (record_builtin_java_type): Likewise.
11945 (init_decl_processing): Likewise.
11946 * lex.c: Move inclusion of lex.h.
11947 (ridpointers): Don't define.
11948 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
11950 * lex.h (enum rid): Rename to ...
11951 (enum cp_rid): ... this.
11952 (ridpointers): Don't declare.
11953 * parse.y: Move inclusion of lex.h.
11954 * parse.c: Regenerated.
11955 * spew.c: Move inclusion of lex.h.
11957 * cp-tree.h (struct language_function): Remove temp_name_counter.
11958 (temp_name_counter): Remove.
11959 (get_temp_name): Change prototype.
11960 (get_guard): New function.
11961 (get_guard_cond): Likewise.
11962 (set_guard): Likewise.
11963 * cvt.c (build_up_reference): Adjust call to get_temp_name.
11964 * decl.c (expand_static_init): Use get_guard and friends to
11965 implement guard variables.
11966 * decl2.c (get_temp_name): Assume that the variables created are
11968 (get_sentry): Rename to ...
11969 (get_guard): ... this. Implement new ABI guard variables.
11970 (get_guard_bits): New function.
11971 (get_guard_cond): Likewise.
11972 (set_guard): Likewise.
11973 (start_static_initialization_or_destruction): Use them.
11974 (do_static_initialization): Replace sentry with guard throughout.
11975 (do_static_destruction): Likewise.
11976 * init.c (create_temporary_var): Add comment.
11978 2000-06-28 Alex Samuel <samuel@codesourcery.com>
11980 * mangle.c (find_substitution): Use same_type_p.
11981 (write_encoding): Don't check for substitutions.
11983 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
11985 * parse.y (expr_no_comma_rangle): New non-terminal.
11986 (template_parm): Use it for default parameter case.
11987 (template_arg): Use it.
11988 (expr_no_commas): Remove commented out undefined extensions.
11989 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
11990 * parse.h, parse.c: Rebuilt.
11992 2000-06-29 Mark Mitchell <mark@codesourcery.com>
11994 * cp-tree.h (flag_const_strings): Remove.
11995 (warn_parentheses): Likewise.
11996 (warn_format): Likewise.
11997 (common_type): Likewise.
11998 (default_conversion): Likewise.
11999 (build_binary_op): Likewise.
12000 (cp_build_binary_op): New macro.
12001 * call.c (build_new_op): Use cp_build_binary_op instead of
12003 * class.c (build_vtable_entry_ref): Likewise.
12004 * decl.c (expand_static_init): Likewise.
12005 (compute_array_index_type): Likewise.
12006 (build_enumerator): Likewise.
12007 * decl2.c (delete_sanity): Likewise.
12008 (start_static_initialization_or_destruction): Likewise.
12009 * error.c (dump_type_suffix): Likewise.
12010 * init.c (resolve_offset_ref): Likewise.
12011 (build_new): Likewise.
12012 (build_new_1): Likewise.
12013 (build_vec_delete_1): Likewise.
12014 (build_vec_init): Likewise.
12015 (build_delete): Likewise.
12016 * rtti.c (synthesize_tinfo_fn): Likewise.
12017 (synthesize_tinfo_var): Likewise.
12018 * search.c (expand_upcast_fixups): Likewise.
12019 (fixup_all_virtual_upcast_offsets): Likewise.
12020 * typeck.c (build_array_ref): Likewise.
12021 (get_member_function_from_ptrfunc): Likewise.
12022 (build_binary_op): Add parameter.
12023 (pointer_int_sum): Use cp_build_binary_op.
12024 (pointer_diff): Likewise.
12025 (build_modify_expr): Likewise.
12026 (get_delta_difference): Likewise.
12027 (build_ptrmemfunc): Likewise.
12029 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
12031 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
12032 * decl.c (create_implicit_typedef): Adjust.
12033 * decl2.c (build_artificial_parm): Adjust.
12034 * method.c (implicitly_declare_fn): Adjust.
12035 * pt.c (push_inline_template_parms_recursive): Adjust.
12036 (process_template_parm): Adjust.
12037 (overloaded_template_name): Adjust.
12038 * semantics.c (finish_template_template_parm): Adjust.
12040 2000-06-28 Mark Mitchell <mark@codesourcery.com>
12042 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
12043 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
12044 where to emit thunks.
12045 (build_vtt): Adjust call to build_vtt_inits.
12046 (build_vtt_inits): Add parameter to indicate whether or not
12047 sub-VTTs for virtual bases should be included. Adjust handling of
12048 construction vtables.
12049 (get_matching_base): New function.
12050 (dfs_build_vtt_inits): Rename to ...
12051 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
12052 construction vtables.
12053 (dfs_fixup_binfo_vtbls): Likewise.
12054 (build_ctor_vtbl_groups): Build construction vtables for virtual
12056 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
12057 to build construction vtbls.
12058 (dfs_accumulate_vtbl_inits): Adjust handling of
12059 construction vtables.
12061 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
12064 2000-06-27 Mark Mitchell <mark@codesourcery.com>
12066 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
12068 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
12070 * search.c (hides): Remove.
12071 (is_subobject_of_p): Add most_derived parameter. Use
12073 (lookup_field_queue_p): Adjust.
12074 (lookup_field_r): Adjust.
12076 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
12078 * decl2.c (handle_class_head): Bash typedefs to the type's main
12081 2000-06-25 Mark Mitchell <mark@codesourcery.com>
12083 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
12084 (begin_global_stmt_expr): ... this.
12085 (genrtl_finish_stmt_expr): Rename to ...
12086 (finish_global_stmt_expr): ... this.
12087 * init.c (begin_init_stmts): Adjust calls.
12088 (finish_init_stmts): Likewise.
12089 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
12090 (begin_global_stmt_expr): ... this.
12091 (genrtl_finish_stmt_expr): Rename to ...
12092 (finish_global_stmt_expr): ... this.
12094 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12096 * search.c (lookup_member): Fix typo in comment.
12098 2000-06-24 Jason Merrill <jason@redhat.com>
12100 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
12101 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
12103 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
12105 * parse.y (complex_direct_notype_declarator): Support global_scope.
12106 * Makefile.in: Adjust conflict count.
12108 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
12110 * parse.y (template_arg): Convert TEMPLATE_DECL
12111 that is a template template parameter to
12112 TEMPLATE_TEMPLATE_PARM here.
12114 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
12115 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
12116 (copy_template_template_parm): Adjust prototype.
12117 * decl.c (grokdeclarator): Remove dead code.
12118 * pt.c (process_template_parm): Tidy.
12119 (lookup_template_class): Construct nodes in
12120 copy_template_template_parm.
12121 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
12122 lookup_template_class. Use TYPE_TI_TEMPLATE.
12123 * tree.c (copy_template_template_parm): Add NEWARGS
12125 (mapcar): Adjust call to copy_template_template_parm.
12126 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
12127 * method.c (build_template_template_parm_names): Change error
12128 code to avoid compilation warning.
12130 * gxxint.texi: Document template template parameter
12133 2000-06-21 Alex Samuel <samuel@codesourcery.com>
12135 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
12136 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
12137 (cp-demangle.o): New rule.
12138 (dyn-string.o): Likewise.
12139 * inc/cxxabi.h (__cxa_demangle): New declaration.
12141 2000-06-22 Mark Mitchell <mark@codesourcery.com>
12143 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
12144 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
12145 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
12146 a tree, not an int.
12147 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
12148 (make_thunk): Change prototype.
12149 (emit_thunk): Rename to use_thunk.
12150 (mangle_thunk): Change prototype.
12151 * class.c (get_derived_offset): Simplify.
12152 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
12153 BV_GENERATE_THUNK_WITH_VTABLE_P.
12154 (build_primary_vtable): Simplify.
12155 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
12156 (dfs_find_base): Remove.
12157 (update_vtable_entry_for_fn): Correct bug in finding the base
12158 where a virtual function was first declared. Figure out whether
12159 or not to emit a vcall-thunk with the vtables in which it appears.
12160 Correct logic for deciding whether to use an ordinary thunk, or a
12162 (finish_struct_1): Remove unnecssary code.
12163 (build_vtbl_initializer): Use ssize_int for the running counter of
12165 (build_vtbl_initializer): Only use vcall thunks where necessary.
12166 Mark thunks as needing to be emitted with their vtables, or not.
12167 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
12168 indices. Use size_binop.
12169 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
12170 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
12172 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
12173 (build_vtable_entry): Mark thunks as needing to be emitted with
12174 their vtables, or not.
12175 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
12176 * decl2.c (mark_vtable_entries): Use use_thunk instead of
12178 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
12180 * error.c (dump_expr): Use BV_FN.
12181 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
12183 * method.c (make_thunk): Likewise.
12184 (emit_thunk): Rename to use_thunk. Allow callers to decide
12185 whether or not to actually emit the thunk. Adjust for changes in
12186 representation of vcall offsets.
12187 * search.c (dfs_get_pure_virtuals): Use BV_FN.
12188 * semantics.c (emit_associated_thunks): New function.
12189 (expand_body): Use it.
12190 * ir.texi: Adjust decriptions of thunks.
12192 2000-06-22 Jason Merrill <jason@redhat.com>
12194 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
12195 (tsubst_friend_function): Copy it here.
12197 * decl.c (grok_op_properties): Fix typo.
12199 * decl2.c (delete_sanity): Clarify warning, avoid failure on
12202 * pt.c (check_explicit_specialization): Clarify error.
12204 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
12205 an old OVERLOAD when we're declaring a non-function.
12206 (pushdecl, destroy_local_var): Check for error_mark_node.
12207 (warn_extern_redeclared_static): Also bail early if
12208 we're a CONST_DECL.
12209 (push_overloaded_decl): Ignore an old error_mark_node.
12211 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
12213 * call.c (build_x_va_arg): Check if in a template decl.
12214 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
12216 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
12218 * class.c (push_lang_context): TYPE_NAME gets you to the Java
12220 * decl.c (check_goto): Computed gotos assumed OK.
12222 2000-06-20 Jason Merrill <jason@redhat.com>
12224 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
12225 for which we don't need to look for instantiations.
12227 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
12229 * parse.y (program): Always call finish_translation_unit.
12230 * parse.c, parse.h: Rebuilt.
12232 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
12234 * method.c: Don't include hard-reg-set.h.
12236 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
12238 * rtti.c (get_base_offset): Cope when vbase field is in a base.
12240 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
12242 * call.c (build_conditional_expr): Use VOID_TYPE_P.
12243 * cvt.c (cp_convert_to_pointer): Likewise.
12244 (convert_to_void): Likewise.
12245 * error.c (dump_expr): Likewise.
12246 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
12247 * init.c (build_delete): Likewise.
12248 * method.c (emit_thunk): Likewise.
12249 * optmize.c (declare_return_variable): Likewise.
12250 * rtti.c (get_tinfo_decl_dynamic): Likewise.
12251 (get_typeid): Likewise.
12252 (build_dynamic_cast_1): Likewise.
12253 * typeck.c (composite_pointer_type): Likewise.
12254 (common_type): Likewise.
12255 (build_indirect_ref): Likewise.
12256 (build_binary_op): Likewise.
12257 (build_x_compound_expr): Likewise.
12258 (check_return_expr): Likewise.
12259 * typeck2.c (add_exception_specifier): Likewise.
12261 * mangle.c (write_method_parms): Use direct comparison for end
12264 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
12266 * cp-tree.h (genrtl_try_block): Declare function.
12267 (genrtl_handler): Likewise.
12268 (genrtl_catch_block): Likewise.
12269 (genrtl_ctor_stmt): Likewise.
12270 (genrtl_subobject): Likewise.
12271 (genrtl_decl_cleanup): Likewise.
12272 (genrtl_do_poplevel): Likewise.
12273 (genrtl_do_pushlevel): Likewise.
12274 (genrtl_clear_out_block): Likewise.
12275 (genrtl_goto_stmt): Likewise.
12276 (genrtl_expr_stmt): Likewise.
12277 (genrtl_decl_stmt): Likewise.
12278 (genrtl_if_stmt): Likewise.
12279 (genrtl_while_stmt): Likewise.
12280 (genrtl_do_stmt): Likewise.
12281 (genrtl_return_stmt): Likewise.
12282 (genrtl_for_stmt): Likewise.
12283 (genrtl_break_stmt): Likewise.
12284 (genrtl_continue_stmt): Likewise.
12285 (genrtl_scope_stmt): Likewise.
12286 (genrtl_switch_stmt): Likewise.
12287 (genrtl_case_label): Likewise.
12288 (genrtl_begin_compound_stmt): Likewise.
12289 (genrtl_finish_compound_stmt): Likewise.
12290 (genrtl_compound_stmt): Likewise.
12291 (genrtl_asm_stmt): Likewise.
12292 (genrtl_named_return_value): Likewise.
12293 (genrtl_begin_stmt_expr): Likewise.
12294 (genrtl_finish_stmt_expr): Likewise.
12295 (finish_for_stmt): Removed first argument.
12296 (finish_switch_stmt): Likewise.
12298 * semantics.c (genrtl_try_block): Define function.
12299 (genrtl_handler): Likewise.
12300 (genrtl_catch_block): Likewise.
12301 (genrtl_ctor_stmt): Likewise.
12302 (genrtl_subobject): Likewise.
12303 (genrtl_decl_cleanup): Likewise.
12304 (genrtl_do_poplevel): Likewise.
12305 (genrtl_do_pushlevel): Likewise.
12306 (genrtl_clear_out_block): Likewise.
12307 (genrtl_goto_stmt): Likewise.
12308 (genrtl_expr_stmt): Likewise.
12309 (genrtl_decl_stmt): Likewise.
12310 (genrtl_if_stmt): Likewise.
12311 (genrtl_while_stmt): Likewise.
12312 (genrtl_do_stmt): Likewise.
12313 (genrtl_return_stmt): Likewise.
12314 (genrtl_for_stmt): Likewise.
12315 (genrtl_break_stmt): Likewise.
12316 (genrtl_continue_stmt): Likewise.
12317 (genrtl_scope_stmt): Likewise.
12318 (genrtl_switch_stmt): Likewise.
12319 (genrtl_case_label): Likewise.
12320 (genrtl_begin_compound_stmt): Likewise.
12321 (genrtl_finish_compound_stmt): Likewise.
12322 (genrtl_compound_stmt): Likewise.
12323 (genrtl_asm_stmt): Likewise.
12324 (genrtl_named_return_value): Likewise.
12325 (genrtl_begin_stmt_expr): Likewise.
12326 (genrtl_finish_stmt_expr): Likewise.
12327 (finish_for_stmt): Removed first argument and generate rtl
12329 (finish_switch_stmt): Likewise.
12330 (do_poplevel): Removed generate rtl specific code.
12331 (do_pushlevel): Likewise.
12332 (add_tree): Likewise.
12333 (finish_goto_stmt): Likewise.
12334 (finish_expr_stmt): Likewise.
12335 (begin_if_stmt): Likewise.
12336 (finish_if_stmt_cond): Likewise.
12337 (finish_then_clause): Likewise.
12338 (begin_else_clause): Likewise.
12339 (finish_else_clause): Likewise.
12340 (finish_if_stmt): Likewise.
12341 (clear_out_block): Likewise.
12342 (begin_while_stmt): Likewise.
12343 (finish_while_stmt_cond): Likewise.
12344 (finish_while_stmt): Likewise.
12345 (begin_do_stmt): Likewise.
12346 (finish_do_body): Likewise.
12347 (finish_do_stmt): Likewise.
12348 (finish_return_stmt): Likewise.
12349 (begin_for_stmt): Likewise.
12350 (finish_for_init_stmt): Likewise.
12351 (finish_for_cond): Likewise.
12352 (finish_for_expr): Likewise.
12353 (finish_break_stmt): Likewise.
12354 (finish_continue_stmt): Likewise.
12355 (begin_switch_stmt): Likewise.
12356 (finish_switch_cond): Likewise.
12357 (finish_case_label): Likewise.
12358 (begin_try_block): Likewise.
12359 (begin_function_try_block): Likewise.
12360 (finish_try_block): Likewise.
12361 (finish_cleanup_try_block): Likewise.
12362 (finish_cleanup): Likewise.
12363 (finish_function_try_block): Likewise.
12364 (finish_handler_sequence): Likewise.
12365 (finish_function_handler_sequence): Likewise.
12366 (begin_handler): Likewise.
12367 (finish_handler_parms): Likewise.
12368 (begin_catch_block): Likewise.
12369 (finish_handler): Likewise.
12370 (begin_compound_stmt): Likewise.
12371 (finish_compound_stmt): Likewise.
12372 (finish_asm_stmt): Likewise.
12373 (finish_label_stmt): Likewise.
12374 (finish_label_decl): Likewise.
12375 (finish_subobject): Likewise.
12376 (finish_decl_cleanup): Likewise.
12377 (finish_named_return_value): Likewise.
12378 (begin_stmt_expr): Likewise.
12379 (finish_stmt_expr): Likewise.
12381 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
12382 to call genrtl_expr_stmt when appropriate.
12384 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
12385 begin_compound_expr to call genrtl_begin_stmt_expr and
12386 genrtl_begin_compound_expr when appropriate.
12387 (finish_init_stmts): Changed calls to finish_compound_expr and
12388 finish_stmt_expr to call genrtl_finish_compound_expr and
12389 genrtl_finish_stmt_expr when appropriate.
12390 (expand_default_init): Changed call to finish_expr_stmt to call
12391 genrtl_expr_stmt when appropriate.
12392 (build_vec_init): Likewise.
12394 * parse.y (simple_stmt): Removed first argument from call to
12395 finish_for_stmt. Removed first argument from call to
12396 finish_switch_stmt.
12398 * parse.c: Regenerated.
12400 * pt.c (tsubst_expr): Removed first argument from call to
12401 finish_for_stmt. Removed first argument from call to
12402 finish_switch_stmt.
12404 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
12406 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
12407 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
12409 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
12410 (cplus_tree_code_length[]): Likewise.
12411 (cplus_tree_code_name[]): Likewise.
12412 (init_parse): Added call to add_c_tree_codes. Changed
12413 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
12415 2000-06-16 Mark Mitchell <mark@codesourcery.com>
12417 * cp-tree.h (finish_mem_initializers): Declare.
12418 (count_trees): Likewise.
12419 * parse.y (base_init): Use finish_mem_initializers.
12420 * semantics.c (finish_mem_initializers): New function.
12422 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
12423 the number of trees.
12425 (count_trees): Don't use it.
12427 2000-06-15 Jason Merrill <jason@redhat.com>
12429 * tree.c (count_trees): New debugging function.
12431 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
12432 * init.c (build_member_call): Pull out the name of a DECL.
12434 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
12435 * semantics.c (expand_body): Push to TV_INTEGRATION here.
12436 * optimize.c (optimize_function): Not here.
12437 * pt.c (instantiate_decl): Push to TV_PARSE.
12439 2000-06-15 Mark Mitchell <mark@codesourcery.com>
12441 * cp-tree.h (struct language_function): Remove x_base_init_list
12442 and x_member_init_list.
12443 (current_base_init_list): Remove.
12444 (current_member_init_list): Likewise.
12445 (setup_vtbl_ptr): Change prototype.
12446 (emit_base_init): Likewise.
12447 (expand_member_init): Likewise.
12448 (reinit_parse_for_function): Remove.
12449 * decl.c (save_function_data): Don't clear x_base_init_list and
12450 x_member_init_list.
12451 (mark_language_function): Don't mark them.
12452 * init.c (perform_member_init): Tweak comment.
12453 (sort_member_init): Take the list of initializers as an argument.
12454 (sort_base_init): Likewise.
12455 (emit_base_init): Likewise.
12456 (expand_member_init): Return the initializer. Don't use global
12458 * lex.c (reinit_parse_for_function): Remove.
12459 * method.c (build_template_parm_names): Correct substitution.
12460 (do_build_copy_constructor): Don't use current_member_init_list
12461 and current_base_init_list.
12462 (synthesize_method): Likewise.
12463 * parse.y (base_init): Split mem-initializers into
12464 base-initializers and field-initializers.
12465 (member_init_list): Build up the list here.
12466 (member_init): Return the initializer.
12467 (fn.depfn): Don't use reinit_parse_for_function.
12468 * parse.c: Regenerated.
12469 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
12471 (tsubst_expr): Don't use current_member_init_list
12472 and current_base_init_list.
12473 (tsubst_expr_values): Rename to ...
12474 (tsubst_initializer_list): ... this. Use convert_from_reference.
12475 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
12476 and current_base_init_list.
12477 (begin_function_definition): Don't call reinit_parse_for_function.
12479 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
12481 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
12484 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
12486 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
12488 * cp-tree.h (IF_COND): Move to c-common.h.
12489 (THEN_CLAUSE): Likewise.
12490 (ELSE_CLAUSE): Likewise.
12491 (WHILE_COND): Likewise.
12492 (WHILE_BODY): Likewise.
12493 (DO_COND): Likewise.
12494 (DO_BODY): Likewise.
12495 (RETURN_EXPR): Likewise.
12496 (EXPR_STMT_EXPR): Likewise.
12497 (FOR_INIT_STMT): Likewise.
12498 (FOR_COND): Likewise.
12499 (FOR_EXPR): Likewise.
12500 (FOR_BODY): Likewise.
12501 (SWITCH_COND): Likewise.
12502 (SWITCH_BODY): Likewise.
12503 (CASE_LOW): Likewise.
12504 (CASE_HIGH): Likewise.
12505 (GOTO_DESTINATION): Likewise.
12506 (COMPOUND_BODY): Likewise.
12507 (ASM_CV_QUAL): Likewise.
12508 (ASM_STRING): Likewise.
12509 (ASM_OUTPUTS): Likewise.
12510 (ASM_INPUTS): Likewise.
12511 (ASM_CLOBBERS): Likewise.
12512 (DECL_STMT_DECL): Likewise.
12513 (STMT_EXPR_STMT): Likewise.
12514 (LABEL_STMT_LABEL): Likewise.
12515 (SCOPE_BEGIN_P): Likewise.
12516 (SCOPE_END_P): Likewise.
12517 (SCOPE_STMT_BLOCK): Likewise.
12518 (SCOPE_NULLIFIED_P): Likewise.
12519 (SCOPE_NO_CLEANUPS_P): Likewise.
12520 (SCOPE_PARTIAL_P): Likewise.
12521 (ASM_VOLATILE_P): Likewise.
12522 (STMT_LINENO): Likewise.
12523 (STMT_LINENO_FOR_FN_P): Likewise.
12525 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
12526 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
12527 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
12528 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
12529 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
12531 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
12533 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
12534 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
12536 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
12537 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
12538 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
12540 2000-06-14 Mark Mitchell <mark@codesourcery.com>
12542 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
12543 * class.c (dfs_find_final_overrider): Set it appropriately.
12544 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
12545 avoid unneeded secondary vptrs.
12547 2000-06-13 Jakub Jelinek <jakub@redhat.com>
12549 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
12550 (check_bitfield_decl, check_field_decl): Likewise.
12551 (build_vtbl_or_vbase_field, build_base_field): Likewise.
12552 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
12553 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
12554 (xfer_tag, finish_enum): Likewise.
12555 * decl2.c (finish_builtin_type): Likewise.
12556 * init.c (init_init_processing): Likewise.
12557 * pt.c (instantiate_class_template): Likewise.
12558 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
12559 * cp-tree.h (struct lang_type): Add user_align member.
12560 (CLASSTYPE_USER_ALIGN): Define.
12562 Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
12564 * Make-lang.in (c++.install-common): Install g++-cross in
12565 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
12566 $(target_alias)-g++ and $(target_alias)-c++.
12568 2000-06-12 Mark Mitchell <mark@codesourcery.com>
12570 * class.c (vcall_offset_data_s): Add last_init and fns.
12571 (overrides): Rename to same_signature_p.
12572 (dfs_find_final_overrider): Adjust accordingly.
12573 (mark_overriders): Likewise.
12574 (warn_hidden): Likewise.
12575 (build_vtbl_initializer): Reorganize machinery for building things
12576 at negative offsets.
12577 (build_vcall_and_vbase_vtbl_entries): Likewise.
12578 (build_vbase_offset_vtbl_entries): Likewise.
12579 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
12580 offset entries. Do not create two entries for functions with the
12582 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
12583 (build_rtti_vtbl_entries): Reorganize machinery for building things
12584 at negative offsets.
12586 * optimize.c (expand_call_inline): Don't recurse into the code
12587 used to initialize the parameters more than once.
12589 2000-06-11 Mark Mitchell <mark@codesourcery.com>
12591 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
12592 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
12593 (find_substitution): Only use the `Sa' substitution for
12594 std::allocator, not instantiations of it.
12595 (write_template_prefix): Move comment. Only use a TREE_LIST to
12596 represent substitutions for a member template.
12597 (write_array_type): Mangle array dimensions correctly.
12598 * optimize.c (maybe_clone_body): Copy more information from the
12600 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
12601 on the regenerated declaration.
12603 2000-06-11 Chip Salzenberg <chip@valinux.com>
12604 Mark Mitchell <mark@codesourcery.com>
12606 * class.c (build_vtable): Clarify comment.
12607 (build_ctor_vtbl_group): Pass the most derived type to
12610 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12612 * decl2.c (compare_options): Don't needlessly cast away const-ness.
12614 2000-06-10 Mark Mitchell <mark@codesourcery.com>
12616 * decl.c (add_binding): Handle duplicate declarations of external
12619 2000-06-09 Chip Salzenberg <chip@valinux.com>
12620 Mark Mitchell <mark@codesourcery.com>
12622 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
12624 (write_signed_number): New macro.
12625 (write_unsigned_number): Likewise.
12626 (write_source_name): Use them.
12627 (write_number): Handle signed and unsigned values.
12628 (write_integer_cst): Use tree_int_cst_sgn, and use
12629 write_unsigned_number or write_signed_number as appropriate.
12630 (write_discriminator): Use write_unsigned_number or
12631 write_signed_number as appropriate.
12632 (write_template_arg_literal): Likewise.
12633 (write_array_type): Use tree_low_cst.
12634 (write_template_parm): Use write_unsigned_number or
12635 write_signed_number as appropriate.
12636 (write_substitution): Adjust call to write_number.
12637 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
12638 (write_expression): Handle non-type template arguments of
12639 reference type correctly.
12640 (mangle_thunk): Use write_signed_number.
12642 2000-06-09 Chip Salzenberg <chip@valinux.com>
12644 * mangle.c (find_substition): Don't mangle objects with typename
12645 substitutions (e.g. "cin" as "Si").
12647 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
12649 * call.c (add_candidate): Use ggc_alloc_cleared.
12650 * decl.c (lookup_label): Likewise.
12651 * lex.c (retrofit_lang_decl): Likewise.
12653 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
12655 * semantics.c (expand_body): Push to TV_EXPAND.
12656 * optimize.c (optimize_function): Push to TV_INTEGRATION.
12657 * decl.c (start_function): Always call announce_function.
12659 * tinfo2.cc: Just declare abort.
12661 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
12663 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
12664 whenever @ is a symbolic name.
12666 2000-06-08 Jakub Jelinek <jakub@redhat.com>
12668 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
12670 2000-06-07 Mark Mitchell <mark@codesourcery.com>
12672 * decl.c (pushdecl): Look up functions by DECL_NAME, not
12673 DECL_ASSEMBLER_NAME.
12675 2000-06-06 Mark Mitchell <mark@codesourcery.com>
12677 * decl2.c (c_language): Define.
12679 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
12681 * lex.c (lang_init_options): Tweak.
12683 * decl2.c: Remove #inclusion of diagnostic.h
12684 (lang_decode_option): Move diagnostic formatting options to
12687 * lang-options.h: Remove documentation for diagnostic options.
12689 * Makefile.in (lex.o): Depends upon diagnostic.h
12691 2000-06-06 Mark Mitchell <mark@codesourcery.com>
12693 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
12694 the same DECL_RESULT, it's not a redefinition.
12695 * pt.c (tsubst_decl): Remove code to handle illegal
12698 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
12700 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
12702 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
12704 * search.c (maybe_suppress_debug_info): Don't check
12705 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
12707 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
12710 Remember instantiation context in deferred instantiations.
12711 * cp-tree.h (struct tinst_level): Remove.
12712 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
12713 * pt.c (current_tinst_level): Now a tree.
12714 (print_template_context, push_tinst_level, pop_tinst_level,
12715 tinst_for_decl): Adjust.
12716 (reopen_tinst_level): New fn.
12717 (init_pt): Register current_tinst_level as a root.
12718 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
12719 of the pending templates list.
12720 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
12721 * lex.c (extract_interface_info): Adjust.
12722 * decl2.c (warn_if_unknown_interface): Adjust.
12724 2000-06-05 Mark Mitchell <mark@codesourcery.com>
12726 * class.c (indirect_primary_base_p): New function.
12727 (determine_primary_base): Use it.
12729 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
12731 Update new-abi dynamic cast algorithm.
12732 * tinfo.cc (__class_type_info::__dyncast_result): Add
12733 whole_details. Adjust constructor.
12734 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
12735 Avoid unnecessary searching.
12736 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
12738 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12740 * decl.c (init_decl_processing): Don't call record_component_aliases.
12741 * tree.c (build_cplus_array_type_1): Likewise.
12743 2000-06-04 Mark Mitchell <mark@codesourcery.com>
12745 * ir.texi: Correct typo.
12746 * mangle.c (write_expression): Handle non-type template arguments
12747 with reference type.
12748 * method.c (build_overload_value): Likewise.
12749 * pt.c (convert_nontype_argument): Explicitly represent conversion
12750 to a reference with an ADDR_EXPR.
12751 (unify): Always unify arguments in left-to-right order.
12753 2000-06-03 Alex Samuel <samuel@codesourcery.com>
12754 Mark Mitchell <mark@codesourcery.com>
12756 * Make-lang.in (CXX_SRCS): Add mangle.c.
12757 * Makefile.in (CXX_OBJS): Add mangle.o.
12758 (mangle.o): New rule.
12760 * class.c (local_classes): New variable.
12761 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
12762 (get_vtt_name): Use mangle_vtt_name for new ABI.
12763 (init_class_processing): Initialize local_classes.
12764 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
12765 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
12766 (std_identifier): New macro.
12767 (DECL_VOLATILE_MEMFUNC_P): New macro.
12768 (DECL_NAMESPACE_STD_P): Likewise.
12769 (local_classes): Declare.
12770 (get_mostly_instantiated_function_type): Declare.
12771 (init_mangle): Declare.
12772 (mangle_decl): Likewise.
12773 (mangle_type_string): Likewise.
12774 (mangle_type): Likewise.
12775 (mangle_typeinfo_for_type): Likewise.
12776 (mangle_typeinfo_string_for_type): Likewise.
12777 (mangle_vtbl_for_type): Likewise.
12778 (mangle_vtt_for_type): Likewise.
12779 (mangle_ctor_vtbl_for_type): Likewise.
12780 (mangle_thunk): Likewise.
12781 (mangle_conv_op_name_for_type): Likewise.
12782 (mangle_guard_variable): Likewise.
12783 * decl.c (pushtag): Keep track of local classes.
12784 (initialize_predefined_identifiers): Initialize std_identifier.
12785 (init_decl_processing): Use std_identifier.
12786 (start_decl): Don't treat instantiations as specializations.
12787 (grokdeclarator): Likewise.
12788 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
12789 name for fully-instantiated templates.
12790 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
12791 destructors with the new ABI.
12792 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
12793 (grokfield): Use mangle_type for new ABI.
12794 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
12795 (get_sentry): Use mangle_guard_variable for new ABI.
12796 (start_static_initialization_or_destruction): Likewise.
12797 * expr.c (extract_aggr_init): Remove.
12798 (extract_scalar_init): Likewise.
12799 (extract_init): Remove #if 0'd code.
12800 * mangle.c: New function.
12801 * method.c (build_mangled_name): Assert not flag_new_abi.
12802 (build_static_name): Likewise.
12803 (build_decl_overload_real): Likewise.
12804 (build_typename_overload): Likewise.
12805 (build_overload_with_type): Likewise.
12806 (build_overload_name): Likewise.
12807 (get_ctor_vtbl_name): Likewise.
12808 (start_squangling): Likewise.
12809 (get_id_2): Likewise.
12810 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
12811 (init_method): Call init_mangle for new ABI.
12812 (make_thunk): Call mangle_thunk for new ABI.
12813 * operators.def: Correct new ABI manglings for the `%' operator.
12815 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
12816 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
12817 (lookup_template_class): Call mangle_decl for new ABI.
12818 (get_mostly_instantiated_function_type): New function.
12819 (set_mangled_name_for_template_decl): Use it.
12820 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
12821 the new ABI. Use mangle_conv_op_name_for_type for instantiated
12822 conversion op names.
12823 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
12824 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
12825 (tinfo_base_init): Likewise. Mangle typeinfo string name with
12826 mangle_typeinfo_string_for_type.
12828 2000-06-03 Mark Mitchell <mark@codesourcery.com>
12830 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
12831 (INNERMOST_TEMPLATE_ARGS): New macro.
12832 (innermost_args): Remove.
12833 (get_innermost_template_args): New function.
12834 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
12835 * error.c (dump_function_decl): Be caution when using
12836 most_general_template.
12837 * method.c (build_template_parm_names): Use
12838 INNERMOST_TEMPLATE_ARGS.
12839 * pt.c (add_to_template_args): Tidy comment
12840 (get_innermost_template_args): New function.
12841 (check_explicit_specialization): Clear DECL_INITIAL for a new
12843 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
12845 (push_template_decl): Always register specializations of the most
12847 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
12848 (coerce_template_parms): Likewise.
12849 (lookup_template_class): Likewise.
12850 (innermost_args): Remove.
12851 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
12852 (tsubst_decl): Handle tricky specializations. Use
12853 get_innermost_template_args.
12854 (instantiate_template): Simplify handling of partial
12856 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
12857 (most_general_template): Reimplement, in a more straightforward
12859 (regenerate_decl_from_template): Tweak formatting. Use
12860 TMPL_ARGS_DEPTH for clarity.
12861 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
12863 * dump.c (dequeue_and_dump): Dump information about thunks.
12865 2000-06-01 Richard Henderson <rth@cygnus.com>
12867 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
12869 2000-06-01 Richard Henderson <rth@cygnus.com>
12871 * decl2.c (unsupported_options): Fix typo, make const.
12872 (lang_decode_option): Fix bsearch argument order.
12874 2000-06-01 Mark Mitchell <mark@codesourcery.com>
12876 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
12879 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12881 * cp-tree.h (c_get_alias_set): Deleted.
12882 * Makefile.in (decl.o): Include ../expr.h.
12883 * decl.c (expr.h): Include.
12884 (init_decl_processing): Call record_component_aliases for arrays.
12885 (grokdeclarator): Likewise.
12886 Set TREE_ADDRESSABLE for fields that aren't bitfields.
12887 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
12889 2000-05-31 Mark Mitchell <mark@codesourcery.com>
12891 Remove guiding declaration support.
12892 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
12893 (flag_guiding_decls): Remove.
12894 * call.c (build_user_type_conversion_1): Remove support for
12896 (build_new_function_call): Likewise.
12897 (build_new_op): Likewise.
12898 (build_new_method_call): Likewise.
12899 * decl.c (start_function): Likewise.
12900 * friend.c (is_friend): Likewise.
12901 (do_friend): Likewise.
12902 * decl2.c ((flag_dump_translation_unit): Make it const.
12903 (flag_guiding_decls): Remove.
12904 (unsupported_options): New variable
12905 (compare_options): New function.
12906 (lang_decode_option): Use them.
12908 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
12910 * method.c (mangle_expression): Adjust test for legal expression
12913 * pt.c (instantiate_decl): Save and restore the local
12914 specializations list.
12916 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
12918 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
12920 2000-05-30 Mark Mitchell <mark@codesourcery.com>
12922 * call.c (add_template_candidate_real): Handle member template
12923 constructors for classes with virtual bases.
12924 (build_user_type_conversion_1): Use in_charge_arg_for_name.
12925 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
12927 * ir.texi: Update thunk documentation.
12929 * call.c (joust): Fix handling of overloaded builtin operators.
12931 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
12933 * cp-tree.h (DECL_ANTICIPATED): New macro.
12934 Document new use of DECL_LANG_FLAG_7.
12935 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
12936 in the user namespace.
12937 * lex.c (do_identifier): If the identifier's declaration has
12938 DECL_ANTICIPATED on, it has not yet been declared. But do not
12939 replace it with an ordinary implicit declaration.
12941 * tinfo2.cc: Include stdlib.h.
12943 2000-05-29 Mark Mitchell <mark@codesourcery.com>
12945 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
12946 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
12949 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
12951 * decl2.c (lang_decode_option): Use skip_leading_substring instead
12954 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
12956 * operators.def (<?): Duplicated, should have been...
12959 2000-05-27 Alex Samuel <samuel@codesourcery.com>
12960 Mark Mitchell <mark@codesourcery.com>
12962 * cp-tree.h (ansi_opname): Make it a macro.
12963 (ansi_assopname): Likewise.
12964 (struct lang_decl_flags): Add assignment_operator_p.
12965 (struct lang_decl): Add operator_code.
12966 (DECL_VTT_PARM): Adjust.
12967 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
12968 overloaded operator.
12969 (SET_OVERLOADED_OPERATOR_CODE): New macro.
12970 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
12971 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
12972 (opname_tab): Remove.
12973 (assignop_tab): Likewise.
12974 (operator_name_info_t): New type.
12975 (operator_name_info): New variable.
12976 (assignment_operator_name_info): Likewise.
12977 (build_cp_library_fn): Remove declaration.
12978 (push_cp_library_fn): Likewise.
12979 (operator_name_string): Likewise.
12980 (build_decl_overload): Likewise.
12981 * call.c (print_z_candidates): Simplify.
12982 (build_object_call): Adjust usage of ansi_opname. Use
12983 DECL_OVERLOADED_OPERATOR_P.
12984 (op_error): Adjust operator name lookup.
12985 (build_conditional_expr): Adjust usage of ansi_opname.
12986 (build_new_op): Likewise.
12987 (build_op_delete_call): Likewise.
12988 (build_over_call): Likewise.
12989 (joust): Use DECL_OVERLOADED_OPERATOR_P.
12990 * decl.c (duplicate_decls): Copy operator_code.
12991 (init_decl_processing): Adjust parameters to push_cp_library_fn.
12992 (builtin_function): Adjust parameters to build_library_fn_1.
12993 (build_library_fn_1): Accept an overloaded operator code.
12994 (build_library_fn): Pass ERROR_MARK.
12995 (build_cp_library_fn): Accept an overloaded operator code.
12996 (push_cp_library_fn): Likewise.
12997 (grokfndecl): Tweak.
12998 (grokdeclarator): Simplify code to compute names of overloaded
12999 operators. Adjust use of ansi_opname.
13000 (ambi_op_p): Work on tree_codes, not identifiers.
13001 (unary_op_p): Likewise.
13002 (grok_op_properties): Likewise.
13003 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
13004 (lang_mark_tree): Don't try to mark the operator_code.
13005 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
13006 * error.c (dump_decl): Remove special handling for operator
13008 (dump_function_name): Likewise.
13009 (dump_expr): Adjust name lookup of operators.
13010 (op_to_string): Simplify.
13011 (assop_to_string): Likewise.
13012 * init.c (build_new_1): Adjust use of ansi_opname.
13013 * lex.c (opname_tab): Remove.
13014 (assignop_tab): Likewise.
13015 (ansi_opname): Likewise.
13016 (ansi_assopname): Likewise.
13017 (operator_name_string): Likewise.
13018 (reinit_lang_specific): Likewise.
13019 (operator_name_info): New variable.
13020 (assignment_operator_name_info): Likewise.
13021 (init_operators): New function.
13022 (init_parse): Use it.
13023 (do_identifier): Adjust use of ansi_opname.
13024 * method.c (mangle_expression): Don't use ansi_opname for
13026 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
13027 (build_decl_overload): Remove.
13028 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
13029 (do_build_assign_ref): Adjust use of ansi_opname.
13030 (synthesize_method): Likewise.
13031 (implicitly_declare_fn): Likewise.
13032 * operators.def: New file.
13033 * parse.y (operator): Adjust use of ansi_opname.
13034 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
13035 (set_mangled_name_for_template_decl): Don't play games with
13037 (special_function_p): Adjust use of ansi_opname.
13038 * typeck.c (check_return_expr): Likewise.
13039 * Make-lang.in (cc1plus): Depend on operators.def.
13040 * Makefile.in (lex.o): Likewise.
13041 (decl.o): Likewise.
13043 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
13045 * Make-lang.in (cplib2.ready): Eradicate.
13047 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13049 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
13050 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
13051 (built_min, cp_tree_equal): Likewise.
13053 2000-05-26 Mark Mitchell <mark@codesourcery.com>
13055 * class.c (layout_nonempty_base_or_field): Replace
13056 `record_layout_info' with `record_layout_info_s'.
13058 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
13061 * cp-tree.h (struct language_function): x_named_labels is now
13062 a struct named_label_list*.
13063 * decl.c (struct named_label_use_list): Renamed from...
13064 (struct named_label_list): ...this. New struct.
13065 (push_binding_level): Don't set eh_region.
13066 (note_level_for_eh): New fn.
13067 (pop_label): Take label and old value directly.
13068 (pop_labels): Adjust for new named_labels format.
13069 (lookup_label): Likewise.
13070 (poplevel): Note characteristics of a binding level containing a
13071 named label. Mess with named label lists earlier.
13072 (mark_named_label_lists): New fn.
13073 (mark_lang_function): Call it.
13074 (use_label): New fn, split out from...
13075 (make_label_decl): ...here. Don't call it.
13076 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
13077 check_previous_gotos): New fns, split out from...
13078 (define_label): ...here.
13079 (check_switch_goto): New fn.
13080 (define_case_label): Call it.
13081 (check_goto): New fn.
13082 * semantics.c (finish_goto_stmt): Call it and use_label.
13083 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
13084 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
13086 2000-05-26 Mark Mitchell <mark@codesourcery.com>
13088 * class.c (build_vtable_entry_ref): Correct usage of
13089 get_vtbl_decl_for_binfo.
13091 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
13092 * method.c (implicitly_declare_fn): Not here.
13094 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
13096 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
13097 (CPTI_PTMD_DESC_TYPE): ... here.
13098 (ptmd_desc_type_node): Rename to ...
13099 (ptm_desc_type_node): ... here.
13100 * decl.c: Likewise.
13101 * rtti.c (ptmd_initializer): Rename to ...
13102 (ptm_initializer): ... here.
13103 (sythesize_tinfo_var): Adjust. Deal with pointer to member
13105 (create_tinfo_types): Adjust.
13107 2000-05-25 Mark Mitchell <mark@codesourcery.com>
13109 Finish implementation of VTTs.
13110 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
13111 CPTI_VTT_PARM_IDENTIFIER.
13112 (vtt_parm_identifier): New macro.
13113 (vtt_parm_type): Likewise.
13114 (BINFO_SUBVTT_INDEX): Likewise.
13115 (BINFO_VPTR_INDEX): Likewise.
13116 (struct lang_decl): Add vtt_parm.
13117 (DECL_VTT_PARM): New macro.
13118 (DECL_USE_VTT_PARM): Likewise.
13119 (DECL_NEEDS_VTT_PARM_P): Likewise.
13120 (get_vtt_name): Declare.
13121 (build_artificial_parm): Likewise.
13122 (fixup_all_virtual_upcast_offsets): Likewise.
13123 (expand_indirect_vtbls_init): Remove.
13124 * call.c (build_new_method_call): Pass the vtt to subobject
13125 constructors and destructors.
13126 * class.c (get_vtt_name): Give it external linkage.
13127 (build_clone): Handle the magic VTT parameters for clones.
13128 (clone_function_decl): Fix typo in comment.
13129 (build_vtt): Keep track of the indices in the VTTs where various
13130 entities are stored.
13131 (build_vtt_inits): Likewise.
13132 (dfs_build_vtt_inits): Likewise.
13133 (build_ctor_vtbl_group): Tweak type of construction vtables.
13134 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
13135 primary bases, when building construction vtables.
13136 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
13137 (initialize_predefined_identifiers): Add vtt_parm_identifier.
13138 (init_decl_processing): Initialize vtt_parm_type.
13139 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
13140 (lang_mark_tree): Make vtt_parm.
13141 * decl2.c (build_artificial_parm): New function.
13142 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
13143 (grokclassfn): Use build_artificial_parm.
13144 * init.c (initialize_vtbl_ptrs): Call
13145 fixup_all_virtual_upcast_offsets directly.
13146 (perform_member_init): Use the complete subobject destructor for
13148 (build_vtbl_address): New function.
13149 (expand_virtual_init): Handle VTTs.
13150 * optimize (maybe_clone_body): Likewise.
13151 * search.c (fixup_all_virtual_upcast_offsets): Give it external
13153 (expand_indirect_vtbls_init): Remove.
13154 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
13155 * tree.c (make_binfo): Make them bigger.
13157 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
13159 * inc/cxxabi.h (__pbase_type_info): Define, based on
13160 __pointer_type_info.
13161 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
13162 (__pointer_to_member_type_info): Likewise.
13163 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
13164 (__pointer_to_member_type_info::__is_pointer_p): Remove.
13165 (__pointer_type_info::__do_catch): Rename to ...
13166 (__pbase_type_info::__do_catch): ... here. Adjust.
13167 (__pbase_type_info::__pointer_catch): Implement.
13168 (__pointer_type_info::__pointer_catch): Adjust.
13169 (__pointer_to_member_type_info::__pointer_catch): Adjust.
13171 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
13173 * tinfo.h (__user_type_info::contained_virtual_p): New
13175 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
13177 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
13178 diamond shaped hierarchy. Add early out for mixed diamond and
13179 duplicate shaped hierarchy.
13181 2000-05-24 Mark Mitchell <mark@codesourcery.com>
13183 * cp-tree.h (build_delete): Change prototype.
13184 (build_vec_delete): Likewise.
13185 * call.c (build_scoped_method_call): Use special_function_kind
13186 values to indicate the kind of destruction to be done.
13187 (build_method_call): Likewise.
13188 * decl.c (finish_destructor_body): Likewise.
13189 (maybe_build_cleanup_1): Likewise. Rename to ...
13190 (maybe_build_cleanup): ... this.
13191 * decl2.c (delete_sanity): Use special_function_kind
13192 values to indicate the kind of destruction to be done.
13193 (build_cleanup): Likewise.
13194 * init.c (perform_member_init): Likewise.
13195 (build_vec_delete_1): Likewise.
13196 (build_dtor_call): Simplify.
13197 (build_delete): Use special_function_kind
13198 values to indicate the kind of destruction to be done.
13199 (build_vbase_delete): Likewise.
13200 (build_vec_delete): Likewise.
13202 * init.c (sort_member_init): Fix typo in error message generation
13205 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
13207 * semantics.c (begin_class_definition): make the packed
13208 attribute be sensitive to the "-fpack-struct" command line flag
13210 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
13212 Update new-abi upcast algorithm.
13213 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
13214 prototype and meaning of return value.
13215 (__si_class_type_info::__do_upcast): Likewise.
13216 (__vmi_class_type_info::__do_upcast): Likewise.
13217 * tinfo.cc (__class_type_info::__upcast_result): Replace
13218 whole2dst with part2dst. Adjust ctor.
13219 (__class_type_info::__do_upcast): Adjust call of worker function.
13220 (__class_type_info::__do_upcast): Adjust.
13221 (__si_class_type_info::__do_upcast): Adjust. Use parent's
13223 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
13224 virtual base in diamond hierarchy bug.
13226 2000-05-23 Mark Mitchell <mark@codesourcery.com>
13228 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
13229 and bitfield to tinfo_fn_p.
13230 (DECL_TINFO_FN_P): Adjust.
13231 (SET_DECL_TINFO_FN_P): Likewise.
13232 (DECL_MUTABLE_P): Likewise.
13233 (DECL_C_BIT_FIELD): Likewise.
13234 (SET_DECL_C_BIT_FIELD): Likewise.
13235 (CLEAR_DECL_C_BIT_FIELD): Likewise.
13236 (DECL_UNINLINABLE): Likewise.
13237 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
13238 (handle_using_decl): Remove assertion.
13239 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
13240 to build FIELD_DECLs.
13241 (build_base_field): Likewise.
13242 (layout_class_type): Likewise.
13243 * decl.c (init_decl_processing): Likewise.
13244 (build_ptrmemfunc_type): Likewise.
13245 (grokdeclarator): Likewise.
13246 * decl2.c (grok_x_components): Likewise.
13247 * except.c (call_eh_info): Likewise.
13248 * init.c (init_init_processing): Likewise.
13249 * rtti.c (expand_class_desc): Likewise.
13250 (create_pseudo_type_info): Likewise.
13251 (get_vmi_pseudo_type_info): Likewise.
13252 (create_tinfo_types): Likewise.
13253 * ptree.c (print_lang_decl): Adjust.
13254 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
13255 before checking DECL_MUTABLE_P.
13257 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
13258 parameters for template functions.
13259 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
13260 destructors as well as constructors.
13262 2000-05-22 Mark Mitchell <mark@codesourcery.com>
13264 * class.c (build_ctor_vtbl_group): Set inits.
13265 * optimize.c (maybe_clone_body): Set DECL_INLINE and
13266 DECL_THIS_INLINE appropriately for clones.
13268 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
13269 (DECL_CONV_FN_P): Simplify.
13270 (DECL_OPERATOR): Remove.
13271 (language_to_string): Declare.
13272 * decl.c (duplicate_decls): Fix typo in comment.
13273 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
13274 (grok_op_properties): Use DECL_CONV_FN_P instead of
13275 IDENTIFIER_TYPENAME_P.
13276 * dump.c (dequeue_and_dump): Dump the language linkage of
13278 * error.c (language_to_string): Give it external linkage.
13279 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
13280 (implicitly_declare_fn): Set DECL_LANGUAGE.
13281 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
13282 IDENTIFIER_TYPENAME_P.
13283 (tsubst_decl): Likewise.
13284 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
13285 * semantics.c (finish_member_declaration): Don't mark members of
13286 classes declared in an extern "C" region as extern "C".
13288 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
13290 * decl2.c (qualified_lookup_using_namespace): Look through
13293 * decl.c (push_using_decl): Return the old decl on namespace level.
13295 2000-05-21 Mark Mitchell <mark@codesourcery.com>
13297 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
13298 (VTT_NAME_PREFIX): New macro.
13299 (CTOR_VTBL_NAME_PREFIX): Likewise.
13300 (get_ctor_vtbl_name): New function.
13301 * class.c (get_vtable_name): Simplify.
13302 (get_vtt_name): New function.
13303 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
13304 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
13305 when a virtual base becomes primary.
13306 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
13308 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
13309 additional parameters.
13310 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
13311 (initialize_array): New function.
13312 (build_vtt): Likewise.
13313 (build_vtt_inits): Likewise.
13314 (dfs_build_vtt_inits): Likewise.
13315 (dfs_fixup_binfo_vtbls): Likewise.
13316 (build_ctor_vtbl_group): Likewise.
13317 (initialize_vtable): Use initialize_array.
13318 (accumulate_vtbl_inits): Reimplement to handle construction
13320 (dfs_accumulate_vtbl_inits): Likewise.
13321 (bulid_vtbl_initializer): Adjust parameter name.
13322 * method.c (build_typename_overload): Remove #if 0'd code.
13323 (get_ctor_vtbl_name): New function.
13324 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
13325 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
13327 * cp-tree.h (struct lang_type): Remove search_slot.
13328 (CLASSTYPE_SEARCH_SLOT): Remove.
13329 (emit_base_init): Change prototype.
13330 (initialize_vtbl_ptrs): Likewise.
13331 (expand_indirect_vtbls_init): Likewise.
13332 (clear_search_slots): Remove.
13333 * decl.c (lang_mark_tree): Don't mark search_slot.
13334 * init.c (initialize_vtbl_ptrs): Simplify.
13335 (emit_base_init): Likewise.
13336 * search.c (struct vbase_info): Document decl_ptr.
13337 (convert_pointer_to_single_level): Remove.
13338 (dfs_find_vbases): Remove.
13339 (dfs_init_base_pointers): Simplify.
13340 (dfs_clear_vbase_slots): Remove.
13341 (dfs_vtable_path_unmark): New function.
13342 (init_vbase_pointers): Simplify.
13343 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
13344 (expand_indirect_vtbls_init): Simplify. Don't call
13345 mark_all_temps_used.
13346 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
13347 initialize_vtbl_ptrs.
13349 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
13351 * except.c: Add static prototypes.
13353 2000-05-20 H.J. Lu <hjl@gnu.org>
13355 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
13357 2000-05-19 Mark Mitchell <mark@codesourcery.com>
13359 Don't create a separate copy of virtual bases for the
13360 CLASSTYPE_VBASECLASSES list.
13361 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
13362 (BINFO_FOR_VBASE): Remove.
13363 (CANONICAL_BINFO): Adjust.
13364 (binfo_for_vbase): New function.
13365 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
13366 instead of BINFO_FOR_VBASE.
13367 (build_vbase_pointer): Likewise.
13368 (build_secondary_vtable): Likewise.
13369 (dfs_mark_primary_bases): Likewise.
13370 (mark_primary_bases): Likewise.
13371 (layout_nonempty_base_or_field): Likewise.
13372 (dfs_set_offset_for_shared_vbases): Likewise.
13373 (dfs_set_offset_for_unshared_vbases): Likewise.
13374 (layout_virtual_bases): Likewise. Adjust for changes to the
13375 CLASSTYPE_VBASECLASSES list.
13376 (dump_class_hierarchy_r): Use binfo_for_vbase
13377 instead of BINFO_FOR_VBASE.
13378 (dump_class_hierarchy): Likewise.
13379 (finish_vtbls): Likewise.
13380 (build_vtbl_initializer): Adjust for changes to the
13381 CLASSTYPE_VBASECLASSES list.
13382 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
13383 * decl.c (finish_destructor_body): Adjust for changes to the
13384 CLASSTYPE_VBASECLASSES list.
13385 * init.c (sort_base_init): Use binfo_for_vbase.
13386 (construct_virtual_bases): Adjust for changes to the
13387 CLASSTYPE_VBASECLASSES list.
13388 (expand_member_init): Use binfo_for_vbase.
13389 (build_vbase_delete): Adjust for changes to the
13390 CLASSTYPE_VBASECLASSES list.
13391 * method.c (do_build_copy_constructor): Likewise.
13392 * rtti.c (get_base_offset): Use binfo_for_vbase.
13393 (expand_class_desc): Remove #if 0'd code.
13394 * search.c (struct vbase_info): Remove vbase_types.
13395 (get_base_distance): Use binfo_for_vbase.
13396 (lookup_field_queue_p): Use CANONICAL_BINFO.
13397 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
13398 (get_pure_virtuals): Adjust for changes to the
13399 CLASSTYPE_VBASECLASSES list.
13400 (dfs_find_vbases): Use binfo_for_vbase.
13401 (dfs_init_vbase_pointers): Likewise.
13402 (init_vbase_pointers): Don't initialize vi.vbase_types.
13403 (virtual_context): Use binfo_for_vbase.
13404 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
13405 CLASSTYPE_VBASECLASSES list.
13406 (expand_indirect_vtbls_init): Simplify.
13407 (dfs_get_vbase_types): Don't replicate virtual bases.
13408 (find_vbase_instance): Use binfo_for_vbase.
13409 (binfo_for_vbase): New function.
13410 * typeck.c (get_delta_difference): Use binfo_for_vbase.
13412 2000-05-17 Mark Mitchell <mark@codesourcery.com>
13414 * decl2.c (finish_anon_union): Generalize error messages to handle
13415 anonymous structures.
13416 * init.c (perform_member_init): Remove `name' parameter.
13417 (build_field_list): New function.
13418 (sort_member_init): Handle anonymous union initialization order
13419 correctly. Check for multiple initializations of the same union.
13420 (emit_base_init): Don't look up fields by name here.
13421 (expand_member_init): Record the result of name lookup for future
13423 * typeck.c (build_component_ref): Fix formatting.
13425 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
13427 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
13428 * typeck.c (build_x_compound_expr): Replace warn_unused with
13431 * decl2.c (lang_decode_option): Update -Wall unused flags by
13432 calling set_Wunused.
13434 2000-05-16 Mark Mitchell <mark@codesourcery.com>
13436 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
13437 * init.c (dfs_vtable_path_unmark): Remove.
13438 * search.c (marked_new_vtable_p): Likewise.
13439 (unmarked_new_vtable_p): Likewise.
13440 (dfs_search_slot_nonempty_p): Likewise.
13441 (dfs_mark): Likewise.
13442 (dfs_vtable_path_unmark): Likewise.
13443 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
13444 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
13445 (dfs_init_vbase_pointers): Remove special-case new ABI code.
13446 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
13447 (init_vbase_pointers): Simplify.
13448 (expand_indirect_vtbls_init): Likewise.
13450 * class.c (copy_virtuals): New function.
13451 (build_primary_table): Use it.
13452 (build_secondary_vtable): Likewise.
13453 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
13454 indicate that no vcall offset is required.
13455 (add_virtual_function): Likewise.
13456 (modify_all_vtables): Likewise.
13457 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
13458 (dfs_accumulate_vtbl_inits): Likewise.
13459 (build_vtbl_initializer): Make changes to handle construction
13461 (dfs_build_vcall_offset_vtbl_entries): Likewise.
13462 (build_rtti_vtbl_entries): Likewise.
13463 (build_vtable_entries): Handle a NULL vcall_index.
13465 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
13467 * decl2.c (lang_decode_option): Fix thinko.
13469 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
13471 * except.c (check_handlers): New fn.
13472 * cp-tree.h: Declare it.
13473 * semantics.c (finish_handler_sequence): Call it.
13474 (finish_function_handler_sequence): Likewise.
13475 (finish_handler_parms): Set TREE_TYPE on the handler.
13476 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
13477 * search.c (get_base_distance_recursive): If protect>1, ignore
13479 (get_base_distance): Don't reduce watch_access.
13481 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
13483 * lex.c: #include diagnostic.h.
13484 (lang_init_options): Set default prefixing rules.
13486 * lang-options.h: Add -fdiagnostics-show-location=.
13488 * decl2.c: #include diagnostic.h.
13489 (lang_decode_option): Handle -fdiagnostics-show-location=.
13491 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
13493 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
13494 * vec.cc: Revert my 2000-05-07 change.
13496 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
13498 * class.c (check_field_decls): Complain about non-static data
13499 members with same name as class in class with constructor.
13501 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
13503 * decl.c (grokdeclarator): Allow non-static data members with
13504 same name as class.
13506 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
13508 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
13509 and pending_inline.filename. Update prototypes.
13510 * decl.c (define_label): Constify filename parameter.
13511 * decl2.c (warn_if_unknown_interface): Constify local char *.
13512 * input.c Constify input_source.filename. Don't declare
13513 input_filename or lineno. Constify filename parameter to feed_input.
13514 * lex.c (init_parse): Constify parameter and return value.
13515 (cp_pragma_interface, cp_pragma_implementation): Constify
13517 (reinit_parse_for_method, reinit_parse_for_block,
13518 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
13519 Constify local char *.
13520 * pt.c: Don't declare lineno or input_filename.
13521 (print_template_context, tsubst_friend_function, tsubst_decl,
13522 tsubst, instantiate_decl): Constify local char *.
13523 * semantics.c (expand_body): Constify local char *.
13524 * tree.c (build_srcloc): Constify filename parameter.
13525 * typeck.c (c_expand_asm_operands): Constify filename
13528 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
13530 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
13531 offsetof expansion.
13533 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
13535 * inc/cxxabi.h: Fix typos in comment.
13536 (__base_class_info::__offset): Use a static_cast.
13538 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
13540 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
13541 of std::size_t and std::ptrdiff_t respectively.
13542 * tinfo.cc: Likewise.
13543 * vec.cc: Likewise.
13545 2000-05-06 Richard Henderson <rth@cygnus.com>
13547 * typeck.c (build_c_cast): Don't warn integer->pointer size
13548 mismatch for constants.
13550 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
13552 * rtti.c (ptmd_initializer): Set non-public, if class is
13555 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
13556 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
13557 __cxa_vec_delete): Likewise.
13558 * tinfo.cc (__dynamic_cast): Likewise.
13559 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
13560 __cxa_vec_delete): Likewise.
13562 2000-05-04 Mark Mitchell <mark@codesourcery.com>
13564 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
13565 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
13566 (lang_decl_flags): Add vcall_offset.
13567 (THUNK_VCALL_OFFSET): Use it.
13568 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
13569 * method.c (make_thunk): Create the lang_decl here, not in
13571 (emit_thunk): Make generic thunks into ordinary functions once
13572 they have been fed to expand_body.
13573 * semantics.c (expand_body): Set current_function_is_thunk here.
13575 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13577 * class.c (update_vtable_entry_for_fn): Prototype.
13579 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
13582 * search.c (dfs_build_inheritance_graph_order): Prototype.
13584 2000-05-04 Mark Mitchell <mark@codesourcery.com>
13586 * cp-tree.h (special_function_kind): Add various kinds of
13588 (special_function_p): New function.
13589 * class.c (overrides): Don't let one kind of destructor override
13591 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
13592 whether or not to instantiate a template.
13593 * tree.c (special_function_p): Define.
13595 2000-05-03 Mark Mitchell <mark@codesourcery.com>
13597 * cp-tree.def (THUNK_DECL): Remove.
13598 * cp-tree.h (DECL_THUNK_P): New macro.
13599 (DECL_NON_THUNK_FUNCTION_P): Likewise.
13600 (DECL_EXTERN_C_FUNCTION_P): Likewise.
13601 (SET_DECL_THUNK_P): Likewise.
13602 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
13603 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
13604 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
13605 * decl.c (decls_match): Use DECL_EXTERN_C_P.
13606 (duplicate_decls): Likewise.
13607 (pushdecl): Likewise. Adjust thunk handling.
13608 (grokfndecl): Use DECL_EXTERN_C_P.
13609 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
13610 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
13611 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
13612 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
13613 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
13614 DECL_NO_STATIC_CHAIN.
13615 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
13616 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
13617 * search.c (covariant_return_p): Remove THUNK_DECL handling.
13620 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
13622 * tree.c (walk_tree): Set lineno.
13624 2000-05-01 Mark Mitchell <mark@codesourcery.com>
13626 * exception.cc: Update license notice.
13627 * new.cc: Likewise.
13628 * new1.cc: Likewise.
13629 * new2.cc: Likewise.
13630 * tinfo.cc: Likewise.
13631 * tinfo2.cc: Likewise.
13632 * vec.cc: Likewise.
13633 * inc/cxxabi.h: Likewise.
13634 * inc/exception: Likewise.
13635 * inc/new: Likewise.
13636 * inc/new.h: Likewise.
13637 * inc/typeinfo: Likewise.
13639 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
13641 * tree.c (build_target_expr_with_type): If we already have a
13642 TARGET_EXPR, just return it.
13644 * optimize.c (initialize_inlined_parameters): Don't generate an
13645 EXPR_STMT if we can just use DECL_INITIAL.
13646 * decl.c (emit_local_var): Only make the initialization a
13647 full-expression if stmts_are_full_exprs_p.
13649 2000-05-01 Mark Mitchell <mark@codesourcery.com>
13651 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
13653 * call.c (standard_conversion): Use it.
13654 (direct_reference_binding): Likewise.
13655 (build_over_call): Likewise.
13656 (is_properly_derived_from): Likewise.
13657 (compare_ics): Likewise.
13658 * class.c (resolves_to_fixed_type_p): Likewise.
13659 * optimize.c (declare_return_variable): Likewise.
13660 * pt.c (is_specialization_of): Likewise.
13662 * typeck.c (comp_target_parms): Likeiwse.
13663 (build_static_cast): Likewise.
13664 (build_reinterpret_cast): Likewise.
13665 (build_const_cast): Likewise.
13666 (comp_ptr_ttypes_real): Likewise.
13667 (comp_ptr_ttypes_const): Likewise.
13668 * typeck2.c (process_init_constructor): Likewise.
13670 2000-04-30 Scott Snyder <snyder@fnal.gov>
13672 * decl.c (finish_destructor_body): Use the base destructor when
13673 destroying virtual bases.
13675 2000-04-30 Mark Mitchell <mark@codesourcery.com>
13677 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
13679 * optimize.c (struct inline_data): Add target_exprs field.
13680 (declare_return_variable): When a function returns an aggregate,
13681 use the variable declared in the TARGET_EXPR as the remapped
13683 (expand_call_inline): Update the pending target_exprs stack.
13684 (optimize_function): Initialize the stack.
13686 * decl2.c (finish_file): Fix typo in comment.
13688 * method.c (emit_thunk): Don't try to return a `void' value.
13690 * optimize.c (initialize_inlined_parameters): If the parameter is
13691 addressable, we need to make a new VAR_DECL, even if the
13692 initializer is constant.
13694 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
13696 * decl.c (grok_op_properties): Add an extra check of argtypes.
13698 2000-04-27 Mark Mitchell <mark@codesourcery.com>
13700 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
13702 (initialize_inlined_parameters): Try to avoid creating new
13705 2000-04-27 Alex Samuel <samuel@codesourcery.com>
13707 * lex.c (my_get_run_time): Remove.
13708 (init_filename_times): Use get_run_time instead of my_get_run_time.
13709 (check_newline): Likewise.
13710 (dump_time_statistics): Likewise.
13711 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
13712 of computing elapsed time explicitly.
13714 2000-04-26 Mark Mitchell <mark@codesourcery.com>
13716 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
13717 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
13718 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
13719 before calling decl_constant_value.
13720 * class.c (check_bitfield_decl): Likewise.
13721 * cvt.c (ocp_convert): Likewise.
13722 (convert): Likewise.
13723 * decl.c (compute_array_index_type): Likewise.
13724 (build_enumerator): Likewise.
13725 * decl2.c (check_cp_case_value): Likewise.
13726 * pt.c (convert_nontype_argument): Likewise.
13727 (tsubst): Likewise.
13728 * typeck.c (decay_conversion): Likewise.
13729 (build_compound_expr): Likewise.
13730 (build_reinterpret_cast): Likewise.
13731 (build_c_cast): Likewise.
13732 (convert_for_assignment): Likewise.
13734 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
13736 * decl.c (finish_function): Don't play games with DECL_INLINE.
13738 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
13740 * ir.texi: Correct typo.
13742 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
13744 * decl.c (grokdeclarator): Reject VLAs as members.
13746 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
13748 * call.c (standard_conversion): Accept conversion between
13751 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
13753 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
13755 * decl2.c (finish_file): Remove double setup for accounting
13758 2000-04-24 Robert Lipe <robertlipe@usa.net>
13760 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
13762 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
13764 * new.cc (set_new_handler): Needs to be in std::.
13766 2000-04-23 Mark Mitchell <mark@codesourcery.com>
13768 * cp-tree.h (lang_decl): Remove pretty_function_p.
13769 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
13770 language-specific node.
13771 * decl.c (cp_make_fname_decl): Use build_decl, not
13772 build_lang_decl, to build the variables.
13773 (grokvardecl): Don't call build_lang_decl for local variables in
13775 (grokdeclarator): Don't call build_lang_decl for local type
13776 declarations in templates.
13777 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
13778 zero'd memory, rather than calling memset.
13779 * pt.c: Include hashtab.h.
13780 (local_specializations): New variable.
13781 (retrieve_local_specialization): Use it.
13782 (register_local_specialization): Likewise.
13783 (tsubst_decl): Don't assume local variables have
13784 DECL_LANG_SPECIFIC.
13785 (instantiate_decl): Set up local_specializations.
13786 * Makefile.in (HTAB_H): New variable.
13788 2000-04-23 Richard Henderson <rth@cygnus.com>
13790 * typeck.c (c_expand_asm_operands): Restore the original
13791 contents of the output list.
13793 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
13795 * ir.texi: Document complex number representation.
13797 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
13799 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
13800 (target_incomplete_p): New function.
13801 (tinfo_base_init): Create comdat NTBS name variable.
13802 (ptr_initializer): Add non_public parameter. Calculate it.
13803 (ptmd_initializer): Likewise.
13804 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
13805 (create_real_tinfo_var): Add non_public parameter. Use it.
13806 Push proxy into global namespace.
13807 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
13809 * inc/typeinfo (type_info::before, type_info::operator==):
13810 Compare __name addresses.
13812 * tinfo2.cc: Remove new-abi builtins comment.
13814 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
13816 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
13818 * call.c (joust): Exit early if we get the same function, too.
13820 * decl2.c (key_method): Return NULL_TREE for template classes.
13821 (import_export_class): Don't need to check for template classes.
13823 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
13825 * lex.c: Remove references to cccp.c.
13827 2000-04-18 Mark Mitchell <mark@codesourcery.com>
13829 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
13830 volatile_memfunc. Add destructor_attr. Adjust dummy.
13831 (DECL_DESTRUCTOR_P): Use destructor_attr.
13832 (DECL_CONST_MEMFUNC_P): Reimplement.
13833 (DECL_VOLATILE_MEMFUNC_P): Remove.
13834 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
13835 (overrides): Use DECL_DESTRUCTOR_P.
13836 (check_for_override): Likewise.
13837 * decl.c (start_function): Likewise.
13838 * decl2.c (grokfclassfn): Likewise.
13839 (check_classfn): Likewise.
13840 (grok_function_init): Likewise.
13842 2000-04-17 Mark Mitchell <mark@codesourcery.com>
13844 * decl2.c (grokfield): Issue error on illegal data member
13847 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
13849 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
13851 2000-04-16 Mark Mitchell <mark@codesourcery.com>
13853 * class.c (build_vtable_entry): Don't build thunks for type-info
13856 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
13858 * decl.c (decls_match): Allow a redeclaration of a builtin to
13859 specify args while the builtin did not.
13861 2000-04-15 Mark Mitchell <mark@codesourcery.com>
13863 * cp-tree.def (THUNK_DECL): Add to documentation.
13864 * cp-tree.h (flag_huge_objects): Declare.
13865 * class.c (modify_vtable_entry): Tidy.
13866 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
13867 Calculate delta appropriately for the new ABI.
13868 (dfs_modify_vtables): Use it.
13869 (modify_all_vtables): Fix thinko in code to add overriding copies
13870 of functions to primary vtables.
13871 (build_clone): Fix typo in comment.
13872 (clone_function_decl): Correct order of destructors in vtable.
13873 (build_vbase_offset_vtbl_entries): Adjust comment.
13874 (dfs_vcall_offset_queue_p): Remove.
13875 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
13876 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
13877 (build_vtable_entry): Correct check for pure virtual functions.
13878 Don't declare flag_huge_objects.
13879 * decl.c (flag_huge_objects): Remove declaration.
13880 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
13881 Use int_size_in_bytes.
13882 (emit_thunk): Handle vcall offset thunks.
13884 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13886 * decl2.c (parse_time, varconst_time): Delete declarations.
13887 (finish_file): Delete LINENO declaration.
13888 START_TIME and THIS_TIME now long.
13890 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
13892 * class.c (build_base_field): Reformat comment.
13894 * inc/cxxabi.h (stddef.h): Comment inclusion.
13895 (__base_class_info::__offset): Comment shift.
13897 2000-04-12 Mark Mitchell <mark@codesourcery.com>
13899 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
13900 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
13901 (cp_push_exception_identifier): New macro.
13902 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
13903 (DECL_BASE_DESTRUCTOR_P): Likewise.
13904 (DECL_DELETING_DESTRUCTOR_P): Likewise.
13905 (get_vtbl_decl_for_binfo): Fix formatting.
13906 (in_charge_arg_for_name): New macro.
13907 (maybe_build_cleanup_and_delete): Remove declaration.
13908 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
13909 (in_charge_arg_for_name): New function.
13910 (build_new_method_call): Use it. Handle cloned destructors.
13911 (build_clone): Don't make the base constructor virtual.
13912 Automatically defer generated functions.
13913 (clone_function_decl): Handle destructors, too.
13914 (clone_constructors_and_destructors): Likewise.
13915 (create_vtable_ptr): Don't create a vtable entry for a cloned
13917 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
13918 (initialize_predefined_identifiers): Update appropriately.
13919 (finish_destructor_body): Simplify.
13920 (maybe_build_cleanup_and_delete): Remove.
13921 * except.c (expand_throw): Handle new-ABI destructors.
13922 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
13923 (build_dtor_call): New function.
13924 (build_delete): Use it. Simplify.
13925 * optimize.c (maybe_clone_body): Handle destructors.
13926 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
13928 * exception.cc (cleanup_fn): New typedef.
13929 (CALL_CLEANUP): New macro.
13930 (cp_eh_info): Use them.
13931 (__cp_push_exception): Likewise.
13932 (__cp_pop_exception): Likewise.
13934 2000-04-11 Mark Mitchell <mark@codesourcery.com>
13936 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
13937 (complete_dtor_identifier): New macro.
13938 (CLASSTYPE_FIRST_CONVERSION): Remove.
13939 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
13940 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
13941 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
13942 (CLASSTYPE_CONSTRUCTORS): Likewise.
13943 (CLASSTYPE_DESTRUCTORS): Likewise.
13944 (lang_decl): Add cloned_function.
13945 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
13946 (DECL_BASE_CONSTRUCTOR_P): Likewise.
13947 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
13948 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
13949 (DECL_CLONED_FUNCTION_P): Likewise.
13950 (DECL_CLONED_FUNCTION): Likewise.
13951 (clone_function_decl): Declare.
13952 (maybe_clone_body): Likewise.
13953 * call.c (build_user_type_conversion_1): Call complete object
13954 constructors in the new ABI.
13955 (build_new_method_call): Don't add in-charge parameters under the
13957 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
13958 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
13959 CLASSTYPE_DESTRUCTOR_SLOT.
13960 (build_clone): New function.
13961 (clone_function_decl): Likewise.
13962 (clone_constructors_and_destructors): Likewise.
13963 (check_bases_and_members): Use it.
13964 * decl.c (iniitialize_predefined_identifiers): Initialize
13965 complete_dtor_identifier.
13966 (finish_function): Don't add extra code to a clone.
13967 (lang_mark_tree): Mark cloned_function.
13968 * decl2.c (mark_used): Don't bother trying to instantiate things
13970 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
13971 * method.c (set_mangled_name_for_decl): Don't treat clones as
13973 (synthesize_method): Sythesize cloned functions, not the clones.
13974 * optimize.c (inline_data): Update comment on ret_label.
13975 (remap_block): Don't assume DECL_INITIAL exists.
13976 (copy_body_r): Allow ret_label to be NULL.
13977 (maybe_clone_body): Define.
13978 * pt.c (tsubst_decl): Handle clones.
13979 (instantiate_clone): New function.
13980 (instantiate_template): Use it.
13981 (set_mangled_name_for_template_decl): Don't treat clones as
13983 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
13984 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
13985 * semantics.c (expand_body): Clone function bodies as necessary.
13987 * optimize.c (remap_decl): Avoid sharing structure for arrays
13988 whose size is only known at run-time.
13989 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
13991 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
13992 to has_in_charge_parm_p.
13993 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
13994 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
13995 (DECL_COPY_CONSTRUCTOR_P): New macro.
13996 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
13997 (build_user_type_conversion_1): Likewise.
13998 (convert_like_real): Likewise.
13999 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
14000 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
14001 (copy_args_p): Likewise.
14002 (grok_ctor_properties): Likewise.
14003 (start_function): Likewise.
14004 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
14005 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
14006 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
14007 * method.c (do_build_copy_constructor): Use
14008 DECL_HAS_IN_CHARGE_PARM_P.
14009 (synthesize_method): Likewise.
14010 * pt.c (instantiate_template): Remove goto.
14011 * tree.c (build_cplus_method_type): Remove mention of obstacks in
14014 * cp-tre.h (finish_function): Change prototype.
14015 * decl.c (end_cleanup_fn): Adjust caller.
14016 (finish_function): Take only one parameter.
14017 * decl2.c (finish_objects): Adjust caller.
14018 (finish_static_storage_duration_function): Likewise.
14019 * method.c (emit_thunk): Likewise.
14020 * parse.y: Likewise.
14021 * parse.c: Regenerated.
14022 * pt.c (instantiate_decl): Likewise.
14023 * rtti.c (synthesize_tinfo_fn): Likewise.
14024 * semantics.c (expand_body): Likewise.
14026 * cp-tree.h (copy_decl): New function.
14027 * class.c (finish_struct_1): Use it.
14028 * lex.c (copy_decl): Define it.
14029 * pt.c (tsubst_decl): Likewise.
14030 * tree.c (copy_template_template_parm): Likewise.
14032 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
14033 has_nonpublic_assign_ref.
14034 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
14035 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
14036 * class.c (finish_struct_methods): Don't set
14037 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
14038 (interface_only): Don't declare.
14039 (interface_unknown): Likewise.
14041 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14043 * tree.h (HAVE_TEMPLATES): Remove definition.
14044 * lang-options.h (-fthis-is-variable): Remove documentation.
14046 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
14048 * class.c (instantiate_type): Handle object-relative template-id.
14050 * semantics.c (finish_expr_stmt): Call convert_to_void here.
14051 * decl.c (cplus_expand_expr_stmt): Not here.
14053 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
14054 Initialize exprtype earlier.
14056 * parse.y (fn.def1): Check for defining types in return types.
14058 * decl.c (check_tag_decl): Notice extra fundamental types.
14059 Diagnose empty decls in classes, too.
14061 * decl.c (grokdeclarator): Don't override an anonymous name if no
14062 declarator was given.
14064 * cvt.c (convert_to_void): Call resolve_offset_ref.
14066 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
14068 * decl2.c (decl_namespace): Handle getting a type.
14070 * typeck.c (build_c_cast): Re-enable warning for cast between
14071 pointer and integer of different size.
14073 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
14075 * inc/cxxabi.h (__pointer_type_info): Add restrict and
14077 (__pointer_type_info::__pointer_catch): New virtual function.
14078 (__pointer_to_member_type_info): Derive from
14079 __pointer_type_info. Adjust.
14080 (__pointer_to_member_type_info::__do_catch): Remove.
14081 (__pointer_to_member_type_info::__is_pointer_p): Declare.
14082 (__pointer_to_member_type_info::__pointer_catch): Declare.
14083 * rtti.c (qualifier_flags): Add restrict flag.
14084 (ptmd_initializer): Reorder members.
14085 (create_tinfo_types): Expand comments. Reorder
14086 ptmd_desc_type_node members.
14087 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
14089 (__pointer_type_info::__do_catch): Move specific code into
14090 __pointer_catch. Call it.
14091 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
14092 specific catch checking. Fix void conversion check.
14093 (__pointer_to_member_type_info::__do_catch): Remove.
14094 (__pointer_to_member_type_info::__pointer_catch): Implement.
14096 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14098 * lex.c (init_parse): Remove traces of classof and headof.
14099 * decl2.c (flag_operator_names): Default to 1.
14100 (lang_decode_option): Do not set it for -ansi.
14102 2000-04-09 Mark Mitchell <mark@codesourcery.com>
14104 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
14105 (DECL_MAIN_VARIANT): Remove.
14106 * decl.c (duplicate_decls): Don't set it.
14107 (start_function): Likewise.
14108 (lang_mark_tree): Don't mark it.
14109 * decl2.c (defer_fn): Don't use it.
14110 * lex.c (retrofit_lang_decl): Don't set it.
14111 * pt.c (tsubst_decl): Likewise.
14112 * ptree.c (print_lang_decl): Don't print it.
14113 * typeck.c (mark_addressable): Don't use it.
14115 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
14117 * vec.cc: Include <new> and <exception>.
14118 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
14119 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
14121 (__cxa_vec_delete): Catch dtor exceptions.
14123 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
14125 Prepend __ to implementation defined names.
14126 * inc/typeinfo (type_info): Rename _name to __name.
14127 (type_info::type_info): Rename parameter.
14128 (type_info::operator==, type_info::operator!=,
14129 type_info::before): Likewise.
14130 (type_info::is_pointer_p, type_info::is_function_p,
14131 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
14134 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
14135 (__pointer_type_info::__pointer_type_info): Likewise.
14136 (__pointer_type_info::is_pointer_p,
14137 __pointer_type_info::do_catch): Prepend __. Rename parameters.
14138 (__array_type_info::__array_type_info): Rename parameters.
14139 (__function_type_info::__function_type_info): Likewise.
14140 (__function_type_info::is_function_p): Prepend __.
14141 (__enum_type_info::__enum_type_info): Rename parameters.
14142 (__pointer_to_member_type_info::__pointer_to_member_type_info):
14144 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
14146 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
14147 (__class_type_info::__class_type_info): Rename parameters.
14148 (__class_type_info::sub_kind): Prepend __. Adjust member names.
14149 (__class_type_info::upcast_result,
14150 __class_type_info::dyncast_result): Prepend __. Move definition
14152 (__class_type_info::do_upcast, __class_type_info::do_catch,
14153 __class_type_info::find_public_src,
14154 __class_type_info::do_dyncast,
14155 __class_type_info::do_find_public_src): Prepend __. Rename
14157 (__si_class_type_info::__si_class_type_info): Rename parameters.
14158 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
14159 __si_class_type_info::do_find_public_src): Prepent __. Rename
14161 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
14162 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
14163 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
14165 (__dynamic_cast): Rename parameters.
14166 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
14167 type_info::do_catch, type_info::do_upcast): Prepend __.
14168 (contained_p, public_p, virtual_p, contained_public_p,
14169 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
14170 (__class_type_info::do_catch,
14171 __class_type_info::do_upcast): Prepend __. Adjust.
14172 (__class_type_info::__upcast_result,
14173 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
14175 (__class_type_info::find_public_src): Prepend __. Adjust.
14176 (__class_type_info::do_find_public_src,
14177 __si_class_type_info::do_find_public_src,
14178 __vmi_class_type_info::do_find_public_src): Likewise.
14179 (__class_type_info::do_dyncast,
14180 __si_class_type_info::do_dyncast,
14181 __vmi_class_type_info::do_dyncast): Likewise.
14182 (__class_type_info::do_upcast,
14183 __si_class_type_info::do_upcast,
14184 __vmi_class_type_info::do_upcast): Likewise.
14185 (__dynamic_cast): Adjust.
14186 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
14187 (__function_type_info::is_function_p): Likewise.
14188 (__pointer_type_info::do_catch): Likewise. Adjust.
14189 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
14190 (__throw_type_match_rtti_2): Adjust.
14191 (__is_pointer): Adjust.
14193 2000-04-08 Mark Mitchell <mark@codesourcery.com>
14195 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
14196 (complete_ctor_identifier): New macro.
14197 (special_function_kind): Add sfk_copy_constructor and
14198 sfk_assignment_operator.
14199 (LOOKUP_HAS_IN_CHARGE): Remove.
14200 (cons_up_default_function): Rename to ...
14201 (implicitly_declare_fn): ... this.
14202 * call.c (build_new_method_call): Add in-charge parameters for
14204 * class.c (add_implicitly_declared_members): Change parameter name
14205 from cant_have_assignment to cant_have_const_assignment.
14206 Replace calls to cons_up_default_function to implicitly_declare_fn.
14207 * cvt.c (ocp_convert): Use complete_ctor_identifier.
14208 * decl.c (initialize_predefined_identifiers): Initialize it.
14209 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
14210 complex expression.
14211 * init.c (expand_default_init): Don't calculate the in-charge
14213 (build_new_1): Likewise.
14214 * lex.c (cons_up_default_function): Move to method.c.
14215 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
14216 (implicitly_declare_fn): New function.
14217 * typeck.c (build_static_cast): Use complete_ctor_identifier.
14218 (build_modify_expr): Likewise.
14219 * typeck2.c (build_functional_cast): Likewise.
14221 Under the new ABI, constructors don't return `this'.
14222 * cp-tree.h (warn_reorder): Declare.
14223 (special_function_kind): New enum.
14224 (global_base_init_list): Remove declaration.
14225 (emit_base_init): Don't return a value.
14226 (check_base_init): Don't declare.
14227 (is_aggr_typedef): Likewise.
14228 * decl.c (check_special_function_return_type): New function.
14229 (return_types): Remove.
14230 (grokdeclarator): Use check_special_function_return_type.
14231 (start_function): Don't initialize ctor_label under the new ABI.
14232 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
14233 * init.c (begin_init_stmts): Move to top of file.
14234 (finish_init_stmts): Likewise.
14235 (warn_reorder): Don't declare.
14236 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
14238 (check_base_init): Remove.
14239 (is_aggr_typedef): Likewise.
14240 (build_new_1): Don't use the return value of a constructor.
14241 * semantics.c (setup_vtbl_ptr): Don't use the return value
14243 * typeck.c (check_return_expr): Don't magically convert return
14244 statements into `return this' in constructors under the new ABI.
14246 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
14247 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
14248 (base_ctor_identifier): New macro.
14249 (base_dtor_identifier): Likewise.
14250 (deleting_dtor_identifier): Likewise.
14251 * decl.c: Don't include obstack.h.
14252 (obstack_chunk_alloc): Don't define.
14253 (obstack_chunk_free): Likewise.
14254 (struct predefined_identifier): New type.
14255 (initialize_predefined_identifiers): New function.
14256 (init_decl_processing): Use it.
14257 (debug_temp_inits): Remove.
14258 (start_method): Don't call preserve_data.
14259 (hack_incomplete_structures): Update comment.
14260 * init.c (init_init_processing): Don't initialize
14262 (build_offset_rf): Remove dead code.
14263 (build_delete): Use CLASSTYPE_N_BASECLASSES.
14264 * search.c (init_search_processing): Don't initialize
14267 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14269 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
14270 some sign_compare warnings.
14272 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
14274 Rename abi::__vmi_class_type_info members.
14275 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
14276 base_list, detail_masks members to vmi_flags, vmi_base_count,
14277 vmi_bases and vmi_flags_masks respectively.
14278 (__vmi_class_type_info::vmi_flags_masks): Rename
14279 details_unknown_mask to flags_unknown_mask.
14280 * tinfo.cc (__class_type_info::do_upcast): Adjust.
14281 (__vmi_class_type_info::do_find_public_src): Adjust.
14282 (__vmi_class_type_info::do_dyncast): Adjust.
14283 (__vmi_class_type_info::do_upcast): Adjust.
14285 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
14287 * tinfo.cc (convert_to_base): New function.
14288 (get_vbase_offset): Remove. Move into convert_to_base.
14289 (__vmi_class_type_info::do_find_public_src): Adjust.
14290 (__vmi_class_type_info::do_dyncast): Adjust.
14291 (__vmi_class_type_info::do_upcast): Adjust.
14293 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
14295 * tinfo.cc (operator=): Use __builtin_strcmp.
14296 * tinfo2.cc (before): Likewise.
14298 2000-04-06 Mark Mitchell <mark@codesourcery.com>
14300 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
14301 (DECL_SAVED_INLINE): Rename to ...
14302 (DECL_DEFERRED_FN): ... this.
14303 (in_function_p): Remove declaration.
14304 (mark_inline_for_output): Rename to ...
14305 (defer_fn): ... this.
14306 * decl.c (finish_function): Adjust call to mark_inline_for_output.
14307 (in_function_p): Remove definition.
14308 * decl2.c (saved_inlines): Rename to ...
14309 (deferred_fns): ... this.
14310 (saved_inlines_used): Rename to ...
14311 (deferred_fns_used): ... this.
14312 (mark_inline_for_output): Rename to ...
14313 (defer_fn): ... this.
14314 (finish_file): Adjust accordingly.
14315 (init_decl2): Likewise.
14316 * lex.c (cons_up_default_function): Likewise.
14317 * pt.c (mark_decl_instantiated): Likewise.
14318 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
14320 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
14321 * semantics.c (expand_body): Defer more functions.
14323 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
14325 * vec.cc: New file.
14326 * Make-lang.in (CXX_LIB2FUNCS): Add it.
14328 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
14329 __cxa_vec_delete): Declare.
14331 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
14333 * rtti.c (dfs_class_hint_mark): New static function.
14334 (dfs_class_hint_unmark): New static function.
14335 (class_hint_flags): Use them.
14337 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
14339 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
14341 2000-04-05 Mark Mitchell <mark@codesourcery.com>
14343 * cp-tree.h (instantiate_decl): Change prototype.
14344 * decl2.c (mark_used): Adjust call.
14345 * optimize.c (inlinable_function_p): Adjust handling of templates.
14346 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
14347 (do_type_instantiation): Likewise.
14348 (instantiate_decl): Defer more templates.
14349 (instantiate_pending_templates): Adjust logic to handle inline
14352 * Makefile.in (GGC_H): New variable. Use it throughout in place
14355 * call.c: Don't include obstack.h. Include ggc.h.
14356 (obstack_chunk_alloc): Don't define.
14357 (obstack_chunk_free): Likewise.
14358 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
14359 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
14360 (pop_switch): Free it.
14362 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
14364 * dump.c (dequeue_and_dump): Don't try to print the bit_position
14365 if we don't have a DECL_FIELD_OFFSET.
14367 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
14369 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
14370 special_function_p.
14372 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14374 * cfns.gperf (hash, libc_name_p): Prototype.
14376 * rtti.c (build_dynamic_cast_1): Constification.
14378 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
14380 * semantics.c (deferred_type_access_control): Prototype.
14382 2000-04-04 Mark Mitchell <mark@codesourcery.com>
14384 Correct many new ABI issues regarding vbase and vcall offset
14386 * cp-tree.h (BINFO_VTABLE): Document.
14387 (struct lang_type): Tweak formatting.
14388 (BINFO_PRIMARY_BINFO): Add to documentation.
14389 (CLASSTYPE_VSIZE): Fix typo in comment.
14390 (CLASSTYPE_VBASECLASSES): Update documentation.
14391 (BINFO_VBASE_MARKED): Remove.
14392 (SET_BINFO_VBASE_MARKED): Likewise.
14393 (CLEAR_BINFO_VBASE_MARKED): Likewise.
14394 (BINFO_FIELDS_MARKED): Remove.
14395 (SET_BINFO_FIELDS_MARKED): Likewise.
14396 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
14397 (enum access_kind): New enumeration.
14398 (num_extra_vtbl_entries): Remove declaration.
14399 (size_extra_vtbl_entries): Likewise.
14400 (get_vtbl_decl_for_binfo): New function.
14401 (dfs_vbase_unmark): Remove declaration.
14402 (mark_primary_bases): Likewise.
14403 * class.c (SAME_FN): Remove.
14404 (struct vcall_offset_data_s): Move definition.
14405 (build_vbase_pointer): Use `build', not `build_binary_op', to
14406 access the vbase pointer under the new ABI.
14407 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
14408 (build_primary_vtable): Likewise.
14409 (dfs_mark_primary_bases): Move here from search.c.
14410 (mark_primary_bases): Likewise.
14411 (determine_primary_bases): Under the new ABI, don't make a base
14412 class a primary base just because we don't yet have any virtual
14414 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
14415 (num_vfun_entries): Remove.
14416 (dfs_count_virtuals): Likewise.
14417 (num_extra_vtbl_entries): Likewise.
14418 (size_extra_vtbl_entries): Likewise.
14419 (layout_virtual_bases): Iterate in inheritance graph order under
14421 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
14422 indicate that a vfield is present.
14423 (init_class_processing): Initialize access_public_node, etc., from
14425 (get_vtbl_decl_for_binfo): New function.
14426 (dump_class_hierarchy_r): Likewise.
14427 (dump_class_hierarchy): Use it.
14428 (finish_vtbls): Build the vtbls in inheritance graph order.
14429 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
14430 (initialize_vtable): Use get_vtbl_decl_for_binfo.
14431 (accumulate_vtbl_inits): Add comments explaining why a pre-order
14433 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
14434 where the vptr points, even for primary vtables.
14435 (build_vtbl_initializer): Adjust handling of vbase and vcall
14437 (build_vcall_and_vbase_vtable_entries): New function.
14438 (dfs_build_vbase_offset_vtbl_entries): Remove.
14439 (build_vbase_offset_vtbl_entries): Reimplement.
14440 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
14441 were already handled in a primary base class vtable.
14442 (build_vcall_offset_vtbl_entries): Adjust.
14443 (build_rtti_vtbl_entries): Adjust.
14444 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
14445 * init.c (expand_virtual_init): Simplify.
14446 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
14447 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
14448 * search.c (BINFO_ACCESS): New macro.
14449 (SET_BINFO_ACCESS): Likewise.
14450 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
14451 (access_in_type): Likewise.
14452 (dfs_accessible_p): Likewise.
14453 (protected_accessible_p): Likewise.
14454 (lookup_fnfields_1): Adjust documentation.
14455 (dfs_mark_primary_bases): Move to class.c
14456 (mark_primary_bases): Likewise.
14457 (dfs_vbase_unmark): Remove.
14458 (virtual_context): Use BINFO_FOR_VBASE.
14459 (dfs_get_vbase_types): Simplify.
14460 (dfs_build_inheritance_graph_order): New function.
14461 (get_vbase_types): Use it.
14462 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
14464 * tinfo.cc (get_vbase_offset): New function.
14465 (__vmi_class_type_info::do_find_public_src): Use it.
14466 (__vmi_class_type_info::do_dyncast): Likewise.
14467 (__vmi_class_type_info::do_upcast): Likewise.
14469 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
14471 * lang-specs.h: Pass -fno-show-column to the preprocessor.
14473 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
14475 * rtti.c (class_hint_flags): Rename flags.
14476 (class_initializer): Remove flags.
14477 (synthesize_tinfo_var): Combine offset and flags. Add flags
14478 for __vmi_class_type_info.
14479 (create_tinfo_types): Remove flags from __class_type_info and
14480 __si_class_type_info. Merge flags and offset from
14481 base_class_type_info.
14482 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
14483 (__base_class_info::is_virtual_p): Adjust.
14484 (__base_class_info::is_public_p): Adjust.
14485 (__base_class_info::offset): New accessor.
14486 (__class_type_info::details): Remove member.
14487 (__class_type_info::__class_type_info): Lose details.
14488 (__class_type_info::detail_masks): Remove.
14489 (__si_class_type_info::__si_class_type_info): Lose details.
14490 (__vmi_class_type_info::details): New member.
14491 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
14492 (__vmi_class_type_info::detail_masks): New member.
14493 * tinfo.cc (__class_type_info::do_upcast): Initialize result
14494 with unknown_details_mask.
14495 (__vmi_class_type_info::do_find_public_src): Adjust
14496 (__vmi_class_type_info::do_dyncast): Adjust.
14497 (__vmi_class_type_info::do_upcast): Set result details, if
14499 (__dynamic_cast): Temporarily #if out optimization.
14501 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
14503 * rtti.c (get_tinfo_decl): Mark used.
14504 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
14505 mark as dealt with, if we output it.
14507 2000-03-28 Mark Mitchell <mark@codesourcery.com>
14509 * class.c: Reorganize to put virtual function table initialization
14510 machinery at the end of the file.
14512 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
14514 * class.c (finish_struct): Use bitsize_zero_node.
14515 * pt.c (instantiate_class_template): Likewise.
14517 2000-03-28 Mark Mitchell <mark@codesourcery.com>
14519 Put RTTI entries at negative offsets in new ABI.
14520 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
14521 vbase offset at index -3, not -1.
14522 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
14523 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
14524 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
14525 (build_rtti_vtbl_entries): New function.
14526 (set_rtti_entry): Remove.
14527 (build_primary_vtable): Don't use it.
14528 (build_secondary_vtable): Likewise.
14529 (start_vtable): Remove.
14530 (first_vfun_index): New function.
14531 (set_vindex): Likewise.
14532 (add_virtual_function): Don't call start_vtable. Do call
14534 (set_primary_base): Rename parameter.
14535 (determine_primary_base): Likewise.
14536 (num_vfun_entries): Don't use skip_rtti_stuff.
14537 (num_extra_vtbl_entries): Include RTTI information.
14538 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
14539 (skip_rtti_stuff): Remove.
14540 (dfs_modify_vtables): Don't use it.
14541 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
14542 (layout_nonempty_base_or_field): Update size handling.
14543 (create_vtable_ptr): Tweak.
14544 (layout_class_type): Adjust parameter names.
14545 (finish_struct_1): Simplify.
14546 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
14547 (skip_rtti_stuff): Remove.
14548 (first_vfun_index): New function.
14549 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
14550 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
14551 (marked_vtable_pathp): Declare.
14552 (unmarked_vtable_pathp): Likewise.
14553 * error.c (dump_expr): Use first_vfun_index to calculate vtable
14555 * rtti.c (build_headof): Look for RTTI at negative offsets.
14556 (get_tinfo_decl_dynamic): Likewise.
14557 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
14559 (create_pseudo_type_info): Do it here instead. Adjust so that
14560 vptr points at first virtual function.
14561 * search.c (marked_vtable_pathp): Make it global.
14562 (unmarked_vtable_pathp): Likewise.
14563 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
14564 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
14565 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
14566 (get_pure_virtuals): Likewise.
14567 (expand_upcast_fixups): Likewise.
14568 * tree.c (debug_binfo): Likewise.
14569 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
14572 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14574 * class.c (check_field_decl): Fix typo.
14575 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
14576 (check_methods): Likewise.
14577 (check_field_decls): Likewise.
14578 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
14579 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
14580 Use DECL_RESULT_FLD, not DECL_RESULT.
14581 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
14582 * lex.c (identifier_type): Likewise.
14583 * pt.c (determine_specialization, lookup_template_class): Likewise.
14584 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
14585 (resolve_overloaded_unification, more_specialized): Likewise.
14586 * semantics.c (finish_member_declaration): Likewise.
14587 * typeck.c (build_x_function_call): Likewise.
14589 2000-03-26 Mark Mitchell <mark@codesourcery.com>
14591 * class.c (layout_empty_base): Handle empty bases with non-byte
14593 (build_base_field): Likewise.
14594 (layout_virtual_bases): Likewise.
14596 * class.c (finish_struct_1): Fix typo in this change:
14598 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14600 2000-03-25 Mark Mitchell <mark@codesourcery.com>
14602 * decl.c (grokdeclarator): Count partial specializations when
14603 keeping track of how many template classes have been seen.
14605 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
14607 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14609 * class.c (build_vbase_pointer_fields): layout_field now place_field.
14610 (get_vfield_offset): Use byte_position.
14611 (set_rtti_entry): Set OFFSET to ssizetype zero.
14612 (get_binfo_offset_as_int): Deleted.
14613 (dfs_record_base_offsets): Use tree_low_cst.
14614 (dfs_search_base_offsets): Likewise.
14615 (layout_nonempty_base_or_field): Reflect changes in RLI format
14616 and call byte_position.
14617 (layout_empty_base): Convert offset to ssizetype.
14618 (build_base_field): use rli_size_unit_so_far.
14619 (dfs_propagate_binfo_offsets): Do computation in proper type.
14620 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
14621 (layout_class_type): Reflect changes in RLI names and fields.
14622 (finish_struct_1): Set DECL_FIELD_OFFSET.
14623 * dump.c (dequeue_and_dump): Call bit_position.
14624 * expr.c (cplus_expand_constant): Use byte_position.
14625 * rtti.c (expand_class_desc): Use bitsize_one_node.
14626 * typeck.c (build_component_addr): Use byte_position and don't
14627 special case for zero offset.
14629 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
14631 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
14633 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
14635 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
14638 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
14640 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
14642 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
14643 make_typename_type, check_initializer, cp_finish_decl,
14644 xref_tag): Likewise.
14645 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
14646 decl_namespace, arg_assoc_template_arg, arg_assoc,
14647 validate_nonmember_using_decl, do_class_using_decl): Likewise.
14648 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
14649 args_to_string): Likewise.
14650 * friend.c (is_friend): Likewise.
14651 * lex.c (note_got_semicolon, note_list_got_semicolon,
14652 is_global): Likewise.
14653 * method.c (build_overload_nested_name, build_overload_value,
14654 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
14655 * parse.y (typename_sub, typename_sub1): Likewise.
14656 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
14657 process_partial_specialization, convert_template_argument,
14658 template_args_equal, add_pending_template, lookup_template_class,
14659 for_each_template_parm_r, maybe_fold_nontype_arg,
14660 tsubst, instantiate_template, type_unification_real, unify,
14661 instantiate_pending_templates, set_mangled_name_for_template_decl):
14663 * repo.c (repo_get_id, repo_template_used): Likewise.
14664 * search.c (lookup_field_1): Likewise.
14665 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
14666 * xref.c (classname): Likewise.
14668 2000-03-22 Mark Mitchell <mark@codesourcery.com>
14670 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
14671 (CANONICAL_BINFO): New macro.
14672 (BINFO_NEW_VTABLE_MARKED): Use it.
14673 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
14674 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
14675 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
14677 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
14678 (build_secondary_vtable): Likewise.
14679 (dfs_finish_vtbls): Likewise.
14680 (dfs_accumulate_vtbl_inits): Likewise.
14681 (accumulate_vtbl_inits): New function.
14682 (finish_vtbls): Make sure that virtual bases come after
14683 non-virtual bases in the vtable group.
14684 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
14685 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
14686 * search.c (struct vbase_info): Move definition.
14687 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
14688 (unmarked_new_vtable_p): Likewise.
14689 (dfs_mark_vtable_path): Remove.
14690 (dfs_mark_new_vtable): Remove.
14691 (dfs_unmark_new_vtable): Likewise.
14692 (dfs_clear_search_slot): Likewise.
14693 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
14694 (dfs_clear_vbase_slots): Likewise.
14695 (init_vbase_pointers): LIkewise.
14697 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
14699 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
14700 SIZETYPE to a non-SIZETYPE.
14702 2000-03-21 Mark Mitchell <mark@codesourcery.com>
14704 * class.c (layout_virtual_bases): Adjust names in conditionally
14707 * class.c (record_base_offsets): New function.
14708 (layout_conflict_p): Likewise.
14709 (layout_nonempty_base_or_field): Use it.
14710 (layout_empty_base): New function.
14711 (build_base_field): Use it.
14712 (build_base_fields): Update comment.
14713 (layout_virtual_bases): Fold in a little code form
14714 layout_basetypes. Use layout_empty_base.
14715 (layout_basetypes): Remove.
14716 (end_of_class): New function.
14717 (layout_class_type): Use it. Adjust.
14719 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
14720 (fntype_p): Remove.
14721 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
14723 (dfs_skip_nonprimary_vbases_markedp): Likewise.
14724 * typeck.c (fntype_p): Remove.
14726 * cp-tree.h (TI_SPEC_INFO): Remove.
14727 (CLASSTYPE_TI_SPEC_INFO): Likewise.
14728 * pt.c (process_partial_specialization): Likewise.
14730 * class.c (build_base_field): Fix thinko in computation of binfo
14733 * tree.c (mark_local_for_remap_p): Mark variables declared in
14734 TARGET_EXPRs as well.
14736 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
14738 * typeck.c (require_complete_type, complete_type,
14739 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
14740 build_array_ref, convert_arguments, pointer_diff,
14741 build_x_unary_op, build_unary_op, build_c_cast,
14742 build_modify_expr): Use COMPLETE_TYPE_P etc.
14743 * call.c (is_complete, convert_like_real,
14744 build_new_method_call): Likewise.
14745 * class.c (build_vbase_pointer_fields, check_bases,
14746 build_base_field, finish_struct_1, pushclass): Likewise.
14747 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
14748 * decl.c (maybe_process_template_type_declaration, pushtag,
14749 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
14750 layout_var_decl, check_initializer, cp_finish_decl,
14751 grokdeclarator, require_complete_types_for_parms,
14752 grok_op_properties, xref_tag, xref_basetypes,
14753 check_function_type): Likewise.
14754 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
14755 * friend.c (do_friend): Likewise.
14756 * init.c (build_offset_ref): Likewise.
14757 * parse.y (structsp): Likewise.
14758 * pt.c (maybe_process_partial_specialization,
14759 tsubst_friend_function, instantiate_class_template, tsubst,
14760 do_type_instantiation, instantiate_pending_templates): Likewise.
14761 * repo.c (repo_get_id): Likewise.
14762 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
14763 synthesize_tinfo_var, emit_support_tinfos): Likewise.
14764 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
14765 * semantics.c (begin_class_definition): Likewise.
14766 * tree.c (build_cplus_method_type): Likewise.
14767 * typeck2.c (digest_init, build_functional_cast,
14768 add_exception_specifier): Likewise.
14769 * parse.h, parse.c: Regenerated.
14771 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
14773 * inc/cxxabi.h: New header file. Define new-abi entry points.
14774 (__pointer_type_info::target): Rename member to ...
14775 (__pointer_type_info::type): ... here.
14776 (__base_class_info::type): Rename member to ...
14777 (__base_class_info::base): ... here.
14778 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
14779 * cp-tree.h (CPTI_ABI): New global tree enumeration.
14780 (abi_node): New global tree node.
14781 * decl.c (abi_node): Document.
14782 (init_decl_processing): Initialize abi_node.
14783 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
14784 (get_vmi_pseudo_type_info): Likewise.
14785 (create_tinfo_types): Likewise.
14786 (emit_support_tinfos): Likewise.
14787 * tinfo.h (cxxabi.h): Include for new-abi.
14788 Move rtti class definitions to new header file.
14789 * tinfo.cc (abi): Use the namespace.
14790 (std): Move new abi rtti classes from here ...
14791 (__cxxabiv1): ... to here.
14792 * tinfo2.cc (cxxabi.h): Include for new-abi.
14793 Move rtti class definitions to new header file.
14794 (std): Move new abi rtti classes from here ...
14795 (__cxxabiv1): ... to here.
14796 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
14799 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
14800 Jason Merrill <jason@casey.cygnus.com>
14802 * method.c (build_overload_int): Use host_integerp.
14804 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
14806 * init.c (build_offset_ref): Handle the case of a templated member
14809 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14811 * except.c (expand_exception_blocks): Clear catch_clauses_last.
14813 2000-03-18 Mark Mitchell <mark@codesourcery.com>
14815 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
14816 * class.c (check_bitfield_decl): Turn illegal bitfields into
14818 (dfs_propagate_binfo_offsets): Adjust for new size_binop
14820 (dfs_offset_for_unshared_vbases): Likewise.
14821 * cvt.c (cp_convert_to_pointer): Convert NULL to a
14822 pointer-to-member correctly under the new ABI.
14823 * expr.c (cplus_expand_constant): Don't use cp_convert when
14824 turning an offset into a pointer-to-member.
14825 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
14826 when dereferencing them under the new ABI.
14827 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
14828 of pointers-to-members under the new ABI.
14830 * class.c (check_bitfield_decl): Remove restriction on really long
14832 (layout_class_type): Implement new ABI handling of bitfields
14833 longer than their types.
14835 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14837 * parse.y (extdefs): Call ggc_collect.
14838 * parse.c: Regenerated.
14840 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
14842 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
14843 (note_name_declared_in_class): Use OVL_CURRENT to get at a
14844 potential overload.
14846 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14848 * class.c (build_vbase_path): Use integer_zerop.
14849 (build_vtable_entry): Use tree_low_cst.
14850 (get_vfield_offset): Use bit_position.
14851 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
14853 (check_bitfield_decl): Set DECL_SIZE using convert.
14854 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
14855 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
14857 (finish_struct_1): Use bit_position.
14858 (dump_class_hierarchy): Use tree_low_cst.
14859 * cp-tree.h (min_precision): Add declaration.
14860 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
14861 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
14862 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
14863 * expr.c (cplus_expand_constant): Use bit_position.
14864 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
14865 * rtti.c (get_base_offset): Use bit_position.
14866 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
14867 host_integerp, and tree_low_cst.
14868 (pointer_int_sum): Use integer_zerop.
14869 (build_component_addr): Use bit_position.
14871 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
14873 * typeck.c (require_complete_type): Don't assume size_zero_node.
14874 (complete_type_or_else): Likewise.
14876 2000-03-16 Steven Grady <grady@digitaldeck.com>
14877 Jason Merrill <jason@casey.cygnus.com>
14879 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
14881 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
14883 * decl2.c (grokfield): Bail out if type is error_mark_node.
14885 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
14887 * tinfo2.cc (__ptr_to_member_data): Rename to ...
14888 (__pointer_to_member_data): ... here. Adjust.
14889 * rtti.c (create_tinfo_types): Adjust.
14891 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
14893 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
14894 * decl.c (ref_desc_type_node): Undocument.
14895 * rtti.c (ptr_ref_initializer): Rename to ...
14896 (ptr_initializer): ... here. Adjust comments.
14897 (ptmd_initializer): Fix comment thinko.
14898 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
14899 (create_tinfo_types): Remove ref_desc_type_node init.
14900 * tinfo2.cc (__reference_type_info): Remove.
14902 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
14904 * decl.c (cp_finish_decl): Remove obsolete comment.
14906 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
14908 2000-03-14 Mark Mitchell <mark@codesourcery.com>
14910 * cp-tree.h: Tweak documentation.
14911 * class.c (build_vbase_pointer_fields): Layout the fields, too.
14912 (avoid_overlap): Remove.
14913 (get_binfo_offset_as_int): New function.
14914 (dfs_serach_base_offsets): Likewise.
14915 (layout_nonempty_base_or_field): Likewise.
14916 (build_base_field): Layout fields here. Avoid placing two objects
14917 of the same type at the same address, under the new ABI.
14918 (build_base_fields): Adjust accordingly.
14919 (create_vtable_ptr): Return the new field, but don't attach it to
14921 (remove_base_field): Remove.
14922 (remove_base_fields): Remove.
14923 (layout_basetypes): Adjust accordingly.
14924 (layout_class_type): Call layout_field for each field, rather than
14925 just making a wholesale call to layout_type.
14927 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
14929 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
14931 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
14933 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
14935 * except.c (dtor_nothrow): New fn.
14936 (do_pop_exception): Use it. Take type parm.
14937 (push_eh_cleanup): Take type parm.
14938 (expand_start_catch_block): Pass it.
14939 (build_eh_type_type_ref): Accept null type.
14941 2000-03-12 Mark Mitchell <mark@codesourcery.com>
14943 * cp-tree.h (revert_static_member_fn): Change prototype.
14944 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
14945 (grok_op_properties): Likewise.
14946 (start_function): Likewise.
14947 (revert_static_member_fn): Simplify.
14948 * pt.c (check_explicit_specialization): Adjust call to
14949 revert_static_member_fn.
14951 2000-03-11 Mark Mitchell <mark@codesourcery.com>
14953 * cp-tree.h (scope_kind): New type.
14954 (tmpl_spec_kind): Likewise.
14955 (declare_pseudo_global_level): Remove.
14956 (pseudo_global_level_p): Rename to template_parm_scope_p.
14957 (pushlevel): Remove declaration.
14958 (begin_scope): New function.
14959 (finish_scope): Likewise.
14960 (current_tmpl_spec_kind): Likewise.
14961 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
14962 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
14963 Add template_spec_p.
14964 (toplevel_bindings_p): Adjust.
14965 (declare_pseudo_global_level): Remove.
14966 (pseudo_global_level_p): Rename to template_parm_scope_p.
14967 (current_tmpl_spec_kind): New function.
14968 (begin_scope): Likewise.
14969 (finish_scope): Likewise.
14970 (maybe_push_to_top_level): Adjust.
14971 (maybe_process_template_type_declaration): Likewise.
14972 (pushtag): Likewise.
14973 (pushdecl_nonclass_level): Likewise.
14974 (lookup_tag): Likewise.
14975 (grokfndecl): Handle member template specializations. Share
14976 constructor and non-constructor code.
14977 * decl2.c (check_classfn): Handle member template specializations.
14978 * pt.c (begin_template_parm_list): Use begin_scope.
14979 (begin_specialization): Likewise.
14980 (end_specialization): Likewise.
14981 (check_explicit_specialization): Use current_tmpl_spec_kind.
14982 Handle member template specializations.
14983 (end_template_decl): Use finish_scope. Remove call to
14985 (push_template_decl_real): Remove bogus error message.
14986 (tsubst_decl): Fix typo in code contained in comment.
14987 (instantiate_template): Handle member template specializations.
14988 (most_general_template): Likewise.
14990 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
14992 * lex.c (whitespace_cr): Compress consecutive calls to warning().
14993 (do_identifier): Ditto for error().
14995 * pt.c (convert_nontype_argument): Ditto for cp_error().
14996 (convert_template_argument): Ditto for cp_pedwarn().
14998 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
15000 * exception.cc (__check_null_eh_spec): New fn.
15001 * except.c (expand_end_eh_spec): Call it if the spec is throw().
15003 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
15005 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
15006 * except.c (expand_end_eh_spec): Add the return type.
15007 * rtti.c (throw_bad_cast): Add the parmtypes.
15008 (throw_bad_typeid): Likewise.
15010 * semantics.c (expand_stmt): Only leave out rtl for unused
15011 artificials, and set DECL_IGNORED_P on them as well.
15012 * decl.c (wrapup_globals_for_namespace): Likewise.
15014 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
15016 * decl.c (maybe_commonize_var): Skip all artificial decls.
15017 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
15019 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
15021 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
15022 * cp-tree.h: Declare flag_enforce_eh_specs.
15023 * decl.c (store_parm_decls, finish_function): Check it.
15025 C library functions don't throw.
15026 * Makefile.in (cfns.h): New target.
15027 (except.o): Depend on it.
15028 * Make-lang.in (cc1plus): Depend on cfns.gperf.
15029 * cfns.gperf: New file.
15030 * cfns.h: Generated.
15031 * except.c: Include it.
15032 (nothrow_libfn_p): New fn.
15033 * decl.c (grokfndecl): Use it.
15034 * cp-tree.h: Declare it.
15036 * decl.c (push_overloaded_decl_1, auto_function,
15037 define_function): Lose.
15038 (build_library_fn_1): New static fn.
15039 (builtin_function): Use it.
15040 (get_atexit_node): Use build_library_fn_ptr.
15041 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
15042 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
15043 push_void_library_fn, push_throw_library_fn): New fns.
15044 * cp-tree.h: Declare them.
15045 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
15046 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
15047 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
15048 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
15049 * rtti.c (build_runtime_decl): Lose.
15050 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
15051 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
15052 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
15054 * call.c (build_call): Remove result_type parm.
15055 Call mark_used on unused artificial fns.
15056 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
15058 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
15060 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
15062 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
15063 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
15064 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
15065 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
15066 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
15067 expand_generic_desc): Likewise.
15069 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
15071 * exception.cc (__cp_pop_exception): Cleanup the original object.
15073 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
15075 * decl.c (grok_op_properties): Merge conversion to void warning
15076 with other silly op warnings.
15078 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
15080 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
15081 array CONSTRUCTOR elements. Don't use expr_tree_cons.
15083 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
15085 * decl.c (cp_make_fname_decl): New function.
15086 (wrapup_globals_for_namespace): Don't emit unused static vars.
15087 (init_decl_processing): Remove comment about use of
15088 array_domain_type. Set make_fname_decl.
15089 (cp_finish_decl): Remove __FUNCTION__ nadgering.
15090 * semantics.c (begin_compound_stmt): Remove
15091 current_function_name_declared flagging.
15092 (expand_stmt): Don't emit unused local statics.
15093 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
15096 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
15098 * typeck.c (convert_for_assignment): Don't look at array
15100 * call.c (convert_like_real): Likewise.
15102 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
15104 Add initial support for '\uNNNN' specifier.
15105 * lex.c (read_ucs): New fn.
15106 (readescape, skip_white_space): Call it.
15107 (is_extended_char, is_extended_char_1): New fns.
15108 (utf8_extend_token): New fn, #if 0'd out.
15109 (real_yylex): Treat extended chars like letters.
15111 * search.c (note_debug_info_needed): Walk the bases even if we
15112 weren't deferring the type itself.
15114 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15116 * decl2.c (finish_objects): Constify a char*.
15118 * method.c (emit_thunk): Likewise.
15120 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
15122 * typeck.c (dubious_conversion_warnings): Look through
15125 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15127 * class.c (dfs_modify_vtables): I is now unsigned.
15128 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
15129 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
15130 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
15131 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
15132 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
15133 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
15134 Call integer_all_onesp.
15135 * typeck2.c (process_init_constructor): Use compare_tree_int.
15137 * lang-specs.h (as): Don't call if -syntax-only.
15139 2000-03-06 Mark Mitchell <mark@codesourcery.com>
15141 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
15142 RTL_EXPR_HAS_NO_SCOPE after all.
15144 2000-03-05 Mark Mitchell <mark@codesourcery.com>
15146 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
15147 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
15148 RTL_EXPR_HAS_NO_SCOPE.
15150 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
15153 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
15155 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
15157 * call.c (convert_like): Macrofy.
15158 (convert_like_with_context): New macro.
15159 (convert_like_real): Renamed from convert_like. Add calling
15160 context parameters, for diagnostics. Add recursive flag. Call
15161 dubious_conversion_warnings for outer conversion.
15162 (build_user_type_conversion): Use convert_like_with_context.
15163 (build_over_call): Likewise. Don't warn about dubious
15164 conversions here. Adjust convert_default_arg calls.
15165 (convert_default_arg): Add context parameters for diagnostics.
15166 Pass through to convert_like_with_context.
15167 * cp-tree.h (convert_default_arg): Add context parameters.
15168 (dubious_conversion_warnings): Prototype new function.
15169 * typeck.c (convert_arguments): Adjust convert_default_arg call.
15170 (dubious_conversion_warnings): New function, broken
15171 out of convert_for_assignment.
15172 (convert_for_assignment): Adjust.
15174 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
15176 * decl2.c (key_method): Break out from...
15177 (import_export_vtable, import_export_class): ...here.
15179 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
15180 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
15182 * search.c (note_debug_info_needed, dfs_debug_mark,
15183 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
15184 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
15186 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
15188 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
15191 2000-03-02 Mark Mitchell <mark@codesourcery.com>
15193 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
15194 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
15195 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
15196 (lang_type): Split gets_new into has_new and has_array_new.
15197 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15198 (TYPE_GETS_NEW): Split into ...
15199 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
15200 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
15201 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
15202 (build_op_new_call): Don't declare.
15203 (build_new_1): Likewise.
15204 * call.c (build_op_new_call): Remove.
15205 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
15206 instead of TYPE_NEEDS_DESTRUCTOR.
15207 (finish_struct_bits): Likewise.
15208 (add_implicitly_declared_members): Likewise.
15209 (check_field_decl): Likewise.
15210 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
15211 correctly under the new ABI.
15212 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
15213 instead of TYPE_NEEDS_DESTRUCTOR.
15214 (initialize_local_var): Likewise.
15215 (destroy_local_var): Likewise.
15216 (cp_finish_decl): Likewise.
15217 (register_dtor_fn): Likewise.
15218 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
15219 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
15220 TYPE_VEC_DELETE_TAKES_SIZE here.
15221 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
15222 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
15223 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15224 (finish_destructor_body): Likewise.
15225 (maybe_build_cleanup_1): Likewise.
15226 * decl2.c (do_static_destruction): Likewise.
15227 * init.c (build_new_1): Make it static.
15228 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15229 (expand_cleanup_for_base): Likewise.
15230 (get_cookie_size): New function.
15231 (build_new_1): Handle array-new cookies correctly under the new
15233 (build_vec_delete_1): Likewise.
15234 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15235 (build_delete): Likewise.
15236 (build_vec_delete): Handle array-new cookies correctly under the new
15238 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15239 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
15240 TYPE_HAS_ARRAY_NEW_OPERATOR.
15241 * ptree.c (print_lang_type): Check them.
15242 * search.c (context_for_name_lookup): Fix typo in comment.
15243 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15244 * tree.c (break_out_cleanups): Likewise.
15245 (build_cplus_array_test_1): Likewise.
15246 (cp_build_qualified_type_real): Likewise.
15247 * typeck.c (complete_type): Likewise.
15249 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
15250 the command-line, not the end.
15252 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
15254 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
15256 2000-03-02 Tom Tromey <tromey@cygnus.com>
15258 * cp-tree.h (build_java_class_ref): Declare.
15259 * init.c (build_java_class_ref): No longer static.
15260 * except.c (expand_throw): Generate a Java-style `throw' if the
15261 thrown object is a "Java" object.
15262 (initialize_handler_parm): Generate a Java-style lookup of
15263 exception info if the caught object is a "Java" object.
15264 (catch_language, catch_language_init): New globals.
15265 (decl_is_java_type): New function.
15266 (expand_start_catch_block): Don't call push_eh_info() or
15267 push_eh_cleanup() when handling a Java-style "catch". Pass Java
15268 class reference to build_catch_block.
15270 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15272 * typeck.c (comptypes): Treat sizetype like its language equivalent.
15274 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
15276 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
15277 to merge reference/pointer code and fix incorrect warnings.
15279 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
15281 * search.c (protected_accessible_p): Use context_for_name_lookup.
15283 * init.c (construct_virtual_bases): Fix thinko.
15284 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
15286 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
15288 * decl.c (current_function_decl): Move to toplev.c.
15290 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
15292 * pt.c (fn_type_unification): Unify return type, whenever
15294 (get_bindings_real): Only pass return type when necessary.
15295 Remove explicit return type check.
15296 * class.c (resolve_address_of_overloaded_function): Pass desired
15297 return type to fn_type_unification.
15299 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15301 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
15303 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
15305 * rtti.c (expand_class_desc): Likewise.
15306 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
15307 (THUNK_VCALL_OFFSET): Likewise.
15308 (THUNK_DELTA): Reflect changes in ../tree.h.
15310 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
15312 * search.c (protected_accessible_p): Also allow the access if
15313 the member is public in DERIVED. Lose TYPE parm.
15314 (friend_accessible_p): Lose TYPE parm.
15315 (accessible_p): Adjust.
15317 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15319 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
15320 on things that are not sizes; ssize_binop deleted.
15321 Call size_diffop when appropriate.
15322 (dfs_build_vcall_offset_vtbl_entries): Likewise.
15323 (build_primary_vtable, build_secondary_vtable): Likewise.
15324 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
15325 Variable I is HOST_WIDE_INT.
15326 (get_vfield_offset): Pass proper types to size_binop.
15327 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
15328 (finish_struct_1): Likewise.
15329 (skip_rtti_stuff): Arg N is now pointer to signed.
15330 (layout_class_type): Use size_zero_node.
15331 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
15332 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
15333 * decl.c (complete_arry_type): Pass proper types to size_binop.
15334 (xref_basetypes): BINFO_OFFSET is sizetype.
15335 * error.c (dump_expr): Don't use size_binop non-sizes.
15336 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
15337 * init.c (construct_virtual_bases): Fix type error.
15338 (build_vec_delete_1): Pass proper type to size_binop and don't
15340 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
15341 * rtti.c (get_base_offset): Pass proper type to size_binop.
15342 * search.c (dfs_find_vbases): Fix type error.
15343 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
15344 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
15345 * tree.c (debug_binfo): Variable N is signed.
15346 Use HOST_WIDE_INT_PRINT_DEC.
15347 * typeck.c (comptypes): sizetype is same as equivalent integer type.
15348 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
15349 size_one_node and size_zero_node.
15350 (c_alignof): Use size_one_node.
15351 (build_component_addr): Pass proper types to size_binop.
15352 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
15354 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
15356 Implement class scope using-declarations for functions.
15357 * class.c (handle_using_decl): Call add_method for used functions.
15358 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
15359 (add_method): Used functions are hidden by local functions.
15360 (check_bases_and_members): Handle using-decls before finalizing
15361 CLASSTYPE_METHOD_VEC.
15362 * call.c (add_function_candidate): Add ctype parm; if nonzero,
15363 override the type of 'this' accordingly.
15364 (add_template_candidate, add_template_candidate_real): Add ctype parm.
15365 (convert_class_to_reference, build_user_type_conversion_1,
15366 build_new_function_call, build_object_call, build_new_op,
15367 build_new_method_call): Pass ctype parm.
15369 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
15371 * call.c (convert_class_to_reference, build_user_type_conversion_1,
15372 build_new_function_call, build_object_call, build_new_op,
15373 build_new_method_call, build_op_delete_call): Don't get basetype_path
15375 * typeck.c (build_component_ref): Likewise.
15376 * init.c (build_offset_ref): Likewise.
15377 (resolve_offset_ref): Don't call enforce_access.
15378 Call build_scoped_ref.
15379 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
15380 would cause an error or if -pedantic.
15381 * class.c (alter_access): Lose binfo parm.
15383 2000-02-26 Mark Mitchell <mark@codesourcery.com>
15385 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
15388 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
15390 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
15391 pseudo_type_info creation into the std namespace
15393 2000-02-26 Mark Mitchell <mark@codesourcery.com>
15395 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
15396 (import_export_class): Remove declaration.
15397 * decl2.c (import_export_class): Make it static.
15398 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
15399 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
15400 EXPR_WITH_FILE_LOCATION.
15401 * lex.c (check_newline): Tweak filename/lineno setting.
15402 * semantics.c (begin_while_stmt): Fix typo in comment.
15404 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15406 * lang-options.h (-fmessage-length=): Add missing option.
15408 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
15410 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
15412 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
15414 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
15416 * optimize.c (expand_call_inline): Emit the return label before
15417 evaluating the return value.
15419 2000-02-24 Mark Mitchell <mark@codesourcery.com>
15421 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
15422 than duplicating functionality here.
15423 * optimize.c: Include input.h.
15424 (expand_call_inline): Use push_srcloc and pop_srcloc.
15425 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
15426 * parse.c: Regenerated.
15427 * Makefile.in (lex.o): Depend on input.h.
15428 (optimize.o): Likewise.
15430 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
15432 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
15433 function type, rather than ICE.
15435 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
15437 * decl.c (grokdeclarator): Call decl_type_access_control.
15438 * parse.y (parse_end_decl): Don't call decl_type_access_control if
15441 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
15443 * decl.c (decls_match): Remove obsolete static member nadgering.
15445 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
15447 * decl.c (grokdeclarator): Change ANSI to ISO.
15448 * lex.c (consume_string, readescape, do_identifier): Likewise.
15449 (parse_float, real_yylex): Likewise.
15450 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
15451 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
15452 new_type_id, maybe_label_decls, simple_stmt,
15453 for.init.statement): Likewise.
15454 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
15455 * semantics.c (finish_named_return_value): Likewise.
15456 * parse.c: Regenerate.
15458 2000-02-21 Mark Mitchell <mark@codesourcery.com>
15460 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
15461 (CPTI_CLASS_STAR_TYPE): Remove.
15462 (vtable_index_type): Likewise.
15463 (class_star_type_node): Remove.
15464 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
15465 (build_binary_op_nodefault): Remove.
15466 * call.c (build_new_op): Use build_binary_op instead of
15467 build_binary_op_nodefault.
15468 * decl.c (init_decl_processing): Remove class_star_type_node
15469 initialization. Make delta_type_node ptrdiff_type_node under the
15470 new ABI. Initialize vtable_index_type.
15471 (build_ptrmemfunc_type): Build different structures for the new
15473 (build_enumerator): Use build_binary_op instead of
15474 build_binary_op_nodefault.
15475 * method.c (build_overload_value): Mangle pointers-to-members
15476 appropriately under the new ABI.
15477 * typeck.c (build_array_ref): Use build_binary_op instead of
15478 build_binary_op_nodefault.
15479 (get_member_function_from_ptrfunc): Adjust for the new ABI.
15480 (build_binary_op_nodefault): Rename to ...
15481 (build_binary_op): ... this. Remove old version. Adjust for
15482 pointer-to-member comparisons under the new ABI.
15483 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
15484 (build_ptrmemfunc): Adjust for the new ABI.
15485 (expand_ptrmemfunc_cst): Likewise.
15486 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
15487 (pfn_from_ptrmemfunc): Adjust for the new ABI.
15489 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
15491 * call.c (build_object_call): Compress consecutive calls to
15493 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
15494 (build_op_delete_call): Adjust message formatting.
15496 * class.c (check_bases): Compress consecutive calls to
15498 (finish_struct_anon): Say 'ISO C++'.
15500 * decl.c (start_decl): Same here.
15501 (grok_reference_init): Likewise.
15502 (grokfndecl): Correct message formatting.
15503 (grokfndecl): Improve diagnostic.
15504 (check_static_variable_definition): Likewise. Say 'ISO C++'
15505 (compute_array_index_type): Say 'ISO C++'
15506 (create_array_type_for_decl): Compress consecutive calls to
15508 (grokdeclarator): Say 'ISO C++'
15509 (grok_op_properties): Likewise.
15511 * decl2.c (delete_sanity): Clairify diagnostic.
15512 (check_member_template): Same here.
15513 (grok_function_init): Use consistent terminology.
15515 * expr.c (do_case): Say 'ISO C++'
15517 * friend.c (do_friend): Compress consecutive calls to warning.
15519 2000-02-20 Mark Mitchell <mark@codesourcery.com>
15521 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
15522 * class.c (build_secondary_vtable): Reorganize. Don't create a
15523 new vtable under the new ABI.
15524 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
15525 computing the size.
15526 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
15527 the initializing elements.
15528 (initialize_vtable): New function.
15529 (dfs_finish_vtbls): Use it.
15530 (dfs_accumulate_vtbl_inits): New function.
15531 (finish_vtbls): Merge primary and secondary vtables under the new
15533 (finish_struct_1): Remove redundant call to layout_vtable_decl.
15534 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
15537 * class.c (build_vtable): New function, split out from ...
15538 (get_vtable_decl): ... here, and ...
15539 (build_secondary_vtable): ... here.
15541 * pt.c (tsubst_decl): Fix formatting.
15543 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15545 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
15546 (avoid_overlap, build_base_field): Likewise.
15547 (build_base_field, build_base_fields, is_empty_class):
15548 Test DECL_SIZE with integer_zero.
15549 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
15550 * cp-tree.h (struct lang_type): New field size_unit.
15551 (CLASSTYPE_SIZE_UNIT): New macro.
15552 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
15553 (cp_finish_decl): Delete -Wlarger-than processing.
15554 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
15555 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
15556 * tree.c (make_binfo): binfo vector is one entry longer.
15557 (walk_tree): Walk DECL_SIZE_UNIT.
15559 2000-02-19 Mark Mitchell <mark@codesourcery.com>
15561 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
15563 (build_vtable_entry): Don't assume all vtable entries are
15565 (build_vtbl_initializer): Adjust accordingly.
15566 (get_vtable_decl): Fix formatting.
15568 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
15570 * semantics.c (deferred_type_access_control): Walk the entire
15572 (save_type_access_control): Rename from
15573 initial_deferred_type_access_control. Just remember the value.
15574 (decl_type_access_control): New fn.
15575 (begin_function_definition): Use deferred_type_access_control, after
15576 we've started the function. Set type_lookups to error_mark_node.
15577 * parse.y (frob_specs, fn.def1): Adjust.
15578 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
15579 (parse_end_decl, parse_bitfield0, parse_method): New fns.
15580 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
15581 (after_type_component_declarator0): Likewise.
15582 (after_type_component_declarator): Likewise.
15583 (notype_component_declarator): Likewise.
15584 * cp-tree.h: Adjust.
15586 * decl.c (redeclaration_error_message): Allow redeclaration of
15587 namespace-scope decls.
15589 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
15591 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
15593 2000-02-17 Mark Mitchell <mark@codesourcery.com>
15595 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
15596 * decl2.c (grokclassfn): Likewise.
15598 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
15600 * decl2.c (lang_decode_option): Don't set default message length
15602 * lex.c (lang_init_options): Set it here.
15604 2000-02-16 Mark Mitchell <mark@codesourcery.com>
15606 Make DECL_CONTEXT mean the class in which a member function was
15607 declared, even for a virtual function.
15608 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
15609 (DECL_FRIEND_CONTEXT): New macro.
15610 (DECL_REAL_CONTEXT): Remove.
15611 (SET_DECL_FRIEND_CONTEXT): Likewise.
15612 (DECL_VIRTUAL_CONTEXT): Adjust.
15613 (DECL_CLASS_SCOPE_P): Use TYPE_P.
15614 (add_friends): Remove.
15615 (hack_decl_function_context): Likewise.
15616 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
15618 (build_over_call): Fix indentation. Use DECL_CONTEXT
15619 instead of DECL_CLASS_CONTEXT.
15620 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
15621 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
15622 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15623 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
15624 (build_base_field): Likewise.
15625 (finish_struct_1): Likewise.
15626 (build_self_reference): Likewise.
15627 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
15629 (pushtag): Use decl_function_context, not
15630 hack_decl_function_context.
15631 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
15632 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
15633 (pushdecl): Remove bogus code.
15634 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
15635 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
15636 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15637 Use decl_function_context, nothack_decl_function_context.
15638 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
15639 (grokdeclarator): Likewise. Use decl_function_context, not
15640 hack_decl_function_context.
15641 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
15642 (start_function): Use DECL_FRIEND_CONTEXT, not
15643 DECL_CLASS_CONTEXT. Use decl_function_context, not
15644 hack_decl_function_context.
15645 (finish_function): Use decl_function_context, not
15646 hack_decl_function_context.
15647 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
15648 DECL_CLASS_CONTEXT.
15649 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
15650 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
15651 (grokfield): Likewise.
15652 (finish_builtin_type): Likewise.
15653 (finish_vtable_vardec): Use decl_function_context, not
15654 hack_decl_function_context.
15655 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15656 (start_static_initialization_or_destruction): Likewise.
15657 (finish_static_initialization_or_destruction): Likewise.
15658 (mark_used): Adjust logic for deciding when to synthesize methods.
15659 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
15661 * error.c (dump_function_decl): Use DECL_CONTEXT, not
15662 DECL_CLASS_CONTEXT.
15663 * friend.c (is_friend): Likewise.
15664 (add_friends): Remove.
15665 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
15666 * lex.c (begin_definition_of_inclass_inline): Use
15667 decl_function_context, not hack_decl_function_context.
15668 (process_next_inline): Likewise.
15669 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
15670 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
15671 DECL_CLASSS_CONTEXT.
15672 (hack_identifier): Likewise.
15673 (synthesize_method): Use decl_function_context, not
15674 hack_decl_function_context.
15675 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
15677 (is_member_template): Use decl_function_context, not
15678 hack_decl_function_context. Use DECL_CONTEXT, not
15679 DECL_CLASS_CONTEXT.
15680 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
15681 DECL_CLASS_CONTEXT.
15682 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
15684 (push_template_decl_real): Likewise.
15685 (instantiate_class_template): Don't call add_friends.
15686 (tsubst_default_argument): Use DECL_CONTEXT, not
15688 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
15689 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15690 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
15691 DECL_CLASS_CONTEXT.
15692 * repo.c (repo_inline_used): Likewise.
15693 * search.c (current_scope): Adjust for new _CONTEXT macros.
15694 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
15696 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15697 (lookup_fnfields_here):Likewise.
15698 (check_final_overrider): Likewise.
15699 (init_vbase_pointers): Likewise.
15700 (virtual_context): Likewise.
15701 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
15702 (expand_body): Use decl_function_context, not
15703 hack_decl_function_context.
15704 * tree.c (hack_decl_function_context): Remove.
15705 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
15706 DECL_CLASS_CONTEXT.
15707 * typeck2.c (error_not_base_type): Likewise.
15709 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
15711 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
15713 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15715 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
15717 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
15719 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
15721 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
15723 * decl2.c (lang_decode_option): Enable automatic line wrapping.
15725 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
15727 * parse.y (frob_specs): Split out...
15728 (parse_decl): From here.
15729 (fn.def2): Call initial_deferred_type_access_control.
15730 (after_type_component_declarator0): Call frob_specs.
15731 (notype_component_declarator0): Likewise.
15732 * search.c (friend_accessible_p): Nested classes are friends of their
15735 2000-02-10 Mark Mitchell <mark@codesourcery.com>
15737 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
15738 used to create an implicit temporary.
15740 * class.c (dfs_modify_vtables): Tweak calculation of functions to
15743 2000-02-08 Nathan Sidwell <nathan@acm.org>
15745 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
15746 strip array element qualifiers too.
15748 2000-02-07 Mark Mitchell <mark@codesourcery.com>
15750 * decl.c (store_parm_decls): Don't build cleanups for parameters
15751 while processing_template_decl.
15753 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
15755 * cp-tree.h (struct saved_scope): Add incomplete field.
15756 (namespace_scope_incomplete): New macro.
15757 * decl.c (pushdecl): Use it.
15758 (hack_incomplete_structures): Use it. See through artificial
15760 (mark_saved_scope): Mark it.
15762 Implement access control for nested types.
15763 * search.c (type_access_control): New fn.
15764 (accessible_p): Now we do perform access control for types.
15765 * semantics.c (deferred_type_access_control): New fn.
15766 (initial_deferred_type_access_control): New fn.
15767 (begin_function_definition): Call it. Add lookups parm.
15768 * decl.c (struct binding_level): Add this_class field.
15769 (pushlevel_class): Set it.
15770 (mark_binding_level): Mark it.
15771 (lookup_name_real): Use it. Call type_access_control.
15772 (mark_saved_scope): Mark lookups field.
15773 * cp-tree.h (flagged_type_tree): Add lookups field.
15774 (struct saved_scope): Add lookups field.
15775 (type_lookups): New macro.
15776 * parse.y (declmods): Now <ftype>.
15777 (parse_decl): Add lookups parm. Call
15778 initial_deferred_type_access_control.
15779 (lang_extdef): Clear type_lookups.
15780 (typed_declspecs, declmods, typespec): Set lookups field.
15781 (initdcl): Call deferred_type_access_control.
15782 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
15783 component_decl_1, named_parm): Adjust.
15784 * friend.c (is_friend): Nested classes are friends of their
15787 * class.c (currently_open_derived_class): New fn.
15788 * method.c (hack_identifier): Use it.
15790 * lex.c (do_identifier): Remove obsolete code.
15792 * parse.y (typed_typespecs): Propagate new_type_flag properly.
15794 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
15796 * tinfo.h: Remove apostrophes from C++ comment (xgettext
15797 thinks this file is plain C).
15799 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15801 * Makefile.in (call.o): Depend on $(EXPR_H).
15803 * call.c: Include "expr.h".
15805 * class.c (dump_class_hierarchy): Add prototype.
15807 * search.c (dfs_get_pure_virtuals): Likewise.
15809 2000-02-1 Ulrich Drepper <drepper@redhat.com>
15811 * parse.y (simple_stmt): Allow :: token in asm parameter list.
15812 * parse.c: Rebuilt.
15814 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
15816 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
15817 Store it in DECL_FCONTEXT.
15818 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
15820 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
15822 * tinfo.h (old abi): #include "tconfig.h".
15823 * tinfo.cc (convert_to_base): Move into old abi section.
15825 2000-01-31 Mark Mitchell <mark@codesourcery.com>
15827 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
15828 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
15829 (BINFO_PRIMARY_BINFO): New macro.
15830 (BF_DELTA): Rename to ...
15831 (BV_DELTA): ... this.
15832 (BF_VCALL_INDEX): Rename to ...
15833 (BV_VCALL_INDEX): ... this.
15834 (BF_FN): Rename to ...
15836 * class.c (build_vbase_path): Adjust for changes to reverse_path.
15837 (set_rtti_entry): Rename BF_ macros to BV_ variants.
15838 (modify_vtable_entry): Simplify.
15839 (add_virtual_function): Rename BF_ macros to BV_ variants.
15840 (build_vtable_initializer): Likewise.
15841 (get_class_offset_1): Remove.
15842 (dfs_get_class_offset): Likewise.
15843 (get_class_offset): Likewise.
15844 (dfs_find_final_overrider): New function.
15845 (find_final_overrider): Likewise.
15846 (modify_one_vtable): Remove.
15847 (dfs_find_base): New function.
15848 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
15849 find_final_overrider.
15850 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
15852 (dfs_fixup_vtable_deltas): Remove.
15853 (override_one_vtable): Remove.
15854 (merge_overrides): Likewise.
15855 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
15856 unreal chilren of virtual bases.
15857 (finish_struct_1): Don't use merge_overrides. Don't use
15858 dfs_fixup_vtable_deltas.
15859 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
15862 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
15863 Jason Merrill <jason@yorick.cygnus.com>
15865 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
15867 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
15869 * exception.cc (__throw_bad_typeid): Add missing std::.
15871 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15873 * cp-tree.h (make_thunk): PROTO -> PARAMS.
15875 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
15877 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
15879 Runtime support for new-abi rtti.
15880 * inc/typeinfo (type_info::operator!=): Define in class.
15881 (type_info::before, type_info::name, type_info::operator==,
15882 type_info::operator!=): Define new ABI implementations.
15883 (type_info::is_pointer_p, type_info::is_function_p): Declare
15884 new virtual functions.
15885 (type_info::do_catch, type_info::do_upcast): Likewise.
15887 * tinfo.h (__base_class_info): Define new class.
15888 (__class_type_info): Likewise.
15889 (__si_class_type_info): Likewise.
15890 (__vmi_class_type_info): Likewise.
15891 (__dynamic_cast): Prototype.
15893 * tinfo.cc: Conditionalize old and new rtti mechanisms.
15894 (type_info::is_pointer_p): Define new function.
15895 (type_info::is_function_p): Likewise.
15896 (type_info::do_catch): Likewise.
15897 (type_info::do_upcast): Likewise.
15898 (vtable_prefix): New structure for vtable access.
15899 (adjust_pointer): Define new template function.
15900 (contained_p, public_p, virtual_p, contained_public_p,
15901 contained_nonpublic_p, contained_nonvirtual_p): Define new
15903 (nonvirtual_base_type): New local variable.
15904 (__class_type_info::~__class_type_info): Define.
15905 (__si_class_type_info::~__si_class_type_info): Likewise.
15906 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
15907 (__class_type_info::do_catch): Define new function.
15908 (__class_type_info::do_upcast): Likewise.
15909 (__class_type_info::find_public_src): Likewise.
15910 (__class_type_info::do_find_public_src): Likewise.
15911 (__si_class_type_info::do_find_public_src): Likewise.
15912 (__vmi_class_type_info::do_find_public_src): Likewise.
15913 (__class_type_info::do_dyncast): Likewise.
15914 (__si_class_type_info::do_dyncast): Likewise.
15915 (__vmi_class_type_info::do_dyncast): Likewise.
15916 (__class_type_info::do_upcast): Likewise.
15917 (__si_class_type_info::do_upcast): Likewise.
15918 (__vmi_class_type_info::do_upcast): Likewise.
15919 (__dynamic_cast): Likewise.
15921 * tinfo2.cc (__fundamental_type_info): Define new class.
15922 (__pointer_type_info): Likewise.
15923 (__reference_type_info): Likewise.
15924 (__array_type_info): Likewise.
15925 (__function_type_info): Likewise.
15926 (__enum_type_info): Likewise.
15927 (__ptr_to_member_type_info): Likewise.
15928 (__fundamental_type_info::~__fundamental_type_info): Define.
15929 (__pointer_type_info::~__pointer_type_info): Likewise.
15930 (__reference_type_info::~__reference_type_info): Likewise.
15931 (__array_type_info::~__array_type_info): Likewise.
15932 (__function_type_info::~__function_type_info): Likewise.
15933 (__enum_type_info::~__enum_type_info): Likewise.
15934 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
15935 (__pointer_type_info::do_catch): Define new function.
15936 (__ptr_to_member_type_info::do_catch): Define new function.
15938 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
15939 (__is_pointer): Likewise.
15941 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
15943 2000-01-30 Mark Mitchell <mark@codesourcery.com>
15945 * cp/class.c (build_vtable): Rename to build_primary_vtable.
15946 (prepare_fresh_vtable): Rename to build_secondary_vtable.
15947 (make_new_vtable): New function.
15948 (modify_vtable_entry): Handle generation of new vtables correctly.
15949 (modify_one_vtable): Remove unused parameter.
15950 (dfs_fixup_vtable_deltas): Likewise.
15951 (override_one_vtable): Use build_secondary_vtable.
15952 (finish_struct_1): Use build_primary_vtable and
15953 build_secondary_vtable.
15955 2000-01-28 Ulrich Drepper <drepper@redhat.com>
15957 * cp/decl.c: Adjust variable names, comments, help strings.
15959 2000-01-29 Nathan Sidwell <nathan@acm.org>
15961 * new2.cc (operator delete[]): Use operator delete, don't assume
15964 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
15966 * class.c (build_vtbl_initializer): Add argument to
15967 build_vtable_entry call.
15969 2000-01-27 Mark Mitchell <mark@codesourcery.com>
15971 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
15972 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
15973 (BF_DELTA): New macro.
15974 (BF_VCALL_INDEX): Likewise.
15976 (THUNK_VCALL_OFFSET): Likewise.
15977 (make_thunk): Change prototype.
15978 * class.c (build_vtable_entry): Integrate
15979 build_vtable_entry_for_fn. Handle vcall indices.
15980 (build_vtable_entry_for_fn): Remove.
15981 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
15982 BF_VCALL_INDEX, BF_FN.
15983 (modify_vtable_entry): Integrate common code from
15984 modify_one_vtable and dfs_fixup_vtable_deltas.
15985 (add_virtual_function): Set BF_VCALL_INDEX.
15986 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
15988 (modify_one_vtable): Simplify.
15989 (dfs_fixup_vtable_deltas): Likewise.
15990 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
15991 * method.c (make_thunk): Handle vcall indices.
15993 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
15995 Compiler side new abi rtti (not enabled).
15996 * cp-tree.h (new_abi_rtti_p): New macro.
15997 (emit_support_tinfos): Prototype new function.
15998 (tinfo_decl_p): Likewise.
15999 (emit_tinfo_decl): Likwise.
16000 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
16002 (doing_runtime): New local static.
16003 (init_rtti_processing): Add new-abi initializer.
16004 (get_tinfo_decl): Add new-abi logic.
16005 (tinfo_from_decl): Likewise.
16006 (build_dynamic_cast_1): Likewise.
16007 (qualifier_flags): New static function.
16008 (tinfo_base_init): Likewise.
16009 (generic_initializer): Likewise.
16010 (ptr_ref_initializer): Likewise.
16011 (ptmd_initializer): Likewise.
16012 (class_hint_flags): Likewise.
16013 (class_initializer): Likewise.
16014 (synthesize_tinfo_var): Likewise.
16015 (create_real_tinfo_var): Likewise.
16016 (create_pseudo_type_info): Likewise.
16017 (get_vmi_pseudo_type_info): Likewise.
16018 (create_tinfo_types): Likewise.
16019 (emit_support_tinfos): New global function.
16020 (tinfo_decl_p): New global predicate.
16021 (emit_tinfo_decl): New global function.
16022 * class.c (set_rtti_entry): Generalize for old and new rtti.
16023 (build_vtbl_initializer): Likewise.
16024 * decl2.c (finish_file): Likewise.
16026 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
16028 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
16029 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
16031 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
16033 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
16036 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
16038 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
16040 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
16042 * optimize.c (calls_setjmp_r): Supply new argument
16043 to special_function_p.
16045 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16047 * call.c: PROTO -> PARAMS.
16048 * class.c: Likewise.
16049 * cp-tree.h: Likewise.
16051 * decl.c: Likewise.
16052 * decl.h: Likewise.
16053 * decl2.c: Likewise.
16054 * dump.c: Likewise.
16055 * errfn.c: Likewise.
16056 * error.c: Likewise.
16057 * except.c: Likewise.
16058 * expr.c: Likewise.
16059 * init.c: Likewise.
16060 * input.c: Likewise.
16063 * method.c: Likewise.
16064 * optimize.c: Likewise.
16065 * parse.y: Likewise.
16067 * repo.c: Likewise.
16068 * rtti.c: Likewise.
16069 * search.c: Likewise.
16070 * semantics.c: Likewise.
16071 * spew.c: Likewise.
16072 * tree.c: Likewise.
16073 * typeck.c: Likewise.
16074 * typeck2.c: Likewise.
16075 * xref.c: Likewise.
16077 2000-01-25 Richard Henderson <rth@cygnus.com>
16079 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
16081 2000-01-25 Mark Mitchell <mark@codesourcery.com>
16083 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
16084 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
16085 (struct vcall_offset_data_s): New type.
16086 (dfs_vcall_offset_queue_p): New function.
16087 (dfs_build_vcall_offset_vtbl_entries): Likewise.
16088 (build_vcall_offset_vtbl_entries): Likewise.
16089 (layout_vtable_decl): Likewise.
16090 (num_vfun_entries): Likewise.
16091 (num_extra_vtbl_entries): Add the entries for vcall offsets.
16092 (build_vtbl_initializer): Likewise.
16093 (dfs_finish_vtabls): Use layout_vtable_decl.
16094 (modify_one_vtables): Always duplicate vtables under the new ABI.
16095 (finish_struct_1): Use layout_vtable_decl.
16097 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16099 * decl.c (member_function_or_else): Change third arg from a format
16100 specifier to an `enum overload_flags'. Callers changed.
16102 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
16104 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
16105 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
16106 build_const_cast, get_delta_difference, check_return_expr): Avoid
16107 ANSI string concatenation usage.
16109 2000-01-24 Mark Mitchell <mark@codesourcery.com>
16111 * class.c (layout_class_type): Put the fields required to make a
16112 class non-empty at the end, not the beginning, of the TYPE_FIELDs
16115 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
16117 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
16120 * decl2.c (mark_used): Do instantiate inlines that have been
16121 explicitly instantiated.
16123 2000-01-24 Richard Henderson <rth@cygnus.com>
16125 * call.c (build_over_call): Use expand_tree_builtin.
16126 * typeck.c (build_function_call_real): Likewise.
16127 (build_binary_op_nodefault): Handle unordered compares.
16129 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
16131 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
16132 cp_tree_index values.
16133 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
16134 New global node #defines for them.
16135 * rtti.c (call_void_fn): Replace with ...
16136 (build_runtime_decl): ... new static function.
16137 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
16138 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
16139 (build_dynamic_cast_1): Always produce correctly typed result.
16140 Explicitly produce type_info addresses. Use dynamic_cast_node.
16141 * exception.cc (__throw_bad_cast): Return `void *'.
16142 (__throw_bad_typeid): Return `const type_info &'.
16144 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
16146 * cp-tree.h (get_vtable_decl): Prototype new function.
16147 * class.c (get_vtable_decl): New function. Broken out from ...
16148 (build_vtable): ... here. Use it.
16149 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
16150 by get_vtable_decl.
16152 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
16154 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
16155 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
16156 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
16157 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
16158 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
16159 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
16160 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
16161 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
16162 (CPTI_TINFO_VAR_ID): New enumeration.
16163 (__tp_desc_type_node, __access_mode_type_node,
16164 __bltn_desc_type_node, __user_desc_type_node,
16165 __class_desc_type_node, __ptr_desc_type_node,
16166 __attr_desc_type_node, __func_desc_type_node,
16167 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
16168 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
16169 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
16170 enum_desc_type_node, class_desc_type_node,
16171 si_class_desc_type_node, vmi_class_desc_type_node,
16172 ptmd_desc_type_node, base_desc_type_node): New #defines.
16173 (tinfo_fn_id, tinfo_fn_type): Rename to ...
16174 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
16175 (tinfo_var_id): New enumeration.
16176 (DECL_TINFO_FN_P): Augment comment.
16177 * decl.c (cp_global_trees): Adjust documentation.
16178 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
16179 tinfo_decl_type and tinfo_var_id.
16180 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
16181 (build_typeid): Remove unused variable.
16182 (get_tinfo_var): Use tinfo_var_id.
16183 (tinfo_name): New static function.
16184 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
16185 (tinfo_from_decl): Likewise.
16186 (get_base_offset): New static function, broken out of
16188 (expand_si_desc): Use tinfo_name.
16189 (expand_class_desc): Likewise. Lose local static variable.
16190 Use base_desc_type_node. Use get_base_offset.
16191 (expand_ptr_desc): Use tinfo_name.
16192 (expand_attr_desc): Likewise.
16193 (expand_generic_desc): Likewise.
16195 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
16196 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
16198 2000-01-23 Mark Mitchell <mark@codesourcery.com>
16200 * cp-tree.h (__eprintf): Remove declaration.
16201 * tree.c (__eprintf): Remove definition.
16203 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
16204 Mark Mitchell <mark@codesourcery.com>
16206 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
16207 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
16209 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
16211 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
16213 2000-01-23 Mark Mitchell <mark@codesourcery.com>
16215 * cp-tree.h (register_dtor_fn): New function.
16216 * decl.c (destroy_local_static): Rename to ...
16217 (register_dtor_fn): ... this. Give it external linkage.
16218 (expand_static_init): Use it.
16219 * decl2.c (do_static_initialization): Likewise, if using
16221 (do_static_destruction): Check that __cxa_atexit is not in use.
16222 (finish_file): Don't call do_static_destruction if using
16225 * typeck.c (convert_arguments): Restore two-message error
16228 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
16230 Remap dynamic cast hint values to be consistent across ABIs.
16231 * search.c (dynamic_cast_base_recurse): Remap generated value.
16232 (get_dynamic_cast_base_type): Adjust documentation.
16233 * tinfo.h (__user_type_info::dyncast): Likewise.
16234 (__user_type_info::find_public_subobj): Remap BOFF meaning.
16235 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
16236 (__class_type_info::do_dyncast): Likewise.
16237 (__class_type_info::do_find_public_subobj): Likewise.
16238 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
16240 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
16242 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
16244 * typeck2.c (incomplete_type_error): Restore previous
16245 cp_error and cp_error_at call sequence.
16247 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
16249 * class.c (dump_class_hierarchy): Make format agree with argument;
16250 cast pointer to unsigned long and print with %lx.
16252 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
16254 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
16256 * typeck.c (composite_pointer_type, common_type,
16257 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
16258 build_function_call_real, convert_arguments,
16259 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
16260 build_unary_op, mark_addressable, build_compound_expr,
16261 build_static_cast, build_reinterpret_cast, build_const_cast,
16262 build_c_cast, build_modify_expr, get_delta_difference,
16263 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
16264 'ISO C++'. Fusion consecutive calls to diagnostic message routines
16266 * typeck2.c (readonly_error, abstract_virtuals_error,
16267 process_init_constructor, check_for_new_type): Likewise.
16269 2000-01-19 Mark Mitchell <mark@codesourcery.com>
16271 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
16274 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
16276 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
16277 (build_x_typeid): Likewise.
16278 (get_tinfo_fn): Likewise.
16279 (get_tinfo_fn_unused): Rename to ...
16280 (get_tinfo_decl): ... here.
16281 * rtti.c (build_headof): Replace logic error with assertion.
16282 (get_tinfo_fn_dynamic): Rename to ...
16283 (get_tinfo_decl_dynamic): ... here. Make static. Use
16284 complete_type_or_else.
16285 (build_x_typeid): Move into ...
16286 (build_typeid): ... here. Adjust call to
16287 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
16288 throw_bad_typeid expression.
16289 (get_tinfo_fn_unused): Rename to ...
16290 (get_tinfo_decl): ... here. Adjust comment.
16291 (get_tinfo_fn): Delete.
16292 (tinfo_from_decl): New static function.
16293 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
16294 (get_typeid): Use complete_type_or_else.
16295 (build_dynamic_cast_1): Adjust calls to
16296 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
16297 * parse.y (primary): Adjust call to build_typeid.
16298 * except.c (build_eh_type_type_ref): Adjust call to
16299 get_tinfo_decl. Mark as used.
16300 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
16301 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
16302 * parse.c: Regenerated.
16304 2000-01-17 Mark Mitchell <mark@codesourcery.com>
16306 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
16307 calling convention.
16308 (resolves_to_fixed_type_p): Document calling convention.
16309 * rtti.c (build_x_typeid): Initialize NONNULL.
16311 * cp-tree.h (build_shared_int_cst): New function.
16312 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
16313 * class.c (modify_vtable_entry): Likewise.
16314 (add_virtual_function): Split out code to generated shared
16315 INTEGER_CSTs to build_share_int_cst.
16316 (modify_all_vtables): Handle all the overridden functions here.
16317 Add overridden functions from non-primary virtual bases to the
16319 (finish_struct_1): Adjust call to modify_all_vtables. Add
16320 overridden functions from non-primary bases to the vtable.
16321 * tree.c (build_shared_int_cst): New function.
16323 * cp-tree.h (scratchalloc): Remove.
16324 (build_scratch_list): Likewise.
16325 * call.c (convert_class_to_reference): Replace build_scratch_list
16326 and build_expr_list with build_tree_list.
16327 (add_candidate): Replace scratchalloc with expralloc. Note memory
16329 (build_user_type_conversion_1): Replace build_scratch_list
16330 and build_expr_list with build_tree_list.
16331 (build_new_op): Likewise.
16332 (build_op_delete_call): Likewise.
16333 (convert_like): Likewise.
16334 * cvt.c (ocp_convert): Likewise.
16335 * decl.c (start_decl): Likewise.
16336 (start_function): Likewise.
16337 (finish_destructor_body): Likewise.
16338 (maybe_build_cleanup_1): Likewise.
16339 * decl2.c (reparse_decl_as_expr): Likewise.
16340 * init.c (perform_member_init): Likewise.
16341 (expand_cleanup_for_base): Likewise.
16342 (build_builtin_delete_call): Likewise.
16343 (build_new_1): Likewise.
16344 (build_delete): Likewise.
16345 * method.c (do_build_assign_ref): Likewise.
16346 * parse.y (already_scoped_stmt): Likewise.
16347 (nontrivial_exprlist): Likewise.
16348 (net_initializer): Likewise.
16349 (initlist): Likewise.
16350 * parse.c: Regenerated.
16351 * rtti.c (build_x_typeid): Likewise.
16352 (build_dynamic_cast_1): Likewise.
16353 * typeck.c (build_x_compound_expr): Likewise.
16354 (build_static_cast): Likewise.
16355 (build_modify_expr): Likewise.
16357 * cp-tree.h (DECL_VINDEX): Add documentation.
16358 * class.c (build_vtable_entry): Likewise.
16359 (start_vtable): Add comment.
16360 (add_virtual_function): Replace pending_hard_virtuals with
16361 overridden_virtuals and pending_virtuals with new_virtuals.
16362 Replace redundant assignments with assertions.
16363 (check_for_override): Add comment.
16364 (check_bases_and_members): Replace pending_hard_virtuals with
16365 overridden_virtuals and pending_virtuals with new_virtuals.
16366 (create_vtbl_ptr): Likewise.
16367 (layout_class_type): Likewise.
16368 (finish_struct_1): Likewise. Add comments.
16370 2000-01-16 Mark Mitchell <mark@codesourcery.com>
16372 * class.c (finish_struct_1): Replace redundant code with
16375 * cp-tree.h (flag_new_abi): Move.
16376 (flag_use_cxa_atexit): Likewise.
16377 (flag_honor_std): Likewise.
16378 (flag_rtti): Likewise.
16379 (vbase_offsets_in_vtable_p): Define.
16380 (vptrs_present_everywhere_p): Likewise.
16381 (TYPE_CONTAINS_VPTR_P): Likewise.
16382 (dfs_walk_real): Declare.
16383 * class.c (build_vbase_pointer_fields): Check
16384 vbase_offsets_in_vtable_p.
16385 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
16387 (build_vbase_offset_vtbl_entries): Simplify.
16388 (build_vbase_offset_vtbl_entries): Adjust.
16389 (build_vbase_pointer): Add ability to look up vbase offsets in
16391 (start_vtable): New function.
16392 (add_virtual_function): Use it.
16393 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
16394 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
16395 (build_vtbl_initializer): Take the type of the complete object as
16396 input. Use it to correctly calculate vbase offsets.
16397 (dfs_finish_vtbls): Pass the complete type to
16398 build_vtbl_initializer.
16399 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
16400 (create_vtable_ptr): Create a vtable even if there are no
16401 new virtual functions, under the new ABI.
16402 (finish_struct_1): Likewise.
16403 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
16404 * decl.c (exapnd_static_init): Remove call to
16405 preserve_initializer.
16406 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
16408 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
16409 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
16410 (construct_virtual_bases): Don't initialize virtual base pointers
16412 (build_aggr_init): Clean up comment.
16413 (expand_aggr_init_1): Likewise.
16414 * rtti.c (expand_class_desc): Store the virtual function table
16415 index where the vbase offset lives in the offset field.
16416 * search.c (dfs_walk_real): Make it global.
16417 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
16418 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
16420 * tinfo.h (USItype): Make it signed under the new ABI.
16421 * tinfo.cc (convert_to_base): New function. Encapsulate base
16422 conversion logic here.
16423 (__class_type_info::do_upcast): Use it.
16424 (__class_type_info::do_dyncast): Likewise.
16425 (__class_type_info::do_find_public_subobj): Likewise.
16427 * init.c (construct_virtual_bases): Don't look up the addresses of
16428 virtual bases at run-time.
16430 * class.c (build_vbase_pointer): Relocate.
16431 (build_vbase_pointer_fields): Likewise.
16432 (dfs_build_vbase_offset_vtbl_entries): Likewise.
16433 (build_vbase_offset_vtbl_entries): Likewise.
16435 * decl.c (init_decl_processing): Complain if -fnew-abi
16436 -fno-vtable-thunks is used.
16438 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
16441 2000-01-15 Mark Mitchell <mark@codesourcery.com>
16443 * cp-tree.h (num_extra_vtbl_entries): New function.
16444 (size_extra_vtbl_entries): Likewise.
16445 (dfs_vtable_path_unmark): Likewise.
16446 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
16447 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
16448 * class.c (num_extra_vtbl_entries): New function.
16449 (size_extra_vtbl_entries): Likewise.
16450 (dfs_build_vbase_offset_vtbl_entries): New function.
16451 (build_vbase_offset_vtbl_entries): Likewise.
16452 (build_vtbl_initializer): Use it.
16453 (finish_struct_1): Adjust vtable sizes (using
16454 num_extra_vtbl_entries).
16455 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
16456 THUNK_DECL is non-NULL before expanding it.
16457 * init.c (expand_virtual_init): Adjust the vtable pointer by
16458 size_extra_vtbl_entries before storing it.
16459 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
16460 Handle TREE_LIST parameters here, not in the dfs_* functions.
16461 (dfs_unmarked_real_bases_queue_p): Adjust.
16462 (dfs_marked_real_bases_queue_p): Likewise.
16463 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
16464 (dfs_vtable_path_marked_real_bases_queue_p): New function.
16465 (dfs_vtable_path_unmark): Likewise.
16467 2000-01-14 Mark Mitchell <mark@codesourcery.com>
16469 * optimize.c (copy_body_r): Clear the operand three of a
16470 TARGET_EXPR when copying it.
16472 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
16474 * method.c (build_decl_overload_real): Check whether we are in ::
16475 before returning __builtin_new/delete.
16477 2000-01-13 Mark Mitchell <mark@codesourcery.com>
16479 * pt.c (tsubst_friend_function): Improve comment.
16480 (instantiate_decl): Avoid crashing when a "nested" function is
16481 instantiated from the top level.
16483 * dump.c (dqeueue_and_dump): Dump
16484 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
16486 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16488 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
16490 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
16492 * g++spec.c (lang_specific_driver): Add -fnew-abi if
16493 ENABLE_NEW_GXX_ABI defined.
16494 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
16495 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
16496 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
16498 2000-01-12 Mark Mitchell <mark@codesourcery.com>
16500 * decl.c (start_cleanup_fn): Call pushdecl.
16502 * call.c (convert_class_to_reference): Fix typos.
16503 (build_conditional_expr): Handle errors gracefully.
16504 * class.c (push_nested_class): Likewise.
16505 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
16506 (DECL_THIS_EXTERN): Use it.
16507 (DECL_THIS_STATIC): Likewise.
16508 * cvt.c (convert_to_void): Handle errors gracefully.
16509 (build_expr_type_conversion): Likewise.
16510 * decl.c (maybe_push_decl): Likewise.
16511 (start_decl_1): Likewise.
16512 (require_complete_types_for_parms): Likewise.
16513 * parse.y (structsp): Likewise.
16514 (base_class): Likewise.
16515 * parse.c: Regenerated.
16516 * pt.c (finish_member_template_decl): Likewise.
16517 * typeck.c (decay_conversion): Likewise.
16519 * cp-tree.h (dfs_skip_vbases): New function.
16520 (find_vbase_instance): Likewise.
16521 * class.c (determine_primary_base): Allow a nearly empty base to
16522 serve as a primary base class under the new ABI.
16523 (get_class_offset_1): Rename to ...
16524 (dfs_get_class_offset): ... this. Simplify. Don't issue error
16526 (get_class_offset): Use it. Issue error messages here.
16527 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
16528 find the right copies of virtual bases.
16529 (fixup_vtable_deltas1): Rename to ...
16530 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
16531 bases as primary bases.
16532 (fixup_vtable_deltas): Remove.
16533 (override_one_vtable): Handle virtual bases as primary bases.
16534 (merge_overrides): Likewise.
16535 (finish_struct_1): Likewise.
16536 (dump_class_hierarchy): Dump primary-ness of bases as well.
16537 * search.c (mark_primary_bases): Use a pre-order traversal to
16538 handle primary virtual bases.
16539 (dfs_skip_vbases): New fiunction.
16540 (expand_upcast_fixups): Adjust to handle primary virtual bases.
16541 (fixup_virtual_upcast_offsets): Likewise.
16542 (fixup_all_virtual_upcast_offsets): Likewise.
16543 (dfs_find_vbase_instances): New function.
16544 (find_vbase_instance): Likewise.
16546 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
16548 * lex.c (DIR_SEPARATOR): Delete macro.
16550 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
16552 * decl2.c (lang_decode_option): Handle automatic line wrapping
16555 2000-01-11 Mark Mitchell <mark@codesourcery.com>
16557 * friend.c (do_friend): Don't resolve scopes when processing
16558 template declarations, even if the qualifying scope doesn't
16559 involve template parameters.
16561 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
16563 * class.c (dfs_modify_vtables_queue_p): Remove.
16564 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
16565 and dfs_marked_real_bases_queue_p instead of
16566 dfs_modify_vtables_queue_p.
16568 * class.c (build_vbase_path): Simplify.
16569 (dfs_propagate_binfo_offsets): New function.
16570 (propagate_binfo_offsets): Use it.
16571 (remove_base_field): Simplify.
16572 (dfs_set_offset_for_vbases): Remove.
16573 (dfs_set_offset_for_shared_vbases): New function.
16574 (dfs_set_offset_for_unshared_vbases): Likewise.
16575 (layout_virtual_bases): Use them.
16576 (layout_basetypes): Don't call propagate_binfo_offsets.
16577 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
16580 * class.c (build_base_field): New function, split out from ...
16581 (build_base_fields): ... here. Use it. Allocate primary bases
16582 first, under the new ABI.
16583 (get_vtable_entry): Remove.
16584 (remove_base_field): New function, split out from ...
16585 (remove_base_fields): ... here. Adjust since primary bases come
16586 first under the new ABI.
16588 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
16589 (initialize_vtbl_ptrs): New function.
16590 (expand_indirect_vtbls_init): Change prototype.
16591 (convert_pointer_to_vbase): Declare.
16592 * init.c (expand_direct_vtbls_init): Remove.
16593 (dfs_initialize_vtbl_ptrs): New function.
16594 (initialize_vtbl_ptrs): Likewise.
16595 (emit_base_init): Use initialize_vtbl_ptrs.
16596 * search.c (convert_pointer_to_vbase): Make it global.
16597 (expand_indirect_vtbls_init): Remove vtable initialization code.
16598 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
16600 * class.c (dfs_finish_vtbls): New function.
16601 (finish_vtbls): Use it.
16602 (dump_class_hierarchy): New function.
16604 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
16605 (BINFO_VBASE_PRIMARY_P): New macro.
16606 (BINFO_VIRTUALS): Add to documentation.
16607 (SET_BINFO_PRIMARY_MARKED_P): Remove.
16608 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
16609 (dfs_mark_primary_bases_queue_p): Likewise.
16610 (dfs_unmarked_real_bases_queue_p): New function.
16611 (dfs_marked_real_bases_queue_p): Likewise.
16612 * search.c (dfs_mark_primary_bases): Adjust.
16613 (mark_primary_bases): Likewise.
16614 (get_shared_vbase_if_not_primary): New function.
16615 (dfs_unmarked_real_bases_queue_p): Likewise.
16616 (dfs_marked_real_bases_queue_p): Likewise.
16617 (dfs_get_pure_virtuals): Simplify.
16618 (get_pure_virtuals): Likewise.
16620 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16622 * lex.c: Include tm_p.h.
16624 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
16626 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
16628 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
16630 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
16631 * pt.c (instantiate_decl): Defer comdat templates that might not be
16634 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
16635 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
16636 (finish_file): Likewise.
16638 * decl2.c (import_export_class): Undo 12/14 change.
16640 * error.c (dump_decl): operator new, not operatornew.
16642 * class.c (field_decl_cmp): A nontype is "greater" than a type.
16643 * search.c (lookup_field_1): Look for the last field with the
16646 2000-01-05 Nathan Sidwell <nathan@acm.org>
16648 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
16651 2000-01-05 Nathan Sidwell <nathan@acm.org>
16653 * typeck.c (build_static_cast): Don't strip target qualifiers
16654 when casting from a class.
16656 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16658 * class.c (warn_hidden): Initialize variable `fndecl'.
16660 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
16662 * decl.c (flag_isoc9x): New variable to be able to use code in
16663 c-common.c. For now always zero.
16665 2000-01-03 Mark Mitchell <mark@codesourcery.com>
16667 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
16668 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
16669 or unshare_base_binfos for virtual bases here.
16670 * search.c (dfs_get_vbase_types): Do it here.
16671 (get_vbase_types): Adjust.
16673 2000-01-02 Mark Mitchell <mark@codesourcery.com>
16675 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
16676 (BINFO_PRIMARY_MARKED_P): Use flag 5.
16677 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
16678 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
16679 (unmark_primary_bases): Remove declaration.
16680 (unmarkedp): Declare.
16681 (dfs_vbase_unmark): Likewise.
16682 * class.c (determine_primary_base): Return immediately if there
16683 are no base classes. Call mark_primary_bases here.
16684 (modify_all_direct_vtables): Remove.
16685 (modify_all_indirect_vtables): Remove.
16686 (dfs_modify_vtables_queue_p): New function.
16687 (dfs_modify_vtables): New function.
16688 (modify_all_vtables): Use them.
16689 (build_base_fields): Build FIELD_DECLs for primary virtual base
16691 (create_vtable_ptr): Don't call determine_primary_base here.
16692 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
16693 (dfs_set_offset_for_vbases): ... this.
16694 (layout_virtual_bases): Use it.
16695 (layout_class_type): Call determine_primary_base here.
16696 * search.c (unmarkedp): Make it global.
16697 (shared_marked_p): Simplify.
16698 (shared_unmarked_p): Likewise.
16699 (dfs_primary_bases_queue_p): Remove.
16700 (dfs_unmark_primary_bases): Likewise.
16701 (unmark_primary_bases): Likewise.
16702 (mark_primary_bases): Simplify.
16703 (get_pure_virtuals): Don't call mark_primary_bases here.
16704 (dfs_vbase_unmark): New function.
16705 (get_vbase_types): Simplify.
16707 * class.c (struct base_info): Remove.
16708 (determine_primary_base): Take has_virtual_p rather than a
16709 base_info as input. Don't calculate max_has_virtual.
16710 (finish_struct_bits): Remove max_has_virtual argument.
16711 (create_vtable_ptr): Remove max_has_virtual_p argument.
16712 (layout_virtual_bases): Remove max argument.
16713 (layout_basetypes): Likewise.
16714 (layout_class_type): Remove max_has_virtual_p argument.
16715 (finish_struct_1): Remove max_has_virtual.
16717 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
16718 (layout_basetypes): Remove.
16719 * class.c (propagate_binfo_offsets): Moved here from tree.c.
16720 Update to handle primary virtual bases.
16721 (remove_base_fields): New function, split out from
16723 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
16724 (layout_virtual_bases): New function, split out from
16725 layout_basetypes. Update to handle primary virtual bases.
16726 (layout_basetypes): Moved here from tree.c. Use
16727 remove_base_fields and layout_virtual_bases.
16728 * search.c (dfs_mark_primary_bases_queue_p): New function.
16729 (mark_primary_bases): Use it.
16730 * tree.c (CEIL): Remove.
16731 (propagate_binfo_offsets): Remove.
16732 (layout_basetypes): Remove.
16734 2000-01-01 Mark Mitchell <mark@codesourcery.com>
16736 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
16737 (BINFO_PRIMARY_MARKED_P): New macro.
16738 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
16739 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
16740 (mark_primary_bases): New function.
16741 (unmark_primary_bases): Likewise.
16742 * search.c (get_abstract_virtuals_1): Remove.
16743 (dfs_mark_primary_bases): New function.
16744 (mark_primary_bases): Likewise.
16745 (dfs_unmark_primary_bases): Likewise.
16746 (unmark_primary_bases): Likewise.
16747 (dfs_get_pure_virtuals): Likewise.
16749 2000-01-01 Mark Mitchell <mark@codesourcery.com>
16751 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
16752 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
16753 (modify_one_vtable): Adjust.
16754 (fixup_vtable_deltas1): Likewise.
16755 (override_one_vtable): Likewise.
16756 * search.c (get_abstract_virtuals_1): Likewise.
16757 (get_pure_virtuals): Likewise.
16758 (expand_upcast_fixups): Likewise.
16759 * tree.c (debug_binfo): Likewise.
16761 * class.c (build_vtable): Don't return a value. Don't rebuild
16762 vtables for bases that have already been handled.
16763 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
16764 already been handled.
16765 (modify_one_vtable): Adjust accordingly.
16766 (fixup_vtable_deltas1): Likewise.
16767 (finish_struct_1): Likewise.
16769 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
16771 * call.c (build_new_method_call): Also check destructors.