1 2003-12-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
5 looking into them recursively.
7 2003-12-02 Richard Henderson <rth@redhat.com>
9 * name-lookup.h (struct cp_binding_level): Use ENUM_BITFIELD.
10 * parser.c (struct cp_token): Likewise.
11 (struct cp_parser_token_tree_map_node): Likewise.
12 * lex.c (struct resword): Move const after ENUM_BITFIELD.
14 2003-11-30 Mark Mitchell <mark@codesourcery.com>
17 * parser.c (cp_lexer_prev_token): New function.
18 (cp_parser_skip_to_closing_parenthesis): Add consume_paren
20 (cp_parser_nested_name_specifier_opt): Add is_declaration
22 (cp_parser_nested_name_specifier): Likewise.
23 (cp_parser_class_or_namespace_name): Likewise.
24 (cp_parser_class_name): Likewise.
25 (cp_parser_template_id): Likewise.
26 (cp_parser_template_name): Likewise.
27 (cp_parser_id_expression): Adjust calls to
28 cp_parser_nested_name_specifier_op, cp_parser_template_id,
30 (cp_parser_unqualified_id): Likewise.
31 (cp_parser_postfix_expression): Likewise.
32 (cp_parser_pseudo_destructor_name): Likewise.
33 (cp_parser_cast_expression): Likewise.
34 (cp_parser_mem_initializer_id): Likewise.
35 (cp_parser_simple_type_specifier): Likewise.
36 (cp_parser_type_name): Likewise.
37 (cp_parser_elaborated_type_specifier): Likewise.
38 (cp_parser_qualified_namespace_specifier): Likewise.
39 (cp_parser_using_declaration): Likewise.
40 (cp_parser_using_directive): Likewise.
41 (cp_parser_ptr_operator): Likewise.
42 (cp_parser_declarator_id): Likewise.
43 (cp_parser_class_head): Likewise.
44 (cp_parser_base_specifier): Likewise.
45 (cp_parser_constructor_declarator_p): Likewise.
46 (cp_parser_direct_declarator): Fix typo in comment.
47 (cp_parser_parenthesized_expression_list): Adjust call to
48 cp_parser_skip_to_closing_parenthesis.
49 (cp_parser_selection_statement): Likewise.
51 2003-11-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
54 * typeck.c (finish_class_member_access_expr): Handle TEMPLATE_ID_EXPR
55 with OVERLOAD and DECL nodes as the first operand.
57 2003-11-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
59 * pt.c (tsubst) <ARRAY_REF>: Remove erroneous argument to build_nt.
61 2003-11-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
64 * friend.c (is_friend): Handle member function of a class
65 template as template friend.
66 (do_friend): Likewise.
67 * decl2.c (check_classfn): Add template_header_p parameter.
68 * decl.c (start_decl): Adjust check_classfn call.
69 (grokfndecl): Likewise.
70 * pt.c (is_specialization_of_friend): New function.
71 (uses_template_parms_level): Likewise.
72 (push_template_decl_real): Use uses_template_parms_level.
73 (tsubst_friend_function): Adjust check_classfn call.
74 * cp-tree.h (check_classfn): Adjust declaration.
75 (uses_template_parms_level): Add declaration.
76 (is_specialization_of_friend): Likewise.
78 2003-11-21 Mark Mitchell <mark@codesourcery.com>
81 * pt.c (build_non_dependent_expr): Handle GNU extension to ?:
84 2003-11-21 Jan Hubicka <jh@suse.cz>
86 * parser.c (cp_parser_postfix_expression): Initialize 's' to
89 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
91 * Make-lang.in (c++.extraclean): Delete.
93 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
95 * Make-lang.in (check-g++, lang_checks): Add.
97 2003-11-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
100 * class.c (currently_open_derived_class): Check if
101 current_class_type is NULL_TREE.
102 * semantics.c (finish_call_expr): Check if
103 currently_open_derived_class returns NULL_TREE.
104 * cp-tree.h (DERIVED_FROM_P): Add parenthesis around PARENT
107 2003-11-17 Jason Merrill <jason@redhat.com>
109 * init.c (build_new_1): Preevaluate placement args.
110 * call.c (build_op_delete_call): Don't expose placement args to
113 2003-11-16 Jason Merrill <jason@redhat.com>
115 * Make-lang.in (c++.tags): Create TAGS.sub files in each directory
116 and TAGS files that include them for each front end.
118 2003-11-15 Bernardo Innocenti <bernie@develer.com>
121 * name-lookup.c: Revert previous patch for PR c++/2294 to prevent
122 build failure on libjava.
124 2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
127 * name-lookup.c (push_overloaded_decl): Always construct an OVERLOAD
128 unless the declaration is a built-in.
129 (set_namespace_binding): While binding OVERLOADs with only one
130 declaration, we still need to call supplement_binding.
132 2003-11-14 Mark Mitchell <mark@codesourcery.com>
135 * parser.c (cp_parser_enclosed_template_argument_list): New
137 (cp_parser_template_id): Use it.
138 (cp_parser_simple_type_specifier): Recognize invalid template
141 2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
144 * pt.c (unify): Add support for PTRMEM_CST and
145 FIELD_DECL unification.
147 2003-11-13 Richard Earnshaw <rearnsha@arm.com>
149 * decl.c (grokfndecl): Change OK to type tree.
151 2003-11-12 Mark Mitchell <mark@codesourcery.com>
153 * tree.c (build_target_expr_with_type): Treate VA_ARG_EXPR like
156 * decl.c (cp_make_fname_decl): When creating a top-level
157 __FUNCTION__-like symbol, do register it with pushdecl.
159 * decl.c (finish_case_label): Do not check that we are within a
160 switch statement here.
161 * parser.c (struct cp_parser): Add in_iteration_statement_p and
162 in_switch_statement_p.
163 (cp_parser_new): Initialize them.
164 (cp_parser_labeled_statement): Check validity of case labels
166 (cp_parser_selection_statement): Set in_switch_statement_p.
167 (cp_parser_iteration_statement): Set in_iteration_statement_p.
168 (cp_parser_jump_statement): Check validity of break/continue
172 * cp-tree.h (duplicate_decls): Return a tree.
173 * decl.c (duplicate_decls): Clarify documentation. Return
174 error_mark_node to indicate a failed redeclaration.
175 * friend.c (do_friend): Handle that case.
176 * name-lookup.c (pushdecl): Likewise.
178 2003-11-11 Jason Merrill <jason@redhat.com>
180 * cp-tree.h (DECL_NAMESPACE_ASSOCIATIONS): New macro.
181 * name-lookup.c (parse_using_directive): New fn.
182 (is_associated_namespace): New fn.
183 (arg_assoc_namespace): Also check associated namespaces.
184 * name-lookup.h: Declare new fns.
185 * pt.c (maybe_process_partial_specialization): Allow
186 specialization in associated namespace.
187 * parser.c (cp_parser_using_directive): Accept attributes. Use
188 parse_using_directive.
190 2003-11-10 Richard Henderson <rth@redhat.com>
192 * cvt.c (convert_to_void): Use void_zero_node after overload failure.
194 2003-11-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
197 * name-lookup.c (supplement_binding): Gracefully handle names
198 used at non-class scope prior declaration.
200 2003-11-06 Matt Austern <austern@apple.com>
202 * decl.c (duplicate_decls): copy DECL_VISIBILITY field.
203 * method.c (use_thunk): give thunk same visibility as function.
204 * optimize.c (maybe_clone_body): copy DECL_VISIBILITY field.
206 2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
209 * pt.c (instantiate_pending_templates): Save and restore
212 2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
215 * friend.c (add_friend): Don't display previous declaration in
216 case of duplicate friend warning.
218 2003-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
221 * call.c (build_over_call): Check access using primary template
222 if FN is a member function template.
224 2003-11-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
227 * class.c (handle_using_decl): Set input_location before calling
230 2003-10-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
233 * semantics.c (finish_non_static_data_member): Handle when
234 both processing_template_decl and qualifying_scope are true.
236 2003-10-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
239 * class.c (handle_using_decl): Swap arguments of error_not_base_type.
240 * parser.c (cp_parser_direct_declarator): Only resolve typename for
241 namespace scope declarations.
243 2003-10-24 Nathan Sidwell <nathan@codesourcery.com>
245 PR c++/12698, c++/12699, c++/12700, c++/12566
246 * cp-tree.h (THUNK_ALIAS_P, THUNK_ALIAS): New.
247 (debug_class, debug_thunks): New.
248 * class.c (dump_class_hierarchy_1): New break out from ...
249 (dump_class_hierarchy): ... here.
250 (dump_thunk, debug_thunks, debug_class): New.
251 (update_vtable_entry_for_fn): Add ssizetype casts. Correct
252 continued search for primary binfo via virtual.
253 (build_vtbl_initializer): Follow covariant thunk alias.
254 * method.c (make_thunk): Clear DECL_THUNKS of the thunk.
255 (finish_thunk): Look for an alias of the covariant thunk and point
257 (use_thunk): We should never use an alias.
258 * semantics.c (emit_associated_thunks): Do not emit aliases.
261 * cp-tree.h (cp_fname_init): Add TYPE pointer param.
262 * decl.c (cp_fname_init): Add TYPE pointer param. Set it. Don't
263 create an ad-hoc ERROR_MARK.
264 (cp_make_fname_decl): Adjust.
265 * pt.c (tsubst_expr): Adjust.
267 2003-10-23 Jason Merrill <jason@redhat.com>
270 * tree.c (build_target_expr_with_type): Don't call force_rvalue
273 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
275 * call.c: Fix comment formatting.
277 * cxx-pretty-print.c: Likewise.
279 * parser.c: Likewise.
281 * semantics.c: Likewise.
283 * typeck.c: Likewise.
284 * typeck2.c: Likewise.
286 2003-10-21 Mark Mitchell <mark@codesourcery.com>
289 * typeck.c (build_x_conditional_expr): Handle missing middle
290 operands in templates.
291 * mangle.c (write_expression): Issue errors about attempts to
292 mangle a non-existant middle operator to the ?: operator.
294 2003-10-21 Robert Bowdidge <bowdidge@apple.com>
295 * decl.c (cp_finish_decl): Remove clause intended for asm directives
296 in struct or class fields: this code is never executed.
298 2003-10-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
300 * decl.c (start_decl): Exit if push_template_decl returns
303 2003-10-20 Kazu Hirata <kazu@cs.umass.edu>
305 * ChangeLog: Fix typos.
306 * call.c: Fix comment typos.
308 * cp-tree.h: Likewise.
310 * cxx-pretty-print.c: Likewise.
314 * mangle.c: Likewise.
315 * name-lookup.c: Likewise.
316 * parser.c: Likewise.
317 * search.c: Likewise.
318 * semantics.c: Likewise.
320 * typeck.c: Likewise.
322 2003-10-20 Jan Hubicka <jh@suse.cz>
324 * decl.c (start_cleanup_fn): Set DECL_DECLARED_INLINE_P to deffer
327 2003-10-20 Mark Mitchell <mark@codesourcery.com>
329 * Make-lang.in (c++.install-info): Remove.
331 2003-10-20 Jason Merrill <jason@redhat.com>
333 * class.c (layout_class_type): Set DECL_ARTIFICIAL on padding
336 2003-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
338 PR c++/9781, c++/10583, c++/11862
339 * decl.c (cp_finish_decl): Exit immediately if decl is an
341 * pt.c (push_template_decl_real): Return error_mark_node for
342 invalid template declaration of variable.
344 2003-10-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
347 * pt.c (lookup_template_class): Handle when current_class_type
350 2003-10-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
353 * decl.c (make_typename_type): Use dependent_type_p.
354 (make_unbound_class_template): Likewise.
355 * pt.c (instantiate_class_template): Increment
356 processing_template_decl during substitution of template friend
357 function. Preincrement processing_template_decl rather than
359 (get_mostly_instantiated_function_type): Increment
360 processing_template_decl during partial substitution of function
363 2003-10-15 Jan Hubicka <jh@suse.cz>
366 * decl2.c (cxx_callgraph_analyze_expr): Deal with baselink.
368 2003-10-14 Jason Merrill <jason@redhat.com>
371 * tree.c (build_target_expr_with_type): Call force_rvalue for
372 classes with non-trivial copy ctors.
375 * typeck.c (build_modify_expr): Call convert rather than abort.
377 2003-10-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
379 Breack out decl.c (3/n)
380 * name-lookup.c: Include flags.h
381 (lookup_name_current_level): Make static.
382 (add_decl_to_level): Likewise.
383 (push_local_binding): Likewise.
384 (push_overloaded_decl): Likewise.
385 (lookup_using_namespace): Likewise.
386 (qualified_lookup_using_namespace): Likewise.
387 (lookup_type_current_level): Likewise.
388 (unqualified_namespace_lookup): Likewise.
389 (namespace_ancestor): Likewise.
390 (push_using_directive): Likewise.
391 * decl.c (pushdecl): Move to name-lookup.c.
392 (pushdecl_top_level_1): Likewise.
393 (pushdecl_top_level): Likewise.
394 (pushdecl_top_level_and_finish): Likewise.
395 (maybe_push_decl): Likewise.
396 (push_using_decl): Likewise.
397 (push_overloaded_decl): Likewise.
398 (make_anon_name): Likewise.
399 (anon_cnt): Likewise.
400 (clear_anon_tags): Likewise.
401 (maybe_inject_for_scope_var): Likewise.
402 (check_for_out_of_scope_variable): Likewise.
403 * Make-lang.in (cp/name-lookup.o): Depend on flags.h.
404 * decl.c (warn_extern_redeclared_static): Export.
405 * cp-tree.h (warn_extern_redeclared_static): Declare.
407 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
409 * Make-lang.in: Replace uses of $(target_alias) with
410 $(target_noncanonical).
412 2003-10-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
414 * ChangeLog: Add PR number to patch for PR c++/12370.
416 2003-10-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
418 * name-lookup.h (cxx_scope_find_binding_for_name): Don't export.
419 (binding_for_name): Likewise.
420 (cxx_binding_clear): Move to name-lookup.c.
421 * name-lookup.c (cxx_scope_find_binding_for_name): Now static.
422 (binding_for_name): Likewise.
423 * decl2.c (is_ancestor): Move to name-lookup.c
424 (namespace_ancestor): Likewise.
425 (add_using_namespace): Likewise.
426 (ambiguous_decl): Likewise.
427 (lookup_using_namespace): Likewise.
428 (qualified_lookup_using_namespace): Likewise.
429 (set_decl_namespace): Likewise.
430 (decl_namespace): Likewise.
431 (current_decl_namespace): Likewise.
432 (push_decl_namespace): Likewise.
433 (pop_decl_namespace): Likewise.
434 (push_scope): Likewise.
435 (pop_scope): Likewise.
436 (struct arg_lookup): Likewise.
437 (arg_assoc): Likewise.
438 (arg_assoc_args): Likewise.
439 (arg_assoc_type): Likewise.
440 (add_function): Likewise.
441 (arg_assoc_namespace): Likewise.
442 (arg_assoc_class): Likewise.
443 (arg_assoc_template_arg): Likewise.
444 (do_namespace_alias): Likewise.
445 (validate_nonmember_using_decl): Likewise.
446 (do_nonmember_using_decl): Likewise.
447 (do_toplevel_using_decl): Likewise.
448 (do_local_using_decl): Likewise.
449 (do_class_using_decl): Likewise.
450 (do_using_directive): Likewise.
451 (constructor_name_full): Likewise.
452 (constructor_name): Likewise.
453 (constructor_name_p): Likewise.
455 2003-10-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
457 Break out decl.c (2/n)
458 * name-lookup.c: Include diagnostic.h
459 (cxx_binding_free): Make static.
460 (cxx_binding_make): Likewise.
461 (binding_table_new): Likewise
462 (binding_table_free): Likewise.
463 (binding_table_insert): Likewise.
464 (binding_table_find_anon_type): Likewise.
465 (binding_table_reverse_maybe_remap): Likewise.
466 (supplement_binding): Likewise.
467 * name-lookup.h (global_scope_name): Declare extern.
468 (global_type_node): Likewise.
469 (cxx_binding_free): Don't export.
470 (cxx_binding_make): Likewise.
471 (binding_table_new): Likewise.
472 (binding_table_free): Likewise.
473 (binding_table_insert): Likewise.
474 (binding_table_find_anon_type): Likewise.
475 (binding_table_reverse_maybe_remap): Likewise.
476 * Make-lang.in (cp/name-lookup.o): Depend on $(DIAGNOSTIC_H)
477 * decl.c (lookup_namespace_name): Move to name-lookup.c
478 (select_decl): Likewise.
479 (unqualified_namespace_lookup): Likewise.
480 (lookup_qualified_name): Likewise.
481 (lookup_name_real): Likewise.
482 (lookup_name_nonclass): Likewise.
483 (lookup_function_nonclass): Likewise.
484 (lookup_name): Likewise.
485 (lookup_name_current_level): Likewise.
486 (lookup_type_current_level): Likewise.
487 (lookup_flags): Likewise.
488 (qualify_lookup): Likewise.
489 (lookup_tag): Likewise.
490 (lookup_tag_reverse): Likewise.
491 (getdecls): Likewise.
492 (storedecls): Remove.
493 (cxx_remember_type_decls): Move to name-lookup.c.
494 (global_bindings_p): Likewise.
495 (innermost_nonclass_level): Likewise.
496 (toplevel_bindings_p): Likewise.
497 (namespace_bindings_p): Likewise.
498 (kept_level_p): Likewise.
499 (innermost_scope_kind): Likewise.
500 (template_parm_scope_p): Likewise.
501 (push_binding): Likewise.
502 (push_local_binding): Likewise.
503 (add_decl_to_level): Likewise. Make extern.
504 (push_class_binding): Move to name-lookup.c.
505 (resume_level): Likewise. Rename to resume_scope.
506 (begin_scope): Move to name-lookup.c.
508 (binding_depth): Likewise.
509 (is_class_level): Likewise.
510 (cxx_scope_descriptor): Likewise.
511 (cxx_scope_debug): Likewise.
512 (namespace_scope_ht_size): Likewise.
513 (leave_scope): Likewise.
514 (pushlevel_class): Likewise.
515 (poplevel_class): Likewise.
516 (clear_identifier_class_values): Likewise.
517 (pushdecl_with_scope): Likewise.
518 (pushdecl_namespace_level): Likewise.
519 (pushdecl_class_level): Likewise.
520 (push_class_level_binding): Likewise.
521 (push_using_directive): Likewise.
522 (identifier_global_value): Likewise.
523 (keep_next_level_flag): Likewise.
524 (keep_next_level): Likewise.
525 (free_binding_level): Likewise.
526 (set_class_shadows): Likewise.
527 (maybe_push_cleanup_level): Likewise.
528 (cp_namespace_decls): Likewise.
529 (bt_print_entry): Likewise.
530 (print_binding_level): Likewise.
531 (print_other_binding_stack): Likewise.
532 (print_binding_stack): Likewise.
533 (push_namespace): Likewise.
534 (pop_namespace): Likewise.
535 (push_nested_namespace): Likewise.
536 (pop_nested_namespace): Likewise.
537 (cxx_saved_binding_make): Likewise.
538 (struct cxx_saved_binding_make): Likewise.
539 (store_bindings): Likewise.
540 (maybe_push_to_top_level): Likewise.
541 (push_to_top_level): Likewise.
542 (pop_from_top_level): Likewise.
543 (identifier_type_value): Likewise.
544 (set_identifier_type_value): Likewise.
545 (set_identifier_type_value_with_scope): Likewise.
546 (pop_everything): Likewise.
548 (follow_tag_typedef): Likewise.
549 (maybe_process_template_type_declaration): Likewise.
550 (pop_binding): Likewise.
551 * cp-tree.h: Move corresponding declarations to name-lookup.h
553 2003-10-12 Steven Bosscher <steven@gcc.gnu.org>
555 * cvt.c (ocp_convert): Move warning to C common code.
557 2003-10-09 Jason Merrill <jason@redhat.com>
560 * tree.c (build_cplus_array_type): Handle all quals the same.
561 (cp_build_qualified_type_real): Look through arrays first.
563 * tree.c (build_cplus_new): Use build_decl to create a VAR_DECL.
564 (build_target_expr_with_type): Likewise.
566 * pt.c (instantiate_class_template): Sanity check that our
567 enclosing class has been instantiated.
569 2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
571 * cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS.
572 * error.c (dump_function_decl): Use it to skip the dump of the
574 (dump_expr): When dumping a declaration found within an
575 expression, always set TFF_NO_FUNCTION_ARGUMENTS
578 2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
581 * pt.c (tsubst_decl): Substitute also the DECL_NAME node of
584 2003-10-06 Mark Mitchell <mark@codesourcery.com>
587 * call.c (initialize_reference): Tweak error message.
588 * cxx-pretty-print.h (cxx_pretty_printer_flags): Remove
589 pp_cxx_flag_qualified_id and pp_cxx_flag_global_scope.
590 * cxx-pretty-print.c (pp_cxx_id_expression): Always display
591 qualified entities using qualified names.
594 * init.c (build_new_1): Make sure that the expression returned is
597 PR c++/12344, c++/12236, c++/8656
598 * decl.c (start_function): Do not ignore attributes embedded in a
601 2003-10-06 Mark Mitchell <mark@codesourcery.com>
603 * Make-lang.in (c++.info): Remove.
605 (c++.generated-manpages): Replace with ...
606 (generated-manpages): ... this.
608 2003-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
610 * decl.c (struct cp_binding_level): Move to name-lookup.h
611 (current_binding_level): Likewise.
612 (class_binding_level): Likewise.
613 * cp-tree.h (enum scope_kind): Likewise.
615 2003-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
617 * name-lookup.c (binding_entry_free): Nullify name and type
620 2003-10-02 Mark Mitchell <mark@codesourcery.com>
623 * typeck.c (finish_class_member_access_expr): Issue diagnostic
624 on erroneous use of qualified name.
626 2003-09-30 Richard Henderson <rth@redhat.com>
629 * decl.c (duplicate_decls): Copy DECL_SAVED_INSNS too.
631 2003-09-30 Kelley Cook <kelleycoook@wideopenwest.com>
633 * g++spec.c: Convert to ISO C90 prototypes.
634 * parser.c: Likewise.
636 2003-09-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
638 * decl.c (pop_binding): Don't mess with nullifying binding->scope
640 * name-lookup.c: Re-format.
641 (cxx_binding_free): Nullify binding->scope.
643 2003-09-29 Jan Hubicka <jh@suse.cz>
646 * except.c (build_eh_type_type): Call mark_used on the type.
648 2003-09-28 Richard Henderson <rth@redhat.com>
650 * typeck.c (c_expand_asm_operands): Take location_t, instead of
651 individual file and line.
653 2003-09-28 Andreas Jaeger <aj@suse.de>
655 * decl.c (cxx_builtin_type_decls): Convert to ISO C90 function
657 * init.c (push_base_cleanups): Likewise.
658 * decl2.c (finish_file): Likewise.
659 * mangle.c (init_mangle): Likewise.
660 (dump_substitution_candidates): Likewise.
661 * search.c: Likewise.
663 2003-09-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
665 * name-lookup.h (get_global_value_if_present): New function.
666 (is_typename_at_global_scope): Likewise.
667 * except.c (do_begin_catch): Use get_global_value_if_present.
668 (do_end_catch): Likewise.
669 (do_allocate_exception): Likewise.
670 (do_free_exception): Likewise.
671 (build_throw): Likewise.
672 * parser.c (cp_parser_member_declaration): Likewise.
673 * rtti.c (throw_bad_cast): Likewise.
674 (throw_bad_typeid): Likewise.
675 * decl.c (check_tag_decl): Use is_typename_at_global_scope.
676 (grokdeclarator): Likewise.
677 * cp-tree.h (global_namespace): Move to name-lookup.h
678 * call.c (call_builtin_trap): Tidy.
680 2003-09-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
683 * parser.c (cp_parser_nested_name_specifier_opt): Issue correct
684 error message when parser->scope is global_namespace.
686 2003-09-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
688 * cp-tree.h, name-lookup.h, decl.c, decl2.c: Remove reference to
689 macros BINDING_SCOPE, BINDING_VALUE and BINDING_TYPE.
691 2003-09-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
693 * decl.c (pop_binding_level, suspend_binding_level,
694 find_class_binding_level): Merge into leave_scope. Remove.
695 (leave_scope): New function.
697 (poplevel_class): Likewise.
698 (pop_namespace): Likewise.
700 2003-09-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
703 * parser.c (cp_parser_check_access_in_redeclaration): New function.
704 (cp_parser_member_declaration): Use it.
705 (cp_parser_template_declaration_after_export): Likewise.
707 2003-09-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
709 * cp-tree.h (scope_kind): Add new enumerator.
710 (keep_next_level): Change parameter type to bool.
711 (begin_scope): Change prototype.
712 (pushlevel): Remove declaration.
713 * decl.c (push_binding_level): Fold in begin_scope. Remove.
714 (struct cp_binding_level): Remove tag_tranparent field. Make keep
716 (keep_next_level_flag): Make a bool.
717 (cxx_scope_descriptor): Update scope names table
718 (make_cxx_scope): Fold in begin_scope. Remove..
719 (namespace_scope_ht_size): New function.
720 (begin_scope): Change prototype. Return a scope. Tidy.
721 (kept_level_p): Update.
723 (maybe_push_cleanup_level): Simplify.
724 (poplevel): Update for sk_cleanup and keep change.
725 (print_binding_level): Likewise.
726 (initial_push_namespace_scope): Fold in begin_scope. Remove.
727 (push_namespace): Update.
729 (lookup_tag): Likewise.
730 (lookup_name_current_level): Likewise.
731 (lookup_type_current_level): Likewise.
732 (cxx_init_decl_processing): Likewise.
733 (start_function): Likewise.
734 (begin_function_body): Likewise.
735 (start_method): Likewise.
736 * pt.c (push_inline_template_parms_recursive): Likewise.
737 (begin_template_parm_list): Likewise.
738 (begin_specialization): Likewise.
739 * semantics.c (do_pushlevel): Likewise.
740 (begin_compound_stmt): Likewise.
741 (begin_stmt_expr): Likewise.
743 2003-09-21 Richard Henderson <rth@redhat.com>
745 * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
746 method.c, optimize.c, pt.c, semantics.c, tree.c: Revert.
748 2003-09-21 Richard Henderson <rth@redhat.com>
750 * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
751 method.c, optimize.c, pt.c, semantics.c, tree.c: Update for
752 DECL_SOURCE_LOCATION rename and change to const.
754 2003-09-20 Richard Henderson <rth@redhat.com>
756 * decl.c, decl2.c, pt.c: Use %J in diagnostics.
758 2003-09-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
761 * parser.c (cp_parser_direct_declarator): Clear
762 parser->num_template_parameter_lists when parsing function
764 (cp_parser_constructor_declarator_p): Likewise.
766 2003-09-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
769 * pt.c (tsubst_friend_class): Only use innermost template
770 arguments for the injected friend class template.
772 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
775 * pt.c (instantiate_class_template): Increment
776 processing_template_decl around the tsubst of a template member
779 2003-09-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
781 * decl.c (cxx_scope_descriptor): Fix thinko.
782 (struct cp_binding_level): Adjust type of binding_depth field.
784 2003-09-18 Danny Smith <dannysmith@users.sourceforge.net>
787 * call.c (type_passed_as): Check for incomplete type.
788 (convert_for_arg_passing): Likewise.
790 2003-09-18 Nathan Sidwell <nathan@codesourcery.com>
793 * optimize.c (maybe_clone_body): Don't set MARK_USED on parameters
795 * semantics.c (expand_body): Set it here on the remaining clones.
797 2003-09-18 Roger Sayle <roger@eyesopen.com>
799 * lex.c (init_operators): Remove operator_name_info for FFS_EXPR.
800 * class.c (instantiate_type): Remove FFS_EXPR case.
802 2003-09-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
804 * ChangeLog: Fix recent commit.
806 2003-09-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
808 * ChangeLog: Add PR number to patch for PR c++/12316.
810 2003-09-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
812 * error.c (dump_type): Simplify. Use pp_type_specifier_seq for
814 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Fix thinko.
816 2003-09-17 Richard Henderson <rth@redhat.com>
818 * semantics.c (expand_body): Don't save/restore input_location.
820 2003-09-17 Mark Mitchell <mark@codesourcery.com>
823 * cp-tree.h (tsubst_flags_t): Add tf_conv.
824 * class.c (standard_conversion): Pass tf_conv to
826 (resolve_address_of_overloaded_function): Do not call mark_used
827 when just checking conversions.
830 * cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define.
831 * cp-tree.h (cxx_builtin_type_decls): Declare.
832 * decl.c (builtin_type_decls): New variables.
833 (cxx_builtin_type_decls): New function.
834 (record_builtin_type): Add to builtin_type_decls.
836 2003-09-17 Richard Henderson <rth@redhat.com>
839 * semantics.c (expand_or_defer_fn): Inc/dec function_depth.
841 2003-09-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
844 * typeck.c (comptypes): Don't ICE when its first argument is
846 (compparms): Reverse the arguments of same_type_p.
848 2003-09-15 Nathan Sidwell <nathan@codesourcery.com>
851 * typeck.c (convert_arguments): Return error_mark_node for an
852 incomplete parameter. Make error message more informative.
854 2003-09-12 Mark Mitchell <mark@codesourcery.com>
857 * class.c (maybe_note_name_used_in_class): Refine test for whether
858 or not we are in a class scope.
860 * cp-tree.h (language_function): Remove x_expanding_p.
861 (expanding_p): Remove.
862 (doing_semantic_analysis_p): Remove.
863 (scope_kind): Add sk_function_parms, sk_class,
865 (innermost_scope_kind): New method.
866 * call.c (cxx_type_promotes_to): Use type_decays_to.
867 * cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine.
868 (LANG_HOOKS_POPLEVEL): Likewise.
869 * decl.c (cp_binding_level): Remove parm_flag, template_parms_p,
870 template_spec_p, namespace_p, is_for_scope, is_try_scope, and
871 is_catch_scope. Add kind and explicit_spec_p.
872 (cxx_scope_descriptor): Use a lookup table.
873 (find_class_binding_level): Use "kind" field in binding_level, not
875 (pop_binding_level): Likewise.
876 (innermost_nonclass_level): Likewise.
877 (toplevel_bindings_p): Likewise.
878 (namespace_bindings_p): Likewise.
879 (template_parm_scope_p): Likewise.
880 (innermost_scope_kind): New method.
881 (current_tmpl_spec_kind): Use "kind" field in binding_level, not
883 (pushlevel): Remove check for doing_semantic_analysis_p.
884 (begin_scope): Simplify.
885 (add_decl_to_level): Use "kind" field in binding_level, not
887 (push_local_binding): Likewise.
888 (pop_label): Remove check for doing_semantic_analysis_p.
889 (poplevel): Use "kind" field in binding_level, not
891 (set_block): Remove check for doing_semantic_analysis_p.
892 (pushlevel_class): Use "kind" field in binding_level, not
894 (poplevel_class): Likewise.
895 (initial_push_namespace_scope): Likewise.
896 (maybe_push_to_top_level): Likewise.
897 (set_identifier_type_value_with_scope): Likewise.
898 (pop_everything): Likewise.
899 (maybe_process_template_type_declaration): Likewise.
901 (pushdecl): Likewise.
902 (pushdecl_with_scope): Likewise.
903 (check_previous_goto_1): Likewise.
904 (define_label): Likewise.
905 (finish_case_label): Likewise.
906 (lookup_tag): Likewise.
907 (unqualified_namespace_lookup): Likewise.
908 (lookup_name_real): Likewise.
909 (lookup_name_current_level): Likewise.
910 (lookup_type_current_level): Likewise.
911 (record_builtin_type): Likewise.
912 (cp_make_fname_decl): Likewise.
913 (maybe_inject_for_scope_var): Likewise.
914 (cp_finish_decl): Remove check for doing_semantic_analysis_p.
915 (start_function): Use begin_scope, not pushlevel.
916 (finish_function): Use "kind" field in binding_level, not
918 (start_method): Use begin_scope, not pushlevel.
919 (make_label_decl): Do not check expanding_p.
920 (save_function-data): Do not set expanding_p.
921 (cxx_push_function_context): Do not clear expanding_p.
922 * semantics.c (cxx_expand_function_start): Do not set expanding_p.
924 2003-09-14 Mark Mitchell <mark@codesourcery.com>
926 * class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for
927 an bit-field whose width exceeds that of its type.
929 2003-09-14 Geoffrey Keating <geoffk@apple.com>
931 * rtti.c (get_tinfo_decl): Set TREE_PUBLIC for typeinfo decls.
933 2003-09-14 Kazu Hirata <kazu@cs.umass.edu>
935 * ChangeLog: Follow spelling conventions.
936 * parser.c: Likewise.
938 2003-09-13 Richard Henderson <rth@redhat.com>
940 * decl2.c (finish_file): Check cgraph_assemble_pending_functions
941 during relaxation loop.
943 2003-09-11 David Edelsohn <edelsohn@gnu.org>
945 * decl2.c (var_finalized_p): Swap arms of conditional.
947 2003-09-10 Nathan Sidwell <nathan@codesourcery.com>
950 * typeck.c (build_address): If it is a function, mark it used.
951 (build_unary_op): Do not lose object's side-effects when taking
952 address of static member function.
953 * class.c (resolve_address_of_overloaded_function): Use
954 tsubst_flags_t parameter. Only expect overload sets. Adjust.
955 (instantiate_type): Adjust flags passing. Do not lose object's
956 side-effects when taking address of static member function.
958 2003-09-11 Richard Henderson <rth@redhat.com>
960 * semantics.c (expand_or_defer_fn): Update for new
961 cgraph_finalize_function argument.
963 2003-09-10 Richard Henderson <rth@redhat.com>
965 * decl2.c (cxx_callgraph_analyze_expr): Mark argument unused.
967 2003-09-10 Jan Hubicka <jh@suse.cz>
969 * decl2.c (var_finalized_p): New.
970 (maybe_emit_vtables, write_out_vars, finish_file): Use it.
972 2003-09-10 Richard Henderson <rth@redhat.com>
974 * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of
975 mark_member_pointers.
976 (lower_function): Remove.
977 * cp-tree.h: Update to match.
978 * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New.
979 (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove.
981 2003-09-09 Richard Henderson <rth@redhat.com>
983 * semantics.c (expand_or_defer_fn): Update call to
984 cgraph_finalize_function.
986 * semantics.c (expand_or_defer_fn): Use cgraph_finalize_function
989 * decl2.c (finish_file): Avoid out-of-bounds array reference
992 2003-09-09 Richard Henderson <rth@redhat.com>
994 * decl2.c (mark_member_pointers): Rename from
995 mark_member_pointers_and_eh_handlers and don't check eh handlers.
997 2003-09-09 Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
1000 * method.c (use_thunk): Clear DECL_RTL of copied nodes.
1002 2003-09-08 Mark Mitchell <mark@codesourcery.com>
1004 * cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to
1005 c_register_builtin_type.
1008 * decl2.c (add_function): Do not complain about seeing the same
1010 * semantics.c (perform_koenig_lookup): Improve documentation.
1013 * pt.c (try_one_overload): Add addr_p parameter.
1014 (resolve_overloaded_unification): Pass it.
1016 2003-09-08 Richard Henderson <rth@redhat.com>
1018 * optimize.c (maybe_clone_body): Inc/dec function_depth.
1020 2003-09-08 Richard Henderson <rth@redhat.com>
1022 * decl.c (finish_function): Clear current_function_decl.
1023 * decl2.c (mark_used): Don't push/pop gc context.
1024 * optimize.c (optimize_function): Likewise.
1025 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1026 * pt.c (instantiate_decl): Inc/dec function_depth instead.
1027 * semantics.c (expand_body): Update for tree_rest_of_compilation
1030 2003-09-07 Gabriel Dos Reis <gcc@integrable-solutions.net>
1033 * error.c (dump_decl): Handle namespace-alias-definition.
1034 * decl.c (warn_extern_redeclared_static): There is no point in
1035 checking changes in storage class specifier for a namespace
1037 (duplicate_decls): Tidy diagnostic message.
1038 * cxx-pretty-print.c (pp_cxx_left_brace): New macro.
1039 (pp_cxx_right_brace): Likewise.
1040 (pp_cxx_original_namespace_definition): New function.
1041 (pp_cxx_namespace_alias_definition): Likewise.
1042 (pp_cxx_declaration): Use them. Handle NAMESPACE_DECLs.
1044 2003-09-07 Jan Hubicka <jh@suse.cz>
1046 * decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
1047 Avoid re-emitting variables in unit-at-a-time mode.
1049 2003-09-06 Mark Mitchell <mark@codesourcery.com>
1052 * call.c (standard_conversion): Improve comments.
1053 (perform_direct_initialization): Make sure we return an expression
1054 of the correct type.
1055 * typeck.c (build_static_cast): Check for ambiguity and
1056 accessibility when performing conversions.
1058 2003-09-06 Gabriel Dos Reis <gdr@integrable-solutions.net>
1060 * cp-tree.h (add_binding): Remove declaration.
1061 * name-lookup.h (supplement_binding): Declare.
1062 * decl.c (add_binding): Move to name-lookup.c.
1063 (push_local_binding): Adjust.
1064 (push_class_binding): Likewise.
1065 (set_identifier_type_value_with_scope): Likewise.
1066 * name-lookup.c (supplement_binding): Rename from add_binding.
1067 Return a bool. Improve documentation.
1068 (set_namespace_binding): Adjust.
1069 * Make-lang.in (cp/name-lookup.o): Depend on toplev.h
1071 2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
1074 * class.c (pushclass): Push dependent using decls for nested
1075 classes of templates too.
1077 2003-09-06 Roger Sayle <roger@eyesopen.com>
1080 * class.c (resolve_address_of_overloaded_function): When building
1081 list of matching non-template function decls, ignore anticipated
1082 declarations of undeclared or shadowed GCC builtins.
1084 2003-09-06 Steven Bosscher <steven@gcc.gnu.org>
1087 * decl.c (define_label): Remove unreachable timevar pop.
1088 Always return the decl, even if the definition is invalid.
1090 2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
1093 * parser.c (cp_parser_late_parsing_default_args): Push & pop the
1094 unparsed functions queue.
1096 2003-09-05 Mark Mitchell <mark@codesourcery.com>
1099 * call.c (perform_direct_initialization): Correct logic for
1100 direct-initialization of a class type.
1103 * pt.c (lookup_template_function): Robustify.
1105 2003-09-05 Nathan Sidwell <nathan@codesourcery.com>
1108 * pt.c (tsubst_qualified_id): Make sure we get a non-type.
1109 (tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as
1110 is_type_p to lookup_qualified_name.
1112 * semantics.c (finish_call_expr): Refactor some code.
1115 * cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
1116 (build_min_non_dep): Declare.
1117 * tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
1118 (build_min_non_dep): New.
1119 * cvt.c (convert_to_void): Don't explicitly copy
1120 TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
1121 * call.c (build_new_method_call): Use build_min_non_dep.
1122 * decl2.c (grok_array_decl): Likewise.
1123 (build_offset_ref_call_from_tree): Likewise.
1124 * typeck.c (finish_class_member_access_expr,
1125 build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
1126 build_x_conditional_expr, build_x_compound_expr): Likewise.
1127 (build_static_cast, build_reinterpret_cast,
1128 build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
1129 * typeck2.c (build_x_arrow): Use build_min_non_dep.
1130 (build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
1132 * rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
1133 (build_dynamic_cast): Set TREE_SIDE_EFFECTS.
1134 * pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.
1136 2003-09-04 Richard Henderson <rth@redhat.com>
1138 * decl2.c (mark_member_pointers_and_eh_handlers): Update for
1139 change in cgraph_mark_needed_node arguments.
1141 2003-09-02 Geoffrey Keating <geoffk@apple.com>
1144 * decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
1145 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1147 2003-09-04 Nathan Sidwell <nathan@codesourcery.com>
1149 * cp-tree.h (finish_sizeof, finish_alignof): Remove.
1150 (expr_sizeof): Replace with ...
1151 (cxx_sizeof_or_alignof_expr): ... here.
1152 (cxx_sizeof_or_alignof_type): Make complain parameter a bool.
1153 * parser.c (cp_parser_unary_expression): Commonize alignof and
1155 * pt.c (tsubst_copy_and_build): Adjust alignof and sizeof
1157 * semantics.c (finish_sizeof, finish_alignof): Remove.
1158 * typeck.c (cxx_sizeof_or_alignof_type): Complain parameter
1159 becomes bool. Set TREE_READONLY.
1160 (expr_sizeof): Replace with ...
1161 (cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS.
1163 2003-09-04 Mark Mitchell <mark@codesourcery.com>
1165 Remove cast-as-lvalue extension.
1166 * call.c (build_conditional_expr): Correct formatting.
1167 (convert_like_real): Use lvalue_p, not non_cast_lvalue_p.
1168 (initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p.
1169 * cp-tree.h (non_cast_lvalue_p): Remove.
1170 (real_non_cast_lvalue_p): Remove.
1171 (non_cast_lvalue_or_else): Remove.
1172 * tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter.
1173 (real_lvalue_p): Adjust call to lvalue_p_1.
1174 (non_cast_lvalue_p): Remove.
1175 (non_cast_lvalue_or_else): Remove.
1176 (lvalue_p): Adjust call to lvalue_p_1.
1177 (lvalue_or_else): Simplify.
1178 * typeck.c (build_unary_op): Use lvalue_or_else, not
1179 non_cast_lvalue_or_else.
1180 (build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p.
1182 2003-09-03 DJ Delorie <dj@redhat.com>
1184 * decl.c (finish_function): Pass fndecl to aggregate_value_p.
1186 2003-09-03 Mark Mitchell <mark@codesourcery.com>
1189 * class.c (include_empty_classes): Correct logic for ABI version 1.
1191 2003-09-03 Richard Henderson <rth@redhat.com>
1193 * optimize.c (optimize_function): Push/pop ggc context around
1194 the call to optimize_inline_calls.
1196 2003-09-02 Scott Brumbaugh <scottb.lists@verizon.net>
1199 * parser.c (cp_parser_decl_specifier_seq): Add check for a
1200 duplicate friend decl-specifier.
1202 2003-09-02 Mark Mitchell <mark@codesourcery.com>
1205 * pt.c (convert_nontype_argument): Correct representation of
1206 REFERENCE_TYPE expressions.
1209 * cp-tree.h (KOENIG_LOOKUP_P): New macro.
1210 (finish_call_expr): Change prototype.
1211 * parser.c (cp_parser_postfix_expression): Adjust call to
1213 * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
1214 * semantics.c (finish_call_expr): Add koenig_p parameter.
1216 2003-09-01 Mark Mitchell <mark@codesourcery.com>
1219 * cp-tree.h (initialize_reference): Change prototype.
1220 * call.c (initialize_reference): Add cleanup parameter.
1221 * decl.c (grok_reference_init): Likewise.
1222 (check_initializer): Likewise.
1223 (cp_finish_decl): Insert a CLEANUP_STMT if necessary.
1224 (duplicate_decls): When replacing an anticipated builtin, do not
1226 * typeck.c (convert_for_initialization): Correct call to
1227 initialize_reference.
1230 * pt.c (dependent_type_p_r): Pass only the innermost template
1231 arguments to any_dependent_template_arguments_p.
1233 2003-09-01 Josef Zlomek <zlomekj@suse.cz>
1235 * error.c (dump_expr): Kill BIT_ANDTC_EXPR.
1236 * lex.c (init_operators): Kill BIT_ANDTC_EXPR.
1237 * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
1238 * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
1239 (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
1241 2003-08-29 Mark Mitchell <mark@codesourcery.com>
1244 * pt.c (build_non_dependent_expr): Do not build a
1245 NON_DEPENDENT_EXPR for a STRING_CST.
1248 * search.c (add_conversions): Avoid adding two conversion
1249 operators for the same type.
1251 2003-08-29 Mark Mitchell <mark@codesourcery.com>
1254 * pt.c (tsubst_copy_and_build): Correct handling of
1255 address-of-label extension.
1256 * semantics.c (finish_goto_stmt): The address of a label must go
1257 through the lvalue-to-rvalue conversion.
1259 2003-08-29 Richard Henderson <rth@redhat.com>
1260 Jason Merrill <jason@redhat.com>
1262 * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
1263 (LANG_HOOKS_RTL_EXPAND_STMT): New.
1264 * cp-tree.h (cxx_expand_function_start): Declare.
1265 * decl.c (start_function): Use allocate_struct_function.
1266 Move stmts_are_full_exprs_p assertion from expand_body.
1267 Do not free_after_parsing or free_after_compilation.
1268 (cxx_push_function_context): Move code to set struct function
1269 data from genrtl_start_function.
1270 * optimize.c (optimize_function): Don't inc/dec function_depth.
1271 * semantics.c (expand_body): Use tree_rest_of_compilation.
1272 (cxx_expand_function_start): Rename from genrtl_start_function,
1273 omit bits done by tree_rest_of_compilation.
1274 (genrtl_finish_function): Remove.
1275 (clear_decl_rtl): Move to ../tree-optimize.c.
1277 2003-08-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
1280 * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
1282 * cxx-pretty-print.h: Declare.
1283 * error.c (dump_template_parameter): Use it.
1284 (dump_type): Likewise.
1286 2003-08-28 Mark Mitchell <mark@codesourcery.com>
1288 * init.c (decl_constant_value): Deal with COND_EXPR specially.
1289 * call.c (build_conditional_expr): Revert previous patch.
1291 PR optimization/5079
1292 * call.c (build_conditional_expr): Use decl_constant_value to
1293 simplify the arguments.
1295 2003-08-26 Dan Nicolaescu <dann@ics.uci.edu>
1297 * parser.c (struct cp_token): Use enum bitfields.
1298 (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
1299 512B allocation unit.
1300 (cp_parser_token_tree_map_node): Use enum bitfields.
1302 2003-08-26 Nathan Sidwell <nathan@codesourcery.com>
1305 * decl.c (push_class_level_binding): Correct old_decl value from
1306 my 2003-07-29 reorganization.
1308 * call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
1309 (build_new_method_call): Add goto finish.
1310 * semantics.c (simplify_aggr_init_exprs_r): Don't set
1311 TREE_SIDE_EFFECTS on a call.
1313 2003-08-25 Richard Henderson <rth@redhat.com>
1315 * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
1317 2003-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1319 * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
1320 (cxx_pretty_printer): Adjust base type.
1321 (pp_cxx_function_specifier): Declare.
1322 * cxx-pretty-print.c (pp_cxx_whitespace): New macro.
1323 (pp_cxx_left_paren): Likewise.
1324 (pp_cxx_right_paren): Likewise.
1325 (pp_cxx_dot): Likewise.
1326 (pp_cxx_arrow): Likewise.
1327 (pp_cxx_semicolon): Likewise.
1328 (pp_cxx_identifier): Likewise.
1329 (pp_cxx_cv_qualifier_seq): Likewise.
1330 (pp_cxx_storage_class_specifier): Likewise.
1331 (pp_cxx_expression_list): Likewise.
1332 (pp_cxx_space_for_pointer_operator): Likewise.
1333 (pp_cxx_init_declarator): Likewise.
1334 (pp_cxx_call_argument_list): Likewise.
1335 (pp_cxx_nonconsecutive_character): Tidy.
1336 (pp_cxx_conversion_function_id): New function.
1337 (pp_cxx_template_id): Likewise.
1338 (pp_cxx_template_keyword_if_needed): Likewise.
1339 (pp_cxx_nested_name_specifier): Likewise.
1340 (pp_cxx_unqualified_id): Tidy
1341 (pp_cxx_qualified_id): Handle more nodes.
1342 (pp_cxx_primary_expression): Tidy.
1343 (pp_cxx_postfix_expression): Likewise.
1344 (pp_cxx_new_expression): Tidy.
1345 (pp_cxx_delete_expression): Likewise.
1346 (pp_cxx_cast_expression): New function.
1347 (pp_cxx_pm_expression): Tidy.
1348 (pp_cxx_conditional_expression): Likewise.
1349 (pp_cxx_assignment_operator): New function.
1350 (pp_cxx_assignment_expression): Tidy.
1351 (pp_cxx_expression): New function.
1352 (pp_cxx_function_specifier): Likewise.
1353 (pp_cxx_decl_specifier_seq): Likewise.
1354 (pp_cxx_simple_type_specifier): Tidy.
1355 (pp_cxx_type_specifier_seq): Likewise.
1356 (pp_cxx_ptr_operator): New function.
1357 (pp_cxx_implicit_parameter_type): Likewise.
1358 (pp_cxx_parameter_declaration): Tidy.
1359 (pp_cxx_parameter_declaration_clause): New function.
1360 (pp_cxx_exception_specification): Likewise.
1361 (pp_cxx_direct_declarator): Tidy.
1362 (pp_cxx_declarator): Likewise.
1363 (pp_cxx_ctor_initializer): New function.
1364 (pp_cxx_function_definition): Likewise.
1365 (pp_cxx_abstract_declarator): Tidy.
1366 (pp_cxx_direct_abstract_declarator): Likewise.
1367 (pp_cxx_type_id): Likewise.
1368 (pp_cxx_exception_declaration): New function.
1369 (pp_cxx_statement): Likewise.
1370 (pp_cxx_simple_declaration): Likewise.
1371 (pp_cxx_template_parameter_list): Likewise.
1372 (pp_cxx_template_parameter): Likewise.
1373 (pp_cxx_template_declaration): Likewise.
1374 (pp_cxx_explicit_specialization): Likewise.
1375 (pp_cxx_explicit_instantiation): Likewise.
1376 (pp_cxx_declaration): Tidy.
1377 (pp_cxx_pretty_printer_init): Initialize more fields.
1379 2003-08-25 Mark Mitchell <mark@codesourcery.com>
1382 * cp-tree.h (build_cplus_method_type): Remove.
1383 * call.c (standard_conversion): Use build_method_type_directly
1384 instead of build_cplus_method_type.
1385 * class.c (build_clone): Likewise.
1386 (adjust_clone_args): Likewise.
1387 * decl.c (build_ptrmem_type): Likewise.
1388 (grokdeclarator): Likewise.
1389 (check_function_type): Likewise.
1390 * decl2.c (grok_method_quals): Likewise.
1391 (maybe_retrofit_in_chrg): Likewise.
1392 * pt.c (copy_default_args_to_explicit_spec): Likewise.
1393 (tsubst_function_type): Likewise.
1395 * tree.c (build_cplus_method_type): Remove.
1396 * typeck.c (merge_types): Use build_method_type_directly.
1398 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1401 * search.c (dfs_access_in_type): Fix typo in comment.
1402 (dfs_accessible_queue_p): Likewise.
1403 (dfs_accessible_p): Only terminate when a friend is found.
1404 (accessible_p): Return immediately if access_in_type allows
1407 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1409 PR c++/641, c++/11876
1410 * friend.c (add_friend): Add complain parameter.
1411 (make_friend_class): Likewise.
1412 (do_friend): Adjust add_friend call.
1413 * decl.c (grokdeclarator): Adjust make_friend_class call.
1414 * parser.c (cp_parser_member_declaration): Likewise.
1415 (cp_parser_template_declaration_after_export): Likewise.
1416 * pt.c (instantiate_class_template): Adjust make_friend_class
1417 and add_friend call.
1418 * cp-tree.h (make_friend_class): Adjust declaration.
1419 (add_friend): Likewise.
1421 2003-08-21 Jason Merrill <jason@redhat.com>
1424 * call.c (build_conditional_expr): Ignore cv-qual differences for
1427 2003-08-21 Mark Mitchell <mark@codesourcery.com>
1430 * parser.c (cp_parser_id_expression): Add declarator_p parameter.
1431 (cp_parser_primary_expression): Adjust call to
1432 cp_parser_id_expression.
1433 (cp_parser_unqualified_id): Complain about the use of
1434 typedef-names in a destructor declarator.
1435 (cp_parser_postfix_expression): Adjust call to
1436 cp_parser_id_expression.
1437 (cp_parser_type_parameter): Likewise.
1438 (cp_parser_template_argument): Likewise.
1439 (cp_parser_declarator_id): Likewise.
1442 * call.c (standard_conversion): Use same_type_p, not pointer
1443 equality, to compare types.
1446 * parser.c (cp_parser_using_declaration): Check for invalid uses
1447 of template-ids here...
1448 * decl2.c (do_class_using_decl): ... rather than here.
1450 2003-08-20 Mark Mitchell <mark@codesourcery.com>
1453 * pt.c (more_specialized): Bump processing_template_decl.
1455 2003-08-21 Jason Merrill <jason@redhat.com>
1458 * decl.c (grokdeclarator): Recognize a flexible array based on the
1459 type, not the form of the declarator.
1461 2003-08-20 Jason Merrill <jason@redhat.com>
1463 * semantics.c (simplify_aggr_init_expr): Split out from
1464 simplify_aggr_init_exprs_r. Convert slot address to match
1466 * cp-tree.h: Declare it.
1467 * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
1468 DECL_NAME of a user variable.
1470 2003-08-20 Nathan Sidwell <nathan@codesourcery.com>
1473 * pt.c (build_non_dependent_expr): Look inside COND_EXPR and
1475 * semantics.c (finish_expr_stmt): Always convert to void.
1476 * typeck.c (build_x_compound_exp): Always convert to void.
1478 2003-08-19 Mark Mitchell <mark@codesourcery.com>
1481 * cp-tree.h (grok_op_properties): Change prototype.
1482 * decl.c (grok_op_properties): Add complain parameter.
1483 (grokfndecl): Pass it.
1484 * pt.c (tsubst_decl): Adjust accordingly.
1487 * decl.c (start_method): Return immediately if push_template_decl
1488 does not like the declaration.
1489 * pt.c (push_template_decl_real): Disallow member template
1493 * cp-tree.h (add_binding): Add prototype.
1494 * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
1495 (maybe_warn_about_overly_private_class): Use
1496 CLASSTYPE_DESTRUCTORS.
1497 (pushclass): Adjust call to set_identifier_type_value.
1498 * decl.c (add_binding): Give it external linkage.
1499 (push_local_binding): Adjust call to add_binding.
1500 (push_class_binding): Likewise.
1501 (set_identifier_type_value_with_scope): Change prototype. Use
1502 add_binding for global bindings.
1503 (set_identifier_type_value): Adjust accordingly.
1504 (pushtag): Likewise.
1505 (pushdecl): Use set_identifier_type_value, not
1506 set_identifier_type_value_with_scope.
1507 (pushdecl_namespace_level): Adjust calls to
1508 SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
1509 (pushdecl_class_level): Likewise.
1510 (lookup_tag): Use select_decl.
1511 (select_decl): Improve comment.
1512 (record_builtin_type): Do not call pushdecl.
1513 (cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
1514 (cp_finish_decl): Adjust call to set_identifier_type_value.
1515 (check_elaborated_type_specifier): Improve checks for invalid uses
1517 (xref_tag): Adjust call to check_elaborated_type_specifier.
1518 * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
1519 * name-lookup.c (set_namespace_binding): Use add_binding.
1520 * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
1521 rather than an IDENTIFIER_NODE, to represent built-in types, if
1522 requested by the caller.
1523 (cp_parser_postfix_expression): Adjust call.
1524 (cp_parser_type_specifier): Likewise.
1525 (cp_parser_elaborated_type_specifier): Adjust call to
1526 check_elaborated_type_specifier.
1527 * typeck2.c (build_functional_cast): Do not perform name lookups.
1530 * decl.c (expand_static_init): Remove unnecessary code.
1532 2003-08-19 Andrew Pinski <pinskia@physics.uc.edu>
1534 PR c++/10538, PR c/5582
1535 * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
1537 2003-08-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1540 * init.c (build_offset_ref): Perform access checking for
1541 pointer to member correctly.
1543 2003-08-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
1545 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
1547 2003-08-18 Nathan Sidwell <nathan@codesourcery.com>
1550 * cp-tree.h (finish_stmt_expr): Add bool parameter.
1551 * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
1552 adjust the stmt_expr here.
1553 (build_vec_init): Use finish_stmt_expr_expr, convert result to
1555 * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
1557 * pt.c (tsubst_copy): Likewise.
1558 * semantics.c (finish_stmt_expr): Add parameter.
1560 * pt.c (instantiate_class_template): Push to class's scope before
1563 2003-08-17 Jan Hubicka <jh@suse.cz>
1566 * semantics.c (finish_id_expression): Mark all functions as used.
1568 2003-08-16 Nathan Sidwell <nathan@codesourcery.com>
1571 * cvt.c (convert_to_void): Indicate which side of conditional has
1572 no effects, and rhs of comma operator. Test for no sideeffect
1573 expressions here and always build a convert expr.
1574 * init.c (expand_default_init): Convert the init to void.
1575 * typeck.c (build_x_compound_expr): Do not check for side effects
1577 (build_compound_expr): Do not convert lhs when building a
1580 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
1582 * cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
1583 * decl2.c (build_offset_ref_call_from_tree): Use
1584 build_non_dependent_expr.
1585 * error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
1586 * pt.c (build_non_dependent_expr): Set operand.
1588 2003-08-14 Jan Hubicka <jh@suse.cz>
1590 * decl2.c (mark_member_pointers): Rename to...
1591 (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
1592 (lower_function): Update call.
1593 * except.c (eh_type_info): Break out from ...
1594 (build_eh_type): ... here; tinfo is already used.
1595 (finish_eh_spec_block): Mark tinfos as used.
1596 * semantics.c (finish_handler_params): Mark tinfo as used.
1597 * cp-tree.h (eh_type_info): Declare.
1599 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
1601 * pt.c (instantiate_class_template): Set location before
1604 * decl.c (make_typename_type): Use my_friendly_assert.
1605 * pt.c (tsubst_aggr_type): Rearrange context substitution.
1607 2003-08-14 Jan Hubicka <jh@suse.cz>
1609 * method.c (use_thunk): Expand body directly.
1611 2003-08-12 Mark Mitchell <mark@codesourcery.com>
1614 * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
1615 determine whether or not to promote types.
1616 (convert_for_arg_passing): Likewise.
1617 * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
1619 * pt.c (tsubst_decl): Do not expect it to be set.
1623 * cp-tree.h (check_elaborated_type_specifier): Declare.
1624 (handle_class_head): Remove.
1625 (note_got_semicolon): Likewise.
1626 (note_list_got_semicolon): Likewise.
1627 (finish_class_definition): Likewise.
1628 * decl.c (check_elaborated_type_specifier): Make it public.
1630 (handle_class_head): Remove.
1631 * parser.c (cp_parser_elaborated_type_specifier): Use
1632 check_elaborated_type_specifier.
1633 (cp_parser_class_specifier): Do not call finish_class_definition.
1634 (cp_parser_class_head): Or handle_class_head. Check for
1635 over-qualified names.
1636 * semantics.c (finish_class_definition): Remove.
1638 * parser.c (cp_parser_check_for_definition_in_return_type): New
1640 (cp_parser_simple_declaration): Adjust call to
1641 cp_parser_init_declarator.
1642 (cp_parser_decl_specifier_seq): Change type of
1643 declares_class_or_enum parameter.
1644 (cp_parser_explicit_instantiation): Adjust accordingly.
1645 (cp_parser_type_specifier): Change type of
1646 declares_class_or_enum parameter.
1647 (cp_parser_init_declarator): Add declares_class_or_enum
1649 (cp_parser_parameter_declaration): Adjust call to
1650 cp_parser_decl_specifier_seq.
1651 (cp_parser_function_definition): Likewise.
1652 (cp_parser_member_declaration): Likewise.
1653 (cp_parser_single_declaration): Likewise.
1655 * cp-tree.h (lang_type_class): Remove has_call_overloaded,
1656 has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
1657 (TYPE_OVERLOADS_CALL_EXPR): Remove.
1658 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
1659 (TYPE_OVERLOADS_ARROW): Likewise.
1660 (CLASSTYPE_GOT_SEMICOLON): Likewise.
1661 * class.c (check_bases): Do not set them.
1662 (finish_struct_1): Likewise.
1663 * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
1664 (build_ptrmemfunc_type): Likewise.
1665 (grok_op_properties): Do not set TYPE_OVERLOADS_*.
1666 (start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
1667 * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
1668 * lex.c (note_got_semicolon): Remove.
1669 (note_list_got_semicolon): Likewise.
1670 * parser.c (cp_parser_simple_declaration): Do not call
1671 note_list_got_semicolon.
1672 * pt.c (list_eq): Remove.
1673 (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
1674 (instantiate_class_template): Do not set TYPE_OVERLOADS*.
1675 (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
1676 * ptree.c (cxx_print_type): Do not print them.
1677 * semantics.c (finish_member_class_template): Do not call
1678 note_list_got_semicolon.
1680 2003-08-11 Aldy Hernandez <aldyh@redhat.com>
1682 * call.c (standard_conversion): Opaque pointers interconvert.
1684 * testsuite/g++.dg/other/opaque-3.C: New.
1686 2003-08-11 Mark Mitchell <mark@codesourcery.com>
1688 * typeck.c (merge_types): Handle cv-qualified pointer-to-member
1691 2003-08-10 Mark Mitchell <mark@codesourcery.com>
1694 * cp-tree.h (get_vbase): Remove.
1695 (get_vbase_types): Remove.
1696 * init.c (expand_member_init): Correct logic for looking up base
1699 2003-08-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1701 * error.c (dump_expr): Tidy.
1702 * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
1703 (pp_cxx_begin_template_argument_list): Likewise.
1704 (pp_cxx_end_template_argument_list): Likewise.
1705 (is_destructor_name): Likewise.
1706 (pp_cxx_unqualified_id): Likewise.
1707 (pp_cxx_qualified_id): Likewise.
1708 (pp_cxx_id_expression): Likewise.
1709 (pp_cxx_new_expression): Likewise.
1710 (pp_cxx_delete_expression): Likewise.
1711 (pp_cxx_pm_expression): Likewise.
1712 (pp_cxx_type_specifier): Rework.
1713 (pp_cxx_type_id): Likewise.
1714 (pp_cxx_primary_expression): Likewise.
1715 (pp_cxx_postfix_expression): Likewise.
1716 (pp_cxx_unary_expression): Likewise.
1717 (pp_cxx_multiplicative_expression): Likewise.
1718 (pp_cxx_conditional_expression): Likewise.
1719 (pp_cxx_assignment_expression): Likewise.
1720 (pp_cxx_pretty_printer_init): Tidy.
1722 2003-08-10 Nathan Sidwell <nathan@codesourcery.com>
1724 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
1725 NODE is always a TREE_VEC of nonzero size.
1726 (NUM_TMPL_ARGS): NODE is always a TREE_VEC.
1727 * decl2.c (arg_assoc): Template args will be a vec.
1728 * error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
1729 dump_template_argument_list.
1730 (dump_template_parms): Args will be a vec.
1731 * parser.c (cp_parser_template_argument_list): Produce a
1733 * pt.c (coerce_template_parms): Args are always vectors.
1734 (mangle_class_name_for_template): Likewise.
1735 (lookup_template_function): Likewise.
1736 (lookup_template_class): Likewise.
1737 (tsubst_template_args): Likewise.
1738 (tsubst_baselink): Use tsubst_template_args.
1739 (tsubst_qualified_id): Likewise.
1740 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
1741 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
1742 (any_dependent_template_args_p): Args are always vectors.
1743 * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
1746 * call.c (convert_like_real): Add rvalue binding error message.
1747 * error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
1751 * pt.c (dependent_type_p_r): A dependent template-id is a class
1752 type with dependent template arguments, or a bound template
1754 (type_dependent_expression_p): A template function decl cannot
1755 have a dependent context.
1757 2003-08-07 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1760 * parser.c (cp_parser_class_name): Return immediately when scope
1763 2003-08-07 Aldy Hernandez <aldyh@redhat.com>
1765 * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
1767 * cp/call.c (standard_conversion): Support opaque types.
1769 (strip_top_quals): Use cp_build_qualified_type instead of
1772 * cp/typeck.c (convert_for_assignment): Support opaque types.
1774 * testsuite/g++.dg/other/opaque-1.C: New.
1776 * testsuite/g++.dg/other/opaque-2.C: New.
1778 2003-08-06 Aldy Hernandez <aldyh@redhat.com>
1780 * decl.c (grokparms): Use cp_build_qualified_type instead
1783 2003-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
1785 * cxx-pretty-print.h: New file.
1786 * cxx-pretty-print.c: Likewise.
1787 * error.c (scratch_pretty_printer): Change type.
1789 (dump_aggr_type): Likewise.
1790 (dump_global_iord): Likewise.
1791 (dump_expr): Likewise.
1792 (dump_char): Remove.
1793 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
1794 (cxx_initialize_diagnostics): New function.
1795 * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
1796 (CXX_PRETTY_PRINT_H): New variable.
1797 (cp/cxx-pretty-print.o): New rule.
1798 (cp/cp-lang.o): Update dependence.
1799 (cp/error.o): Likewise.
1801 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
1803 * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
1804 (DECL_DECLARED_INLINE_P): Remove.
1805 * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
1806 if decl is a FUNCTION_DECL. This never made sense, but now it is
1807 required to avoid a tree check failure.
1808 * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
1809 * optimize.c (maybe_clone_body): Likewise.
1811 2003-08-04 Roger Sayle <roger@eyesopen.com>
1813 * decl.c (cxx_insert_default_attributes): Delete.
1814 * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
1815 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
1817 2003-08-03 Nathan Sidwell <nathan@codesourcery.com>
1820 * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
1824 * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
1827 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
1830 * cp-tree.def (USING_DECL): Document its type.
1831 * class.c (pushclass): If we're entering a template, push any
1832 dependent using decls it has.
1833 * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
1835 * pt.c (tsubst_decl) <USING_DECL case>: Set type.
1836 (tsubst): Remove USING_DECL checks.
1837 (type_dependent_expression_p): Remove USING_DECL case.
1838 * semantics.c (finish_member_declaration): A USING_DECL's type
1839 indicates whether it is dependent.
1841 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
1843 * cp-tree.h (pushclass): Remove unneeded parameter.
1844 * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
1845 (push_nested_class): Adjust pushclass call.
1846 * pt.c (instantiate_class_template): Likewise.
1847 * semantics.c (begin_class_definition): Likewise.
1849 2003-08-01 Nathanael Nerode <neroden@gcc.gnu.org>
1851 * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
1853 2003-08-01 Mark Mitchell <mark@codesourcery.com>
1856 * decl.c (decls_match): Don't ignore the types of template
1860 * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
1862 2003-08-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1864 PR c++/8442, c++/8806
1865 * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
1867 (check_elaborated_type_specifier): Add allow_template_p
1868 parameter. Check tag mismatch and class template.
1869 (xref_tag): Add template_header_p parameter. Add assertion
1870 that name is an IDENTIFIER_NODE. Remove implicit typename
1871 warning. Simplify lookup process if globalize is true.
1872 (cxx_init_decl_processing): Adjust call to xref_tag.
1873 (xref_tag_from_type): Likewise.
1874 * decl2.c (handle_class_head): Likewise.
1875 * parser.c (cp_parser_elaborated_type_specifier,
1876 cp_parser_class_head): Likewise.
1877 * rtti.c (init_rtti_processing, build_dynamic_cast1,
1878 tinfo_base_init, emit_support_tinfos): Likewise.
1879 * class.c (is_base_of_enclosing_class): Remove.
1880 * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
1881 template template argument.
1882 * cp-tree.h (xref_tag): Adjust declaration.
1883 (is_base_of_enclosing_class): Remove.
1884 * NEWS: Document template template argument change.
1886 2003-08-01 Nathan Sidwell <nathan@codesourcery.com>
1888 * parser.c (cp_parser_init_declarator,
1889 cp_paser_member_declaration): Reformat.
1890 * pt.c (lookup_template_class, type_unification_real, unify,
1891 type_dependent_expression_p): Reformat.
1894 * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
1896 (finish_stmt_expr_expr): Declare.
1897 * parser.c (cp_parser_primary_expression): Tell
1898 cp_parser_compount_statement that it is a statement expression.
1899 (cp_parser_statement, cp_parser_labeled_statement,
1900 cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
1901 in_statement_expr_p parameter.
1902 (cp_parser_expression_statement): Likewise. Call
1903 finish_stmt_expr_expr for final expression of a statement
1905 (cp_parser_for_init_statement,
1906 cp_parser_implicitly_scoped_statement,
1907 cp_parser_already_scoped_statement, cp_parser_function_definition,
1908 cp_parser_try_block, cp_parser_handled): Adjust.
1909 * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
1910 (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
1911 (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
1912 * semantics.c (finish_expr_stmt): Do not deal with statement
1914 (begin_stmt_expr): Clear last_expr_type.
1915 (finish_stmt_expr_expr): New.
1916 (finish_stmt_expr): Process the value expression.
1918 * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
1919 compound expr inside the target's initializer.
1922 * parser.c (cp_parser_primary_expression): Do not set
1923 non-constant-p merely because it is a dependent scope.
1926 * decl2.c (do_class_using_decl): Set type to NULL_TREE.
1927 * semantics.c (finish_expr_stmt): Do not convert to void in a
1930 2003-07-31 Nathan Sidwell <nathan@codesourcery.com>
1932 * pt.c (coerce_template_parms): Refactor.
1933 (fn_type_unification): Increment processing_template_decl when
1934 tsubsting an incomplete set of explicit args.
1937 * pt.c (instantiate_class_template): Increment
1938 processing_template_decl around the tsubst of a template member
1940 (tsubst_qualified_id): Assert we do not have a dependent scope.
1942 * pt.c (coerce_template_template_parms, lookup_template_class,
1943 can_complete_type_without_circularity, instantiate_class_template,
1944 tsubst_decl, unify): Reformat.
1946 2003-07-31 Jan Hubicka <jh@suse.cz>
1948 * decl2.c (maybe_make_one_only): Use mark_referenced.
1949 * method.c (use_thunk): Likewsie.
1951 2003-07-30 Jan Hubicka <jh@suse.cz>
1953 * class.c (build_vtable_entry_ref): Kill.
1954 (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
1955 (build_vfn_ref): Do not call build_vtable_entry_ref.
1956 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
1957 * cp-tree.h (prepare_assemble_variable): Kill.
1958 * cp-decl.c (prepare_assemble_variable): Kill.
1960 2003-07-29 Geoffrey Keating <geoffk@apple.com>
1962 * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
1963 of setting valid_pch by hand.
1965 2003-07-29 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1967 * decl.c (finish_enum): Initialize underlying_type.
1969 2003-07-29 Nathan Sidwell <nathan@codesourcery.com>
1972 * decl.c (add_binding): Add bval local variable.
1973 (push_class_level_binding): Likewise. Allow a USING_DECL to be
1975 * decl2.c (do_class_using_decl): The type of a using decl is
1977 * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
1978 function call lookup code.
1979 * pt.c (tsubst): A USING_DECL will have unknown type.
1980 (tsubst_copy_and_build): Allow a using decl.
1981 (type_dependent_expression_p): A USING_DECL will make it
1983 * semantics.c (finish_member_declaration): Push a dependent using
1986 2003-07-28 Mark Mitchell <mark@codesourcery.com>
1989 * parser.c (cp_parser_postfix_expression): Do not call mark_used.
1990 * semantics.c (finish_id_expression): Call mark_used for all
1993 2003-07-28 Mark Mitchell <mark@codesourcery.com>
1996 * call.c (standard_conversion): Allow all integral->enumeral
1997 conversions, after marking them as bad.
1998 * decl.c (finish_enum): Make sure that all enumerators are
1999 properly converted to the underlying type.
2000 (build_enumerator): Set DECL_CONTEXT for namespace-scope
2002 * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
2003 (tsubst_enum): Tidy.
2005 * Make-lang.in (typeck.o): Depend on convert.h.
2006 (class.o): Likewise.
2008 * call.c: Include convert.h.
2009 (convert_arg_to_ellipsis): Use convert_to_real.
2010 * class.c: Include convert.h.
2011 (build_base_path): Use convert_to_integer.
2012 * rtti.c: Include convert.h.
2013 (build_headof): Use convert_to_integer.
2014 * typeck.c: Include convert.h.
2015 (decay_conversion): Use convert_to_integer.
2016 (build_unary_op): Use build_nop.
2017 (get_delta_difference): Use convert_to_integer.
2018 (build_ptrmemfunc): Avoid unnecessary conversions.
2020 2003-07-28 Jan Hubicka <jh@suse.cz>
2022 * decl2.c (mark_member_pointers): Verify that member pointer points to
2025 2003-07-28 Nathan Sidwell <nathan@codesourcery.com>
2027 * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
2028 (finish_compound_stmt): Remove no scope arg.
2029 * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
2030 end_compound_stmt calls.
2031 (expand_static_init, begin_destructor_body, begin_function_body,
2032 finish_function_body): Likewise.
2033 * decl2.c (start_objects, finish_objects,
2034 start_static_storage_duration_function,
2035 finish_static_storage_duration_function): Likewise.
2036 * init.c (begin_init_stmts, finish_init_stmts,
2037 construct_virtual_base, build_vec_init): Likewise.
2038 * method.c (do_build_assign_ref, synthesize_method): Likewise.
2039 * parser.c (cp_parser_compound_statement,
2040 cp_parser_implicitly_scoped_statement,
2041 cp_parser_already_scoped_statement): Likewise.
2042 * pt.c (tsubst_expr): Likewise.
2043 * semantics.c (begin_compound_stmt): No scope arg is a bool.
2044 (finish_compound_stmt): Remove no scope arg.
2046 * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
2049 2003-07-27 Mark Mitchell <mark@codesourcery.com>
2051 * call.c (standard_conversion): Tweak handling of
2052 pointer-to-member types.
2053 * pt.c (tsubst): Correctly qualify pointers-to-data member types.
2054 * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
2055 pointer-to-data member types.
2057 2003-07-27 Nathan Sidwell <nathan@codesourcery.com>
2059 * parser.c (cp_parser_type_parameter): Reformat.
2060 (cp_parser_parameter_declaration): Deprecate default args where
2063 2003-07-26 Nathan Sidwell <nathan@codesourcery.com>
2067 * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
2068 (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
2069 * init.c (begin_init_stmts): Make static. Return is_global
2070 value. Always call begin_stmt_expr.
2071 (finish_init_stmts): Make static. Add is_global parm. Always
2072 building a stmt tree.
2073 (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
2074 (build_vec_init): Likewise. Always building a stmt tree.
2075 (expand_default_init): Always building a stmt tree.
2076 (get_temp_regvar): Likewise.
2077 * semantics.c (begin_global_stmt_expr,
2078 finish_global_stmt_expr): Remove.
2080 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2082 * cp-tree.h (build_compound_expr): Take LHS & RHS args.
2083 (build_x_compound_expr_from_list): Declare.
2084 * typeck.c (build_x_compound_expr_from_list): New.
2085 (build_x_compound_expr): Adjust.
2086 (build_compound_expr): Remove unreachable code. Take two
2088 * decl.c (grok_reference_init): Use
2089 build_x_compound_expr_from_list.
2090 (expand_static_init): Adjust build_compound_expr call.
2091 (cxx_maybe_build_cleanup): Likewise.
2092 * init.c (perform_member_init): Use
2093 build_x_compound_expr_from_list.
2094 (build_new_1): Likewise.
2095 (build_vec_delete): Adjust build_compound_expr calls.
2096 (build_vbase_delete): Likewise.
2097 * typeck2.c (store_init_value): Use
2098 build_x_compound_expr_from_list.
2099 (build_functional_cast): Likewise.
2101 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2103 * cp-tree.h (enum tsubst_flags_t): Add tf_user.
2104 * decl.c (make_typename_type): Pass it.
2105 * pt.c (lookup_template_class): Use it.
2106 (resolve_typename_type): Pass it.
2107 * semantics.c (finish_template_type): Pass it.
2109 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2112 * cp-tree.h (qualified_name_lookup_error): Declare.
2113 * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
2115 (tsubst_expr) <DECL_STMT case>: Likewise.
2116 (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
2117 * semantics.c (qualified_name_lookup_error): New, broken out of ...
2118 (finish_id_expression): ... here. Use it.
2120 2003-07-25 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
2122 * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
2124 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2127 * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
2128 (tsubst_template_arg): New.
2129 (tsubst_template_arg_vector): Rename to ...
2130 (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
2131 tsubst_template_arg.
2132 (coerce_template_parms): Use tsubst_template_arg for default
2134 (tsubst_template_parms): Likewise.
2135 (tsubst_aggr_type): Adjust.
2136 (tsubst_decl): Likewise.
2137 (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
2138 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
2140 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
2142 * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
2143 * error.c: Use the new pretty-printer framework.
2145 2003-07-24 Per Bothner <pbothner@apple.com>
2147 * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
2148 which causes errors messages to incorrectly mention included files.
2150 2003-07-24 Mark Mitchell <mark@codesourcery.com>
2152 * cp-tree.h (convert_to_base_statically): Declare.
2153 * call.c (build_special_member_call): Convert INSTANCE to the base
2155 * class.c (convert_to_base_statically): New method.
2156 * init.c (construct_virtual_base): Use it.
2157 * method.c (do_build_assign_ref): Fix typo in comment.
2159 2003-07-24 Jason Merrill <jason@redhat.com>
2161 * decl.c: Just set truthvalue_* to boolean_*.
2163 2003-07-24 Nathan Sidwell <nathan@codesourcery.com>
2165 * decl.c (reshape_init): Remove unreachable code.
2167 2003-07-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2170 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
2172 2003-07-23 Mark Mitchell <mark@codesourcery.com>
2175 * cp-tree.h (accessible_base_p): Declare.
2176 * call.c (build_over_call): Use it.
2177 * search.c (accessible_base_p): New function, split out from ...
2178 (lookup_base): ... here.
2181 * call.c (build_conditional_expr): Use perform_implicit_conversion
2182 and error_operand_p. Robustify.
2183 * typeck.c (build_unary_op): Use perform_implicit_conversion.
2185 2003-07-23 Nathan Sidwell <nathan@codesourcery.com>
2188 * parser.c (cp_parser_nested_name_specifier): Reset scope on
2190 (cp_parser_elaborated_type_specifier): Likewise.
2192 2003-07-22 Mark Mitchell <mark@codesourcery.com>
2194 Eliminate use of POINTER_TYPE for pointers-to-members.
2195 * call.c (standard_conversion): Rework pointer-to-member handling.
2197 (add_builtin_candidate): Likewise.
2198 (resolve_scoped_fn_name): Remove.
2199 (build_conditional_expr): Rework pointer-to-member handling.
2200 (compare_ics): Likewise.
2201 * class.c (check_field_decls): Use TYPE_PTR_P.
2202 * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
2204 * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
2205 (TYPE_PTRMEM_P): Add comment.
2206 (TYPE_PTR_P): Simplify.
2207 (TYPE_PTROB_P): Correct definition.
2208 (TYPE_PTR_TO_MEMBER_P): New macro.
2209 (TYPE_PTRMEM_CLASS_TYPE): Adjust.
2210 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2211 (resolved_scoped_fn_name): Remove declaration.
2212 (build_offset_ref): Change prototype.
2213 (resolve_offset_ref): Remove.
2214 (comp_target_types): Remove.
2215 * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
2217 (convert_to_reference): Use can_convert.
2218 (ocp_convert): Improve error handling. Rework pointer-to-member
2220 (perform_qualification_conversions): Rework pointer-to-member
2222 * decl.c (build_ptrmem_type): Handle functions too.
2223 (create_array_type_for_decl): Remove OFFSET_TYPE error message.
2224 (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
2225 (grokparms): Remove OFFSET_TYPE error message.
2226 * dump.c (cp_dump_tree): Rework pointer-to-member handling.
2227 * error.c (dump_type_prefix): Likewise.
2228 * expr.c (cplus_expand_constant): Use build_nop.
2229 * init.c (build_offset_ref): Add address_p parameter. Fold in
2230 necessary bits from resolve_offset_ref.
2231 (resolve_offset_ref): Remove.
2232 * parser.c (cp_parser_postfix_expression): Remove special case
2233 code for OFFSET_TYPE.
2234 * pt.c (convert_nontype_argument): Rework pointer-to-member
2236 (convert_template_argument): Likewise.
2238 (invalid_nontype_parm_type_p): Likewise.
2239 (dependent_type_p_r): Likewise.
2240 * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
2241 (target_incomplete_p_): Rework pointer-to-member
2243 (get_pseudo_ti_init): Likewise.
2244 (get_pseudo_ti_desc): Likewise.
2245 * semantics.c (finish_qualified_id_expr): Adjust call to
2246 build_offset_ref. Remove use of resolve_offset_ref.
2247 * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
2248 * typeck.c (target_type): Use TYPE_PTRMEM_P.
2249 (type_unknown_p): Remove obsolete code about the time before
2250 non-dependent expressions were handled correctly.
2251 (qualify_type_recursive): Remove.
2252 (composite_pointer_type_r): New function.
2253 (composite_pointer_type): Use it.
2254 (merge_types): Remove dead comments.
2255 (comp_cv_target_types): Remove.
2256 (comp_target_types): Likewise.
2257 (comp_target_parms): Likewise.
2258 (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
2259 (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
2260 (build_binary_op): Do not use of comp_target_types.
2261 (pointer_diff): Remove OFFSET_TYPE case.
2262 (build_unary_op): Adjust pointer-to-member handling.
2263 (unary_complex_lvalue): Likewise.
2264 (check_for_casting_away_constness): Add description parameter.
2265 (build_static_cast): Pass it.
2266 (build_reinterpret_cast): Use check_for_casting_away_constness.
2267 (build_const_cast): Adjust pointer-to-member handling.
2268 (build_c_cast): Likewise.
2269 (convert_for_assignment): Remove OFFSET_TYPE error message.
2270 (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
2271 (comp_ptr_ttypes_reinterpret): Remove.
2272 (casts_away_constness_r): Adjust pointer-to-member handling.
2273 (casts_away_constness): Liekwise.
2274 (strip_all_pointer_quals): Remove.
2275 * typeck2.c (digest_init): Adjust pointer-to-member handling.
2276 (build_m_component_ref): Likewise.
2278 2003-07-22 Wolfgang Bangerth <bangerth@dealii.org>
2280 * lex.c (unqualified_fn_lookup_error): Mention that the error
2281 message needs to be kept in synch with the manual.
2283 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
2286 * decl.c (grokdeclarator): An array member is only a flexible
2287 array member if the field itself is the array.
2289 2003-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2292 * decl.c (xref_basetypes): Handle error_mark_node.
2294 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
2296 * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
2297 * tree.c (lvalue_p_1): Set it.
2298 * class.c (check_field): Don't allow non-packed non-POD fields to
2300 * call.c (reference_binding): Need a temporary for all bitfield
2302 (convert_like_real): Check it is ok to make a temporary here.
2304 2003-07-21 Nathan Sidwell <nathan@codesourcery.com>
2306 * cp-tree.h (hack_identifier): Remove.
2307 * method.c (hack_identifier): Remove.
2308 * semantics.c (finish_id_expression): Expand hack_identifier
2311 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2313 * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
2314 semantics.c typeck.c: Remove unnecessary casts.
2316 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
2318 * cp-tree.h (hack_identifier): Remove.
2319 * method.c (hack_identifier): Remove.
2320 * semantics.c (finish_id_expression): Expand hack_identifier
2323 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
2325 * cp-tree.h (finish_non_static_data_member): Add object param.
2326 * method.c (hack_identifier): Adjust.
2327 * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
2328 again for a FIELD_DECL.
2329 * semantics.c (finish_non_static_data_member): Add object
2330 parameter. Always save the DECL in the COMPONENT_REF.
2331 * call.c (resolve_scoped_fn_name): Adjust.
2333 2003-07-17 Zack Weinberg <zack@codesourcery.com>
2335 * pt.c (get_bindings): Make definition consistent with
2336 forward declaration.
2338 2003-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2341 * friend.c (add_friend): Check access for member functions
2344 2003-07-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
2347 * typeck.c (build_class_member_access_expr): Improve diagnostic.
2349 2003-07-16 Mark Mitchell <mark@codesourcery.com>
2352 * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
2354 (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
2355 * decl.c (duplicate_decls): Merge
2356 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2357 * parser.c (cp_parser_postfix_expression): Adjust call to
2358 cp_parser_initializer_list and
2359 cp_parser_parenthesized_expression_list.
2360 (cp_parser_parenthesized_expression_list): Add non_constant_p.
2361 (cp_parser_new_placement): Adjust call to
2362 cp_parser_parenthesized_expression_list.
2363 (cp_parser_direct_new_declarator): Likewise.
2364 (cp_parser_conditional_expression): Remove.
2365 (cp_parser_constant_expression): Parse an assignment-expression,
2366 not a conditional-expression.
2367 (cp_parser_simple_declaration): Resolve expression/declaration
2368 ambiguity more quickly.
2369 (cp_parser_mem_initializer): Adjust call to
2370 cp_parser_parenthesized_expression_list.
2371 (cp_parser_init_declarator): Keep track of whether or not the
2372 initializer is a constant-expression.
2373 (cp_parser_initializer): Add non_constant_p parameter.
2374 (cp_parser_initializer_clause): Likewise.
2375 (cp_parser_initializer_list): Likewise.
2376 (cp_parser_attribute_list): Adjust call to
2377 cp_parser_parenthesized_expression_list.
2378 (cp_parser_functional_cast): Likewise.
2379 * pt.c (tsubst_decl): Copy
2380 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2381 (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
2382 * semantics.c (finish_id_expression): Use
2383 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2385 2003-07-16 Neil Booth <neil@daikokuya.co.uk>
2387 * lang-options.h: Remove.
2389 2003-07-16 Andrew Pinski <pinskia@physics.uc.edu>
2392 * class.c (field_decl_cmp): Remove.
2393 (resort_field_decl_cmp): Remove.
2394 (resort_sorted_fields): Remove.
2395 (add_fields_to_vec): Rename to ...
2396 (add_fields_to_record_type): this.
2397 (finish_struct_1): Change to be using
2398 sorted_fields_type's fields.
2399 * cp-tree.h (lang_decl): In lang_decl_u3
2400 change sorted_fields to be a pointer to
2402 (resort_sorted_fields): Remove prototype.
2403 * search.c (lookup_field_1): Change to be using
2404 sorted_fields_type's fields.
2406 2003-07-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2409 * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
2410 is a member of other class.
2411 * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
2412 is a specialization of function template.
2414 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
2417 * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
2420 2003-07-15 Mark Mitchell <mark@codesourcery.com>
2422 * cp-tree.def (LOOKUP_EXPR): Remove.
2423 * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
2424 (LOOKUP_EXPR_GLOBAL): Remove.
2425 (get_bindings): Remove.
2426 (is_aggr_type_2): Remove.
2427 * call.c (resolved_scoped_fn_name): Remove support for
2429 * decl.c (grokfndecl): Likewise.
2430 (grokdeclarator): Likewise.
2431 * error.c (dump_decl): Likewise.
2432 (dump_expr): Likewise.
2433 * friend.c (do_friend): Likewise.
2434 * init.c (build_offset_ref): Likewise.
2435 * lex.c (unqualified_fn_lookup_error): Use pedwarn. Do not create
2437 * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
2438 * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
2440 * pt.c (get_bindings): Give it internal linkage.
2441 (check_explicit_specialization): Remove support for LOOKUP_EXPR.
2442 (lookup_template_function): Likewise.
2443 (for_each_tempalte_parm_r): Likewise.
2444 (tsubst_decl): Likewise.
2445 (tsubst_qualified_id): Handle template template parameters.
2446 (tsubst_copy): Remove support for LOOKUP_EXPR.
2447 (tsubst_copy_and_build): Likewise.
2448 (most_general_template): Likewise.
2449 (value_dependent_expression_p): Likewise.
2450 (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
2452 * semantics.c (perform_koenig_lookup): Do not create
2454 (finish_fname): Likewise.
2455 (finish_id_expression): Likewise.
2456 * tree.c (is_aggr_type_2): Remove.
2458 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
2461 * typeck.c (check_return_expr): Fix thinko in diagnostic.
2463 2003-07-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2466 * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
2469 2003-07-14 Mark Mitchell <mark@codesourcery.com>
2472 * pt.c (dependent_scope_ref_p): New function.
2473 (value_dependent_expression_p): Use it.
2474 (type_dependent_expression_p): Likewise.
2476 * pt.c (tsubst_friend_function): Use reregister_specialization.
2479 * cp-tree.h (lookup_qualified_name): Adjust prototype.
2480 * decl.c (lookup_qualified_name): Add complain parameter. Adjust
2481 call to is_aggr_type.
2482 * parser.c (cp_parser_lookup_name): Adjust call to
2483 lookup_qualified_name.
2484 * pt.c (tsubst_qualified_id): Likewise.
2485 (tsubst_copy_and_build): Likewise.
2486 * semantics.c (finish_qualified_id_expr): Deal with erroneous
2489 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2492 * call.c (op_error): Properly format REALPART_EXPR and
2494 * error.c (dump_expr): Likewise.
2496 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2498 * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
2500 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2503 * call.c (initialize_reference): Improve diagnostic.
2505 2003-07-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2508 * pt.c (more_specialized_class): Add full_args parameter.
2509 (most_specialized_class): Adjust calls to more_specialized_class.
2510 * cp-tree.h (more_specialized_class): Adjust declaration.
2512 2003-07-14 Dan Nicolaescu <dann@ics.uci.edu>
2514 * lex.c (enum tree_node_kind): Delete.
2516 2003-07-13 Mark Mitchell <mark@codesourcery.com>
2519 * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
2520 (SET_DECL_SELF_REFERENCE_P): Likewise.
2521 * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
2522 * pt.c (tsubst_decl): Copy it.
2523 * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
2525 * pt.c (reregister_specialization): Fix thinko in previous change.
2527 * cp-tree.h (cp_id_kind): New type.
2528 (unqualified_name_lookup_error): Change prototype.
2529 (unqualified_fn_lookup_error): New function.
2530 (do_identifier): Remove.
2531 (do_scoped_id): Likewise.
2532 (tsubst_copy_and_build): Change prototype.
2533 (reregister_specialization): New function.
2534 (perform_koenig_lookup): Likewise.
2535 (finish_id_expression): Likewise.
2536 * call.c (build_method_call): Adjust call to
2537 unqualified_name_lookup_error.
2538 * decl.c (duplicate_decls): Use reregister_specialization.
2539 * lex.c (is_global): Remove.
2540 (unqualified_name_lookup_error): Return a value.
2541 (do_identifier): Remove.
2542 (do_scoped_id): Likewise.
2543 (identifier_typedecl_value): Remove.
2544 (unqualified_fn_lookup_error): New function.
2545 * parser.c (cp_parser_id_kind): Remove.
2546 (cp_parser_non_constant_id_expression): Remove.
2547 (cp_parser_primary_expression): Use finish_id_expression.
2548 (cp_parser_class_or_namespace_name): Use cp_id_kind, not
2550 (cp_parser_postfix_expression): Use perform_koenig_lookup.
2551 (cp_parser_template_argument): Use cp_id_kind.
2552 (cp_parser_fold_non_dependent_expr): Adjust call to
2553 tsubst_copy_and_build.
2554 * pt.c (unregister_specialization): Rename to ...
2555 (reregister_specialization): This.
2556 (tsubst_friend_function): Use it.
2557 (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
2558 (tsubst_qualified_id): Likewise.
2559 (tsubst_expr): Likewise.
2560 (tsubst_copy_and_build): Add function_p parameter. Use
2561 finish_id_expression. Introduce RECUR macro.
2562 (tsubst_non_call_postfix_expression): New function.
2563 (regenerate_decl_from_template): Use reregister_specialization.
2564 * semantics.c (perform_koenig_lookup): New function.
2565 (finish_id_expression): Likewise.
2567 2003-07-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2569 * pt.c (push_access_scope_real): Remove.
2570 (push_access_scope): Move code from push_access_scope_real.
2571 (pop_access_scope): Don't check for TEMPLATE_DECL.
2572 (instantiate_template): Defer access checking during template
2574 (regenerate_decl_from_template): Tidy.
2576 2003-07-11 Nathanael Nerode <neroden@gcc.gnu.org>
2579 * operators.def: Add definitions for __imag__, __real__.
2581 2003-07-11 Nathan Sidwell <nathan@codesourcery.com>
2584 * parser.c (cp_parser_expression_list): Rename to ...
2585 (cp_parser_parenthesized_expression_list): ... here. Add attribute
2586 parameter, parse the surounding parentheses.
2587 (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
2588 parameters. Return int.
2589 (cp_parser_skip_to_closing_parenthesis or comma): Remove.
2590 (cp_parser_postfix_expression): Adjust function call parsing.
2591 (cp_parser_new_placement): Adjust.
2592 (cp_parser_new_initializer): Likewise.
2593 (cp_parser_cast_expression): Likewise.
2594 (cp_parser_selection_statement): Likewise.
2595 (cp_parser_mem_initializer): Likewise.
2596 (cp_parser_asm_definition): Likewise.
2597 (cp_parser_init_declarator): Likewise.
2598 (cp_parser_declarator): Make
2599 cdtor_or_conv_p an int ptr.
2600 (cp_parser_direct_declarator): Likewise. Check for a parameter
2601 list on cdtors & conv functions.
2602 (cp_parser_initializer): Adjust.
2603 (cp_parser_member_declaration): Adjust.
2604 (cp_parser_attribute_list): Move code into
2605 cp_parser_parens_expression_list.
2606 (cp_parser_functional_cast): Adjust.
2607 * pt.c (type_dependent_expression_p): Erroneous expressions are
2610 2003-07-11 Geoffrey Keating <geoffk@apple.com>
2612 * decl.c (cp_finish_decl): Handle 'used' attribute.
2614 * cp-lang.c (c_reset_state): New dummy routine.
2615 * cp-tree.h (finish_file): Move prototype to c-common.h.
2616 * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
2618 2003-07-11 Mark Mitchell <mark@codesourcery.com>
2621 * pt.c (tsubst_qualified_id): Implement suggested resolution for
2623 (type_dependent_expression_p): Likewise.
2625 2003-07-10 Mark Mitchell <mark@codesourcery.com>
2627 * typeck.c (build_binary_op): Do not warn about signed
2628 vs. unsigned comparisons in the bodies of templates.
2631 * parser.c (cp_parser_postfix_expression): Check dependency of
2634 2003-07-09 Mark Mitchell <mark@codesourcery.com>
2637 * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
2641 * error.c (decl_to_string): Do not print default argument
2644 * cp-tree.h (break_out_calls): Remove declaration.
2645 * tree.c (break_out_calls): Remove.
2646 * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
2648 2003-07-09 Nathan Sidwell <nathan@codesourcery.com>
2651 * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
2652 * decl2.c (constructor_name_p): Avoid repeated constructor_name
2654 * decl.c (grokdeclarator): Refactor ctor/dtor detection.
2656 2003-07-09 Mark Mitchell <mark@codesourcery.com>
2658 * typeck.c (build_x_unary_op): Take note of the fact that
2659 PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
2662 * parser.c (cp_parser_primary_expression): Preserve the form of
2663 qualified expressions in templates, even if they are not
2665 * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
2666 (tsubst_qualified_id): Likewise.
2667 * search.c (accessible_p): Treat everything in the body of a
2668 template as accessible.
2670 2003-07-08 Mark Mitchell <mark@codesourcery.com>
2672 * cp-tree.def (NON_DEPENDENT_EXPR): New node.
2673 * cp-tree.h (build_call_from_tree): Remove.
2674 (build_member_call): Likewise.
2675 (dependent_template_arg_p): Remove.
2676 (any_dependent_template_arguments_p): New function.
2677 (dependent_template_id_p): Likewise.
2678 (any_type_dependent_arguments_p): Likewise.
2679 (build_non_dependent_expr): Likewise.
2680 (build_non_dependent_args): Likewise.
2681 (build_x_compound_expr): Adjust prototype.
2682 * call.c (build_new_method_call): Handle non-dependent expressions
2684 * decl2.c (grok_array_decl): Likewise.
2685 (build_offset_ref_call_from_tree): Likewise.
2686 (build_call_from_tree): Remove.
2687 * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
2688 (dump_expr): Likewise.
2689 * init.c (build_member_call): Remove.
2690 * mangle.c (write_expression): Update handling for template-ids.
2691 * parser.c (cp_parser_primary_expression): Use
2692 any_dependent_template_arguments_p. Update constant-expression
2694 (cp_parser_postfix_expression): Use
2695 any_type_dependent_arguments_p. Simplify call processing.
2696 (cp_parser_unary_expression): Simplify.
2697 (cp_parser_expression): Adjust for changes to
2698 build_x_compound_expr.
2699 (cp_parser_template_argument): Implement standard-conforming
2700 parsing of non-type template arguments.
2701 (cp_parser_direct_declarator): Use
2702 cp_parser_fold_non_dependent_expr.
2703 (cp_parser_fold_non_dependent_expr): New function.
2704 (cp_parser_next_token_ends_template_argument_p): Likewise.
2705 * pt.c (convert_template_argument): Do not call
2706 maybe_fold_nontype_arg.
2707 (tsubst_baselink): Likewise.
2708 (tsubst_copy_and_build): Share common code. Make sizeof/alignof
2709 processing work correctly for non-dependent expressions. Adjust
2710 handling of COMPOUND_EXPR. Simplify call processing.
2711 (value_dependent_expression_p): Deal with functional casts and
2712 sizeof/alignof correctly.
2713 (type_dependent_expression_p): Handle overloaded functions.
2714 (any_type_dependent_arguments_p): New function.
2715 (any_dependent_template_arguments_p): Likewise.
2716 (dependent_template_p): Treat SCOPE_REFs as dependent.
2717 (dependent_template_id_p): Simplify.
2718 (build_non_dependent_expr): New function.
2719 (build_non_dependent_args): Likewise.
2720 * semantics.c (finish_stmt_expr): Don't make dependent
2721 statement-expresions have void type.
2722 (finish_call_expr): Handle non-dependent expressions
2724 * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
2725 * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
2726 type size_t, even in templates.
2727 (expr_sizeof): Likewise.
2728 (finish_class_member_access_expr): Handle non-dependent expressions
2730 (build_x_indirect_ref): Likewise.
2731 (build_x_binary_op): Likewise.
2732 (build_x_unary_op): Likewise.
2733 (build_x_conditional_expr): Likewise.
2734 (build_x_compound_expr): Likewise.
2735 * typeck2.c (build_x_arrow): Likewise.
2737 2003-07-09 Jan Hubicka <jh@suse.cz>
2739 * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
2740 * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
2741 (start_function): Use DECL_ESTIMATED_INSNS.
2742 * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
2744 * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
2747 2003-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2750 * pt.c (instantiate_class_template): Don't call xref_tag to
2751 inject name when the friend class is a specialization.
2753 2003-07-07 Mark Mitchell <mark@codesourcery.com>
2755 * cp-tree.h (build_scoped_method_call): Remove.
2756 (lookup_qualified_name): Remove parameter.
2757 (tsubst_copy_and_build): Declare.
2758 (finish_qualified_object_call_expr): Remove.
2759 (check_accessibility_of_qualified_id): New function.
2760 (finish_qualified_id_expr): Likewise.
2761 (non_reference): Likewise.
2762 (build_expr_from-tree): Remove.
2763 * call.c (non_reference): Remove.
2764 (build_scoped_method_call): Likewise.
2765 (build_method_call): Use error_operand_p. Assert that we are not
2766 processing a template.
2767 (standard_conversion): Use non_reference.
2768 * class.c (build_vtbl_entry_ref): Likewise.
2769 (build_vtbl_ref_1): Likewise.
2770 * cvt.c (build_expr_type_conversion): Use non_reference.
2771 * decl.c (lookup_qualified_name): Remove flags parameter.
2772 (grok_op_properties): Use non_reference.
2773 * decl2.c (grok_array_decl): Likewise.
2774 (build_expr_from_tree): Remove.
2775 (build_offset_ref_call_from_tree): Update comment.
2776 * error.c (parm_to_string): Call reinit_global_formatting_buffer.
2777 * except.c (prepare_eh_types): Use non_reference.
2778 (can_convert_eh): Likewise.
2779 * init.c (build_dtor_call): Avoid using build_method_call.
2780 * mangle.c (write_template_param): Remove misleading comment.
2781 * method.c (locate_copy): Use non_reference.
2782 * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
2783 (cp_parser_primary_expression): Do not create SCOPE_REFs is
2784 non-dependent contexts.
2785 (cp_parser_postfix_expression): Use finish_qualified_id_expr.
2786 (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
2787 build_expr_from_tree.
2788 (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
2789 Use check_accessibility_of_qualified_id.
2790 * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
2791 build_expr_from_tree.
2792 (tsubst_baselink): New function.
2793 (tsubst_qualified_id): Likewise.
2794 (tsubst_copy): Use them. Remove support for METHOD_CALL_EXPR.
2795 (tsubst_expr): Adjust call to lookup_qualified_name.
2796 (tsubst_copy_and_build): Handle SCOPE_REFs specially. Adjust
2797 handling of CALL_EXPRs.
2798 (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
2799 * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
2800 * search.c (check_final_overrider): Likewise.
2801 * semantics.c (check_accessibility_of_qualified_id): New function.
2802 (finish_qualified_object_call_expr): Remove.
2803 * typeck.c (target_type): Use non_reference.
2804 (cxx_sizeof_or_alignof_type): Likewise.
2805 (dubious_conversion_warnings): Likewise.
2806 (convert_for_initialization): Likewise.
2807 (non_reference): New function.
2809 2003-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2811 * decl.c (print_binding_level, print_other_binding_stack,
2812 print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
2814 * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
2816 2003-07-07 Andreas Jaeger <aj@suse.de>
2818 * friend.c: Convert to ISO C90 prototypes.
2820 * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
2822 * cfns.h: Regenerate.
2824 * typeck.c: Convert remaining prototypes to ISO C90.
2825 * search.c: Likewise.
2827 * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
2828 * semantics.c (expand_or_defer_fn): Likewise
2829 * mangle.c (discriminator_for_string_literal): Likewise.
2830 * g++spec.c (lang_specific_driver): Likewise.
2832 * search.c (lookup_base_r): Remove unused variable.
2834 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
2836 * semantics.c: (genrtl_try_block) Adjust emit_line_note
2839 2003-07-07 Andreas Jaeger <aj@suse.de>
2841 * search.c (lookup_base_r): Remove unused variable.
2843 2003-07-06 Michael Chastain <mec@shout.net>
2846 * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
2847 assigning to input_filename directly.
2849 2003-07-06 Kazu Hirata <kazu@cs.umass.edu>
2851 * call.c: Fix comment formatting.
2852 * class.c: Likewise.
2853 * cp-tree.h: Likewise.
2855 * decl2.c: Likewise.
2856 * error.c: Likewise.
2857 * method.c: Likewise.
2858 * name-lookup.c: Likewise.
2859 * parser.c: Likewise.
2862 * search.c: Likewise.
2863 * typeck.c: Likewise.
2865 2003-07-06 Mark Mitchell <mark@codesourcery.com>
2868 * search.c (lookup_base_r): Remove is_non_public and
2869 within_current_scope parameters. Remove other dead code.
2870 (lookup_base): Adjust call to lookup_base_r.
2871 (adjust_result_of_qualified_name_lookup): Improve comment.
2872 * semantics.c (finish_call_expr): Use maybe_dummy_object.
2874 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
2876 * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
2877 LANG_HOOKS_MISSING_ARGUMENT): Override.
2879 2003-07-05 Mark Mitchell <mark@codesourcery.com>
2882 * typeck.c (build_static_cast): Check for reference conversions
2885 2003-07-04 Mark Mitchell <mark@codesourcery.com>
2887 * cp-tree.h (perform_integral_promotions): Declare.
2888 * call.c (build_addr_func): Use decay_conversion.
2889 (convert_arg_to_ellipsis): Likewise. Remove misleading comment.
2890 (convert_for_arg_passing): Use perform_integral_promotions.
2891 * cvt.c (build_expr_type_conversion): Use decay_conversion.
2892 (type_promotes_to): Do not return a cv-qualified type.
2893 * decl.c (grok_reference_init): Fix formatting.
2894 (get_atexit_node): Use decay_conversion.
2895 (build_enumerator): Use perform_integral_promotions.
2896 * init.c (build_vec_init): Use decay_conversion.
2897 * semantics.c (finish_expr_stmt): Likewise.
2898 (finish_switch_cond): Use perform_integral_promotions.
2899 * typeck.c (default_conversion): Likewise.
2900 (perform_integral_promotions): New function.
2901 (build_indirect_ref): Use decay_conversion.
2902 (build_array_ref): Use perform_integral_promotions.
2903 (convert_arguments): Use decay_conversion.
2904 (build_unary_op): Use perform_integral_promotions.
2905 (build_c_cast): Use decay_conversion.
2906 (build_modify_expr): Likewise.
2907 (convert_for_initialization): Likewise.
2908 * typeck2.c (build_x_arrow): Likewise.
2910 2003-07-04 Kazu Hirata <kazu@cs.umass.edu>
2912 * call.c: Fix comment typos.
2913 * class.c: Likewise.
2914 * cp-tree.h: Likewise.
2916 * decl2.c: Likewise.
2919 * mangle.c: Likewise.
2920 * parser.c: Likewise.
2922 * search.c: Likewise.
2923 * semantics.c: Likewise.
2925 * typeck.c: Likewise.
2927 2003-07-04 Zack Weinberg <zack@codesourcery.com>
2929 * parser.c (cp_lexer_read_token): No need to handle string
2930 constant concatenation.
2932 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2934 * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
2935 (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
2936 ATTRIBUTE_GCC_CXXDIAG.
2938 2003-07-03 Mark Mitchell <mark@codesourcery.com>
2940 * call.c (build_addr_func): Handle bound pointers-to-members.
2941 (build_method_call): Do not call resolve_offset_ref.
2942 (implicit_conversion): Likewise.
2943 (resolve_scoped_fn_name): Use finish_non_static_data_member, not
2945 (resolve_args): Do not call resolve_offset_ref.
2946 (build_conditional_expr): Likewise.
2947 (build_new_method_call): Likewise.
2948 * cp-tree.def (OFFSET_REF): Update documentation.
2949 * cvt.c (cp_convert_to_pointer): Update handling of conversions from
2950 pointers to members to pointers.
2951 (ocp_convert): Do not call resolve_offset_ref.
2952 (convert_to_void): Likewise.
2953 (build_expr_type_conversion): Likewise.
2954 * decl2.c (delete_sanity): Likewise.
2955 * init.c (resolve_offset_ref): Simplify greatly.
2956 (build_vec_delete): Do not call resolve_offset_ref.
2957 * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
2959 (cp_parser_unary_expression): Use
2960 cp_parser_simple_cast_expression.
2961 (cp_parser_delete_expression): Likewise.
2962 (cp_parser_cast_expression): Likewise.
2963 (cp_parser_pm_expression): Use cp_parser_binary_op.
2964 (cp_parser_simple_cast_expression): New function.
2965 * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
2966 * semantics.c (finish_increment_expr): Likewise.
2967 (finish_typeof): Likewise.
2968 * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
2969 * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
2970 (decay_conversion): Do not call resolve_offset_ref.
2971 (finish_class_member_access_expr): Likewise.
2972 (convert_arguments): Likewise.
2973 (build_x_binary_op): Handle DOTSTAR_EXPR.
2974 (condition_conversion): Do not call resolve_offset_ref.
2975 (unary_complex_lvalue): Likewise.
2976 (build_static_cast): Likewise.
2977 (build_reinterpret_cast): Likewise.
2978 (build_const_cast): Likewise.
2979 (build_c_cast): Likewise.
2980 (build_modify_expr): Likewise.
2981 (convert_for_assignment): Likewise.
2982 (convert_for_initialization): Likewise.
2983 * typeck2.c (build_x_arrow): Likewise.
2984 (build_m_component_ref): Simplify.
2986 * call.c (build_scoped_method_call): Use convert_to_void.
2987 (build_method_call): Likewise.
2988 * class.c (check_field_decls): Remove dead code.
2989 * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
2990 * decl2.c (grok_array_decl): Remove dead code.
2991 (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
2992 as pointer-to-member representation.
2993 * init.c (build_offset_ref): Tidy.
2994 (build_vec_delete_1): Use convert_to_void.
2995 * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
2996 as pointer-to-member representation.
2998 2003-07-03 Nathan Sidwell <nathan@codesourcery.com>
3001 * decl.c (grokdeclarator): Return friend decls, not
3003 * decl2.c (grokfield): Alter friend decl check.
3004 * parser.c (struct cp_parser): Document default_arg chain on
3005 unparsed_functions_queue.
3006 (cp_parser_save_default_args): New.
3007 (cp_parser_init_declarator, cp_parser_function_definition,
3008 cp_parser_member_declaration): Call it.
3009 (cp_parser_class_specifier): Remove unused variable. Alter
3010 processing of unparsed_functions_queue.
3012 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3014 * class.c (add_method, check_field_decl): Fix format specifier.
3015 * decl.c (duplicate_decls, pushdecl, check_goto,
3016 fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
3017 start_enum): Likewise.
3018 * decl2.c (ambiguous_decl): Likewise.
3019 * pt.c (redeclare_class_template): Likewise.
3021 2003-07-02 Nathan Sidwell <nathan@codesourcery.com>
3024 * pt.c (type_unification_real): Don't unify exprs of error type.
3025 * tree.c (error_type): Don't die on error_type.
3028 * decl2.c (arg_assoc_class): Don't die on NULL type.
3029 * typeck.c (type_unknown_p): Don't die on untyped expressions.
3031 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3034 * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
3037 2003-07-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3039 * error.c (locate_error): %P takes an `int', not a `tree'.
3041 2003-07-02 Jan Hubicka <jh@suse.cz>
3043 * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
3044 (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
3045 clear DECL_DEFER_OUTPUT once function is processed; avoid flags
3048 * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
3049 (expand_or_defer_fn): Declare.
3050 (lower_function): Declare.
3051 * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
3052 * decl2.c: Include cgraph.h and varpool.h
3053 (maybe_emit_vtables): Make explicit instantations as needed.
3054 (mark_member_pointers, lower_function): New functions.
3055 (finish_file): Do unit-at-a-time.
3056 * method.c (synthesize_method): Use expand_or_defer_fn.
3057 * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
3058 * parser.c (cp_parser_function_definition_after_decl): Use
3060 * pt.c (instantiate_decl): Likewise.
3061 * semantics.c: Include cgraph.h
3062 (expand_or_defer_fn): Break out from ...
3063 (expand_body): ... here; deal with unit-at-a-time.
3064 * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
3065 LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
3067 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3069 * call.c (resolve_scoped_fn_name): Return error_mark_node for
3072 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3075 * call.c (resolve_scoped_fn_name): Check that the qualifying scope
3078 2003-07-01 Giovanni Bajo <giovannibajo@libero.it>
3081 * error.c (dump_decl): Handle BIT_NOT_EXPR as
3082 pseudo destructor calls.
3084 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
3086 * cp-tree.h (define_label): Replace filename and lineno
3087 arguments with a location_t.
3088 * decl.c (pop_label): Adjust define_label call.
3089 (define_label): Replace filename and lineno arguments with a
3091 * semantics.c (finish_label): Adjust define_label call.
3093 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3096 * decl2.c (grokfield): Do not build NOP_EXPRs around the
3099 2003-06-30 Neil Booth <neil@daikokuya.co.uk>
3101 * Make-lang.in: Update.
3102 * cp-lang.c (c_language): Define.
3103 (LANG_HOOKS_INIT_OPTIONS): Use common hook.
3104 * cp-tree.h (cxx_init_options): Remove.
3105 * lex.c: Don't include diagnostic.h.
3106 (cxx_init_options): Remove.
3108 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3111 * error.c (dump_expr): Support correctly the COMPOUND_EXPR
3112 tree generated within a template. Use dump_expr to dump an
3115 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3117 * mangle.c (write_expression): Exit gracefully when trying to
3120 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3123 * parser.c (cp_parser_primary_expression): A VAR_DECL with a
3124 (value- or type-) dependent expression as DECL_INITIAL is a
3125 valid constant-expression (at parser time).
3127 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3130 * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
3131 USING_DECL, instead of print_tree_identifier.
3133 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3135 * cp-tree.h (language_to_string): Adjust declaration.
3136 * dump.c (cp_dump_tree): Adjust usage.
3137 * error.c (dump_char): Use output_formatted_scalar. Tidy.
3138 (parm_to_string): Lose unused parameter. Tidy.
3139 (expr_to_string): Likewise.
3140 (code_to_string): Likewise.
3141 (language_to_string): Likewise.
3142 (op_to_string): Likewise.
3143 (assop_to_string): Likewise.
3144 (digit_buffer): Remove.
3145 (dump_type): Format builtin vector type as __vector__.
3147 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3149 * error.c (print_integer): Remove.
3150 (dump_type_suffix): Adjust.
3151 (dump_expr): Likewise.
3153 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
3155 * error.c (print_instantiation_partial_context): Take a
3157 (print_instantiation_full_context): Adjust.
3158 (print_instantiation_context): Adjust.
3160 * cp-tree.h (cp_line_of, cp_file_of): Remove.
3161 * error.c (cp_line_of, cp_file_of): Merge into ...
3162 (location_of): ... here. Make static, return a location_t.
3163 (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
3165 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
3168 * call.c (joust): Move warn_conversion check outwards.
3170 2003-06-27 Zack Weinberg <zack@codesourcery.com>
3172 * decl.c (build_typename_type)
3173 * mangle.c (write_template_template_arg)
3174 * parser.c (cp_parser_scope_through_which_access_occurs)
3175 * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
3176 * repo.c (get_base_filename)
3177 * semantics.c (maybe_convert_cond):
3178 Mark the definition static, matching the forward declaration.
3180 2003-06-27 Mark Mitchell <mark@codesourcery.com>
3183 * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
3185 2003-06-27 Mark Mitchell <mark@codesourcery.com>
3188 * decl.c (finish_enum): Implement DR377.
3190 * decl.c (cp_finish_decl): Don't make variables with reference
3191 type readonly while they are being initialized.
3193 2003-06-26 Mark Mitchell <mark@codesourcery.com>
3196 * typeck.c (build_static_cast): Avoid returning expressions with
3199 2003-06-26 Nathan Sidwell <nathan@codesourcery.com>
3201 * call.c (build_op_delete_call): Use strip_array_call. Correct
3202 error message to say 'delete' or 'delete[]'.
3204 2003-06-26 Giovanni Bajo <giovannibajo@libero.it>
3207 * pt.c (check_explicit_specialization): When looking up a
3208 template function from an identifier outside class-scope, bind
3209 it to CP_DECL_CONTEXT.
3211 2003-06-25 Mark Mitchell <mark@codesourcery.com>
3214 * search.c (lookup_base_r): Rely on accessible_p, rather than
3215 trying to emulate that logic here.
3218 * call.c (convert_like): Pass issue_conversion_warnings.
3219 (convert_like_with_context): Likewise.
3220 (convert_like_real): Add issue_conversion_warnings parameter.
3221 (perform_direct_initialization_if_possible): New function.
3222 * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
3223 * typeck.c (check_for_casting_away_constness): New function.
3224 (build_static_cast): Rewrite.
3226 2003-06-24 Nathan Sidwell <nathan@codesourcery.com>
3228 * call.c (enforce_access): Assert we get a binfo.
3229 (build_op_delete_call): Pass a binfo to
3230 perform_or_defer_access_check.
3231 * class.c (alter_access): Likewise.
3232 * decl.c (make_typename_type): Likewise.
3233 (make_unbound_class_template): Likewise.
3234 * lex.c (do_identifier): Likewise.
3235 * method.c (hack_identifier): Likewise.
3236 * parser.c (cp_parser_lookup_name): Likewise.
3237 * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
3239 * semantics.c (finish_non_static_data_member): Likewise.
3240 (perform_or_defer_access_check): Expect a binfo.
3241 * typeck.c (comptypes): Expect types.
3243 * mangle.c (find_substitution): Don't pass a non-type to same_type_p
3244 * friend.c (make_friend_class): Likewise.
3245 * pt.c (check_default_tmpl_args): Likewise.
3246 (lookup_template_class): Likewise.
3248 2003-06-24 Jan Hubicka <jh@suse.cz>
3250 * method.c (thunk_labelno): Move outside ifdef block to make garbage
3253 2003-06-24 Jan Hubicka <jh@suse.cz>
3255 * class.c (build_vtable): Make vtables.
3256 * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
3257 * decl2.c (output_vtable_inherit): Rename to ...
3258 (prepare_assemble_variable): ... this one; change interface.
3259 (maybe_emit_vtables): Do not call output_vtable_inherit.
3260 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
3261 * cp-tree.h (prepare_assemble_variable): New.
3263 2003-06-23 Andrew Pinski <pinskia@physics.uc.edu>
3265 * method.c: add prototype for make_alias_for_thunk.
3266 (thunk_labelno, make_alias_for_thunk): only define
3267 if ASM_OUTPUT_DEF is defined.
3269 2003-06-23 Jakub Jelinek <jakub@redhat.com>
3271 * method.c (thunk_labelno): New variable.
3272 (make_alias_for_thunk): New function.
3273 (use_thunk): Use it if defined ASM_OUTPUT_DEF. Put the thunk
3274 into the same section as the function it is calling.
3275 Include gt-cp-method.h.
3276 * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
3277 (cp/method.o): Depend on gt-cp-method.h.
3278 * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
3280 2003-06-23 Jan Hubicka <jh@suse.cz>
3282 * decl.c (register_dtor_fn): Mark cleanup as used.
3283 * decl2.c (mark_vtable_entries): Skip nops.
3284 * rtti.c (get_tinfo_ptr): Mark tinfo as used.
3285 (build_dynamic_cast_1): Likewise.
3286 (tinfo_base_init): Likewise.
3287 (emit_tinfo_decl): Likewise.
3289 2003-06-23 Jakub Jelinek <jakub@redhat.com>
3291 * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
3294 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3297 * call.c (joust): Warn about choosing conversion sequence only if
3300 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3303 * call.c (op_error): Tidy.
3304 * error.c (dump_expr): Properly format 'T()' when T is an
3307 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3310 * decl.c (grok_op_properties): Warn possible confusing conversion
3311 only if -Wconversion.
3313 2003-06-20 Mark Mitchell <mark@codesourcery.com>
3316 * parser.c (cp_parser_class_head): See through dependent names
3317 when parsing a class-head.
3320 * pt.c (try_class_unification): Correct handling of member class
3323 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
3325 * semantics.c (genrtl_finish_function): Adjust
3326 expand_function_end call.
3328 2003-06-19 Mark Mitchell <mark@codesourcery.com>
3331 * pt.c (tsubst_decl): Do not try to substitute into non-dependent
3333 (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
3336 * cp-tree.h (pushdecl_class_level): Change prototype.
3337 (push_class_level_binding): Likewise.
3338 * decl.c (add_binding): Reject duplicate static data members.
3339 (pushdecl_class_level): Return a value indicating whether or not
3340 the binding was valid.
3341 (push_class_level_binding): Likewise.
3342 * semantics.c (finish_member_declaration): Don't keep invalid
3346 * call.c (initialize_reference): Do not use cp_finish_decl to emit
3347 temporary variables.
3348 * cp-tree.h (static_aggregates): Declare.
3349 (pushdecl_top_level_and_finish): Likewise.
3350 * decl.c (pushdecl_top_level_1): New function.
3351 (pushdecl_top_level): Use it.
3352 (pushdecl_top_level_and_finish): New function.
3353 (initialize_local_var): Remove redundant code.
3354 (cp_finish_decl): Remove support for RESULT_DECLs. Don't check
3356 * decl.h (static_aggregates): Remove.
3357 * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
3358 * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
3359 (tinfo_base_init): Likewise.
3361 2003-06-19 Matt Austern <austern@apple.com>
3364 * init.c (build_zero_init): Assert that number of array elements
3365 is an integer constant.
3366 (build_default_init) Don't use build_zero_init for arrays with
3367 variable number of elements.
3369 2003-06-19 Andreas Jaeger <aj@suse.de>
3371 * cp-tree.h: Remove duplicated declarations.
3373 2003-06-18 Nathanael Nerode <neroden@gcc.gnu.org>
3375 * pt.c: Convert to ISO C.
3376 * semantics.c: Convert to ISO C.
3378 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
3380 * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
3381 at_least_as_qualified_p, more_qualified_p): Return bool.
3382 * typeck.c: ANSIFY function definitions.
3383 (comp_array_types): Take redeclaration bool parameter.
3384 (comptypes): Rearrange STRICT handling.
3385 (at_least_as_qualified_p, more_qualified_p,
3386 comp_cv_qualification): Cache cv quals.
3387 (compparms): Rearrange loop.
3389 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
3391 * cp-tree.h (COMPARE_RELAXED): Rename to ...
3392 (COMPARE_DERIVED): ... here. Adjust comment.
3393 (resolve_typename_type_in_current_instantiation): Remove.
3394 (cp_tree_equal, comptypes): Return a bool.
3395 * cvt.c (convert_to_reference): Adjust comptypes call.
3396 * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
3397 (resolve_typename_type_in_current_instantiation): Remove.
3398 * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
3399 IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
3400 calls. Refactor code.
3401 * typeck.c (comp_array_types): Return bool. Lose callback.
3402 parameter. Adjust cp_tree_equal calls.
3403 (comptypes): Return bool. Adjust strict handling. Remove relaxed
3404 enumeration and java type handling. Deal with typename types here.
3405 Adjust recursive and cp_tree_equals calls. Adjust base and derived
3407 (comp_target_types): Remove unreachable code. Adjust
3408 same_or_base_type_p calls.
3409 (ptr_reasonably_similar): Adjust base and derived check.
3411 * typeck.c (maybe_warn_about_returning_address_of_local): Remove
3413 (check_return_expr): Adjust error messages.
3414 * cp-tree.def (SCOPE_REF): Correct comment.
3416 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3418 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3421 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
3423 * optimize.c (dump_function): Form complete flag name by
3424 prefixing 'fdump-' to string returned by dump_flag_name().
3426 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3428 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3431 2003-06-17 Jason Merrill <jason@redhat.com>
3434 * decl.c (grokfndecl): Don't mark a function inline for
3435 -finline-functions if it isn't defined.
3437 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3440 * class.c (handle_using_decl): Robustify.
3443 * cp-tree.h (DECL_CONV_FN_TYPE): New method.
3444 * mangle.c (struct globals): Remove internal_mangling_p.
3445 (write_unqualified_name): Use DECL_CONV_FN_TYPE.
3446 (write_template_parm): Don't write out the level number.
3447 (conv_type_names): New variable.
3448 (hash_type): New function.
3449 (compare_type): Likewise.
3450 (mangle_conv_op_name_for_type): Don't try to mangle conversion
3452 * search.c (lookup_conversion_operator): New function.
3453 (lookup_fnfields_1): Use it.
3455 2003-06-17 Andreas Jaeger <aj@suse.de>
3457 * except.c: Remove duplicate declaration of push_eh_cleanup.
3459 * call.c: Remove extra declaration of inhibit_warnings.
3461 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
3463 2003-06-16 Jens-Michael Hoffmann <jensmh@gmx.de>
3464 * mangle.c: Convert to ISO C.
3466 2003-06-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3468 * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
3471 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
3473 * tree.c: Convert to ISO C.
3475 2003-06-16 Kazu Hirata <kazu@cs.umass.edu>
3477 * cp-tree.h: Follow spelling conventions.
3478 * mangle.c: Likewise.
3479 * method.c: Likewise.
3480 * parser.c: Likewise.
3482 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
3484 * decl.c (start_function): Adjust init_function_start call.
3485 * method.c (use_thunk): Likewise.
3486 * semantics.c (genrtl_start_function): Likewise.
3488 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
3490 * Make-lang.in: Remove c-options.o.
3492 2003-06-13 Nathanael Nerode <neroden@gcc.gnu.org>
3494 * lex.c: Convert to ISO C.
3496 2003-05-19 Jens-Michael Hoffmann <jensmh@gmx.de>
3497 * init.c: removes use of PARAMS macro. Use ISO style function
3498 declarations. (Not copyright-significant change.)
3500 * rtti.c: Remove PARAMS.
3502 * typeck2.c: Convert to ISO C.
3504 2003-06-12 Mark Mitchell <mark@codesourcery.com>
3507 * typeck.c (build_c_cast): Check that the destination type is
3510 2003-06-11 Mark Mitchell <mark@codesourcery.com>
3513 * cp-tree.h (finish_declarator): Remove.
3514 * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
3515 erroneous declarations.
3516 * semantics.c (finish_declarator): Remove.
3518 2003-06-11 Roger Sayle <roger@eyesopen.com>
3520 * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
3521 global static constructor/destructor if it will be empty, i.e.
3522 either doesn't call any ctors/dtors or only calls pure or const
3525 2003-06-11 Mark Mitchell <mark@codesourcery.com>
3527 * mangle.c (tm_p.h): Include it.
3528 * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
3531 * tree.c (cp_cannot_inline_fn): Check for "inline" before
3534 2003-06-10 Jason Merrill <jason@redhat.com>
3537 * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
3539 2003-06-10 Andrew Pinski <pinskia@physics.uc.edu>
3541 * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
3542 (start_cleanup_cnt): New.
3544 2003-06-10 Mark Mitchell <mark@codesourcery.com>
3547 * cp-tree.h (template_for_substitution): Declare.
3548 * decl2.c (mark_used): Use it when figuring out whether or not a
3550 * pt.c (template_for_substitution): Give it external linkage.
3551 * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
3554 2003-06-09 Zack Weinberg <zack@codesourcery.com>
3557 * mangle.c (write_real_cst): New function. Implement
3558 ABI-compliant mangling of floating-point literals when
3559 -fabi-version>=2; provide backward compatibility with 3.3 when
3560 -fabi-version=1 (with warning). Clarify commentary.
3561 (write_template_arg_literal): Use write_real_cst.
3563 2003-06-07 Andreas Jaeger <aj@suse.de>
3565 * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
3567 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
3569 * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
3570 (LANG_HOOKS_HANDLE_OPTION): Override.
3571 * cp-tree.h (cxx_init_options): Update.
3572 * lex.c (cxx_init_options): Update.
3574 2003-06-05 Jan Hubicka <jh@suse.cz>
3576 * Make-lang.in: Add support for stageprofile and stagefeedback
3578 2003-06-04 J"orn Rennecke <joern.rennecke@superh.com>
3580 * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
3582 2003-06-04 Andreas Jaeger <aj@suse.de>
3584 * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
3586 2003-06-03 Jason Merrill <jason@redhat.com>
3588 * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
3590 * cp/decl.c (reshape_init): Handle vectors.
3592 * testsuite/g++.dg/init/array10.C: New.
3594 2003-06-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3597 * pt.c (check_explicit_specialization): Check for 'static'
3600 2003-05-31 Diego Novillo <dnovillo@redhat.com>
3602 * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
3603 the operand of a CONSTRUCTOR node.
3605 2003-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
3607 * decl.c (cp_binding_level::this_entity): Rename from this_class.
3608 (cxx_scope_descriptor): New function.
3609 (cxx_scope_debug): Likewise.
3610 (push_binding_level): Use it.
3611 (pop_binding_level): Likewise.
3612 (suspend_binding_level): Likewise.
3613 (resume_binding_level): Likewise.
3614 (pushlevel_class): Adjust use of this_class.
3615 (pushtag): Likewise.
3616 (lookup_name_real): Likewise.
3617 (global_scope_name): New variable.
3618 (initialize_predefined_identifiers): Initialize it.
3619 (push_namespace): Use it.
3620 (make_cxx_scope): New function.
3621 (pushlevel): Use it.
3622 (pushlevel_class): Likewise.
3623 (push_binding_level): Simplify. Loose the last two arguments.
3624 (make_binding_level): Remove.
3625 (initial_push__namespace_scope): New function.
3626 (push_namespace): Use it. Simplify.
3627 (cxx_init_decl_processing): Likewise.
3628 (declare_namespace_level): Remove.
3630 2003-05-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3633 * pt.c (instantiate_decl): Don't use full template arguments if
3634 we are dealing with specializations.
3636 2003-05-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3638 * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
3639 (binding_depth): Unconditionally define.
3640 (is_class_level): Likewise.
3641 (indent): Likewise. Take an indenting parameter.
3642 (push_binding_level): Remove conditional definittion.
3643 (pop_binding_level): Likewise.
3644 (suspend_binding_level): Likewise.
3645 (resume_binding_level): Likewise.
3646 (pushlevel): Likewise.
3647 (pushlevel_class): Likewise.
3648 (poplevel_class): Likewise.
3649 (pop_everything): Likewise.
3651 2003-05-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
3653 * name-lookup.h (global_scope_p): New macro.
3654 * decl.c (pop_binding_level): Use it. Don't refer directly to
3655 global_binding_level.
3656 (suspend_binding_level): Likewise.
3657 (global_bindings_p): Likewise.
3658 (print_other_binding_stack): Likewise.
3659 (print_binding_stack): Likewise.
3660 (maybe_push_to_top_level): Likewise.
3661 (pushdecl_namespace_level): Likewise.
3662 (cxx_init_decl_processing): Likewise.
3663 (start_decl): Likewise.
3664 (cp_finish_decl): Likewise.
3665 (start_function): Likewise.
3666 (global_binding_level): Remove.
3668 2003-05-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3670 * parser.c (cp_parser_explicit_instantiation): Restore old
3671 access before template instantiation.
3673 2003-05-23 Geoffrey Keating <geoffk@apple.com>
3675 * lang-specs.h: Use -o to specify preprocessor's output file.
3676 Make -no-integrated-cpp work when building PCH files.
3678 2003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3681 * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
3682 check for implicitly created typedef to an enum.
3684 2003-05-21 Jason Merrill <jason@redhat.com>
3686 * init.c (build_vec_delete): Copy the address into a temporary
3687 variable before calling build_vec_delete_1.
3688 * decl2.c (delete_sanity): Don't call stabilize_reference.
3690 2003-05-21 Nathan Sidwell <nathan@codesourcery.com>
3692 * pt.c (register_specialization): Update the decl's location,
3694 (check_explicit_specialization): Likewise.
3696 2003-05-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3698 * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
3700 2003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
3703 * decl.c (duplicate_decls): Re-invoke make_decl_rtl
3704 if the old decl had instantiated DECL_RTL.
3705 (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
3707 2003-05-19 Matt Austern <austern@apple.com>
3709 * lang-options.h: Document -Wno-invalid-offsetof
3710 * typeck.c (build_class_member_access_expr): Don't complain about
3711 (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
3713 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
3715 * name-lookup.c (free_binding_entry): fix where the GTY markers are.
3716 (binding_entry_make): Make entry->chain NULL after getting an entry.
3717 fix the spelling of chain in a comment.
3718 (binding_table_free): speed up by having temporary variable.
3719 (binding_table_new): set table->chain to be NULL after allocating
3721 (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
3722 binding->previous to NULL after getting an binding for speed.
3724 2003-05-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
3726 * cp-tree.h (struct lang_type_class): Replace data member tags
3727 with hash-table nested_udts.
3728 (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
3729 * class.c (unreverse_member_declarations): Don't touch
3731 (pushclass): Use cxx_remember_type_decls.
3732 * decl.c (struct cp_binding_level): Replace data member tags with
3733 hash-table type_decls.
3734 (pop_binding_level): Handle level->type_decls.
3735 (kept_level_p): Adjust.
3736 (poplevel): Remove unused local variable.
3737 (bt_print_entry): New function.
3738 (print_binding_level): Use it.
3739 (push_namespace): Build current_binding_level->type_decls.
3740 (maybe_process_template_type_declaration): Adjust.
3741 (pushtag): Likewise.
3742 (clear_anon_tags): Use binding_table_remove_anonymous_types.
3744 (cxx_remember_type_decls): Rename from storetags. Adjust.
3745 (lookup_tag): Use binding_table_find_anon_type. Tidy.
3746 (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
3747 (cxx_init_decl_processing): Build global_binding_level->type_decls.
3748 (store_parm_decls): Remove pointless code.
3749 * name-lookup.c (free_binding_entry): New variable.
3750 (ENTRY_INDEX): New macro.
3751 (struct binding_table_s): New datatype.
3752 (binding_entry_make): New function.
3753 (binding_entry_free): Likewise.
3754 (binding_table_construct): Likewise.
3755 (binding_table_free): Likewise.
3756 (binding_table_new): Likewise.
3757 (binding_table_expand): Likewise.
3758 (binding_table_insert): Likewise.
3759 (binding_table_find): Likewise.
3760 (binding_table_find_anon_type): Likewise.
3761 (binding_table_reverse_maybe_remap): Likewise.
3762 (binding_table_remove_anonymous_types): Likewise.
3763 (binding_table_foreach): Likewise.
3764 * name-lookup.h (binding_table): New type.
3765 (binding_entry): Likewise.
3766 (bt_foreach_proc): Likewise.
3767 (struct binding_entry_s): New datatype.
3768 (SCOPE_DEFAULT_HT_SIZE): New macro.
3769 (CLASS_SCOPE_HT_SIZE): Likewise.
3770 (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
3771 (NAMESPACE_STD_HT_SIZE): Likewise.
3772 (GLOBAL_SCOPE_HT_SIZE): Likewise.
3773 (binding_table_new): Declare.
3774 (binding_table_free): Likewise.
3775 (binding_table_insert): Likewise.
3776 (binding_table_find_anon_type): Likewise.
3777 (binding_table_reverse_maybe_remap): Likewise.
3778 (binding_table_remove_anonymous_types): Likewise.
3779 (binding_table_foreach): Likewise.
3780 (binding_table_find): Likewise.
3781 (cxx_remember_type_decls): Likewise.
3782 * pt.c (bt_instantiate_type_proc): New function.
3783 (do_type_instantiation): Use it.
3784 * search.c (lookup_field_r): Use binding_table_find.
3786 2003-05-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3788 * semantics.c (perform_deferred_access_checks): Don't discard
3791 2003-05-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3793 * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
3794 libiberty VA_ macros, always use stdarg.
3795 * rtti.c (create_pseudo_type_info): Likewise.
3796 * tree.c (build_min_nt, build_min): Likewise.
3798 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3800 * ptree.c (cxx_print_type, cxx_print_xnode): Use string
3801 concatentation on HOST_WIDE_INT_PRINT_* format specifier to
3802 collapse multiple function calls into one.
3803 * tree.c (debug_binfo): Likewise.
3805 2003-05-15 Jason Merrill <jason@redhat.com>
3808 * call.c (conditional_conversion): Don't consider implicit
3809 conversions if T2 is a base of T1.
3810 * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
3811 (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
3813 * parser.c (cp_parser_primary_expression): Convert a static data
3814 member from reference.
3816 2003-05-15 Mark Mitchell <mark@codesourcery.com>
3818 * call.c (build_op_delete_call): Avoid creating unnecessary types.
3819 * class.c (instantiate_type): Remove tests for tf_no_attributes.
3820 * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
3821 (COMPARE_NO_ATTRIBUTES): Remove.
3822 * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
3825 * semantics.c (finish_typeof): Refine type-dependency check.
3827 2003-05-13 Jason Merrill <jason@redhat.com>
3829 * typeck.c (build_modify_expr): Don't always stabilize the lhs and
3830 rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
3832 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3834 * method.c (synthesize_method): Call push/pop_deferring_access_checks.
3836 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3838 PR c++/10230, c++/10481
3839 * semantics.c (finish_non_static_data_member): Handle when the
3840 non-static member is not from a base of the current class type.
3842 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3845 * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
3846 template and has dependent context.
3848 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3850 * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
3852 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3855 * cp-tree.h (saved_scope): Remove check_access field.
3856 (tsubst_flags_t): Remove tf_parsing.
3857 * decl.c (maybe_push_to_top_level): Don't initialize
3858 scope_chain->check_access.
3859 (make_typename_type, make_unbound_class_template): Don't use
3861 (register_dtor_fn): Use push/pop_deferring_access_checks
3862 instead of scope_chain->check_access.
3863 * method.c (use_thunk): Likewise.
3864 * parser.c (cp_parser_explicit_instantiation
3865 (cp_parser_constructor_declarator_p): Don't call
3866 push/pop_deferring_access_checks here.
3867 (cp_parser_template_argument, cp_parser_class_name): Don't use
3869 (yyparse): Check flag_access_control.
3870 * pt.c (instantiate_class_template): Call
3871 push/pop_deferring_access_checks.
3872 * semantics.c (push_deferring_access_checks): Propagate
3874 (perform_or_defer_access_check): Make sure basetype_path is
3875 a type before comparison.
3876 * call.c (build_op_delete_call, build_over_call): Use
3877 perform_or_defer_access_check.
3878 * class.c (alter_access): Likewise.
3879 * init.c (build_offset_ref): Likewise.
3880 * lex.c (do_identifier): Likewise.
3881 * method.c (hack_identifier): Likewise.
3882 * search.c (lookup_member): Likewise.
3883 * semantics.c (finish_non_static_data_member): Likewise.
3884 (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
3885 instead of flag_access_control.
3887 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3890 * parser.c (cp_parser_class_name): Remove check_access parameter.
3891 All caller adjusted. Update declaration.
3892 (cp_parser_lookup_name): Likewise.
3893 * semantics.c (push_deferring_access_checks): Change parameter type
3894 to enum deferring_kind. All caller adjusted.
3895 (resume_deferring_access_checks): Adjust to use new enum.
3896 (stop_deferring_access_checks): Likewise.
3897 (perform_or_defer_access_check): Likewise.
3898 * cp-tree.h (deferring_kind): New enum.
3899 (deferred_access): Adjust field type.
3900 (push_deferring_access_checks): Update declaration.
3902 2003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3904 PR c++/10555, c++/10576
3905 * pt.c (lookup_template_class): Handle class template with
3906 multiple levels of parameters when one of the levels contain
3909 2003-05-08 Jason Merrill <jason@redhat.com>
3911 * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
3912 expression. Undo some of the recent reorg.
3914 2003-05-07 Richard Henderson <rth@redhat.com>
3917 * cfns.gperf: Comment out POSIX thread cancellation points,
3918 plus abort and raise.
3919 * cfns.h: Regenerate.
3921 2003-05-07 Jason Merrill <jason@redhat.com>
3923 * call.c (build_conditional_expr): Don't assume that the folded
3924 expression has result_type.
3926 2003-05-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3928 * typeck.c (build_unary_op): Deal with const qualifier in
3929 invalid pointer-to-member earlier.
3931 2003-05-05 Jason Merrill <jason@redhat.com>
3934 * call.c (conditional_conversion): Build an RVALUE_CONV if
3935 we're just changing the cv-quals.
3936 (build_conditional_expr): Don't call convert to change
3939 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3942 * typeck.c (build_unary_op): Don't output const qualifier when
3943 output invalid pointer-to-member diagnostics.
3945 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3947 * decl.c: Fix typos.
3949 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3952 * decl.c (start_function): Use same_type_p to check return type
3955 2003-05-03 Zack Weinberg <zack@codesourcery.com>
3958 * cp/typeck.c (build_x_compound_expr): No need to check
3959 extra_warnings as well as warn_unused_value.
3961 2003-05-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3963 PR c++/9364, c++/10553, c++/10586
3964 * decl.c (make_typename_type): Don't crash on illegal code.
3966 2003-05-03 Nathan Sidwell <nathan@codesourcery.com>
3968 * class.c (finish_struct): Use location_t and input_location
3970 * decl.c (make_label_decl): Likewise.
3971 (use_label): Likewise.
3972 * decl2.c (warn_if_unknown_interface): Likewise.
3973 (start_static_initialization_or_destruction): Likewise.
3974 (generate_ctor_or_dtor_function): Likewise.
3975 (finish_file): Likewise.
3976 * error.c (print_instantiation_full_context): Likewise.
3977 * init.c (create_temporary_var): Likewise.
3978 * method.c (synthesize_method): Likewise.
3979 * parser.c (cp_token): Likewise.
3980 (cp_lexer_set_source_position_from_token): Likewise.
3981 (cp_lexer_get_preprocessor_token): Likewise.
3982 (cp_parser_statement): Likewise.
3983 * pt.c (tsubst_friend_function): Likewise.
3984 (instantiate_class_template): Likewise.
3985 (tsubst_decl): Likewise.
3987 (instantiate_decl): Likewise.
3988 * semantics.c (begin_class_definition): Likewise.
3989 (expand_body): Likewise.
3991 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
3993 * class.c (finish_struct): Rename lineno to input_line.
3994 * decl.c (push_binding_level, pop_binding_level,
3995 suspend_binding_level, resume_binding_level, make_label_decl,
3996 use_label, start_function): Likewise.
3997 * decl2.c (warn_if_unknown_interface,
3998 start_static_initialization_or_destruction,
3999 generate_ctor_or_dtor_function, finish_file): Likewise.
4000 * error.c (cp_line_of, print_instantiation_full_context,
4001 print_instantiation_context): Likewise.
4002 * except.c (check_handlers_1, check_handlers): Likewise.
4003 * init.c (create_temporary_var): Likewise.
4004 * method.c (use_thunk, synthesize_method): Likewise.
4005 * parser.c (cp_lexer_set_source_position_from_token,
4006 cp_lexer_get_preprocessor_token): Likewise.
4007 * pt.c (push_tinst_level, pop_tinst_level,
4008 tsubst_friend_function, instantiate_class_template, tsubst_decl,
4009 tsubst, tsubst_expr, instantiate_decl): Likewise.
4010 * semantics.c (genrtl_try_block, finish_label_stmt,
4011 begin_class_definition, expand_body,
4012 genrtl_finish_function): Likewise.
4013 * tree.c (build_min_nt, build_min): Likewise.
4015 2003-05-01 Mark Mitchell <mark@codesourcery.com>
4017 * decl2.c (comdat_linkage): Don't externalize explicit
4020 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4023 * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
4026 2003-05-01 Steven Bosscher <steven@gcc.gnu.org>
4028 * cp-tree.h (struct lang_id2): Remove. Move fields from here...
4029 (struct lang_identifier): ... to here.
4030 (LANG_ID_FIELD): Remove.
4031 (SET_LANG_ID): Remove.
4032 (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
4033 (SET_IDENTIFIER_LABEL_VALUE): Likewise.
4034 (IDENTIFIER_IMPLICIT_DECL): Likewise.
4035 (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
4036 (IDENTIFIER_ERROR_LOCUS): Likewise.
4037 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
4039 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4042 * pt.c (convert_template_argument): Correct diagnostic.
4044 2003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4046 PR c++/9432, c++/9528
4047 * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
4049 2003-04-30 Garbiel Dos Reis <gcc@integrable-solutions.net>
4051 * decl.c (check_previous_goto_1): Adjust prototype.
4052 (check_previous_goto): Adjust use.
4053 (check_switch_goto): Likewise.
4054 (use_label): Adjust.
4055 (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
4056 (struct named_label_use_list): Use location_t datatype.
4058 2003-04-29 Mark Mitchell <mark@codesourcery.com>
4061 * pt.c (mark_decl_instantiated): Defer all explicit instantiations
4062 that have not yet been written out.
4064 2003-04-29 Mark Mitchell <mark@codesourcery.com>
4067 * class.c (layout_class_type): Mark overlong bitfields as having
4068 the maximum size permitted by their type, after layout.
4071 * error.c (dump_expr): Correctly handling of NEW_EXPR.4
4073 2003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4075 * call.c (build_operator_new_call): Fix typo.
4076 * lang-options.h: Likewise.
4078 2003-04-29 Mark Mitchell <mark@codesourcery.com>
4081 * cp-tree.h (lookup_field_1): Declare it.
4082 * search.c (lookup_field_1): Make it public.
4083 * decl.c (reshape_init): Handle designated initializers.
4085 * decl.c (maybe_commonize_var): Further tweak support for systems
4086 without weak symbols.
4088 2003-04-27 Mark Mitchell <mark@codesourcery.com>
4090 * decl.c (maybe_commonize_var): Fix thinko in last patch.
4092 2003-04-27 Mark Mitchell <mark@codesourcery.com>
4095 * method.c (use_thunk): Decrement immediate_size_expand.
4098 * cp-tree.h (DECL_VAR_MARKED_P): New macro.
4099 (DECL_MAYBE_TEMPLATE): Remove.
4100 * class.c (fixed_type_or_null): Avoid infinite recursion.
4102 * decl.c (maybe_commonize_var): Make the code match the comments.
4103 * pt.c (instantiate_decl): Move call to import_export_decl.
4105 2003-04-26 Mark Mitchell <mark@codesourcery.com>
4107 * decl2.c (finish_file): Fix merge botch.
4109 2003-04-25 Mark Mitchell <mark@codesourcery.com>
4111 * decl2.c (finish_file): Don't call import_export_decl for
4112 functions that are not defined.
4113 (handle_class_head): Robustify.
4114 * pt.c (instantiate_decl): Do not call cp_finish_decl for
4115 variables that are not defined.
4117 2003-04-24 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
4119 * call.c (print_z_candidates): Fix off by one error.
4121 2003-04-24 Nathan Sidwell <nathan@codesourcery.com>
4124 * call.c (joust): Don't warn about conversion ops that are exact
4125 or cv-conversions. Rearrange to avoid multiple type comparisons.
4127 2003-04-23 Mark Mitchell <mark@codesourcery.com>
4130 * call.c (build_cxx_call): Robustify.
4132 2003-04-23 Neil Booth <neil@daikokuya.co.uk>
4134 * Make-lang.in (lex.o): Remove mbchar.h.
4135 * lex.c (MULTIBYTE_CHARS): Lose.
4136 * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
4139 2003-04-23 Mark Mitchell <mark@codesourcery.com>
4142 * cp-tree.h (duplicate_tag_error): Remove.
4143 * class.c (duplicate_tag_error): Remove.
4144 * semantics.c (begin_class_definition): Return immediately for a
4145 duplicate class definition.
4148 * decl.c (grokdeclarator): Correct logic for "mutable" errors.
4150 2003-04-22 Mark Mitchell <mark@codesourcery.com>
4153 * search.c (lookup_fnfields_1): Handle empty slots in the method
4157 * decl.c (check_elaborated_type_specifier): New function, split
4159 (xref_tag): ... here. Use the new function in more places.
4161 * rtti.c (throw_bad_typeid): Use build_cxx_call.
4163 2003-04-21 Mark Mitchell <mark@codesourcery.com>
4165 * call.c (build_over_call): Use build_cxx_call.
4166 (build_cxx_call): New method, split out of build_over_call.
4167 * cp-tree.h (language_function): Add can_throw.
4168 (build_cxx_call): Declare it.
4169 * decl.c (finish_function): If a function does not contain any
4170 calls to functions that can throw an exception, indicate that
4172 * decl2.c (mark_used): Do not defer the instantiation of
4173 functions, if the current function does not throw.
4174 * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
4175 * pt.c (instantiate_decl): Make sure import_export_decl is called
4176 before emitting things.
4177 * rtti.c (throw_bad_cast): Use build_cxx_call.
4178 (build_dynamic_cast_1): Likewise.
4179 * typeck.c (build_function_call): Likewise.
4181 2003-04-21 Nathan Sidwell <nathan@codesourcery.com>
4184 * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
4185 expressions. Reverts my 2002-08-08 patch.
4187 * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
4190 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
4192 * cp/decl2.c (start_static_storage_duration_function): Take count
4193 arg, don't check if it wraps round.
4194 (generate_ctor_or_dtor_function): Add locus arg, use it.
4195 (generate_ctor_and_dtor_functions_for_priority): Data arg is a
4197 (finish_file): Set line numbers to past EOF for synthesized
4200 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
4203 * search.c (lookup_field_1): Final scan goes backwards for
4204 types, forwards for non-types.
4206 2003-04-17 Roger Sayle <roger@eyesopen.com>
4209 * decl.c (duplicate_decls): Preserve "const", "noreturn" and
4210 "nothrow" function attributes.
4212 2003-04-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4215 * pt.c (type_dependent_expression_p): Handle array new.
4217 2003-04-15 Mark Mitchell <mark@codesourcery.com>
4220 * parser.c (cp_parser_primary_expression): Reorganize logic for
4221 dealing with name lookup failures.
4223 2003-04-15 Jason Merrill <jason@redhat.com>
4225 * decl2.c (mark_used): Don't instantiate anything if
4228 2003-04-14 Ziemowit Laski <zlaski@apple.com>
4230 * tree.c (build_cplus_array_type_1): Do not call
4231 uses_template_parms() on a NULL index_type.
4233 2003-04-13 Roger Sayle <roger@eyesopen.com>
4235 * decl.c (duplicate_decls): Preserve pure and malloc attributes.
4237 2003-04-12 Mark Mitchell <mark@codesourcery.com>
4240 * init.c (build_new_1): Reorganize.
4242 2003-04-12 Zack Weinberg <zack@codesourcery.com>
4244 * class.c (initialize_array)
4245 * decl.c (reshape_init)
4246 * decl2.c (build_expr_from_tree)
4247 * init.c (build_zero_init)
4248 * pt.c (tsubst_copy, tsubst_copy_and_build)
4249 * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
4250 (ptm_initializer, class_initializer, get_pseudo_ti_init)
4251 * semantics.c (finish_compound_literal)
4252 * typeck.c (build_ptrmemfunc1)
4253 * typeck2.c (store_init_value, process_init_constructor)
4254 (build_functional_cast): Use build_constructor.
4256 2003-04-12 Zack Weinberg <zack@codesourcery.com>
4258 * call.c (print_z_candidates): Use gcc_gettext_width, not
4259 strlen, to determine how much padding to use.
4261 2003-04-10 Zack Weinberg <zack@codesourcery.com>
4263 * decl.c: Update all calls to shadow_warning.
4265 2003-04-10 Mark Mitchell <mark@codesourcery.com>
4267 * class.c (layout_class_type): Correct handling for overlong
4268 bit-fields whose width is the same as an integer type.
4270 2003-04-06 Zack Weinberg <zack@codesourcery.com>
4272 * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
4273 * cp-lang.c (cp_tree_size): New function.
4274 (LANG_HOOKS_TREE_SIZE): Override.
4276 * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
4277 tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
4278 (union lang_tree_node): Remove common and srcloc members.
4279 (build_srcloc_here): Don't prototype.
4280 * decl.c (cp_tree_node_structure): Kill SRCLOC case.
4281 * pt.c (pending_templates): Correct comment.
4282 * tree.c (build_srcloc, build_srcloc_here): Kill.
4284 2003-04-06 Zack Weinberg <zack@codesourcery.com>
4286 * call.c: Include intl.h.
4287 (print_z_candidate): Always use inform; get rid of errfn
4288 argument. Reorganize so that all the strings get picked up
4289 by xgettext. Note obligation of caller to pass first argument
4291 (print_z_candidates): Update to match. Indent second and
4292 successive candidates by strlen() of translated message.
4293 (joust): Restructure ambiguous-conversion pedwarn so that
4294 translators see a complete sentence. Update calls to
4297 * Make-lang.in (cp/call.o): Update dependencies.
4299 2003-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4301 * decl.c (set_current_binding_level): Delete, revert last change.
4302 (current_binding_level): Modify to allow it as as lvalue.
4304 2003-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4306 * name-lookup.c (find_binding): Pass appropriate pointer type to
4307 POP_TIMEVAR_AND_RETURN.
4309 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4311 * Make-lang.in (cp-warn): Add $(STRICT_WARN).
4312 * cp-tree.h: Don't insist on having GNUC.
4314 2003-04-03 Jason Merrill <jason@redhat.com>
4316 * cvt.c (ocp_convert): Only abort if we try to convert an object
4317 of TREE_ADDRESSABLE type.
4319 * class.c (build_vtable): Set DECL_ALIGN here.
4320 (get_vtable_decl): Not here.
4321 (layout_vtable_decl): Or here.
4322 (create_vtable_ptr): Or here.
4323 (layout_class_type): Or here.
4324 (check_bitfield_decl): Don't mess with field alignment.
4326 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4328 * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
4329 DEF_ASSN_OPERATOR): Delete spurious semi-colon.
4330 * rtti.c (dfs_class_hint_mark): Likewise.
4332 * decl.c (push_local_name, push_class_level_binding,
4333 maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
4334 functions returning void.
4335 * decl2.c (add_using_namespace): Likewise.
4337 * decl.c (print_binding_level, print_other_binding_stack,
4338 print_binding_stack): Cast argument of %p specifier to void*.
4339 * ptree.c (cxx_print_decl): Likewise.
4341 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
4342 VAR_FUNCTION_OR_PARM_DECL_CHECK,
4343 VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
4344 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
4345 LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
4347 * decl.c (set_current_binding_level): New macro. Use throughout
4348 when setting the current binding level.
4350 * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
4352 * method.c (mangling_flags): Likewise.
4354 * cp-tree.h (lang_type_header): Add __extension__ and use
4355 CHAR_BITFIELD for members.
4357 2003-04-02 Geoffrey Keating <geoffk@apple.com>
4360 * mangle.c: Include gt-cp-mangle.h.
4361 (subst_identifiers): Mark with GTY.
4362 * config-lang.in (gtfiles): Add cp/mangle.c.
4363 * Make-lang.in: (gt-cp-mangle.h): New rule.
4364 (cp/mangle.o): Depends on gt-cp-mangle.h.
4366 2003-04-01 Andrew Pinski <pinskia@physics.uc.edu>
4368 * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
4369 after \$(srcdir)/cp/name-lookup.h.
4370 * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
4371 of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file.
4372 * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
4373 (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
4375 2003-03-31 Jason Merrill <jason@redhat.com>
4378 * class.c (check_field_decl): Don't set DECL_ALIGN.
4380 2003-03-30 Mark Mitchell <mark@codesourcery.com>
4383 * decl.c (grokdeclarator): Tidy, slightly.
4384 * search.c (lookup_field_1): Add want_type parameter.
4385 (lookup_field_r): Adjust call to lookup_field_1.
4387 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4389 * Make-lang.in (cp/name-lookup.o): Add more dependencies.
4391 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4393 * cp-tree.h (binding_for_name: Move to name-lookup.h Adjust
4395 (cxx_scope_find_binding_for_name): Likewise.
4396 * decl.c (find_binding: Move to name-lookup.c.
4397 (binding_for_name): Likewise.
4398 (cxx_scope_find_binding_for_name): Likewise.
4399 (BINDING_LEVEL): Remove.
4400 (push_binding): Tidy.
4401 (push_class_binding): Likewise.
4402 (pop_binding): Likewise.
4403 (poplevel): Likewise.
4404 (poplevel_class): Likewise.
4405 (set_identifier_type_value_with_scope): Likewise.
4406 (push_overloaded_decl): Likewise.
4407 (lookup_tag): Likewise.
4408 (unqualified_namespace_lookup): Likewise.
4409 (lookup_name_current_level): Likewise.
4410 (maybe_inject_for_scope_var): Likewise.
4411 (namespace_binding): Move to name-lookup.c.
4412 (set_namespace_binding): Likewise.
4413 * decl2.c (lookup_using_namespace): Tidy.
4414 (qualified_lookup_using_namespace): Likewise.
4415 (do_toplevel_using_decl): Likewise.
4416 * name-lookup.c: Include "timevar.h"
4417 * name-lookup.h (cxx_scope): Declare.
4418 (struct cxx_binding): Lose member "has_level". Adjust "scope"
4420 (BINDING_SCOPE): Adjust definition.
4421 (BINDING_HAS_LEVEL_P): Remove.
4423 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4425 * name-lookup.c: New file.
4426 * name-lookup.h: Likewise..
4427 * decl.c (push_binding): Adjust use cxx_binding_make.
4428 (free_bindings): Move to name-lookup.c
4429 (pop_binding): Use cxx_binding_free.
4430 (binding_for_name): Tidy.
4431 * cp-tree.h: Include "name-lookup.h"
4432 (cxx_binding_make): Move to name-lookup.h
4433 (cxx_binding_clear): Likewise.
4434 (struct cxx_binding): Likewise.
4435 (LOCAL_BINDING_P): Likewise.
4436 (INHERITED_VALUE_BINDING_P): Likewise.
4437 (BINDING_SCOPE): Likewise.
4438 (BINDING_HAS_LEVEL_P): Likewise.
4439 (BINDING_VALUE): Likewise.
4440 (BINDING_TYPE): Likewise.
4441 * config-lang.in (gtfiles): Add cp/name-lookup.h
4442 * Make-lang.in (cp/name-lookup.o): New rule.
4443 (CXX_OBJS): Add cp/name-lookup.o
4444 (CXX_TREE_H): Add cp/name-lookup.h
4446 2003-03-28 Jason Merrill <jason@redhat.com>
4449 * cvt.c (force_rvalue): New fn.
4450 * call.c (build_conditional_expr): Use it.
4451 * cp-tree.h: Declare it.
4453 2003-03-28 Mike Stump <mrs@apple.com>
4455 * error.c (dump_expr): Add 0x to printed hex numbers to make
4456 output match source code better.
4458 2003-03-28 Mark Mitchell <mark@codesourcery.com>
4461 * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
4464 * decl2.c (generate_ctor_or_dtor_function): Tolerate a
4465 non-existant ssdf_decls array.
4466 (finish_file): Call generator_ctor_or_dtor_function when there are
4467 static constructors or destructors and no other static
4470 2003-03-28 Nathan Sidwell <nathan@codesourcery.com>
4473 * decl2.c (finish_file): Don't warn about explicitly instantiated
4476 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
4479 * pt.c (lookup_template_class): Only check instantiated args if
4480 they do not contain template parameters.
4482 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
4485 * parser.c (cp_parser_function_definition): Set
4486 DECL_INITIALIZED_IN_CLASS for members.
4487 * pt.c (instantiate_decl): Only reduce the template args for
4488 friends that are not defined in class.
4490 2003-03-25 Jason Merrill <jason@redhat.com>
4492 * call.c (print_z_candidate): Change name of first arg to msgid.
4493 (joust): Add comment for translators.
4495 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
4497 PR c++/9898, PR c++/383, DR 322
4498 * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
4499 through reference types on both PARM and ARG.
4501 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
4504 * error.c (dump_expr) <BASELINK>: Use dump_expr.
4505 * pt.c (maybe_fold_nontype_args): New function.
4506 (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
4507 <TEMPLATE_ID_EXPR>: Break out folding code, call it.
4508 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
4509 maybe_fold_nontype_args.
4511 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
4514 * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
4516 2003-03-23 Mark Mitchell <mark@codesourcery.com>
4519 * typeck.c (cxx_mark_addressable): Adjust call to
4520 gen_mem_addressof or put_var_into_stack.
4522 2003-03-22 Nathan Sidwell <nathan@codesourcery.com>
4524 PR c++/9978, c++/9708
4525 * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
4526 * call.c (add_template_candidate_real): Adjust
4527 instantiate_template call.
4528 * class.c (resolve_address_of_overloaded_function): Likewise.
4529 * decl.c (build_enumerator): Set TREE_CONSTANT.
4530 * pt.c (check_instantiated_args): New.
4531 (push_inline_template_parms_recursive): Set TREE_CONSTANT,
4533 (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
4534 (reduce_template_parm_level): Likewise.
4535 (process_template_parm): Likewise.
4536 (check_explicit_specialization): Adjust instantiate_template call.
4537 (convert_template_argument): Don't check non-type argument here.
4538 (lookup_template_class): Check them here.
4539 (tsubst_friend_function): Adjust instantiate_template call.
4540 (instantiate_template): Add tsubst_flags parameter, use it. Check
4543 2003-03-21 Zack Weinberg <zack@codesourcery.com>
4545 * decl.c: Update calls to shadow_warning.
4547 2003-03-21 Nathan Sidwell <nathan@codesourcery.com>
4550 * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
4551 (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
4553 2003-03-20 Mark Mitchell <mark@codesourcery.com>
4555 * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
4557 * cp/pt.c (instantiate_class_template): Fix formatting.
4559 2003-03-14 Matt Austern <austern@apple.com>
4561 * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
4562 (unemitted_tinfo_decl_p): Remove.
4563 (emit_tinfo_decl): Change declaration to remove unused parameter.
4564 * decl2.c (finish_file): Change tinfo emission to loop through
4565 unemitted_tinfo_decls array instead of looping through all decls.
4566 * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
4567 unused second parameter.
4568 (init_rtti_processing): initialize unemitted_tinfo_decls varray.
4569 (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
4570 (emit_tinfo_decl): remove unused second parameter, add assertion
4571 that decl hasn't already been emitted.
4573 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
4575 * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
4576 type from 'int' to 'bool'. Replace 0 and 1 with true and false in
4579 2003-03-19 Jason Merrill <jason@redhat.com>
4581 PR c++/8316, c++/9315, c++/10136
4582 * call.c (print_z_candidate): Split out from...
4583 (print_z_candidiates): ...here.
4586 2003-03-17 Roger Sayle <roger@eyesopen.com>
4589 * decl.c (duplicate_decls): Use the new type when prototyping
4590 anticipated decls, even when the types match. This defines the
4591 exception list for the built-in function.
4593 2003-03-17 Jason Merrill <jason@redhat.com>
4596 * typeck.c (build_class_member_access_expr): Compare
4599 2003-03-17 Mark Mitchell <mark@codesourcery.com>
4602 * parser.c (cp_parser_declarator_id): Clear parser->scope.
4604 2003-03-16 Jason Merrill <jason@redhat.com>
4607 * decl.c (finish_function): Only allow the NRVO to use variables
4608 declared at function scope.
4610 2003-03-17 Andreas Jaeger <aj@suse.de>
4612 * Make-lang.in (cp/TAGS): Remove.
4614 2003-03-16 Nathan Sidwell <nathan@codesourcery.com>
4617 * cp-tree.h (struct language_function): Add in_base_initializer.
4618 (in_base_initializer): define it.
4619 (expand_member_init): Remove INIT param.
4620 * init.c (expand_member_init): Remove INIT param, return the member.
4621 (emit_mem_initializers): Set in_base_initializer.
4622 * class.c (build_base_path): Check in_base_initializer.
4623 * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
4624 * pt.c (tsubst_initializer_list): Likewise.
4626 2003-03-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
4628 * decl.c (binding_for_name): Fix initialization thinko.
4630 2003-03-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
4632 Compile-time improvement: 2/n.
4633 * cp-tree.h (struct cxx_binding): New datatype;
4634 (struct lang_identifier): Use it.
4635 (LOCAL_BINDING_P): Adjust definition.
4636 (INHERITED_VALUE_BINDING_P): Likewise.
4637 (BINDING_SCOPE): Likewise.
4638 (BINDING_HAS_LEVEL_P): Likewise.
4639 (BINDING_VALUE): Likewise.
4640 (BINDING_TYPE): Likewise.
4641 (IDENTIFIER_VALUE): Likewise.
4642 (struct tree_binding): Remove.
4643 (TS_CP_BINDING): Likewise.
4644 ((union lang_tree_node): Remove field "binding".
4645 (cxx_binding_clear): New macro.
4646 (binding_for_name): Adjust return type.
4647 (qualified_lookup_using_namespace): Adjust prototype.
4648 (lookup_using_namespace): Adjust prototype.
4649 (cxx_scope_find_binding_for_name): Declare.
4650 * cp-tree.def: Remove CPLUS_BINDING definition.
4651 * decl.c (push_binding): Adjust local variable type.
4652 (add_binding): Likewise.
4653 (push_class_binding): Likewise.
4654 (pop_binding): Likewise.
4655 (poplevel): Likewise.
4656 (poplevel_class): Likewise.
4657 (free_bindings): Adjust type.
4658 (find_binding): Adjust return type, add a third parameter. Remove
4659 non-useful assertion now that we use static typing.
4660 (cxx_scope_find_binding_for_name): New function.
4661 (binding_for_name): Use it. Adjust local variable type. Simplify.
4662 (namespace_binding): Simplify.
4663 (set_namespace_binding): Likewise.
4664 (set_identifier_type_value_with_scope): Adjust local variable type.
4665 (lookup_tag): Don't type-abuse of local variable 'old'.
4666 (lookup_namespace_name): Likewise. Allocate binding on stack.
4667 (select_decl): Adjust prototype.
4668 (unqualified_namespace_lookup): Allocate binding on stack.
4669 Don't type-abuse of local variable 'val'.
4670 (lookup_name_real): Likewise.
4671 (maybe_inject_for_scope_var): Adjust local variable type.
4672 (cp_tree_node_structure): Remove CPLUS_BINDING case label.
4673 (namespace_binding): Adjust logic, simplify.
4674 (BINDING_LEVEL): Adjust definition.
4675 (push_class_level_binding): Adjust local variable type.
4676 (struct cxx_saved_binding): Adjust field 'binding' type.
4677 * decl2.c (ambiguous_decl): Adjust prototype.
4678 (lookup_using_namespace): Adjust local variable type.
4679 (qualified_lookup_using_namespace): Catch type error and correct
4680 ensueing logic error.
4681 (do_nonmember_using_decl): Adjust local variable type. Allocate
4682 temporary cxx_binding on stack.
4683 (do_toplevel_using_decl): Adjust local variable type.
4684 * ptree.c (cxx_print_cxx_binding): New function.
4685 (cxx_print_identifier): Use it.
4686 (cxx_print_xnode): Delete CPLUS_BINDING case label.
4688 2003-03-15 Roger Sayle <roger@eyesopen.com>
4690 * tree.c (count_functions): Fix whitespace.
4692 2003-03-15 Neil Booth <neil@daikokuya.co.uk>
4694 * Make-lang.in: Update.
4696 2003-03-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4699 * pt.c (maybe_process_partial_specialization): Handle
4700 member class template when enclosing class template is
4701 explicit specialized.
4702 (most_general_template): Stop looking when DECL is already
4705 2003-03-13 Jason Merrill <jason@redhat.com>
4708 * search.c (lookup_conversions): Call complete_type here.
4709 * call.c (implicit_conversion): Not here.
4711 2003-03-13 Mark Mitchell <mark@codesourcery.com>
4713 * decl2.c (do_nonmember_using_decl): Correct handling of
4714 simultaneous type/non-type bindings.
4716 * call.c (initialize_reference): Remove bogus assertion.
4717 * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
4719 2003-03-12 Andrew Lewycky <andrew@mxc.ca>
4722 * expr.c (cxx_expand_expr): Return const0_rtx for throw
4725 2003-03-11 Mark Mitchell <mark@codesourcery.com>
4728 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4729 to merge old and new declarations.
4731 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
4734 * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
4735 (cp/g++.1): Build it from scratch in the build tree.
4736 (c++.install-man): Depend on it. Install it from the build tree.
4737 (c++.mostlyclean): Clean it.
4739 2003-03-11 Mark Mitchell <mark@codesourcery.com>
4742 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4743 to merge old and new declarations.
4746 * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
4748 2003-03-11 Jason Merrill <jason@redhat.com>
4751 * search.c (lookup_member): Fix handling of functions in a class
4754 2003-03-11 Mark Mitchell <mark@codesourcery.com>
4757 * call.c (convert_class_to_reference): Adjust usage of
4759 (any_viable): Remove.
4760 (splice_viable): Combine with any_viable.
4761 (print_z_candidates): Avoid printing duplicates.
4762 (build_user_type_conversion_1): Adjust usage of splice_viable.
4763 (build_new_function_call): Likewise.
4764 (build_operator_new_call): Likewise.
4765 (build_object_call): Likewise.
4766 (build_conditional_expr): Likewise.
4767 (build_new_op): Likewise.
4768 (build_new_method_call): Likewise.
4769 (joust): Remove spurious comment.
4770 * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
4771 * decl2.c (arg_assoc_class): Simplify.
4772 * friend.c (add_friend): Likewise.
4774 2003-03-11 Jason Merrill <jason@redhat.com>
4777 * decl2.c (check_classfn): A member template only matches a
4780 2003-03-11 Neil Booth <neil@daikokuya.co.uk>
4782 * Make-lang.in (CXX_C_OBJS): Update.
4783 * lang-specs.h: Don't define __GNUG__ here.
4785 2003-03-10 Mark Mitchell <mark@codesourcery.com>
4787 * call.c (perform_overload_resolution): New function.
4788 (build_new_function_call): Use it.
4789 (build_operator_new_call): Likewise.
4790 (add_candidates): Add explicit_targs and template_only parameters.
4791 (build_new_op): Adjust accordingly.
4792 * cp-tree.h (build_operator_new_call): New function.
4793 (build_function_call_real): Remove.
4794 (build_function_call_maybe): Likewise.
4795 * init.c (build_new_1): Use build_operator_new_call.
4796 * typeck.c (build_function_call_real): Rename to ...
4797 (build_function_call): ... this.
4799 2003-03-10 Devang Patel <dpatel@apple.com>
4802 * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
4804 2003-03-10 Jason Merrill <jason@redhat.com>
4807 * decl.c (push_using_directive): Push before recursing.
4809 PR c++/9868, c++/9524
4810 * call.c (resolve_scoped_fn_name): Handle the case of a function
4813 * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
4814 argument in the pointer-to-member case.
4816 2003-03-09 Mark Mitchell <mark@codesourcery.com>
4819 * cp-lang.c (cxx_get_alias_set): Use alias set zero for
4820 pointers to member functions.
4823 * decl.c (build_ptrmemfunc_type): Do not allow default arugments
4824 in pointer-to-member-function types.
4826 2003-03-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
4828 * expr.c (cplus_expand_constant): Use C90 prototype style.
4829 (cxx_expand_expr): Likewise.
4831 2003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4834 * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
4837 2003-03-08 Geoffrey Keating <geoffk@apple.com>
4839 * lang-specs.h (c++-header): Change .pch to .gch.
4841 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
4843 * cp-tree.h (cxx_init): Update prototype.
4844 * lex.c (cxx_init): Similarly.
4846 2003-03-08 Mark Mitchell <mark@codesourcery.com>
4849 * cp-tree.h (begin_mem_initializers): Remove.
4850 * parser.c (cp_parser_mem_initializer_list): Inline it here.
4851 Do not call finish_mem_initializers if not in a constructor.
4852 (cp_parser_class_head): Fix typo in error message.
4853 * semantics.c (begin_mem_initializers): Remove.
4854 * testsuite/g++.dg/parser/constructor1.C: New test.
4857 * call.c (add_function_candidate): Skip builtin fuctions that have
4858 not yet been declared.
4861 * init.c (build_new_1): Correct logic for determining whether or
4862 not to use an array cookie.
4865 * parser.c (cp_parser_postfix_expression): Call
4866 finish_non_static_data_member, even when processing_template_decl.
4869 * cp-tree.h (is_ancestor): New function.
4870 (handle_class_head): Change prototype.
4871 * decl2.c (is_namespace_ancestor): Rename to ...
4872 (namespace_anecestor): ... this.
4873 (set_decl_namespace): Adjust accordingly.
4874 (handle_class_head): Remove unnecessary parameters.
4875 * parser.c (cp_parser_class_head): Check that
4876 nested-name-specifiers are used appropriately.
4878 2003-03-07 Mark Mitchell <mark@codesourcery.com>
4880 * call.c (reference_binding): Remove REF_IS_VAR parameter.
4881 (implicit_conversion): Adjust call to reference_binding.
4882 (make_temporary_var_for_ref_to_type): Add TYPE parameter.
4883 (initialize_reference): Adjust handling for references bound to
4885 * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
4887 (real_non_cast_lvalue_p): New method.
4888 * cvt.c (build_up_reference): Adjust use of
4889 make_temporary_var_for_ref_to_temp.
4890 * tree.c (real_non_cast_lvalue_p): New method.
4892 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
4894 * except.c (init_exception_processing): Use C90 prototype style.
4895 (cp_protect_cleanup_actions): Likewise.
4896 (prepare_eh_type): Likewise.
4897 (build_eh_type_type): Likewise.
4898 (build_exc_ptr): Likewise.
4899 (do_begin_catch): Likewise.
4900 (dtor_nothrow): Likewise.
4901 (do_end_catch): Likewise.
4902 (push_eh_cleanup): Likewise.
4903 (decl_is_java_type): Likewise.
4904 (choose_personality_routine): Likewise.
4905 (initialize_handler_parm): Likewise.
4906 (expand_start_catch_block): Likewise.
4907 (expand_end_catch_block): Likewise.
4908 (begin_eh_spec_block): Likewise.
4909 (finish_eh_spec_block): Likewise.
4910 (do_allocate_exception): Likewise.
4911 (do_free_exception): Likewise.
4912 (wrap_cleanups_r): Likewise.
4913 (stabilize_throw_expr): Likewise.
4914 (build_throw): Likewise.
4915 (complete_ptr_ref_or_void_ptr_p): Likewise.
4916 (is_admissible_throw_operand): Likewise.
4917 (nothrow_libfn_p): Likewise.
4918 (can_convert_eh): Likewise.
4919 (check_handlers_1): Likewise.
4920 (check_handlers): Likewise.
4922 2003-03-06 Mark Mitchell <mark@codesourcery.com>
4924 * call.c (merge_conversion_sequences): New function.
4925 (build_conv): Set ICS_USER_FLAG for USER_CONVs.
4926 (convert_class_to_reference): Correct handling of second
4927 standard conversion sequence in a user-defined conversion
4929 (build_user_type_conversion_1): Use merge_conversion_sequences.
4930 * cp-tree.def: Add comments for CONV nodes.
4931 * rtti.c (get_tinfo_decl): Use build_address/build_nop.
4933 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
4935 * error.c (init_error): Use C90 prototype style.
4936 (dump_scope): Likewise.
4937 (dump_qualifiers): Likewise.
4938 (dump_template_argument): Likewise.
4939 (dump_template_argument_list): Likewise.
4940 (dump_template_parameter): Likewise.
4941 (dump_template_bindings): Likewise.
4942 (dump_type): Likewise.
4943 (dump_typename): Likewise.
4944 (class_key_or_enum): Likewise.
4945 (dump_aggr_type): Likewise.
4946 (dump_type_prefix): Likewise.
4947 (dump_type_suffix): Likewise.
4948 (dump_global_iord): Likewise.
4949 (dump_simple_decl): Likewise.
4950 (dump_decl): Likewise.
4951 (dump_template_decl): Likewise.
4952 (dump_function_decl): Likewise.
4953 (dump_parameters): Likewise.
4954 (dump_exception_spec): Likewise.
4955 (dump_function_name): Likewise.
4956 (dump_template_parms): Likewise.
4957 (dump_char): Likewise.
4958 (dump_expr_list): Likewise.
4959 (dump_expr): Likewise.
4960 (dump_binary_op): Likewise.
4961 (dump_unary_op): Likewise.
4962 (type_as_string): Likewise.
4963 (expr_as_string): Likewise.
4964 (decl_as_string): Likewise.
4965 (context_as_string): Likewise.
4966 (lang_decl_name): Likewise.
4967 (cp_file_of): Likewise.
4968 (cp_line_of): Likewise.
4969 (decl_to_string): Likewise.
4970 (expr_to_string): Likewise.
4971 (fndecl_to_string): Likewise.
4972 (code_to_string): Likewise.
4973 (language_to_string): Likewise.
4974 (parm_to_string): Likewise.
4975 (op_to_string): Likewise.
4976 (type_to_string): Likewise.
4977 (assop_to_string): Likewise.
4978 (args_to_string): Likewise.
4979 (cv_to_string): Likewise.
4980 (cxx_print_error_function): Likewise.
4981 (cp_diagnostic_starter): Likewise.
4982 (cp_diagnostic_finalizer): Likewise.
4983 (cp_print_error_function): Likewise.
4984 (function_category): Likewise.
4985 (print_instantiation_full_context): Likewise.
4986 (print_instantiation_partial_context): Likewise.
4987 (maybe_print_instantiation_context): Likewise.
4988 (print_instantiation_context): Likewise.
4989 (cp_printer): Likewise.
4990 (print_integer): Likewise.
4991 (print_non_consecutive_character): Likewise.
4992 (locate_error): Likewise.
4994 2003-03-06 Mark Mitchell <mark@codesourcery.com>
4997 * call.c (reference_binding): Add ref_is_var parameter.
4998 (implicit_conversion): Adjust call to reference_binding.
4999 (initialize_reference): Likewise.
5002 * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
5006 * class.c (get_basefndecls): Use lookup_fnfields_1.
5008 2003-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5011 * parser.c (cp_parser_type_parameter): Remove redundant `expect'
5013 (cp_parser_single_declaration): Likewise.
5015 2003-03-05 Jason Merrill <jason@redhat.com>
5018 * call.c (build_conditional_expr): Use convert rather than an
5021 2003-03-02 Matt Austern <austern@apple.com>
5023 * decl.c (cp_binding_level): Add static_decls varray member.
5024 (add_decl_to_level): Add static/inline namespace scope
5025 declarations to static_decls array.
5026 (wrapup_global_for_namespace): Pass static_decls only, instead of
5027 all decls, to wrapup_global_declarations/check_global_declarations.
5028 (push_namespace): Initialize static_decls for ordinary namespaces.
5029 (cxx_init_decl_processing): Initialize static_decls for global
5032 2003-03-05 Mark Mitchell <mark@codesourcery.com>
5034 * class.c (end_of_class): Correct thinko.
5036 2003-03-04 Nathanael Nerode <neroden@gcc.gnu.org>
5038 * config-lang.in: Replace ${libstdcxx_version} by its value.
5040 2003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5042 * cp-tree.h (cxx_saved_binding): Declare.
5043 (struct saved_scope): Adjust type of field 'old_binding'.
5044 * decl.c (cxx_saved_binding_make): New macro.
5045 (struct cxx_saved_binding): Define.
5046 (store_bindings): Adjust prototype. Use cxx_saved_binding to save
5048 (maybe_push_to_top_level): Adjust local variable type.
5049 (pop_from_top_level): Likewise.
5051 2003-03-04 Tom Tromey <tromey@redhat.com>
5053 * Make-lang.in (c++.tags): New target.
5055 2003-03-04 Neil Booth <neil@daikokuya.co.uk>
5057 * Make-lang.in: Update.
5059 2003-03-03 Jason Merrill <jason@redhat.com>
5061 * decl.c (finish_enum): Do set the type in a template. Simplify.
5062 * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
5064 2003-03-03 Mark Mitchell <mark@codesourcery.com>
5067 * call.c (convert_class_to_reference): Correct conversion
5069 (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
5070 (implicit_conversion): Adjust call to reference_binding.
5071 (add_candidate): Change type of candidates parameter.
5072 (add_function_candidate): Likewise.
5073 (add_conv_candidate): Likewise.
5074 (build_builtin_candidate): Likewise.
5075 (add_builtin_candidate): Likewise.
5076 (add_builtin_candidates): Likewise.
5077 (add_template_candidate_real): Likewise.
5078 (add_template_candidate): Likewise.
5079 (add_template_conv_candidate): Likewise.
5080 (build_user_type_conversion_1): Adjust accordingly.
5081 (build_object_call): Likewise.
5082 (build_conditional_expr): Likewise.
5083 (add_candidates): Likewise.
5084 (build_new_op): Likewise.
5085 (convert_like_real): Use USER_CONV_CAND. Use build_nop.
5086 (build_new_method_call): Adjust calls to add_function_candidate.
5087 (make_temporary_var_for_ref_to_temp): New function.
5088 (initialize_reference): Add decl parameter.
5089 * class.c (build_rtti_vtbl_entries): Use build_address and
5091 * cp-tree.h (initialize_reference): Change prototype.
5092 (make_temporary_var_for_ref_to_temp): New function.
5093 (build_type_conversion): Change prototype.
5094 (build_address): New function.
5095 (build_nop): Likewise.
5096 * cvt.c (cp_convert_to_pointer): Adjust call to
5097 build_type_conversion. Avoid indicating redundant NOP_EXPRs.
5099 (convert_to_pointer_force): Use build_nop.
5100 (build_up_reference): Use make_temporary_var_for_ref_to_temp.
5101 (convert_to_reference): Adjust call to build_type_conversion.
5102 (ocp_convert): Likewise.
5103 (build_type_conversion): Remove for_sure parameter.
5104 * decl.c (grok_reference_init): Use initialize_reference.
5105 * typeck.c (build_address): New function.
5106 (build_nop): Likewise.
5107 (build_unary_op): Use them.
5108 (build_ptrmemfunc): Tidy slightly.
5109 (convert_for_initialization): Adjust call to
5110 initialize_reference.
5111 * typeck2.c (store_init_value): Remove #if 0'd code.
5113 2003-03-03 Jason Merrill <jason@redhat.com>
5115 * decl.c (start_function): Clear DECL_NUM_STMTS.
5117 * class.c (get_vtable_decl): Use vtbl_type_node.
5118 (build_primary_vtable): Check for it.
5120 2003-03-02 Aldy Hernandez <aldyh@redhat.com>
5122 * decl.c (check_initializer): Check for vector_opaque_p.
5124 2003-03-02 Ashif Harji <asharji@uwaterloo.ca>
5126 * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
5127 invoke an external cpp during compilation.
5129 2003-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
5131 * decl.c (duplicate_decls): Convert use of warning_with_decl() to
5133 (start_decl): Likewise.
5134 (start_function): Likewise.
5136 2003-03-01 Neil Booth <neil@daikokuya.co.uk>
5138 * Make-lang.in (CXX_C_OBJS): Update.
5140 2003-02-28 Mark Mitchell <mark@codesourcery.com>
5143 * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
5146 2003-02-28 Aldy Hernandez <aldyh@redhat.com>
5148 * parser.c (cp_parser_init_declarator): Revert opaque
5149 vector_opaque_p change.
5150 Do not include target.h.
5152 2003-02-28 Mark Mitchell <mark@codesourcery.com>
5155 * cp-tree.h (build_zero_init): Add parameter.
5156 * decl.c (cp_finish_decl): Adjust call.
5157 * init.c (build_zero_init): Add nelts parameter. Adjust recursive
5159 (build_default_init): Add nelts parameter. Adjust calls to
5161 (build_new_1): Adjust call to build_default_init.
5162 * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
5164 2003-02-26 Devang Patel <dpatel@apple.com>
5166 * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
5167 required. Postpone enum setting for template decls.
5168 (build_enumerator): Delay copying value node until finish_enum
5169 (). Remove #if 0'ed code.
5170 * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
5171 (tsubst_copy): Add check for enum type.
5173 2003-02-25 Mark Mitchell <mark@codesourcery.com>
5176 * decl2.c (prune_vars_needing_no_initialization): Do not throw
5177 away initializations for DECL_EXTERNAL VAR_DECLs.
5178 (finish_file): Adjust accordingly.
5179 * pt.c (instantiate_decl): Do not defer VAR_DECLs.
5181 2003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
5183 * decl.c (add_binding): Time TV_NAME_LOOKUP.
5184 (push_class_binding): Likewise.
5185 (set_namespace_binding): Likewise.
5187 2003-02-24 Mark Mitchell <mark@codesourcery.com>
5190 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
5191 specializations back to the main template.
5192 * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
5193 * pt.c (resolve_typename_type): Likewise.
5195 2003-02-24 Jeffrey D. Oldham <oldham@codesourcery.com>
5198 * pt.c (tsubst_copy_and_build): For a templated function inside a
5199 scope, process template arguments.
5201 2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5204 * typeck2.c (abstract_virtuals_error): Don't check when
5205 TYPE is still template parameter dependent.
5207 2003-02-23 Mark Mitchell <mark@codesourcery.com>
5210 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
5211 * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
5212 * pt.c (instantiate_class_template): Don't try to instantiate
5214 (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
5216 2003-02-21 Mark Mitchell <mark@codesourcery.com>
5219 * decl.c (grokdeclarator): Do not allow parameters with variably
5222 2003-02-21 Nathan Sidwell <nathan@codesourcery.com>
5224 * search.c (grow_bfs_bases): Remove. Fold into ...
5225 (bfs_walk): ... here, fix fencepost error. Fix merge lossage
5228 2003-02-20 Mark Mitchell <mark@codesourcery.com>
5231 * mangle.c (mangle_conv_op_name_for_type): Issue an error message
5232 when the G++ 3.2 ABI prevents correct compilation.
5234 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
5236 Change base class access representation. Share virtual base
5238 * cp/call.c (build_special_member_call): Remove binfo_for_vbase
5240 * cp/class.c (build_base_path): Likewise.
5241 (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
5242 (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
5243 (make_new_vtable): Adjust.
5244 (force_canonical_binfo_r): Delete.
5245 (force_canonical_binfo): Delete.
5246 (mark_primary_virtual_base): Delete.
5247 (dfs_unshared_virtual_bases): Delete.
5248 (mark_primary_bases): Adjust.
5249 (maybe_warn_about_overly_private_class): Adjust.
5250 (dfs_base_derived_from): Delete.
5251 (base_derived_from): Follow the inheritance chain.
5252 (struct find_final_overrider_data): Add vpath member.
5253 (dfs_find_final_overrider): Adjust.
5254 (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
5255 (find_final_overrider): Adjust.
5256 (update_vtable_entry_for_fn): Adjust.
5257 (modify_all_vtables): Adjust.
5258 (walk_subobject_offsets): Adjust.
5259 (layout_nonempty_base_or_field): Adjust.
5260 (layout_empty_base): Remove last parameter. Adjust.
5261 (build_base_field): Adjust.
5262 (build_base_fields): Adjust.
5263 (propagate_binfo_offsets): Remove last parameter. Adjust.
5264 (dfs_set_offset_for_unshared_vbases): Delete.
5265 (layout_virtual_bases): Adjust.
5266 (finish_struct_1): Adjust.
5267 (init_class_processing): Don't init access nodes.
5268 (dfs_get_primary_binfo): Delete.
5269 (get_primary_binfo): Adjust.
5270 (dump_class_hierarchy_r): Remove most derived arg, add IGO
5272 (dump_class_hierarchy): Adjust.
5273 (finish_vtbls): Adjust.
5274 (get_original_base): Delete.
5275 (build_vtt_inits): Adjust.
5276 (dfs_build_secondary_vptr_vtt_inits): Adjust.
5277 (dfs_ctor_vtable_bases_queue_p): Adjust.
5278 (build_ctor_vtbl_group): Adjust.
5279 (dfs_accumulate_vtbl_inits): Adjust.
5280 (build_vtbl_initializer): Adjust.
5281 (build_vbase_offset_vtbl_entries): Adjust.
5282 (add_vcall_offset_vtbl_entries_1): Adjust.
5283 * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
5284 (access_*_node): Remove.
5285 (CANONICAL_BINFO): Delete.
5286 (BINFO_UNSHARED_MARKED): Remove.
5287 (BINFO_MARKED): Set LANG_FLAG_0 directly.
5288 (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
5289 (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
5290 (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
5292 (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
5293 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
5294 (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
5296 (BINFO_DEPENDENT_BASE_P): New.
5297 (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
5299 (markedp, unmarkedp): Adjust.
5300 (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
5301 dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
5302 find_vbase_instance, binfo_for_vbase): Delete.
5303 (copied_binfo, original_binfo): Declare.
5304 (finish_base_specifier): Add virtual_p arg.
5305 (unshare_base_binfos): Delete.
5306 (copy_base_binfos): Declare.
5307 (reverse_path): Delete.
5308 * cp/decl.c (xref_basetypes): Access and virtuality passed
5309 differently. Don't copy direct base binfos here. Call
5311 * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
5312 (initialize_vtbl_ptrs): Adjust.
5313 (expand_member_init): Adjust.
5314 * cp/parser.c (cp_parser_base_specifier): Adjust.
5315 * cp/pt.c (instantiate_class_template): Adjust.
5316 (get_template_base_recursive): Adjust.
5317 * cp/rtti.c (get_pseudo_ti_init): Adjust.
5318 (get_pseudo_ti_desc): Adjust.
5319 * cp/tree.c (unshare_base_binfos): Rename to ...
5320 (copy_base_binfos): ... here, reimplement.
5321 (make_binfo): Set BINFO_DEPENDENT_BASE_P.
5322 (reverse_path): Remove.
5323 * cp/typeck.c (get_delta_difference): Adjust error messages.
5324 * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
5325 * cp/search.c (lookup_base_r): Adjust.
5326 (dynamic_cast_base_recurse): Adjust.
5327 (canonical_binfo): Remove.
5328 (dfs_canonical_queue): Remove.
5329 (dfs_assert_unmarked_p): Remove.
5330 (assert_canonical_unmarked): Remove.
5331 (shared_marked_p, shared_unmarked_p): Remove.
5332 (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
5333 (dfs_access_in_type): Adjust.
5334 (access_in_type): Adjust.
5335 (dfs_accessible_queue_p): Adjust.
5336 (dfs_accessible_p): Adjust.
5337 (is_subobject_of_p_1, is_subobject_of_p): Remove.
5338 (struct lookup_field_info): Remove from_dep_base_p field.
5339 (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
5340 (lookup_field_r): Remove dependent base code.
5341 (lookup_member): Likewise.
5342 (dfs_walk, dfs_walk_real): Add access arg to queue fn.
5343 (dfs_unmarked_real_bases_queue_p): Remove.
5344 (dfs_marked_real_bases_queue_p): Remove.
5345 (dfs_skip_vbases): Remove.
5346 (dfs_get_pure_virtuals): Adjust.
5347 (markedp, unmarkedp): Adjust.
5348 (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
5349 (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
5350 (dfs_unmark): Adjust.
5351 (dfs_get_vbase_types):Remove.
5352 (dfs_build_inheritance_graph_order): Remove.
5353 (get_vbase_types): Remove
5354 (dfs_find_vbase_instance): Remove.
5355 (find_vbase_instance): Remove.
5356 (dfs_debug_unmarkedp): Adjust.
5357 (dependent_base_p): Remove.
5358 (dfs_push_type_decls): Adjust.
5359 (dfs_push_decls): Adjust.
5360 (dfs_no_overlap_yet): Adjust.
5361 (copied_binfo): New function.
5362 (original_binfo): New function.
5363 (binfo_for_vbase): Remove.
5365 2003-02-18 Zack Weinberg <zack@codesourcery.com>
5367 * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
5368 (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
5371 2003-02-18 Mark Mitchell <mark@codesourcery.com>
5374 * class.c (layout_class_type): In the 3.2 ABI, take into account
5375 trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
5377 2003-02-18 Matt Austern <austern@apple.com>
5379 * cp/cp-lang.c: Change lang hooks so that final_write_globals does
5381 * cp/decl.c (wrapup_globals_for_namespace): Remove special
5382 handling of global namespace.
5384 2003-02-18 Geoffrey Keating <geoffk@apple.com>
5386 * cp-tree.h (rid_to_yy): Delete.
5387 (C_RID_YYCODE): Delete.
5388 (finish_file): Delete redundant declaration.
5390 2003-02-18 Jason Merrill <jason@redhat.com>
5393 * decl.c (reshape_init): Don't mess with initializer labels.
5396 * parser.c (cp_parser_postfix_expression): Set idk properly for
5397 object->scope::member.
5399 2003-02-18 Ben Elliston <bje@redhat.com>
5402 * decl.c (duplicate_decls): Fix typo in comment.
5404 2003-02-17 Michael Elizabeth Chastain <mec@shout.net>
5407 * class.c (build_base_field): Mark fields for base classes with
5410 2003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5413 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
5414 CONSTRUCTOR_ELTS only once.
5416 2003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5419 * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
5420 (dump_type_suffix): Likewise.
5422 2003-02-14 Nathan Sidwell <nathan@codesourcery.com>
5424 * search.c: ANSIfy function declarations and definitions.
5425 * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
5426 * call.c (build_method_call, resolve_scoped_fn_name,
5427 build_java_interface_fn_ref): Adjust lookup_field, lookup_member
5429 * class.c (handle_using_decl): Likewise.
5430 * decl.c (make_typename_type, make_unmound_class_template,
5431 start_decl, compute_array_index_type): Likewise.
5432 * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
5433 * init.c (expand_member_init, build_member_call): Likewise.
5434 * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
5435 resolve_typename_type): Likewise.
5436 * typeck.c (lookup_destructor, finish_class_member_access_exprm
5437 build_prememfunc_access_expr): Likewise.
5439 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
5441 * decl2.c: Include "timevar.h".
5442 (namespace_ancestor): Time name lookup.
5443 (add_using_namespace): Likewise.
5444 (lookup_using_namespace): Likewise.
5445 (qualified_lookup_using_namespace): Likewise.
5446 (decl_namespace): Likewise.
5447 (lookup_arg_dependent): Likewise.
5448 * lex.c (do_identifier): Likewise.
5449 (do_scoped_id): Likewise.
5450 * pt.c (lookup_template_class): Likewise.
5452 2003-02-14 Andrew Pinski <pinskia@physics.uc.edu>
5454 * decl.c: (define_label): Fix warning for return 0 instead of NULL.
5456 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
5458 * decl.c: Include "timevar.h".
5459 (poplevel): Time name lookup.
5460 (find_binding): Likewise.
5461 (push_namespace): Likewise.
5462 (pop_nested_namespace): Likewise.
5463 (store_bindings): Likewise.
5464 (maybe_push_to_top_level): Likewise.
5465 (pop_from_top_level): Likewise.
5466 (push_local_name): Likewise.
5467 (pushtag): Likewise.
5468 (pushdecl): Likewise.
5469 (pushdecl_with_scope): Likewise.
5470 (pushdecl_namespace_level): Likewise.
5471 (pushdecl_top_level): Likewise.
5472 (pushdecl_class_level): Likewise.
5473 (push_class_level_binding): Likewise.
5474 (push_using_decl): Likewise.
5475 (push_using_directive): Likewise.
5476 (push_overloaded_decl): Likewise.
5477 (lookup_label): Likewise.
5478 (define_label): Likewise.
5479 (lookup_tag): Likewise.
5480 (lookup_tag_reverse): Likewise.
5481 (lookup_namespace_name): Likewise.
5482 (select_decl): Likewise.
5483 (unqualified_namespace_lookup): Likewise.
5484 (lookup_name_real): Likewise.
5485 (lookup_name_current_level): Likewise.
5486 (lookup_type_current_level): Likewise.
5487 (maybe_inject_for_scope_var): Likewise.
5488 (xref_tag): Likewise.
5490 * Make-lang.in (cp/decl.o): Add dependency on timevar.h
5492 2003-02-12 Phil Edwards <pme@gcc.gnu.org>
5494 * decl.c (build_enumerator): Remove unneeded test.
5496 2003-02-09 Dan Nicolaescu <dann@ics.uci.edu>
5498 * cp-tree.h (struct lang_type_header): Make all fields unsigned
5501 2003-02-03 Mark Mitchell <mark@codesourcery.com>
5504 * call.c (z_candidate): Add args.
5505 (convert_class_to_reference): Set it.
5506 (implicit_conversion): Tidy.
5507 (add_candidate): Add args parameter.
5508 (add_function_candidate): Adjust call to add_candidate.
5509 (add_conv_candidate): Likewise.
5510 (build_builtin_candidate): Likewise.
5511 (build_user_type_conversion_1): Eliminate wasteful tree_cons
5513 (build_new_function_call): Likewise.
5514 (build_object_call): Likewise.
5515 (add_candidates): New function.
5516 (build_new_op): Use it.
5517 (covert_like_real): Adjust call to build_over_call.
5518 (build_over_call): Remove args parameter.
5519 * operators.def: Add <?= and >?=.
5521 2003-02-01 Richard Sandiford <rsandifo@redhat.com>
5523 * typeck.c (build_indirect_ref): Don't check flag_volatile.
5525 2003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5528 * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
5530 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
5532 * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
5533 BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
5534 (BINFO_LANG_ELTS): New #define.
5535 * tree.c (make_binfo): Use BINFO_LANG_ELTS.
5537 2003-01-30 Geoffrey Keating <geoffk@apple.com>
5539 * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
5541 2003-01-30 Mark Mitchell <mark@codesourcery.com>
5543 * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
5545 * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
5546 rather than TYPE_LANG_FLAG_0.
5547 (TYPE_BUILT_IN): Remove.
5548 (TYPE_DEPENDENT_P): New macro.
5549 (TYPE_DEPENDENT_P_VALID): Likewise.
5550 (lang_type_class): Add fields_readonly.
5551 * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
5552 * pt.c (dependent_type_p_r): New function, split out from ...
5553 (dependent_type_p): ... here. Memoize results.
5554 * search.c (dependent_base_p): Use dependent_type_p, not
5555 uses_template_parms.
5556 * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
5559 2003-01-29 Mark Mitchell <mark@codesourcery.com>
5561 * call.c (build_field_call): Use build_new_op, not build_opfncall.
5562 (prep_operand): New function.
5563 (build_new_op): Use it. Remove dead code.
5564 * class.c (pushclass): Change "modify" parameter type from int to
5566 (currently_open_class): Use same_type_p, not pointer equality.
5567 (push_nested_class): Adjust calls to pushclass, remove modify
5569 * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
5570 (pushclass): Change prototype.
5571 (push_nested_class): Likewise.
5572 (grokoptypename): Remove.
5573 (build_opfncall): Remove.
5574 (value_dependent_expression_p): Declare.
5575 (resolve_typename_type): Likewise.
5576 (resolve_typename_type_in_current_instantiation): Likewise.
5577 (enter_scope_of): Remove.
5579 (tsubst_expr): Likewise.
5580 (tsubst_copy): Likewise.
5581 (tsubst_copy_and_build): Likewise.
5582 * decl.c (warn_about_implicit_typename_lookup): Remove.
5583 (finish_case_label): Return error_mark_node for erroneous labels.
5584 (start_decl): Adjust calls to push_nested_class.
5585 (grokfndecl): Call push_scope/pop_scope around call to
5587 (grokdeclarator): Do not call tsubst.
5588 (start_function): Adjust calls to push_nested_class.
5589 * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
5590 (check_classfn): Use push_scope/pop_scope around type comparisions.
5591 (grokoptypename): Remove.
5592 (push_sscope): Adjust call to push_nested_class.
5593 * error.c (dump_type): Show cv-qualification of typename types.
5594 * init.c (build_member_call): Use build_new_op, not
5596 * method.c (build_opfncall): Remove.
5597 * parser.c (cp_parser): Add allow_non_constant_expression_p and
5598 non_constant_expression_p.
5599 (cp_parser_constant_expression): Adjust prototype.
5600 (cp_parser_resolve_typename_type): Remove.
5601 (cp_parser_non_constant_expression): New function.
5602 (cp_parser_non_constant_id_expression): Likewise.
5603 (cp_parser_new): Set allow_non_constant_expression_p and
5604 non_constant_expression_p.
5605 (cp_parser_primary_expression): Reject `this' and `va_arg' in
5606 constant-expressions. Note that dependent names aren't really
5608 (cp_parser_postfix_expression): Reject conversions to non-integral
5609 types in constant-expressions. Neither are increments or
5611 (cp_parser_unary_expression): Reject increments and decrements in
5612 constant-expressions.
5613 (cp_parser_direct_new_declarator): Adjust call to
5614 cp_parser_constant_expression.
5615 (cp_parser_cast_expression): Reject conversions to non-integral
5616 types in constant-expressions.
5617 (cp_parser_assignment_expression): Rejects assignments in
5618 constant-expressions.
5619 (cp_parser_expression): Reject commas in constant-expressions.
5620 (cp_parser_labeled_statement): Adjust call to
5621 cp_parser_constant_expression.
5622 (cp_parser_direct_declarator): Simplify array bounds, even in
5623 templates, when they are non-dependent. Use
5624 resolve_typename_type, not cp_parser_resolve_typename_type.
5625 (cp_parser_class_head): Use resolve_typename_type, not
5626 cp_parser_resolve_typename_type.
5627 (cp_parser_member_declaration): Adjust call to
5628 cp_parser_constant_expression.
5629 (cp_parser_constant_initializer): Likewise.
5630 (cp_parser_constructor_declarator): Use resolve_typename_type, not
5631 cp_parser_resolve_typename_type.
5632 (cp_parser_late_parsing_default_args): Adjust call to
5634 * pt.c (tsubst): Give it internal linkage.
5635 (tsubst_expr): Likewise.
5636 (tsubst_copy): Likewise.
5637 (tsubst_copy_and_build): Likewise.
5638 (push_access_scope_real): Likewise.
5639 (tsubst_friend_class): Likewise.
5640 (instantiate_class_template): Adjust call to pushclass.
5641 (value_dependent_expression_p): Give it external linkage.
5643 (resolve_typename_type): New function.
5644 * semantics.c (finish_call_expr): Use build_new_op, not
5646 (begin_constructor_declarator): Remove.
5647 (begin_class_definition): Adjust call to pushclass.
5648 (enter_scope_of): Remove.
5649 * typeck.c (comptypes): Resolve typename types as appropriate.
5650 (build_x_indirect_ref): Use build_new_op, not build_opfncall.
5651 (build_x_compound_expr): Likewise.
5652 (build_modify_expr): Likewise.
5653 (build_x_modify_expr): Likewise.
5654 * typeck2.c (build_x_arrow): Likewise.
5656 2003-01-29 Fariborz Jahanian <fjahanian@apple.com>
5658 * pt.c (last_pending_template) Declare GTY().
5660 2003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5663 * parser.c (cp_parser_elaborated_type_specifier): Convert
5664 TEMPLATE_DECL to TYPE_DECL only when processing template friends.
5665 (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
5667 2003-01-28 Nathan Sidwell <nathan@codesourcery.com>
5670 * pt.c (unify): Don't unify '*T' with 'U C::*'.
5673 * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
5674 inside a declarator.
5676 2003-01-27 Nathan Sidwell <nathan@codesourcery.com>
5678 * class.c (update_vtable_entry_for_fn): Add index parameter.
5679 Generate vcall thunk for covariant overriding from a virtual
5681 (dfs_modify_vtables): Adjust.
5683 2003-01-25 Nathan Sidwell <nathan@codesourcery.com>
5686 * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
5688 (cp_parser_base_specifier): Look for and consume a
5689 TEMPLATE keyword. Replace switch with array index.
5692 * semantics.c (finish_non_static_data_member): Remember the
5693 field's type even in a template.
5696 * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
5700 * parser.c (cp_parser_cast_expression): Be more tentative.
5702 2003-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5704 * cp-tree.h (flagged_type_tree_s): Remove.
5705 (check_for_new_type): Likewise.
5706 * typeck2.c (check_for_new_type): Likewise.
5708 2003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
5710 * dump.c: ANSIfy function declarations and definitions.
5712 * cp-tree.h, decl.h: Get rid of PARAMS. Again.
5714 2003-01-22 Mark Mitchell <mark@codesourcery.com>
5717 * init.c (build_new): Set the type of the new-expression, even
5718 when processing_templte_decl.
5721 * parser.c (cp_parser_primary_expression): Improve error message
5722 for templates used in an expression context.
5725 * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
5726 parse when encountering "typedef".
5728 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
5730 * class.c, parser.c: ANSIfy function definitions and declarations.
5732 2003-01-22 Mark Mitchell <mark@codesourcery.com>
5735 * error.c (dump_decl): For an OVERLOAD, just print the name of the
5736 function; it doesn't make sense to try to print its type.
5737 * semantics.c (finish_typeof): Issue errors about invalid uses.
5740 * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
5742 (cp_parser_expression_statement): Use it.
5743 (cp_parser_explicit_instantiation): Likewise.
5744 * pt.c (do_decl_instantiation): Improve error handling logic.
5746 2003-01-22 Mark Mitchell <mark@codesourcery.com>
5749 * parser.c (cp_parser_using_declaration): Issue error messages
5750 about name resolution failures here.
5753 * class.c (currently_open_derived_class): Use dependent_type_p.
5754 * cp-tree.h (dependent_type_p): New function.
5755 (dependent_template_arg_p): Likewise.
5756 (dependent_template_p): Likewise.
5757 (type_dependent_expression_p): Likewise.
5758 * parser.c (cp_parser_dependent_type_p): Remove.
5759 (cp_parser_value_dependent_type_p): Likewise.
5760 (cp_parser_type_dependent_expression_p): Likewise.
5761 (cp_parser_dependent_template_arg_p): Likewise.
5762 (cp_parser_dependent_template_id_p): Likewise.
5763 (cp_parser_dependent_template_p): Likewise.
5764 (cp_parser_diagnose_invalid_type_name): Replace
5765 cp_parser_dependent_type_p with dependent_type_p, etc.
5766 (cp_parser_primary_expresion): Likewise.
5767 (cp_parser_nested_name_specifier_opt): Likewise.
5768 (cp_parser_postfix_expression): Likewise.
5769 (cp_parser_unary_expression): Likewise.
5770 (cp_parser_template_name): Likewise.
5771 (cp_parser_class_name): Likewise.
5772 (cp_parser_lookup_name): Likewise.
5773 * pt.c (dependent_type_p): New function.
5774 (value_dependent_expression_p): Likewise.
5775 (type_dependent_expression_p): Likewise.
5776 (dependent_template_arg_p): Likewise.
5777 (dependent_template_id_p): Likewise.
5778 (dependent_template_p): Likewise.
5782 * parser.c (cp_parser_simple_declaration): Return quickly when
5783 encountering errors.
5785 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5787 Make-lang.in (cp/decl.o-warn): Add -Wno-error.
5789 2003-01-17 Jason Merrill <jason@redhat.com>
5791 PR c++/9167, c++/9358
5792 * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
5794 2003-01-17 Jason Merrill <jason@redhat.com>
5797 * call.c (build_conditional_expr): Always do lvalue-rvalue
5800 2003-01-17 Mark Mitchell <mark@codesourcery.com>
5803 * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
5804 * cp-tree.h (BASELINK_BINFO): Adjust.
5805 (BASELINK_FUNCTIONS): Likewise.
5806 (BASELINK_ACCESS_BINFO): Likewise.
5807 (tree_baselink): New structure.
5808 (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
5809 (lang_tree_node): Add baselink.
5810 * decl.c (cp_tree_node_structure): Add BASELINK case.
5811 * search.c (build_baselink): Adjust.
5812 * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P
5813 test from TREE_LIST case.
5816 * parser.c (cp_parser_constructor_declarator_p): Do not assume
5817 that a constructor cannot be declared outside of its own class.
5819 * parser.c (cp_parser_resolve_typename_type): If the scope cannot
5820 be resolved, neither can the qualified name.
5822 * rtti.c (get_pseudo_ti_desc): Fix thinko.
5824 2003-01-16 Jason Merrill <jason@redhat.com>
5827 * init.c (build_vec_init): Re-add maxindex parm.
5828 (perform_member_init, build_aggr_init): Pass it.
5829 (build_new_1): Pass it. Use an incomplete array type for full_type.
5830 * typeck.c (build_modify_expr): Pass it.
5831 * cp-tree.h: Adjust.
5833 2003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
5835 * cp-tree.h (tsubst_copy_and_build): New declaration.
5836 * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
5837 (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment.
5838 (tsubst_copy_and_build): New function.
5840 2003-01-16 Mark Mitchell <mark@codesourcery.com>
5842 * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
5843 (PARTIAL_INSTANTIATION_P): Remove.
5844 (IMPLICIT_TYPENAME_P): Likewise.
5845 (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
5846 (build_typename_type): Remove declaration.
5847 (parmlist_is_exprlist): Likewise.
5848 * decl.c (build_typename_type): Make it static, remove third
5850 (push_class_binding): Don't do implicit typename stuff.
5851 (make_typename_type): Likewise.
5852 (lookup_name_real): Likewise.
5853 (grokdeclarator): Don't try to convert declarations into
5854 initializations. Don't do implicit typename stuff.
5855 (parmlist_is_exprlist): Remove.
5856 (xref_basetypes): Simplify.
5857 * decl2.c (grokfield): Don't try to convert declarations into
5859 (build_anon_union_vars): Do this while processing templates, too.
5860 (finish_anon_union): Likewise.
5861 * error.c (dump_type): Remove implicit typename handling.
5862 * parser.c (cp_parser_diagnose_invalid_type_name): New method.
5863 (cp_parser_primary_expression): Correct handling of names not
5864 found by unqualified name lookup in templates.
5865 (cp_parser_nested_name_specifier_opt): Avoid checking dependency
5866 of types when possible.
5867 (cp_parser_simple_declaration): Complain intelligently about some
5868 invalid declarations.
5869 (cp_parser_member_declaration): Likewise.
5870 (cp_parser_constructor_declarator_p): Don't check when we're in a
5872 * pt.c (instantiate_class_template): Remove
5873 PARTIAL_INSTANTIATION_P gunk.
5874 * search.c (lookup_field_r): Don't build implicit typenames.
5875 (marked_pushdecls_p): Don't enter dependent base types.
5876 (unmarked_pushdecls_p): Likewise.
5877 * semantics.c (begin_class_definition): Remove implicit typename
5880 2003-01-16 Nathan Sidwell <nathan@codesourcery.com>
5883 * parser.c (cp_parser_direct_declarator): If accepting either
5884 abstract or named, the name must be an unqualified-id.
5886 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5888 * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
5890 2003-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5892 * decl2.c (check_classfn): Fix uninitialized warning.
5893 (build_anon_union_vars): Likewise.
5894 * pt.c (tsubst_copy): Likewise.
5896 2003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
5898 Further conform g++'s __vmi_class_type_info to the C++ ABI
5900 * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
5902 (class_hint_flags): Likewise.
5904 2003-01-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5906 * config-lang.in: Add semantics.c to gtfiles.
5907 * cp-tree.h (flagged_type_tree_s): Remove lookups field.
5908 (saved_scope): Likewise.
5909 (type_lookups): Remove.
5910 (deferred_access): New structure.
5911 (type_access_control): Remove.
5912 (save_type_access_control): Likewise.
5913 (reset_type_access_control): Likewise.
5914 (decl_type_access_control): Likewise.
5915 (push_deferring_access_checks): Declare.
5916 (resume_deferring_access_checks): Likewise.
5917 (stop_deferring_access_checks): Likewise.
5918 (pop_deferring_access_checks): Likewise.
5919 (get_deferred_access_checks): Likewise.
5920 (pop_to_parent_deferring_access_checks): Likewise.
5921 (perform_deferred_access_checks): Likewise.
5922 (perform_or_defer_access_check): Likewise.
5923 * decl.c (make_typename_type): Use perform_or_defer_access_check.
5924 (make_unbound_class_template): Likewise.
5925 (grokdeclarator): Don't call decl_type_access_control.
5926 * parser.c (cp_parser_context): Remove deferred_access_checks
5927 and deferring_access_checks_p fields.
5928 (cp_parser_context_new): Adjust.
5929 (cp_parser): Remove access_checks_lists.
5930 (cp_parser_defer_access_check): Remove.
5931 (cp_parser_start_deferring_access_checks): Remove.
5932 (cp_parser_stop_deferring_access_checks): Remove.
5933 (cp_parser_perform_deferred_access_checks): Remove.
5934 (cp_parser_nested_name_specifier_opt): Use new deferred access
5936 (cp_parser_simple_declaration): Likewise.
5937 (cp_parser_template_id): Likewise.
5938 (cp_parser_function_definition): Likewise.
5939 (cp_parser_class_specifier): Likewise.
5940 (cp_parser_lookup_name): Likewise.
5941 (cp_parser_single_declaration): Likewise.
5942 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
5943 (cp_parser_parse_tentatively): Likewise.
5944 (cp_parser_parse_definitely): Likewise.
5945 (yyparse): Likewise.
5946 (cp_parser_init_declarator): Remove access_checks parameter.
5947 Use new deferred access functions.
5948 (cp_parser_function_definition_from_specifiers_and_declarator):
5950 (cp_parser_class_head): Remove deferring_access_checks_p and
5951 saved_access_checks parameters. Use new deferred access functions.
5952 (cp_parser_member_specification_opt): Don't call
5953 reset_type_access_control.
5954 * search.c (type_access_control): Remove.
5955 * semantics.c: Include "gt-cp-semantics.h".
5956 (deferred_type_access_control): Remove.
5957 (deferred_access_stack): New variable.
5958 (deferred_access_free_list): Likewise.
5959 (push_deferring_access_checks): New function.
5960 (resume_deferring_access_checks): Likewise.
5961 (stop_deferring_access_checks): Likewise.
5962 (pop_deferring_access_checks): Likewise.
5963 (get_deferred_access_checks): Likewise.
5964 (pop_to_parent_deferring_access_checks): Likewise.
5965 (perform_deferred_access_checks): New function, adapted from
5966 cp_parser_perform_deferred_access_checks.
5967 (perform_or_defer_access_check): New function, adapted from
5968 cp_parser_defer_access_check.
5969 (current_type_lookups): Remove.
5970 (deferred_type_access_control): Likewise.
5971 (decl_type_access_control): Likewise.
5972 (save_type_access_control): Likewise.
5973 (reset_type_access_control): Likewise.
5974 (begin_function_definition): Adjust.
5975 (begin_class_definiton): Likewise.
5977 2003-01-13 Jason Merrill <jason@redhat.com>
5980 * class.c (build_base_path): Take the address before calling save_expr.
5982 * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
5983 all the ambiguous conversions are bad.
5985 * class.c (maybe_warn_about_overly_private_class): Don't stop
5986 searching when we find a nonprivate method.
5988 * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
5990 2003-01-12 Mark Mitchell <mark@codesourcery.com>
5992 * cp-tree.h (get_arglist_len_in_bytes): Remove.
5995 * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
5996 typeame types more robustly.
5998 2003-01-11 Phil Edwards <pme@gcc.gnu.org>
6000 * parser.c: Fix comment typos.
6002 2003-01-10 Mark Mitchell <mark@codesourcery.com>
6005 * parser.c (cp_parser_scope_through_which_access_occurs): Handle
6006 an object_type which is not a class type.
6008 2003-01-10 Geoffrey Keating <geoffk@apple.com>
6010 * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
6011 (cp_parser_late_parsing_default_args): Likewise.
6013 2003-01-10 Nathanael Nerode <neroden@gcc.gnu.org>
6015 * cfns.gperf: ANSIfy function declarations.
6016 * cfns.h: Regenerate.
6017 * cp-tree.h: ANSIfy function declarations.
6019 2003-01-10 Mark Mitchell <mark@codesourcery.com>
6021 * cp-tree.h (reparse_absdcl_as_expr): Remove.
6022 (reparse_absdcl_as_casts): Likewise.
6023 (reparse_decl_as_expr): Likewise.
6024 (finish_decl_parsing): Likewise.
6025 * decl2.c (reparse_absdcl_as_expr): Remove.
6026 (reparse_absdcl_as_casts): Likewise.
6027 (repase_decl_as_expr): Likewise.
6028 (finish_decl_parsing): Likewise.
6033 * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
6035 (cp_parser_nested_name_specifier_opt): Correct the
6036 check_dependency_p false.
6037 (cp_parser_postfix_expression): Fix formatting.
6038 (cp_parser_decl_specifier_seq): Avoid looking for constructor
6039 declarators when possible.
6040 (cp_parser_template_id): Avoid performing name-lookup when
6042 (cp_parser_class_head): Do not count specializations when counting
6043 levels of templates.
6044 (cp_parser_constructor_declarator_p): Return immediately if
6045 there's no chance that the tokens form a constructor declarator.
6046 * rtti.c (throw_bad_typeid): Add comment. Do not return an
6047 expression with reference type.
6048 (get_tinfo_decl_dynamic): Do not return an expression with
6050 (build_typeid): Add comment. Do not return an expression with
6052 * typeck.c (build_class_member_access_expr): Improve handling of
6053 conditionals and comma-expressions as objects.
6055 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
6057 * cfns.gperf: ANSIfy function declarations.
6058 * cfns.h: Regenerate.
6059 * cp-tree.h: ANSIfy function declarations.
6060 * parser.c: ANSIfy function declarations & definitions.
6062 * decl.c (bad_specifiers): Fix parameter order error I introduced.
6064 2003-01-09 Geoffrey Keating <geoffk@apple.com>
6066 Merge from pch-branch:
6068 2003-01-09 Geoffrey Keating <geoffk@apple.com>
6070 Merge to tag pch-merge-20030102:
6072 * semantics.c (finish_translation_unit): Don't call finish_file.
6073 * parser.c: Don't include ggc.h.
6074 (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
6075 read first token here. Don't allow PCH files after the first
6077 (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
6078 (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
6079 (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
6080 (cp_parser_late_parsing_for_member): Don't duplicate call to
6081 cp_lexer_set_source_position_from_token.
6082 (cp_parser_late_parsing_default_args): Likewise.
6083 (yyparse): Call finish_file after clearing the_parser.
6085 2002-12-11 Geoffrey Keating <geoffk@apple.com>
6087 * Make-lang.in: Remove $(GGC_H) from all dependencies.
6088 (CXX_TREE_H): Add $(GGC_H).
6089 * class.c: Don't include ggc.h.
6090 (field_decl_cmp): Make parameters be 'const void *' to match qsort.
6091 (method_name_cmp): Likewise.
6092 (resort_data): New variable.
6093 (resort_field_decl_cmp): New.
6094 (resort_method_name_cmp): New.
6095 (resort_sorted_fields): New.
6096 (resort_type_method_vec): New.
6097 (finish_struct_methods): Delete cast.
6098 (finish_struct_1): Delete cast.
6099 * cp-tree.h: Include ggc.h.
6100 (struct lang_type_class): Add reorder attribute to field `methods'.
6101 (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
6102 (resort_sorted_fields): New prototype.
6103 (resort_type_method_vec): New prototype.
6104 * call.c: Don't include ggc.h.
6106 * decl2.c: Likewise.
6109 * method.c: Likewise.
6110 * optimize.c: Likewise.
6111 * parse.y: Likewise.
6114 * search.c: Likewise.
6115 * semantics.c: Likewise.
6119 * lang-specs.h: Remove comment.
6121 2002-12-03 Geoffrey Keating <geoffk@apple.com>
6123 * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
6124 (operator_name_info): Mark to be saved for PCH, specify size.
6125 (assignment_operator_name_info): Likewise.
6127 2002-11-19 Geoffrey Keating <geoffk@apple.com>
6129 * decl.c (anon_cnt): Mark to be saved for PCH.
6131 2002-10-25 Geoffrey Keating <geoffk@apple.com>
6133 * lex.c (init_reswords): Delete now-untrue comment.
6134 Allocate ridpointers using GGC.
6136 2002-10-04 Geoffrey Keating <geoffk@apple.com>
6138 * cp-tree.h (union lang_decl_u2): Add tags to all fields.
6140 * g++spec.c (lang_specific_driver): Don't include standard
6141 libraries in `added'.
6143 2002-08-27 Geoffrey Keating <geoffk@redhat.com>
6145 * decl2.c (finish_file): Call c_common_write_pch.
6146 * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
6148 2002-08-17 Geoffrey Keating <geoffk@redhat.com>
6150 * g++spec.c (lang_specific_driver): Treat .h files as C++ header
6151 files when using g++.
6152 * lang-specs.h: Handle compiling C++ header files.
6154 2003-01-09 Jakub Jelinek <jakub@redhat.com>
6156 * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
6158 2003-01-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6160 * pt.c (push_access_scope_real): Call push_to_top_level for
6161 function in namespace scope.
6162 (pop_access_scope): Call pop_from_top_level for function in
6165 2003-01-09 Jakub Jelinek <jakub@redhat.com>
6167 * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
6169 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
6171 * Make-lang.in (c++.install-common, c++.install-man,
6172 c++.uninstall): Prepend $(DESTDIR) to destination paths in
6173 all (un)installation commands.
6174 (c++.install-common): Rewrite $(LN) commands to support
6175 DESTDIR with "ln" as well as with "ln -s".
6177 2003-01-08 Jason Merrill <jason@redhat.com>
6179 * parser.c (cp_parser_primary_expression): See through explicitly
6180 scoped ALIAS_DECLs, too.
6182 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
6184 * decl.c: Remove some #if 0 code.
6186 * decl.c: ANSIfy function declarations.
6188 2003-01-07 Mark Mitchell <mark@codesourcery.com>
6190 * parser.c (cp_parser_asm_definition): Correct handling of omitted
6193 2003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6196 * decl.c (make_typename_type): Check access only when tf_error.
6197 (make_unbound_class_template): Likewise.
6198 * pt.c (saved_access_scope): New variable.
6199 (push_access_scope_real): New function.
6200 (push_access_scope): Likewise.
6201 (pop_access_scope): Likewise.
6202 (tsubst_default_argument): Use them.
6203 (instantiate_template): Likewise.
6204 (regenerate_decl_from_template): Likewise.
6205 (instantiate_decl): Likewise.
6206 (get_mostly_instantiated_function_type): Likewise.
6208 2003-01-07 Nathanael Nerode <neroden@gcc.gnu.org>
6210 * tree.c: Delete bogus #if 0 code.
6212 2003-01-07 Andreas Schwab <schwab@suse.de>
6214 * class.c (layout_class_type): Don't use
6215 PCC_BITFIELD_TYPE_MATTERS if not defined.
6217 2003-01-06 Mark Mitchell <mark@codesourcery.com>
6220 * decl2.c (build_cleanup): Mark the object as used.
6222 * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
6223 (hash_local_specialization): New function.
6224 (register_local_specialization): Revert 2003-01-05 change.
6225 (instantiate_decl): Use hash_local_specialization when creating
6226 the local_specializations table.
6228 * decl2.c (mark_used): Do not synthesize thunks.
6230 * class.c (layout_class_type): Correct handling of unnamed
6231 bitfields wider than their types.
6234 * parser.c (cp_parser): Remove default_arg_types. Update
6235 documentation for unparsed_functions_queues.
6236 (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
6238 (cp_parser_new): Don't set parser->default_arg_types.
6239 (cp_parser_function_definition): Adjust usage of
6240 unparsed_funtions_queues.
6241 (cp_parser_class_specifier): Don't mess with
6242 parser->default_arg_types. Handle default argument processing in
6243 a separate phase from function body processing.
6244 (cp_parser_template_declaration_after_export): Adjust usage of
6245 unparsed_functions_queues.
6246 (cp_parser_late_parsing_for_member): Do not handle default
6249 2003-01-06 Nathan Sidwell <nathan@codesourcery.com>
6252 * parser.c (cp_parser_declarator_kind): New enum.
6253 (cp_parser_declarator): Adjust.
6254 (cp_parser_direct_declarator): Adjust. Allow for either named or
6255 abstract declarator. Prefer abstract, if possible. Allow
6256 parenthesized function name.
6257 (cp_parser_condition): Adjust cp_parser_declarator call.
6258 (cp_parser_explicit_instantiation): Likewise.
6259 (cp_parser_init_declarator): Likewise.
6260 (cp_parser_type_id): Likewise.
6261 (cp_parser_function_definition): Likewise.
6262 (cp_parser_member_declaration): Likewise.
6263 (cp_parser_parameter_declaration): Use cp_parser_declarator to do
6264 the tentative parsing.
6265 (cp_parser_exception_declaration): Likewise.
6267 2003-01-05 Mark Mitchell <mark@codesourcery.com>
6269 * parser.c (cp_parser_template_parameter): Adjust call to
6270 cp_parser_parameter_declaration.
6271 (cp_parser_parameter_declaration_list): Likewise.
6272 (cp_parser_parameter_declaration): Replace
6273 greater_than_is_operator_p with template_parm_p parameter. Do not
6274 cache tokens for template default arguments.
6276 * pt.c (retrieve_local_specialization): Use htab_find, not
6277 htab_find_with_hash.
6278 (register_local_specialization): Use htab_find_slot, not
6279 htab_find_slot_with_hash.
6280 (instantiate_decl): Pass a hash function to htab_create.
6282 2003-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6284 * parser.c (cp_parser_binary_expression,
6285 cp_parser_multiplicative_expression,
6286 cp_parser_additive_expression, cp_parser_shift_expression,
6287 cp_parser_relational_expression, cp_parser_equality_expression,
6288 cp_parser_and_expression, cp_parser_exclusive_or_expression,
6289 cp_parser_inclusive_or_expression,
6290 cp_parser_logical_and_expression, cp_parser_logical_or_expression,
6291 cp_parser_binary_expression): Const-ify.
6293 2003-01-04 Mark Mitchell <mark@codesourcery.com>
6295 * method.c (use_thunk): Disable access control while building the
6298 2003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
6300 * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
6303 2003-01-03 Matt Austern <austern@apple.com>
6305 * cp-tree.h (struct lang_type_class): add field for key method
6306 (cp_global_trees): rename dynamic_classes to keyed_classes
6307 (key_method): add definition
6308 * class.c (finish_struct_1): compute class's key method, and add
6309 the class to keyed_classes list if there is no key method.
6310 * decl.c (finish_function): add class to keyed_classes list if we
6311 see a definition of the class's key method.
6312 * pt.c (instantiate_class_template): add template specialization
6313 of a dynamic class to keyed_classes list.
6314 * decl2.c (key_method): remove
6315 (finish_file): iterate only through keyed_classes list when
6316 deciding whether to emit vtables, remove class from its list after
6319 2003-01-02 Jason Merrill <jason@redhat.com>
6321 * call.c (build_conditional_expr): Stabilize lvalues properly.
6322 * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
6323 * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
6324 Don't allow CALL_EXPR or VA_ARG_EXPR, either.
6326 * call.c (convert_like_real): Call decl_constant_value for an
6327 IDENTITY_CONV even if there are no more conversions.
6329 * cvt.c (build_up_reference): Don't push unnamed temps.
6331 * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
6333 * dump.c (cp_dump_tree): Don't try to dump class-specific fields
6334 for a backend struct.
6336 * except.c (wrap_cleanups_r, build_throw): Make
6337 MUST_NOT_THROW_EXPRs void.
6338 * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
6340 * init.c (build_vec_delete_1): Pre-evaluate the base address.
6342 * init.c (get_temp_regvar): Simplify logic.
6344 * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
6345 our replacement is a decl.
6347 * decl.c (cp_make_fname_decl): Push the decls inside the
6350 2003-01-03 Nathan Sidwell <nathan@codesourcery.com>
6353 * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
6356 2003-01-03 Graham Stott <graham.stott@btinternet.com>
6358 * parser.c (struct cp_parser): Add access_checks_lists field
6359 (cp_parser_simple_declaration): Use.
6360 (cp_parser_init_declarator): Likewise.
6362 2003-01-02 Mark Mitchell <mark@codesourcery.com>
6364 * parser.c (cp_parser_declaration): Accept the __extension__
6365 keyword before the declaration.
6368 * parser.c (cp_parser_parameter_declaration): Allow attributes to
6369 appear after the declarator.
6371 * call.c (build_new_method_call): Fix typo in message format
6374 2003-01-02 Mark Mitchell <mark@codesourcery.com>
6376 * parser.c (cp_lexer_next_token_is): Declare it inline.
6377 (cp_lexer_set_source_position_from_token): Likewise.
6378 (cp_lexer_debugging_p): Likewise.
6379 (cp_parser_parsing_tentatively): Likewise.
6380 (cp_parser_nested_name_specifier_opt): Reduce the number of calls
6381 to the cp_lexer_peek_token.
6383 * parser.c (cp_parser_sizeof_operand): Do not evaluate the
6386 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
6388 * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
6389 cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
6390 cp/repo.c: Fix copyright years.
6392 2003-01-01 Neil Booth <neil@daikokuya.co.uk>
6394 * lex.c: Remove superfluous include of cpplib.h.
6395 (CONSTRAINT): Define without conditions.
6396 (init_cp_pragma): Use c_register_pragma.
6398 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
6400 * .cvsignore: Remove.
6402 2002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl>
6404 * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
6405 except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
6406 lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
6407 pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
6408 typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
6410 * lex.h: parse.y is dead, so don't mention it. Also replace the
6411 copyright header with the default GNU copyright header.
6413 2002-12-31 Mark Mitchell <mark@codesourcery.com>
6415 * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
6416 (lookup_name_namespace_only): Likewise.
6417 (begin_only_namespace_names): Likewise.
6418 (end_only_namespace_names): Likewise.
6419 * decl.c (only_namespace_names): Remove.
6420 (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
6421 (lookup_name_real): Do not check only_namespace_names.
6422 (lookup_name_namespace_only): Remove.
6423 (begin_only_namespace_names): Likewise.
6424 (end_only_namespace_names): Likewise.
6425 * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
6426 nested-name-specifiers more gracefully.
6427 (cp_parser_class_or_namespace_name): Avoid looking up namespace
6428 names when they cannot possibly appear.
6429 (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
6430 (cp_parser_elaborated_type_specifier): Likewise.
6431 (cp_parser_namespace_name): Only look for namespace names.
6432 (cp_parser_lookup_name): Add is_namespace parameter.
6433 (cp_parser_lookup_name_simple): Adjust call to
6434 cp_parser_lookup_name.
6436 * parser.c (cp_parser_dependent_type_p): Fix thinko.
6438 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
6440 * .cvsignore: Update.
6442 2002-12-31 Nathan Sidwell <nathan@codesourcery.com>
6444 * class.c (modify_vtable_entry): Remove unused variable.
6445 (get_vcall_index): Always expect a non-thunk.
6446 (update_vtable_entry_for_fn): Combine covariant adjustments, when
6447 overriding a thunk. Pass get_vcall_index a non-thunk.
6449 * decl2.c (finish_file): Mark undefined inlines as extern.
6451 2002-12-31 Mark Mitchell <mark@codesourcery.com>
6453 * cp-tree.def (RETURN_INIT): Remove.
6454 * cp-tree.h (DECL_IN_MEMORY_P): Remove.
6455 (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
6456 (note_level_for_for): Remove.
6457 (note_level_for_try): Likewise.
6458 (note_level_for_catch): Likewise.
6459 (finish_named_return_value): Likewise.
6460 (do_pushlevel): Change prototype.
6461 (pending_lang_change): Remove.
6462 * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
6464 (note_level_for_for): Remove.
6465 (note_level_for_try): Likewise.
6466 (note_level_for_catch): Likewise.
6467 (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
6468 * parser.c (cp_parser_context_free_list): Make it "deletable".
6469 (cp_parser_template_argument): Remove misleading comment.
6470 * pt.c (tsubst_expr): Remove RETURN_INIT code.
6471 * semantics.c (genrtl_named_return_value): Remove.
6472 (do_pushlevel): Take a scope kind as an argument.
6473 (begin_if_stmt): Adjust.
6474 (begin_while_stmt): Likewise.
6475 (begin_for_stmt): Likewise.
6476 (finish_for_init_stmt): Likewise.
6477 (begin_switch_stmt): Likewise.
6478 (begin_handler): Likewise.
6479 (begin_compound_stmt): Likewise.
6480 (finish_named_return_value): Remove.
6481 (cp_expand_stmt): Remove RETURN_INIT case.
6482 * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
6484 2002-12-31 Mark Mitchell <mark@codesourcery.com>
6487 * parser.c (cp_parser_direct_declarator): Handle erroneous
6488 parenthesized declarators correctly.
6490 2002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
6492 * cp-tree.h (pending_lang_change): Declare.
6494 2002-12-30 Mark Mitchell <mark@codesourcery.com>
6496 * parser.c (cp_parser_context_free_list): New variable.
6497 (cp_parser_context_new): Use it.
6498 (cp_parser_error): Check return code from
6499 cp_parser_simulate_error.
6500 (cp_parser_simulate_error): Return a value.
6501 (cp_parser_id_expression): Optimize common case.
6502 (cp_parser_class_name): Likewise.
6503 (cp_parser_class_specifier): Adjust call to
6504 cp_parser_late_parsing_default_args.
6505 (cp_parser_lookup_name): Optimize common case.
6506 (cp_parser_late_parsing_for_member): Adjust call to
6507 cp_parser_late_parsing_default_args.
6508 (cp_parser_late_parsing_default_args): Add scope parameter.
6509 (cp_parser_require): Avoid creating the error message unless it's
6511 (cp_parser_parse_definitely): Place free'd contexts on the free
6514 * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
6516 2002-12-30 David Edelsohn <edelsohn@gnu.org>
6518 * parser.c (cp_parser_parameter_declaration_clause): Treat system
6519 header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
6521 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
6523 * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
6526 2002-12-30 Mark Mitchell <mark@codesourcery.com>
6530 * Make-lang.in (gt-cp-spew.h): Remove.
6531 * cp-tree.h (do_pending_lang_change): Remove.
6532 (do_identifier): Change prototype.
6533 (finish_id_expr): Remove.
6534 * decl.c (lookup_name_real): Remove yylex variable.
6535 * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
6536 * lex.c (init_cpp_parse): Remove.
6537 (reduce_cmp): Likewise.
6538 (token_cmp): Likewise.
6540 (lastiddecl): Likewise.
6541 (token_count): Likewise.
6542 (reduce_count): Likewise.
6544 (print_parse_statistics): Likewise.
6545 (do_pending_lang_change): Likewise.
6546 (do_identifier): Remove parsing parameter.
6547 * lex.h (lastiddecl): Remove.
6548 (looking_for_typename): Remove.
6549 (looking_for_template): Likewise.
6550 (pending_lang_change): Likewise.
6552 * semantics.c (finish_id_expr): Remove.
6554 * decl.c (grokdeclarator): Diagnost "extern thread" and "static
6557 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
6559 * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
6560 end, not the C front end.
6562 2002-12-30 Nathan Sidwell <nathan@codesourcery.com>
6564 * cp-tree.h (THUNK_TARGET): New macro.
6565 (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
6566 (finish_thunk): Remove offset parms.
6567 * class.c (find_final_overrider): Look through thunks.
6568 (get_vcall_index): Use THUNK_TARGET.
6569 (update_vtable_entry_for_fn): Look through thunks. Set covariant
6570 fixed offset here. Adjust finish_thunk call.
6571 (build_vtbl_initializer): Adjust finish_thunk calls.
6572 * mangle.c (mangle_call_offset): Remove superfluous if.
6573 (mangle_thunk): Adjust.
6574 * method.c (make_thunk): Adjust.
6575 (finish_thunk): Adjust.
6576 (thunk_adjust): Remove assert.
6577 (use_thunk): Use THUNK_TARGET
6578 * dump1.c (cp_dump_tree): Adjust thunk dumping.
6581 * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
6582 * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
6584 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
6586 Remove traditional C constructs 4/n.
6587 * decl2.c (grok_method_quals, warn_if_unknown_interface,
6588 grok_x_components, cp_build_parm_decl, build_artificial_parm,
6589 maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
6590 delete_sanity, check_member_template, check_java_method,
6591 check_classfn, finish_static_data_member_decl, grokfield,
6592 grokbitfield, grokoptypename, grok_function_init,
6593 cplus_decl_attributes, constructor_name, defer_fn,
6594 build_anon_union_vars, finish_anon_union, coerce_new_type,
6595 coerce_delete_type, comdat_linkage, maybe_make_one_only,
6596 key_method, import_export_vtable, import_export_class,
6597 output_vtable_inherit, import_export_decl, import_export_tinfo,
6598 build_cleanup, get_guard, get_guard_bits, get_guard_cond,
6599 set_guard, start_objects, finish_objects,
6600 start_static_storage_duration_function,
6601 finish_static_storage_duration_function, get_priority_info,
6602 start_static_initialization_or_destruction,
6603 finish_static_initialization_or_destruction,
6604 do_static_initialization, do_static_destruction,
6605 prune_vars_needing_no_initialization, write_out_vars,
6606 reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
6607 add_using_namespace, merge_functions, ambiguous_decl,
6608 lookup_using_namespace, lookup_using_namespace,
6609 qualified_lookup_using_namespace, set_decl_namespace,
6610 decl_namespace, current_decl_namespace, push_decl_namespace,
6611 pop_decl_namespace, push_scope, pop_scope, add_function,
6612 arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
6613 lookup_arg_dependent, do_namespace_alias,
6614 validate_nonmember_using_decl, do_nonmember_using_decl,
6615 do_toplevel_using_decl, do_local_using_decl,
6616 do_class_using_decl, do_using_directive, check_default_args,
6617 mark_used, handle_class_head): Use C90 prototypings. Use booleans.
6618 * parser.c (cp_parser_class_head): Use booleanss.
6619 * decl.c (walk_globals, walk_vtables): Likewise.
6620 * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
6621 walk_globals): Change return type from 'int' to 'bool'.
6622 * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
6623 throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
6624 build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
6625 get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
6626 qualifier_flags, tinfo_base_init, generic_initializer,
6627 ptr_initializer, dfs_class_hint_mark, ptm_initializer,
6628 dfs_class_hint_unmark, class_hint_flags, class_initializer,
6629 typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
6630 get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
6631 unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
6632 * repo.c (repo_compile_flags, repo_template_declared,
6633 repo_template_defined, repo_class_defined, repo_get_id,
6634 repo_template_used, repo_vtable_used, repo_inline_used,
6635 repo_tinfo_used, repo_template_instantiated, extract_string,
6636 open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
6637 finish_repo): Likewise.
6638 * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
6639 cxx_print_xnode): Likewise..
6640 * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
6641 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
6642 * cxxfilt.c (demangle_it, print_demangler_list, usage,
6643 standard_symbol_characters, hp_symbol_characters, main, fatal):
6645 (strip_underscore): Change type from 'int' to 'bool'.
6646 (main): Use boolean constants.
6648 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
6650 Remove traditional C constructs 3/n.
6651 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
6652 build_up_reference, warn_ref_binding, convert_to_reference,
6653 convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
6654 convert_to_void, convert, convert_force, build_type_conversion,
6655 build_expr_type_conversion, type_promotes_to,
6656 perform_qualification_conversions): Use C90 prototyping style.
6657 * decl2.c (grok_array_decl): Use boolean constant.
6658 (delete_sanity): Likewise.
6659 * typeck.c (build_unary_op): Likewise.
6660 * semantics.c (finish_switch_cond): Likewise.
6661 * parser.c (cp_parser_direct_new_declarator): Likewise.
6662 * init.c (build_new): Likewise.
6664 2002-12-27 Mark Mitchell <mark@codesourcery.com>
6666 * Make-lang.in (po-generated): Remove parse.c.
6667 (CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
6668 ($(srcdir)/cp/parse.h): Remove target.
6669 ($(srcdir)/cp/parse.c): Likewise.
6670 (gt-cp-parse.h): Likewise.
6671 (gt-cp-parser.h): New target.
6672 (c++.distclean): Do not remove parse.output.
6673 (c++.maintainer-clean): Do not remove parse.c or parse.h.
6674 (cp/spew.o): Remove target.
6675 (cp/lex.o): Adjust dependencies.
6676 (cp/pt.o): Likewise.
6677 (cp/parse.o): Likewise.
6678 (cp/TAGS): Do not mention parse.c.
6679 (cp/parser.o): New target.
6680 * NEWS: Mention the new parser.
6681 * call.c (build_scoped_method_call): Simplify.
6682 (build_method_call): Likewise.
6683 (build_new_function_call): Adjust calls to add_function_candidate
6684 and add_template_candidate.
6685 (build_new_op): Improve handling of erroroneous operands.
6686 (convert_default_arg): Remove circular argument processing.
6687 (name_as_c_string): New function.
6688 (build_new_method_call): Use it.
6689 (perform_implicit_conversion): Use error_operand_p.
6690 * class.c (finish_struct_anon): Use constructor_name_p.
6691 (check_field_decls): Likewise.
6692 (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
6693 (resolve_address_of_overloaded_function): Likewise.
6694 (instantiate_type): Tweak pointer-to-member handling.
6695 (get_primary_binfo): Remove incorrect assertion.
6696 * config-lang.in (gtfiles): Add parser.c, remove parse.c.
6697 * cp-tree.h (DEFARG_TOKENS): New macro.
6698 (default_arg): New structure.
6699 (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
6700 (lang_tree_node): Add default_arg.
6701 (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
6702 (type_info_ref_type): New macro.
6703 (saved_scope): Make processing_explicit_instantiation a boolean.
6704 (check_access): New field.
6705 (unparsed_text): Remove.
6706 (language_function): Remove unparsed_inlines.
6707 (error_operand_p): New macro.
6708 (lang_decl): Adjust pending_inline_info.
6709 (DEFARG_POINTER): Remove.
6710 (tag_types): Add typenames.
6711 (lookup_ualified_name): Declare.
6712 (lookup_name_real): Likewise.
6713 (shadow_tag): Adjust prototype.
6714 (get_scope_of_declarator): Declare it.
6715 (process_next_inline): Remove it.
6716 (check_for_missing_semicolon): Likewise.
6717 (maybe_get_template_decl_from_type_decl): Declare it.
6718 (finish_label_stmt): Adjust prototype.
6719 (finish_non_static_data_meber): Declare it.
6720 (finish_pseudo_destructor_call_expr): Rename to ...
6721 (finish_pseudo_destructor_expr): ... this.
6722 (finish_compound_literal): Declare it.
6723 (begin_inline_definitions): Remove it.
6724 (init_spew): Remove.
6725 (peekyylex): Likewise.
6726 (arbitrate_lookup): Likewise.
6727 (frob_opname): Likewise.
6728 (maybe_snarf_defarg): Likewise.
6729 (add_defarg_fn): Likewise.
6730 (do_pending_defargs): Likewise.
6731 (done_pending_defargs): Likewise.
6732 (unprocessed_defarg_fn): Likewise.
6733 (replace_defarg): Likewise.
6734 (end_input): Likewise.
6735 (get_overloaded_fn): Likewise.
6736 * cvt.c (convert_to_reference): Improve error handling.
6737 * decl.c (lookup_name_real): Do not declare it static.
6738 (maybe_push_to_top_level): Set check_access.
6739 (identifier_type_value): Adjust call to lookup_name_real.
6740 (lookup_qualified_name): New method.
6741 (lookup_name_real): Remove special-case parsing code.
6742 (lookup_name-nonclass): Adjust call to lookup_name_real.
6743 (lookup_name_namespace_only): Likewise.
6744 (lookup_name): Likewise.
6745 (check_tag_decl): Return the type declared.
6746 (shadow_tag): Likewise.
6747 (register_dtor_fn): Tweak check_access.
6748 (grokfndecl): Use constructor_name_p.
6749 (get_scope_of_declarator): New function.
6750 (grokdeclarator): Obscure tweaks for slightly different declarator
6752 (start_method): Return error_mark_node to indicate failure.
6753 (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
6754 * decl2.c (constructor_name_full): Simplify.
6755 (constructor_name): Use it.
6756 (build_expr_from_tree): Adjust for changes to do new parser.
6757 (push_scope): Improve robustness.
6758 (validate_nonmember_using_decl): Process declarations, not names.
6759 (do_class_using_decl): Likewise.
6760 (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
6762 * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
6763 * expr.c (cxx_expand_expr): Handle BASELINKs.
6764 * init.c (member_init_ok_or_else): Issue more errors.
6765 (build_offset_ref): Tweak handling of FUNCTION_DECLs.
6766 * lex.c: Do not include parse.h.
6767 (yypring): Do not declare.
6769 (make_reference_declarator): Remove error-generating code.
6770 (rid_to_yy): Remove.
6771 (cxx_init): Do not call init_spew.
6773 (check_for_missing_semicolon): Remove.
6774 * lex.h (got_scope): Remove.
6775 (got_object): Remove.
6776 * method.c (hack_identifier): Use finish_non_static_data_member.
6777 (implicitly_declare_fn): Adjust use of constructor_name.
6778 * parser.c: New file.
6779 * pt.c (parse.h): Do not include it.
6780 (maybe_get_template_decl_from_template): Do not declare it.
6781 (finish_member_template_decl): Tweak.
6782 (begin_explicit_instantiation): Adjust for
6783 processing_explicit_instantiation being boolean.
6784 (end_explicit_instantiation): Likewise.
6785 (maybe_process_partial_specialization): Tighten specialization
6787 (retrieve_local_specialization): Adjust ue of hash table.
6788 (eq_local_specializations): New function.
6789 (register_local_specialization): Likewise.
6790 (push_template_decl_real): Remove unnecessary test.
6791 (maybe_get_template_decl_from_type_decl): Don't make it static.
6792 (for_each_template_parm_r): Handle TYPEOF_TYPE.
6793 (tsubst_copy): Use retrieive_local_specialization to handle
6794 PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
6795 Handle COMPONENT_REFs with pseudo-destructor-expressions.
6796 Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
6797 (tsubst_expr): Pass decls, not names, to do_local_using_decl.
6798 (unify): Tweak handling of CONST_DECLs.
6799 (regenerate_decl_from_template): Use push_nested_class.
6800 (template_for_substitution): New funciton.
6801 (instantiate_decl): Use it. Register parameters as local
6803 * rtti.c (init_rtti_processing): Set type_info_ref_type.
6804 (build_typeid): Use it.
6805 (get_typeid): Likeise.
6806 * search.c (accessible_p): Use check_access, not
6807 flag_access_control.
6808 (adjust_result_of_qualified_name_lookup): Pay attention to the
6810 * semantics.c (finish_asm_stmt): Adjust error handling.
6811 (finish_label_stmt): Return the statement.
6812 (finish_non_static_data_member): New function.
6813 (finish_class_expr): Handle BASELINKs.
6814 (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
6815 (finish_object_call_expr): Simplify handling during templates.
6816 (finish_pseudo_destructor_call_expr): Rename to ...
6817 (finish_pseudo_dtor_expr): ... this.
6818 (finish_compound_literal): New function.
6819 (begin_inline_definitions): Remove.
6820 (finish_sizeof): Remove special template handling.
6821 * spew.c: Do not include parse.h.
6822 * tree.c (get_overloaded_fn): Remove.
6823 * typeck.c (build_class_member_access_expr): Handle
6824 PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
6825 (lookup_destructor): New function.
6826 (finish_class_member_access_expr): Use it.
6827 (convert_arguments): Simplify.
6828 (build_unary_op): Handle BASELINKs.
6830 2002-12-26 Nathan Sidwell <nathan@codesourcery.com>
6833 * decl2.c (mark_used): Defer inline functions.
6834 (finish_file): Merge deferred_fns loops. Check all used
6835 inline functions have a definition.
6836 * method.c (make_thunk): Thunks are not inline.
6838 PR c++/5116, c++/764
6839 * call.c (build_new_op): Make sure template class operands are
6842 2002-12-24 Nathan Sidwell <nathan@codesourcery.com>
6845 * cp-tree.h (resolve_scoped_fn_name): Prototype.
6846 * call.c (resolve_scoped_fn_name): New function. Deal with
6847 more template expansion. Broken out of ...
6848 * parse.y (parse_finish_call_expr): ... here. Call it.
6849 * decl2.c (build_expr_from_tree, CALL_EXPR): Use
6850 resolve_scoped_fn_name and build_call_from_tree.
6853 * decl.c (duplicate_decls): Templates may be disambiguated by
6857 * decl2.c (check_classfn): Use lookup_fnfield_1. List all
6858 conversion operators on failure.
6860 2002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6862 Remove traditional C constructs 2/n.
6863 * call.c (tourney, build_field_call, equal_functions, joust,
6864 compare_ics, build_over_call, build_java_interface_fn_ref,
6865 convert_like_real, op_error, build_object_call, resolve_args,
6866 build_vfield_ref, check_dtor_name, build_scoped_method_call,
6867 build_addr_func, build_call, build_method_call, null_ptr_cst_p,
6868 sufficient_parms_p, build_conv, non_reference, strip_top_quals,
6869 standard_conversion, reference_related_p,
6870 reference_compatible_p, convert_class_to_reference,
6871 direct_reference_binding, reference_binding,
6872 ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
6873 add_template_conv_candidate, any_viable, any_strictly_viable,
6874 build_this, splice_viable, print_z_candidates,
6875 build_user_type_conversion, build_new_function_call,
6876 conditional_conversion, build_conditional_expr, build_new_op,
6877 build_op_delete_call, enforce_access, call_builtin_trap,
6878 convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
6879 convert_default_arg, type_passed_as, convert_for_arg_passing,
6880 in_charge_arg_for_name, is_properly_derived_from,
6881 maybe_handle_implicit_object, maybe_handle_ref_bind,
6882 source_type, add_warning, can_convert, can_convert_arg,
6883 perform_implicit_conversion, can_convert_arg_bad,
6884 initialize_reference, add_conv_candidate,
6885 add_template_candidate_real, add_template_candidate): Ansify.
6887 2002-12-22 Nathan Sidwell <nathan@codesourcery.com>
6890 * cp-tree.h (grokoptypename): Add SCOPE parameter.
6891 * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
6892 if in a template scope.
6893 * parse.y (unoperator): Return the scope.
6894 (operator_name): Adjust grokoptypename call.
6896 2002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6898 * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
6899 * decl.c (make_unbound_class_template): Adjust. Check for tf_error.
6900 * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
6902 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
6904 * ChangeLog: Fix a typo.
6905 * class.c: Fix comment typos.
6906 * cp-tree.h: Likewise.
6908 2002-12-18 Jason Merrill <jason@redhat.com>
6910 Handle anonymous unions at the tree level.
6911 C++ ABI change: Mangle anonymous unions using the name of their
6912 first named field (by depth-first search). Should not cause
6913 binary compatibility problems, though, as the compiler previously
6914 didn't emit anything for affected unions.
6915 * cp-tree.def (ALIAS_DECL): New tree code.
6916 * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
6917 first field, not the largest.
6918 (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
6919 push the decl, and write it out at namespace scope.
6920 * decl.c (lookup_name_real): See through an ALIAS_DECL.
6921 (pushdecl): Add namespace bindings for ALIAS_DECLs.
6922 * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
6923 of a decl which doesn't have one.
6924 * typeck.c (build_class_member_access_expr): Don't recurse if
6925 we already have the type we want.
6927 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6930 * friend.c (make_friend_class): Allow partial specialization
6931 when declaration is not a template friend.
6933 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6936 * pt.c (lookup_template_class): Copy TREE_PRIVATE and
6937 TREE_PROTECTED to created decl nodes.
6939 2002-12-18 Mark Mitchell <mark@codesourcery.com>
6941 * class.c (build_base_field): Do not set DECL_PACKED on the
6944 2002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
6946 * cp-tree.h (struct tree_srcloc): Use location_t.
6947 (SOURCE_LOCUS): New.
6948 (SRCLOC_FILE, SRCLOC_LINE): Adjust.
6950 2002-12-17 Jason Merrill <jason@redhat.com>
6952 * decl.c (finish_function): Also complain about no return in
6954 * semantics.c (finish_return_stmt): Also call check_return_expr in
6956 * typeck.c (check_return_expr): In a template, just remember that we
6959 2002-12-16 Jason Merrill <jason@redhat.com>
6961 * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
6964 * semantics.c (do_pushlevel): Call pushlevel after adding the
6966 (do_poplevel): Call poplevel before adding the SCOPE_STMT.
6967 * parse.y (function_body): Go back to using compstmt.
6968 * decl.c (pushdecl): Skip another level to get to the parms level.
6970 * call.c (build_new_method_call): Use is_dummy_object to determine
6971 whether or not to evaluate the object parameter to a static member
6974 2002-12-14 Jason Merrill <jason@redhat.com>
6976 * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
6977 return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
6978 * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
6979 don't bother with an AGGR_INIT_EXPR.
6980 (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
6981 just generate a new decl normally. Take return slot parm.
6982 * cp-tree.h: Adjust prototype.
6984 2002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
6987 * cvt.c (convert_to_pointer_force): Don't try comparing against
6990 2002-12-13 Geoffrey Keating <geoffk@apple.com>
6992 * cp-tree.h: Have the multiple-include guards around
6995 2002-12-10 David Edelsohn <edelsohn@gnu.org>
6997 * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
6999 (snarf_method): Same.
7000 (snarf_defarg): Same.
7002 2002-12-10 Mark Mitchell <mark@codesourcery.com>
7005 * pt.c (tsubst_copy): Handle destructor names more correctly.
7007 2002-12-10 Matt Austern <austern@apple.com>
7009 * cp-tree.h: get rid of needs_virtual_reinit bit.
7011 2002-12-09 Mark Mitchell <mark@codesourcery.com>
7013 * NEWS: Document removal of in-class initialization extension for
7014 static data members of non-arithmetic, non-enumeration type.
7015 * decl.c (check_static_variable_definition): Do not allow that
7017 * decl2.c (grokfield): Do not call digest_init when processing
7020 2002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7022 * error.c (dump_expr): Fix format specifier warning.
7024 2002-12-04 Geoffrey Keating <geoffk@apple.com>
7026 * class.c (finish_struct_1): Correct comment.
7027 * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
7029 2002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7032 * error.c (dump_expr): Don't ever try to dump a non-existent
7035 2002-12-03 Nathan Sidwell <nathan@codesourcery.com>
7037 Implement covariant returns.
7038 * cp-tree.h (IS_AGGR_TYPE_2): Remove.
7039 (struct lang_decl_flags): Add this_thunk_p flag.
7040 Rename vcall_offset to virtual_offset.
7041 (struct lang_decl): Rename delta to fixed_offset.
7042 (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
7043 (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
7044 (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
7045 (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
7046 (make_thunk): Add this_adjusting arg.
7047 (finish_thunk): Declare.
7048 (mangle_thunk): Add this_adjusting arg.
7049 * class.c (get_vcall_index): Use base function for lookup.
7050 (update_vtable_entry_for_fn): Generate covariant thunk.
7051 (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
7052 (build_vtbl_initializer): Use base function for lookup.
7053 Finish covariant thunk here. Adjust thunk generation.
7054 * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
7055 Adjust thunk dumping.
7056 * mangle.c (mangle_call_offset): New function.
7057 (mangle_thunk): Adjust for covariant thunks.
7058 * method.c (make_thunk): Adjust. Do not set name here.
7059 (finish_thunk): New function. Set name here.
7060 (use_thunk): Generate covariant thunks too.
7061 (thunk_adjust): New function.
7062 * search.c (covariant_return_p): Remove. Fold into ...
7063 (check_final_overrider): ... here. Simplify.
7064 * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
7066 2002-12-03 Jason Merrill <jason@redhat.com>
7069 * call.c (build_over_call): Check specifically for TARGET_EXPR
7072 PR c++/8461, c++/8625
7073 * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
7074 (cp_convert_parm_for_inlining): Remove.
7075 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
7077 * cp-tree.h (ADDR_IS_INVISIREF): Remove.
7078 * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
7080 * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
7081 an ambiguous conversion.
7083 2002-12-03 Mark Mitchell <mark@codesourcery.com>
7086 * decl.c (reshape_init): Handle erroneous initializers.
7088 2002-12-02 Mark Mitchell <mark@codesourcery.com>
7091 * spew.c (remove_last_token): Make sure that last_chunk is set
7095 * error.c (dump_expr): Handle character constants with
7098 2002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7101 * decl.c (grokdeclarator): Require class-key for all friend class.
7102 Output the correct type and context in the error message.
7104 2002-12-01 Mark Mitchell <mark@codesourcery.com>
7107 * pt.c (unify): Use variably_modified_type_p to test validity of
7108 template argument types.
7111 * cp-tree.h (lang_type_class): Add typeinfo_var.
7112 (CLASSTYPE_TYPEINFO_VAR): New macro.
7113 * rtti.c (get_tinfo_decl): Use it.
7116 * init.c (expand_member_init): Always get the main variant of a
7119 2002-12-01 Mark Mitchell <mark@codesourcery.com>
7123 * decl.c (cxx_init_decl_processing): Use size_type_node, not
7125 * decl2.c (coerce_new_type): Likewise.
7126 * except.c (do_allocate_exception): Likewise.
7128 2002-11-30 Zack Weinberg <zack@codesourcery.com>
7130 * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
7131 dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
7132 lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
7133 repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
7134 typeck2.c: Include coretypes.h and tm.h.
7135 * Make-lang.in: Update dependencies.
7137 2002-11-30 Mark Mitchell <mark@codesourcery.com>
7140 * decl.c (layout_var_decl): Deal gracefully with erroneous types.
7141 (check_initializer): Validate the type of the initialized
7142 variable, even if the initializer is absent.
7143 * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
7146 * typeck.c (convert_for_assignment): Do not use
7147 decl_constant_value on the operand.
7150 * pt.c (instantiate_decl): Handle template friends defined outside
7151 of the class correctly.
7153 2002-11-29 Joe Buck <jbuck@synopsys.com>
7155 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
7158 2002-11-29 Mark Mitchell <mark@codesourcery.com>
7160 * class.c (walk_subobject_offsets): Recur on binfos as well as on
7162 (layout_nonempty_base_or_field): Pass it a binfo when processing a
7164 (layout_empty_base): Likewise.
7165 (build_base_field): Likewise.
7167 2002-11-27 Mark Mitchell <mark@codesourcery.com>
7169 * class.c (build_base_field): Make sure we get the canonical base
7170 when descending through primary bases.
7172 2002-11-26 Geoffrey Keating <geoffk@apple.com>
7174 * decl.c (check_initializer): Don't error on initialisation of
7175 a scalar with a brace-enclosed expression.
7177 2002-11-26 Nathan Sidwell <nathan@codesourcery.com>
7179 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
7180 (template_parms_equal): Remove prototype.
7181 * typeck.c (buuld_indirect_ref): Reformat.
7183 2002-11-25 Jason Merrill <jason@redhat.com>
7185 * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
7188 2002-11-25 Mark Mitchell <mark@codesourcery.com>
7190 * tree.c (cp_build_qualified_type_real): Correct handling of
7192 * class.c (walk_subobject_offsets): Fix thinko.
7193 (build_base_field): Record offsets of empty bases in primary
7195 (layout_class_type): Record offsets of empty bases in fields.
7197 * search.c (is_subobject_of_p_1): Fix thinko.
7198 (lookup_field_queue_p): Likewise.
7200 2002-11-24 Mark Mitchell <mark@codesourcery.com>
7202 * class.c (layout_class_type): Reuse tail padding when laying out
7205 2002-11-22 Mark Mitchell <mark@codesourcery.com>
7207 * rtti.c (qualifier_flags): Fix thinko.
7209 2002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
7211 Remove traditional C constructs 1/n.
7212 * cp-tree.h (init_method, set_mangled_name_for_decl,
7213 build_opfncall, hack_identifier, make_thunk, use_thunk,
7214 synthesize_method, implicitly_declare_fn,
7215 skip_artificial_parms_for, optimize_function, calls_setjmp_p,
7216 maybe_clone_body): Remove use of PARAMS.
7218 * method.c (do_build_assign_ref, do_build_copy_constructor,
7219 synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
7221 (synthesize_method): Use 'bool' type and constants instead of
7223 (locate_copy): Likewise.
7224 (implicitly_declare_fn): Likewise.
7226 * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
7227 Remove old-style declaration.
7228 (maybe_clone_body): Use 'bool' type and constants.
7230 2002-11-21 Glen Nakamura <glen@imodulo.com>
7233 * typeck.c (get_member_function_from_ptrfunc): Make sure that a
7234 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
7235 of the branches of a COND_EXPR.
7237 2002-11-19 Mark Mitchell <mark@codesourcery.com>
7239 * pt.c (for_each_template_parm): Free allocated memory.
7240 * search.c (is_subobject_of_p_1): New function.
7241 (is_subobject_of_p): Avoid walking virtual bases multiple times.
7243 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
7245 * g++spec.c (lang_specific_spec_functions): New.
7247 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
7249 * ChangeLog: Follow spelling conventions.
7250 * class.c: Likewise.
7251 * decl2.c: Likewise.
7253 2002-11-14 Zack Weinberg <zack@codesourcery.com>
7255 * search.c (dfs_push_decls): Do not try to reorder elements
7256 3..n of method_vec if method_vec has only two elements.
7257 Reverse order of two tests to avoid accessing unallocated
7260 2002-11-14 Mark Mitchell <mark@codesourcery.com>
7262 * class.c (dfs_find_final_overrider): Adjust so that the most
7263 derived object is a binfo, rather than a class type.
7264 (find_final_overrider): Likewise.
7265 (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
7266 (add_vcall_offset): Likewise.
7268 2002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7271 * pt.c (instantiate_template): Push class scope for member
7273 (get_mostly_instantiated_function_type): Likewise. Don't call
7274 tsubst on context. Remove CONTEXTP and TPARMSP parameters.
7275 * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
7276 * mangle.c (write_encoding, write_unqualified_name): Adjust.
7278 2002-11-07 Mark Mitchell <mark@codesourcery.com>
7280 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
7281 vcall offfsets. Split out ...
7282 (add_vcall_offset): ... new function.
7285 * pt.c (for_each_template_parm): Add htab parameter.
7286 (process_partial_specialization): Adjust call.
7287 (push_template_decl_real): Likewise.
7288 (pair_fn_data): Add visited.
7289 (for_each_template_parm_r): Avoid walking duplicates more than
7291 (uses_template_parms): Adjust call to for_each_template_parm.
7293 2002-11-07 Mark Mitchell <mark@codesourcery.com>
7295 * class.c (add_implicitly_declared_members): Put implicitly
7296 declared functions at the end of TYPE_METHODs when -fabi-version
7299 2002-11-05 Geoffrey Keating <geoffk@apple.com>
7301 * decl2.c (finish_file): Correct spelling.
7303 2002-11-03 Mark Mitchell <mark@codesourcery.com>
7305 * call.c (build_special_member_call): Do not try to lookup VTTs by
7307 * class.c (vtbl_init_data): Add generate_vcall_entries.
7308 (get_vtable_decl): Do not look up virtual tables by name.
7309 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
7310 (set_primary_base): Do not set CLASSTYPE_RTTI.
7311 (determine_primary_base): Likewise.
7312 (get_matching_virtual): Remove.
7313 (get_vcall_index): New function.
7314 (update_vtable_entry_for_fn): Do not try to use virtual thunks
7315 when they are not required. Assign vcall indices at this point.
7316 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
7317 Do update dynamic_classes.
7318 (build_vtt): Do not add VTTs to the symbol table.
7319 (build_ctor_vtbl_group): Likewise.
7320 (build_vtbl_initializer): Simplify handling of vcall indices.
7321 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
7322 for the most derived class.
7323 (add_vcall_offset_vtbl_entries_1): But do not actually add them to
7325 * cp-tree.h (dynamic_classes): New macro.
7326 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
7327 (CLASSTYPE_RTTI): Remove.
7328 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
7329 (CLASSTYPE_VCALL_INDICES): New macro.
7330 (CLASSTYPE_VTABLES): Likewise.
7331 (BV_USE_VCALL_INDEX_P): Remove.
7332 (build_vtable_path): Remove.
7333 * decl2.c (finish_vtable_vardecl): Remove.
7334 (key_method): Remove #if 0'd code.
7335 (finish_vtable_vardecl): Rename to ...
7336 (maybe_emit_vtables): ... this.
7337 (finish_file): Use it.
7338 * search.c (look_for_overrides_here): Update comment.
7340 2002-11-01 Zack Weinberg <zack@codesourcery.com>
7343 * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
7345 2002-10-30 Jason Merrill <jason@redhat.com>
7348 * cp-tree.h (ADDR_IS_INVISIREF): New macro.
7349 * call.c (convert_for_arg_passing): Set it.
7350 * except.c (stabilize_throw_expr): Recurse for such an arg.
7352 2002-10-31 Mark Mitchell <mark@codesourcery.com>
7354 * cp-tree.h (lang_decl_flags): Remove init_priority.
7355 (lang_decl): Add delta.
7356 (GLOBAL_INIT_PRIORITY): Remove.
7357 (THUNK_DELTA): Revise definition.
7358 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
7359 * dump.c (cp_dump_tree): Don't dump it.
7361 2002-10-30 Mark Mitchell <mark@codesourcery.com>
7364 * typeck2.c (process_init_constructor): Call complete_array_type.
7367 * decl.c (make_typename_type): Issue errors about invalid results.
7369 2002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7371 Core issue 287, PR c++/7639
7372 * cp-tree.h (lang_type_class): Add decl_list field.
7373 (CLASSTYPE_DECL_LIST): New macro.
7374 (maybe_add_class_template_decl_list): Add declaration.
7375 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
7376 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
7377 (maybe_add_class_template_decl_list): New function.
7378 (add_implicitly_declared_members): Use it.
7379 * decl.c (maybe_process_template_type_declaration): Likewise.
7380 (pushtag): Likewise.
7381 * friend.c (add_friend): Likewise.
7382 (make_friend_class): Likewise.
7383 * semantics.c (finish_member_declaration): Likewise.
7384 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
7385 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
7386 to process members and friends in the order of declaration.
7388 2002-10-29 Mark Mitchell <mark@codesourcery.com>
7391 * decl.c (finish_destructor_body): Create the label to jump to
7392 when returning from a destructor here.
7393 (finish_function_body): Rather than here.
7395 2002-10-25 Zack Weinberg <zack@codesourcery.com>
7398 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
7399 SCOPE_REF is not null before dereferencing it.
7401 2002-10-25 Mark Mitchell <mark@codesourcery.com>
7403 * call.c (build_over_call): Use DECL_CONTEXT, not
7404 DECL_VIRTUAL_CONTEXT.
7405 * class.c (modify_vtable_entry): Don't mess with
7406 DECL_VIRTUAL_CONTEXT.
7407 (set_vindex): Remove.
7408 (set_primary_base): Remove vfuns_p parameter.
7409 (determine_primary_base): Likewise.
7410 (modify_all_vtables): Likewise.
7411 (layout_class_type): Likewise. Adjust calls to other functions
7413 (finish_struct_1): Adjust calls to modified functions. Set
7415 * cp-tree.h (lang_type_class): Remove vsize.
7416 (CLASSTYPE_VSIZE): Remove.
7417 (lang_decl): Remove thunks.
7418 (DECL_THUNKS): Adjust.
7419 (DECL_VIRTUAL_CONTEXT): Remove.
7420 (duplicate_decls): Don't copy it.
7421 * pt.c (build_template_decl): Don't set it.
7422 (tsubst_decl): Likewise.
7423 * typeck.c (expand_ptrmemfunc_cst): Don't use it.
7425 * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
7426 (build_vtable_entry): Remove.
7427 * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
7428 (lang_decl): Add thunks.
7429 (DECL_THUNKS): New macro.
7430 * decl.c (duplicate_decls): Copy it.
7431 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
7432 * semantics.c (emit_associated_thunks): Simplify.
7434 2002-10-24 David Edelsohn <edelsohn@gnu.org>
7437 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
7438 lang_type structure exists before accessing field.
7439 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
7440 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
7441 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
7442 * class.c (check_field_decls): Use new macros.
7443 * typeck2.c (process_init_constructor): Remove redundant check for
7444 existence of lang_type structure.
7446 2002-10-24 Mark Mitchell <mark@codesourcery.com>
7448 * class.c (end_of_base): New method.
7449 (end_of_class): Use it. Check indirect virtual bases.
7451 * class.c (check_field_decls): Fix typo.
7453 2002-10-23 Mark Mitchell <mark@codesourcery.com>
7456 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
7460 * spew.c (next_token): Do not return an endless stream of
7461 END_OF_SAVED_INPUT tokens.
7462 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
7463 the cached token stream.
7464 (snarf_defarg): Likewise.
7466 2002-10-23 Zack Weinberg <zack@codesourcery.com>
7468 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
7469 variably_modified_type_p.
7470 * cp-tree.h: Remove prototype of variably_modified_type_p.
7471 * tree.c (variably_modified_type_p): Remove; now implemented
7472 in language-independent code.
7474 2002-10-22 Mark Mitchell <mark@codesourcery.com>
7477 * spew.c (snarf_parenthesized_expression): New function.
7478 (snarf_block): Use it.
7480 2002-10-22 Richard Henderson <rth@redhat.com>
7482 * method.c (use_thunk): Always compute vcall_value; assert that
7483 it is not zero. Use can_output_mi_thunk; use output_mi_thunk
7484 for vcall thunks as well.
7486 2002-10-21 Mark Mitchell <mark@codesourcery.com>
7488 * class.c (empty_base_at_nonzero_offset_p): New function.
7489 (layout_nonempty_base_or_field): Do not check for conflicts when
7490 laying out a virtual base using the GCC 3.2 ABI.
7491 (build_base_field): Correct checking for presence of empty classes
7492 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
7494 * class.c (include_empty_classes): Use normalize_rli.
7495 (layout_class_type): Likewise.
7497 * decl.c (reshape_init): Tweak handling of character arrays.
7500 * cp-tree.h (lang_type_class): Add contains_empty_class_p.
7501 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
7502 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
7503 (check_field_decls): Likewise.
7504 (layout_class_type): Likewise.
7505 (finish_struct_1): Initialize it.
7506 (walk_subobject_offsets): Use it to prune searches.
7508 2002-10-20 Mark Mitchell <mark@codesourcery.com>
7510 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
7511 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
7512 TARGET_ASM_OUTPUT_MI_THUNK in comments.
7514 2002-10-18 Zack Weinberg <zack@codesourcery.com>
7516 * decl.c (start_decl): Point users of the old initialized-
7517 typedef extension at __typeof__.
7519 2002-10-18 Mark Mitchell <mark@codesourcery.com>
7521 * Make-lang.in (method.o): Depend on TARGET_H.
7522 * method.c (target.h): Include it.
7523 (use_thunk): Use target hooks. Use vcall thunks, if available.
7525 2002-10-18 Mark Mitchell <mark@codesourcery.com>
7527 * class.c (base_derived_from): Make sure return value is a bool.
7529 2002-10-18 Mark Mitchell <mark@codesourcery.com>
7531 * class.c (find_final_overrider_data_s): Remove overriding_fn and
7533 (dfs_base_derived_from): New function.
7534 (base_derived_from): Likewise.
7535 (dfs_find_final_overrider): Use base_derived_from.
7536 (find_final_overrider): Adjust.
7538 2002-10-18 Jason Merrill <jason@redhat.com>
7541 * semantics.c (finish_for_cond, finish_while_cond): Don't mess
7542 with condition decls in a template.
7544 2002-10-17 Nathan Sidwell <nathan@codesourcery.com>
7546 * class.c (add_method): Compare template parms too.
7548 2002-10-17 Mark Mitchell <mark@codesourcery.com>
7551 * class.c (handle_using_decl): Allow the declaration used to be
7552 from an ambiguous base.
7554 * pt.c (convert_template_argument): Revert this change:
7555 2002-10-16 Mark Mitchell <mark@codesourcery.com>
7556 * pt.c (convert_template_argument): Do not fold non-type
7557 template rguments when inside a template.
7559 * init.c (expand_default_init): Handle brace-enclosed initializers
7562 2002-10-16 Mark Mitchell <mark@codesourcery.com>
7564 * mangle.c (write_expression): Correct handling of enumeration
7566 (write_template_arg): Likewise.
7567 * pt.c (convert_template_argument): Do not fold non-type template
7568 arguments when inside a template.
7571 * cvt.c (convert_to_reference): Allow references as the incoming
7574 2002-10-16 Mark Mitchell <mark@codesourcery.com>
7577 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
7578 build_qualified_type.
7580 2002-10-15 Richard Henderson <rth@redhat.com>
7582 * error.c (dump_expr): Use real_to_decimal directly, and with
7585 2002-10-15 Mark Mitchell <mark@codesourcery.com>
7587 * decl.c (reshape_init): Fix typo.
7589 * cp-tree.h (operator_name_info_t): Add arity.
7590 * lex.c (init_operators): Initialize it.
7591 * mangle.c (write_conversion_operator_name): New function.
7592 (write_unqualified_name): Use it.
7593 (write_template_args): Accept template arguments as a TREE_LIST.
7594 (write_expression): Adjust handling of qualified names to match
7597 2002-10-15 Jason Merrill <jason@redhat.com>
7599 * call.c (call_builtin_trap): New fn.
7600 (convert_arg_to_ellipsis): Use it. Downgrade error to warning.
7601 (build_call): Don't set current_function_returns_abnormally outside
7604 2002-10-14 Mark Mitchell <mark@codesourcery.com>
7606 * class.c (check_field_decls): Remove empty_p parameter. Instead,
7607 clear CLASSTYPE_EMPTY_P.
7608 (build_base_field): Likewise.
7609 (build_base_fields): Likewise.
7610 (check_bases_and_members): Likewise.
7611 (create_vtbl_ptr): Likewise.
7612 (layout_class_type): Likewise. Ensure that empty classes have
7613 size zero when used as base classes in the 3.2 ABI.
7614 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
7615 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
7617 (is_empty_class): Correct definition when using post-3.2 ABI.
7618 * cp-tree.h (lang_type_class): Add empty_p.
7619 (CLASSTYPE_EMPTY_P): New macro.
7621 2002-10-12 Nathan Sidwell <nathan@codesourcery.com>
7623 * init.c (build_delete): Do not apply save_expr for arrays.
7624 (build_vec_delete): Likewise.
7626 2002-10-14 Mark Mitchell <mark@codesourcery.com>
7628 * decl.c (layout_var_decl): Call layout_decl even for variables
7629 whose type is an array with unspecified bounds.
7632 * lex.c (do_identifier): Add another option for the parsing
7634 * parse.y (do_id): Use it.
7636 2002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
7638 PRs C++/6803, C++/7721 and C++/7803
7639 * decl.c (grokdeclarator): Gracefully handle template-name as
7642 2002-10-11 Jason Molenda <jmolenda@apple.com>
7644 * init.c (build_field_list): Provide uses_unions_p with a default
7647 2002-10-11 Mark Mitchell <mark@codesourcery.com>
7650 * cp-tree.h (variably_modified_type_p): New function.
7651 (grokdeclarator) Tighten check for variably modified types as
7653 * pt.c (convert_template_argument): Do not allow variably modified
7654 types as template arguments.
7655 * tree.c (variably_modified_type_p): New function.
7657 * NEWS: Document removal of "new X = ..." extension.
7658 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
7659 brace-enclosed initializers.
7660 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
7661 (initialize_local_var): Remove declaration.
7662 (expand_static_init): Likewise.
7663 * decl.c (next_initializable_field): New function.
7664 (reshape_init): Likewise.
7665 (check_initializer): Use them. Build dynamic initializer for
7666 aggregates here too.
7667 (initialize_local_var): Simplify, and incorporate cleanup
7668 insertion code as well.
7669 (destroy_local_var): Remove.
7670 (cp_finish_decl): Tidy.
7671 (expand_static_init): Fold checks for whether or not a variable
7672 needs initialization into this function. Simplify.
7673 * decl2.c (do_static_initialization): Simplify.
7674 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
7675 be done for us automatically.
7676 (expand_default_init): Handle brace-enclosed initializers
7678 (expand_aggr_init_1): Remove RTL-generation code.
7679 (build_vec_init): Remove "new X = ..." support.
7680 * parse.y (new_initializer): Likewise.
7681 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
7682 brace-enclosed initializer.
7683 (create_pseudo_type_info): Likewise.
7684 * typeck2.c (store_init_value): Don't try to handle digest_init
7685 being called more than once.
7686 (digest_init): Tidy handling of brace-enclosed initializers.
7688 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7690 * decl.c (typename_hash): Use htab_hash_pointer.
7692 2002-10-10 Jim Wilson <wilson@redhat.com>
7694 * decl.c (duplicate_decls): Don't call decl_attributes.
7696 2002-10-09 Zack Weinberg <zack@codesourcery.com>
7699 * decl.c (start_decl): Unconditionally issue error for
7700 'typedef foo = bar'.
7701 (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
7702 (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
7704 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7706 * decl2.c (prune_vtable_vardecl): Delete unused function.
7708 2002-10-03 Mark Mitchell <mark@codesourcery.com>
7711 * decl2.c (finish_anon_union): Do not expand anonymous unions when
7712 procesing template functions.
7713 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7714 type. Call layout_decl.
7715 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7717 2002-10-07 Richard Henderson <rth@redhat.com>
7719 * decl2.c, pt.c: Revert c++/7754 fix.
7721 2002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7724 * error.c (dump_expr) [REAL_CST]: Output in decimal format.
7726 2002-10-03 Mark Mitchell <mark@codesourcery.com>
7729 * pt.c (for_each_template_parm_r): Handle BASELINKs.
7732 * decl2.c (finish_anon_union): Do not expand anonymous unions when
7733 procesing template functions.
7734 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7735 type. Call layout_decl.
7736 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7738 2002-10-03 Mark Mitchell <mark@codesourcery.com>
7741 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
7742 template parameters.
7743 (globals): Add entity and need_abi_warning.
7744 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
7745 CLASSTYPE_TEMPLATE_INFO.
7746 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
7748 (write_prefix): Handle typename types correctly.
7749 (write_template_prefix): Handle template template parameters
7751 (start_mangling): Add entity parameter.
7752 (finish_mangling): Warn about names whose mangling will change.
7753 (mangle_decl_string): Adjust.
7754 (mangle_type_string): Likewise.
7755 (mangle_special_for_type): Likewise.
7756 (mangle_ctor_vtbl_for_type): Likewise.
7757 (mangle_thunk): Likewise.
7758 (mangle_guard_variable): Likewise.
7759 (mangle_ref_init_variable): Likewise.
7761 2002-10-02 Mark Mitchell <mark@codesourcery.com>
7764 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
7765 * cp-tree.h (emit_base_init): Rename to ....
7766 (emit_mem_initializers): ... this.
7767 (expand_member_init): Change prototype.
7768 * init.c (perform_member_init): Compute explicit, rather than
7769 requiring it as a parameter.
7770 (sort_member_init): Rename to ...
7771 (sort_mem_initializers): ... this. Process bases and data members
7773 (sort_base_init): Remove.
7774 (emit_base_init): Rename to ...
7775 (emit_mem_initializers): ... this.
7776 (expand_aggr_vbase_init_1): Remove.
7777 (construct_virtual_bases): Rename to ...
7778 (construct_virtual_base): ... this.
7779 (expand_member_init): Rework handling of base initializers.
7780 * method.c (do_build_copy_constructor): Use
7781 finish_mem_initializers.
7782 * parse.y (member_init): Adjust calls to expand_member_init.
7783 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
7784 (tsubst_initializer_list): Use expand_member_init.
7785 * semantics.c (finish_mem_intiailizers): Simplify.
7787 2002-10-02 Matt Austern <austern@apple.com>
7788 * decl.c (walk_vtables_r): Fixed typo that caused result to
7789 never get a nonzero value.
7791 2002-10-02 Roger Sayle <roger@eyesopen.com>
7793 PR optimization/6627
7794 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
7795 from here, and move it to tree.h.
7796 * decl.c (cxx_init_decl_processing): If storing the vbit
7797 in function pointers, ensure that force_align_functions_log
7800 2002-10-02 Matt Austern <austern@apple.com>
7802 * class.c (check_field_decls): Changed warning about const member
7803 variables so that it doesn't get issued for a class aggregate.
7805 2002-10-01 Mark Mitchell <mark@codesourcery.com>
7807 * decl.c (cp_finish_decl): Make sure array types are laid out,
7808 even if the array bounds are unknown.
7810 2002-10-01 Steve Ellcey <sje@cup.hp.com>
7812 * class.c (build_vtbl_initializer): Change build_c_cast
7815 2002-10-01 Mark Mitchell <mark@codesourcery.com>
7817 * decl.c (cp_finish_decl): Make sure array types are laid out,
7818 even if the array bounds are unknown.
7820 * decl.c (cp_finish_decl): Correct check for dynamic
7821 initialization of thread-local storage.
7823 2002-09-30 Nathan Sidwell <nathan@codesourcery.com>
7825 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
7828 2002-09-30 Steve Ellcey <sje@cup.hp.com>
7830 * class.c (build_vtbl_initializer): Add cast.
7831 (add_vcall_offset_vtbl_entries_1):
7832 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
7834 2002-09-30 Mark Mitchell <mark@codesourcery.com>
7836 * class.c (walk_subobject_offsets): Correct the calculation of
7837 offsets for virtual bases. Correct the counting of array
7839 (layout_nonempty_base_or_field): Simplify. Correct the
7840 calculation of offsets to be propagated through the binfo
7842 (build_base_field): Avoid creating a FIELD_DECL for empty bases.
7843 Add the FIELD_DECL to TYPE_FIELDS.
7844 (build_base_fields): Adjust accordingly.
7845 (layout_virtual_bases): Use build_base_field.
7846 (end_of_class): Return a tree, not an integer.
7847 (warn_about_ambiguous_direct_bases): Rename to ...
7848 (warn_about_ambiguous_bases): ... this.
7849 (include_empty_classes): New function.
7850 (layout_class_type): Create an alternative version of the type to
7851 be used when as a base class type. Do not call
7852 finish_record_layout until we are done laying out the class.
7853 * cp-tree.h (lang_type_class): Remove size, size_unit. Add
7855 (CLASSTYPE_SIZE): Reimplement.
7856 (CLASSTYPE_SIZE_UNIT): Likewise.
7857 (CLASSTYPE_ALIGN): Likweise.
7858 (CLASSTYPE_USER_ALIGN): Likewise.
7859 (CLASSTYPE_AS_BASE): New macro.
7860 (DECL_INITIALIZED_P): Likewise.
7861 (extract_init): Remove prototype.
7862 (build_forced_zero_init): Rename to ...
7863 (build_zero_init): ... this.
7864 (force_store_init_value): Remove.
7865 * decl.c (obscure_complex_init): Remove.
7866 (duplicate_decls): Copy DECL_INITIALIZED_P.
7867 (check_initializer): Do not leave junk in DECL_INITIAL.
7868 (cp_finish_decl): Handle zero-initialization of entities with
7869 static storage duration.
7870 * expr.c (extract_init): Remove.
7871 * init.c (build_forced_zero_init): Remove.
7872 (build_zero_init): New function.
7873 (build_default_init): Use it.
7874 (build_field_list): Skip FIELD_DECLs for base subobjects.
7875 (push_base_cleanups): Likewise.
7876 * method.c (do_build_assign_ref): Likewise.
7877 (synthesize_exception_spec): Likewise.
7878 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
7879 (regenerate_decl_from_template): To not set DECL_INITIAL for a
7880 static data member whose initialization took place in its class.
7881 (instantiate_decl): Do not pass an initializer to cp_finish_decl
7883 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
7884 (dfs_unuse_fields): Likewise.
7885 * tree.c (pod_type_p): Handle error_mark_node.
7886 (zero_init_p): Likewise.
7887 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
7889 * typeck2.c (store_init_value): Remove #if 0'd code.
7890 (force_store_init_value): Remove.
7891 (process_init_constructor): Use build_zero_init.
7893 2002-09-29 Nathan Sidwell <nathan@codesourcery.com>
7896 * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
7898 2002-09-29 Kazu Hirata <kazu@cs.umass.edu>
7900 * cp-tree.h: Fix comment typos.
7904 2002-09-25 Mark Mitchell <mark@codesourcery.com>
7906 * cp/class.c (contains_empty_class_p): New method.
7907 (walk_subobject_offsets): Correct computation of field offset.
7908 (layout_empty_base): Correct placement of emtpy base classes.
7909 (layout_class_type): Warn about ABI changes.
7911 2002-09-23 Mark Mitchell <mark@codesourcery.com>
7913 * cp/class.c (layout_virtual_bases): Do not round the size of the
7914 type to a multiple of the alignment before laying out virtual bases.
7915 (layout_class_type): Correct handling of bit-fields that are wider
7916 than their type inside unions. Round the size of the type to a
7917 even number of bytes when computing the size without virtual
7919 * cp/cp-tree.h (abi_version_at_least): New macro.
7921 2002-09-21 Kazu Hirata <kazu@cs.umass.edu>
7923 * ChangeLog: Follow spelling conventions.
7924 * ChangeLog.2: Likewise.
7926 * class.c: Likewise.
7927 * cp-tree.h: Likewise.
7930 * decl2.c: Likewise.
7931 * except.c: Likewise.
7932 * friend.c: Likewise.
7933 * g++spec.c: Likewise.
7936 * mangle.c: Likewise.
7937 * method.c: Likewise.
7938 * operators.def: Likewise.
7939 * optimize.c: Likewise.
7942 * search.c: Likewise.
7943 * semantics.c: Likewise.
7946 * typeck.c: Likewise.
7948 2002-09-18 Devang Patel <dpatel@apple.com>
7950 * cp/cp-tree.h: New prototype for walk_vtabls().
7951 * cp/decl.c (walk_vtables_r): New function.
7952 (struct cp_binding_level): Add new members, namespaces,
7953 names_size and vtables.
7954 (add_decl_to_level): Add decl in namespaces or vtables
7955 chain, if conditions match.
7956 (walk_vtables): New function.
7957 (walk_namespaces_r): Travers separate namespace chain
7958 for namespace decls.
7959 (wrapup_globals_for_namespace): Use names_size instead
7961 * cp/decl2.c (finish_file): Use walk_vtables() instead of
7962 walk_globals() to walk vtable decls.
7964 2002-09-18 Nathan Sidwell <nathan@codesourcery.com>
7966 * decl.c (grokdeclarator): Use assert, not internal_error. Don't
7967 ICE with invalid pointers & references.
7969 2002-09-17 Zack Weinberg <zack@codesourcery.com>
7971 * Make-lang.in: Remove all references to the demangler.
7972 * cxxfilt.c: Moved to binutils.
7974 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
7977 * pt.c (tsubst_decl): Remove assert.
7979 Remove DR 295 implementation.
7980 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
7981 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
7982 about ignoring volatile qualifiers.
7984 * search.c (lookup_member): Correct documentation.
7986 2002-09-16 Geoffrey Keating <geoffk@apple.com>
7988 * cp-tree.h (union lang_tree_node): Add chain_next option.
7990 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
7992 * parse.y (parse_finish_call_expr): Check lookup_member result.
7995 * semantic.c (finish_asm_stmt): Fix operand/output_operands
7997 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
7999 2002-09-15 Nathan Sidwell <nathan@codesourcery.com>
8002 * call.c (build_over_call): Convert this pointer for fns found by
8005 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
8007 * ChangeLog: Follow spelling conventions.
8008 * ChangeLog.1: Likewise.
8010 2002-09-14 Nathan Sidwell <nathan@codesourcery.com>
8013 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
8015 2002-09-14 Kazu Hirata <kazu@cs.umass.edu>
8017 * error.c: Fix comment formatting.
8018 * except.c: Likewise.
8020 * friend.c: Likewise.
8021 * g++spec.c: Likewise.
8024 * mangle.c: Likewise.
8025 * method.c: Likewise.
8026 * optimize.c: Likewise.
8029 * search.c: Likewise.
8030 * semantics.c: Likewise.
8033 * typeck.c: Likewise.
8034 * typeck2.c: Likewise.
8036 2002-09-13 Matt Austern <austern@apple.com>
8039 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
8040 * cp/call.c: Change call-by-const-reference mechanism to use
8041 non_cast_lvalue_p when deciding whether the create a temporary.
8042 We need a temporary when passing, e.g. (long) x by const ref.
8044 2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
8046 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
8048 2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
8050 * decl.c: Fix comment formatting.
8051 * decl2.c: Likewise.
8053 2002-09-12 Kazu Hirata <kazu@cs.umass.edu>
8055 * call.c: Fix comment formatting.
8056 * class.c: Likewise.
8057 * cp-lang.c: Likewise.
8058 * cp-tree.h: Likewise.
8061 2002-09-11 Zack Weinberg <zack@codesourcery.com>
8063 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
8064 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
8065 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
8066 minor adjustments (use version_string, eliminate yet another
8067 duplicate of xmalloc)
8069 2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8071 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
8073 2002-09-05 Jason Merrill <jason@redhat.com>
8075 * typeck2.c (add_exception_specifier): Only pedwarn for an
8077 (require_complete_eh_spec_types): New fn.
8078 (cxx_incomplete_type_diagnostic): Also support pedwarning.
8079 * typeck.c (complete_type_or_diagnostic): Likewise.
8080 * call.c (build_call): Call require_complete_eh_spec_types.
8081 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
8082 on an incomplete type.
8084 2002-09-04 Jakub Jelinek <jakub@redhat.com>
8086 * decl.c (start_cleanup_fn): Clear interface_only before
8087 start_function, restore it afterwards.
8089 2002-09-02 Nathan Sidwell <nathan@codesourcery.com>
8091 * cp-tree.h (finish_builtin_type): Remove.
8092 * decl2.c (finish_builtin_type): Move to common code.
8093 * decl.c (build_ptrmemfunc_type): Adjust.
8094 * rtti.c (create_pseudo_type_info): Adjust.
8095 (create_tinfo_types): Adjust.
8097 2002-08-31 Jason Merrill <jason@redhat.com>
8099 * cp-lang.c (cp_expr_size): Allow initialization from a
8102 2002-08-30 Richard Henderson <rth@redhat.com>
8105 * tree.c: Include target.h.
8106 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
8108 * Makefile.in (tree.o): Update.
8110 2002-08-27 Mark Mitchell <mark@codesourcery.com>
8112 * class.c (layout_virtual_bases): Warn about bugs in G++ that
8113 result in incorrect object layouts.
8114 (layout_class_type): Likewise.
8116 2002-08-24 Matt Austern <austern@apple.com>
8118 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
8120 (real_lvalue_p): Update caller.
8122 (non_cast_lvalue_or_else): New.
8123 * tree.h: Declare it.
8124 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
8126 2002-08-22 Mark Mitchell <mark@codesourcery.com>
8128 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
8129 and COND_EXPR specially; fix error message output.
8131 2002-08-22 Jason Merrill <jason@redhat.com>
8133 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
8134 * semantics.c (nullify_returns_r): Likewise.
8136 2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
8139 * typeck.c (finish_class_member_access_expr): Diagnose cases where
8140 name lookup finds nothing.
8142 2002-08-15 Jason Merrill <jason@redhat.com>
8144 * semantics.c (finish_then_clause): Remove redundant assignment.
8145 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
8146 extra binding level outside the if/switch statement.
8147 (finish_while_cond, finish_for_cond): Rewrite complex condition
8150 2002-08-15 Alexandre Oliva <aoliva@redhat.com>
8152 * parse.y (sizeof, alignof, typeof): New non-terminals to
8153 increment skip_evaluation. Replace terminals with them and
8154 decrement skip_evaluation at the end of rules using them.
8155 * decl2.c (mark_used): Don't assemble_external if
8156 skipping evaluation.
8158 2002-08-15 Gabriel Dos Reis <gdr@nerim.net>
8161 * parse.y (parse_finish_call_expr): Handle incomplete
8162 type used to name a scope.
8164 2002-08-15 Nathan Sidwell <nathan@codesourcery.com>
8167 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
8168 regression caused by my 2002-08-08 patch.
8170 2002-08-13 Mark Mitchell <mark@codesourcery.com>
8172 * decl.c (pushdecl_class_level): Honor requests to bind names to
8175 2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8177 * decl2.c (build_call_from_tree): Fix uninitialized variable.
8178 * parse.y (parse_finish_call_expr): Likewise.
8179 * repo.c (old_args, old_dir, old_main): Const-ify.
8181 2002-08-11 Gabriel Dos Reis <gdr@nerim.net>
8183 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
8184 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
8185 * optimize.c (maybe_clone_body): Likewise.
8186 * pt.c (tsubst_enum): Likewise.
8187 (lookup_template_class): Likewise.
8188 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
8190 2002-08-10 Neil Booth <neil@daikokuya.co.uk>
8192 * lang-specs.h: Remove -ansi.
8194 2002-08-10 Nathan Sidwell <nathan@codesourcery.com>
8196 * tree.c (maybe_dummy_object): Replace // with /* */
8198 2002-08-09 Mark Mitchell <mark@codesourcery.com>
8200 * call.c (standard_conversion): Use build_ptrmem_type.
8201 * cp-tree.h (build_ptrmem_type): New function.
8202 (adjust_result_of_qualified_name_lookup): Likewise.
8203 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
8204 static data members.
8205 (build_ptrmem_type): New function.
8206 (grokdeclarator): Do not use build_offset_type when encountering a
8208 * parse.y (parse_finish_call_expr): Use
8209 adjust_result_of_qualified_name_lookup.
8210 * search.c (adjust_result_of_qualified_name_lookup): New function.
8211 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
8212 accessing OFFSET_TYPEs directly.
8214 2002-08-08 Mike Stump <mrs@apple.com>
8216 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
8217 (type_decays_to): Likewise.
8218 * class.c (find_final_overrider): Likewise.
8219 (maybe_note_name_used_in_class): Likewise.
8220 * decl.c (current_tmpl_spec_kind): Likewise.
8221 (add_binding): Likewise.
8222 (push_class_binding): Likewise.
8223 (duplicate_decls): Likewise.
8224 (layout_var_decl): Likewise.
8225 (grokfndecl): Likewise.
8226 (grokdeclarator): Likewise.
8227 (check_default_argument): Likewise.
8228 * decl2.c (handle_class_head): Likewise.
8229 * error.c (dump_template_decl): Likewise.
8230 * init.c (build_offset_ref): Likewise.
8231 * pt.c (check_specialization_scope): Likewise.
8232 (determine_specialization): Likewise.
8233 (check_explicit_specialization): Likewise.
8234 (maybe_check_template_type): Likewise.
8235 (process_partial_specialization): Likewise.
8236 (check_default_tmpl_args): Likewise.
8237 (push_template_decl_real): Likewise.
8238 (convert_template_argument): Likewise.
8239 (try_class_unification): Likewise.
8240 (get_bindings_real): Likewise.
8241 (do_decl_instantiation): Likewise.
8242 * semantics.c (begin_function_definition): Likewise.
8243 (finish_member_declaration): Likewise.
8244 (check_multiple_declarators): Likewise.
8245 * typeck.c (comp_array_types): Likewise.
8246 (comptypes): Likewise.
8247 (expr_sizeof): Likewise.
8248 (build_binary_op): Likewise.
8249 (dubious_conversion_warnings): Likewise.
8250 (check_return_expr): Likewise.
8252 2002-08-08 Mark Mitchell <mark@codesourcery.com>
8254 * typeck.c (build_class_member_access_expr): Do not return
8255 error_mark_node when no error has occurred.
8257 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8259 * typeck.c (build_component_addr): Remove.
8260 (build_unary_op): Just check it's not a bitfield, and then build
8263 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8265 * class.c (convert_to_base): Correct check for error_mark_node.
8266 (create_vtable_ptr): Remove unused VFUNS_P parm.
8268 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8270 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
8272 2002-08-07 Mark Mitchell <mark@codesourcery.com>
8274 Rework build_component_ref.
8275 * call.c (build_vfield_ref): Do not go through build_component_ref.
8276 (build_field_call): Use build_class_member_access_expr.
8277 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
8278 (build_object_call): Likewise.
8279 * class.c (convert_to_base): New function.
8280 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
8281 (instantiate_type): Handle BASELINKs.
8282 * cp-tree.def (BASELINK): New tree code.
8283 * cp-tree.h (BASELINK_P): Reimplement.
8284 (SET_BASELINK_P): Remove.
8285 (BASELINK_BINFO): Reimplement.
8286 (BASELINK_FUNCTIONS): Likewise.
8287 (BASELINK_ACCESS_BINFO): Likewise.
8288 (BASELINK_OPTYPE): Likewise.
8289 (convert_to_base): New function.
8291 (build_object_ref): Remove.
8292 (build_component_ref_1): Likewise.
8293 (build_component_ref): Likewise.
8294 (build_x_component_ref): Likewise.
8295 (build_class_member_access_expr): New function.
8296 (finish_class_member_access_expr): Likewise.
8297 (build_ptrmemfunc_access_expr): Likewise.
8298 * decl.c (grokdeclarator): Handle BASELINKs.
8299 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
8300 finish_class_member_access_expr.
8301 (arg_assoc): Handle BASELINKs.
8302 (do_class_using_decl): Likewise.
8303 * error.c (dump_decl): Likewise.
8304 (dump_expr): Use build_ptrmemfunc_access_expr.
8305 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
8307 (build_throw): Use BASELINK_FUNCTIONS.
8308 * init.c (perform_member_init): Use
8309 build_class_member_access_expr.
8310 (build_offset_ref): Handle BASELINKs. Use
8311 build_class_member_access_expr.
8312 * method.c (hack_identifier): Likewise.
8313 * parse.y (do_id): Use BASELINK, not TREE_LIST.
8314 (primary): Remove uses of build_object_ref.
8315 * pt.c (lookup_template_function): Handle BASELINKs.
8316 (resolve_overloaded_unification): Likewise.
8317 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
8318 (lookup_field): Use BASELINK, not TREE_LIST.
8319 (lookup_fnfiels): Likewise.
8320 (setup_class_bindings): Likewise.
8321 * semantics.c (finish_object_call_expr): Do not use
8322 build_method_call when we already know what function is being
8324 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
8325 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
8327 (name_p): New function.
8328 * typeck.c (build_object_ref): Remove.
8329 (build_component_ref_1): Likewise.
8330 (build_x_component_ref): Likewise.
8331 (build_class_member_access_expr): New function.
8332 (finish_class_member_access_expr): Likewise.
8333 (build_ptrmemfunc_access_expr): Likewise.
8334 (get_member_function_from_ptrfunc): Use
8335 build_ptrmemfunc_access_expr.
8336 (build_binary_op): Likewise.
8337 (build_unary_op): Likewise.
8338 (build_ptrmemfunc): Likewise.
8339 (pfn_from_ptrmemfunc): Likewise.
8340 * typeck2.c (build_m_component_ref): Adjust comment.
8342 2002-08-07 Neil Booth <neil@daikokuya.co.uk>
8344 * Make-lang.in (CXX_C_OBJS): Update.
8345 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
8346 * cp-tree.h (cxx_decode_option): Remove.
8347 * decl2.c (compare_options, lang_f_options, unsupported_options,
8348 cxx_decode_option): Remove.
8350 2002-08-06 Gabriel Dos Reis <gdr@nerim.net>
8352 * typeck.c (build_x_unary_op): Handle pointer-to-member.
8354 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
8356 * class.c: Don't include obstack.h.
8358 * decl2.c: Delete bogus comment.
8359 * error.c: Don't include obstack.h.
8360 * except.c: Likewise.
8361 (dump_type): Correct comment.
8362 * method.c: Don't include obstack.h.
8365 2002-08-04 Gabriel Dos Reis <gdr@nerim.net>
8368 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
8369 expressions to pointer-to-data-member of pointer-to-member-functions.
8371 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
8373 * cvt.c (ocp_convert): Delete obsolete code.
8374 * parse.y (permanent_obstack): Delete declaration.
8375 * pt.c (permanent_obstack): Delete declaration.
8376 * repo.c (permanent_obstack): Delete declaration.
8377 (open_repo_file): Use xmalloc instead of permanent_obstack.
8378 (init_repo): Use xstrdup instead of permanent_obstack.
8380 2002-08-04 Nathan Sidwell <nathan@codesourcery.com>
8382 * cp-tree.h (VF_DERIVED_VALUE): Remove.
8383 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
8385 2002-08-03 Nathan Sidwell <nathan@codesourcery.com>
8388 C++ ABI change - vfunc ordering.
8389 * class.c (add_virtual_function): Remove.
8390 (dfs_modify_all_vtables): Take list of all declared
8391 virtuals. Assign all that are not in primary base.
8392 (check_for_override): Adjust comments.
8393 (create_vtable_ptr): Take single list of virtuals. Build chain
8394 of declared virtuals here.
8395 (layout_class_type): Take single list of virtuals. Adjust.
8396 (finish_struct_1): Keep virtuals on single list. Adjust.
8398 2002-08-02 Mark Mitchell <mark@codesourcery.com>
8400 * init.c (build_member_call): Use build_new_method_call, not
8403 2002-08-02 Krister Walfridsson <cato@df.lth.se>
8405 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
8407 2002-08-02 Mark Mitchell <mark@codesourcery.com>
8409 * call.c (build_method_call): Issue a more helpful error message
8410 about ambiguous method names.
8412 2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
8414 * tree.c (build_shared_int_cst): Make cache file scope, and
8417 2002-08-02 Jason Merrill <jason@redhat.com>
8419 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
8420 (cp_expr_size): New fn.
8421 * call.c (build_over_call): Lose empty class hackery.
8422 (convert_arg_to_ellipsis): Promote non-POD warning to error.
8423 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
8425 * semantics.c (expand_body): Do tree optimization in the function
8428 2002-08-01 Neil Booth <neil@daikokuya.co.uk>
8430 * cp-tree.h: Move all warning and flag declarations to c-common.h.
8431 * decl.c: Move all warning and flag variables to c-common.c.
8432 * decl2.c: Move all warning and flag variables to c-common.c.
8433 * lex.c (flag_digraphs): Remove.
8434 (warn_traditional): Now in c-common.c.
8436 2002-07-31 Mark Mitchell <mark@codesourcery.com>
8438 * call.c (build_field_call): Do not look up the field by name.
8439 (build_method_call): Simplify.
8440 (struct z_candidate): Add access_path and conversion_path. Remove
8442 (convert_class_to_reference): Adjust use of
8443 add_function_candidate.
8444 (add_candidate): Add conversion_path argument.
8445 (add_function_candidate): Use it.
8446 (add_conv_dndidate): Likewise.
8447 (build_builtin_candidate): Likewise.
8448 (add_template_candidate_real): Add conversion_path argument.
8449 (add_template_conv_candidate): Likewise.
8450 (add_template_candidate): Likewise.
8451 (build_user_type_conversion_1): Use it.
8452 (build_new_function_call): Remove name lookup code. Adjust use of
8453 add_template_candidate and add_function_candidate.
8454 (build_new_op): Likewise.
8455 (convert_like_real): Use build_special_member_call.
8456 (build_over_call): Use cand->conversion_path.
8457 (build_special_member_call): New method.
8458 (build_new_method_call): Remove name lookup code.
8459 * cp-tree.def (OFFSET_REF): Update documentation.
8460 (TEMPLATE_ID_EXPR): Likewise.
8461 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
8462 (BASELINK_OPTYPE): Likewise.
8463 (build_new_method_call): Adjust prototype.
8464 (build_special_member_call): New method.
8465 (build_baselink): New method.
8466 (build_offset_ref_call_from_tree): Likewise.
8467 (build_call_from_tree): Likewise.
8468 (finish_qualified_call_expr): Remove.
8469 (finish_call_expr): Adjust prototype.
8470 (build_x_function_call): Remove.
8471 * cvt.c (ocp_convert): Use build_special_member_call.
8472 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
8473 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
8475 (build_offset_ref_call_from_tree): New function.
8476 (build_call_from_tree): Likewise.
8477 * init.c (expand_cleanup): Use build_special_member_call.
8478 (expand_default_init): Likewise.
8479 (build_member_call): Use finish_call_expr.
8480 (build_new_1): Use build_special_member_call.
8481 (push_base_cleanups): Likewise.
8482 * method.c (do_build_assign_ref): Likewise.
8483 * parse.y (template_id): Do not pass a COMPONENT_REF to
8484 lookup_template_function.
8485 (primary): Use parse_finish_call_epxr, not finish_call_expr.
8486 (parse_finish_call_expr): New function.
8487 * pt.c (lookup_template_function): Add assertions.
8488 * search.c (lookup_base): Allow T to be a binfo.
8489 (build_baselink): New function.
8490 (lookup_member): Use it.
8491 * semantics.c (finish_call_expr): Do not do name lookup.
8492 (finish_object_call_expr): Remove #if 0'd code.
8493 (finish_qualified_call_expr): Remove.
8494 * typeck.c (build_x_function_call): Remove.
8495 (build_static_case): Use build_special_member_call.
8496 * typeck2.c (build_functional_cast): Likewise.
8498 2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
8500 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
8502 2002-07-30 Gabriel Dos Reis <gdr@nerim.net>
8504 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
8506 2002-07-30 Nathan Sidwell <nathan@codesourcery.com>
8508 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
8511 2002-07-29 Alan Modra <amodra@bigpond.net.au>
8513 * cp-tree.h: Comment typo fix.
8515 2002-07-29 Richard Earnshaw <rearnsha@arm.com>
8517 * spew.c (space_for_token): Allocate zeroed memory for a new token
8520 2002-07-27 Roger Sayle <roger@eyesopen.com>
8522 * decl.c (builtin_function_1): No need to explicitly mark
8523 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
8525 2002-07-27 Roger Sayle <roger@eyesopen.com>
8527 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
8529 2002-07-26 Jason Merrill <jason@redhat.com>
8531 * call.c (build_over_call): Likewise.
8532 (cp_convert_parm_for_inlining): New fn.
8533 (convert_for_arg_passing): New fn.
8534 (convert_default_arg, build_over_call): Use it.
8535 (type_passed_as): New fn.
8536 * pt.c (tsubst_decl): Use it.
8537 * decl2.c (cp_build_parm_decl): New fn.
8538 (build_artificial_parm): Use it.
8539 (start_static_storage_duration_function): Likewise.
8540 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
8541 (grokparms): Don't mess with DECL_ARG_TYPE.
8542 * typeck.c (convert_arguments): Use convert_for_arg_passing.
8543 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
8545 * cp-tree.h: Declare new fns.
8547 2002-07-26 Neil Booth <neil@daikokuya.co.uk>
8549 * cp-tree.h (flag_operator_names): Remove.
8550 * decl2.c (flag_operator_names): Remove.
8551 (lang_f_options): Remove operator-names.
8552 * lex.c (D_OPNAME): Remove.
8553 (reswords): Remove operator names.
8554 (rid_to_yy): Remove operator names.
8555 (init_reswords): No need to handle D_OPNAME.
8556 * spew.c (read_process_identifier): There are no operator
8559 2002-07-26 Jason Merrill <jason@redhat.com>
8561 * dump.c (cp_dump_tree): Call c_dump_tree.
8562 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
8564 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
8566 * error.c (print_whitespace): Remove.
8567 * g++spec.c (LIBUNWIND): Move.
8568 * mangle.c (mangled_position, write_signed_number): Remove.
8570 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
8572 * decl2.c (cxx_decode_option): Similarly.
8574 2002-07-25 Gabriel Dos Reis <gdr@nerim.net>
8576 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
8577 (cxx_sizeof_or_alignof_type): Take a third argument.
8578 (cxx_sizeof): Adjust definition.
8579 (cxx_alignof): Likewise.
8580 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
8581 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
8583 (c_sizeof_nowarn): Remove definition.
8584 (build_unary_op): Use cxx_sizeof_nowarn.
8586 2002-07-24 Geoffrey Keating <geoffk@redhat.com>
8588 * tree.c (cp_build_qualified_type_real): When copying
8589 pointer-to-method types, unshare the record that holds
8590 the cached pointer-to-member-function type.
8592 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
8594 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
8596 2002-07-23 Gabriel Dos Reis <gdr@nerim.net>
8599 * typeck.c (cxx_sizeof_or_alignof_type): New function.
8600 (c_sizeof): Remove definition.
8601 (expr_sizeof): Use cxx_sizeof.
8602 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
8603 * decl.c (finish_destructor_body): Use cxx_sizeof.
8604 * semantics.c (finish_alignof): Likewise.
8605 (finish_alignof): Use cxx_alignof.
8606 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
8607 (cxx_sizeof_or_alignof_type): Declare.
8608 (my_friendly_assert): Move to ../c-common.h.
8610 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
8612 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
8614 2002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8616 PR c++/7347, c++/7348
8617 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
8618 * decl.c (make_typename_type): Use it.
8619 (make_unbound_class_template): Likewise.
8620 (lookup_name_real): Don't call type_access_control if scope is
8621 template parameter dependent.
8622 * parse.y (template_arg): Call make_unbound_class_template with
8624 (nest_name_specifier): Call make_typename_type with tf_parsing set.
8625 (typename_sub0): Likewise.
8626 (typename_sub1): Likewise.
8627 (instantiate_decl): Push class scope.
8628 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
8629 for both static variable and member function template.
8630 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
8632 * search.c (type_access_control): Do type access for TEMPLATE_DECL
8635 2002-07-20 Roger Sayle <roger@eyesopen.com>
8637 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
8638 test by using positive_option. Make whitespace consistent.
8640 2002-07-20 Gabriel Dos Reis <gdr@nerim.net>
8642 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
8643 members with 'locus'. Adjust use throughout.
8644 (struct feed): Likewise.
8645 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
8647 (snarf_defarg): Use error(), not error_with_file_and_line().
8649 2002-07-19 Chris Demetriou <cgd@broadcom.com>
8651 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
8652 cpp_options is included.
8654 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8656 PR c++/2862, c++/2863
8657 * pt.c (determine_specialization): Compare the length of
8658 TYPE_ARG_TYPES. Tidy.
8660 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8663 * decl.c (duplicate_decls): Don't propagate inlining parameters from
8664 olddecl to newdecl when newdecl is a specialization of the
8665 instantiation olddecl.
8667 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8669 PR c++/4802, c++/5387
8670 * decl.c (make_typename_type): Use enforce_access.
8672 2002-07-17 Scott Snyder <snyder@fnal.gov>
8675 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
8677 2002-07-12 Mark Mitchell <mark@codesourcery.com>
8679 * class.c (add_method): Correct handling of conversion operators.
8681 2002-07-11 Mark Mitchell <mark@codesourcery.com>
8684 * class.c (add_method): Simplify.
8686 2002-07-11 Jason Merrill <jason@redhat.com>
8689 * tree.c (cp_copy_res_decl_for_inlining): Also copy
8692 2002-07-10 Graham Stott <graham.stott@btinternet.com>
8694 * pt.c (template_parm_this_level_p, push_template_decl_real):
8695 Pass depth as int pointer.
8697 2002-07-11 Tim Josling <tej@melbpc.org.au>
8699 Remove front end hard coding from gengtype.c.
8701 * config-lang.in (gtfiles): Add files needed for this front end.
8703 2002-07-10 Mark Mitchell <mark@codesourcery.com>
8705 * cp-tree.h (unqualified_name_lookup_error): Declare it.
8706 (begin_function_definition): Adjust prototype.
8707 * lex.c (unqualified_name_lookup_error): New function, split out
8709 (do_identifier): ... here.
8710 * parse.y (parse_begin_function_definition): New function.
8712 * semantics.c (begin_function_definition): Accept decl-specifiers
8713 and attributes as separate parameters.
8715 2002-07-10 Jason Merrill <jason@redhat.com>
8718 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
8719 modifying the old one.
8721 2002-07-09 Mark Mitchell <mark@codesourcery.com>
8723 * cp-tree.h (constructor_name_p): Declare it.
8724 (check_template_template_default_arg): Likewise.
8725 * class.c (handle_using_decl): Use constructor_name_p.
8726 * decl.c (grokdeclarator): Likewise.
8727 * decl2.c (constructor_name_p): Define it.
8728 * init.c (build_member_call): Use constructor_name_p.
8729 * parse.y (template_parm): Use check_template_template_default_arg.
8730 * pt.c (check_explicit_specialization): Use constructor_name_p.
8731 * semantics.c (check_template_template_default_arg): New function.
8733 2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8735 * pt.c (can_complete_type_without_circularity): Add static to
8736 function definition.
8738 2002-07-08 Mark Mitchell <mark@codesourcery.com>
8740 * cp-tree.h (have_extern_spec): Declare it
8741 * decl.c (have_extern_spec): Define it.
8742 (start_decl): Eliminate use of used_extern_spec.
8743 (start_function): Likewise.
8744 * parse.y (have_extern_spec): Remove declaration.
8745 (used_extern_spec): Likewise.
8746 (frob_specs): Eliminate use of used_extern_spec.
8747 (.hush_warning): Likewise.
8749 2002-07-07 Mark Mitchell <mark@codesourcery.com>
8751 * Make-lang.in (cp/parse.o): Depend on decl.h.
8752 * cp-tree.h (do_decl_instantiation): Change prototype.
8753 * parse.y: Include decl.h.
8754 (parse_decl_instantiation): New function.
8755 (explicit_instantiation): Use it.
8756 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
8759 2002-07-07 Roger Sayle <roger@eyesopen.com>
8761 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
8762 constructor and destructor tests when passed a TEMPLATE_DECL.
8764 2002-07-05 Jason Merrill <jason@redhat.com>
8766 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
8769 PR optimization/7145
8770 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
8772 2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
8774 Repair damage on weak-impared targets caused by my previous patch.
8775 * cp-tree.h (import_export_tinfo): Add parameter.
8776 * decl2.c (import_export_tinfo): Add parameter, post adjust
8778 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
8779 import_export_tinfo.
8781 2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8784 * init.c (build_aggr_init): Remove qualifiers of init before calling
8786 (build_vec_init): Flatten multi-dimensional array during cleanup.
8787 (build_vec_delete_1): Abort if the type of each element is array.
8789 2002-07-03 Graham Stott <graham.stott@btinternet.com>
8791 * pt.c (instantiate_class_template): Fix typo.
8793 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8795 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
8796 by CVS conflict in my last patch.
8798 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8801 * pt.c (can_complete_type_without_circularity): New function.
8802 (instantiate_class_template): Use it.
8803 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
8804 message due to incomplete fields.
8806 2002-07-01 Mark Mitchell <mark@codesourcery.com>
8809 * mangle.c (write_expression): Add mangling for sizeof when
8811 * operators.def: Remove stale comment.
8813 2002-06-30 Nathan Sidwell <nathan@codesourcery.com>
8815 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
8816 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
8817 (tinfo_decl_type): Replace with ...
8818 (type_info_ptr_type): ... this.
8819 (import_export_tinfo): Declare.
8820 (tinfo_decl_p): Rename to ...
8821 (unemitted_tinfo_decl_p): ... this.
8822 * decl2.c (import_export_decl): Break out tinfo handling into ...
8823 (import_export_tinfo): ... here. New function.
8824 (finish_file): Adjust.
8825 * rtti.c (TINFO_REAL_NAME): New macro.
8826 (init_rtti_processing): Create the tinfo types.
8827 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
8828 (get_tinfo_decl): Adjust.
8829 (get_tinfo_ptr): New function.
8830 (get_type_id): Use it.
8831 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
8832 (ptr_initializer): Use get_tinfo_ptr.
8833 (ptm_initializer): Likewise.
8834 (synthesize_tinfo_var): Break into ...
8835 (get_pseudo_ti_init): ... this. Just create the initializer.
8836 (get_pseudo_ti_desc): .. and this.
8837 (create_real_tinfo_var): Remove.
8838 (create_pseudo_type_info): Don't create the vtable decl here.
8839 (get_vmi_pseudo_type_info): Remove.
8840 (create_tinfo_types): Adjust.
8841 (tinfo_decl_p): Rename to ...
8842 (unemitted_tinfo_decl_p): ... here. Adjust.
8843 (emit_tinfo_decl): Adjust. Create the initializer.
8845 2002-06-27 Mark Mitchell <mark@codesourcery.com>
8848 * pt.c (tsubst_friend_class): Substitute into the context of the
8849 friend before using it.
8851 2002-06-26 Mark Mitchell <mark@codesourcery.com>
8853 * cp-tree.h (xref_tag): Change prototype.
8854 (handle_class_head): Likewise.
8855 (build_x_component_ref): Likewise.
8856 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
8857 (xref_tag): Take attributes as a separate parameter.
8858 (xref_tag_from_type): Adjust call to xref_tag.
8859 * decl2.c (build_expr_from_tree): Adjust call to
8860 build_x_component_ref.
8861 (handle_class_head): Take attributes as a separate parameter.
8862 * parse.y (parse_xref_tag): New function.
8863 (parse_handle_class_head): Likewise.
8864 (primary): Use parse_xref_tag.
8865 (class_head_decl): Use parse_handle_class_head.
8866 (class_head_defn): Likewise.
8867 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
8868 (build_dynamic_cast_1): Likewise.
8869 (create_pseudo_type_info): Likewise.
8870 (emit_support_tinfos): Likewise.
8871 * typeck.c (build_object_ref): Adjust call to
8872 build_x_component_ref.
8873 (build_x_component_ref): Remove protect parameter.
8875 2002-06-25 Mark Mitchell <mark@codesourcery.com>
8877 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
8878 * class.c (handle_using_decl): Likewise.
8879 (instantiate_type): Likewise.
8880 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
8881 (xref_basetypes): Change prototype.
8882 (begin_mem_initializers): New function.
8883 (get_overloaded_fn): Likewise.
8884 * decl.c (xref_basetypes): Simplify.
8885 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
8886 * init.c (build_offset_ref): Likewise.
8887 * parse.y (base_init): Use begin_mem_initializers().
8888 (structsp): Adjust call to xref_basetypes.
8889 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
8890 (instantiate_class_template): Adjust call to xref_basetypes.
8891 * semantics.c (begin_mem_initializers): New function.
8892 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
8893 (really_overloaded_fn): Likewise.
8894 (get_overloaded_fn): New function.'
8895 (get_first_fn): USe BASELINK_FUNCTIONS.
8897 2002-06-24 Mark Mitchell <mark@codesourcery.com>
8899 * cp-tree.h (SCALAR_TYPE_P): New macro.
8900 (check_for_out_of_scope_variable): New function.
8901 (at_class_scope_p): Likewise.
8902 (finish_fname): Likewise.
8903 * class.c (finish_struct): Use at_function_scope_p.
8904 * decl.c (check_for_out_of_scope_variable): New function, split
8905 out from do_identifier.
8906 (finish_enum): Use at_function_scope_p.
8907 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
8908 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
8909 (primary): Use at_function_scope_p.
8910 * search.c (at_class_scope_p): New function.
8911 * semantics.c (finish_fname): Likewise.
8912 (check_multiple_declarators): Use at_function_scope_p.
8914 2002-06-23 Mark Mitchell <mark@codesourcery.com>
8916 * parse.y (parse_scoped_id): New function.
8918 * cp-tree.h (do_scoped_id): Adjust declaration.
8919 * lex.c (do_scoped_id): Remove call to yylex.
8920 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
8921 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
8922 expanding it inline.
8924 2002-06-23 Matt Thomas <matt@3am-software.com>
8926 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
8929 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8931 * mangle.c (integer_type_codes): Const-ify.
8933 2002-06-20 Richard Henderson <rth@redhat.com>
8936 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
8937 Call put_var_into_stack.
8939 2002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8941 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
8942 array size calculation.
8944 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8947 * pt.c (tsubst_expr): Handle FILE_STMT.
8949 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8952 * pt.c (lookup_template_class): Don't build complete argument of
8953 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
8956 2002-06-19 Akim Demaille <akim@epita.fr>
8958 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
8960 * spew.c, lex.c: Adjust.
8961 * parse.y (explicit_instantiation): Add empty action to override
8962 the default $$ = $1 where it introduces a type clash.
8964 2002-06-14 Jason Merrill <jason@redhat.com>
8966 * semantics.c (begin_for_stmt): Push the 'for' scope before
8967 adding the FOR_STMT.
8970 * class.c (build_base_field): Set DECL_PACKED.
8971 (layout_class_type): Don't use tail padding of PODs.
8972 * mangle.c (write_unqualified_name): Fix template conversion op
8975 2002-06-16 Richard Henderson <rth@redhat.com>
8978 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
8979 after template instantiation.
8981 2002-06-16 Richard Henderson <rth@redhat.com>
8983 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
8985 2002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
8987 * cp-tree.h (compiler_error): Remove declaration.
8988 * lex.c (compiler_error): Remove definition.
8990 2002-06-14 Steve Ellcey <sje@cup.hp.com>
8992 * g++spec.c (LIBUNWIND): New.
8993 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
8995 2002-06-13 Jessica Han <jessica@cup.hp.com>
8997 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
8998 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
8999 (build_vbase_offset_vtbl_entries): Likewise.
9000 * rtti.c (build_headof): Likewise.
9001 (get_tinfo_decl_dynamic): Likewise.
9002 (create_pseudo_type_info): Likewise.
9004 2002-06-12 Stan Shebs <shebs@apple.com>
9006 * mpw-config.in: Remove file, no longer used.
9007 * mpw-make.sed: Ditto.
9009 2002-06-07 Zack Weinberg <zack@codesourcery.com>
9011 * decl2.c: Update call to cpp_handle_option.
9013 2002-06-07 H.J. Lu (hjl@gnu.org)
9015 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
9017 2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
9019 * error.c (cp_error_at): Fix typo.
9021 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
9023 * error.c (cp_diagnostic_starter): Adjust call.
9024 (maybe_print_instantiation_context): Change prototype to take a
9025 'diagnostic_info *'.
9026 (print_instantiation_full_context): Likewise.
9027 (print_instantiation_partial_context): Likewise.
9028 (cp_diagnostic_starter): Likewise.
9029 (cp_diagnostic_finalizer): Likewise.
9030 (cp_print_error_function): Likewise.
9031 (cp_printer): Take a secondary parameter as a 'text_info *'.
9032 Remove output_state savings. Adjust calls.
9034 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
9036 * pt.c (inline_parm_levels): Mark for GC.
9038 * mangle.c (start_mangling): Allocate G.substitutions here...
9039 (init_mangle): ... rather than here.
9040 (finish_mangling): Clear the varray pointer when done with it.
9041 * spew.c (yylexstring): Don't use VARRAY_FREE.
9042 * search.c (bfs_walk): Don't use VARRAY_FREE.
9043 * decl2.c (pending_statics): Use gengtype to mark.
9044 (deferred_fns): Likewise.
9045 (ssdf_decls): Likewise.
9046 (init_decl2): Delete.
9047 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
9048 (cxx_init_decl_processing): Don't call init_decl2.
9049 (cxx_pop_function_context): Don't use VARRAY_FREE.
9050 * cp-tree.h (struct saved_scope): No need for special marking
9052 (struct language_function): Likewise.
9053 (local_classes): Use gengtype to mark.
9054 (init_decl2): Delete prototype.
9055 * class.c (init_class_processing): Don't use
9056 ggc_add_tree_varray_root.
9057 (build_vtbl_initializer): Don't use VARRAY_FREE.
9059 * decl.c (typename_compare): Don't use same_type_p.
9061 * decl.c: Include hashtab.h instead of hash.h.
9062 (typename_hash): Update to use htab_h.
9063 (typename_compare): Likewise.
9064 (typename_htab): Use gengtype to mark.
9065 (build_typename_type): Update to use htab_h.
9066 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
9068 * Make-lang.in (gt-cp-tree.h): New rule.
9069 (cp/tree.o): Depend on gt-cp-tree.h.
9070 * config-lang.in (gtfiles): Add cp/tree.c.
9071 * tree.c: Include gt-cp-tree.h.
9072 (list_hash_table): Use gengtype to mark.
9073 (init_tree): Use gengtype to mark trees.
9075 * Make-lang.in (cp/decl.o): Add debug.h dependency.
9076 * call.c (struct z_candidate): Use gengtype.
9077 (USER_CONV_CAND): Use WRAPPER_ZC.
9078 (convert_class_to_reference): Use build_zc_wrapper.
9079 (build_type_conversion_1): Likewise.
9080 (build_over_call): Use WRAPPER_ZC.
9081 (add_warning): Use build_zc_wrapper.
9082 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
9083 * cp-tree.h (struct lang_identifier): Use gengtype.
9084 (struct template_parm_index_s): Likewise.
9085 (struct ptrmem_cst): Likewise.
9086 (struct tree_binding): Likewise.
9087 (struct tree_overload): Likewise.
9088 (struct tree_srcloc): Likewise.
9089 (struct tree_wrapper): Likewise. Also modify to have a pointer
9090 to struct z_candidate rather than void.
9091 (enum cp_tree_node_structure_enum): New.
9092 (union lang_tree_node): New.
9093 (cxx_mark_tree): Delete prototype.
9094 (cp_tree_node_structure): New prototype.
9095 (build_ptr_wrapper): Delete prototype.
9096 (build_int_wrapper): Delete prototype.
9097 (build_zc_wrapper): New prototype.
9098 * decl.c: Include debug.h
9099 (cxx_mark_tree): Delete.
9100 (cp_tree_node_structure): New.
9101 * tree.c (build_ptr_wrapper): Delete.
9102 (build_int_wrapper): Delete.
9103 (build_zc_wrapper): New.
9105 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
9106 Correct typo. Patch from k_fukui@highway.ne.jp.
9108 * semantics.c (current_stmt_tree): Update for change to
9109 struct language_function.
9110 (finish_mem_initializers): Likewise.
9111 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
9112 * cp-tree.h (struct language_function): Rename from
9113 cp_language_function. Change all uses.
9114 (cp_function_chain): Don't need to cast.
9116 * class.c (duplicate_tag_error): Reset discriminator.
9117 (check_bases_and_members): Update for data structure changes.
9118 * cp-tree.h (struct lang_id2): Use gengtype.
9119 (flagged_type_tree): Likewise.
9120 (SET_LANG_ID): Use GGC on struct lang_id2.
9121 (struct cp_language_function): Use gengtype. Remove field
9122 'x_vcalls_possible_p'.
9123 (current_vcalls_possible_p): Delete.
9124 (struct lang_type_header): New.
9125 (struct lang_type_class): Rename from struct lang_type. Include
9126 struct lang_type_header.
9127 (struct lang_type_ptrmem): New.
9128 (struct lang_type): New.
9129 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
9130 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
9131 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
9132 (struct lang_decl_flags): Use gengtype. Add discriminators.
9133 (struct lang_decl): Use gengtype. Add and use discriminators.
9134 Update the macros that reference moved fields.
9135 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
9136 (SET_DECL_THUNK_P): Set discriminator too.
9137 (clear_inline_text_obstack): Delete prototype.
9138 (finish_inline_definitions): Delete prototype.
9139 (mark_pending_inlines): Delete prototype.
9140 (lang_check_failed): New prototype.
9141 * decl.c (struct named_label_use_list): Use gengtype.
9142 (struct named_label_list): Likewise.
9143 (mark_binding_level): Delete.
9144 (mark_named_label_lists): Delete.
9145 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
9146 (cxx_init_decl_processing): Use generated marker routine.
9147 (begin_destructor_body): Delete dead set to
9148 current_vcalls_possible_p.
9149 (mark_lang_function): Delete.
9150 (mark_cp_function_context): Delete.
9151 (lang_mark_tree): Use generated marker routines.
9152 * decl2.c (start_objects): Set discriminator when setting
9153 GLOBAL_INIT_PRIORITY.
9154 * lex.c (retrofit_lang_decl): Set discriminators.
9155 (copy_lang_type): Update for changes to lang_type structure.
9156 (cp_make_lang_type): Set discriminator.
9157 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
9158 * search.c: Include ggc.h.
9159 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
9160 (finish_inline_definitions): Delete.
9161 * spew.c (struct token): Use gengtype.
9162 (struct token_chunk): New.
9163 (struct unparsed_text): Use gengtype. Store tokens in chunks.
9164 (struct feed): Use gengtype.
9165 (feed_obstack): Delete.
9166 (feed): Mark as GC root.
9167 (pending_inlines): Mark as GC root.
9168 (pending_inlines_tail): Likewise.
9169 (processing_these_inlines): Likewise.
9170 (token_obstack): Make static.
9171 (first_token): Likewise.
9172 (init_spew): Don't initialize deleted things; use gengtype for roots.
9173 (clear_inline_text_obstack): Delete.
9174 (feed_input): Use GC for struct feed. Update for changes to
9175 struct unparsed_text.
9176 (mark_pending_inlines): Delete.
9177 (next_token): Rename from add_token. Change all callers. Update
9178 for changes to struct unparsed_text.
9179 (space_for_token): New.
9180 (remove_last_token): New.
9181 (alloc_unparsed_text): New.
9182 (snarf_block): Take an unparsed_text. Update for changes to struct
9184 (snarf_method): Update for changes to struct unparsed_text.
9185 (snarf_defarg): Update for changes to struct unparsed_text.
9186 * tree.c (lang_check_failed): New.
9188 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
9189 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
9190 (cp/spew.o): Add dependency on gt-<filename>.h.
9191 (cp/decl2.o): Add dependency on gt-<filename>.h.
9192 (cp/call.o): Add dependency on gt-<filename>.h.
9193 (cp/pt.o): Add dependency on gt-<filename>.h.
9194 (cp/repo.o): Add dependency on gt-<filename>.h.
9195 (cp/parse.o): Add dependency on gt-<filename>.h.
9196 * call.c: Use gengtype for roots.
9197 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
9198 decl2.c parse.y pt.c repo.c spew.c.
9199 * cp-tree.h: Use gengtype for roots.
9200 (struct saved_scope): Use GGC, gengtype.
9201 (cp_parse_init): Delete prototype.
9202 (init_pt): Delete prototype.
9203 * decl.c: Use gengtype for roots.
9204 (mark_saved_scope): Delete.
9205 (cxx_init_decl_processing): Don't call deleted initilisation
9207 (signed_size_zero_node): Delete, unused.
9208 * decl.h: Use gengtype for roots.
9209 * decl2.c: Use gengtype for roots.
9210 * lex.h: Use gengtype for roots.
9211 * parse.y: Use gengtype for roots.
9212 (cp_parse_init): Delete.
9213 * pt.c: Use gengtype for roots.
9215 * repo.c: Use gengtype for roots.
9216 * spew.c: Use gengtype for roots.
9218 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
9219 (cp/decl.o): Add dependency on gtype-cp.h.
9220 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
9221 Include gtype-cp.h. Allow for filename changes.
9223 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
9224 (cp/decl.o): Add cp/gt-decl.h dependency.
9225 * config-lang.in (gtfiles): New.
9226 * tree.h: Rename struct binding_level to struct cp_binding_level.
9227 * decl.c: Rename struct binding_level to struct cp_binding_level.
9228 Include cp/gt-decl.h.
9229 (struct cp_binding_level): Use gengtype.
9230 (make_binding_level): Use GGC on struct cp_binding_level.
9231 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
9232 (cxx_init_decl_processing): Mark free_binding_level as
9235 * decl.c (mark_cp_function_context): Update calling sequence.
9237 * decl.c (start_function): Don't free 'struct
9238 cp_language_function'.
9239 (pop_cp_function_context): Likewise.
9240 (save_function_data): Allocate it using GC.
9241 * semantics.c (genrtl_start_function): Don't free 'struct
9242 cp_language_function'.
9244 2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
9246 * lang-specs.h: Use cpp_debug_options.
9248 2002-05-28 Zack Weinberg <zack@codesourcery.com>
9250 * mangle.c, tree.c: Include real.h.
9251 * Make-lang.in: Update dependency lists.
9253 2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
9255 * lex.c: Don't include c-lex.h.
9256 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
9258 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
9260 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
9262 2002-05-22 Richard Henderson <rth@redhat.com>
9264 * decl.c (obscure_complex_init): Check for VAR_DECL
9265 before using DECL_THREAD_LOCAL.
9267 2002-05-22 Richard Henderson <rth@redhat.com>
9269 * decl.c (check_tag_decl): Handle RID_THREAD.
9270 (obscure_complex_init): Reject run-time init of tls.
9271 (grokvardecl, grokdeclarator): Handle RID_THREAD.
9272 * lex.c (reswords): Add __thread.
9273 (rid_to_yy): Map RID_THREAD to SCSPEC.
9275 2002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
9277 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
9278 * cp-tree.h (cxx_post_options): Kill.
9279 * cp-lex.c (cxx_post_options): Kill.
9281 2002-05-21 Richard Henderson <rth@redhat.com>
9283 * lex.c (rid_to_yy): Add RID_THREAD.
9285 2002-05-21 Alexandre Oliva <aoliva@redhat.com>
9287 * init.c (build_vec_init): Test for trivial copy-assignment when
9288 copy-assigning arrays.
9290 2002-05-20 Andreas Jaeger <aj@suse.de>
9292 * init.c (build_default_init): Remove unused variable.
9294 2002-05-20 Alexandre Oliva <aoliva@redhat.com>
9296 * call.c (any_strictly_viable): New.
9297 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
9299 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9301 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
9303 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9306 * pt.c (do_decl_instantiation): Don't complain explicit
9307 instantiation after explicit specialization.
9308 (do_type_instantiation): Likewise.
9310 2002-05-19 Alexandre Oliva <aoliva@redhat.com>
9312 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
9314 (complete_type_or_else): ... this. Redefined as macro.
9315 (cxx_incomplete_type_diagnostic): Declare.
9316 (cxx_incomplete_type_error): Define as macro.
9317 * init.c (build_delete): Warn about incomplete types other than
9318 void, and use the built-in operator delete for them.
9319 * typeck.c (complete_type_or_diagnostic): Renamed from
9320 complete_type_or_else. Added warn_only argument, passed to...
9321 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
9322 warnings or errors depending on new warn_only argument. Renamed
9324 (cxx_incomplete_type_error): ... this. New implementation in
9325 terms of cxx_incomplete_type_diagnostic.
9327 2002-05-18 Jason Merrill <jason@redhat.com>
9330 * decl2.c (import_export_decl): If we clear
9331 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
9333 2002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9336 * pt.c (verify_class_unification): Don't check if PARM is template
9337 parameter dependent. Simplify.
9338 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
9339 parameter dependent expression.
9341 2002-05-14 Jason Merrill <jason@redhat.com>
9343 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
9345 (synthesize_tinfo_var): Take the public decl.
9346 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
9347 (emit_tinfo_decl): Adjust. Call import_export_decl.
9348 * decl2.c (import_export_decl): Simplify tinfo decl handling.
9350 2002-05-14 Alexandre Oliva <aoliva@redhat.com>
9352 * cp-tree.h (struct lang_type): Added non_zero_init.
9353 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
9354 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
9355 * class.c (check_field_decls): Test non_zero_init.
9356 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
9357 zero-to-NULL conversions.
9358 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
9359 type that needs zero-initialization without zeros.
9360 (check_initializer_decl): Compute zero-initializer for types
9361 that require a non-trivial one.
9362 * init.c (build_forced_zero_init): New function.
9363 (build_default_init): Use it.
9364 * tree.c (zero_init_p): New function.
9365 * typeck2.c (force_store_init_value): New function.
9366 (process_init_constructor): Create non-trivial zero-initializers
9367 for array members and class fields.
9369 2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
9371 * lang-specs.h: Remove redundant -lang-c++.
9373 2002-05-13 Jason Merrill <jason@redhat.com>
9375 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
9376 (fixed_type_or_null): See through reference vars.
9377 (build_base_path): Vtable contents are constant.
9378 * typeck.c (get_member_function_from_ptrfunc): Likewise.
9380 2002-05-12 Jason Merrill <jason@redhat.com>
9382 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
9385 2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
9387 * cp-tree.h (flag_ansi): Remove.
9388 * decl2.c (flag_ansi): Remove.
9389 (cxx_decode_option): Set flag_iso and flag_undef.
9391 2002-05-09 Jason Merrill <jason@redhat.com>
9393 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
9394 Use subtraction rather than a bitmask to get the index.
9395 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
9397 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
9399 2002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
9401 * Make-lang.in (decl2.o): Update.
9402 * cp-tree.h (warn_multichar): Remove.
9403 * decl2.c: Include c-common.h.
9404 (warn_multichar): Remove.
9406 2002-05-03 Jason Merrill <jason@redhat.com>
9408 * tree.c (build_cplus_array_type): Only const and volatile get
9411 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
9413 2002-04-30 Mark Mitchell <mark@codesourcery.com>
9415 ABI change, returning simple classes from functions.
9416 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
9417 TYPE_HAS_TRIVIAL_INIT_REF is false or
9418 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
9420 2002-04-30 Jason Merrill <jason@redhat.com>
9423 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
9424 anonymous class with a typedef if there are attributes.
9426 2002-04-29 Paul Eggert <eggert@twinsun.com>
9428 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
9430 2002-04-29 Jakub Jelinek <jakub@redhat.com>
9433 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
9436 2002-04-29 Mark Mitchell <mark@codesourcery.com>
9439 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
9440 enter that scope before name lookup.
9443 * method.c (do_build_copy_constructor): Avoid building
9444 cv-qualified reference types.
9446 2002-04-29 Nathan Sidwell <nathan@codesourcery.com>
9449 * decl.c (grok_op_properties): Assignment ops don't have to return
9450 by value. operator% should.
9452 2002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
9455 * decl.c (duplicate_decls): Call merge_weak.
9457 2002-04-26 Richard Henderson <rth@redhat.com>
9459 * parse.y (malloced_yyss, malloced_yyvs): New.
9460 (yyoverflow): Re-add. Set them.
9461 (free_parser_stacks): New.
9463 2002-04-26 Mark Mitchell <mark@codesourcery.com>
9466 * method.c (do_build_assign_ref): Pass a derivation to
9467 build_method_call when calling base class assignment operators.
9469 2002-04-26 Richard Henderson <rth@redhat.com>
9471 * parse.y (yyoverflow): Revert.
9473 2002-04-26 Richard Henderson <rth@redhat.com>
9476 * parse.y (string): Remove. Update all uses to use STRING
9477 instead, and not call combine_strings.
9478 * rtti.c (tinfo_name): Use fix_string_type.
9479 * semantics.c (finish_asm_stmt): Don't call combine_strings.
9480 * spew.c (yylexstring): New.
9481 (read_token): Use it.
9483 2002-04-25 Richard Henderson <rth@redhat.com>
9486 * parse.y (yyoverflow): New.
9488 2002-04-25 Jason Merrill <jason@redhat.com>
9491 * search.c (check_final_overrider): No longer static.
9492 * class.c (update_vtable_entry_for_fn): Call it.
9493 * cp-tree.h: Adjust.
9495 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
9497 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
9498 * cp-tree.h (cxx_set_yydebug): Die.
9499 * lex.c (YYDEBUG): Get from c-lex.h.
9500 (cxx_set_yydebug): Remove.
9501 * parse.y: Include c-lex.h.
9502 (YYDEBUG): Get from c-lex.h.
9504 2002-04-24 Mark Mitchell <mark@codesourcery.com>
9507 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
9510 2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
9512 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
9513 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
9515 * cp-tree.h (cp_attribute_table): Rename.
9516 * decl.c (lang_attribute_table): Remove declaration.
9517 (cxx_init_decl_processing): Don't set it.
9518 * tree.c (cp_attribute_table): Rename.
9520 2002-04-24 Jason Merrill <jason@redhat.com>
9523 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
9524 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
9525 The pedwarn for array assignment is now unconditional.
9526 * tree.c (build_cplus_array_type_1): Still process simple array types
9527 normally in templates.
9530 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
9533 2002-04-23 Jakub Jelinek <jakub@redhat.com>
9535 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
9536 node with attributes.
9538 2002-2-23 David O'Brien <obrien@FreeBSD.org>
9540 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
9541 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
9543 2002-04-23 Mark Mitchell <mark@codesourcery.com>
9546 * pt.c (tsubst_friend_class): Handle templates with explicit
9550 * typeck.c (merge_types): Remember the cv-qualification of pointer
9551 types when merging them.
9553 2002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
9555 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
9556 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
9557 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
9558 cxx_mark_function_context): New.
9559 * decl.c (push_cp_function_context, pop_cp_function_context,
9560 mark_cp_function_context): Rename for consistency.
9561 (cxx_init_decl_processing): Don't set old hooks.
9563 2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
9565 * call.c (convert_type_from_ellipsis): Rename, update.
9566 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
9567 * cp-tree.h (convert_type_from_ellipsis): Rename.
9568 * decl.c (cxx_init_decl_processing): Don't set hook.
9570 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
9572 * call.c (build_new_method_call): Update.
9573 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
9574 * cp-tree.h (cxx_incomplete_type_error): New.
9575 * decl.c (grokdeclarator, grokparms): Update.
9576 * decl2.c (check_classfn): Update.
9577 * pt.c (tsubst): Update.
9578 * typeck.c (complete_type_or_else, expr_sizeof,
9579 decay_conversion): Update.
9580 * typeck2.c (incomplete_type_error): Rename.
9581 (add_exception_specifier): Update.
9583 2002-04-18 Jason Merrill <jason@redhat.com>
9586 * search.c (setup_class_bindings): A class template qualifies as a
9589 2002-04-17 Jakub Jelinek <jakub@redhat.com>
9592 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
9595 2002-04-16 Mark Mitchell <mark@codesourcery.com>
9597 * init.c (begin_init_stmts): Remove commented out code.
9598 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
9599 * semantics.c (begin_gobal_stmt_expr): Adjust call to
9600 expand_start_stmt_expr.
9602 2002-04-15 Mark Mitchell <mark@codesourcery.com>
9604 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
9605 dso_handle itself, to __cxa_atexit.
9607 2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9609 * error.c (cxx_print_error_function): Adjust call to macros.
9611 2002-04-14 Jakub Jelinek <jakub@redhat.com>
9613 * class.c (layout_virtual_bases): Do all dsize computation on trees.
9615 2002-04-14 Jason Merrill <jason@redhat.com>
9617 * typeck.c (get_member_function_from_ptrfunc): Don't do
9618 gratuitious division and multiplication on
9619 ptrmemfunc_vbit_in_delta targets.
9621 2002-04-12 Mark Mitchell <mark@codesourcery.com>
9624 * semantics.c (finish_expr_stmt): Remember the type of the
9625 expression before any conversions are performed.
9627 2002-04-12 Mark Mitchell <mark@codesourcery.com>
9630 * call.c (add_template_candidate_real): Do not treat member
9631 templates as copy constructors.
9633 2002-04-12 Mark Mitchell <mark@codesourcery.com>
9635 * decl.c (duplicate_decls): Do not copy the RTL for a variable
9636 declaration if the old variable had an incomplete type and the new
9638 (complete_vars): Do not call layout_decl for completed variables.
9640 2002-04-12 Richard Sandiford <rsandifo@redhat.com>
9642 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
9643 with an explicit one.
9644 (follow_tag_typedef): New.
9645 (lookup_tag): Use it to extract the tag of an explicit typedef.
9646 (xref_tag): Likewise.
9648 2002-04-11 Andrew Haley <aph@redhat.com>
9650 * typeck.c (type_after_usual_arithmetic_conversions):
9651 If two types have the same variant, return immediately.
9652 When two floating-point operands are the same precision:
9653 convert to float if one of the operands is float;
9654 if neither operand is one of the standard types, return the type
9655 of the first operand.
9657 2002-04-10 Nathan Sidwell <nathan@codesourcery.com>
9660 * decl.c (make_typename_type): Remove implicit typenameness.
9662 2002-04-09 Jason Merrill <jason@redhat.com>
9664 PR optimization/6189
9665 * semantics.c (genrtl_start_function): Don't free
9666 DECL_SAVED_FUNCTION_DATA for inline functions.
9668 * init.c (build_member_call): For now, don't convert to
9669 intermediate base if it would cause an error.
9671 2002-04-08 Paolo Carlini <pcarlini@unitus.it>
9673 * parse.y (namespace_qualifier, maybe_identifier,
9674 begin_explicit_instantiation, end_explicit_instantiation,
9675 apparent_template_type, .finish_template_type,
9676 do_id, maybe_init, defarg_again, component_decl_1):
9677 Add ending ';', in accordance with POSIX.
9679 2002-04-06 Mark Mitchell <mark@codesourcery.com>
9682 * class.c (layout_class_type): Remember incomplete static
9684 (finish_struct_1): Call complete_vars, not
9685 hack_incomplete_structures.
9686 * cp-tree.h (hack_incomplete_structures): Rename to ...
9687 (complete_vars): ... this.
9688 (struct saved_scope): Remove incomplete.
9689 (namespace_scope_incomplete): Remove.
9690 * decl.c (struct binding_level): Remove incomplete.
9691 (incomplete_vars): New variable.
9692 (mark_binding_level): Don't mark incomplete.
9693 (print_binding_level): Don't print it.
9694 (mark_saved_scope): Don't mark incomplete.
9695 (pushdecl): Use maybe_register_incopmlete_var.
9696 (cxx_init_decl_processing): Register incomplete_vars for GC.
9697 (start_decl_1): Clarify error message.
9698 (hack_incomplete_vars): Remove.
9699 (maybe_register_incomplete_var): New function.
9700 (complete_vars): Likewise.
9702 2002-04-06 Jason Merrill <jason@redhat.com>
9705 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
9706 set before checking it.
9709 * init.c (build_member_call): Use build_scoped_ref.
9710 (resolve_offset_ref): Likewise.
9711 * call.c (build_scoped_method_call): Likewise.
9712 * tree.c (maybe_dummy_object): Kludge around current_class_type being
9714 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
9715 * cp-tree.h: Adjust.
9717 * init.c (push_base_cleanups): Just use build_scoped_method_call.
9720 * method.c (implicitly_declare_fn): Pass unqualified type to
9721 synthesize_exception_spec.
9723 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
9725 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
9726 * cvt.c: Update comment.
9727 * init.c (expand_cleanup_for_base): Update.
9728 * semantics.c (finish_parenthesized_expr): Update.
9729 * typeck.c (cp_truthvalue_conversion): Update.
9731 2002-04-04 Jason Merrill <jason@redhat.com>
9733 * semantics.c (finish_eh_cleanup): New fn.
9734 * cp-tree.h: Add prototype.
9735 * init.c (perform_member_init, expand_cleanup_for_base): Use
9737 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
9738 * cp-tree.h: Remove references.
9739 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
9740 * dump.c (cp_dump_tree): Likewise.
9741 * pt.c (tsubst_expr): Likewise.
9742 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
9743 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
9744 * tree.c (cp_statement_code_p): Likewise.
9746 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
9749 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
9753 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
9755 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
9757 2002-04-03 Richard Henderson <rth@redhat.com>
9759 * cp-lang.c (cxx_warn_unused_global_decl): New.
9760 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
9762 2002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
9764 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
9765 * tree.c (init_tree): Don't set hook.
9767 2002-04-03 Roger Sayle <roger@eyesopen.com>
9770 * decl.c (duplicate_decls): Don't mess with assembler names when
9771 redeclaring builtin functions as static.
9773 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9775 * call.c (build_addr_func): Update.
9776 * class.c (resolve_address_of_overloaded_function): Update.
9777 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
9778 * cp-tree.h (cxx_mark_addressable): New.
9779 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
9780 * decl2.c (build_cleanup): Update.
9781 * except.c (build_throw): Update.
9782 * init.c (resolve_offset_ref): Update.
9783 * pt.c (convert_nontype_argument): Update.
9784 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
9785 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
9786 unary_complex_lvalue): Update.
9787 (mark_addressable): Rename.
9789 2002-04-01 Roger Sayle <roger@eyesopen.com>
9792 * decl.c (duplicate_decls): Overwrite the RTL when (and only
9793 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
9794 but follow the SET_DECL_RTL idiom used elsewhere in the function.
9796 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9798 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
9799 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
9800 * decl.c (grokdeclarator): Update.
9801 * mangle.c (write_integer_cst): Update.
9802 * typeck.c (build_binary_op): Update.
9804 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
9806 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
9807 * lex.c (cxx_init): Don't set hook.
9809 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
9811 * Make-lang.in (error.o): Update.
9812 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
9813 * cp-tree.h (struct diagnostic_context): Predeclare.
9814 (cxx_print_error_function): New.
9815 * error.c: Include langhooks-def.h.
9816 (lang_print_error_function): Rename. Update.
9817 (init_error): Don't set hook.
9819 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
9821 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
9823 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
9824 * decl.c (finish_enum): Similarly.
9825 * error.c (dump_type): Similarly.
9826 * lex.c (cxx_init): Similarly.
9827 * mangle.c (write_builtin_type): Similarly.
9828 * typeck.c (comptypes): Similarly.
9830 2002-03-28 Roger Sayle <roger@eyesopen.com>
9833 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
9834 in the g++ front-end.
9835 (duplicate_decl): Allow redefinition of anticipated built-ins.
9836 Fix inlining problem by over-writing the old DECL_RTL.
9837 (lookup_namespace_name): Fail to find an identifier in the
9838 specified namespace if its still anticipated.
9839 (builtin_function_1): New function split out from builtin_function
9840 to create a builtin in the current namespace with given context.
9841 (builtin_function): Call builtin_function_1 to define the
9842 appropriate builtins in both the std and global namespaces.
9843 (select_decl): Don't test for anticipated decls here.
9844 (unqualified_namespace_lookup): Instead ignore them whilst
9845 searching through scopes and namespaces.
9846 * decl2.c (do_nonmember_using_decl): If a using declaration
9847 specifies an anticipated built-in function, mark it as no longer
9848 anticipated in that scope.
9849 (ambiguous_decl): Avoid resolving to an anticipated decl.
9850 * lex.c (do_scoped_id): Fail to find an identifier in the global
9851 namespace if its still anticipated.
9853 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
9855 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
9856 * cp-tree.h (cp_make_lang_type): Rename.
9857 * lex.c (cp_make_lang_type): Rename.
9858 (make_aggr_type): Update.
9859 * tree.c (init_tree): Don't set make_lang_type_fn.
9861 2002-03-29 Jakub Jelinek <jakub@redhat.com>
9864 * class.c (finish_struct_1): Update static field's DECL_MODE even
9865 if its type is a variant of t.
9867 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
9869 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
9870 * cp-tree.h (cxx_insert_default_attributes): New.
9871 * decl.c (insert_default_attributes): Rename.
9873 2002-03-27 Mark Mitchell <mark@codesourcery.com>
9876 * call.c (build_op_delete_call): Allow for the fact the placement
9877 may be a COMPOUND_EXPR.
9879 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
9881 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
9882 * cp-tree.h (init_cplus_expand): Remove.
9883 (cxx_expand_expr): New.
9884 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
9886 (init_cplus_expand): Remove.
9887 * lex.c (cxx_init): Don't call init_cplus_expand.
9889 2002-03-26 Mark Mitchell <mark@codesourcery.com>
9892 * init.c (build_new_1): Allow for the fact the result of
9893 build_function_call may be a COMPOUND_EXPR.
9895 2002-03-26 Nathan Sidwell <nathan@codesourcery.com>
9898 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
9899 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9900 (dfs_skip_nonprimary_vbases_markedp): Remove.
9901 * search.c (get_shared_vbase_if_not_primary): Remove.
9902 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9903 (dfs_skip_nonprimary_vbases_markedp): Remove.
9904 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
9905 (dfs_marked_real_bases_queue_p): Likewise.
9907 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
9909 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
9910 * cp-tree.h (cxx_mark_tree): New.
9911 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
9913 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
9915 * cp-tree.h (cxx_maybe_build_cleanup): New.
9916 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
9917 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
9918 * tree.c (build_target_expr): Update.
9919 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
9921 2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
9923 * decl2.c (cxx_decode_option): Handle -E.
9924 * lang-specs.h (default_compilers): Preprocess with cc1plus.
9925 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
9927 2002-03-23 Jakub Jelinek <jakub@redhat.com>
9930 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
9932 2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9934 * error.c (dump_type): Be careful about implicit typenames.
9936 2002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9939 * semantics.c (finish_base_specifier): Handle erronous base
9942 2002-03-22 Zack Weinberg <zack@codesourcery.com>
9944 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
9947 2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
9949 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
9950 an index into the vtable_entry array regardless of
9951 TARGET_PTRMEMFUNC_VBIT_LOCATION.
9953 2002-03-21 Aldy Hernandez <aldyh@redhat.com>
9955 * tree.c (cp_cannot_inline_tree_fn): Same.
9957 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
9959 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
9960 insert_block, getdecls, global_bindings_p): New.
9962 2002-03-20 Nathan Sidwell <nathan@codesourcery.com>
9965 * mangle.c (struct globals) Add internal_mangling_p member.
9966 (write_template_param): Do internal mangling, if needed.
9967 (mangle_conv_op_name_for_type): Request internal mangling.
9969 2002-03-20 Jason Merrill <jason@redhat.com>
9972 * init.c (build_delete): Check access for a member op delete here.
9973 * decl2.c (delete_sanity): Not here.
9975 2002-03-19 Jason Merrill <jason@redhat.com>
9978 * class.c (get_vfield_name): Use the constructor_name.
9980 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
9982 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
9983 * cp-tree.h (lang_printable_name): Rename.
9984 * error.c (lang_decl_name): Use new hook.
9985 * lex.c (cxx_init): Remove old hook.
9986 * pt.c (tsubst_decl): Use new hook.
9987 * tree.c (lang_printable_name): Rename.
9989 2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
9992 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
9993 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
9994 only after recording the declaration.
9996 2002-03-18 Jason Merrill <jason@redhat.com>
9999 * init.c (resolve_offset_ref): Hand off to build_component_ref.
10001 PR c++/4222, c++/5995
10002 * call.c (build_over_call): Fix empty class logic.
10005 * cp-tree.h (struct saved_scope): Add last_parms field.
10006 * decl.c (maybe_push_to_top_level): Save last_function_parms.
10007 (pop_from_top_level): Restore it.
10010 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
10014 * pt.c (tsubst_friend_function): Use decl_namespace_context.
10016 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
10017 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
10018 type with a nontrivial destructor.
10020 2002-03-17 Jason Merrill <jason@redhat.com>
10023 * class.c (build_base_path): Virtual base layout is fixed in
10024 in-charge [cd]tors.
10026 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
10028 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
10029 * parse.y (yyparse): Remove macro.
10031 2002-03-17 Jason Merrill <jason@redhat.com>
10034 * init.c (build_new_1): Pass the right pointer to op delete.
10036 2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
10039 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
10040 conversion operators go.
10041 (struct lang_decl_flags): Add template_conv_p and unused
10043 (DECL_TEMPLATE_CONV_FN_P): New macro.
10044 * call.c (build_user_type_conversion_1): Don't check second type
10045 conversion of overload set first.
10046 * class.c (add_method): Make sure templated conversion operators
10047 all end up on slot 2.
10048 * lex.c (do_identifier): A conversion operator token might be
10049 satisfied by a templated conversion operator.
10050 * pt.c (check_explicit_specialization): Use
10051 CLASSTYPE_FIRST_CONVERSION_SLOT.
10052 (template_parm_this_level_p): New function.
10053 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
10054 * search.c (lookup_fnfields_1): Template conversions will be on
10056 * typeck.c (build_component_ref): Preserve the type of an
10057 conversion operator name on the overload type.
10058 (build_x_function_call): Retrieve the conversion operator name.
10060 2002-03-15 Richard Henderson <rth@redhat.com>
10062 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
10064 2002-03-15 Mark Mitchell <mark@codesourcery.com>
10066 * cp-tree.h (CLEANUP_DECL): Remove.
10067 (CLEANUP_EXPR): Likewise.
10068 * decl.c (destroy_local_var): Simplify.
10069 (maybe_build_cleanup): Tidy.
10070 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
10071 * semantics.c (cp_expand_stmt): Likewise.
10072 * cp/tree.c (cp_statement_code_p): Likewise.
10074 2002-03-15 Jason Merrill <jason@redhat.com>
10077 * decl.c (duplicate_decls): Use merge_types instead of common_type.
10078 * typeck.c (common_type): Just hand off to
10079 type_after_usual_arithmetic_conversions and
10080 composite_pointer_type.
10081 (merge_types): New fn.
10082 (commonparms): Use it instead of common_type.
10083 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
10084 (composite_pointer_type): Also handle attributes.
10085 * cp-tree.h: Declare merge_types.
10087 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
10089 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
10091 2002-03-14 Richard Henderson <rth@redhat.com>
10093 * decl.c: Include c-pragma.h.
10094 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
10095 * Make-lang.in: Update dependencies.
10097 2002-03-14 Jakub Jelinek <jakub@redhat.com>
10100 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
10101 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
10103 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
10105 * mangle.c (write_builtin_type): Handle 128-bit integers even if
10106 they are not a standard integer type.
10108 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
10110 * cp-tree.h (init_init_processing): Remove declaration.
10111 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
10112 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
10114 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10116 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
10118 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
10120 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
10121 cplus_tree_code_name): Delete.
10122 (cxx_init): Don't call add_c_tree_codes, instead set
10123 lang_unsafe_for_reeval. Don't try to copy into the various
10126 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
10129 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
10130 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
10133 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
10135 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
10136 DR209 is now not a defect.
10137 * cp-tree.h (skip_type_access_control): Remove.
10138 * decl.c (grokdeclarator): Do type access control for friend
10140 * semantics.c (decl_type_access_control): Don't reset
10141 current_type_lookups.
10142 (save_type_access_control): Always save the lookups.
10143 (skip_type_access_control): Remove.
10144 (finish_class_definition): Don't change type_lookups.
10146 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
10148 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
10150 * typeck.c (build_static_cast): Compare non-qualified types
10151 with pointer to member conversions.
10153 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
10154 Daniel Berlin <dan@dberlin.org>
10156 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
10157 (cxx_get_alias_set): Use it.
10159 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10161 * cp-tree.h (stabilize_expr): Prototype.
10163 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
10165 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
10166 conditional return void.
10168 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
10170 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
10171 * cp-tree.h (cxx_unsave): New.
10172 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
10173 (init_tree): Update.
10175 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10177 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
10178 explicit sizeof/sizeof.
10179 * decl2.c (cxx_decode_option): Likewise.
10180 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
10182 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
10185 * decl.c (lookup_tag): Only reject enum/class mismatch, not
10186 class/union mismatch.
10187 * parse.y (check_class_key): New function.
10188 (structsp): Call it.
10190 2002-03-01 Michael Matz <matz@suse.de>
10192 * typeck.c (cp_pointer_int_sum): Complete inner type which is
10193 used later by size_in_bytes().
10195 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
10197 * cp-tree.h: Require __GNUC__ to be #defined.
10198 (build_init): Add missing prototype.
10200 2002-03-01 Jason Merrill <jason@redhat.com>
10202 * except.c: Don't include decl.h or obstack.h. Do include
10204 (build_throw): Destroy temporaries from the thrown
10205 expression before calling __cxa_throw. Construct a thrown
10206 temporary directly into the exception object.
10207 (stabilize_throw_expr): New function.
10208 (wrap_cleanups_r): New function.
10209 * tree.c (stabilize_expr): New function.
10210 * init.c (build_init): New function.
10211 * Make-lang.in (cp/except.o): Adjust .h deps.
10213 2002-02-28 Jason Merrill <jason@redhat.com>
10215 * search.c (lookup_base_r): Don't clear is_non_public just because
10216 we found a friendly scope.
10218 * decl.c (finish_function): Only warn about missing return
10219 statement with -Wreturn-type.
10221 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
10223 * class.c (build_clone): Update.
10224 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
10225 * cp-tree.h (cxx_dup_lang_specific_decl): New.
10226 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
10227 (copy_decl): Update.
10228 * method.c (make_thunk): Update.
10230 2002-02-27 Zack Weinberg <zack@codesourcery.com>
10232 * decl2.c: Delete traditional-mode-related code copied from
10233 the C front end but not used, or used only to permit the
10236 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
10239 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
10242 2002-02-22 Jakub Jelinek <jakub@redhat.com>
10245 * semantics.c (finish_switch_cond): Don't call get_unwidened
10246 if error_mark_node.
10248 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
10250 PR c++/2645, DR 295
10251 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
10253 (make_typename_type): Use tsubst_flags_t.
10254 * decl.c (make_typename_type): Adjust. Return non-artificial
10255 TYPE_DECLs, if required.
10256 (grokdeclarator): Simplify CVR qualification handling. Allow bad
10257 qualifiers on typedef types.
10258 * decl2.c (handle_class_head): Adjust make_typename_type call.
10259 * parse.y (nested_name_specifier): Likewise.
10260 (typename_sub0): Likewise.
10261 (typename_sub1): Likewise.
10262 * pt.c (convert_template_argument): Adjust make_typename_type
10264 (tsubst): Adjust cp_build_qualified_type_real calls.
10265 (check_cv_quals_for_unify): Cope with allowing bad qualifications
10266 on template type parms.
10267 (instantiate_decl): Recheck substitutions to give warnings on bad
10269 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
10271 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
10273 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
10275 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
10276 unless DECL_ALWAYS_INLINE.
10278 2002-02-20 Jakub Jelinek <jakub@redhat.com>
10280 * typeck.c (cp_pointer_int_sum): Renamed from
10281 pointer_int_sum, call pointer_int_sum.
10283 2002-02-20 Jakub Jelinek <jakub@redhat.com>
10285 * decl.c (duplicate_decls): Return 0 if issued error about
10288 2002-02-19 Jason Merrill <jason@redhat.com>
10290 ABI change: Mangle `void (A::*)() const' as
10291 M1AKFvvE, not MK1AFvvE.
10292 * mangle.c (write_function_type): Write cv-quals for member
10293 function type here.
10294 (write_pointer_to_member_type): Not here.
10296 2002-02-18 Jason Merrill <jason@redhat.com>
10298 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
10299 (do_decl_instantiation): Likewise.
10301 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
10304 * decl.c (duplicate_decls): Make warning unconditional
10305 if duplicate default argument declarations are present.
10307 2002-02-17 Jakub Jelinek <jakub@redhat.com>
10309 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
10312 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
10314 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
10315 remove incorrect comment. Move #if 0'd code to common path. Use
10316 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
10318 2002-02-13 Jason Merrill <jason@redhat.com>
10320 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
10321 (finish_function): Don't warn if current_function_returns_null.
10323 * typeck2.c (digest_init): Do handle values of vector type.
10325 * typeck2.c (digest_init, process_init_constructor): Treat vectors
10328 2002-02-11 Jason Merrill <jason@redhat.com>
10330 * parse.y (reserved_declspecs): Don't handle attributes.
10331 (reserved_typespecquals): Handle them here.
10332 * Make-lang.in (parse.c): Adjust expected conflicts.
10334 2002-02-08 Jakub Jelinek <jakub@redhat.com>
10336 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
10337 instead of compstmt.
10338 (compstmt_or_stmtexpr): Renamed from compstmt.
10339 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
10341 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
10343 Rename instantiate_type_flags to tsubst_flags_t & expand use.
10344 * cp-tree.h (instantiate_type_flags): Rename to ...
10345 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
10346 add tf_warning flag.
10347 (instantiate_type): Adjust prototype.
10348 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
10349 do_type_instantiation, cp_build_qualified_type_real): Likewise.
10350 cp_build_qualified_type: Adjust.
10351 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
10353 * call.c (standard_conversion): Rename itf_* to tf_*.
10354 (reference_binding): Likewise.
10355 (convert_like_real): Likewise.
10356 * cvt.c (cp_convert_to_pointer): Likewise.
10357 (convert_to_reference): Likewise.
10358 * decl.c (lookup_namespace_name): Use tf_* flags.
10359 (make_typename_type): Likewise.
10360 (grokdeclarator): Likewise.
10361 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
10362 (coerce_template_template_parms, convert_template_argument,
10363 coerce_template_parms, maybe_get_template_decl_from_type_decl,
10364 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
10365 instantiate_class_template, tsubst_template_arg_vector,
10366 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
10367 tsubst_decl, tsubst_arg_types, tsubst_function_type,
10368 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
10369 instantiate_template, fn_type_unification,
10370 resolve_overloaded_unification, verify_class_unification,
10371 unify, get_bindings_real, do_type_instantiation,
10372 regenerate_decl_from_template, instantiate_decl,
10373 tsubst_initializer_list, tsubst_enum,
10374 get_mostly_instantiated_function_type,
10375 invalid_nontype_parm_type_p): Likewise.
10376 * tree.c (cp_build_qualified_type_real): Likewise.
10377 * typeck.c (build_binary_op): Rename itf_* to tf_*.
10378 (build_ptrmemfunc): Likewise.
10379 (convert_for_assignment): Likewise.
10381 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
10384 * decl.c (grokdeclarator): Allow friend declarations from
10386 * decl2.c (handle_class_head): Don't push into template parm contexts.
10387 * pt.c (push_template_decl_real): Template parm contexts are never
10390 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
10392 * class.c: Include target.h.
10393 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
10394 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
10396 * Make-lang.in: Adjust deps.
10398 2002-02-05 Jason Merrill <jason@redhat.com>
10400 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
10402 2002-02-04 Jakub Jelinek <jakub@redhat.com>
10404 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
10405 (finish_switch_cond): Set SWITCH_TYPE.
10407 2002-02-04 Richard Henderson <rth@redhat.com>
10409 * method.c (use_thunk): Always initialize the block tree. Reindent.
10410 * semantics.c (expand_body): Emit thunks after function, not before.
10412 2002-02-04 Jason Merrill <jason@redhat.com>
10414 * decl.c (start_function): Call cplus_decl_attributes immediately
10415 after grokdeclarator.
10417 * decl.c (start_function): Combine DECL_RESULT handling code.
10419 2002-02-03 Jason Merrill <jason@redhat.com>
10422 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
10423 (cp/xref.o): Remove dependencies.
10424 * class.c (finish_struct_1, check_methods): Don't call xref fns.
10425 (finish_struct_1): Likewise.
10426 * friend.c (make_friend_class): Likewise.
10427 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
10428 * spew.c (read_process_identifier): Likewise.
10430 2002-02-01 Jason Merrill <jason@redhat.com>
10433 * decl.c (finish_function): Warn about a non-void function with
10434 no return statement and no abnormal exit.
10435 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
10436 (current_function_returns_abnormally): New macro.
10437 * call.c (build_call): Set it.
10439 * typeck.c (build_component_ref): Always complain about offsetof
10440 constructs on non-PODs. Only make it an error for members of
10443 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
10444 (dump_function_decl): Always dump parms.
10446 * decl2.c (finish_static_data_member_decl): Complain about a local
10447 class with a static data member.
10450 * search.c (lookup_field_1): Don't xref a static data member
10451 just because we looked it up.
10453 2002-01-31 Jason Merrill <jason@redhat.com>
10455 * Make-lang.in (parse.c): Handle .output file.
10458 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
10460 * semantics.c (finish_class_definition): Adjust.
10462 Allow attributes in parms and casts.
10463 * parse.y (named_parm): Don't strip attrs.
10464 (declmods): Remove 'attributes' production.
10465 (nonempty_cv_qualifiers): Accept attributes.
10466 (ATTRIBUTE): Give precedence.
10467 * decl.c (groktypename): Handle attributes.
10468 (grokparms): Likewise.
10470 2002-01-29 Jakub Jelinek <jakub@redhat.com>
10472 * decl2.c (cxx_decode_option): Pass 0 as last argument to
10474 * lang-specs.h: Use cpp_unique_options instead of cpp_options
10475 when used together with cc1_options.
10477 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
10480 * typeck2.c (digest_init): Make sure non-array core type is
10482 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
10483 constructor, rather than build a new one.
10484 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
10485 PURPOSE of constructor elts.
10487 2002-01-23 Zack Weinberg <zack@codesourcery.com>
10489 * Make-lang.in (parse.c): Adjust expected number of
10490 shift-reduce conflicts.
10491 (decl.o): Depend on diagnostic.h.
10492 * decl.c: Include diagnostic.h.
10493 (grokdeclarator): Check for null pointer.
10494 (finish_function): Don't abort when
10495 current_binding_level->parm_flag != 1, if errors have
10496 occurred; throw away the statement tree and extra binding
10497 levels, and continue.
10498 * lex.c (note_list_got_semicolon): Check for null pointer.
10499 * method.c (hack_identifier): Just return error_mark_node if
10500 value is error_mark_node.
10501 * parse.y (primary: TYPEID(type_id)): No need to use
10502 TYPE_MAIN_VARIANT here.
10503 (handler_seq): Accept an empty list of catch clauses and
10504 generate a fake handler block to avoid later crashes.
10505 (ansi_raise_identifier): Accept the error token too.
10506 * semantics.c (begin_class_definition,
10507 finish_class_definition): Check for error_mark_node.
10509 2002-01-23 Zack Weinberg <zack@codesourcery.com>
10511 * typeck2.c (friendly_abort): Delete definition.
10512 * cp-tree.h (friendly_abort): Don't prototype.
10513 (my_friendly_assert): Use fancy_abort.
10515 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
10517 * cp-tree.h (my_friendly_abort): Remove.
10519 2002-01-23 Jakub Jelinek <jakub@redhat.com>
10521 * spew.c (pending_inlines, pending_inlines_tail,
10522 processing_these_inlines): Make static.
10523 (mark_pending_inlines): Remove static.
10524 (begin_parsing_inclass_inline): If in function, save pi
10525 for GC to cp_function_chain->unparsed_inlines instead.
10526 (process_next_inline): Likewise.
10527 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
10528 (mark_pending_inlines): Add prototype.
10529 * decl.c (spew_debug): Remove unused extern.
10530 (mark_lang_function): Call mark_pending_inlines.
10532 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
10534 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
10535 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
10536 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
10537 Change my_fancy_abort() to abort().
10539 2002-01-23 Jason Merrill <jason@redhat.com>
10542 * class.c (fixed_type_or_null): Fix thinko.
10545 * init.c (resolve_offset_ref): Use build_indirect_ref.
10547 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
10549 2002-01-22 Jason Merrill <jason@redhat.com>
10551 * parse.y (function_body): Suppress the block for the outermost
10553 * decl.c (pushdecl): Don't try to skip it.
10554 (begin_function_body): Keep the block we create, not the next one.
10555 * init.c (emit_base_init): Don't mess with keep_next_level.
10557 * class.c (build_base_path): Tweak formatting.
10559 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
10561 Fix regression introduced with patch for c++/775
10562 * parse.y (class_head_defn): Check for template specializations
10563 with a different class-key.
10565 2002-01-17 Jason Merrill <jason@redhat.com>
10567 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
10568 (begin_function_body): Call them and keep_next_level.
10569 * init.c (emit_base_init): Call keep_next_level.
10570 * semantics.c (setup_vtbl_ptr): Lose.
10571 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
10572 (vtbls_set_up_p): Lose.
10573 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
10574 * method.c (do_build_copy_constructor): Likewise.
10575 (synthesize_method): Call finish_mem_initializers.
10576 * parse.y (nodecls): Likewise.
10578 * error.c (dump_type_suffix): Print the exception specs before
10580 (dump_function_decl): Here, too.
10582 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
10584 2002-01-10 Ira Ruben <ira@apple.com>
10587 * decl.c (start_method): Handle attrlist.
10589 2002-01-10 Jakub Jelinek <jakub@redhat.com>
10591 * decl2.c (max_tinst_depth): Increase default limit to 500.
10593 2002-01-10 Graham Stott <grahams@redhat.com>
10595 * spew.c (YYCHAR): Uppercase macro parameter and add
10597 (YYCODE): Likewise.
10598 (NAME): Uppercase macro parameter.
10600 2002-01-09 Graham Stott <grahams@redhat.com>
10602 * decl.h (grokdeclarator): Wrap long line.
10604 * semantics.c (FINISH_COND): Uppercase macro paramaters and
10607 2002-01-08 Graham Stott <grahams@redhat.com>
10609 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
10610 (PALLOC): Uppercase macro parameter and whitespace.
10611 (SALLOC): Uppercase macro parameter.
10612 (SFREE): Uppercase macros parameter, add parenthese and
10614 (STREQL): Uppercase macro parameter and whitespace.
10615 (STRNEQ): Likewise.
10616 (STRLSS): Likewise.
10617 (STRLEQ): Likewise.
10618 (STRGTR): Likewise.
10619 (STRGEQ): Likewise.
10621 * call.c (convert_like): Add parenthesis and wrap.
10622 (convert_like_with_context): Likewise.
10623 (ICS_RANK): Whitespace.
10624 (NEED_TEMPORARY_P): Remove parenthesis.
10626 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
10628 (VTT_MARKED_BINFO_P): Likewise.
10630 * decl.c (BINDING_LEVEL): Add parenthesis.
10631 (DEF_OPERATOR): Likewise.
10633 * mangle.c (MANGLE_TRACE): Add parenthesis.
10634 (MANGLE_TRACE_TREE): Likewise.
10635 (write_signed_number): Likewise.
10636 (write_unsigned_number): Likewise.
10638 * pt.c (ccat): Uppercase macro parameter.
10641 * search.c (SET_BINFO_ACCESS): Add parenthesis.
10643 2002-01-07 Jason Merrill <jason@redhat.com>
10645 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
10649 * method.c (make_thunk): If !flag_weak, give the thunk the
10650 function's linkage.
10651 (use_thunk): Here, too.
10653 2002-01-07 Graham Stott <grahams@redhat.com>
10655 * error.c: Update copyright date.
10656 (print_scope_operator): Add parenthesis.
10657 (print_left_paren): Likewise.
10658 (print_right_paren): Likewise.
10659 (print_left_bracket): Likewise.
10660 (print_right_bracket): Likewise.
10661 (print_template_argument_list_start): Likewise.
10662 (print_template_argument_list_end): Likewise.
10663 (print_non_consecutive_character): Likewise.
10664 (print_tree_identifier): Likewise.
10665 (print_identifier): Likewise.
10666 (NEXT_CODE): Uppercase macro parameter.
10667 (ident_fndecl): Delete unused.
10668 (GLOBAL_THING): Likewise.
10670 2002-01-06 Graham Stott <grahams@redhat.com>
10672 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
10673 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
10674 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
10675 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
10676 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
10677 (C_IS_RESERVED_WORD): Uppercase macro parameter.
10678 (C_RID_YYCODE) Likewise.
10679 (ptrmem_cst): Use rtx.
10680 (LOCAL_BINDING_P): Add whitespace.
10681 (INHERITED_VALUE_BINDING_P): Likewise.
10682 (BINDING_SCOPE): Wrap long line.
10683 (BINDING_HAS_LEVEL_P): Remove parenthesis.
10684 (BINDING_VALUE): Wrap long line.
10685 (BINDING_TYPE): Whitespace.
10686 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
10687 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
10688 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
10689 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
10690 (same_type_p): Uppercase macro parameters.
10691 (same_type_ignoring_top_level_qualifiers_p): Likewise.
10692 (OVL_FUNCTION): Wrap long line.
10693 (OVL_CHAIN): Whitespace.
10694 (OVL_CURRENT): Add parenthesis and whitespace.
10695 (OVL_NEXT): Whitespace.
10696 (OVL_USED): Likewise.
10697 (IDENTIFIER_TYPE_VALUE): Likewise.
10698 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
10699 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
10700 (LANG_ID_FIELD): Whitespace.
10701 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
10702 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
10703 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
10704 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
10705 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
10706 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
10707 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
10708 (IDENTIFIER_VIRTUAL_P): Likewise.
10709 (IDENTIFIER_OPNAME_P): Likewise.
10710 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
10711 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
10712 (C_SET_EXP_ORIGINAL_CODE): Likewise.
10713 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
10714 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
10715 (IS_AGGR_TYPE): Uppercase macro parameter.
10716 (CLASS_TYPE_P): Likewise.
10717 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
10718 (IS_AGGR_TYPE_2): Whitespace.
10719 (TAGGED_TYPE_P): Uppercase macro parameter.
10720 (TYPE_BUILT_IN): Whitespace.
10721 (TYPE_FOR_JAVA): Likewise.
10722 (FUNCTION_ARG_CHAIN): Remove parenthesis.
10723 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
10724 (FUNCTION_FIRST_USER_PARAM): Likewise.
10725 (PROMOTES_TO_AGGR_TYPE): Whitespace.
10726 (DERIVED_FROM_P): Add parenthesis and wrap.
10727 (UNIQUELY_DERIVED_FROM_P): Likewise.
10728 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
10729 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
10730 (CLASSTYPE_USE_TEMPLATE): Whitespace.
10731 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
10732 (TYPE_GETS_DELETE): Add parenthesis.
10733 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
10734 (TYPE_HAS_ASSIGN_REF): Likewise,
10735 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
10736 (TYPE_HAS_INIT_REF): Likewise.
10737 (TYPE_HAS_CONST_INIT_REF): Likewise.
10738 (TYPE_BEING_DEFINED): Likewise.
10739 (TYPE_LANG_SPECIFIC): Likewise.
10740 (CLASSTYPE_RTTI): Likewise.
10741 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
10742 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
10743 (TYPE_OVERLOADS_ARROW): Likewise.
10744 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
10745 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
10746 (CLASSTYPE_METHOD_VEC): Likewise.
10747 (CLASSTYPE_MARKED_N): Likewise.
10748 (CLASSTYPE_MARKED): Likewise.
10749 (CLASSTYPE_MARKED2): Likewise.
10750 (CLASSTYPE_MARKED3): Likewise.
10751 (CLASSTYPE_MARKED4): Likewise.
10752 (CLASSTYPE_MARKED5): Likewise.
10753 (CLASSTYPE_MARKED6): Likewise.
10754 (SET_CLASSTYPE_MARKED): Whitespace.
10755 (CLEAR_CLASSTYPE_MARKED): Likewise.
10756 (SET_CLASSTYPE_MARKED2): Likewise.
10757 (CLEAR_CLASSTYPE_MARKED2): Likewise.
10758 (SET_CLASSTYPE_MARKED3): Likewise.
10759 (CLEAR_CLASSTYPE_MARKED3): Likewise.
10760 (SET_CLASSTYPE_MARKED4): Likewise.
10761 (CLEAR_CLASSTYPE_MARKED4): Likewise.
10762 (SET_CLASSTYPE_MARKED5): Likewise.
10763 (CLEAR_CLASSTYPE_MARKED5): Likewise.
10764 (SET_CLASSTYPE_MARKED6): Likewise.
10765 (CLEAR_CLASSTYPE_MARKED6): Likewise.
10766 (CLASSTYPE_TAGS): Likewise.
10767 (CLASSTYPE_VSIZE): Likewise.
10768 (CLASSTYPE_VBASECLASSES): Likewise.
10769 (CANONICAL_BINFO): Add parenthesis.
10770 (CLASSTYPE_SIZE(NODE): Likewise.
10771 (CLASSTYPE_SIZE_UNIT): Likewise.
10772 (CLASSTYPE_ALIGN(NODE): Likewise.
10773 (CLASSTYPE_USER_ALIGN): Likewise.
10774 (TYPE_JAVA_INTERFACE): Likewise.
10775 (CLASSTYPE_PURE_VIRTUALS): Likewise.
10776 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
10777 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
10778 (CLASSTYPE_HAS_MUTABLE): Likewise.
10779 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
10780 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
10781 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
10782 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
10783 (CLASSTYPE_INTERFACE_ONLY): Likewise.
10784 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
10785 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10786 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
10787 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10788 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
10789 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
10790 (BINFO_UNSHARED_MARKED): Whitespace.
10791 (BINFO_MARKED): Whitespace and wrap.
10792 (SET_BINFO_MARKED): Likewise.
10793 (CLEAR_BINFO_MARKED): Likewise.
10794 (BINFO_VTABLE_PATH_MARKED): Likewise.
10795 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
10796 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
10797 (BINFO_SUBVTT_INDEX): Remove parenthesis.
10798 (BINFO_VPTR_INDEX): Likewise.
10799 (BINFO_PRIMARY_BASE_OF): Likewise,
10800 (CLASSTYPE_VFIELDS): Whitespace.
10801 (VF_DERIVED_VALUE): Wrap long line.
10802 (NAMESPACE_LEVEL): Whitespace.
10803 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
10804 (DEFARG_POINTER): Whitespace.
10805 (DECL_NEEDED_P): Remove parenthesis.
10806 (DECL_LANGUAGE): Whitespace.
10807 (SET_DECL_LANGUAGE): Add parenthesis.
10808 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
10809 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
10810 (DECL_IN_AGGR_P): Whitespace.
10811 (DECL_FRIEND_P): Likewise.
10812 (DECL_BEFRIENDING_CLASSES): Likewise.
10813 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
10814 (DECL_NONCONVERTING_P): Whitespace.
10815 (DECL_PURE_VIRTUAL_P): Likewise.
10816 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
10817 (DECL_PENDING_INLINE_INFO): Whitespace.
10818 (DECL_SORTED_FIELDS): Likewise.
10819 (DECL_DEFERRED_FN): Likewise.
10820 (DECL_TEMPLATE_INFO): Likewise.
10821 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
10822 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
10823 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
10824 (TMPL_ARGS_LEVEL): Likewise.
10825 (SET_TMPL_ARGS_LEVEL): Likewise.
10826 (INNERMOST_TEMPLATE_PARMS): Whitespace.
10827 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
10828 (INTEGRAL_CODE_P(CODE): Add parenthesis.
10829 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
10830 (TYPE_HAS_CONSTRUCTOR): Whitespace.
10831 (TREE_HAS_CONSTRUCTOR): Likewise.
10832 (TYPE_HAS_DESTRUCTOR): Likewise.
10833 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
10834 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
10835 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
10836 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
10837 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
10838 (TYPE_PTRMEMFUNC_P): Likewise.
10839 (TYPE_PTRMEMFUNC_FLAG): Likewise.
10840 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
10841 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
10842 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
10843 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
10844 (DECL_ACCESS): Whitespace.
10845 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
10846 (DECL_GLOBAL_DTOR_P): Likewise.
10847 (GLOBAL_INIT_PRIORITY): Likewise.
10848 (DECL_TEMPLATE_PARMS): Likewise.
10849 (DECL_TEMPLATE_RESULT): Likewise.
10850 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
10851 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
10852 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
10853 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
10854 (PRIMARY_TEMPLATE_P): Add parenthesis.
10855 (DECL_USE_TEMPLATE): Whitespace.
10856 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10857 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10858 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10859 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10860 (CALL_DECLARATOR_PARMS): Remove parenthesis.
10861 (CALL_DECLARATOR_QUALS): Likewise.
10862 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
10863 (TEMP_NAME_P): Wrap.
10864 (VFIELD_NAME_P): Likewise.
10865 (B_SET): Uppercase macro parameters and add parenthesis.
10868 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
10869 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
10870 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
10871 (same_or_base_type_p): Likewise.
10872 (cp_deprecated): Likewise.
10874 2002-01-05 Richard Henderson <rth@redhat.com>
10876 * semantics.c (expand_body): Revert last change.
10878 2002-01-04 Jason Merrill <jason@redhat.com>
10881 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
10884 * class.c (build_vtbl_initializer): Check for a lost primary
10885 before calculating the vtable entry to throw away.
10887 2002-01-02 Jason Merrill <jason@redhat.com>
10889 * semantics.c (expand_body): Call outlining_inline_function when
10890 emitting an inline function out of line.
10892 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10894 PR c++/5116, c++/764 reversion
10895 * call.c (build_new_op): Revert the instantiations. They are
10898 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10901 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
10903 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10906 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
10907 (tsubst, case POINTER_TYPE): Handle pmfs here.
10908 (tsubst, case OFFSET_TYPE): Check it is not an offset to
10909 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
10911 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10914 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
10915 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
10916 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
10918 (tsubst_template_parms): Break up loop statements.
10919 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
10920 parm PARM_DECLs don't get promoted.
10922 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10925 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
10926 (build_x_function_call): Cope with a COMPONENT_REF containing a
10929 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10932 * pt.c (convert_template_argument): Be more careful determining
10933 when RECORD_TYPE templates are or are not templates.
10935 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10938 * cp-tree.h (handle_class_head): Adjust prototype.
10939 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
10940 parameters. Use for all class heads.
10941 * parse.y (named_class_head_sans_basetype, named_class_head,
10942 named_complex_class_head_sans_basetype,
10943 named_class_head_sans_basetype_defn,
10944 unnamed_class_head): Remove.
10945 (class_head, class_head_apparent_template): Recognize class heads
10946 (class_head_decl, class_head_defn): New reductions. Process class
10948 (structsp): Adjust class definition and class declaration
10950 (maybe_base_class_list): Give diagnostic on empty list.
10952 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10955 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
10956 single non-static member.
10957 (unary_complex_lvalue): If it cannot be a pointer to member, don't
10958 make it so. Check it is not pointer to reference.
10960 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10963 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
10964 are processing a template decl.
10966 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10968 PR c++/5116, c++/764
10969 * call.c (build_new_op): Make sure template class operands are
10970 instantiated. Simplify arglist construction.
10972 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
10974 * call.c (build_user_type_conversion_1): Use my_friendly_assert
10975 rather than if ... abort.
10976 * cvt.c (convert_to_reference): Likewise.
10977 * semantics.c (setup_vtbl_ptr): Likewise.
10978 * pt.c (lookup_template_class): Comment typo.
10980 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
10983 * pt.c (push_template_decl_real): Make sure DECL has
10984 DECL_LANG_SPECIFIC.
10986 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
10989 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
10990 for non-reference fields.
10991 * typeck.c (require_complete_type): Use resolve_offset_ref).
10993 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
10996 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
10998 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
11001 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
11002 up. Don't stabilize_references when initializing a reference.
11004 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11006 * decl2.c (lang_f_options): Const-ify.
11008 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
11010 * config-lang.in (diff_excludes): Remove.
11012 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
11015 * typeck.c (build_function_call_real): Use original function
11016 expression for errors.
11018 2001-12-18 Jason Merrill <jason@redhat.com>
11021 * class.c (add_method): Do compare 'this' quals when trying to match a
11022 used function. Don't defer to another used function.
11024 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
11026 * pt.c (instantiate_clone): Remove, fold into ...
11027 (instantiate_template): ... here. Simplify by removing mutual
11029 * typeck2.c (build_m_component_ref): Don't cv qualify the function
11030 pointed to by a pointer to function.
11031 * class.c (delete_duplicate_fields_1): Typo.
11033 2001-12-18 Jason Merrill <jason@redhat.com>
11035 C++ ABI change: destroy value arguments in caller.
11036 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
11037 create an extra binding level for the parameters.
11038 * decl.c (store_parm_decls): Don't do parameter cleanups.
11040 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
11042 * call.c (build_new_method_call): Use '%#V'.
11043 * error.c (cv_to_string): Use V parameter to determine padding.
11045 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
11047 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
11048 spellings in messages.
11050 2001-12-17 Zack Weinberg <zack@codesourcery.com>
11052 * cp-tree.h: Delete #defines for cp_error, cp_warning,
11053 cp_pedwarn, and cp_compiler_error.
11054 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
11055 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
11056 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
11057 typeck2.c: Change calls to the above macros to use their
11058 language-independent equivalents: error, warning, pedwarn, and
11059 internal_error respectively.
11061 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
11063 * decl2.c (finish_file): Remove back_end_hook.
11065 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
11067 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
11068 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
11069 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
11071 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
11073 * lang-options.h: Use American spelling in messages.
11075 2001-12-13 Jason Merrill <jason@redhat.com>
11077 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
11079 Use cleanups to run base and member destructors.
11080 * init.c (push_base_cleanups): New function, split out from...
11081 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
11082 * decl.c (finish_destructor_body): Move vbase destruction code to
11083 push_base_cleanups.
11084 (begin_function_body, finish_function_body): New fns.
11085 (finish_function): Move [cd]tor handling and call_poplevel to
11086 finish_function_body.
11087 (pushdecl): Skip the new level.
11088 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
11089 (setup_vtbl_ptr): Call push_base_cleanups.
11090 * method.c (synthesize_method): Call {begin,end}_function_body.
11091 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
11092 * cp-tree.h: Declare new fns.
11093 * parse.y (function_body, .begin_function_body): New nonterminals.
11094 (fndef, pending_inline, function_try_block): Use function_body.
11095 (ctor_initializer_opt, function_try_block): No longer has a value.
11096 (base_init): Remove .set_base_init token.
11097 (.set_base_init, compstmt_or_error): Remove.
11098 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
11100 * optimize.c (maybe_clone_body): Fix parameter updating.
11102 2001-12-12 Jason Merrill <jason@redhat.com>
11104 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
11105 * semantics.c (genrtl_start_function): Don't pass
11106 parms_have_cleanups or push an extra binding level.
11107 (genrtl_finish_function): Lose cleanup_label cruft.
11109 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
11110 (ctor_label): Remove.
11111 * semantics.c (finish_return_stmt): Lose ctor_label support.
11112 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
11113 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
11116 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
11117 check for [cd]tors.
11118 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
11120 * decl.c (finish_function): Check VMS_TARGET, not VMS.
11122 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
11123 (end_cleanup_fn): And poplevel.
11125 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
11126 if we're in a template.
11128 2001-12-12 Jakub Jelinek <jakub@redhat.com>
11130 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
11131 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
11132 THIS_NAME_P): Delete.
11133 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
11134 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
11135 with internal naming scheme.
11136 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
11138 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
11140 * decl.c (grokdeclarator): Deprecated implicit typename use.
11142 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
11145 * parse.y (frob_specs): Indicate it is a language linkage which
11146 contained the extern.
11147 * decl.c (grokdeclarator): Allow extern language linkage with
11150 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
11153 * decl.c (add_binding): Don't reject duplicate typedefs involving
11154 template parameters.
11156 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
11158 * parse.y, semantics.c: Similarly.
11160 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
11163 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
11164 (copy_args_p): Rename to ...
11165 (copy_fn_p): ... here.
11166 (grok_special_member_properties): New function.
11167 (grok_op_properties): Lose VIRTUALP parameter.
11168 (copy_assignment_arg_p): Remove.
11169 * call.c (build_over_call): Use copy_fn_p.
11170 * decl.c (grokfndecl): Reformat. Adjust call to
11171 grok_op_properties.
11172 (copy_args_p): Rename to ...
11173 (copy_fn_p): ... here. Reject template functions. Check for pass
11175 (grok_special_member_properties): Remember special functions.
11176 (grok_ctor_properties): Don't remember them here, just check.
11177 (grok_op_properties): Likewise.
11178 (start_method): Call grok_special_member_properties.
11179 * decl2.c (grokfield): Likewise.
11180 (copy_assignment_arg_p): Remove.
11181 (grok_function_init): Don't remember abstract assignment here.
11182 * pt.c (instantiate_class_template): Call
11183 grok_special_member_properties.
11184 (tsubst_decl): Adjust grok_op_properties call.
11186 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
11188 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
11189 RID_TYPES_COMPATIBLE_P.
11191 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
11193 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
11194 call to build_aggr_init.
11195 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
11197 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
11199 * parse.y: Replace uses of the string non-terminal with STRING.
11200 Don't perform string concatentaion here.
11201 (string): Remove non-terminal.
11202 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
11204 2001-12-05 Jason Merrill <jason@redhat.com>
11206 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
11207 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
11208 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
11209 * pt.c (push_tinst_level): No longer static.
11210 * cp-tree.h: Declare them.
11212 * init.c (resolve_offset_ref): Don't check access for the base
11213 conversion to access a FIELD_DECL.
11215 * cp-tree.h (TYPE_REFFN_P): New macro.
11216 * decl.c (bad_specifiers): Check it, too.
11218 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
11219 on the __*_type_info type if we haven't seen a definition.
11221 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
11223 * decl.c: Include c-common.h.
11224 (shadow_warning): Move to c-common.c.
11226 2001-12-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11228 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
11230 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
11232 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
11234 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
11237 * init.c (sort_base_init): Allow binfos to be directly specified.
11238 * method.c (do_build_copy_constructor): Explicitly convert to the
11240 (do_build_assign_ref): Likewise.
11242 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
11244 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
11245 declaration and initialization.
11247 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
11249 * typeck2.c: Remove leading capital from diagnostic messages, as
11250 per GNU coding standards.
11252 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
11255 * decl.c (xref_basetypes): Handle attributes between
11258 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
11261 * parse.y (named_complex_class_head_sans_basetype): Add new
11263 * Make-lang.in (parse.c): Adjust expected conflict count.
11265 2001-12-03 Jason Merrill <jason@redhat.com>
11267 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
11268 immediate binfos for our virtual bases.
11270 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
11272 * call.c (build_java_interface_fn_ref): Similarly.
11273 * except.c (is_admissible_throw_operand): Similarly.
11274 * init.c (build_java_class_ref): Similarly.
11275 * xref.c (open_xref_file): Similarly.
11277 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
11279 * class.c (finish_struct): Remove trailing periods from messages.
11280 * decl.c (check_tag_decl): Similarly.
11281 * lex.c (cxx_set_yydebug): Similarly.
11282 * typeck2.c (friendly_abort): Similarly.
11284 2001-11-29 Mark Mitchell <mark@codesourcery.com>
11287 * cp-tree.h (ovl_member): Remove.
11288 * decl2.c (merge_functions): Handle extern "C" functions
11290 * tree.c (ovl_member): Remove.
11292 2001-11-29 Mark Mitchell <mark@codesourcery.com>
11295 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
11296 FUNCTION_DECL, as input.
11297 (mark_overriders): Remove.
11298 (warn_hidden): Rework for the new ABI.
11300 2001-11-29 Mark Mitchell <mark@codesourcery.com>
11303 * call.c (convert_like_real): Do not build additional temporaries
11304 for rvalues of class type.
11306 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
11308 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
11309 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
11310 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
11311 (DERIVED_FROM_P): Likewise.
11312 (enum base_access): Renumber, add ba_quiet bit mask.
11313 (get_binfo): Remove.
11314 (get_base_distance): Remove.
11315 (binfo_value): Remove.
11316 (ACCESSIBLY_DERIVED_FROM_P): Remove.
11317 * call.c (standard_conversion): Use lookup_base.
11318 * class.c (strictly_overrides): Likewise.
11319 (layout_virtual_bases): Likewise.
11320 (warn_about_ambiguous_direct_bases): Likewise.
11321 (is_base_of_enclosing_class): Likewise.
11322 (add_vcall_offset_vtbl_entries_1): Likewise.
11323 * cvt.c (build_up_reference): Adjust comment.
11324 * init.c (build_member_call): Reformat.
11325 * search.c (get_binfo): Remove.
11326 (get_base_distance_recursive): Remove.
11327 (get_base_distance): Remove.
11328 (lookup_base_r): Tweak.
11329 (lookup_base): Add ba_quiet control. Complete the types here.
11330 (covariant_return_p): Use lookup_base.
11331 * tree.c (binfo_value): Remove.
11332 (maybe_dummy_object): Use lookup_base.
11333 * typeck.c (build_static_cast): Use lookup_base.
11334 (get_delta_difference): Likewise.
11335 * typeck2.c (binfo_or_else): Use lookup_base.
11336 (build_scoped_ref): Add back error_mark_check.
11337 (build_m_component_ref): Use lookup_base.
11339 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
11341 * Make-lang.in (c++.generated-manpages): New dummy target.
11343 2001-11-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11345 * Make-lang.in (cp-lang.o): Depends on c-common.h.
11346 * cp-lang.c (c-common.h): Include.
11347 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
11348 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
11349 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
11351 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
11353 * decl2.c (c_language): Move to c-common.c.
11354 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
11356 (cxx_init): Update.
11358 2001-11-26 Jason Merrill <jason@redhat.com>
11360 * call.c (joust): Remove COND_EXPR hack.
11362 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
11364 * search.c (lookup_base_r): Declare bk in variable declaration
11367 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
11370 * class.c (build_vbase_pointer): Remove.
11371 (build_vbase_path): Remove.
11372 (build_base_path): New function.
11373 * cp-tree.h (base_access, base_kind): New enumerations.
11374 (build_base_path): Declare.
11375 (convert_pointer_to_real): Remove.
11376 (convert_pointer_to): Remove.
11377 (lookup_base): Declare.
11378 (convert_pointer_to_vbase): Remove.
11379 * call.c (build_scoped_method_call): Use lookup_base &
11380 build_base_path instead of convert_pointer_to_real,
11381 get_base_distance & get_binfo.
11382 (build_over_call): Likewise.
11383 * cvt.c (cp_convert_to_pointer): Likewise.
11384 (convert_to_pointer_force): Likewise.
11385 (build_up_reference): Likewise.
11386 (convert_pointer_to_real): Remove.
11387 (convert_pointer_to): Remove.
11388 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
11389 instead of convert_pointer_to_vbase & build_vbase_path.
11390 (emit_base_init): Use build_base_path instead of
11391 convert_pointer_to_real.
11392 (expand_virtual_init): Lose unrequired conversions.
11393 (resolve_offset_ref): Use lookup_base and build_base_path
11394 instead of convert_pointer_to.
11395 * rtti.c (build_dynamic_cast_1): Use lookup_base &
11396 build_base_path instead of get_base_distance & build_vbase_path.
11397 * search.c (get_vbase_1): Remove.
11398 (get_vbase): Remove.
11399 (convert_pointer_to_vbase): Remove.
11400 (lookup_base_r): New function.
11401 (lookup_base): New function.
11402 * typeck.c (require_complete_type): Use lookup_base &
11403 build_base_path instead of convert_pointer_to.
11404 (build_component_ref): Likewise.
11405 (build_x_function_call): Likewise.
11406 (get_member_function_from_ptrfunc): Likewise.
11407 (build_component_addr): Likewise.
11408 * typeck2.c (build_scoped_ref): Likewise.
11410 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
11412 * cp-tree.h (CP_TYPE_QUALS): Removed.
11413 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
11414 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
11415 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
11416 * dump.c (cp_dump_tree): Use void* dump_info argument to match
11417 lang-hooks prototype.
11418 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
11419 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
11420 CP_TYPE_QUALS changed to cp_type_quals.
11421 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
11422 (CXX_C_OBJS): Remove c-dump.o.
11424 2001-11-21 Mark Mitchell <mark@codesourcery.com>
11427 * pt.c (lookup_template_class): Ensure that all specializations
11428 are registered on the list corresponding to the most general
11431 2001-11-20 Mark Mitchell <mark@codesourcery.com>
11433 * call.c (non_reference): Add documentation.
11434 (convert_class_to_reference): Do not strip reference types
11435 from conversion operators.
11436 (maybe_handle_ref_bind): Simplify.
11437 (compare_ics): Correct handling of references.
11439 2001-11-19 John Wilkinson <johnw@research.att.com>
11441 * dump.c (dump_op): New function.
11442 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
11443 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
11444 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
11446 2001-11-19 Mark Mitchell <mark@codesourcery.com>
11449 * semantics.c (finish_sizeof): Make sure that expression created
11450 while processing a template do not have a type.
11451 (finish_alignof): Likewise.
11452 * typeck.c (c_sizeof): Likewise.
11453 (expr_sizeof): Likewise.
11455 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
11457 * lex.c (cxx_finish): Call c_common_finish.
11458 (finish_parse): Remove.
11460 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11462 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
11463 when displaying error message about missing array bounds.
11465 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11467 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
11469 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
11471 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
11473 * cp-tree.h (print_class_statistics): Restore.
11475 2001-11-15 Jason Merrill <jason@redhat.com>
11477 * method.c (use_thunk): Don't emit debugging information for thunks.
11479 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
11480 * decl.c (make_typename_type): Handle getting a class template.
11481 * search.c (lookup_field_r): A class template is good enough for
11484 * call.c (convert_like_real): Only use cp_convert for the bad part.
11485 (standard_conversion): Also allow bad int->enum.
11486 * typeck.c (ptr_reasonably_similar): Also allow functions to
11487 interconvert. Pointers to same-size integers are reasonably
11490 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
11493 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
11496 * init.c (sort_base_init): Remove unreachable code.
11497 (expand_member_init): Adjust comment to reflect reality. Simplify
11498 and remove unreachable code.
11500 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
11502 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
11503 (cxx_init): Update prototype.
11504 * decl.c (init_decl_processing): Rename. Move null node init
11505 to its creation time.
11506 * lex.c (cxx_init_options): Update.
11507 (cxx_init): Combine with old init_parse; also call
11508 cxx_init_decl_processing.
11510 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
11512 * decl.c (check_initializer): Try to complete the type of an
11513 array element before checking whether it's complete. Don't
11514 complain about arrays with complete element types but an
11516 (cp_finish_decl): Build the hierarchical constructor before
11517 calling maybe_deduce_size_from_array_init.
11519 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
11521 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
11523 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
11526 * parse.y (already_scoped_stmt): Remove.
11527 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
11529 2001-11-12 H.J. Lu <hjl@gnu.org>
11531 * cvt.c (ocp_convert): Don't warn the address of a weak
11532 function is always `true'.
11534 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
11536 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
11537 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
11538 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
11539 * cp-tree.h (print_class_statistics): Remove.
11540 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
11541 cxx_print_identifier, cxx_set_yydebug): New.
11542 * lex.c (set_yydebug): Rename c_set_yydebug.
11543 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
11544 lang_print_xnode): Rename.
11545 * tree.c (print_lang_statistics): Rename.
11547 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11549 * class.c (dump_array): Fix format specifier warning.
11551 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
11553 * cp-lang.c (LANG_HOOKS_NAME): Override.
11554 (struct lang_hooks): Constify.
11555 * lex.c (cxx_init_options): Update.
11556 (lang_identify): Remove.
11557 * parse.y (language_string): Remove.
11559 2001-11-08 Andreas Franck <afranck@gmx.de>
11561 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
11562 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
11563 suggested by autoconf.
11564 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
11565 (c++.install-common): Use the transformed target alias names.
11567 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
11569 * Make-lang.in: Update.
11570 * cp-lang.c: Include langhooks-def.h.
11572 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11574 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
11576 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11578 * lex.c (copy_lang_type): Add static prototype.
11580 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11582 * pt.c (unify): Handle SCOPE_REF.
11584 2001-11-01 Jakub Jelinek <jakub@redhat.com>
11586 * tree.c (cp_copy_res_decl_for_inlining): Adjust
11587 DECL_ABSTRACT_ORIGIN for the return variable.
11589 2001-10-31 Zack Weinberg <zack@codesourcery.com>
11591 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
11593 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
11595 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
11596 semantics.c, spew.c: Fix spelling errors.
11598 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11600 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
11602 2001-10-25 Zack Weinberg <zack@codesourcery.com>
11604 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
11607 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11609 * cp-lang.c (cxx_get_alias_set): New function.
11610 Point LANG_HOOKS_GET_ALIAS_SET to it.
11612 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11614 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
11615 * cp-tree.h (make_unbound_class_template): Prototype new function.
11616 * decl.c (make_unbound_class_template): New function.
11617 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
11618 * error.c (dump_type): Likewise.
11619 * mangle.c (write_type): Likewise.
11620 * parse.y (template_parm): Likewise.
11621 (template_argument): Use make_unbound_class_template.
11622 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
11623 (tsubst): Likewise.
11624 (tsubst_copy): Likewise.
11626 * tree.c (walk_tree): Likewise.
11627 * typeck.c (comptypes): Likewise.
11629 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11631 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
11632 extra calls into fewer ones.
11634 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
11636 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
11637 Warn when merging inline with attribute noinline.
11638 (start_decl, start_function): Warn if inline and attribute
11639 noinline appear in the same declaration.
11641 2001-10-16 H.J. Lu <hjl@gnu.org>
11643 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
11644 for tree checking disabled.
11646 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
11648 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
11649 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
11651 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
11653 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
11654 (unify): Only handle MINUS_EXPR specially if the above flag is set
11655 and the subtracted constant is 1. Clear the flag on recursive calls.
11656 Set it when unifying the maximum value in an INTEGER_TYPE's range.
11658 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
11660 * decl.c (bad_specifiers): Don't allow exception specifications
11663 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
11665 * cp/lex.c (init_cp_pragma): Similarly.
11667 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11669 * pt.c (lookup_template_class): Build complete template arguments
11670 for BOUND_TEMPLATE_TEMPLATE_PARM.
11672 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11674 * cp-tree.h (TYPE_BINFO): Update comment.
11675 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
11676 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
11677 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
11678 (copy_type): Prototype new function.
11679 * lex.c (copy_lang_decl): Gather tree node statistics.
11680 (copy_lang_type): New function.
11681 (copy_type): Likewise.
11682 (cp_make_lang_type): Create lang_type for
11683 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
11684 and BOUND_TEMPLATE_TEMPLATE_PARM.
11685 * pt.c (tsubst): Use copy_type instead of copy_node.
11686 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
11688 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11690 * pt.c (determine_specialization): Ignore functions without
11691 DECL_TEMPLATE_INFO.
11693 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
11696 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
11698 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
11700 * typeck2.c (store_init_value): Don't re-digest a bracketed
11703 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
11706 2001-10-11 Richard Henderson <rth@redhat.com>
11708 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
11709 of an asm statement.
11710 (build_vtbl_ref_1): Split out from build_vtbl_ref.
11711 (build_vfn_ref): Use it to handle vtable descriptors before
11712 calling build_vtable_entry_ref.
11713 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
11715 2001-10-10 Richard Henderson <rth@redhat.com>
11717 * parse.y (asm_operand): Allow named operands.
11718 * semantics.c (finish_asm_stmt): Tweek for changed location
11719 of the operand constraint.
11721 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
11723 * call.c (standard_conversion): Add bad conversion between
11724 integers and pointers.
11725 (convert_like_real): Don't use convert_for_initialization for bad
11726 conversions; complain here and use cp_convert.
11727 (build_over_call): Don't handle bad conversions specially.
11728 (perform_implicit_conversion): Allow bad conversions.
11729 (can_convert_arg_bad): New fn.
11730 * cp-tree.h: Declare it.
11731 * typeck.c (convert_for_assignment): Use it.
11732 (ptr_reasonably_similar): Any target type is similar to void.
11734 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
11736 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
11737 (cp/cp-lang.o): New rule.
11738 * cp-tree.h: Declare hooks.
11739 * tree.c: Make hooks non-static.
11740 (init_tree): Don't initialize hooks here.
11741 * lex.c: Likewise. Move definition of lang_hooks to...
11742 * cp-lang.c: ... new file.
11744 2001-10-08 Richard Henderson <rth@redhat.com>
11746 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
11747 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
11749 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11751 * class.c (build_vtable_entry_ref): Const-ify.
11752 * decl.c (predefined_identifier,
11753 initialize_predefined_identifiers): Likewise.
11754 * init.c (build_new_1): Likewise.
11755 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
11758 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
11760 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
11761 (INSNS_PER_STMT): Likewise.
11762 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
11763 (copy_body, initialize_inlined_parameters): Likewise.
11764 (declare_return_variable, inlinable_function_p): Likewise.
11765 (expand_call_inline, expand_calls_inline): Likewise.
11766 (optimize_inline_calls, clone_body): Likewise.
11767 * tree.c (walk_tree): Moved to ../tree-inline.c.
11768 (walk_tree_without_duplicates): Likewise.
11769 (copy_tree_r, remap_save_expr): Likewise.
11771 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
11773 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
11774 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
11775 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
11776 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
11777 (flag_inline_trees): Moved declaration to ../tree-inline.h.
11778 (walk_tree): Moved declaration to ../tree-inline.h.
11779 (walk_tree_without_duplicates, copy_tree_r): Likewise.
11780 (remap_save_expr): Likewise.
11781 * decl.c: Include tree-inline.h.
11782 (lang_mark_tree): Don't mark inlined_fns.
11783 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
11784 * optimize.c: Include tree-inline.h.
11785 (optimize_inline_calls): Move declaration to ../tree.h, as
11787 (remap_decl): Use language-independent constructs and hooks.
11788 (remap_block, copy_body_r, declare_return_variable): Likewise.
11789 (inlinable_function_p): Likewise. Don't test for
11790 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
11791 no longer language-specific.
11792 (optimize_inline_calls): Likewise. Make it non-static. Moved
11793 call of dump_function to...
11794 (optimize_function): Here...
11795 (clone_body): New function, extracted from...
11796 (maybe_clone_body): ... here. Build decl_map locally and pass
11797 it on to clone_body.
11798 * pt.c, semantics.c: Include tree-inline.h.
11799 * tree.c: Likewise.
11800 (cp_walk_subtrees): New language-specific hook for tree inlining.
11801 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
11802 cp_is_overload_p, cp_auto_var_in_fn_p,
11803 cp_copy_res_decl_for_inlining): Likewise.
11804 (walk_tree): Move language-specific constructs into...
11805 (cp_walk_subtrees): this new function.
11806 (copy_tree_r): Use language-independent constructs and hooks.
11807 (init_tree): Initialize tree inlining hooks.
11808 (remap_save_expr): Adjust prototype so that the declaration
11809 does not require the definition of splay_tree.
11811 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
11813 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
11814 to build the declaration instead of the declaration itself.
11816 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
11818 * decl2.c (cxx_decode_option): Add 'else'.
11820 * spew.c (end_input): No longer static.
11821 * cp-tree.h: Declare it.
11822 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
11824 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
11826 * call.c (build_over_call), typeck.c (build_function_call_real):
11827 Pass type attributes to check_function_format rather than name or
11828 assembler name. Don't require there to be a name or assembler
11829 name to check formats.
11831 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
11833 * decl.c (init_decl_processing): Don't call
11834 init_function_format_info. Initialize lang_attribute_table
11836 (builtin_function): Call decl_attributes.
11837 (insert_default_attributes): New.
11839 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
11841 * decl.c (grokdeclarator): Copy array typedef handling from C
11844 * decl.c (grokdeclarator): Copy too-large array handling from C
11847 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
11849 * config-lang.in (target_libs): Added target-gperf, so that we
11850 don't try to build it if C++ is disabled.
11852 2001-09-23 Zack Weinberg <zack@codesourcery.com>
11854 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
11855 (cp/errfn.o): Delete rule.
11856 (cp/error.o): Depend on flags.h.
11857 * errfn.c: Delete file.
11858 * cp-tree.h: Declare warn_deprecated. Remove definitions of
11859 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
11860 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
11861 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
11862 internal_error respectively. Make cp_deprecated into a macro.
11863 Don't define cp_printer typedef or declare cp_printers.
11864 * error.c: Include flags.h.
11865 Delete: struct tree_formatting_info, print_function_argument_list,
11866 print_declaration, print_expression, print_function_declaration,
11867 print_function_parameter, print_type_id, print_cv_qualifier_seq,
11868 print_type_specifier_seq, print_simple_type_specifier,
11869 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
11870 print_parameter_declaration_clause, print_exception_specification,
11871 print_nested_name_specifier, and definition of cp_printers.
11872 (locate_error): New function.
11873 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
11874 rewritten in terms of locate_error and diagnostic.c.
11875 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
11876 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
11877 (init_error): Adjust to match.
11879 2001-09-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11881 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
11883 2001-09-21 Richard Henderson <rth@redhat.com>
11885 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
11886 (build_vtbl_initializer): Likewise.
11887 (build_vfn_ref): New.
11888 * cp-tree.h: Declare it.
11889 * call.c (build_over_call): Use it.
11890 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
11891 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
11893 2001-09-21 J"orn Rennecke <amylaar@redhat.com>
11895 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
11897 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
11899 Table-driven attributes.
11900 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
11901 * decl2.c (cplus_decl_attributes): Only take one attributes
11903 * cp-tree.c (cplus_decl_attributes): Update prototype.
11904 * class.c (finish_struct), decl.c (start_decl, start_function),
11905 decl2.c (grokfield), friend.c (do_friend), parse.y
11906 (parse_bitfield): Update calls to cplus_decl_attributes.
11907 * decl.c (grokdeclarator): Take a pointer to a single ordinary
11909 * decl.h (grokdeclarator): Update prototype.
11910 * decl2.c (grokfield): Take a single ordinary attribute list.
11911 * friend.c (do_friend): Likewise.
11912 * decl.c (shadow_tag, groktypename, start_decl,
11913 start_handler_parms, grokdeclarator, grokparms, start_function,
11914 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
11915 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
11916 (process_template_parm, do_decl_instantiation): Pass single
11917 ordinary attribute lists around.
11918 * decl.c (grokdeclarator): Correct handling of nested attributes.
11920 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
11921 * decl.c (grokdeclarator): Embedded attrs bind to the right,
11924 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
11925 (cp_attribute_table): Declare.
11926 * decl.c (valid_lang_attribute): Don't define.
11927 (lang_attribute_table): Define.
11928 (init_decl_processing): Initialize lang_attribute_table instead of
11929 valid_lang_attribute.
11930 * tree.c (cp_valid_lang_attribute): Remove.
11931 (handle_java_interface_attribute, handle_com_interface_attribute,
11932 handle_init_priority_attribute): New functions.
11933 (cp_attribute_table): New array.
11934 * decl2.c (import_export_class): Don't use
11935 targetm.valid_type_attribute.
11937 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
11939 * Make-lang.in (cp/error.o): Depend on real.h
11940 * error.c: #include "real.h"
11942 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11944 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
11945 xmalloc/strcpy/strcat.
11947 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11949 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
11951 * pt.c (tsubst_decl): Likewise.
11953 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11955 * decl2.c (lang_f_options): Const-ification.
11956 * lex.c (cplus_tree_code_name): Likewise.
11957 * spew.c (yyerror): Likewise.
11959 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
11962 * class.c (force_canonical_binfo_r): Check & move an indirect
11963 primary base first.
11964 (force_canonical_binfo): Check that it's not already
11966 (mark_primary_virtual_base): Remove BINFO parameter.
11967 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
11969 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
11971 Remove TYPE_NONCOPIED_PARTS.
11972 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
11973 CLASSTYPE_PURE_VIRTUALS.
11974 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
11975 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
11976 (layout_class_type): Don't call fixup_inline_methods here ...
11977 (finish_struct_1): ... call it here.
11979 2001-09-04 Mark Mitchell <mark@codesourcery.com>
11981 * decl.c (duplicate_decls): Remove code deadling with
11983 * decl2.c (finish_file): Likewise.
11984 * pt.c (instantiate_decl): Likewise.
11985 * semantics.c (expand_body): Don't defer local functions if
11986 they wouldn't be deferred for some other reason. Don't
11987 generate RTL for functions that will not be emitted.
11988 (genrtl_start_function): Remove code deadling with
11990 (genrtl_finish_function): Likewise.
11992 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
11995 * call.c (build_over_call): Do not optimize any empty base
11998 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12000 * error.c (dump_template_decl): Output template parameters
12001 together with their specifiers.
12002 Output `class' prefix for template template parameter.
12003 (dump_decl): Fix formatting.
12005 2001-08-30 Kurt Garloff <garloff@suse.de>
12007 * optimize.c (inlinable_function_p): Allow only smaller single
12008 functions. Halve inline limit after reaching recursive limit.
12010 2001-08-30 Joern Rennecke <amylaar@redhat.com>
12011 Jason Merrill <jason_merrill@redhat.com>
12013 * class.c (build_vtable_entry_ref): Subtract in char*, not
12016 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
12018 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
12019 (build_cplus_array_type): Use cp_build_qualified_type, not
12020 TYPE_MAIN_VARIANT, to get an unqualified version.
12022 * decl2.c (grok_alignof): Lose.
12023 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
12024 * typeck.c (c_alignof): Lose.
12025 * semantics.c (finish_sizeof, finish_alignof): New.
12026 * parse.y: Use them.
12027 * cp-tree.h: Declare them.
12029 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
12031 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
12032 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
12033 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
12035 2001-08-19 Jakub Jelinek <jakub@redhat.com>
12037 * typeck2.c (add_exception_specifier): Only require complete type if
12038 not in processing template declaration.
12040 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12042 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
12043 GNU_xref_start_scope and GNU_xref_end_scope.
12045 * tree.c (TYPE_HASH): Moved to ../tree.h.
12047 2001-08-16 Mark Mitchell <mark@codesourcery.com>
12049 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
12052 2001-08-14 Richard Henderson <rth@redhat.com>
12054 * class.c, cp-tree.h (build_vfn_ref): Remove.
12055 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
12057 2001-08-13 Mark Mitchell <mark@codesourcery.com>
12059 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
12060 empty class assignment as having side-effects to avoid
12063 2001-08-13 Zack Weinberg <zackw@panix.com>
12065 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
12066 * except.c: Include libfuncs.h.
12068 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12070 * decl.c (grokdeclarator): Clarify diagnostic message.
12072 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12074 * decl2.c (do_nonmember_using_decl): Replace using directive
12075 with using declaration in the error message.
12077 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12079 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
12080 criterion to avoid rebuilding expression tree instead of
12081 processing_template_decl.
12083 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
12085 Support named return value optimization for inlines, too.
12086 * decl.c (finish_function): Nullify returns here.
12087 * semantics.c (genrtl_start_function): Not here.
12088 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
12089 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
12090 Also nullify the CLEANUP_STMT for the nrv.
12091 * cp-tree.h: Declare it.
12092 * optimize.c (declare_return_variable): Replace the nrv with the
12094 * typeck.c (check_return_expr): Be more flexible on alignment check.
12095 Ignore cv-quals when checking for a matching type.
12097 2001-08-09 Richard Henderson <rth@redhat.com>
12099 * decl2.c (finish_objects): Use target hooks instead of
12100 assemble_constructor and assemble_destructor.
12102 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
12104 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
12106 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
12109 Stop using TYPE_NONCOPIED_PARTS.
12110 * call.c (build_over_call): Be careful when copy constructing
12111 or assigning to an empty class.
12112 * class.c (check_bases_and_members): It has a
12113 COMPLEX_ASSIGN_REF if it has a vptr.
12114 (layout_class_type): Don't add empty class padding to
12115 TYPE_NONCOPIED_PARTS.
12116 (finish_struct_1): Don't add the VFIELD either.
12117 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
12120 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
12122 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
12124 2001-08-06 Richard Henderson <rth@redhat.com>
12126 * decl2.c (finish_objects): Pass a symbol_ref and priority to
12127 assemble_{constructor,destructor}. Remove priority handling.
12129 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12131 Don't allow template-id in using-declaration.
12132 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
12133 (do_class_using_decl): Likewise.
12135 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
12137 * cp/spew.c (read_token): No need to pop buffers.
12139 2001-08-02 Stan Shebs <shebs@apple.com>
12141 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
12142 (fnaddr_from_vtable_entry): Remove decl.
12143 * method.c (use_thunk): Update comment.
12145 2001-08-01 Andrew Cagney <ac131313@redhat.com>
12147 * repo.c (get_base_filename): Change return value to const char
12150 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
12154 * cp-tree.h (flag_honor_std): Remove.
12155 (CPTI_FAKE_STD): Remove.
12156 (std_node): Remove comment about it being NULL.
12157 (fake_std_node): Remove.
12158 * decl.c (in_fake_std): Remove.
12159 (walk_namespaces_r): Remove fake_std_node check.
12160 (push_namespace): Remove in_fake_std code.
12161 (pop_namespace): Likewise.
12162 (lookup_name_real): Remove fake_std_node check.
12163 (init_decl_processing): Always create std_node. Always add
12164 std:: things there.
12165 (builtin_function): Always put non '_' fns in std.
12166 * decl2.c (flag_honor_std): Remove.
12167 (lang_f_options): Remove honor-std.
12168 (unsupported_options): Add honor-std.
12169 (set_decl_namespace): Remove fake_std_node check.
12170 (validate_nonmember_using_decl): Likewise.
12171 (do_using_directive): Likewise.
12172 (handle_class_head): Likewise.
12173 * dump.c (cp_dump_tree): Likewise.
12174 * except.c (init_exception_processing): Adjust.
12175 * init.c (build_member_call): Remove fake_std_node check.
12176 (build_offset_ref): Likewise.
12177 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
12178 * rtti.c (init_rtti_processing): Adjust.
12180 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
12182 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
12183 operand while calling cp_tree_equal.
12185 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
12187 The 3.0 ABI no longer has vbase pointer fields.
12188 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
12189 FORMAT_VBASE_NAME): Remove.
12190 * method.c (do_build_copy_constructor): Adjust.
12191 (do_build_assign_ref): Adjust.
12192 * search.c (lookup_field_r): Adjust.
12193 * typeck.c (build_component_ref): Adjust.
12195 The 3.0 ABI always has a vtable pointer at the start of every
12197 * rtti.c (build_headof_sub): Remove.
12198 (build_headof): Adjust.
12199 (get_tinfo_decl_dynamic): No need to check flag_rtti
12201 (create_real_tinfo_var): Explain why we need a hidden name.
12203 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
12206 * class.c (update_vtable_entry_for_fn): The fixed adjustment
12207 of a virtual thunk should be from declaring base.
12209 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
12211 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
12212 the shared virtual base, so preserving inheritance graph order.
12214 2001-07-30 Andreas Jaeger <aj@suse.de>
12216 * decl2.c: Remove unused var global_temp_name_counter.
12218 2001-07-28 Richard Henderson <rth@redhat.com>
12220 * method.c (pending_inlines): Remove.
12222 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
12224 * class.c (mark_primary_virtual_base): Don't adjust base
12226 (dfs_unshared_virtual_bases): Adjust them here.
12227 (mark_primary_bases): Explain why we adjust at the end.
12229 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
12231 * class.c (finish_struct_1): When copying the primary base's
12232 VFIELD, make sure we find it is at offset zero.
12234 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12236 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
12237 tsubst_expr for default template arguments.
12239 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
12242 * spew.c (yylex): Only copy the token's lineno, if it is
12245 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
12248 * call.c (resolve_args): Simplify, call
12249 convert_from_reference.
12250 (build_new_op): Resolve and convert from reference ARG1
12251 earlier. Adjust ARG2 & ARG3 resolve and conversion.
12253 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
12255 * decl.c (last_function_parm_tags): Remove.
12256 (current_function_parm_tags): Remove.
12257 (init_decl_processing): Adjust.
12258 (start_function): Adjust.
12259 (store_parm_decls): Adjust.
12262 * decl.c (grokdeclarator): Detect when a function typedef is
12263 declaring a function, and create last_function_parms correctly.
12265 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
12267 * call.c (joust): Only prefer a non-builtin candidate to a builtin
12268 one if they have the same signature.
12270 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
12271 it rather than toplevel_bindings_p. Give it a mangled name if static.
12272 (convert_to_reference): Adjust.
12273 * decl2.c (get_temp_name): Lose.
12274 * mangle.c (mangle_ref_init_variable): New fn.
12275 (mangle_guard_variable): Strip the ref-init header.
12276 * cp-tree.h: Adjust.
12277 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
12279 (grok_reference_init): Always use DECL_INITIAL.
12281 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12284 * call.c (build_conditional_expr): Recheck args after
12286 * cp-tree.h (build_conditional_expr): Move to correct file.
12287 * typeck.c (decay_conversion): Diagnose any unknown types
12289 (build_binary_op): Don't do initial decay or default
12290 conversions on overloaded functions.
12291 (build_static_cast): Don't do a decay conversion here.
12293 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12296 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
12297 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
12299 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12301 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
12302 (create_vtbl_ptr): ... here.
12304 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12306 * class.c (build_vbase_offset_vbtl_entries): Look for
12307 non-primary base of which we are a sub vtable.
12309 2001-07-24 Phil Edwards <pme@sources.redhat.com>
12311 * semantics.c (finish_this_expr): Remove unused code.
12313 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
12315 Simplify rtti, now we've only one ABI.
12316 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
12318 (tinfo_decl_id, tinfo_var_id): Remove.
12319 (get_typeid_1): Remove.
12321 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
12322 (typeid_ok_p): New function.
12323 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
12324 (get_tinfo_decl): Remove old abi documentation.
12325 (tinfo_from_decl): Remove.
12326 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
12327 (get_typeid_1): Remove.
12328 (get_base_offset): Remove.
12329 (synthesize_tinfo_var): Absorb get_base_offset.
12330 (create_real_tinfo_var): Don't use tinfo_decl_id.
12332 2001-07-23 Graham Stott <grahams@redhat.com>
12334 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
12335 variable has_two_argument_delete_p.
12337 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
12339 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
12340 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
12341 (CPTI_INDEX_IDENTIFIER): Remove.
12342 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
12343 (delta2_identifier): Remove.
12344 (index_identifier): Remove.
12345 (pfn_or_delta2_identifier): Remove.
12346 (flag_vtable_thunks): Remove.
12347 (VTABLE_DELTA2_NAME): Remove.
12348 (VTABLE_INDEX_NAME): Remove.
12349 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
12350 (vfunc_ptr_type_node): Adjust.
12351 (VTABLE_NAME_PREFIX): Adjust.
12352 (build_vfn_ref): Lose first parameter.
12353 (fixup_all_virtual_upcast_offsets): Remove.
12354 * decl.c (initialize_predefined_identifiers): Remove
12355 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
12356 (init_decl_processing): Remove no-vtable-thunk code.
12357 * decl2.c (flag_vtable_thunks): Remove.
12358 (mark_vtable_entries): Remove no-vtable-thunk code.
12359 * error.c (dump_decl): Remove no-vtable-thunk code.
12360 (dump_expr): Adjust ptr to member function code.
12361 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
12363 * rtti.c (build_headof): Remove no-vtable-thunk code.
12364 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
12365 * search.c (get_base_distance): Remove expand_upcast_fixups case.
12366 (virtual_context) Remove.
12367 (expand_upcast_fixups): Remove.
12368 (fixup_virtual_upcast_offsets): Remove.
12369 (fixup_all_virtual_upcast_offsets): Remove.
12370 * typeck.c (get_member_function_from_ptrfunc): Remove
12371 no-vtable-thunk code.
12372 * call.c (build_over_call): Adjust call to build_vfn_ref.
12373 * class.c (build_vfn_ref): Lose first parameter. Remove
12374 no-vtable-thunk code.
12375 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
12376 (build_vtable_entry): Remove no-vtable-thunk code.
12378 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
12380 Remove old-abi remnants. Remove comments about old abi
12381 behavior. Remove references to 'new-abi' in comments.
12382 * cp-tree.h: Adjust comments.
12383 (vbase_offsets_in_vtable_p): Delete.
12384 (vcall_offsets_in_vtable_p): Delete.
12385 (vptrs_present_everywhere_p): Delete.
12386 (all_overridden_vfuns_in_vtables_p): Delete.
12387 (merge_primary_and_secondary_vtables_p): Delete.
12388 (TYPE_CONTAINS_VPTR_P): Adjust.
12389 (VTT_NAME_PREFIX): Remove.
12390 (CTOR_VTBL_NAME_PREFIX): Remove.
12391 (init_vbase_pointers): Remove.
12392 * class.c: Adjust coments.
12393 (build_vbase_pointer_fields): Delete.
12394 (build_vbase_pointer): Remove old-abi code.
12395 (build_secondary_vtable): Likewise.
12396 (modify_all_vtables): Likewise.
12397 (create_vtable_ptr): Likewise.
12398 (layout_class_type): Likewise.
12399 (finish_struct_1): Likewise.
12400 (finish_vtbls): Likewise.
12401 (dfs_finish_vtbls): Delete.
12402 (build_vbase_offset_vtbl_entries): Remove old-abi code.
12403 * cvt.c: Adjust comments.
12404 * decl.c: Adjust comments.
12405 * decl2.c: Adjust comments.
12406 * init.c: Adjust comments.
12407 (construct_virtual_bases): Remove old-abi code.
12408 * lang-specs.h: Remove -fno-new-abi.
12409 * mangle.c: Adjust comments.
12410 * rtti.c: Adjust comments.
12411 (get_base_offset): Remove old-abi-code.
12412 * search.c: Adjust comments.
12413 (dfs_init_vbase_pointers): Remove.
12414 (dfs_vtable_path_unmark): Remove.
12415 (init_vbase_pointers): Remove.
12416 * semantics.c: Adjust comments.
12417 (emit_associated_thunks): Remove old-abi code.
12418 * typeck.c: Adjust comments.
12420 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
12422 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
12425 2001-07-19 Mark Mitchell <mark@codesourcery.com>
12427 * class.c (finish_struct_anon): Forbid nested classes.
12429 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
12431 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
12432 * optimize.c: Include debug.h.
12433 (maybe_clone_body): Use debug hook.
12434 * semantics.c: Include debug.h.
12435 (expand_body): Use debug hook.
12437 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
12439 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
12441 2001-07-18 Mark Mitchell <mark@codesourcery.com>
12443 * class.c (type_requires_array_cookie): New function.
12444 (check_methods): Don't try to figure out whether the type needs a
12446 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
12447 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
12448 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
12449 * pt.c (instantiate_class_template): Don't set
12450 TYPE_VEC_DELETE_TAKES_SIZE.
12451 * NEWS: Document ABI changes from GCC 3.0.
12453 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
12454 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
12456 * NEWS (Changes in GCC 3.0): Fix typo.
12458 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
12460 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
12461 which attributes are to be attached, and a flags argument. Update
12462 call to decl_attributes.
12463 (grokfield): Update call to decl_attributes.
12464 * class.c (finish_struct): Update call to cplus_decl_attributes.
12465 * cp-tree.h (cplus_decl_attributes): Update prototype.
12466 * decl.c (start_decl, grokdeclarator, start_function): Update
12467 calls to decl_attributes and cplus_decl_attributes.
12468 * friend.c (do_friend): Update call to cplus_decl_attributes.
12469 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
12471 2001-07-12 Mark Mitchell <mark@codesourcery.com>
12473 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
12474 for `register' variables with an asm-specification.
12476 2001-07-11 Mark Mitchell <mark@codesourcery.com>
12478 * semantics.c (finish_asm_stmt): Mark the output operands
12479 to an asm addressable, if necessary.
12481 2001-07-11 Ben Elliston <bje@redhat.com>
12483 * Revert this change -- there is a subtle bug.
12486 * decl.c (finish_enum): New "attributes" argument; pass it to
12487 cplus_decl_attributes. Use a narrower type if the enum is packed.
12488 * cp-tree.h (finish_enum): Adjust prototype.
12489 * parse.y (enum_head): New non-terminal.
12490 (structsp): Use it. Enums now may be preceded or followed by
12491 optional attributes -- pass their chained tree to finish_enum().
12492 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
12494 2001-07-10 Mark Mitchell <mark@codesourcery.com>
12496 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
12499 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
12501 * semantics.c (cp_expand_stmt): Fix for null
12502 current_function_return_value.
12504 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
12506 * call.c (build_op_delete_call): Initialize fn.
12507 (convert_like_real): Delete conditional.
12508 (joust): Initialize *w and *l.
12509 * class.c: Add prototype for binfo_ctor_vtable.
12510 (get_primary_binfo): Initialize result.
12511 * init.c (build_java_class_ref): Initialize name.
12513 2001-07-09 Erik Rozendaal <dlr@acm.org>
12515 * typeck.c (unary_complex_lvalue): Do not duplicate the
12516 argument to modify, pre-, or post-increment when used as an
12517 lvalue and when the argument has side-effects.
12519 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
12521 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12522 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
12523 cplus_decl_attributes even if attrs is NULL.
12524 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12526 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
12528 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
12529 calls to decl_attributes.
12531 2001-07-06 Ira Ruben <ira@apple.com>
12533 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
12534 be DECL_TEMPLATE_RESULT.
12536 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12538 * cp-tree.h (copy_template_template_parm): Rename to ...
12539 (bind_template_template_parm): ... here.
12540 * tree.c (copy_template_template_parm): Rename to ...
12541 (bind_template_template_parm): ... here. Remove the case when
12542 NEWARGS is NULL_TREE.
12543 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
12544 BOUND_TEMPLATE_TEMPLATE_PARM.
12545 * pt.c (lookup_template_class): Adjust.
12547 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
12549 * cvt.c (convert_lvalue): New fn.
12550 * cp-tree.h: Declare it.
12551 * method.c (do_build_assign_ref): Use it.
12552 (do_build_copy_constructor): Convert parm to base types
12553 before calling base constructors.
12555 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
12556 DECL_USER_ALIGN. Check flag_elide_constructors instead of
12558 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
12560 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
12562 * optimize.c (optimize_inline_calls): New function, broken out
12564 (optimize_function): ... here. Call it. Don't inline if it is
12566 (dump_function): Print name of dump flag causing this dump.
12567 * semantics.c (expand_body): Move thunk inline check to
12570 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
12572 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
12573 (comptypes): Use target.comp_type_attributes.
12575 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
12577 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
12579 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12581 * error.c (lang_print_error_function): Add a `diagnostic_context *'
12584 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
12586 * decl2.c (import_export_class): Update.
12588 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
12590 * error.c (init_error): Adjust settings.
12592 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
12594 * error.c (init_error): Adjust settings.
12596 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
12598 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
12599 return pointers to data members by reference rather than by value.
12601 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
12603 Implement the Named Return Value optimization.
12604 * cp-tree.h (struct cp_language_function): Add x_return_value.
12605 (current_function_return_value): Now a macro.
12606 * decl.c: Don't define it.
12607 (define_label, finish_case_label): Don't clear it.
12608 (init_decl_processing): Don't register it with GC.
12609 * semantics.c (genrtl_finish_function): Don't check it for
12610 no_return_label. Copy the RTL from the return value to
12611 current_function_return_value and walk, calling...
12612 (nullify_returns_r): ...this new fn.
12613 * typeck.c (check_return_expr): Set current_function_return_value.
12615 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
12617 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
12618 sharing a ctor vtable with. Merge code for cases 1 and 2.
12619 (binfo_ctor_vtable): New fn.
12620 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
12622 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
12624 * class.c (dfs_find_final_overrider): Fix logic.
12626 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
12627 virtual thunk instead of non-virtual.
12628 (get_matching_virtual): Uncomment.
12630 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
12631 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
12634 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
12636 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
12637 we've not emerged from the hierarchy of RTTI_BINFO on reaching
12638 a non-virtual base.
12640 2001-06-13 Mark Mitchell <mark@codesourcery.com>
12642 * NEWS: Update release number.
12644 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
12646 PR c++/3130, c++/3131, c++/3132
12647 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
12648 * class.c (force_canonical_binfo_r): Move
12649 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
12650 virtual bases unless they're primary and what they're primary
12651 too has been moved.
12652 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
12653 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
12654 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
12656 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
12657 (layout_nonempty_base_or_field): Add most derived type
12659 (layout_empty_base): Likewise.
12660 (build_base_field): Likewise.
12661 (build_base_fields): Likewise.
12662 (propagate_binfo_offsets): Add most derived type
12663 parameter. Skip non canonical virtual bases too.
12664 (dfs_set_offset_for_unshared_vbases): Don't skip primary
12665 bases. Do skip canonical bases.
12666 (layout_virtual_bases): Adjust.
12667 (layout_class_type): Adjust.
12668 (dfs_get_primary_binfo): Build list of virtual primary base
12670 (get_primary_binfo): Check that the shared virtual primary
12671 base candidate was found first.
12672 (accumulate_vtbl_inits): Don't do anything for non-vptr
12673 containing binfos. For case 1 primary virtual bases, keep
12674 checking that we've not emerged from the hierarchy of RTTI_BINFO.
12676 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
12679 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
12680 hierarchy looking for primary bases for a ctor
12681 vtable. Recursively call oneself, if we meet our primary via
12682 this route and haven't met it yet via inheritance graph order.
12684 2001-06-11 Mark Mitchell <mark@codesourcery.com>
12686 * lang-options.h: Emit documentation for -fno-honor-std, not
12689 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
12691 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
12692 Don't clobber delta.
12693 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
12695 2001-06-10 Mark Mitchell <mark@codesourcery.com>
12696 Gabriel Dos Reis <gdr@codesourcery.com>
12698 * Make-lang.in (cp/call.o): Depend on diagnostic.h
12699 (cp/typeck.o): Depend on diagnostic.h
12700 (cp/typeck2.o): Depend on diagnostic.h
12701 (cp/repo.o): Depend on dignostic.h
12702 * typeck.c: #include diagnostic.h
12703 (convert_for_initialization): Remove extern declaration for
12704 warningcount and errorcount.
12706 * call.c: #include diagnostic.h
12707 (convert_like_real): Remove extern declaration for warnincount and
12710 * repo.c: #include diagnostic.h
12711 * typeck2.c: #include diagnostic.h
12713 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
12715 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
12716 in previous change.
12718 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
12721 * friend.c (do_friend): Use push_decl_namespace for classes at
12724 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
12725 Jason Merrill <jason_merrill@redhat.com>
12728 * class.c (build_secondary_vtable): Use assert, rather than an error
12730 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
12731 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
12732 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
12733 Don't set BINFO_VTABLE for a primary virtual base.
12735 2001-06-07 Mark Mitchell <mark@codesourcery.com>
12737 * decl.c (duplicate_decls): Update source position information
12738 when a template function is defined.
12740 2001-06-07 Phil Edwards <pme@sources.redhat.com>
12742 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
12744 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
12747 * decl.c (pushtag): Don't push into a complete type's scope.
12749 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
12751 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
12752 (struct lang_decl_flags): Lose generate_with_vtable_p.
12753 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
12754 * class.c (copy_virtuals): Adjust.
12755 * decl2.c (mark_vtable_entries): Adjust.
12756 * method.c (make_thunk, build_vtable_entry): Adjust.
12757 * class.c (update_vtable_entry_for_fn): Only look as far as the
12758 first defining class.
12759 (build_vtbl_initializer): Put nothing in the slot for a function only
12760 defined in a lost primary virtual base.
12761 (add_vcall_offset_vtbl_entries_1): Use the same code for
12762 the lost primary case and the normal case.
12763 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
12764 (get_vfield_offset, get_derived_offset): Lose.
12765 (dfs_find_final_overrider): Use look_for_overrides_here.
12766 (get_matching_virtual): New fn.
12767 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
12768 not BV_VCALL_INDEX.
12769 * search.c (look_for_overrides_here): Split out from...
12770 (look_for_overrides_r): Here.
12772 * class.c (find_final_overrider): Return error_mark_node on error.
12774 * decl2.c (key_method): #if 0 accidental change.
12776 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
12778 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
12779 (build_over_call): Likewise.
12780 * decl.c (grokparms): Likewise.
12781 * pt.c (tsubst_decl): Likewise.
12782 * typeck.c (convert_arguments): Likewise.
12784 2001-06-05 Mark Mitchell <mark@codesourcery.com>
12786 * semantics.c (begin_class_definition): Robustify.
12788 * pt.c (instantiate_decl): Tell the repository code about the
12789 clones, not the cloned functions.
12790 * repo.c (repo_template_used): Explicitly instantiate the cloned
12791 function, not the clones.
12793 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12795 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
12796 ICS_BAD_FLAG on created conversion.
12797 (compare_ics): Break out rank.
12799 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12801 * decl.c (xref_tag): Remove extraneous %s on dependent name
12804 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12806 * class.c (layout_vtable_decl): Fix off by one error on
12808 (build_vtt): Likewise.
12809 (build_ctor_vtbl_group): Likewise.
12811 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12813 * class.c (maybe_indent_hierarchy): New function.
12814 (dump_class_hierarchy_r): Add flags. Dump extra binfo
12815 information, if enabled. Use maybe_indent_hierarchy. Adjust
12817 (dump_class_hierarchy): Adjust prototype. Adjust output format.
12818 (dump_array, dump_vtable, dump_vtt): New functions.
12819 (finish_struct_1): Adjust hierarchy dumping.
12820 (initialize_vtable): Call dump_vtable.
12821 (build_vtt): Call dump_vtt.
12822 (build_ctor_vtbl_group): Call dump_vtable.
12823 * decl2.c (flag_dump_class_layout): Remove.
12824 (cxx_decode_option): Remove dump translation unit
12825 and dump class hierarchy check. Call dump_switch_p.
12826 (finish_file): Adjust dumping.
12827 (dump.c): Only dump base classes if not TDF_SLIM.
12828 Only dump namespace members if not TDF_SLIM.
12829 * optimize.c (dump_function): New function.
12830 (optimize_function): Call dump_function.
12831 * semantics.c (expand_body): Use dump_enabled_p.
12833 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
12836 Part missed from first commit
12837 * decl2.c (finish_anon_union): Copy context.
12839 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
12842 * optimize.c (remap_decl): Remap anonymous aggregate members too.
12844 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
12847 * semantics.c (expand_body): Don't optimize thunks.
12849 2001-05-25 Sam TH <sam@uchicago.edu>
12851 * cp-tree.h lex.h: Fix header include guards.
12853 2001-05-25 Mark Mitchell <mark@codesourcery.com>
12855 * decl.c (init_decl_processing): Tweak.
12857 2001-05-24 Mark Mitchell <mark@codesourcery.com>
12859 * decl.c (duplicate_decls): Tidy.
12860 (init_decl_processing): Always set flag_no_builtin.
12862 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
12865 * decl2.c (do_local_using_decl): Push the decls, even in a
12868 2001-05-22 Mark Mitchell <mark@codesourcery.com>
12870 * optimize.c (initialize_inlined_parameters): Don't set
12871 TREE_READONLY for a VAR_DECL taking the place of an inlined
12874 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
12876 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
12877 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
12880 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
12882 * parse.y: Refer to compound literals as such, not as
12883 constructor-expressions.
12885 2001-05-21 Mark Mitchell <mark@codesourcery.com>
12887 * call.c (build_op_delete_call): Ignore exception-specifications
12888 when looking for matching delete operators.
12889 * init.c (build_new_1): Compute whether or not the allocation
12890 function used is a placement allocation function or not, and
12891 communicate this information to build_op_delete_call.
12893 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
12895 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
12896 (build_vtbl_ref): Adjust.
12897 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
12898 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
12900 (unsupported_options): Correspondingly.
12902 * decl2.c (maybe_make_one_only): Check flag_weak, not
12903 supports_one_only().
12905 * cp-tree.def (START_CATCH_STMT): Lose.
12906 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
12907 * tree.c (cp_statement_code_p): Don't case it.
12908 * semantics.c (cp_expand_stmt): Likewise.
12909 * cp-tree.h (START_CATCH_TYPE): Lose.
12910 (HANDLER_TYPE): New.
12911 * except.c (expand_start_catch_block): Don't start any blocks.
12913 (expand_end_catch_block): Don't end any blocks.
12914 * parse.y (handler): Don't pass anything from finish_handler_parms
12916 * pt.c (tsubst_expr): Likewise.
12917 * semantics.c (begin_handler): Call note_level_for_catch here.
12918 (finish_handler_parms): Don't return anything.
12919 (genrtl_catch_block, begin_catch_block): Lose.
12920 (genrtl_handler): Call expand_start_catch here.
12922 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
12924 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
12925 (get_vtable_decl, build_vtt): Not here.
12927 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
12930 * optimize.c (update_cloned_parm): Copy addressability and other
12933 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12935 * pt.c (determine_specialization): Ignore artificial functions.
12937 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
12939 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
12940 (C_RID_CODE): Remove.
12941 * lex.c (cxx_init_options): Call set_identifier_size. Update.
12942 (init_parse): Don't do it here.
12944 2001-05-18 Diego Novillo <dnovillo@redhat.com>
12946 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
12947 function declaration to avoid stripping the symbol's attributes.
12949 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
12951 * decl.c (pushdecl): Adjust error string.
12952 (xref_tag): Adjust friend class injection warning. Remove the
12953 inherited name from the class shadowed scope.
12955 2001-05-17 Mark Mitchell <mark@codesourcery.com>
12957 * except.c (cp_protect_cleanup_actions): New function.
12958 (init_exception_processing): Don't set protect_cleanup_actions
12959 here. Do set lang_protect_cleanup_actions.
12961 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
12963 * spew.c (read_token): Call yyerror on all unexpected tokens.
12965 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
12967 * init.c (member_init_ok_or_else): Take a tree rather than
12969 (expand_member_init): Adjust.
12971 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
12973 * decl.c (duplicate_decls): Suppress warning about duplicate
12974 decls if the first decl is a friend.
12976 2001-05-12 Zack Weinberg <zackw@stanford.edu>
12978 * except.c (choose_personality_routine): Export. Add
12979 explanatory comment. Take an enum languages, not a boolean.
12980 (initialize_handler_parm): Adjust to match.
12981 * cp-tree.h: Prototype choose_personality_routine.
12982 * lex.c (handle_pragma_java_exceptions): New function.
12983 (init_cp_pragma): Register #pragma GCC java_exceptions.
12985 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
12987 * method.c (build_mangled_C99_name): Remove unused prototype.
12989 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
12991 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
12992 * typeck.c (get_member_function_from_ptrfunc,
12993 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
12994 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
12996 Reverted Geoff Keating's 2001-05-03's patch.
12998 2001-05-11 Ira Ruben <ira@apple.com>
13000 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
13002 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
13004 * cp-tree.h (finish_label_expr, lookup_label): Delete.
13005 * parse.y: Update for '&&'; don't issue warning here.
13006 * semantics.c (finish_label_expr): Delete.
13008 2001-05-07 Mark Mitchell <mark@codesourcery.com>
13010 * splay-tree.h (splay_tree_max): New function.
13011 (splay_tree_min): Likewise.
13013 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
13015 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
13016 (pfn_vflag_identifier): Define.
13017 Update comment about layout of pointer functions.
13018 (build_ptrmemfunc1): Update prototype.
13019 (expand_ptrmemfunc_cst): Update prototype.
13020 * decl.c (initialize_predefined_identifiers): Initialize
13021 pfn_vflag_identifier.
13022 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
13023 an extra field to the type.
13024 * expr.c (cplus_expand_constant): Pass 'flag' between
13025 expand_ptrmemfunc_cst and build_ptrmemfunc1.
13026 * typeck.c (get_member_function_from_ptrfunc): When
13027 FUNCTION_BOUNDARY < 16, look at additional field to determine
13028 if a pointer-to-member is a real pointer or a vtable offset.
13029 (build_ptrmemfunc1): Add new parameter to contain extra field.
13030 (build_ptrmemfunc): Pass the extra field around.
13031 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
13032 (pfn_from_ptrmemfunc): Ignore the extra field.
13034 2001-05-03 Mark Mitchell <mark@codesourcery.com>
13036 * cp-tree.h (flag_inline_trees): Update documentation.
13037 * decl.c (init_decl_processing): Adjust handling of
13038 flag_inline_functions and flag_inline_trees to support -O3.
13039 (grokfndecl): Set DECL_INLINE on all functions if that's what
13040 the user requested.
13041 (save_function_data): Clear DECL_INLINE in
13042 current_function_cannot_inline is non-NULL.
13043 * decl2.c (flag_inline_trees): Update documentation.
13045 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
13047 * dump.c (cp_dump_tree, USING_STMT case): New case.
13048 * tree.c (cp_statement_code_p): Add USING_STMT.
13049 * decl2.c (do_using_directive): Add the using directive statement.
13051 * tree.c (walk_tree): Reformat an if block.
13053 2001-05-02 Mark Mitchell <mark@codesourcery.com>
13055 * decl.c (compute_array_index_type): Don't try to do anything with
13056 the indices when processing a template.
13058 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13060 * call.c: NULL_PTR -> NULL.
13061 * class.c: Likewise.
13063 * decl.c: Likewise.
13064 * decl2.c: Likewise.
13065 * except.c: Likewise.
13066 * init.c: Likewise.
13067 * rtti.c: Likewise.
13068 * search.c: Likewise.
13069 * tree.c: Likewise.
13070 * typeck.c: Likewise.
13071 * typeck2.c: Likewise.
13073 2001-05-02 Mark Mitchell <mark@codesourcery.com>
13075 * decl2.c (do_using_directive): Revert previous patch.
13077 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
13079 * cp-tree.def (USING_STMT): New statement node.
13080 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
13081 * decl2.c (do_using_directive): Add USING_STMT to statement
13082 tree. Don't emit errors when processing template decl.
13083 * pt.c (tsubst_expr, USING_STMT case): New case.
13084 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
13086 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
13088 * call.c (build_new_op): Convert args from reference here.
13089 (build_conditional_expr): Don't convert here.
13091 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
13093 * spew.c (last_token_id): New static variable.
13094 (read_token): Set it here.
13095 (yyerror): Use it here.
13097 2001-04-30 Richard Henderson <rth@redhat.com>
13099 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
13100 * decl.c: Likewise.
13102 2001-04-30 Mark Mitchell <mark@codesourcery.com>
13104 * gxxint.texi: Remove.
13105 * Make-lang.in: Remove all traces of gxxint.texi.
13107 2001-04-30 Mark P Mitchell <mark@codesourcery.com>
13109 * decl2.c (start_static_initialization_or_destruction): Correct
13110 logic to handle the -fno-use-cxa-atexit case.
13112 2001-04-30 Mark Mitchell <mark@codesourcery.com>
13114 * optimize.c (update_cloned_parm): New function.
13115 (maybe_clone_body): Use it. Update the `this' parameter too.
13117 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
13119 * decl2.c (unsupported_options): Add new-abi.
13120 * lang-options.h: Remove no longer supported options.
13122 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
13124 * except.c (can_convert_eh): Don't check template parms,
13125 typename types etc.
13127 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
13129 * optimize.c (maybe_clone_body): Copy parameter names and locations.
13131 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
13133 * cp-tree.h (adjust_clone_args): Prototype new function.
13134 * class.c (adjust_clone_args): New function.
13135 * decl.c (start_function): Call it for in charge ctors.
13137 2001-04-26 Mark Mitchell <mark@codesourcery.com>
13139 * method.c (use_thunk): Make sure that thunks really are emitted
13142 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
13144 * mangle.c (write_chars): New macro.
13145 (hwint_to_ascii): New function
13146 (write_number): Use it.
13147 (write_integer_cst): Deal with really big numbers.
13149 2001-04-25 Mark Mitchell <mark@codesourcery.com>
13151 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
13154 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
13156 * decl.c (grokdeclarator): Set context of namespace scope
13159 2001-04-24 Zack Weinberg <zackw@stanford.edu>
13161 * cp/optimize.c: Include hashtab.h.
13162 (struct inline_data): Add tree_pruner.
13163 (expand_call_inline, expand_calls_inline): Use it when calling
13165 (optimize_function): Initialize and free tree_pruner.
13167 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
13169 Lazy __FUNCTION__ generation.
13170 * cp-tree.def (FUNCTION_NAME): Remove.
13171 * cp-tree.h (function_name_declared_p): Remove.
13172 (cp_fname_init): Prototype.
13173 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
13174 don't call declare_function_name. Call start_fname_decls.
13175 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
13176 clobber the line number.
13177 (cp_fname_init): New function.
13178 (start_function): Call start_fname_decls.
13179 (finish_function): Call finish_fname_decls.
13180 * lex.c (reswords): Add slots for __FUNCTION__ et al.
13181 (rid_to_yy): Add mappings for __FUNCTION__ et al.
13182 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
13183 * parse.y (VAR_FUNC_NAME): New token.
13184 (primary): Add VAR_FUNC_NAME.
13185 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
13187 (tsubst, FUNCTION_NAME case): Remove.
13188 (tsubst_copy, FUNCTION_NAME case): Remove.
13189 (tsubst_expr, DECL_STMT case): Be careful with a
13190 DECL_PRETTY_FUNCTION_P.
13191 (instantiate_decl): Remove function_name_declared_p.
13192 * semantics.c (begin_compound_statement): Don't call
13193 declare_function_name here.
13194 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
13195 (finish_translation_unit): Call finish_fname_decls.
13196 (expand_body): Remove function_name_declared_p.
13197 * typeck2.c (digest_init): Allow any ERROR_MARK.
13199 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
13201 * pt.c (tsubst_decl): Use VOID_TYPE_P.
13202 * semantics.c: Fix some typos.
13204 2001-04-23 Phil Edwards <pme@sources.redhat.com>
13206 * cp/decl2.c (flag_honor_std): Always initialize to 1.
13208 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13210 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
13212 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
13214 * except.c (build_throw): Wrap the initialization of the exception
13215 object in a MUST_NOT_THROW_EXPR.
13216 (do_free_exception): #if 0.
13218 2001-04-20 Mark Mitchell <mark@codesourcery.com>
13220 * cp-tree.h (finish_enum): Change prototype.
13221 * decl.c (finish_enum): Reorganize.
13222 * parse.y (structsp): Adjust calls to finish_enum.
13224 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
13226 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
13229 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
13231 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
13232 (layout_empty_base): Return at end flag.
13233 (build_base_field): Likewise.
13234 (build_base_fields): Likewise.
13235 (layout_virtual_bases): Don't add 1 to eoc value.
13236 (end_of_class): Use full size for empty bases.
13237 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
13238 empty bases. Don't add 1 to eoc value. Only add trailing padding
13239 if we're an empty class with no empty bases.
13240 (dump_class_hierarchy): Dump size and alignment.
13242 2001-04-20 Jakub Jelinek <jakub@redhat.com>
13244 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
13247 2001-04-20 Jakub Jelinek <jakub@redhat.com>
13249 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
13250 is found, look first if name does not match the structure name.
13252 2001-04-19 Mark Mitchell <mark@codesourcery.com>
13254 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
13256 (SET_DECL_LANGUAGE): New macro.
13257 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
13258 (pushdecl): Likewise.
13259 (build_library_fn_1): Likewise.
13260 (build_cp_library_fn): Likewise.
13261 (grokfndecl): Likewise.
13262 (grokvardecl): Mark `extern "C"' variables as having C linkage.
13263 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
13264 * lex.c (retrofit_lang_decl): Likewise.
13265 * mangle.c (mangle_decl_string): Don't mangle the names of
13266 variables declared with C language linkage.
13267 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
13269 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
13271 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
13272 flag_access_control from uninitialized storage.
13274 2001-04-15 Mark Mitchell <mark@codesourcery.com>
13276 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
13277 * mangle.c (write_pointer_to_member_type): Fix mangling of
13278 pointers to cv-qualified member function types.
13280 * init.c (build_delete): Create a SAVE_EXPR for the address if
13281 we're going to use it more than once.
13283 2001-04-13 Mark Mitchell <mark@codesourcery.com>
13285 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
13286 (expand_ptremfunc_cst): Change prototype.
13287 (delta2_from_ptrmemfunc): Remove.
13288 * expr.c (cplus_expand_constant): Adjust call to
13289 expand_ptrmemfunc_cst.
13290 * typeck.c (build_ptrmemfunc1): Simplify.
13291 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
13292 results in a constant.
13293 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
13294 (delta2_from_ptrmemfunc): Remove.
13295 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
13297 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
13299 * cp-tree.h (decl_namespace_list): New macro.
13300 (struct saved_scope): Add decl_ns_list.
13301 * decl.c (mark_saved_scope): Mark it.
13302 * decl2.c: Lose static decl_namespace_list.
13303 (init_decl2): Don't save it.
13305 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13307 * cp-tree.h (warn_return_type, yylex): Delete redundant
13310 * decl.c (current_class_depth, global_namespace): Likewise.
13312 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
13314 * repo.c (flag_use_repository): Likewise.
13316 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13318 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
13319 set_block, pushdecl, getdecls, gettags, init_decl_processing,
13320 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
13321 lvalue_or_else, print_lang_statistics, comp_target_types,
13322 unsigned_type, signed_type, signed_or_unsigned_type,
13323 build_function_call, mark_addressable, incomplete_type_error):
13324 Delete redundant declarations.
13326 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
13328 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
13329 (TYPE_ANONYMOUS_P): New macro.
13330 (TAGGED_TYPE_P): New macro.
13331 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
13332 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
13333 * tree.c (no_linkage_helper): Likewise.
13334 * semantics.c (begin_class_definition): Likewise.
13335 * pt.c (convert_template_argument): Likewise.
13336 * lex.c (check_for_missing_semicolon): Likewise.
13338 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
13340 * class.c (dfs_unshared_virtual_bases): New function.
13341 (mark_primary_bases): Call it.
13342 (check_bases): Ignore virtual bases when determining
13345 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
13347 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
13349 2001-04-11 Mark Mitchell <mark@codesourcery.com>
13351 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
13352 cloned function to the clone.
13354 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13356 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
13358 * semantics.c: Include expr.h.
13360 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
13362 * method.c (implicitly_declare_fn): Commonize code for copy ctor
13363 and assignment op. Set TREE_USED for parameter.
13365 2001-04-10 Mark Mitchell <mark@codesourcery.com>
13367 * class.c (find_final_overrider_data): Add `candidates'.
13368 (dfs_find_final_overrider): Don't issue error messages
13370 (find_final_overrider): Issue error messages here.
13371 (build_base_field): Don't warn about amgibuous direct bases here.
13372 (warn_about_ambiguous_direct_bases): New function.
13373 (layout_class_type): Use it.
13375 2001-04-10 Richard Henderson <rth@redhat.com>
13377 * typeck.c (build_array_ref): Push the array reference inside
13378 COMPOUND_EXPR and COND_EXPR.
13380 2001-04-05 Mark Mitchell <mark@codesourcery.com>
13382 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
13383 * decl.c (duplicate_decls): Adjust accordingly.
13384 (maybe_commonize_var): Likewise.
13385 (grokfndecl): Likewise.
13386 (start_function): Likewise.
13387 (start_method): Likewise.
13388 * decl2.c (key_method): Likewise.
13389 (import_export_decl): Likewise.
13390 * method.c (implicitly_declare_fn): Likewise.
13391 * optimize.c (maybe_clone_body): Likewise.
13393 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
13395 * lang-specs.h: Add __DEPRECATED.
13397 2001-04-05 J"orn Rennecke <amylaar@redhat.com>
13399 * search.c (get_dynamic_cast_base_type): When building a new
13400 constant, set its type to ssizetype.
13402 2001-04-04 Jakub Jelinek <jakub@redhat.com>
13404 * optimize.c (expand_call_inline): Only add newly inlined statements
13405 into inlined_stmts.
13407 2001-04-03 Mark Mitchell <mark@codesourcery.com>
13409 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
13410 (OPERATOR_FORMAT): Likewise.
13411 (OPERATOR_TYPENAME_FORMAT): Likewise.
13412 * operators.def: Remove old name-mangling information.
13413 * decl.c (grok_op_properties): Adjust accordingly.
13414 * lex.c (init_operators): Likewise.
13415 * rtti.c (get_tinfo_decl): Issue error messages about types that
13416 have variable size.
13418 2001-04-03 Mark Mitchell <mark@codesourcery.com>
13420 * decl2.c (import_export_decl): Don't call import_export_class
13421 when processing an inline member function.
13422 * semantics.c (expand_body): Call import_export_decl before
13423 emitting inline functions.
13425 2001-03-28 Richard Henderson <rth@redhat.com>
13427 IA-64 ABI Exception Handling:
13428 * cp-tree.def (EH_SPEC_BLOCK): New.
13429 (MUST_NOT_THROW_EXPR): New.
13430 * cp-tree.h: Update changed function declarations.
13431 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
13432 (CPTI_CALL_UNEXPECTED): New.
13433 (struct cp_language_function): Rename x_eh_spec_try_block
13434 to x_eh_spec_block.
13435 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
13436 * decl.c (current_binding_level): If no current function
13437 bindings, revert to scope_chain.
13438 (initialize_predefined_identifiers): Remove __cp_push_exception.
13439 (store_parm_decls): Use begin_eh_spec_block.
13440 (finish_function): Use finish_eh_spec_block.
13441 (mark_lang_function): Update for name changes.
13442 * decl2.c (finish_file): No mark_all_runtime_matches.
13443 * dump.c (cp_dump_tree): Handle new tree codes.
13444 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
13445 * except.c (catch_language_init, catch_language): Remove.
13446 (init_exception_processing): Don't set language code.
13447 Initialize call_unexpected_node, protect_cleanup_actions,
13448 eh_personality_libfunc, lang_eh_runtime_type.
13449 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
13450 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
13451 (prepare_eh_type): Split out type canonicalizations ...
13452 (build_eh_type_type): ... from here.
13453 (build_eh_type_type_ref): Remove.
13454 (mark_all_runtime_matches): Remove.
13455 (build_exc_ptr): New.
13456 (do_begin_catch, do_end_catch): New.
13457 (do_pop_exception): Remove.
13458 (build_terminate_handler): Remove.
13459 (choose_personality_routine): Split out language choice from ...
13460 (initialize_handler_parm): ... here.
13461 Use MUST_NOT_THROW_EXPR.
13462 (expand_start_catch_block): Use do_begin_catch. Simplify Java
13463 exception object handling.
13464 (expand_start_eh_spec, expand_end_eh_spec): Remove.
13465 (expand_exception_blocks, alloc_eh_object): Remove.
13466 (begin_eh_spec_block, finish_eh_spec_block): New.
13467 (do_allocate_exception, do_free_exception): New.
13468 (expand_throw): Merge into ...
13469 (build_throw): ... here. Update for abi.
13470 * expr.c (cplus_expand_expr): No expand_internal_throw.
13471 Handle MUST_NOT_THROW_EXPR.
13472 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
13473 * semantics.c (*) Update for except.h name changes.
13474 (genrtl_try_block): No protect_with_terminate.
13475 (genrtl_eh_spec_block): New.
13476 (genrtl_handler): Don't emit the goto here.
13477 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
13478 (genrtl_finish_function): Don't expand_exception_blocks.
13479 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
13481 2001-03-28 Richard Henderson <rth@redhat.com>
13483 * decl.c (struct named_label_list): Rename eh_region to
13484 in_try_scope, add in_catch_scope.
13485 (struct binding_level): Rename eh_region to is_try_scope,
13486 add is_catch_scope.
13487 (note_level_for_try): Rename from note_level_for_eh.
13488 (note_level_for_catch): New.
13489 (poplevel): Copy both is_try_scope and is_catch_scope to
13490 the named_label_list struct.
13491 (check_previous_goto_1): Don't check for catch block via
13492 DECL_ARTIFICIAL; use in_try_scope instead.
13493 (check_goto): Likewise.
13494 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
13495 * except.c (expand_start_catch_block): Call note_level_for_catch.
13496 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
13498 2001-03-27 Richard Henderson <rth@redhat.com>
13500 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
13501 exceptions_via_longjmp.
13503 2001-03-27 Phil Edwards <pme@sources.redhat.com>
13505 * pt.c (check_default_tmpl_args): Make error messages clearer.
13507 2001-03-26 Phil Edwards <pme@sources.redhat.com>
13509 * error.c: Also undefine 'A' macro used for cp_printers definition.
13511 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13513 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
13515 2001-03-26 Mike Yang <yang@research.att.com>
13516 Mark Mitchell <mark@codesourcery.com>
13518 * dump.c (dump_access): New function.
13519 (cp_dump_tree): Use it. Dump basetype information for class
13522 2001-03-26 Mark Mitchell <mark@codesourcery.com>
13524 * Makefile.in (optimize.o): Depend on params.h.
13525 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
13526 (init_decl_processing): Set flag_no_inline when doing
13528 * optimize.c: Include params.h.
13529 (struct inline_data): Improve documentation of FNS. Add
13530 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
13531 (INSNS_PER_STMT): New macro.
13532 (remap_block): Use CLONING_P.
13533 (inlinable_function_p): Don't inline big functions.
13534 (expand_call_inline): Keep track of how much inlining we've done.
13535 (optimize_function): Set FIRST_INLINED_FN.
13536 (maybe_clone_body): Set CLONING_P.
13537 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
13539 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
13540 rest_of_compilation. Clear DECL_RTL for local variables
13542 (clear_decl_rtl): New function.
13544 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
13547 * cp-tree.h (skip_type_access_control,
13548 reset_type_access_control): Prototype.
13549 * decl.c (grokdeclarator): Access of friends is not checked.
13550 * parse.y (component_decl_list): Reset type access control.
13551 * semantics.c (decl_type_access_control): Clear
13552 current_type_lookups.
13553 (save_type_access_control): Don't save if not deferring.
13554 (skip_type_access_control, reset_type_access_control): New
13556 (begin_class_definition): Do type access control for basetypes.
13557 Start deferred access control.
13558 (finish_class_definition): Resume immediate access control if
13559 this is a local class.
13561 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13563 * class.c (add_method): Use memcpy/memmove, not bcopy.
13565 * decl.c (duplicate_decls): Likewise.
13567 2001-03-23 Jakub Jelinek <jakub@redhat.com>
13569 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
13572 2001-03-23 Jakub Jelinek <jakub@redhat.com>
13574 * decl.c (local_names): Define.
13575 (push_local_name): New.
13576 (grok_reference_init): Return init if initializing static reference
13577 variable with non-constant instead of emitting it.
13578 Move expand_static_init call to cp_finish_decl.
13579 (layout_var_decl): Call push_local_name.
13580 (maybe_commonize_var): Allow inlining functions even if they have
13581 static local variables, use comdat_linkage for them if flag_weak.
13582 (check_initializer): Call obscure_complex_init if
13583 grok_reference_init returned nonzero.
13584 (save_function_data): Clear x_local_names.
13585 (pop_cp_function_context): Free x_local_names.
13586 (mark_inlined_fns): Remove.
13587 (mark_lang_function): Mark x_local_names.
13588 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
13589 Mark inlined_fns as tree, remove call to mark_inlined_fns.
13590 * class.c (alter_access): Ensure DECL_ACCESS is never set if
13591 DECL_DISCRIMINATOR_P.
13592 * cp-tree.h (cp_language_function): Add x_local_names.
13593 (lang_decl_flags): Add discriminator into u2.
13594 (lang_decl_inlined_fns): Remove.
13595 (lang_decl): inlined_fns is now a TREE_VEC.
13596 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
13597 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
13598 TREE_VEC, not a custom structure.
13599 (optimize_function): Likewise.
13600 * mangle.c (discriminator_for_local_entity): Discriminate among
13601 VAR_DECL local entities.
13602 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
13605 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
13607 Add support for Java interface method calls.
13608 * cp-tree.h (struct lang_type): Add java_interface flag.
13609 (TYPE_JAVA_INTERFACE): New macro.
13610 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
13611 by setting TYPE_JAVA_INTERFACE.
13612 * call.c (java_iface_lookup_fn): New static.
13613 (build_over_call): If calling a method declared in a
13614 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
13615 expression which resolves the function address.
13616 (build_java_interface_fn_ref): New function.
13618 2001-03-22 Richard Henderson <rth@redhat.com>
13620 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
13621 * except.c: Don't include it.
13623 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
13624 based on an idea from Joe Buck <jbuck@synopsys.com>
13626 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
13628 (data_def, component_decl): Add reductions to bad_decl.
13630 2001-03-22 Jakub Jelinek <jakub@redhat.com>
13632 * method.c (do_build_assign_ref): Don't use build_modify_expr for
13633 anonymous aggregates, since they don't have assignment operator
13635 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
13636 assignment operators for anonymous structure fields.
13638 2001-03-21 Jason Merrill <jason@redhat.com>
13640 * pt.c (instantiate_decl): Abort if we see a member constant
13641 instantiation that doesn't already have its initializer.
13642 Downgrade explicit instantiation without definition to pedwarn.
13644 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
13645 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
13646 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
13648 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
13649 (pending_vtables): Remove.
13650 * decl2.c (pending_vtables): Remove.
13651 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
13652 CLASSTYPE_VTABLE_NEEDS_WRITING.
13653 (import_export_class): Likewise.
13654 (init_decl2): Don't mark pending_vtables.
13655 * lex.c (handle_pragma_vtable): Just sorry.
13656 * pt.c (instantiate_class_template): Don't mess with
13657 CLASSTYPE_VTABLE_NEEDS_WRITING.
13658 (mark_class_instantiated): Likewise.
13659 * ptree.c (print_lang_type): Don't print it.
13660 * semantics.c (begin_class_definition): Don't set it.
13662 * pt.c (template_tail): Replace with last_pending_template.
13663 (maybe_templates, maybe_template_tail): Remove.
13664 (add_pending_template): Adjust.
13665 (instantiate_pending_templates): Adjust.
13667 * cp-tree.h (struct saved_scope): Remove lang_stack field.
13668 (current_lang_stack): Remove.
13669 * decl.c (maybe_push_to_top_level): Don't initialize it.
13670 (duplicate_decls): Use current_lang_depth.
13671 (xref_basetypes): Likewise.
13672 * class.c (current_lang_depth): New fn.
13673 (push_lang_context): Use more varray functionality.
13674 (pop_lang_context): Likewise.
13676 * error.c (GLOBAL_THING): Always use '__'.
13678 2001-03-21 Mark Mitchell <mark@codesourcery.com>
13680 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
13682 * mangle.c (mangle_decl_string): Mangle the names of overloaded
13683 operators, even when they have `extern "C"' linkage.
13685 2001-03-19 Mark Mitchell <mark@codesourcery.com>
13687 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
13688 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13689 where it's not necessary.
13690 (add_method): Remove optimization involving comparison of
13691 DECL_ASSEMBLER_NAME.
13692 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
13693 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13694 where it's not necessary.
13695 (check_methods): Likewise.
13696 (build_clone): Likewise.
13697 (built_vtt): Likewise.
13698 * cp-tree.h (DECL_NEEDED_P): Likewise.
13699 * decl.c (pushtag): Likewise.
13700 (duplicate_decls): Likewise.
13701 (pushdecl): Likewise.
13702 (builtin_function): Likewise.
13703 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
13704 (build_cp_library_fn): Likewise.
13705 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
13706 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13707 where it's not necessary.
13708 (make_rtl_for_nonlocal_decl): Likewise.
13709 (cp_finish_decl): Likewise.
13710 (grokfndecl): Likewise.
13711 (grokvardecl): Likewise.
13712 (grokdeclarator): Likewise.
13713 (start_function): Likewise.
13714 (cp_missing_return_ok_p): Likewise.
13715 * decl2.c (grokclassfn): Likewise.
13716 (check_classfn): Likewise.
13717 (finish_static_data_member_decl): Likewise.
13718 (grokfield): Likewise.
13719 * error.c (GLOBAL_IORD_P): Remove.
13720 (dump_global_iord): Improve output.
13721 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
13722 * except.c (nothrow_libfn_p): Summarily reject any function not in
13724 * init.c (build_java_class_ref): Don't explicitly set
13725 DECL_ASSEMBLER_NAME after calling mangle_decl.
13726 * mangle.c (mangle_decl_string): Handle extern "C" functions.
13727 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
13728 * method.c (set_mangled_name_for_decl): Don't explicitly set
13729 DECL_ASSEMBLER_NAME after calling mangle_decl.
13730 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
13731 IDENTIFIER_GLOBAL_VALUE for the thunk.
13732 * pt.c (set_mangled_name_for_template_decl): Remove.
13733 (check_explicit_specialization): Don't use it.
13734 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
13735 (tsubst_friend_function): Likewise.
13736 (tsubst_decl): Likewise.
13737 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
13738 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
13739 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13740 where it's not necessary.
13741 (tinfo_base_init): Likewise.
13742 (create_real_tinfo_var): Likewise.
13743 * search.c (looup_field_1): Likewise.
13744 * semantics.c (finish_named_return_value): Likewise.
13745 * tree.c (init_tree): Set lang_set_decl_assembler_name.
13747 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
13749 Correct semantics restrictions checking in throw-expression.
13750 * except.c (is_admissible_throw_operand): New function.
13751 (build_throw): Use it.
13753 2001-03-14 Mark Mitchell <mark@codesourcery.com>
13755 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
13758 2001-03-14 Mark Mitchell <mark@codesourcery.com>
13760 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13761 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
13762 * decl.c (duplicate_decls): Likewise.
13763 (builtin_function): Likewise.
13764 (build_library_fn): Likewise.
13765 (build_cp_library_fn): Likewise.
13766 (check_initializer): Likewise.
13767 (cp_finish_decl): Likewise.
13768 * decl2.c (grokfield): Likewise.
13769 (grok_function_init): Remove #if 0'd code.
13770 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13771 * friend.c (do_friend): Likewise.
13772 * init.c (get_temp_regvar): Likewise.
13773 * method.c (make_thunk): Likewise.
13774 * pt.c (tsubst_friend_function): Likewise.
13775 (tsubst_decl): Likewise.
13776 (regenerate_decl_from_template): Likewise.
13777 * semantics.c (genrtl_named_return_value): Likewise.
13778 (expand_body): Likewise.
13779 (genrtl_finish_function): Likewise.
13780 * tree.c (cp_tree_equal): Likewise.
13782 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
13784 * call.c (convert_like_real): Add extra semantics to INNER
13785 parameter. Don't convert to temporary if a user conversion
13786 gives us an lvalue that we're about to bind to a reference.
13787 Set INNER to indicate pending reference binding on recursive
13790 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
13792 * cp/lex.c: Delete duplicate pending_lang_change.
13794 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
13796 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
13798 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
13799 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
13801 2001-03-09 Zack Weinberg <zackw@stanford.edu>
13803 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
13805 2001-03-08 Stan Shebs <shebs@apple.com>
13807 * cp-tree.h (set_identifier_local_value): Remove unused decl.
13809 2001-03-06 Zack Weinberg <zackw@stanford.edu>
13811 * spew.c: Remove references to CPP_OSTRING.
13813 2001-03-06 Andrew Haley <aph@redhat.com>
13815 * typeck.c (convert_arguments): Check that we have an fndecl.
13817 2001-03-05 Andrew Haley <aph@redhat.com>
13819 * typeck.c (convert_arguments): Don't do ellipsis conversion for
13820 __built_in_constant_p.
13822 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
13824 * typeck.c (build_static_cast): Allow enum to enum conversions
13827 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
13829 * class.c (check_field_decls): Pointers to member do not a
13830 non-pod struct make, as per DR 148.
13832 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
13834 * call.c (joust): cp_pedwarn when using gnu extension concerning
13835 worst conversion sequences.
13837 2001-03-01 Zack Weinberg <zackw@stanford.edu>
13839 * decl.c: Replace all uses of 'boolean' with 'bool'.
13841 2001-03-01 Zack Weinberg <zackw@stanford.edu>
13843 * lang-specs.h: Add zero initializer for cpp_spec field to
13844 all array elements that need one. Don't put an #ifdef inside
13845 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
13848 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
13850 Implement using decls inside template functions.
13851 * decl2.c (validate_nonmember_using_decl): Don't special case
13852 fake_std_node in the global namespace. Don't reject early when
13853 processing a template.
13854 (do_local_using_decl): Add to statement tree. Don't do further
13855 processing when building a template.
13856 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
13858 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
13860 * decl2.c (do_nonmember_using_decl): Don't complain if we find
13861 same function. Do complain about ambiguating extern "C"
13864 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
13866 Remove floating point and complex type template constant parms.
13867 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
13868 COMPLEX_TYPE extensions.
13869 (invalid_nontype_parm_type_p): Likewise.
13871 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
13873 * except.c (call_eh_info): Revert "match_function"'s type.
13875 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
13877 Fix ctor vtable vcall offsets.
13878 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
13879 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
13880 (get_matching_base): Remove.
13881 (get_original_base): New function.
13882 (build_vtbl_initializer): Initialize vid.rtti_binfo.
13883 Use a virtual thunk for a ctor vtable with an index
13884 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
13885 primary base within a constructor vtable. Only set
13886 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
13887 when primary base has been lost.
13888 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
13890 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
13892 * call.c (joust): Ensure more_specialized()'s argument length
13893 parameter has correct value for constructors.
13895 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
13897 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
13899 * decl.c (mark_inlined_fns): Prototype.
13901 2001-02-22 Mark Mitchell <mark@codesourcery.com>
13903 * spew.c (yylex): Correct handling of friends.
13905 2001-02-22 Mark Mitchell <mark@codesourcery.com>
13907 * mangle.c (write_encoding): Pass write_function_type the
13908 FUNCTION_DECL for the function being encoded.
13909 (write_function_type): Pass it along to write_bare_function_type.
13910 (write_bare_function_type): Pass it along to write_method_parms.
13911 (write_method_parms): Don't mangle the compiler-generated
13912 parameters to a constructor or destructor.
13914 2001-02-22 Andreas Jaeger <aj@suse.de>
13916 * optimize.c: Include toplev.h for
13917 note_deferral_of_defined_inline_function prototype.
13919 2001-02-22 Jakub Jelinek <jakub@redhat.com>
13921 * cp-tree.h (struct lang_decl_inlined_fns): New.
13922 (struct lang_decls): Add inlined_fns.
13923 (DECL_INLINED_FNS): New macro.
13924 * optimize.c (struct inline_data): Add inlined_fns.
13925 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
13926 (inlinable_function_p): Likewise, fix typo in comment,
13927 function is not inlinable if it already inlined function currently
13929 (expand_call_inline): Add fn to inlined_fns if necessary.
13930 (optimize_function): Initialize inlined_fns.
13931 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
13932 * decl.c (mark_inlined_fns): New function.
13933 (lang_mark_tree): Call it.
13935 2001-02-21 Jason Merrill <jason@redhat.com>
13937 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
13938 (DECL_UNINLINABLE): Move to middle-end.
13940 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
13941 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
13942 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
13943 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
13944 parms and outer BLOCK. note_deferral_of_defined_inline_function.
13946 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
13947 second parm of op=.
13949 2001-02-19 Mark Mitchell <mark@codesourcery.com>
13951 * decl2.c (set_decl_namespace): Allow explicit instantiations in
13954 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13956 * optimize.c (expand_call_inline): Don't walk subtrees of type
13959 2001-02-18 Mark Mitchell <mark@codesourcery.com>
13961 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
13964 2001-02-18 Jason Merrill <jason@redhat.com>
13966 Do put the VTT parameter in DECL_ARGUMENTS.
13967 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
13968 (current_vtt_parm): New macro.
13969 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
13970 (DECL_HAS_VTT_PARM_P): New macro.
13971 (DECL_VTT_PARM): Remove.
13972 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
13973 * decl.c (duplicate_decls): Only copy the operator code if
13975 (start_function): Set current_vtt_parm.
13976 (lang_mark_tree): Don't mark vtt_parm.
13977 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
13978 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
13979 * class.c (build_clone): Maybe remove the VTT parm.
13980 * optimize.c (maybe_clone_body): Set up the VTT parm.
13981 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
13982 * call.c (build_over_call): Just allow the VTT arg.
13983 * method.c (make_thunk): Don't set DECL_VTT_PARM.
13984 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
13985 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
13986 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
13987 * error.c (dump_function_decl): Likewise.
13988 * call.c (build_user_type_conversion_1, convert_like_real): Abort
13989 if we try to call a constructor with in-charge or VTT parms.
13990 * method.c (skip_artificial_parms_for): New fn.
13991 * call.c (add_function_candidate, build_over_call): Call it.
13992 * call.c (build_new_method_call): Use current_vtt_parm.
13993 * init.c (expand_virtual_init): Likewise.
13994 * class.c (same_signature_p): No longer static.
13995 * cp-tree.h: Declare it.
13996 * search.c (look_for_overrides_r): Use it.
13998 2001-02-17 Mark Mitchell <mark@codesourcery.com>
14000 * cp-tree.h (new_abi_rtti_p): Remove.
14001 (name_mangling_version): Likewise.
14002 (flag_do_squangling): Likewise.
14003 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
14004 * decl.c (grokfndecl): Likewise.
14005 * decl2.c (name_mangling_version): Remove.
14006 (flag_do_squangling): Likewise.
14007 (lang_f_options): Remove `squangle'.
14008 (unsupported_options): Add `squangle'.
14009 (cxx_decode_option): Issue a warning about uses of
14010 -fname-mangling-version.
14011 (finish_file): Remove old ABI support.
14012 * pt.c (check_explicit_specialization): Likewise.
14013 (tsubst_decl): Likewise.
14014 * rtti.c (init_rtti_processing): Likewise.
14015 (build_headof): Likewise.
14016 (get_tinfo_decl_dynamic): Likewise.
14017 (tinfo_from_decl): Likewise.
14018 (build_dynamic_cast_1): Likewise.
14019 (synthesize_tinfo_var): Likewise.
14020 * init.c (build_new): Allow enumeration types for the array-bounds
14021 in a direct-new-declarator.
14023 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
14025 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
14026 TREE_PROTECTED from the template being specialized.
14028 2001-02-17 Jason Merrill <jason@redhat.com>
14030 * decl2.c (build_artificial_parm): Set TREE_READONLY.
14032 * decl.c (bad_specifiers): Allow throw specs on things with
14033 pointer-to-function or -member-function type.
14034 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
14037 2001-02-17 Mark Mitchell <mark@codesourcery.com>
14039 * call.c (check_dtor_name): Handle template names correctly.
14041 2001-02-16 Jason Merrill <jason@redhat.com>
14043 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
14044 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
14045 * optimize.c (maybe_clone_body): Don't substitute it.
14046 * call.c (build_new_method_call): Check in_chrg instead.
14047 * init.c (expand_virtual_init): Likewise.
14049 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
14051 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
14052 class-type introduces at least a type-name.
14054 2001-02-16 Jakub Jelinek <jakub@redhat.com>
14056 * call.c (convert_like_real): Create a temporary for non-lvalue.
14058 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
14060 * cp-tree.h: Fix typos in comments.
14062 2001-02-16 Jason Merrill <jason@redhat.com>
14064 * optimize.c (remap_block): If we're compiling a clone, pass the
14065 new block to insert_block.
14067 2001-02-16 Mark Mitchell <mark@codesourcery.com>
14069 * semantics.c (finish_asm_stmt): Robustify.
14071 2001-02-15 Mark Mitchell <mark@codesourcery.com>
14073 * pt.c (push_template_decl_real): Don't remangle the name of a
14076 2001-02-15 Jim Meyering <meyering@lucent.com>
14078 * Make-lang.in (c++.install-common): Depend on installdirs.
14079 (c++.install-info): Likewise.
14080 (c++.install-man): Likewise.
14082 2001-02-15 Mark Mitchell <mark@codesourcery.com>
14084 * typeck2.c (build_m_component_ref): Robustify.
14086 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
14088 * friend.c (do_friend): Don't take the nested [template] class
14089 into account when deciding whether to warn about the friend
14090 function not referring to a template function.
14092 2001-02-14 Jakub Jelinek <jakub@redhat.com>
14094 * typeck.c (build_unary_op): Clarify error message.
14096 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
14098 * parse.y (component_constructor_declarator): allow optional
14099 parentheses around constructor class name.
14101 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14103 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
14105 * init.c (emit_base_init): Remove incorrect comment about
14107 * method.c (make_thunk): Fix comment alignment.
14109 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14111 Kill remnants of this is variable.
14112 * cp-tree.h (flag_this_is_variable): Remove.
14113 * decl2.c (flag_this_is_variable): Remove.
14114 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
14115 (build_vbase_path): The path is non-static, even in a cdtor.
14116 (resolves_to_fixed_type_p): Add additional return value.
14117 * search.c (init_vbase_pointers): Adjust.
14118 * tree.c (lvalue_p_1): Adjust.
14119 * typeck.c (mark_addressable): Adjust.
14121 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14123 * pt.c (unify): Don't check cv quals of array types.
14125 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14127 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
14128 check whether we already have the type.
14130 2001-02-13 Mark Mitchell <mark@codesourcery.com>
14132 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
14133 * call.c (build_op_delete_call): Simplify to remove duplicate
14135 * class.c (clone_function_decl): Don't build the deleting variant
14136 of a non-virtual destructor.
14137 * decl.c (finish_destructor_body): Don't call delete if this is a
14138 non-virtual destructor.
14139 * init.c (build_delete): Explicitly call `operator delete' when
14140 deleting an object with a non-virtual destructor.
14142 2001-02-13 Jason Merrill <jason@redhat.com>
14144 * lang-specs.h: Add more __EXCEPTIONS.
14146 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
14148 * typeck2.c (process_init_constructor): Check
14149 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
14151 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
14153 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
14154 Remove spurious information in comment. Allow further
14155 adjustments of REFERENCE_TYPE args.
14157 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
14159 * errfn.c (cp_deprecated): Tweak diagnostic text.
14160 * parse.y (new_initializer): Deprecate initializer lists
14163 2001-02-12 Mark Mitchell <mark@codesourcery.com>
14165 Remove old ABI support.
14167 2001-02-11 Mark Mitchell <mark@codesourcery.com>
14169 * decl2.c (flag_vtable_thunks): Always set it to 1.
14170 (flag_new_abi): Likewise.
14171 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
14173 * Makefile.in (g++spec.o): Fix typo.
14175 2001-02-09 Jason Merrill <jason@redhat.com>
14177 * lang-specs.h: Restore definition of __EXCEPTIONS.
14179 2001-02-08 Jason Merrill <jason@redhat.com>
14181 * search.c (shared_member_p): New function.
14182 (lookup_field_r): Use it.
14183 * cp-tree.h (SHARED_MEMBER_P): Remove.
14185 * method.c (process_overload_item): Handle template-dependent array
14187 * pt.c (type_unification_real): If we end up with undeduced nontype
14190 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
14193 * typeck2.c (friendly_abort): Don't say anything if we have
14194 earlier errors or sorries.
14196 * decl.c (check_tag_decl): Notice attempts to redefine bool and
14197 wchar_t. Ignore if in_system_header.
14199 * decl.c (maybe_push_cleanup_level): New fn...
14200 (start_decl_1): ...split out from here.
14201 * cvt.c (build_up_reference): Use it.
14202 * cp-tree.h: Declare it.
14204 2001-02-07 Mark Mitchell <mark@codesourcery.com>
14206 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
14209 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
14211 * pt.c (lookup_template_class): Make sure it's a primary
14212 template or template_template_parm when called from the parser.
14213 (instantiate_template_class): Add assertion.
14215 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
14217 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
14218 from error_mark_node.
14220 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
14222 Fix specification and implementation bugs in V3 ABI
14223 construction vtables.
14224 * cp-tree.h (flag_dump_class_layout): New flag.
14225 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
14226 (BINFO_LOST_PRIMARY_P): New flag.
14227 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
14228 (BINFO_PRIMARY_MARKED_P): Rename to ...
14229 (BINFO_PRIMARY_P): ... here.
14230 (binfo_via_virtual): New prototype.
14231 * decl2.c (flag_dump_class_layout): New flag.
14232 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
14233 use `=' as a file name separator.
14234 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
14236 (build_vtbl_address): If this is a virtual primary base, then
14237 get the vtbl of what it is ultimately primary for.
14238 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
14239 for BINFO_PRIMARY_P.
14240 (dfs_skip_nonprimary_vbases_markedp): Likewise.
14241 (get_shared_vbase_if_not_primary): Likewise.
14242 (dfs_get_pure_virtuals): Likewise.
14243 (expand_upcast_fixups): Likewise.
14244 (fixup_virtual_upcast_offsets): Likewise.
14245 (dfs_find_vbase_instance): Likewise.
14246 (find_vbase_instance): Likewise.
14247 (binfo_from_vbase): Adjust comment to reflect reality.
14248 (binfo_via_virtual): New function.
14249 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
14250 for binfo walking during VTT construction.
14251 (dfs_mark_primary_bases): Remove.
14252 (force_canonical_binfo_r): New function.
14253 (force_canonical_binfo): New function.
14254 (mark_primary_virtual_base): New function.
14255 (mark_primary_bases): Walk in inheritance graph order, use
14256 mark_primary_virtual_base.
14257 (determine_primary_base): Use some more intermediate variables.
14258 (dfs_find_final_overrider): Don't check for overriding along a
14260 (dfs_modify_vtables): Walk into primary virtual bases too.
14261 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
14262 (build_base_fields): Likewise.
14263 (dfs_set_offset_for_unshared_vbases): Likewise.
14264 (layout_virtual_bases): Likewise.
14265 (end_of_class): Likewise.
14266 (finish_struct_1): Call dump_class_hierarchy, if requested.
14267 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
14268 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
14269 (dump_class_hierarchy): Add file parameter. Append to file, if
14271 (finish_vtbls): Adjust accumulate_vtbl_inits call.
14272 Use canonical base for virtual bases.
14273 (build_vtt): Add more comments. Adjust build_vtt_inits call.
14274 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
14275 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
14276 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
14278 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
14279 from DATA. We want virtual primary bases and all bases via virtual.
14280 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
14281 virtual base when not a construction vtable.
14282 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
14283 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
14284 Use canonical bases when processing virtual bases.
14285 (accumulate_vtbl_inits): We're interested in any base via a
14287 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
14288 within a construction vtable, determine what is being overridden.
14289 (build_vtbl_initializer): Add more comments
14290 (add_vcall_offset_vtbl_entries_1): Adjust comment.
14291 (build_rtti_vtbl_entries): Check if the base has lost its
14294 2001-02-05 Mark Mitchell <mark@codesourcery.com>
14296 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
14298 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14300 * decl.c (pushdecl): Call abort instead of fatal.
14301 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
14302 * init.c (build_new_1): Likewise.
14303 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
14304 * decl.c (build_typename_type): hash_table_init now returns void.
14305 decl.c (init_decl_processing): Make an error non-fatal.
14307 2001-02-04 Mark Mitchell <mark@codesourcery.com>
14309 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
14311 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
14312 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
14313 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
14314 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
14315 * decl.c (maybe_commonize_var): Use the new name-mangling where
14317 * decl2.c (comdat_linkage): Enhance comments. Make all
14318 compiler-generated things static, if COMDAT is not available.
14319 (get_tinfo_decl): Do not make typeinfo objects that belong in the
14321 (tinfo_base_init): Use the correct mangled name for typeinfo
14322 strings, and push them into the global scope.
14323 (typeinfo_in_lib_p): New function.
14324 (synthesize_tinfo_var): Use it.
14325 (create_real_tinfo_var): Likewise.
14327 2001-02-03 Jakub Jelinek <jakub@redhat.com>
14329 * decl.c (push_class_binding): Use context_for_name_lookup instead
14330 of CP_DECL_CONTEXT.
14331 * search.c (context_for_name_lookup): Remove static. Check for NULL
14332 context in the loop.
14333 * cp-tree.h (context_for_name_lookup): Add prototype.
14335 2001-02-02 Jakub Jelinek <jakub@redhat.com>
14337 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
14338 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
14340 * call.c (convert_class_to_reference, build_user_type_conversion_1,
14341 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
14343 2001-02-02 Mark Mitchell <mark@codesourcery.com>
14345 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
14346 of macros used when compiling g++spec.c.
14347 * g++spec.c (lang_specific_driver): Link with the shared
14350 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
14352 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
14353 make_reference_declarator, make_call_declarator), method.c
14354 (implicitly_declare_fn), parse.y (namespace_using_decl,
14355 notype_unqualified_id, expr_or_declarator, new_type_id,
14356 after_type_declarator, direct_after_type_declarator,
14357 notype_declarator, complex_notype_declarator,
14358 complex_direct_notype_declarator, qualified_id,
14359 notype_qualified_id, overqualified_id, direct_new_declarator,
14360 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
14361 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
14362 instead of build_parse_node.
14364 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14366 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
14367 (minus_one_node): Moved to top level gcc directory. Renamed
14368 to integer_minus_one_node.
14370 * init.c (init_init_processing): Don't set minus_one_node.
14371 (build_vec_init): Use integer_minus_one_node.
14373 * rtti.c (get_tinfo_decl_dynamic): Likewise.
14375 2001-01-28 Jakub Jelinek <jakub@redhat.com>
14377 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
14378 identical and they would be replaced with constant, remove
14379 MODIFY_EXPR from the tree.
14381 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14383 * Make-lang.in: Remove all dependencies on defaults.h.
14384 * call.c: Don't include defaults.h.
14385 * decl.c: Likewise.
14386 * decl2.c: Likewise.
14387 * except.c: Likewise.
14389 * rtti.c: Likewise.
14390 * tree.c: Likewise.
14391 * typeck.c: Likewise.
14393 2001-01-25 Jakub Jelinek <jakub@redhat.com>
14395 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
14396 operators even in "C" linkage.
14397 * method.c (set_mangled_name_for_decl): Likewise.
14398 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
14399 overloaded operators in "C" linkage.
14401 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
14403 * pt.c (tsubst_decl): Remove IN_DECL parameter.
14404 (tsubst_arg_types): Check parameter is not void.
14405 (tsubst): Adjust tsubst_decl call.
14407 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
14409 * call.c (add_builtin_candidate): Quote std properly, from
14412 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14414 * pt.c (check_explicit_specialization): Clone constructors and
14417 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
14419 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
14420 indicates anything special about template depth. Make sure we
14421 only count the user visible template classes.
14423 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
14425 * call.c (build_conv): Typo in comment.
14426 (add_builtin_candidate): Add more explanation.
14427 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
14428 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
14429 when we have enumeral types.
14430 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
14431 candidates for relops and eqops.
14432 (joust): Simplify control flow. Allow a non-template user
14433 function to hide a builtin.
14435 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
14437 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
14438 (more_specialized): Add deduction parameter.
14439 * call.c (joust): Adjust more_specialized call.
14440 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
14441 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
14442 (get_bindings_order): Remove.
14443 (get_bindings_real): Add DEDUCE parameter.
14444 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
14445 REFERENCE_TYPE jig for DEDUCE_ORDER.
14446 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
14447 maybe_adjust_types_for_deduction.
14448 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
14450 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
14451 (check_cv_quals_for_unify): Use new unify qualifier flags.
14452 (unify): Clear new unify qualifier flags.
14453 (get_bindings_real): Add DEDUCE parameter.
14454 (get_bindings): Adjust call to get_bindings_real.
14455 (get_bindings_overload): Likewise.
14456 (most_specialized_instantiation): Adjust call to
14459 2001-01-19 Jason Merrill <jason@redhat.com>
14461 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
14463 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
14466 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
14468 * decl2.c (arg_assoc_class): Fix double iteration logic.
14470 2001-01-19 Jason Merrill <jason@redhat.com>
14472 * init.c (build_delete): Always call convert_force to strip cv-quals.
14474 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
14475 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
14476 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
14478 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14480 * search.c (get_vbase_1): Count only virtual bases.
14482 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14484 * class.c (duplicate_tag_error): Robustify flag clearing.
14486 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14488 * cp-tree.h (lookup_template_class): Add complain parm.
14489 * decl.c (lookup_namespace_name): Adjust call to
14490 lookup_template_class.
14491 (make_typename_type): Likewise.
14492 * semantics.c (finish_template_type): Likewise.
14493 * pt.c (lookup_template_class): Add complain parm. Adjust.
14494 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
14495 (tsubst): Likewise.
14497 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14499 * pt.c (copy_default_args_to_explicit_spec): Preserve
14500 object's CV quals. Reorganize.
14502 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14504 * typeck.c (build_modify_expr): Say `initialization' for
14506 * init.c (build_default_init): Convert to enumeral type, if
14509 2001-01-18 Jakub Jelinek <jakub@redhat.com>
14511 * parse.y (nomods_initdcl0): Properly set things up for
14514 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14516 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
14517 (type_unification_real): Set it.
14520 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14522 * decl.c (finish_destructor_body): Convert to vbase pointer here.
14524 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14526 * semantics.c (begin_class_definition): Check we're not inside a
14527 template parm list.
14529 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14531 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
14534 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14536 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
14537 * call.c (build_over_call): Add comment.
14539 2001-01-16 Daniel Berlin <dberlin@redhat.com>
14541 * cvt.c (ocp_convert): Handle vector type conversion
14542 * typeck2.c (digest_init): Handle vector type initializations
14544 2001-01-16 Phil Edwards <pme@sources.redhat.com>
14546 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
14549 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
14551 * pt.c (check_nontype_parm): Rename to ...
14552 (invalid_nontype_parm_type_p): ... here.
14553 (process_template_parm): Adjust.
14554 (convert_template_argument): Adjust.
14556 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
14558 * pt.c (check_nontype_parm): New function.
14559 (process_template_parm): Use it.
14560 (convert_template_argument): Use it.
14561 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
14564 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
14566 * tree.c: Add defaults.h
14567 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
14568 * Make-lang.in (cp/tree.o): Add defaults.h.
14570 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
14572 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
14574 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
14576 * g++.1: Change to be ".so man1/gcc.1".
14578 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
14580 * Make-lang.in (c++.info, c++.install-info): Build and install g++
14582 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
14583 ($(srcdir)/cp/g++int.info): New target.
14584 * gxxint.texi: Add info directory entry. Use @@ in email address.
14585 * .cvsignore: Update.
14587 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
14589 * typeck.c (build_c_cast): Do template processing earlier.
14590 Always pedwarn on array casts.
14592 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
14594 * friend.c (make_friend_class): Make sure a templated class is
14595 actually a template.
14597 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14599 * decl2.c (get_guard): Set linkage from guarded decl.
14601 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14603 * call.c (convert_default_arg): Check for unprocessed
14605 * cp-tree.h (replace_defarg): Move to spew.c.
14606 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
14607 spew.c, which is where they really are.
14608 (done_pending_defargs): Declare.
14609 (unprocessed_defarg_fn): Declare.
14610 * decl.c (replace_defarg): Move to spew.c
14611 * parse.y (structsp): Call done_pending_defargs.
14612 * spew.c (defarg_fns): Rearrange list structure.
14613 (defarg_fnsdone): New static variable.
14614 (defarg_depfns): New static variable.
14615 (init_spew): Adjust.
14616 (add_defarg_fn): Store the type in TREE_TYPE.
14617 (do_pending_defargs): Detect and deal with ordering constraints
14619 (done_pending_defargs): New function.
14620 (unprocessed_defarg_fn): New function.
14621 (replace_defarg): Moved from decl.c. Robustify. Don't save
14622 if circularity detected.
14624 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14626 * pt.c (unify): Check array has a domain, before checking
14627 whether it is variable sized.
14629 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14631 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
14632 parameters with pointers to arrays of unknown bound.
14634 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14636 * parse.y (template_parm_header, template_spec_header): New
14637 reductions. Split out from ...
14638 (template_header): ... here. Use them.
14639 (template_template_parm): Use template_parm_header.
14640 * semantics.c (finish_template_template_parm): Add assert.
14642 2001-01-10 Mark Mitchell <mark@codesourcery.com>
14644 * mangle.c (write_builtin_type): Fix thinko.
14646 * pt.c (copy_default_args_to_explicit_spec_1): New function.
14647 (copy_default_args_to_explicit_spec): Likewise.
14648 (check_explicit_specialization): Use it.
14650 * class.c (finish_struct_1): Remove last argument in call to
14651 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
14652 * decl.c (builtin_function): Likewise.
14653 (build_cp_library_fn): Likewise.
14654 (check_initializer): Likewise.
14655 (make_rtl_for_nonlocal_decl): Likewise.
14656 (cp_finish_decl): Likewise.
14657 (start_function): Likewise.
14658 * decl2.c (finish_anon_union): Likewise.
14659 * friend.c (do_friend): Likewise.
14660 * init.c (build_java_class_ref): Likewise.
14661 * method.c (make_thunk): Likewise.
14662 * pt.c (tsubst_friend_function): Likewise.
14663 * semantics.c (expand_body): Likewise.
14665 2001-01-10 Mark Mitchell <mark@codesourcery.com>
14667 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
14668 looking at DECL_CLONED_FUNCTION for non-functions.
14670 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
14672 * error.c (dump_template_parameter): Use parm to determine how
14673 to print default value.
14675 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
14677 * class.c (duplicate_tag_error): Clear more flags.
14679 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
14681 * call.c (build_new_method_call): Use binfo_for_vbase.
14683 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
14685 * cp-tree.h (flag_cond_mismatch): Don't declare.
14686 * decl2.c (flag_cond_mismatch): Don't define.
14687 (lang_f_options): Remove cond-mismatch.
14688 (unsupported_options): Add cond-mismatch.
14690 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
14692 * class.c (handle_using_decl): Reject using of constructor name
14693 of sourcing class. Allow injecting of a method with same name as
14694 nested class. Fixup error messages.
14696 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
14698 * decl2.c (lang_decode_option): Handle -Wformat=2.
14700 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
14702 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
14703 initialized_in_class.
14704 (DECL_DEFINED_IN_CLASS_P): Rename to ...
14705 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
14706 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
14707 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
14708 * pt.c (check_default_tmpl_args): Adjust for
14709 DECL_INITIALIZED_IN_CLASS_P.
14710 (instantiate_class_template): Likewise.
14711 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
14713 * class.c (finish_struct): Constify saved_filename.
14715 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
14717 * class.c (duplicate_tag_error): Adjust diagnostic.
14718 (finish_struct): Locally set location to start of struct.
14719 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
14721 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
14723 * decl.c (struct binding_level): Adjust class_shadowed comments
14724 to reflect reality.
14725 (push_class_level_binding): Adjust comments to reflect reality.
14726 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
14727 Don't set TREE_VALUE on the class_shadowed list.
14729 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14731 * decl2.c (acceptable_java_type): Allow references too.
14732 * init.c (build_java_class_ref): When using the new ABI, search
14733 `class$' and have it mangled with `mangle_decl.'
14734 * mangle.c (write_java_integer_type_codes): New function.
14735 (write_builtin_type): Detect and mangle Java integer and real
14738 2001-01-07 Mark Mitchell <mark@codesourcery.com>
14740 * decl2.c (grokfield): Don't accept `asm' specifiers for
14741 non-static data members.
14743 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14745 * expr.c (cplus_expand_expr): Don't reset `target'.
14747 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
14749 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
14751 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
14753 * parse.y (template_datadef): Check for error_mark_node.
14755 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
14757 * cp-tree.def (DEFAULT_ARG): Make `x' class.
14759 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
14761 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
14762 (record_builtin_type): Make non-static.
14763 (flag_short_double): Don't declare.
14764 (init_decl_processing): Remove the creation of many tree nodes now
14765 in c_common_nodes_and_builtins.
14766 (build_void_list_node): New function.
14767 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
14768 * cp-tree.h (flag_short_wchar): Don't declare.
14770 2001-01-04 Mark Mitchell <mark@codesourcery.com>
14772 * call.c (build_conv): Don't use build1 for USER_CONV.
14773 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
14775 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
14777 * lex.c (lang_init): Call c_common_lang_init.
14779 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
14781 * search.c (lookup_fnfields_here): Remove.
14782 (look_for_overrides_r): Use lookup_fnfields_1.
14783 Ignore functions from using declarations.
14785 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
14787 Implement exceptions specifiers for implicit member functions.
14788 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
14789 * method.c (synthesize_exception_spec): New function.
14790 (locate_dtor, locate_ctor, locate_copy): New functions.
14791 (implicitly_declare_fn): Generate the exception spec too.
14792 * search.c (check_final_overrider): Check artificial functions
14794 * typeck2.c (merge_exception_specifiers): New function.
14796 2001-01-03 Jason Merrill <jason@redhat.com>
14798 * init.c (build_default_init): New fn.
14799 (perform_member_init): Split out from here.
14800 (build_new_1): Use it. Simplify initialization logic.
14801 (build_vec_init): Take an array, rather than a pointer and maxindex.
14802 Speed up simple initializations. Don't clean up if we're assigning.
14803 * cp-tree.h: Adjust.
14804 * decl2.c (do_static_initialization): Remove TREE_VEC case.
14805 * parse.y (new_initializer): Return void_zero_node for ().
14806 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
14807 * typeck2.c (digest_init): Only complain about user-written
14810 2000-12-22 Mike Stump <mrs@wrs.com>
14812 * decl2.c: (max_tinst_depth): Increase to 50.
14814 2001-01-02 Mark Mitchell <mark@codesourcery.com>
14816 * class.c (invalidate_class_lookup_cache): Zero the
14817 previous_class_values.
14818 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
14820 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
14821 * decl.c (free_bindings): New variable.
14822 (push_binding): Don't create a new binding if we have one on the
14824 (pop_binding): Put old bindings on the free list.
14825 (init_decl_processing): Use size_int, not build_int_2.
14826 Register free_bindings as a GC root.
14827 (cp_make_fname_decl): Use size_int, not build_int_2.
14828 (push_inline_template_parms_recursive): Likewise.
14829 (end_template_parm_list): Likewise.
14830 (for_each_template_parm): Do not use walk_tree_without_duplicates.
14831 (tsubst_template_parms): Use size_int, not build_int_2.
14832 (tsubst): Likewise.
14833 * rtti.c (get_vmi_pseudo_type_info): Likewise.
14835 2001-01-02 Richard Henderson <rth@redhat.com>
14837 * parse.y (asm): Set ASM_INPUT_P.
14839 2001-01-02 Jason Merrill <jason@redhat.com>
14841 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
14844 * typeck.c (cp_truthvalue_conversion): New fn.
14845 * cvt.c (ocp_convert): Use it.
14847 * cp-tree.h: Lose c-common.c decls.
14849 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
14850 * cvt.c (convert_to_void): Use type_unknown_p.
14852 * typeck.c (strip_all_pointer_quals): Also strip quals from
14853 pointer-to-member types.
14855 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
14858 * call.c (build_new_method_call): Do evaluate the object parameter
14859 when accessing a static member.
14860 * typeck.c (build_component_ref): Likewise.
14862 2001-01-02 Andreas Jaeger <aj@suse.de>
14864 * decl.c (cp_missing_noreturn_ok_p): New.
14865 (init_decl_processing): Set lang_missing_noreturn_ok_p.
14867 2000-12-29 Jakub Jelinek <jakub@redhat.com>
14869 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
14871 2000-12-29 Mark Mitchell <mark@codesourcery.com>
14873 * class.c (pushclass): Remove #if 0'd code.
14874 * cp-tree.h (overload_template_name): Remove.
14875 * decl.c (store_bindings): Simplify.
14876 (pop_from_top_level): Likewise.
14877 * pt.c (overload_template_name): Remove.
14878 (instantiate_decl): Don't call push_to_top_level if it's not
14881 2000-12-28 Mark Mitchell <mark@codesourcery.com>
14883 * pt.c (register_local_specialization): Don't return a value.
14884 (lookup_template_class): Use move-to-front heuristic when looking
14885 up template instantiations.
14886 (instantiate_decl): Only push_to_top_level when we're actually
14887 going to instantiate the template.
14889 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
14891 * search.c (binfo_for_vtable): Return least derived class, not
14892 most. Handle secondary vtables.
14894 2000-12-22 Jason Merrill <jason@redhat.com>
14896 * pt.c (more_specialized): Don't optimize len==0.
14897 (fn_type_unification): If we're adding the return type, increase len.
14899 * typeck.c (build_binary_op): Fix pmf comparison logic.
14901 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
14902 DECL_STATIC_FUNCTION_P.
14904 * semantics.c (genrtl_finish_function): Don't try to jump to
14905 return_label unless it exists.
14907 In partial ordering for a call, ignore parms for which we don't have
14909 * call.c (joust): Pass len to more_specialized.
14910 (add_template_candidate_real): Strip 'this', pass len.
14911 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
14912 (get_bindings_order): New fn. Pass len down.
14913 (get_bindings_real): Strip 'this', pass len.
14914 (fn_type_unification): Likewise.
14915 (type_unification_real): Succeed after checking 'len' args.
14916 (most_specialized_instantiation): Lose explicit_args parm.
14917 * class.c (resolve_address_of_overloaded_function): Strip 'this',
14920 2000-12-21 Jason Merrill <jason@redhat.com>
14922 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
14923 DECL_TEMPLATE_RESULT.
14925 * search.c (lookup_field_r): Call lookup_fnfields_1, not
14926 lookup_fnfields_here.
14928 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
14930 * call.c (build_object_call): Also allow conversions that return
14931 reference to pointer to function.
14932 (add_conv_candidate): Handle totype being ref to ptr to fn.
14933 (build_field_call): Also allow members of type reference to function.
14934 Lose support for calling pointer to METHOD_TYPE fields.
14936 * error.c (dump_expr): Handle *_CAST_EXPR.
14938 * typeck2.c (build_scoped_ref): Always convert to the naming class.
14940 * tree.c (break_out_cleanups): Lose.
14941 * cp-tree.h: Remove prototype.
14942 * typeck.c (build_component_ref): Don't break_out_cleanups.
14943 (build_compound_expr): Likewise.
14944 * semantics.c (finish_expr_stmt): Likewise.
14946 2000-12-20 Richard Henderson <rth@redhat.com>
14948 * cp-tree.h: Update declarations.
14949 * decl.c (finish_case_label): Return the new stmt node.
14950 * semantics.c (finish_goto_stmt): Likewise.
14951 (finish_expr_stmt, finish_return_stmt): Likewise.
14952 (finish_break_stmt, finish_continue_stmt): Likewise.
14953 (finish_asm_stmt): Likewise.
14954 * parse.y (already_scoped_stmt): Set STMT_LINENO.
14955 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
14956 (simple_if, simple_stmt): Return the new stmt node.
14957 (save_lineno): New.
14959 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
14961 * cp-tree.h: Don't declare warn_long_long.
14963 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14965 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
14968 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14970 * pt.c (unify): Handle when both ARG and PARM are
14971 BOUND_TEMPLATE_TEMPLATE_PARM.
14973 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14975 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
14976 DECL_TEMPLATE_PARM_P.
14978 2000-12-15 Jason Merrill <jason@redhat.com>
14980 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
14982 * init.c (build_new_1): Don't strip quals from type.
14984 * decl.c (pushdecl): Don't check for linkage on a non-decl.
14986 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
14988 * call.c (build_new_function_call): Lose space before paren in
14990 (build_new_method_call): Likewise.
14992 * typeck2.c (build_m_component_ref): Propagate quals from datum.
14994 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14996 * pt.c (check_explicit_specialization): Propagate default
14997 function arguments to explicit specializations.
14999 2000-12-13 DJ Delorie <dj@redhat.com>
15001 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
15004 2000-12-08 Jason Merrill <jason@redhat.com>
15006 * error.c (dump_function_name): Don't let the user see __comp_ctor.
15008 Clean up copy-initialization in overloading code.
15009 * call.c (build_user_type_conversion_1): Die if we are asked to
15010 convert to the same or a base type.
15011 (implicit_conversion): Avoid doing so. Lose reference binding code.
15012 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
15013 direct-initialization. Also do direct-init part of copy-init.
15014 (build_user_type_conversion): Don't provide context to convert_like.
15015 * cvt.c (ocp_convert): build_user_type_conversion will now provide
15016 the constructor call for copy-init.
15018 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
15019 instantiation of a member template.
15020 (do_decl_instantiation): Not here.
15022 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
15024 * class.c (check_field_decls): Don't special case anonymous
15025 fields in error messages.
15026 (note_name_declared_in_class): Use %D on diagnostic.
15028 * tree.c (pod_type_p): Use strip_array_types.
15029 (cp_valid_lang_attribute): Likewise.
15030 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
15031 multiple evaluations.
15032 (cp_has_mutable_p): Use strip_array_types.
15034 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
15036 * cp-tree.h (sufficient_parms_p): Declare new function.
15037 * call.c (sufficient_parms_p): New function, broken out of ...
15038 (add_function_candidate): ... here. Use it.
15039 (add_conv_candidate): Use it.
15040 * decl.c (grok_ctor_properties): Use it.
15042 2000-12-07 Jakub Jelinek <jakub@redhat.com>
15044 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
15046 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
15048 * decl2.c (lang_decode_option): Handle -Wformat-security.
15050 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15052 * pt.c (verify_class_unification): New function.
15053 (get_class_bindings): Use it.
15054 (try_class_unification): Tidy.
15055 (unify): Handle when argument of a template-id is not
15056 template parameter dependent.
15057 (template_args_equal): Handle when TREE_CODE's do not match.
15059 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
15061 * lang-specs.h (c++): When invoking the stand-alone preprocessor
15062 for -save-temps, pass all relevant -Defines to it, and then don't
15063 pass them to cc1plus.
15065 2000-12-05 Will Cohen <wcohen@redhat.com>
15067 * decl.c (finish_case_label): Cleared
15068 more_cleanups_ok in surrounding function scopes.
15069 (define_label): Likewise.
15071 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
15073 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
15074 (get_matching_virtual): Remove.
15075 (look_for_overrides): Declare new function.
15076 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
15078 * class.c (check_for_override): Move base class iteration code
15079 to look_for_overrides.
15080 * search.c (next_baselink): Remove.
15081 (get_virtuals_named_this): Remove.
15082 (get_virtual_destructor): Remove.
15083 (tree_has_any_destructors_p): Remove.
15084 (struct gvnt_info): Remove.
15085 (check_final_overrider): Remove `virtual' from error messages.
15086 (get_matching_virtuals): Remove. Move functionality to ...
15087 (look_for_overrides): ... here, and ...
15088 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
15091 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
15093 * typeck.c (get_delta_difference): If via a virtual base,
15095 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
15098 2000-12-04 Richard Henderson <rth@redhat.com>
15100 * error.c (dump_tree): Use output_add_string not OB_PUTS.
15102 2000-12-04 Jason Merrill <jason@redhat.com>
15104 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
15105 (write_builtin_type): Pass intSI_type_node and the like through
15107 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
15108 Pass intSI_type_node and the like through type_for_mode.
15109 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
15110 * pt.c (tsubst, unify): Likewise.
15111 * tree.c (walk_tree): Likewise.
15112 * error.c (dump_type): Likewise.
15113 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
15115 * Make-lang.in: Tweak top comment for emacs.
15116 (cp/TAGS): Restore.
15118 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
15120 * class.c (clone_function_decl): Robustify.
15122 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
15124 * decl.c (store_bindings): Only search in the non modified
15125 old_bindings for duplicates.
15127 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
15129 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
15130 TYPE_POLYMORPHIC_P.
15132 * typeck.c (build_static_cast): Remove unused variable.
15134 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15136 * pt.c: Fix typo in comment.
15138 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
15140 * decl2.c (warn_format): Remove definition.
15141 (lang_decode_option): Handle -Wformat-nonliteral,
15142 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
15144 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
15146 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
15147 (init_decl_processing): Don't create string_type_node,
15148 const_string_type_node, wint_type_node, intmax_type_node,
15149 uintmax_type_node, default_function_type, ptrdiff_type_node and
15150 unsigned_ptrdiff_type_node. Adjust position of call to
15151 c_common_nodes_and_builtins.
15152 (identifier_global_value): New function.
15154 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
15156 * call.c (standard_conversion): Reject pointer to member
15157 conversions from ambiguous, inaccessible or virtual bases.
15158 * typeck.c (build_static_cast): Don't check pointers to members
15161 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
15163 * method.c (do_build_copy_constructor): Preserve cv
15164 qualifications when accessing source object members.
15165 (do_build_assign_ref): Likewise. Remove separate diagnostics for
15168 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
15170 * method.c (do_build_assign_ref): Construct appropriately
15171 CV-qualified base reference. Don't allow const casts in base
15174 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
15176 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
15177 incomplete return type.
15179 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15181 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
15182 * semantics.c (finish_base_specifier): Accept a _TYPE not a
15185 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15187 * spew.c (yyerror): Cope if yylval.ttype is NULL.
15189 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15191 * decl.c (grokdeclarator): Diagnose undefined template contexts.
15193 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15195 * decl.c (grokdeclarator): Do type access control on friend
15198 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
15200 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
15201 bison parser ickiness.
15202 * pt.c (tsubst_friend_function): Enter namespace scope when
15203 tsubsting the function name.
15204 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
15206 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
15208 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
15209 * cvt.c (cp_convert_to_pointer): Add force parameter.
15210 Allow conversions via virtual base if forced.
15211 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
15212 (ocp_convert): Likewise.
15213 * search.c (binfo_from_vbase): Return the virtual base's binfo.
15214 * typeck.c (get_delta_difference): Adjust handling of virtual
15217 2000-11-26 Mark Mitchell <mark@codesourcery.com>
15219 * tree.c (struct list_hash): Remove.
15220 (list_hash_table): Make it be an htab.
15221 (struct list_proxy): New type.
15222 (list_hash_eq): New function.
15223 (list_hash_pieces): Renamed from ...
15224 (list_hash): ... this.
15225 (list_hash_lookup): Remove.
15226 (list_hash_add): Remove.
15227 (hash_tree_cons): Use the generic hashtable.
15228 (mark_list_hash): Remove.
15229 (init_tree): Create the hashtable.
15231 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
15233 * method.c (build_mangled_C9x_name): Rename to
15234 build_mangled_C99_name. Change C9X references in comments to
15237 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
15239 * parse.y (unary_expr): Move VA_ARG from here ...
15240 (primary): ... to here.
15242 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
15244 * semantics.c (finish_id_expr): If type is error_mark, return
15247 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
15249 * pt.c (lookup_template_class): Simplify loop exit constructs.
15250 Cope when there is no partial instantiation of a template
15253 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
15255 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
15257 2000-11-22 Mark Mitchell <mark@codesourcery.com>
15259 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
15262 * pt.c (do_decl_instantiate): Explicitly clone constructors and
15263 destructors that haven't already been cloned.
15265 2000-11-20 Richard Henderson <rth@redhat.com>
15267 * parse.y (yyparse_1): Rename the parser entry point.
15269 2000-11-20 Alex Samuel <samuel@codesourcery.com>
15271 * mangle.c (write_name): Use <unscoped-name> for names directly in
15273 (write_unscoped_name): Accept names directly in function scope.
15275 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
15277 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
15278 * parse.y (extdef): Add EXPORT reduction.
15279 * spew.c (yylex): Don't skip export here.
15281 2000-11-19 Mark Mitchell <mark@codesourcery.com>
15283 * decl.c (init_decl_processing): Correct name of pure virtual
15284 function under the new ABI.
15285 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
15286 (throw_bad_typeid): Likewise for bad typeid function.
15288 2000-11-18 Mark Mitchell <mark@codesourcery.com>
15290 * decl.c (grokparms): Don't even function types of `void' type,
15292 * mangle.c (write_type): Don't crash when confronted with the
15295 * decl.c (grokparms): Don't create parameters of `void' type.
15297 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
15299 * lex.c (mark_impl_file_chain): Delete.
15300 (init_parse): Remove call to ggc_add_string_root. No need to
15301 ggc_strdup a string constant. Do not add impl_file_chain to GC
15303 (handle_pragma_implementation): No need to ggc_strdup main_filename.
15305 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
15307 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
15309 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
15311 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
15312 * decl.c (grokdeclarator): Don't reject void parms here.
15313 (require_complete_types_for_parms): Simplify, use
15314 complete_type_or_else.
15315 (grokparms): Remove bitrot. Remove funcdef parm.
15316 Deal with ellipsis parm lists here.
15317 * semantics.c (finish_parmlist): Don't append void_list_node
15318 here. Set PARMLIST_ELLIPSIS_P.
15320 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
15322 * typeck2.c (incomplete_type_error): Reorganize to avoid
15323 excessive diagnostics.
15325 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
15327 * lex.c (struct impl_files, internal_filename): Constify a char *.
15329 2000-11-16 Mark Mitchell <mark@codesourcery.com>
15331 * mangle.c (write_special_name_constructor): Don't generate
15332 assembler junk when confronted with an old-style constructor.
15333 (write_special_name_destructor): Likewise.
15334 (mangle_decl_string): Do it here instead.
15336 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
15338 * call.c (op_error): Make error messages clearer.
15340 2000-11-15 Mark Mitchell <mark@codesourcery.com>
15342 * decl.c (wrapup_globals_for_namespace): Don't mark things
15343 TREE_ASM_WRITTEN when they're not.
15345 2000-11-15 Jason Merrill <jason@redhat.com>
15347 * typeck2.c (friendly_abort): Uncount the error before handing
15348 off to fancy_abort.
15350 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
15352 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
15354 2000-11-14 Mark Mitchell <mark@codesourcery.com>
15356 * class.c (build_vtbl_initializer): Fix typo in comment.
15357 * typeck.c (expr_sizeof): Don't crash on errors.
15359 2000-11-14 Jim Wilson <wilson@redhat.com>
15361 * lang-specs.h: Add %2 after %(cc1_options).
15363 2000-11-14 Richard Henderson <rth@redhat.com>
15365 * typeck.c (c_sizeof): Be strict about casting result value
15366 back to c_size_type_node.
15367 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
15369 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
15371 * typeck.c (build_unary_op): Use boolean_increment from
15372 c-common.c, moving the relevant code there.
15374 2000-11-11 Jason Merrill <jason@redhat.com>
15376 * typeck.c (mark_addressable): Don't call put_var_into_stack.
15378 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
15381 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15383 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
15384 * lex.c (copy_lang_decl): Likewise.
15386 2000-11-09 Mark Mitchell <mark@codesourcery.com>
15388 * dump.c (cp_dump_tree): Don't dump function bodies here.
15390 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
15391 (dump.o): Update dependency list.
15392 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
15393 (flag_dump_translation_unit): Likewise.
15394 (CP_TYPE_QUALS): Adjust definition.
15395 (DECL_C_BIT_FIELD): Remove.
15396 (SET_DECL_C_BIT_FIELD): Likewise.
15397 (CLEAR_DECL_C_BIT_FIELD): Likewise.
15398 (add_maybe_template): Likewise.
15399 (strip_array_types): Likewise.
15400 (dump_node_to_file): Likewise.
15401 (cp_dump_tree): New function.
15402 * decl.c (init_decl_processing): Set lang_dump_tree.
15403 * decl2.c (flag_dump_translation_unit): Remove.
15404 * dump.c: Move most of it to ../c-dump.c.
15405 (cp_dump_tree): New function.
15406 * pt.c (add_maybe_template): Remove.
15407 * typeck.c (strip_array_types): Likewise.
15409 2000-11-07 Eric Christopher <echristo@redhat.com>
15411 * decl.c (init_decl_processing): Change definition of
15412 __wchar_t to wchar_t. Remove artificial declaration of
15414 * lex.c: Change instances of __wchar_t to wchar_t.
15416 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
15418 * lex.c (do_identifier): Don't lookup_name for operators.
15419 * parse.y (operator): Save looking_for_typename.
15420 (unoperator): Restore it.
15421 * spew.c (frob_opname): Use nth_token for lookahead.
15423 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
15425 * decl.c (grok_op_properties): Always use coerce_new_type and
15426 coerce_delete_type.
15427 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
15428 exception specification. Tidy up.
15429 (coerce_delete_type): Preserve exception specification. Tidy up.
15431 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
15433 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
15434 (push_binding_level), error.c (cp_tree_printer), pt.c
15435 (process_partial_specialization, tsubst_template_arg_vector),
15436 search.c (lookup_member): Use memset () instead of bzero ().
15438 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
15440 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
15442 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
15444 * Make-lang.in (c++.distdir): Remove.
15446 2000-11-04 Mark Mitchell <mark@codesourcery.com>
15448 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
15449 declarations from different namespaces to be combined.
15451 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
15453 * decl.c: Include tm_p.h.
15455 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
15457 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
15459 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
15461 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
15462 (build_overload_value), repo.c (open_repo_file), xref.c
15463 (open_xref_file): Use strchr () and strrchr () instead of index ()
15466 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
15468 * call.c (build_over_call): Call fold on the CALL_EXPR.
15470 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
15472 * error.c (dump_template_decl): Separate template hearders with
15475 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
15477 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
15478 TS_* flags with corresponding TFF_*. Adjust prototypes of
15479 functions (which used to take a tree_string_flags) to take an int.
15481 * cp-tree.h (enum tree_string_flags): Remove
15482 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
15483 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
15484 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15485 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15486 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
15487 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
15488 (type_as_string, decl_as_string, expr_as_string,
15489 context_as_string): Adjust prototype.
15491 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
15492 instead of TS_PLAIN.
15494 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
15495 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
15498 2000-10-30 Mark Mitchell <mark@codesourcery.com>
15500 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
15501 (linkage_kind): New enumeration.
15502 (decl_linkage): New function.
15503 * decl2.c (comdat_linkage): Extend comment.
15504 * error.c (dump_function_decl): Print the arguments used to
15505 instantiate a template, even when not printing the type of the
15507 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
15508 not TREE_PUBLIC, to test for external linkage.
15509 * tree.c (decl_linkage): New function.
15511 2000-10-28 Mark Mitchell <mark@codesourcery.com>
15513 * pt.c (instantiate_decl): Always instantiate static data members
15514 initialized in-class.
15516 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
15518 * Make-lang.in: Move all build rules here from Makefile.in,
15519 adapt to new context. Wrap all rules that change the current
15520 directory in parentheses. Expunge all references to $(P).
15521 When one command depends on another and they're run all at
15522 once, use && to separate them, not ;. Add OUTPUT_OPTION to
15523 all object-file generation rules. Delete obsolete variables.
15525 * Makefile.in: Delete.
15526 * config-lang.in: Delete outputs= line.
15528 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
15530 * error.c (dump_function_decl): Print no space between
15531 `ptr-operator' the `type-specifier' of the return type.
15532 (dump_type_prefix): Make sure we put space at the appropriate
15535 2000-10-23 Jason Merrill <jason@redhat.com>
15537 * call.c (equal_functions): Also call decls_match for extern "C" fns.
15539 2000-10-22 Jason Merrill <jason@redhat.com>
15541 * call.c (build_conditional_expr): Use ocp_convert to force
15544 2000-10-22 Mark Mitchell <mark@codesourcery.com>
15546 * call.c (standard_conversion): Use RVALUE_CONVs for all
15547 expressions that satisfy lvalue_p, not just those that satisfy
15550 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
15552 * typeck.c (c_sizeof): Return an expression of `size_t' type,
15553 not one with TYPE_IS_SIZETYPE set.
15554 (dubious_conversion_warnings): Remove special-case code.
15556 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
15558 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
15559 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
15560 (dump_type_prefix): Print vector-of-int as 'int vector'.
15561 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
15562 * tree.c (walk_tree): Handle VECTOR_TYPE.
15564 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
15566 2000-10-21 Jason Merrill <jason@redhat.com>
15568 * parse.y (operator): Set got_object from got_scope.
15569 Set looking_for_typename.
15570 * decl.c (lookup_name_real): Clear val after setting from_obj.
15571 Reorganize diagnostic.
15573 2000-10-20 Jason Merrill <jason@redhat.com>
15575 * tree.c (walk_tree): Don't walk into default args.
15577 * error.c (dump_expr): Use host_integerp.
15579 2000-10-20 David Edelsohn <edelsohn@gnu.org>
15581 * typeck2.c (abstract_virtuals_error): Use "because" instead of
15582 "since" in error message.
15584 2000-10-20 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15586 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
15588 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
15590 * decl.c (revert_static_member_fn): Fixed typo.
15592 2000-10-19 Mark Mitchell <mark@codesourcery.com>
15594 * class.c (subobject_offset_fn): New type.
15595 (dfs_record_base_offsets): Remove.
15596 (record_base_offsets): Likewise.
15597 (dfs_search_base_offsets): Likewise.
15598 (record_subobject_offset): New function.
15599 (check_subobject_offset): Likewise.
15600 (walk_subobject_offsets): Likewise.
15601 (record_subobject_offsets): Likewise.
15602 (layout_conflict_p): Reimplement.
15603 (layout_nonempty_base_or_field): Correct handling of type
15604 conflicts during layout.
15605 (layout_empty_base): Likewise.
15606 (build_base_field): Adjust to handle new representation of empty
15608 (build_base_fields): Likewise.
15609 (layout_virtual_bases): Likewise.
15610 (splay_tree_compare_integer_csts): New function.
15611 (layout_class_type): Use a splay_tree, rather than a varray, to
15612 represent the offsets of empty bases.
15614 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
15615 * decl.c (select_decl): Don't return declarations that are
15618 2000-10-18 Mark Mitchell <mark@codesourcery.com>
15620 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
15621 (fake_std_node): New macro.
15622 * decl.c (in_std): Rename to ...
15623 (in_fake_std): ... this.
15624 (flag_no_builtin): Remove.
15625 (flag_no_nonansi_builtin): Likewise.
15626 (walk_namespaces_r): Use fake_std_node.
15627 (push_namespace): Use std_identifier.
15628 (pop_namespace): Use in_fake_std.
15629 (lookup_name_real): Use fake_std_node.
15630 (init_decl_processing): When -fhonor-std, create the `std'
15631 namespace. Don't create a dummy fake_std_node in that case.
15632 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
15633 (builtin_function): Put builtins whose names don't begin
15634 with `_' in the std namespace.
15635 * decl2.c (flag_no_builtin): Remove.
15636 (flag_no_nonansi_builtin): Likewise.
15637 (set_decl_namespace): Use fake_std_node.
15638 (validate_nonmember_using_decl): Likewise.
15639 (do_using_directive): Likewise.
15640 (handle_class_head): Likewise.
15641 * dump.c (dequeue_and_dump): Likewise.
15642 * except.c (init_exception_processing): Use std_identifier.
15643 * init.c (build_member_call): Use fake_std_node.
15644 * rtti.c (init_rtti_processing): Use std_identifier.
15646 2000-10-17 Mark Mitchell <mark@codesourcery.com>
15648 * cp-tree.h (back_end_hook): Remove declaration.
15649 * decl2.c (back_end_hook): Remove definition.
15651 * dump.c (dequeue_and_dump): Dump TREE_USED.
15653 2000-10-17 Brad Lucier <lucier@math.purdue.edu>
15655 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
15657 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
15659 * decl.c (WINT_TYPE): Define.
15660 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
15661 c_size_type_node, signed_size_type_node and wint_type_node.
15663 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
15665 * decl2.c (warn_missing_format_attribute): New variable.
15666 (lang_decode_option): Decode -Wmissing-format-attribute.
15668 2000-10-16 Mark Mitchell <mark@codesourcery.com>
15670 * typeck.c (qualify_type): Remove.
15671 (composite_pointer_type): Fix handling of conversions to `cv void*'.
15673 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15675 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
15677 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15679 * Makefile.in (parse.c, parse.h): Create atomically.
15681 2000-10-12 Mark Mitchell <mark@codesourcery.com>
15683 * class.c (current_obstack): Remove.
15684 * decl.c (ggc_p): Remove.
15685 (start_decl): Don't use decl_tree_cons.
15686 (grokdeclarator): Don't use build_decl_list.
15687 (start_function): Don't use decl_tree_cons.
15688 (finish_function): Don't mess with obstacks.
15689 * decl2.c (grok_x_components): Don't use build_decl_list.
15690 * lex.c (make_call_declarator): Don't call decl_tree_cons.
15691 (implicitly_declare_fn): Don't call build_decl_list.
15692 * parse.y (frob_specs): Don't call build_decl_list or
15694 (expr_or_declarator_intern): Don't call decl_tree_cons.
15695 (primary): Don't call build_decl_list.
15696 (fcast_or_absdcl): Likewise.
15697 (typed_declspecs): Don't call decl_tree_cons.
15698 (reserved_declspecs): Don't call build_decl_list.
15699 (declmods): Likewise.
15700 (reserved_typespecquals): Likewise.
15702 (new_type_id): Likewise.
15703 (cv_qualifiers): Likewise.
15704 (after_type_declarator_intern): Likewise.
15705 (notype_declarator_intern): Likewise.
15706 (absdcl_intern): Likewise.
15707 (named_parm): Likewise.
15708 * pt.c (most_specialized_class): Likewise.
15709 * repo.c (temporary_obstack): Make it a structure, not a pointer.
15710 (init_repo): Initialize it.
15711 * search.c (current_obstack): Remove.
15712 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
15714 2000-10-09 Richard Henderson <rth@cygnus.com>
15716 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
15717 (c++ language support bits for libgcc): Remove.
15718 (c++.clean): Remove cplib2.txt cleanup.
15719 * config-lang.in (headers, lib2funcs): Remove.
15721 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
15722 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
15723 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
15724 * inc/new.h, inc/typeinfo: Remove files.
15726 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
15728 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
15730 (init_decl_processing): Initialize intmax_type_node and
15733 2000-10-06 Richard Henderson <rth@cygnus.com>
15735 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
15736 (original_result_rtx): Remove.
15737 * decl.c (save_function_data): Don't clear x_result_rtx.
15738 (mark_lang_function): Don't mark it either.
15739 * expr.c (fixup_result_decl): Remove.
15740 * semantics.c (genrtl_named_return_value): Frob the return decl
15741 before calling emit_local_var.
15742 (genrtl_finish_function): Don't call fixup_result_decl.
15743 Always emit the jump to return_label.
15745 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
15747 * pt.c (lookup_template_class): Set current access for enum.
15748 (tsubst_enum): Set file & line for enum decl.
15750 * spew.c (yylex): Remove unused variable.
15752 2000-10-05 Richard Henderson <rth@cygnus.com>
15754 * semantics.c (genrtl_finish_function): Don't init or check
15755 can_reach_end; remove noreturn and return value checks.
15757 2000-10-05 Tom Tromey <tromey@cygnus.com>
15759 * init.c (build_java_class_ref): Use `build_static_name' with a
15760 suffix, not a prefix, to build the class object's name.
15762 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15764 * cp-tree.h (access_kind): Fix comment typo.
15765 * decl2.c (grokfield): Fix diagnostic typo.
15766 * semantics.c (finish_template_type): Fix comment typo.
15767 (finish_qualified_object_call_expr): Likewise.
15769 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15771 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
15774 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15776 * spew.c (frob_id): New static function.
15777 (frob_opname): Use it.
15780 2000-10-01 Mark Mitchell <mark@codesourcery.com>
15782 * decl.c (lang_mark_false_label_stack): Remove.
15783 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
15785 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
15787 * gxxint.texi: Use @email for formatting email addresses.
15789 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
15791 * error.c: Remove direct obstack manipulation. Replace with
15792 output_buffer-based formatting. Adjust calls to removed macros.
15793 (obstack_chunk_alloc, obstack_chunk_free): Remove.
15794 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
15795 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
15797 2000-09-24 Mark Mitchell <mark@codesourcery.com>
15799 * ir.texi: Move to ../c-tree.texi.
15801 2000-09-20 Jason Merrill <jason@redhat.com>
15803 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
15805 2000-09-21 Andreas Jaeger <aj@suse.de>
15807 * errfn.c: Move declaration of cp_printer and cp_printers to ...
15808 * cp-tree.h: ... here.
15810 * error.c: Remove declaration of cp_printer.
15812 2000-09-20 Mark Mitchell <mark@codesourcery.com>
15814 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
15816 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
15818 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
15821 2000-09-18 Mark Mitchell <mark@codesourcery.com>
15823 * decl.c (start_function): Robustify.
15825 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15827 * cp-tree.h (check_function_format): Accept a `status' parameter.
15829 * call.c, typeck.c: Updates calls to `check_function_format'.
15831 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
15833 * decl2.c (handle_class_head): Always push some scope even
15836 2000-09-16 Mark Mitchell <mark@codesourcery.com>
15838 * cp-tree.h (struct cp_language_function): Remove
15839 x_scope_stmt_stack and name_declared.
15840 (current_scope_stmt_stack): Remove.
15841 (function_name_declared_p): New macro.
15842 (struct lang_decl_flags): Use c_lang_decl as a base class.
15844 (struct lang_decl): Replace saved_tree with context.
15845 (DECL_FRIEND_CONTEXT): Adjust accordingly.
15846 (SET_DECL_FRIEND_CONTEXT): Likewise.
15847 (DECL_VIRTUAL_CONTEXT): Likewise.
15848 (DECL_SAVED_TREE): Remove.
15849 (C_DECLARED_LABEL_FLAG): Likewise.
15850 (cplus_expand_expr_stmt): Don't declare.
15851 (add_decl_stmt): Likewise.
15852 (add_scope_stmt): Likewise.
15853 * decl.c (mark_stmt_tree): Remove.
15854 (case_compare): Likewise.
15855 (finish_case_label): Use c_add_case_label.
15856 (init_decl_processing): Set more language-specific hooks.
15857 (build_enumerator): Fix typo in comment.
15858 (cplus_expand_expr_stmt): Remove.
15859 (mark_lang_function): Use mark_c_language_function.
15860 (lang_mark_tree): Use c_mark_lang_decl.
15861 * decl2.c: Change order of inclusion.
15862 * except.c: Likewise.
15863 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
15864 back on c_expand_expr.
15865 * friend.c: Include expr.h.
15866 * init.c: Change order of inclusion.
15867 * Makefile.in: Update dependencies.
15868 * lex.h (free_lang_decl_chain): Remove.
15869 * optimize.c (maybe_clone_body): Use function_name_declared_p.
15870 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
15872 (instantiate_decl): Use function_name_declared_p.
15873 * semantics.c (lang_expand_expr_stmt): Remove.
15874 (set_current_function_name_declared): Likewise.
15875 (current_function_name_declared): Likewise.
15876 (begin_compound_stmt): Use function_name_declared_p.
15877 (add_decl_stmt): Remove.
15878 (setup_vtbl_ptr): Use function_name_declared_p.
15879 (add_scope_stmt): Remove.
15880 (current_scope_stmt_stack): New function.
15881 (cp_expand_stmt): Don't handle SCOPE_STMTs.
15882 (expand_body): Use function_name_declared_p.
15883 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
15884 * typeck.c: Change order of includes.
15885 (convert_sequence): Remove.
15887 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
15889 * lex.c (reswords): Add _Complex.
15891 2000-09-14 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15893 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
15895 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
15897 * init.c (begin_init_stmts): Don't use // comments.
15899 2000-09-12 Jason Merrill <jason@redhat.com>
15901 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
15902 all non-extern arrays.
15904 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
15905 typenames, too. Downgrade complaint to pedwarn.
15906 (xref_tag): Warn about surprising behavior of 'friend struct T'.
15907 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
15908 'class This::Inherited'.
15910 2000-09-12 Mark Mitchell <mark@codesourcery.com>
15912 * decl.c (finish_case_label): Given the LABEL_DECL a
15915 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
15917 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
15918 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
15919 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15920 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15921 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
15923 (sorry_for_unsupported_tree, print_scope_operator,
15924 print_left_paren, print_right_paren, print_left_bracket,
15925 print_right_bracket, print_whitespace): Likewise.
15926 (aggr_variety): Rename to class_key_or_enum.
15927 (print_type): Rename to print_type_id.
15928 (print_type_specifier_seq, print_simple_type_specifier,
15929 print_elaborated_type_specifier,
15930 print_rest_of_abstract_declarator,
15931 print_parameter_declaration_clause, print_exception_specification,
15932 print_nested_name_specifier, print_template_id,
15933 typedef_original_name, print_template_argument_list_start,
15934 print_template_argument_list_end): New functions.
15936 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
15938 * ir.texi: Add more documentation.
15940 2000-09-11 Mark Mitchell <mark@codesourcery.com>
15942 * cp-tree.h (struct saved_scope): Remove x_function_parms.
15943 (current_function_parms): Don't define.
15944 (struct cp_language_function): Remove parms_stored.
15945 (current_function_just_assigned_this): Don't define.
15946 (current_function_parms_stored): Likewise.
15947 (static_ctors): Declare.
15948 (static_dtors): Likewise.
15949 (SF_EXPAND): Don't define.
15950 (expand_start_early_try_stmts): Remove declaration.
15951 (store_parm_decls): Likewise.
15952 * decl.c (static_ctors): Don't declare.
15953 (static_dtors): Likewise.
15954 (struct binding_level): Remove this_block.
15955 (poplevel): Remove dead code.
15956 (set_block): Likewise.
15957 (mark_binding_level): Don't mark this_block.
15958 (mark_saved_scope): Don't mark x_function_parms.
15959 (init_decl_processing): Don't add current_function_parms as a GC
15961 (check_function_type): Change prototype.
15962 (start_function): Remove RTL-generation code.
15963 (expand_start_early_try_stmts): Remove.
15964 (store_parm_decls): Give it internal linkage. Remove
15965 RTL-generation code.
15966 (finish_function): Remove RTL-generation code.
15967 * decl2.c (static_ctors): Fix formatting.
15968 (static_dtors): Likewise.
15969 * method.c (use_thunk): Don't call store_parm_decls.
15970 (synthesize_method): Likewise.
15971 * optimize.c (maybe_clone_body): Likewise.
15972 * parse.y (fn.def2): Likewise.
15973 (.set_base_init): Likewise.
15974 (nodecls): Likewise.
15975 * pt.c (instantiate_decl): Likewise.
15976 * rtti.c (synthesize_tinfo_fn): Likewise.
15977 * semantics.c (genrtl_try_block): Simplify.
15978 (expand_body): Use genrtl_start_function and
15979 genrtl_finish_function.
15980 (genrtl_start_function): New function.
15981 (genrtl_finish_function): Likewise.
15983 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
15985 * error.c (cp_tree_printer, case 'P'): Append break.
15987 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
15989 * cp-tree.h (frob_opname): Declare.
15990 * parse.y (saved_scopes): New static variable.
15991 (cp_parse_init): Adjust.
15992 (do_id): If lastiddecl is NULL, do do_identifier.
15993 (operator): Save scope information.
15994 (unoperator): New reduction. Restore scope information.
15995 (operator_name): Append unoperator. Call frob_opname.
15996 * spew.c (frob_opname): Define.
15998 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
16000 * decl.c, rtti.c: Include defaults.h if not already included.
16001 Don't define the *_TYPE_SIZE macros.
16003 2000-09-09 Mark Mitchell <mark@codesourcery.com>
16005 * cp-tree.h (push_switch): Change prototype.
16006 (check_cp_case_value): Remove declaration.
16007 (decl_constant_value): Likewise.
16008 * decl.c (struct cp_switch): Add switch_stmt and cases.
16009 (case_compare): New function.
16010 (push_switch): Set switch_stmt. Initialize cases.
16011 (pop_switch): Clean up cases.
16012 (define_case_label): Rename to ...
16013 (finish_case_label): ... this. Do semantic analysis for case
16015 (start_function): Correct comment.
16016 * decl2.c (check_cp_case_value): Remove.
16017 * expr.c (do_case): Remove.
16018 * pt.c (tsubst_expr): Adjust call to finish_case_label.
16019 * semantics.c (genrtl_do_poplevel): Remove declaration.
16020 (RECHAIN_STMTS): Remove.
16021 (finish_break_stmt): Use build_break_stmt.
16022 (finish_continue_stmt): Use build_continue_stmt.
16023 (finish_switch_cond): Adjust condition here, rater than in
16024 c_expand_start_case.
16025 (finish_case_label): Remove.
16026 * typeck.c (c_expand_return): Remove.
16027 (c_expand_start_case): Likewise.
16029 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
16031 * ir.texi: Document type nodes.
16033 2000-09-06 Mark Mitchell <mark@codesourcery.com>
16035 * cp-tree.h (init_cp_semantics): Declare.
16036 (genrtl_try_block): Don't declare.
16037 (genrtl_handler): Likewise.
16038 (genrtl_catch_block): Likewise.
16039 (genrtl_ctor_stmt): Likewise.
16040 (genrtl_subobject): Likewise.
16041 (genrtl_do_poplevel): Likewise.
16042 (genrtl_named_return_value): Likewise.
16043 * lex.c (init_parse): Call init_cp_semantics.
16044 * semantics.c (genrtl_try_block): Give it internal linkage.
16045 (genrtl_handler): Likewise.
16046 (genrtl_catch_block): Likewise.
16047 (genrtl_ctor_stmt): Likewise.
16048 (genrtl_subobject): Likewise.
16049 (genrtl_do_poplevel): Likewise.
16050 (genrtl_named_return_value): Likewise.
16051 (lang_expand_stmt): Rename to ...
16052 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
16053 (init_cp_semantics): Define.
16055 * decl.c (initialize_local_var): Remove RTL-generating code.
16056 * semantics.c (genrtl_try_block): Fix formatting.
16058 Move statement-tree facilities from C++ to C front-end.
16059 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
16060 (void_zero_node): Remove.
16061 (stmt_tree): Likewise.
16062 (scope_chain): Adjust.
16063 (language_function): Rename to cp_language_function.
16064 (cp_function_chain): Adjust.
16065 (current_stmt_tree): Remove.
16066 (last_tree): Likewise.
16067 (last_expr_type): Likewise.
16068 (struct lang_decl): Adjust.
16069 (STMT_IS_FULL_EXPR_P): Remove.
16070 (add_tree): Remove.
16071 (begin_stmt_tree): Likewise.
16072 (finish_stmt_tree): Likewise.
16073 (walk_tree_fn): Likewise.
16074 (walk_stmt_tree): Likewise.
16075 * class.c (finish_struct): Replace use of add_tree with add_stmt.
16076 * decl.c (mark_stmt_tree): Adjust type.
16077 (init_decl_processing): Don't build void_zero_node.
16078 (initialize_local_var): Adjust usage of current_stmt_tree.
16079 (finish_enum): Use add_stmt, not add_tree.
16080 (save_function_data): Adjust use of language_function.
16081 (finish_constructor_body): Use add_stmt, not add_tree.
16082 (finish_destructor_body): Likewise.
16083 (push_cp_function_context): Adjust use of language_function.
16084 (pop_cp_function_context): Likewise.
16085 (mark_lang_function): Likewise.
16086 (mark_cp_function_context): Likewise.
16087 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
16088 (build_vec_init): Likewise.
16089 * semantics.c (SET_LAST_STMT): Remove.
16090 (RECHAIN_STMTS): Don't use it.
16091 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
16092 (current_stmt_tree): Define.
16093 (add_tree): Remove.
16094 (finish_goto_stmt): Use add_stmt, not add_tree.
16095 (finish_expr_stmt): Likewise.
16096 (begin_if_stmt): Likewise.
16097 (finish_then_clause): Likewise.
16098 (begin_while_stmt): Likewise.
16099 (begin_do_stmt): Likewise.
16100 (finish_return_stmt): Likewise.
16101 (begin_for_stmt): Likewise.
16102 (finish_break_stmt): Likewise.
16103 (finish_continue_stmt): Likewise.
16104 (begin_switch_stmt): Likewise.
16105 (finish_case_label): Likewise.
16106 (begin_try_block): Likewise.
16107 (begin_function_try_block): Likewise.
16108 (begin_handler): Likewise.
16109 (begin_catch_block): Likewise.
16110 (begin_compound_stmt): Likewise.
16111 (begin_asm_stmt): Likewise.
16112 (finish_asm_stmt): Likewise.
16113 (finish_label_stmt): Likewise.
16114 (add_decl_stmt): Likewise.
16115 (finish_subobject): Likewise.
16116 (finish_decl_cleanup): Likewise.
16117 (finish_named_return_value): Likewise.
16118 (setup_vtbl_ptr): Likewise.
16119 (add_scope_stmt): Likewise.
16120 (finish_stmt_expr): Likewise.
16121 (prune_unused_decls): Remove.
16122 (begin_stmt_tree): Likewise.
16123 (finish_stmt_tree): Likewise.
16124 (prep_stmt): Adjust use of current_stmt_tree.
16125 (lang_expand_stmt): Likewise.
16126 * tree.c (statement_code_p): Remove.
16127 (cp_statement_code_p): New function.
16128 (walk_stmt_tree): Remove.
16129 (init_tree): Set lang_statement_code_p.
16131 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
16133 Integrated preprocessor.
16135 * Make-lang.in, Makefile.in: Remove all references to input.c,
16136 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
16137 * gxx.gperf, hash.h, input.c: Delete.
16138 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
16139 initialized properly.
16141 * class.c (fixup_pending_inline): Take a tree, not a
16142 struct pending_inline *. All callers changed.
16143 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
16144 RID_PROTECTED entries in ridpointers[] array here.
16145 * decl.c (duplicate_decls): Do not refer to struct
16147 (record_builtin_type, init_decl_processing): Use RID_MAX not
16149 (grokdeclarator): Use C_IS_RESERVED_WORD.
16150 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
16152 (grok_x_components): Do not inspect pending_inlines chain.
16154 * cp-tree.h (struct lang_identifier): Add rid_code entry.
16155 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
16156 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
16157 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
16158 TIME_IDENTIFIER_FILEINFO): Kill.
16160 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
16161 single 32-bit word.
16162 * parse.y: Call do_pending_inlines unconditionally.
16163 reinit_parse_for_method is now snarf_method. fn.defpen is no
16164 longer necessary. Remove unnecessary <itype> annotation on
16165 SCOPE. Do not refer to end_of_file or struct pending_inline.
16166 * semantics.c (begin_inline_definitions): Call
16167 do_pending_inlines unconditionally.
16169 * lex.c: Remove all code now shared with C front end.
16170 Initialize cpplib properly if USE_CPPLIB. Put reserved words
16171 into the get_identifier table. Rewrite pragma handling to
16172 work with the registry. Move code to save tokens for later
16173 processing to spew.c.
16175 * spew.c: Rewrite everything in terms of token streams instead
16176 of text. Move routines here from lex.c / input.c as
16177 appropriate. GC-mark trees hanging off the pending inlines
16180 2000-09-06 Mark Mitchell <mark@codesourcery.com>
16182 * NEWS: Mention that the named return value extension has been
16184 * cp-tree.h (original_result_rtx): Define.
16185 (TREE_REFERENCE_EXPR): Remove.
16186 (DECL_VPARENT): Likewise.
16187 (pushdecl_nonclass_level): Likewise.
16188 (store_return_init): Likewise.
16189 (reinit_lang_specific): Likewise.
16190 (genrtl_named_return_value): Change prototype.
16191 * decl.c (original_result_rtx): Remove.
16192 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
16193 Do not generate RTL for local variables here.
16194 (store_return_init): Remove.
16195 * semantics.c (genrtl_named_return_value): Simplify. Fold in
16197 (finish_named_return_value): Adjust accordingly. Warn that this
16198 extension is deprecated.
16199 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
16201 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16203 * pt.c (type_unification_real): Replace switch with if.
16204 (unify): Tsubst non-type parms before comparing.
16206 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16208 * error.c (dump_typename): New function, broken out of ...
16209 (dump_type): ... here. Use it.
16210 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
16212 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16214 * init.c (build_offset_ref): Deal with namespace scoped
16217 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16219 * class.c (resolve_address_of_overloaded_function): Add
16220 explanation message.
16221 * decl.c (define_case_label): Reformat explanation.
16222 * decl2.c (finish_static_data_member_decl): Likewise.
16223 (grokfield): Likewise.
16224 * friend.c (do_friend): Likewise.
16226 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
16228 * tree.c (walk_tree): Expose tail recursion.
16229 (walk_stmt_tree): New function.
16230 * cp-tree.h: Prototype walk_stmt_tree.
16231 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
16232 the BLOCKs directly. If a BLOCK has no variables after
16233 pruning, discard it.
16234 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
16235 restore the line number.
16237 2000-09-05 Mark Mitchell <mark@codesourcery.com>
16239 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
16240 (pt.o): Remove dependency on HTAB_H.
16241 * cp-tree.h: Include hashtab.h.
16242 (walk_tree): Change prototype.
16243 (walk_tree_without_duplicates): New function.
16244 * decl.c (check_default_argument): Use it.
16245 * optimize.c (remap_decl): Adjust calls to walk_tree.
16246 (copy_body): Likewise.
16247 (expand_calls_inline): Likewise.
16248 (calls_setjmp_p): Use walk_tree_without_duplicates.
16249 * pt.c: Don't include hashtab.h.
16250 (for_each_template_parm): Use walk_tree_without_duplicates.
16251 * semantics.c (finish-stmt_tree): Likewise.
16252 (expand_body): Likewise.
16253 * tree.c (walk_tree): Add additional parameter.
16254 (walk_tree_without_duplicates): New function.
16255 (count_trees): Use it.
16256 (verify_stmt_tree): Adjust call to walk_tree.
16257 (find_tree): Use walk_tree_without_duplicates.
16258 (no_linkage_check): Likewise.
16259 (break_out_target_exprs): Adjust call to walk_tree.
16260 (cp_unsave): Likewise.
16262 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
16264 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
16265 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
16266 * cp-tree.h (TYPE_BINFO): Adjust comment.
16267 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
16268 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
16269 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
16270 (TYPE_TEMPLATE_INFO): Likewise.
16271 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
16272 * class.c (push_nested_class): Likewise.
16273 * decl.c (lookup_name_real): Likewise.
16274 (grokdeclarator): Likewise.
16275 (grok_op_properties): Likewise.
16276 (xref_tag): Likewise.
16277 (xref_basetypes): Likewise.
16278 * decl2.c (constructor_name_full): Likewise.
16279 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
16280 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
16281 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
16282 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16283 (dump_type_suffix): Likewise.
16284 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
16286 (get_aggr_from_typedef): Likewise.
16287 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
16288 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16289 (write_template_parm): Likewise.
16290 (write_template_template_parm): Check tree code instead of
16291 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16292 * method.c (build_overload_nested_name): Add
16293 BOUND_TEMPLATE_TEMPLATE_PARM.
16294 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
16295 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16296 * pt.c (convert_template_argument): Check tree code instead of
16297 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16298 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
16299 (for_each_template_parm): Adjust comment.
16300 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
16301 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16302 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
16303 template_args_equal to compare template template parameter cases.
16304 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16305 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
16307 * tree.c (copy_template_template_parm): Decide whether to create
16308 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
16309 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16310 (copy_tree_r): Likewise.
16311 * typeck.c (comptypes): Likewise. Check tree code instead of
16312 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16314 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
16316 * decl.c (finish_function): Move the code for handling functions
16317 marked with the constructor and destructor attributes inside the
16320 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
16322 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
16324 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
16326 * pt.c (lookup_template_class): Remove abort.
16327 * tree.c (get_type_decl): Allow error_mark_node.
16329 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
16331 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
16334 2000-09-03 Mark Mitchell <mark@codesourcery.com>
16336 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
16339 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
16341 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
16342 union tag mismatch error reporting.
16344 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
16346 * call.c (build_scoped_method_call): Check it is not a namespace.
16348 2000-08-30 Jason Merrill <jason@redhat.com>
16350 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
16352 * tree.c (bot_manip): Check TREE_CONSTANT rather than
16353 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
16354 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
16356 * decl.c (start_function): Always call make_function_rtl.
16358 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
16360 * semantics.c (prune_unused_decls): New function.
16361 (finish_stmt_tree): Call it via walk_tree.
16363 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
16365 * class.c (build_secondary_vtable): Constify a char *.
16366 * decl.c (init_decl_processing): Initialize function_id_node,
16367 pretty_function_id_node, and func_id_node.
16368 * input.c (struct input_source): Constify 'str'.
16369 (feed_input): Constify first argument.
16370 * mangle.c (write_identifier): Constify argument.
16371 * pt.c (mangle_class_name_for_template): Constify argument.
16373 2000-08-29 Mark Mitchell <mark@codesourcery.com>
16375 * typeck.c (mark_addressable): Remove code that pokes around in
16378 2000-08-28 Jason Merrill <jason@redhat.com>
16380 * lex.c (file_name_nondirectory): Move to toplev.c.
16382 * cp-tree.h (LOCAL_CLASS_P): New macro.
16383 * class.c (finish_struct_1): Use it.
16385 2000-08-27 Alex Samuel <samuel@codesourcery.com>
16387 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
16388 (write_encoding): Pass another argument to write_name.
16389 (write_name): Add ignore_local_scope parameter. Fix handling of
16391 (write_nested_name): Use write_unqualified_name.
16392 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
16393 (write_template_prefix): Use write_unqualified_name.
16394 (write_component): Remove.
16395 (write_local_name): Add parameter. Use direct local entity to
16396 discriminator calculation.
16397 (write_class_enum_type): Pass another argument to write_name.
16398 (write_template_template_arg): Likewise.
16399 (make_guard_variable): Likewise.
16401 2000-08-27 Jason Merrill <jason@redhat.com>
16403 * decl.c (pushdecl): Matching decls for local externs are found in
16404 the current level. Propagate linkage information from previous
16407 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
16409 * ir.texi (Expressions): Fix typo.
16411 2000-08-25 Greg McGary <greg@mcgary.org>
16413 * tree.c (init_tree): Use ARRAY_SIZE.
16415 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
16417 * error.c (cp_tree_printer): Rework.
16419 2000-08-25 Mark Mitchell <mark@codesourcery.com>
16421 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
16423 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
16424 (cp-demangle.o): Remove target.
16425 (dyn-string.o): Likewise.
16427 * decl.c (grokfndecl): Require that `main' return an `int'.
16428 * mangle.c (write_encoding): Don't mangle return types for
16429 conversion functions.
16431 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
16433 * error.c (tree_formatting_info): New data type.
16434 (tree_being_formatted): New macro.
16435 (tree_formatting_flags): Likewise.
16436 (put_whitespace): Likewise.
16437 (print_tree_identifier): Likewise.
16438 (print_identifier): Likewise.
16439 (cp_tree_printer, print_function_argument_list, print_declaration,
16440 print_expression, print_function_declaration,
16441 print_function_parameter, print_type, print_cv_qualifier): New
16443 (init_error): Initialize lang_printer.
16445 2000-08-24 Jason Merrill <jason@redhat.com>
16447 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
16448 adjustment necessary.
16450 2000-08-24 Greg McGary <greg@mcgary.org>
16452 * cp-tree.h (MAIN_NAME_P): Remove macro.
16454 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
16456 * error.c (print_instantiation_context): Don't forget to flush the
16459 2000-08-23 Jason Merrill <jason@redhat.com>
16461 * typeck.c (build_ptrmemfunc): Save the input pmf.
16463 * method.c (process_modifiers): Use same_type_p.
16465 2000-08-23 Mark Mitchell <mark@codesourcery.com>
16467 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
16468 * mangle.c (write_function_type): Change prototype.
16469 (write_encoding): Don't mangle return types for
16470 constructors or destructors.
16471 (write_type): Adjust call to write_function_type.
16472 * pt.c (instantiate_template): Instantiate alternate entry points
16473 when instantiating the main function.
16475 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
16477 * error.c (cp_print_error_function): Don't use embedded '\n' in
16480 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
16482 * decl.c (init_decl_processing): Remove bogus initialization.
16483 * error.c (lang_print_error_function): Restore here.
16484 (init_error): Initialize print_error_function.
16486 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16488 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
16490 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
16492 * Makefile.in (error.o): Depends on diagnostic.h
16494 * cp-tree.h (problematic_instantiation_changed,
16495 record_last_problematic_instantiation, current_instantiation,
16496 print_instantiation_context): Declare.
16497 (maybe_print_template_context): Remove.
16499 * decl.c (init_decl_processing): Set print_error_function to NULL.
16500 (lang_print_error_function): Remove, since we're using a new
16503 * error.c: #include diagnostic.h
16504 (function_category): New function.
16505 (cp_diagnostic_starter): Likewise.
16506 (cp_diagnostic_finalizer): Likewise.
16507 (cp_print_error_function): Likewise.
16508 (maybe_print_instantiation_context): Likewise.
16509 (print_instantiation_full_context): Likewise.
16510 (print_instantiation_partial_context): Likewise.
16511 (print_instantiation_context): Define.
16512 (init_error): Initialize diagnostic pager and finalizer.
16514 * pt.c (problematic_instantiation_changed): Define.
16515 (record_last_problematic_instantiation): Likewise.
16516 (current_instantiation): Likewise.
16517 (maybe_print_template_context): Remove.
16518 (print_template_context): Likewise.
16519 (current_tinst_level): Make static to reflect Brendan Kehoe's
16520 change of 1995-04-13.
16521 (push_tinst_level): Call print_instantiation_context.
16523 2000-08-21 Nix <nix@esperi.demon.co.uk>
16525 * lang-specs.h: Do not process -o or run the assembler if
16528 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
16530 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
16532 * decl2.c (lang_decode_option): Disable gettext attributes for
16535 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
16537 * lex.c (lang_init_options): Default diagnostic message maximum
16538 length to 80, when line-wrapping.
16540 2000-08-20 Mark Mitchell <mark@codesourcery.com>
16542 * class.c (build_vtbl_initializer): Clear the entire
16543 vtbl_init_data. Start keeping track of the functions for which we
16544 have created vcall offsets here.
16545 (dfs_build_vcall_offset_vtbl_entries): Remove.
16546 (build_vcall_offset_vtbl_entries): Reimplement.
16547 (add_vcall_offset_vtbl_entries_r): New function.
16548 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
16549 computing when vcall offsets are necessary.
16551 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16553 * decl.c (member_function_or_else): Use cp_error ... %T.
16554 (grokdeclarator): Likewise.
16555 (start_method): Likewise.
16556 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
16558 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16560 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
16563 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16565 * cp-tree.h (PTRMEM_OK_P): New macro.
16566 (itf_ptrmem_ok): New enumeration value.
16567 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
16568 argument. Diagnose implicit pointer to member.
16569 (instantiate_type): Don't diagnose implicit pointer to member
16570 here. Pass itf_ptrmem_ok if ok. Adjust calls to
16571 resolve_address_of_overloaded_function.
16572 * init.c (build_offset_ref): Set PTRMEM_OK_P.
16573 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
16574 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
16575 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
16576 (build_unary_op): Deal with single non-static member in
16579 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16581 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
16583 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16585 * cp-tree.h (enum_name_string): Remove prototype.
16586 (report_case_error): Remove prototype.
16587 * cp/typeck2.c (enum_name_string): Remove.
16588 (report_case_error): Remove.
16589 * error.c (dump_expr): Deal with enum values directly.
16590 Correctly negate integer constant.
16592 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16594 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
16595 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
16596 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
16597 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
16598 (__cxa_vec_new): Use __cxa_vec_new2.
16599 (__cxa_vec_delete): Use __cxa_vec_delete2.
16601 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16603 * vec.cc (__cxa_vec_new): Set "C" linkage.
16604 (__cxa_vec_ctor): Likewise.
16605 (__cxa_vec_cctor): Likewise.
16606 (__cxa_vec_dtor): Likewise.
16607 (__cxa_vec_delete): Likewise.
16608 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
16609 (__cxa_vec_ctor): Likewise.
16610 (__cxa_vec_cctor): Likewise.
16611 (__cxa_vec_dtor): Likewise.
16612 (__cxa_vec_delete): Likewise.
16614 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16616 * class.c (instantiate_type): Reinstate local variable
16617 deleted in previous change.
16619 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
16622 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16624 * cp-tree.h (instantiate_type_flags): New enumeration.
16625 (instantiate_type): Change parameter.
16626 * class.c (instantiate_type): Adjust prototype. Adjust.
16627 * call.c (standard_conversion): Adjust instantiate_type call.
16628 (reference_binding): Likewise.
16629 (build_op_delete_call): Likewise.
16630 (convert_like_real): Likewise.
16631 * cvt.c (cp_convert_to_pointer): Likewise.
16632 (convert_to_reference): Likewise.
16633 * pt.c (convert_nontype_argument): Likewise.
16634 * typeck.c (build_binary_op): Likewise.
16635 (build_ptrmemfunc): Likewise.
16636 (convert_for_assignment): Likewise.
16638 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16640 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
16641 (current_aggr): Define.
16642 * decl.c (grokdeclarator): Make sure a friend class is an
16643 elaborated type specifier.
16644 * parse.y (current_aggr): Remove static definition.
16645 (cp_parse_init): Adjust.
16646 (structsp): Clear and restore current_aggr.
16647 (component_decl_list): Clear current_aggr.
16649 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
16650 aggregate tag on the typename's context.
16652 * pt.c (tsubst_friend_class): Return error_mark_node, if
16653 parms becomes NULL.
16654 (instantiate_class_template): Ignore error_mark_node friend types.
16656 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
16658 * cvt.c (warn_ref_binding): New static function, broken out of ...
16659 (convert_to_reference): ... here. Use it.
16661 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
16663 * parse.y (template_arg): Add rule for template qualified with
16666 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16668 * decl2.c (add_function): Reorganize.
16669 (arg_assoc): Do not consider function template decls.
16671 2000-08-11 Jason Merrill <jason@redhat.com>
16673 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
16676 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16678 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
16679 (lookup_nested_tag): Likewise.
16681 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
16684 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16686 * parse.y (named_complex_class_head_sans_basetype): Remove
16689 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16691 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
16692 explicit TEMPLATE_ID_EXPR args.
16693 (build_expr_from_tree, case CALL_EXPR): Likewise.
16695 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16697 * decl.c (check_tag_decl): Diagnose typename's which don't
16700 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
16702 * init.c (build_aggr_init): Reject bogus array initializers
16705 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
16707 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
16709 * cp/tinfo.cc (__dynamic_cast): Likewise.
16710 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
16712 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
16714 * cvt.c (convert_to_pointer_force): Fix error message when
16715 attempting to cast from ambiguous base.
16717 2000-08-08 Jason Merrill <jason@redhat.com>
16719 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
16720 (tsubst_template_arg_vector): Likewise.
16722 * decl2.c (build_anon_union_vars): Choose the largest field; don't
16723 assume that one will be as large as the union.
16725 2000-08-07 Kazu Hirata <kazu@hxi.com>
16727 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
16728 * decl.c (pop_labels): Likewise.
16730 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
16732 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
16734 (__pointer_to_member_type_info): Likewise.
16735 (__base_class_info): Likewise.
16736 (__class_type_info): Likewise.
16737 (__si_class_type_info): Likewise.
16738 (__vmi_class_type_info): Likewise.
16739 * tinfo.cc (__si_class_type_info::__do_find_public_src):
16740 Changed member names to match specifications.
16741 (__vmi_class_type_info::__do_find_public_src): Likewise.
16742 (__si_class_type_info::__do_dyncast): Likewise.
16743 (__vmi_class_type_info::__do_dyncast): Likewise.
16744 (__si_class_type_info::__do_upcast): Likewise.
16745 (__vmi_class_type_info::__do_upcast): Likewise.
16746 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
16747 (__pbase_type_info::__pointer_catch): Likewise.
16748 (__pointer_type_info::__pointer_catch): Likewise.
16749 (__pointer_to_member_type_info::__pointer_catch): Likewise.
16751 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
16753 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
16754 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
16755 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
16757 2000-08-04 Mark Mitchell <mark@codesourcery.com>
16759 * cp-tree.h (add_method): Change prototype.
16760 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
16761 Don't double the size of the method vector in the error case.
16762 (handle_using_decl): Adjust call to add_method.
16763 (add_implicitly_declared_members): Likewise.
16764 (clone_function_decl): Likewise.
16765 * decl2.c (check_classfn): Likewise.
16766 * semantics.c (finish_member_declaration): Likewise.
16768 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
16770 * decl.c (flag_isoc94): New variable.
16772 2000-08-02 Jason Merrill <jason@redhat.com>
16774 * pt.c (do_type_instantiation): Add complain parm; don't complain
16775 if called recursively.
16776 * cp-tree.h, parse.y: Adjust.
16778 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
16780 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
16781 -Wno-strict-prototypes.
16783 * g++spec.c: Adjust type of second argument to
16784 lang_specific_driver, and update code as necessary.
16786 * cp-tree.h: Don't prototype min_precision here.
16787 (my_friendly_assert): Cast expression to void.
16788 * semantics.c (do_poplevel): Initialize scope_stmts.
16790 2000-08-02 Mark Mitchell <mark@codesourcery.com>
16792 * cp-tree.h (DECL_NEEDED_P): Tweak.
16794 2000-07-28 Jason Merrill <jason@redhat.com>
16796 * lang-specs.h: Use %i in rule for .ii files.
16798 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
16800 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
16802 2000-07-30 Mark Mitchell <mark@codesourcery.com>
16804 Allow indirect primary bases.
16805 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
16807 (CLASSTYPE_VFIELD_PARENT): Remove.
16808 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
16809 (BINFO_PRIMARY_BINFO): Remove.
16810 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
16811 (BINFO_VBASE_PRIMARY_P): Likewise.
16812 (BINFO_PRIMARY_BASE_OF): New macro.
16813 (BINFO_INDIRECT_PRIMARY_P): Likewise.
16814 (get_primary_binfo): New function.
16815 * decl.c (lang_mark_tree): Make lang_type::primary_base.
16816 * class.c (vcall_offset_data_s): Rename to ...
16817 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
16818 and add ctor_vtbl_p.
16819 (get_derived_offset): Use get_primary_binfo.
16820 (dfs_mark_primary_bases): Adjust handling of virtual primary
16822 (mark_primary_bases): Likewise.
16823 (set_primary_base): Take a binfo, not an integer, as a
16824 representation of the primary base.
16825 (indirect_primary_base_p): Remove.
16826 (determine_primary_base): Adjust for indirect primary bases.
16827 (dfs_find_final_overrider): Fix typo in coment.
16828 (update_vtable_entry_for_fn): Use get_primary_binfo.
16829 (layout_nonempty_base_or_field): Tweak.
16830 (build_base_fields): Adjust for new primary base semantics.
16831 (dfs_propagate_binfo_offsets): Remove.
16832 (propagate_binfo_offsets): Rewrite.
16833 (dfs_set_offset_for_shared_vbases): Remove.
16834 (layout_virtual_bases): Don't use it.
16835 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
16837 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
16838 CLASSTYPE_VFIELD_PARENT.
16839 (dfs_get_primary_binfo): New function.
16840 (get_primary_binfo): Likewise.
16841 (dump_class_hierarchy_r): Tweak printing of primary bases.
16842 (build_vtbl_initializer): Fix typo in comments. Use
16844 (build_vcall_and_vbase_vtbl_entries): Likewise.
16845 (build_vbaes_offset_vtbl_entries): Likewise.
16846 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
16847 BV_VCALL_INDEX to handle indirect primary bases.
16848 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
16849 (build_rtti_vtbl_entries): Likewise.
16850 * search.c (get_shared_vbase_if_not_primary): Tweak.
16851 (find_vbase_instance): Likewise.
16852 (binfo_for_vtable): Simplify.
16853 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
16854 (make_binfo): Make it have 11 entries.
16856 2000-07-30 Alex Samuel <samuel@codesourcery.com>
16858 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
16859 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
16860 ascertaining primaryness.
16861 (G): Remove template_args.
16862 (decl_is_template_id): New function.
16863 (write_encoding): Use decl_is_template_id.
16864 (write_name): Likewise. Handle type_decls. Get main variant of
16866 (write_nested_name): Likewise.
16867 (write_prefix): Likewise.
16868 (write_template_prefix): Likewise.
16869 (write_special_name_constructor): Remove defunct production from
16871 (write_bare_function_type): Remove comment about absent parameter.
16872 (write_template_template_arg): Add missing grammar production to
16875 2000-07-27 Jason Merrill <jason@redhat.com>
16877 * decl.c (duplicate_decls): If common_type produces a non-typedef
16878 type for a typedef, just use the old type.
16880 2000-07-27 Mark Mitchell <mark@codesourcery.com>
16882 * cp-tree.h (function_depth): Declare.
16883 (verify_stmt_tree): Likewise.
16884 (find_tree): Likewise.
16885 * decl.c (function_depth): Give it external linkage.
16886 * optimize.c (optimize_function): Increment and decrement it.
16887 * tree.c (verify_stmt_tree_r): New function.
16888 (verify_stmt_tree): Likewise.
16889 (find_tree_r): Likewise.
16890 (find_tree): Likewise.
16892 2000-07-27 Jason Merrill <jason@redhat.com>
16894 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
16896 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
16898 2000-07-26 Mark Mitchell <mark@codesourcery.com>
16900 * decl.c (start_cleanup_fn): Mark the function as `inline'.
16901 * decl2.c (get_guard): Call cp_finish_decl, not
16902 rest_of_decl_compilation, for local guards.
16903 * lex.c (do_identifier): Remove unused variable.
16905 2000-07-26 Marc Espie <espie@cvs.openbsd.org>
16907 * parse.y: Add missing ';'.
16909 2000-07-26 Mark Mitchell <mark@codesourcery.com>
16911 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
16914 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
16916 Kill strict_prototype. Backwards compatibility only for
16917 non NO_IMPLICIT_EXTERN_C systems.
16918 * cp-tree.h (flag_strict_prototype): Remove.
16919 (strict_prototype): Remove.
16920 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16921 * decl.c (maybe_push_to_top_level): Adjust.
16922 (pop_from_top_level): Adjust.
16923 (decls_match): Only allow sloppy parm matching for ancient
16925 (init_decl_processing): Adjust.
16926 (grokdeclarator): Adjust.
16927 * decl2.c (flag_strict_prototype): Remove.
16928 (strict_prototype): Remove.
16929 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16930 (lang_f_options): Remove "strict-prototype".
16931 (unsupported-options): Add "strict-prototype".
16932 * lex.c (do_identifier): Adjust.
16933 (do_scoped_id): Adjust.
16934 * parse.y (empty_parms): Adjust.
16935 * class.c (push_lang_context): Adjust.
16936 (pop_lang_context): Adjust.
16937 * typeck.c (comp_target_parms): Adjust.
16939 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
16941 * decl.c (poplevel): Deal with anonymous variables at for scope.
16942 (maybe_inject_for_scope_var): Likewise.
16944 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
16946 * decl.c: Remove all signal handling code, now done in toplev.c.
16948 2000-07-23 Mark Mitchell <mark@codesourcery.com>
16950 * decl.c (make_rtl_for_nonlocal_decl): Rework.
16952 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
16955 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
16957 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
16958 Define my_friendly_assert and my_friendly_abort as macros
16959 which may call friendly_abort. Prototype friendly abort, not
16960 my_friendly_abort or my_friendly_assert.
16961 * decl.c (signal_catch): Report the signal caught in the error
16962 message. Call fatal directly.
16963 * typeck2.c (ack, my_friendly_assert): Delete.
16964 (my_friendly_abort): Rename to friendly_abort. Expect file,
16965 line, and function parameters. Report the abort code, then
16966 call fancy_abort. Do not mask an abort if errors have
16969 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
16971 * typeck.c (comp_target_parms): Remove obsolete parameter.
16972 (comp_target_types): Adjust.
16974 2000-07-17 Jason Merrill <jason@redhat.com>
16976 * typeck.c (mark_addressable): Never set TREE_USED.
16977 * call.c (build_call): Don't abort on calls to library functions
16978 that have been declared normally.
16980 * typeck.c (build_binary_op): Fix grammar in warning.
16982 * exception.cc (__eh_free): Fix prototype.
16984 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
16986 * decl.c (pushdecl): Handle seeing an OVERLOAD in
16987 IDENTIFIER_NAMESPACE_VALUE.
16989 2000-07-16 Mark Mitchell <mark@codesourcery.com>
16991 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
16992 * method.c (use_thunk): Correct handling of vcall offsets.
16994 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
16996 * .cvsignore: parse.h and parse.c have no cp- prefix.
16998 2000-07-13 Mark Mitchell <mark@codesourcery.com>
17000 * .cvsignore: New file.
17002 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
17004 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
17006 2000-07-12 Mark Mitchell <mark@codesourcery.com>
17008 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
17010 * parse.h: Likewise.
17012 2000-07-11 Mark Mitchell <mark@codesourcery.com>
17014 * class.c (layout_class_type): Add pointers to virtual bases after
17015 base classes under the old ABI.
17017 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
17019 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
17020 (finish_continue_stmt): Likewise.
17021 (begin_for_stmt): Remove call to note_level_for_for.
17022 (finish_goto_stmt): Change call from build_min_nt
17024 (finish_expr_stmt): Likewise.
17025 (begin_if_stmt): Likewise.
17026 (begin_while_stmt): Likewise.
17027 (finish_while_stmt): Likewise.
17028 (finish_return_stmt): Likewise.
17029 (begin_for_stmt): Likewise.
17030 (finish_for_stmt): Likewise.
17031 (finish_break_stmt): Likewise.
17032 (begin_switch_stmt): Likewise.
17033 (finish_case_label): Likewise.
17034 (genrtl_try_block): Likewise.
17035 (begin_try_block): Likewise.
17036 (begin_handler): Likewise.
17037 (begin_compound_stmt): Likewise.
17038 (finish_asm_stmt): Likewise.
17039 (finish_label_stmt): Likewise.
17040 (add_decl_stmt): Likewise.
17041 (finish_subobject): Likewise.
17042 (finish_decl_cleanup): Likewise.
17043 (finish_named_return_value): Likewise.
17044 (setup_vtbl_ptr): Likewise.
17045 (add_scope_stmt): Likewise.
17046 * decl.c (finish_constructor_body): Likewise.
17047 (finish_destructor_body): Likewise.
17048 * optimize.c (copy_body_r): Likewise.
17049 (initialize_inlined_parameters): Likewise.
17050 (declare_return_variable): Likewise.
17051 (expand_call_inline): Likewise.
17053 2000-07-10 Jakub Jelinek <jakub@redhat.com>
17055 * semantics.c (expand_body): Sync interface information
17056 at the end of function body expansion.
17058 2000-07-09 Jason Merrill <jason@redhat.com>
17060 * init.c (build_new_1): Bail early if the call to new fails.
17062 * decl.c (compute_array_index_type): Check specifically for
17063 an INTEGER_CST, not just TREE_CONSTANT.
17065 * decl.c (duplicate_decls): Don't call duplicate_decls on
17066 the DECL_TEMPLATE_RESULT.
17067 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
17070 * error.c (dump_template_bindings): Don't crash if we had an
17071 invalid argument list.
17073 * typeck.c (c_expand_start_case): Do narrowing here.
17074 * semantics.c (finish_switch_cond): Not here.
17076 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
17078 * parse.y (asm_clobbers): Do string concatenation.
17080 2000-07-09 Mark Mitchell <mark@codesourcery.com>
17082 * decl.c (pushtag): Don't put local classes in template functions
17083 on the local_classes list.
17085 2000-07-04 Scott Snyder <snyder@fnal.gov>
17087 * decl2.c (get_guard): Add missing return for old ABI local
17090 2000-07-09 Mark Mitchell <mark@codesourcery.com>
17092 * cp-tree.h (char_type_p): New function.
17093 * decl.c (init_decl_processing): Don't initialize
17094 signed_wchar_type_node or unsigned_wchar_type_node.
17095 (complete_array_type): Handle brace-enclosed string-constants.
17096 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
17097 * tree.c (char_type_p): New function.
17098 * typeck2.c (digest_init): Use char_type_p.
17100 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
17102 * pt.c (tsubst): Don't layout type, if it's error_mark.
17104 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
17106 * pt.c (instantiate_pending_templates): Reset template level.
17108 2000-07-05 Jason Merrill <jason@redhat.com>
17110 * call.c (joust): Don't complain about `operator char *()' beating
17111 `operator const char *() const'.
17113 2000-07-04 scott snyder <snyder@fnal.gov>
17114 Jason Merrill <jason@redhat.com>
17116 * repo.c (repo_get_id): Handle the case where a class with virtual
17117 bases has a null TYPE_BINFO_VTABLE.
17119 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
17120 Jason Merrill <jason@redhat.com>
17122 * parse.y (member_init): Just pass in the type.
17123 * init.c (expand_member_init): Handle getting a type.
17125 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17126 Jason Merrill <jason@redhat.com>
17128 * decl.c (finish_function): Warn if a function has no return
17130 Suggested by Andrew Koenig.
17131 * typeck.c (check_return_expr): Do set current_function_returns_value
17132 if we got an error_mark_node.
17134 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
17136 * decl2.c (push_decl_namespace): Push the original namespace.
17138 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
17140 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
17141 * semantics.c (begin_class_definition): Clear it.
17143 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
17145 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
17146 (genrtl_expr_stmt): Likewise.
17147 (genrtl_decl_stmt): Likewise.
17148 (genrtl_if_stmt): Likewise.
17149 (genrtl_while_stmt): Likewise.
17150 (genrtl_do_stmt): Likewise.
17151 (genrtl_return_stmt): Likewise.
17152 (genrtl_for_stmt): Likewise.
17153 (genrtl_break_stmt): Likewise.
17154 (genrtl_continue_stmt): Likewise.
17155 (genrtl_scope_stmt): Likewise.
17156 (genrtl_switch_stmt): Likewise.
17157 (genrtl_case_label): Likewise.
17158 (genrtl_begin_compound_stmt): Likewise.
17159 (genrtl_finish_compound_stmt): Likewise.
17160 (genrtl_compound_stmt): Likewise.
17161 (genrtl_asm_stmt): Likewise.
17163 * init.c (begin_init_stmts): Remove call to
17164 genrtl_begin_compound_stmt.
17165 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
17167 * semantics.c (lang_expand_stmt): Changed call to
17168 genrtl_compound_stmt to ignore return value.
17170 2000-07-02 Mark Mitchell <mark@codesourcery.com>
17172 * mangle.c (canonicalize_for_substitution): Return the canonical
17175 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
17177 * typeck.c (commonparms): Remove obstack manipulations.
17179 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
17181 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
17183 * Makefile.in (OBJS): Added ../c-semantics.o.
17184 (OBJDEPS): Likewise.
17186 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
17188 (struct stmt_tree): Added comment.
17189 (current_function_name_declared): Removed.
17190 (stmts_are_full_exprs_p): Likewise.
17191 (genrtl_do_pushlevel): Likewise.
17192 (genrtl_clear_out_block): Likewise.
17193 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
17194 (DECL_ANON_UNION_ELEMS): Likewise.
17195 (emit_local_var): Likewise.
17196 (make_rtl_for_local_static): Likewise.
17197 (do_case): Likewise.
17198 (expand_stmt): Likewise.
17199 (genrtl_decl_cleanup): Likewise.
17200 (c_expand_asm_operands): Likewise.
17201 (c_expand_return): Likewise.
17202 (c_expand_start_case): Likewise.
17204 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
17205 (emit_local_var): Likewise.
17206 (initialize_local_var): Change reference to
17207 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
17208 Change reference to stmts_are_full_exprs_p to
17209 current_stmt_tree->stmts_are_full_exprs_p.
17210 (push_cp_function_context): Likewise.
17212 * expect.c (expand_throw): Change reference to
17213 stmts_are_full_exprs_p.
17215 * init.c (build_aggr_init): Change reference to
17216 stmts_are_full_exprs_p.
17217 (build_vec_init): Likewise.
17219 * optimize.c (maybe_clone_body): Change reference to
17220 current_function_name_declared to
17221 cp_function_chain->name_declared.
17223 * pt.c (instantiate_decl): Change reference to
17224 current_function_name_declared to
17225 cp_function_chain->name_declared.
17227 * semantics.c (expand_cond): Moved declaration to c-common.h.
17228 (genrtl_do_pushlevel): Moved to c-semantics.c.
17229 (genrtl_clear_out_block): Likewise.
17230 (genrtl_goto_stmt): Likewise.
17231 (genrtl_expr_stmt): Likewise.
17232 (genrtl_decl_stmt): Likewise.
17233 (gerntl_if_stmt): Likewise.
17234 (genrtl_while_stmt): Likewise.
17235 (genrtl_do_stmt): Likewise.
17236 (genrtl_return_stmt): Likewise.
17237 (genrtl_for_stmt): Likewise.
17238 (genrtl_break_stmt): Likewise.
17239 (genrtl_continue_stmt): Likewise.
17240 (genrtl_scope_stmt): Likewise.
17241 (genrtl_switch_stmt): Likewise.
17242 (genrtl_case_label): Likewise.
17243 (genrtl_begin_compound_stmt): Likewise.
17244 (genrtl_finish_compound_stmt): Likewise.
17245 (genrtl_compound_stmt): Likewise.
17246 (genrtl_asm_stmt): Likewise.
17247 (genrtl_decl_cleanup): Likewise.
17248 (expand_cond): Likewise.
17249 (expand_stmt): Renamed to ...
17250 (lang_expand_stmt): ... this.
17251 (lang_expand_expr_stmt): Initialize.
17252 (set_current_function_name_declared): Likewise.
17253 (stmts_are_full_exprs_p): Likewise.
17254 (current_function_name_declared): Likewise.
17255 (anon_aggr_type_p): Likewise.
17256 (do_poplevel): Change reference to
17257 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
17258 Change reference to stmts_are_full_exprs_p to
17259 current_stmt_tree->stmts_are_full_exprs_p.
17260 (add_tree): Likewise.
17261 (finish_expr_stmt): Likewise.
17262 (prep_stmt): Likewise.
17263 (lang_expand_stmt): Likewise.
17264 (begin_compound_stmt): Change reference to
17265 current_function_name_declared to
17266 cp_function_chain->name_declared and call to
17267 current_function_name_declared().
17268 (setup_vtbl_ptr): Likewise.
17269 (genrtl_do_poplevel): Removed.
17271 2000-06-30 Jason Merrill <jason@redhat.com>
17273 * init.c (init_init_processing): Go back to aligning like
17274 double_type_node for old ABI.
17275 (get_cookie_size): Make cookie larger if we get a type that needs
17277 (build_vec_delete): Call it.
17279 * typeck.c (qualify_type_recursive): New fn.
17280 (composite_pointer_type): Use it.
17281 (build_binary_op): Use composite_pointer_type.
17283 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
17284 Jason Merrill <jason@redhat.com>
17286 * typeck.c (check_return_expr): Don't complain about returning
17287 NULL from operator new if -fcheck-new.
17288 * cp-tree.h: Declare flag_check_new here.
17289 * init.c: Not here.
17291 2000-06-28 Alex Samuel <samuel@codesourcery.com>
17293 * mangle.c (find_substitution): Use same_type_p.
17294 (write_encoding): Don't check for substitutions.
17296 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
17298 * parse.y (expr_no_comma_rangle): New non-terminal.
17299 (template_parm): Use it for default parameter case.
17300 (template_arg): Use it.
17301 (expr_no_commas): Remove commented out undefined extensions.
17302 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
17303 * parse.h, parse.c: Rebuilt.
17305 2000-06-30 Mark Mitchell <mark@codesourcery.com>
17307 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
17308 (finish_asm_stmt): Do it here, instead.
17310 * cp-tree.h (ridpointers): Don't declare.
17311 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
17312 (record_builtin_java_type): Likewise.
17313 (init_decl_processing): Likewise.
17314 * lex.c: Move inclusion of lex.h.
17315 (ridpointers): Don't define.
17316 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
17318 * lex.h (enum rid): Rename to ...
17319 (enum cp_rid): ... this.
17320 (ridpointers): Don't declare.
17321 * parse.y: Move inclusion of lex.h.
17322 * parse.c: Regenerated.
17323 * spew.c: Move inclusion of lex.h.
17325 * cp-tree.h (struct language_function): Remove temp_name_counter.
17326 (temp_name_counter): Remove.
17327 (get_temp_name): Change prototype.
17328 (get_guard): New function.
17329 (get_guard_cond): Likewise.
17330 (set_guard): Likewise.
17331 * cvt.c (build_up_reference): Adjust call to get_temp_name.
17332 * decl.c (expand_static_init): Use get_guard and friends to
17333 implement guard variables.
17334 * decl2.c (get_temp_name): Assume that the variables created are
17336 (get_sentry): Rename to ...
17337 (get_guard): ... this. Implement new ABI guard variables.
17338 (get_guard_bits): New function.
17339 (get_guard_cond): Likewise.
17340 (set_guard): Likewise.
17341 (start_static_initialization_or_destruction): Use them.
17342 (do_static_initialization): Replace sentry with guard throughout.
17343 (do_static_destruction): Likewise.
17344 * init.c (create_temporary_var): Add comment.
17346 2000-06-28 Alex Samuel <samuel@codesourcery.com>
17348 * mangle.c (find_substitution): Use same_type_p.
17349 (write_encoding): Don't check for substitutions.
17351 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
17353 * parse.y (expr_no_comma_rangle): New non-terminal.
17354 (template_parm): Use it for default parameter case.
17355 (template_arg): Use it.
17356 (expr_no_commas): Remove commented out undefined extensions.
17357 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
17358 * parse.h, parse.c: Rebuilt.
17360 2000-06-29 Mark Mitchell <mark@codesourcery.com>
17362 * cp-tree.h (flag_const_strings): Remove.
17363 (warn_parentheses): Likewise.
17364 (warn_format): Likewise.
17365 (common_type): Likewise.
17366 (default_conversion): Likewise.
17367 (build_binary_op): Likewise.
17368 (cp_build_binary_op): New macro.
17369 * call.c (build_new_op): Use cp_build_binary_op instead of
17371 * class.c (build_vtable_entry_ref): Likewise.
17372 * decl.c (expand_static_init): Likewise.
17373 (compute_array_index_type): Likewise.
17374 (build_enumerator): Likewise.
17375 * decl2.c (delete_sanity): Likewise.
17376 (start_static_initialization_or_destruction): Likewise.
17377 * error.c (dump_type_suffix): Likewise.
17378 * init.c (resolve_offset_ref): Likewise.
17379 (build_new): Likewise.
17380 (build_new_1): Likewise.
17381 (build_vec_delete_1): Likewise.
17382 (build_vec_init): Likewise.
17383 (build_delete): Likewise.
17384 * rtti.c (synthesize_tinfo_fn): Likewise.
17385 (synthesize_tinfo_var): Likewise.
17386 * search.c (expand_upcast_fixups): Likewise.
17387 (fixup_all_virtual_upcast_offsets): Likewise.
17388 * typeck.c (build_array_ref): Likewise.
17389 (get_member_function_from_ptrfunc): Likewise.
17390 (build_binary_op): Add parameter.
17391 (pointer_int_sum): Use cp_build_binary_op.
17392 (pointer_diff): Likewise.
17393 (build_modify_expr): Likewise.
17394 (get_delta_difference): Likewise.
17395 (build_ptrmemfunc): Likewise.
17397 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
17399 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
17400 * decl.c (create_implicit_typedef): Adjust.
17401 * decl2.c (build_artificial_parm): Adjust.
17402 * method.c (implicitly_declare_fn): Adjust.
17403 * pt.c (push_inline_template_parms_recursive): Adjust.
17404 (process_template_parm): Adjust.
17405 (overloaded_template_name): Adjust.
17406 * semantics.c (finish_template_template_parm): Adjust.
17408 2000-06-28 Mark Mitchell <mark@codesourcery.com>
17410 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
17411 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
17412 where to emit thunks.
17413 (build_vtt): Adjust call to build_vtt_inits.
17414 (build_vtt_inits): Add parameter to indicate whether or not
17415 sub-VTTs for virtual bases should be included. Adjust handling of
17416 construction vtables.
17417 (get_matching_base): New function.
17418 (dfs_build_vtt_inits): Rename to ...
17419 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
17420 construction vtables.
17421 (dfs_fixup_binfo_vtbls): Likewise.
17422 (build_ctor_vtbl_groups): Build construction vtables for virtual
17424 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
17425 to build construction vtbls.
17426 (dfs_accumulate_vtbl_inits): Adjust handling of
17427 construction vtables.
17429 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
17432 2000-06-27 Mark Mitchell <mark@codesourcery.com>
17434 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
17436 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
17438 * search.c (hides): Remove.
17439 (is_subobject_of_p): Add most_derived parameter. Use
17441 (lookup_field_queue_p): Adjust.
17442 (lookup_field_r): Adjust.
17444 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
17446 * decl2.c (handle_class_head): Bash typedefs to the type's main
17449 2000-06-25 Mark Mitchell <mark@codesourcery.com>
17451 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
17452 (begin_global_stmt_expr): ... this.
17453 (genrtl_finish_stmt_expr): Rename to ...
17454 (finish_global_stmt_expr): ... this.
17455 * init.c (begin_init_stmts): Adjust calls.
17456 (finish_init_stmts): Likewise.
17457 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
17458 (begin_global_stmt_expr): ... this.
17459 (genrtl_finish_stmt_expr): Rename to ...
17460 (finish_global_stmt_expr): ... this.
17462 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
17464 * search.c (lookup_member): Fix typo in comment.
17466 2000-06-24 Jason Merrill <jason@redhat.com>
17468 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
17469 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
17471 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17473 * parse.y (complex_direct_notype_declarator): Support global_scope.
17474 * Makefile.in: Adjust conflict count.
17476 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17478 * parse.y (template_arg): Convert TEMPLATE_DECL
17479 that is a template template parameter to
17480 TEMPLATE_TEMPLATE_PARM here.
17482 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
17483 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
17484 (copy_template_template_parm): Adjust prototype.
17485 * decl.c (grokdeclarator): Remove dead code.
17486 * pt.c (process_template_parm): Tidy.
17487 (lookup_template_class): Construct nodes in
17488 copy_template_template_parm.
17489 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
17490 lookup_template_class. Use TYPE_TI_TEMPLATE.
17491 * tree.c (copy_template_template_parm): Add NEWARGS
17493 (mapcar): Adjust call to copy_template_template_parm.
17494 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
17495 * method.c (build_template_template_parm_names): Change error
17496 code to avoid compilation warning.
17498 * gxxint.texi: Document template template parameter
17501 2000-06-21 Alex Samuel <samuel@codesourcery.com>
17503 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
17504 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
17505 (cp-demangle.o): New rule.
17506 (dyn-string.o): Likewise.
17507 * inc/cxxabi.h (__cxa_demangle): New declaration.
17509 2000-06-22 Mark Mitchell <mark@codesourcery.com>
17511 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
17512 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
17513 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
17514 a tree, not an int.
17515 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
17516 (make_thunk): Change prototype.
17517 (emit_thunk): Rename to use_thunk.
17518 (mangle_thunk): Change prototype.
17519 * class.c (get_derived_offset): Simplify.
17520 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
17521 BV_GENERATE_THUNK_WITH_VTABLE_P.
17522 (build_primary_vtable): Simplify.
17523 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
17524 (dfs_find_base): Remove.
17525 (update_vtable_entry_for_fn): Correct bug in finding the base
17526 where a virtual function was first declared. Figure out whether
17527 or not to emit a vcall-thunk with the vtables in which it appears.
17528 Correct logic for deciding whether to use an ordinary thunk, or a
17530 (finish_struct_1): Remove unnecssary code.
17531 (build_vtbl_initializer): Use ssize_int for the running counter of
17533 (build_vtbl_initializer): Only use vcall thunks where necessary.
17534 Mark thunks as needing to be emitted with their vtables, or not.
17535 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
17536 indices. Use size_binop.
17537 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
17538 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
17540 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
17541 (build_vtable_entry): Mark thunks as needing to be emitted with
17542 their vtables, or not.
17543 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
17544 * decl2.c (mark_vtable_entries): Use use_thunk instead of
17546 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
17548 * error.c (dump_expr): Use BV_FN.
17549 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
17551 * method.c (make_thunk): Likewise.
17552 (emit_thunk): Rename to use_thunk. Allow callers to decide
17553 whether or not to actually emit the thunk. Adjust for changes in
17554 representation of vcall offsets.
17555 * search.c (dfs_get_pure_virtuals): Use BV_FN.
17556 * semantics.c (emit_associated_thunks): New function.
17557 (expand_body): Use it.
17558 * ir.texi: Adjust decriptions of thunks.
17560 2000-06-22 Jason Merrill <jason@redhat.com>
17562 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
17563 (tsubst_friend_function): Copy it here.
17565 * decl.c (grok_op_properties): Fix typo.
17567 * decl2.c (delete_sanity): Clarify warning, avoid failure on
17570 * pt.c (check_explicit_specialization): Clarify error.
17572 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
17573 an old OVERLOAD when we're declaring a non-function.
17574 (pushdecl, destroy_local_var): Check for error_mark_node.
17575 (warn_extern_redeclared_static): Also bail early if
17576 we're a CONST_DECL.
17577 (push_overloaded_decl): Ignore an old error_mark_node.
17579 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
17581 * call.c (build_x_va_arg): Check if in a template decl.
17582 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
17584 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
17586 * class.c (push_lang_context): TYPE_NAME gets you to the Java
17588 * decl.c (check_goto): Computed gotos assumed OK.
17590 2000-06-20 Jason Merrill <jason@redhat.com>
17592 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
17593 for which we don't need to look for instantiations.
17595 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
17597 * parse.y (program): Always call finish_translation_unit.
17598 * parse.c, parse.h: Rebuilt.
17600 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
17602 * method.c: Don't include hard-reg-set.h.
17604 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
17606 * rtti.c (get_base_offset): Cope when vbase field is in a base.
17608 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
17610 * call.c (build_conditional_expr): Use VOID_TYPE_P.
17611 * cvt.c (cp_convert_to_pointer): Likewise.
17612 (convert_to_void): Likewise.
17613 * error.c (dump_expr): Likewise.
17614 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
17615 * init.c (build_delete): Likewise.
17616 * method.c (emit_thunk): Likewise.
17617 * optmize.c (declare_return_variable): Likewise.
17618 * rtti.c (get_tinfo_decl_dynamic): Likewise.
17619 (get_typeid): Likewise.
17620 (build_dynamic_cast_1): Likewise.
17621 * typeck.c (composite_pointer_type): Likewise.
17622 (common_type): Likewise.
17623 (build_indirect_ref): Likewise.
17624 (build_binary_op): Likewise.
17625 (build_x_compound_expr): Likewise.
17626 (check_return_expr): Likewise.
17627 * typeck2.c (add_exception_specifier): Likewise.
17629 * mangle.c (write_method_parms): Use direct comparison for end
17632 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
17634 * cp-tree.h (genrtl_try_block): Declare function.
17635 (genrtl_handler): Likewise.
17636 (genrtl_catch_block): Likewise.
17637 (genrtl_ctor_stmt): Likewise.
17638 (genrtl_subobject): Likewise.
17639 (genrtl_decl_cleanup): Likewise.
17640 (genrtl_do_poplevel): Likewise.
17641 (genrtl_do_pushlevel): Likewise.
17642 (genrtl_clear_out_block): Likewise.
17643 (genrtl_goto_stmt): Likewise.
17644 (genrtl_expr_stmt): Likewise.
17645 (genrtl_decl_stmt): Likewise.
17646 (genrtl_if_stmt): Likewise.
17647 (genrtl_while_stmt): Likewise.
17648 (genrtl_do_stmt): Likewise.
17649 (genrtl_return_stmt): Likewise.
17650 (genrtl_for_stmt): Likewise.
17651 (genrtl_break_stmt): Likewise.
17652 (genrtl_continue_stmt): Likewise.
17653 (genrtl_scope_stmt): Likewise.
17654 (genrtl_switch_stmt): Likewise.
17655 (genrtl_case_label): Likewise.
17656 (genrtl_begin_compound_stmt): Likewise.
17657 (genrtl_finish_compound_stmt): Likewise.
17658 (genrtl_compound_stmt): Likewise.
17659 (genrtl_asm_stmt): Likewise.
17660 (genrtl_named_return_value): Likewise.
17661 (genrtl_begin_stmt_expr): Likewise.
17662 (genrtl_finish_stmt_expr): Likewise.
17663 (finish_for_stmt): Removed first argument.
17664 (finish_switch_stmt): Likewise.
17666 * semantics.c (genrtl_try_block): Define function.
17667 (genrtl_handler): Likewise.
17668 (genrtl_catch_block): Likewise.
17669 (genrtl_ctor_stmt): Likewise.
17670 (genrtl_subobject): Likewise.
17671 (genrtl_decl_cleanup): Likewise.
17672 (genrtl_do_poplevel): Likewise.
17673 (genrtl_do_pushlevel): Likewise.
17674 (genrtl_clear_out_block): Likewise.
17675 (genrtl_goto_stmt): Likewise.
17676 (genrtl_expr_stmt): Likewise.
17677 (genrtl_decl_stmt): Likewise.
17678 (genrtl_if_stmt): Likewise.
17679 (genrtl_while_stmt): Likewise.
17680 (genrtl_do_stmt): Likewise.
17681 (genrtl_return_stmt): Likewise.
17682 (genrtl_for_stmt): Likewise.
17683 (genrtl_break_stmt): Likewise.
17684 (genrtl_continue_stmt): Likewise.
17685 (genrtl_scope_stmt): Likewise.
17686 (genrtl_switch_stmt): Likewise.
17687 (genrtl_case_label): Likewise.
17688 (genrtl_begin_compound_stmt): Likewise.
17689 (genrtl_finish_compound_stmt): Likewise.
17690 (genrtl_compound_stmt): Likewise.
17691 (genrtl_asm_stmt): Likewise.
17692 (genrtl_named_return_value): Likewise.
17693 (genrtl_begin_stmt_expr): Likewise.
17694 (genrtl_finish_stmt_expr): Likewise.
17695 (finish_for_stmt): Removed first argument and generate rtl
17697 (finish_switch_stmt): Likewise.
17698 (do_poplevel): Removed generate rtl specific code.
17699 (do_pushlevel): Likewise.
17700 (add_tree): Likewise.
17701 (finish_goto_stmt): Likewise.
17702 (finish_expr_stmt): Likewise.
17703 (begin_if_stmt): Likewise.
17704 (finish_if_stmt_cond): Likewise.
17705 (finish_then_clause): Likewise.
17706 (begin_else_clause): Likewise.
17707 (finish_else_clause): Likewise.
17708 (finish_if_stmt): Likewise.
17709 (clear_out_block): Likewise.
17710 (begin_while_stmt): Likewise.
17711 (finish_while_stmt_cond): Likewise.
17712 (finish_while_stmt): Likewise.
17713 (begin_do_stmt): Likewise.
17714 (finish_do_body): Likewise.
17715 (finish_do_stmt): Likewise.
17716 (finish_return_stmt): Likewise.
17717 (begin_for_stmt): Likewise.
17718 (finish_for_init_stmt): Likewise.
17719 (finish_for_cond): Likewise.
17720 (finish_for_expr): Likewise.
17721 (finish_break_stmt): Likewise.
17722 (finish_continue_stmt): Likewise.
17723 (begin_switch_stmt): Likewise.
17724 (finish_switch_cond): Likewise.
17725 (finish_case_label): Likewise.
17726 (begin_try_block): Likewise.
17727 (begin_function_try_block): Likewise.
17728 (finish_try_block): Likewise.
17729 (finish_cleanup_try_block): Likewise.
17730 (finish_cleanup): Likewise.
17731 (finish_function_try_block): Likewise.
17732 (finish_handler_sequence): Likewise.
17733 (finish_function_handler_sequence): Likewise.
17734 (begin_handler): Likewise.
17735 (finish_handler_parms): Likewise.
17736 (begin_catch_block): Likewise.
17737 (finish_handler): Likewise.
17738 (begin_compound_stmt): Likewise.
17739 (finish_compound_stmt): Likewise.
17740 (finish_asm_stmt): Likewise.
17741 (finish_label_stmt): Likewise.
17742 (finish_label_decl): Likewise.
17743 (finish_subobject): Likewise.
17744 (finish_decl_cleanup): Likewise.
17745 (finish_named_return_value): Likewise.
17746 (begin_stmt_expr): Likewise.
17747 (finish_stmt_expr): Likewise.
17749 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
17750 to call genrtl_expr_stmt when appropriate.
17752 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
17753 begin_compound_expr to call genrtl_begin_stmt_expr and
17754 genrtl_begin_compound_expr when appropriate.
17755 (finish_init_stmts): Changed calls to finish_compound_expr and
17756 finish_stmt_expr to call genrtl_finish_compound_expr and
17757 genrtl_finish_stmt_expr when appropriate.
17758 (expand_default_init): Changed call to finish_expr_stmt to call
17759 genrtl_expr_stmt when appropriate.
17760 (build_vec_init): Likewise.
17762 * parse.y (simple_stmt): Removed first argument from call to
17763 finish_for_stmt. Removed first argument from call to
17764 finish_switch_stmt.
17766 * parse.c: Regenerated.
17768 * pt.c (tsubst_expr): Removed first argument from call to
17769 finish_for_stmt. Removed first argument from call to
17770 finish_switch_stmt.
17772 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
17774 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
17775 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
17777 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
17778 (cplus_tree_code_length[]): Likewise.
17779 (cplus_tree_code_name[]): Likewise.
17780 (init_parse): Added call to add_c_tree_codes. Changed
17781 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
17783 2000-06-16 Mark Mitchell <mark@codesourcery.com>
17785 * cp-tree.h (finish_mem_initializers): Declare.
17786 (count_trees): Likewise.
17787 * parse.y (base_init): Use finish_mem_initializers.
17788 * semantics.c (finish_mem_initializers): New function.
17790 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
17791 the number of trees.
17793 (count_trees): Don't use it.
17795 2000-06-15 Jason Merrill <jason@redhat.com>
17797 * tree.c (count_trees): New debugging function.
17799 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
17800 * init.c (build_member_call): Pull out the name of a DECL.
17802 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
17803 * semantics.c (expand_body): Push to TV_INTEGRATION here.
17804 * optimize.c (optimize_function): Not here.
17805 * pt.c (instantiate_decl): Push to TV_PARSE.
17807 2000-06-15 Mark Mitchell <mark@codesourcery.com>
17809 * cp-tree.h (struct language_function): Remove x_base_init_list
17810 and x_member_init_list.
17811 (current_base_init_list): Remove.
17812 (current_member_init_list): Likewise.
17813 (setup_vtbl_ptr): Change prototype.
17814 (emit_base_init): Likewise.
17815 (expand_member_init): Likewise.
17816 (reinit_parse_for_function): Remove.
17817 * decl.c (save_function_data): Don't clear x_base_init_list and
17818 x_member_init_list.
17819 (mark_language_function): Don't mark them.
17820 * init.c (perform_member_init): Tweak comment.
17821 (sort_member_init): Take the list of initializers as an argument.
17822 (sort_base_init): Likewise.
17823 (emit_base_init): Likewise.
17824 (expand_member_init): Return the initializer. Don't use global
17826 * lex.c (reinit_parse_for_function): Remove.
17827 * method.c (build_template_parm_names): Correct substitution.
17828 (do_build_copy_constructor): Don't use current_member_init_list
17829 and current_base_init_list.
17830 (synthesize_method): Likewise.
17831 * parse.y (base_init): Split mem-initializers into
17832 base-initializers and field-initializers.
17833 (member_init_list): Build up the list here.
17834 (member_init): Return the initializer.
17835 (fn.depfn): Don't use reinit_parse_for_function.
17836 * parse.c: Regenerated.
17837 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
17839 (tsubst_expr): Don't use current_member_init_list
17840 and current_base_init_list.
17841 (tsubst_expr_values): Rename to ...
17842 (tsubst_initializer_list): ... this. Use convert_from_reference.
17843 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
17844 and current_base_init_list.
17845 (begin_function_definition): Don't call reinit_parse_for_function.
17847 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
17849 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
17852 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
17854 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
17856 * cp-tree.h (IF_COND): Move to c-common.h.
17857 (THEN_CLAUSE): Likewise.
17858 (ELSE_CLAUSE): Likewise.
17859 (WHILE_COND): Likewise.
17860 (WHILE_BODY): Likewise.
17861 (DO_COND): Likewise.
17862 (DO_BODY): Likewise.
17863 (RETURN_EXPR): Likewise.
17864 (EXPR_STMT_EXPR): Likewise.
17865 (FOR_INIT_STMT): Likewise.
17866 (FOR_COND): Likewise.
17867 (FOR_EXPR): Likewise.
17868 (FOR_BODY): Likewise.
17869 (SWITCH_COND): Likewise.
17870 (SWITCH_BODY): Likewise.
17871 (CASE_LOW): Likewise.
17872 (CASE_HIGH): Likewise.
17873 (GOTO_DESTINATION): Likewise.
17874 (COMPOUND_BODY): Likewise.
17875 (ASM_CV_QUAL): Likewise.
17876 (ASM_STRING): Likewise.
17877 (ASM_OUTPUTS): Likewise.
17878 (ASM_INPUTS): Likewise.
17879 (ASM_CLOBBERS): Likewise.
17880 (DECL_STMT_DECL): Likewise.
17881 (STMT_EXPR_STMT): Likewise.
17882 (LABEL_STMT_LABEL): Likewise.
17883 (SCOPE_BEGIN_P): Likewise.
17884 (SCOPE_END_P): Likewise.
17885 (SCOPE_STMT_BLOCK): Likewise.
17886 (SCOPE_NULLIFIED_P): Likewise.
17887 (SCOPE_NO_CLEANUPS_P): Likewise.
17888 (SCOPE_PARTIAL_P): Likewise.
17889 (ASM_VOLATILE_P): Likewise.
17890 (STMT_LINENO): Likewise.
17891 (STMT_LINENO_FOR_FN_P): Likewise.
17893 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
17894 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
17895 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
17896 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
17897 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
17899 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
17901 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
17902 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
17904 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
17905 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
17906 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
17908 2000-06-14 Mark Mitchell <mark@codesourcery.com>
17910 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
17911 * class.c (dfs_find_final_overrider): Set it appropriately.
17912 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
17913 avoid unneeded secondary vptrs.
17915 2000-06-13 Jakub Jelinek <jakub@redhat.com>
17917 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
17918 (check_bitfield_decl, check_field_decl): Likewise.
17919 (build_vtbl_or_vbase_field, build_base_field): Likewise.
17920 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
17921 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
17922 (xfer_tag, finish_enum): Likewise.
17923 * decl2.c (finish_builtin_type): Likewise.
17924 * init.c (init_init_processing): Likewise.
17925 * pt.c (instantiate_class_template): Likewise.
17926 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
17927 * cp-tree.h (struct lang_type): Add user_align member.
17928 (CLASSTYPE_USER_ALIGN): Define.
17930 2000-06-13 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
17932 * Make-lang.in (c++.install-common): Install g++-cross in
17933 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
17934 $(target_alias)-g++ and $(target_alias)-c++.
17936 2000-06-12 Mark Mitchell <mark@codesourcery.com>
17938 * class.c (vcall_offset_data_s): Add last_init and fns.
17939 (overrides): Rename to same_signature_p.
17940 (dfs_find_final_overrider): Adjust accordingly.
17941 (mark_overriders): Likewise.
17942 (warn_hidden): Likewise.
17943 (build_vtbl_initializer): Reorganize machinery for building things
17944 at negative offsets.
17945 (build_vcall_and_vbase_vtbl_entries): Likewise.
17946 (build_vbase_offset_vtbl_entries): Likewise.
17947 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
17948 offset entries. Do not create two entries for functions with the
17950 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
17951 (build_rtti_vtbl_entries): Reorganize machinery for building things
17952 at negative offsets.
17954 * optimize.c (expand_call_inline): Don't recurse into the code
17955 used to initialize the parameters more than once.
17957 2000-06-11 Mark Mitchell <mark@codesourcery.com>
17959 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
17960 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
17961 (find_substitution): Only use the `Sa' substitution for
17962 std::allocator, not instantiations of it.
17963 (write_template_prefix): Move comment. Only use a TREE_LIST to
17964 represent substitutions for a member template.
17965 (write_array_type): Mangle array dimensions correctly.
17966 * optimize.c (maybe_clone_body): Copy more information from the
17968 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
17969 on the regenerated declaration.
17971 2000-06-11 Chip Salzenberg <chip@valinux.com>
17972 Mark Mitchell <mark@codesourcery.com>
17974 * class.c (build_vtable): Clarify comment.
17975 (build_ctor_vtbl_group): Pass the most derived type to
17978 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17980 * decl2.c (compare_options): Don't needlessly cast away const-ness.
17982 2000-06-10 Mark Mitchell <mark@codesourcery.com>
17984 * decl.c (add_binding): Handle duplicate declarations of external
17987 2000-06-09 Chip Salzenberg <chip@valinux.com>
17988 Mark Mitchell <mark@codesourcery.com>
17990 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
17992 (write_signed_number): New macro.
17993 (write_unsigned_number): Likewise.
17994 (write_source_name): Use them.
17995 (write_number): Handle signed and unsigned values.
17996 (write_integer_cst): Use tree_int_cst_sgn, and use
17997 write_unsigned_number or write_signed_number as appropriate.
17998 (write_discriminator): Use write_unsigned_number or
17999 write_signed_number as appropriate.
18000 (write_template_arg_literal): Likewise.
18001 (write_array_type): Use tree_low_cst.
18002 (write_template_parm): Use write_unsigned_number or
18003 write_signed_number as appropriate.
18004 (write_substitution): Adjust call to write_number.
18005 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
18006 (write_expression): Handle non-type template arguments of
18007 reference type correctly.
18008 (mangle_thunk): Use write_signed_number.
18010 2000-06-09 Chip Salzenberg <chip@valinux.com>
18012 * mangle.c (find_substition): Don't mangle objects with typename
18013 substitutions (e.g. "cin" as "Si").
18015 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
18017 * call.c (add_candidate): Use ggc_alloc_cleared.
18018 * decl.c (lookup_label): Likewise.
18019 * lex.c (retrofit_lang_decl): Likewise.
18021 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
18023 * semantics.c (expand_body): Push to TV_EXPAND.
18024 * optimize.c (optimize_function): Push to TV_INTEGRATION.
18025 * decl.c (start_function): Always call announce_function.
18027 * tinfo2.cc: Just declare abort.
18029 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
18031 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
18032 whenever @ is a symbolic name.
18034 2000-06-08 Jakub Jelinek <jakub@redhat.com>
18036 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
18038 2000-06-07 Mark Mitchell <mark@codesourcery.com>
18040 * decl.c (pushdecl): Look up functions by DECL_NAME, not
18041 DECL_ASSEMBLER_NAME.
18043 2000-06-06 Mark Mitchell <mark@codesourcery.com>
18045 * decl2.c (c_language): Define.
18047 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
18049 * lex.c (lang_init_options): Tweak.
18051 * decl2.c: Remove #inclusion of diagnostic.h
18052 (lang_decode_option): Move diagnostic formatting options to
18055 * lang-options.h: Remove documentation for diagnostic options.
18057 * Makefile.in (lex.o): Depends upon diagnostic.h
18059 2000-06-06 Mark Mitchell <mark@codesourcery.com>
18061 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
18062 the same DECL_RESULT, it's not a redefinition.
18063 * pt.c (tsubst_decl): Remove code to handle illegal
18066 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
18068 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
18070 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
18072 * search.c (maybe_suppress_debug_info): Don't check
18073 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
18075 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
18078 Remember instantiation context in deferred instantiations.
18079 * cp-tree.h (struct tinst_level): Remove.
18080 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
18081 * pt.c (current_tinst_level): Now a tree.
18082 (print_template_context, push_tinst_level, pop_tinst_level,
18083 tinst_for_decl): Adjust.
18084 (reopen_tinst_level): New fn.
18085 (init_pt): Register current_tinst_level as a root.
18086 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
18087 of the pending templates list.
18088 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
18089 * lex.c (extract_interface_info): Adjust.
18090 * decl2.c (warn_if_unknown_interface): Adjust.
18092 2000-06-05 Mark Mitchell <mark@codesourcery.com>
18094 * class.c (indirect_primary_base_p): New function.
18095 (determine_primary_base): Use it.
18097 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
18099 Update new-abi dynamic cast algorithm.
18100 * tinfo.cc (__class_type_info::__dyncast_result): Add
18101 whole_details. Adjust constructor.
18102 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
18103 Avoid unnecessary searching.
18104 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
18106 2000-06-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18108 * decl.c (init_decl_processing): Don't call record_component_aliases.
18109 * tree.c (build_cplus_array_type_1): Likewise.
18111 2000-06-04 Mark Mitchell <mark@codesourcery.com>
18113 * ir.texi: Correct typo.
18114 * mangle.c (write_expression): Handle non-type template arguments
18115 with reference type.
18116 * method.c (build_overload_value): Likewise.
18117 * pt.c (convert_nontype_argument): Explicitly represent conversion
18118 to a reference with an ADDR_EXPR.
18119 (unify): Always unify arguments in left-to-right order.
18121 2000-06-03 Alex Samuel <samuel@codesourcery.com>
18122 Mark Mitchell <mark@codesourcery.com>
18124 * Make-lang.in (CXX_SRCS): Add mangle.c.
18125 * Makefile.in (CXX_OBJS): Add mangle.o.
18126 (mangle.o): New rule.
18128 * class.c (local_classes): New variable.
18129 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
18130 (get_vtt_name): Use mangle_vtt_name for new ABI.
18131 (init_class_processing): Initialize local_classes.
18132 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
18133 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
18134 (std_identifier): New macro.
18135 (DECL_VOLATILE_MEMFUNC_P): New macro.
18136 (DECL_NAMESPACE_STD_P): Likewise.
18137 (local_classes): Declare.
18138 (get_mostly_instantiated_function_type): Declare.
18139 (init_mangle): Declare.
18140 (mangle_decl): Likewise.
18141 (mangle_type_string): Likewise.
18142 (mangle_type): Likewise.
18143 (mangle_typeinfo_for_type): Likewise.
18144 (mangle_typeinfo_string_for_type): Likewise.
18145 (mangle_vtbl_for_type): Likewise.
18146 (mangle_vtt_for_type): Likewise.
18147 (mangle_ctor_vtbl_for_type): Likewise.
18148 (mangle_thunk): Likewise.
18149 (mangle_conv_op_name_for_type): Likewise.
18150 (mangle_guard_variable): Likewise.
18151 * decl.c (pushtag): Keep track of local classes.
18152 (initialize_predefined_identifiers): Initialize std_identifier.
18153 (init_decl_processing): Use std_identifier.
18154 (start_decl): Don't treat instantiations as specializations.
18155 (grokdeclarator): Likewise.
18156 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
18157 name for fully-instantiated templates.
18158 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
18159 destructors with the new ABI.
18160 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
18161 (grokfield): Use mangle_type for new ABI.
18162 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
18163 (get_sentry): Use mangle_guard_variable for new ABI.
18164 (start_static_initialization_or_destruction): Likewise.
18165 * expr.c (extract_aggr_init): Remove.
18166 (extract_scalar_init): Likewise.
18167 (extract_init): Remove #if 0'd code.
18168 * mangle.c: New function.
18169 * method.c (build_mangled_name): Assert not flag_new_abi.
18170 (build_static_name): Likewise.
18171 (build_decl_overload_real): Likewise.
18172 (build_typename_overload): Likewise.
18173 (build_overload_with_type): Likewise.
18174 (build_overload_name): Likewise.
18175 (get_ctor_vtbl_name): Likewise.
18176 (start_squangling): Likewise.
18177 (get_id_2): Likewise.
18178 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
18179 (init_method): Call init_mangle for new ABI.
18180 (make_thunk): Call mangle_thunk for new ABI.
18181 * operators.def: Correct new ABI manglings for the `%' operator.
18183 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
18184 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
18185 (lookup_template_class): Call mangle_decl for new ABI.
18186 (get_mostly_instantiated_function_type): New function.
18187 (set_mangled_name_for_template_decl): Use it.
18188 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
18189 the new ABI. Use mangle_conv_op_name_for_type for instantiated
18190 conversion op names.
18191 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
18192 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
18193 (tinfo_base_init): Likewise. Mangle typeinfo string name with
18194 mangle_typeinfo_string_for_type.
18196 2000-06-03 Mark Mitchell <mark@codesourcery.com>
18198 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
18199 (INNERMOST_TEMPLATE_ARGS): New macro.
18200 (innermost_args): Remove.
18201 (get_innermost_template_args): New function.
18202 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
18203 * error.c (dump_function_decl): Be caution when using
18204 most_general_template.
18205 * method.c (build_template_parm_names): Use
18206 INNERMOST_TEMPLATE_ARGS.
18207 * pt.c (add_to_template_args): Tidy comment
18208 (get_innermost_template_args): New function.
18209 (check_explicit_specialization): Clear DECL_INITIAL for a new
18211 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
18213 (push_template_decl): Always register specializations of the most
18215 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
18216 (coerce_template_parms): Likewise.
18217 (lookup_template_class): Likewise.
18218 (innermost_args): Remove.
18219 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
18220 (tsubst_decl): Handle tricky specializations. Use
18221 get_innermost_template_args.
18222 (instantiate_template): Simplify handling of partial
18224 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
18225 (most_general_template): Reimplement, in a more straightforward
18227 (regenerate_decl_from_template): Tweak formatting. Use
18228 TMPL_ARGS_DEPTH for clarity.
18229 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
18231 * dump.c (dequeue_and_dump): Dump information about thunks.
18233 2000-06-01 Richard Henderson <rth@cygnus.com>
18235 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
18237 2000-06-01 Richard Henderson <rth@cygnus.com>
18239 * decl2.c (unsupported_options): Fix typo, make const.
18240 (lang_decode_option): Fix bsearch argument order.
18242 2000-06-01 Mark Mitchell <mark@codesourcery.com>
18244 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
18247 2000-05-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18249 * cp-tree.h (c_get_alias_set): Deleted.
18250 * Makefile.in (decl.o): Include ../expr.h.
18251 * decl.c (expr.h): Include.
18252 (init_decl_processing): Call record_component_aliases for arrays.
18253 (grokdeclarator): Likewise.
18254 Set TREE_ADDRESSABLE for fields that aren't bitfields.
18255 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
18257 2000-05-31 Mark Mitchell <mark@codesourcery.com>
18259 Remove guiding declaration support.
18260 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
18261 (flag_guiding_decls): Remove.
18262 * call.c (build_user_type_conversion_1): Remove support for
18264 (build_new_function_call): Likewise.
18265 (build_new_op): Likewise.
18266 (build_new_method_call): Likewise.
18267 * decl.c (start_function): Likewise.
18268 * friend.c (is_friend): Likewise.
18269 (do_friend): Likewise.
18270 * decl2.c ((flag_dump_translation_unit): Make it const.
18271 (flag_guiding_decls): Remove.
18272 (unsupported_options): New variable
18273 (compare_options): New function.
18274 (lang_decode_option): Use them.
18276 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
18278 * method.c (mangle_expression): Adjust test for legal expression
18281 * pt.c (instantiate_decl): Save and restore the local
18282 specializations list.
18284 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
18286 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
18288 2000-05-30 Mark Mitchell <mark@codesourcery.com>
18290 * call.c (add_template_candidate_real): Handle member template
18291 constructors for classes with virtual bases.
18292 (build_user_type_conversion_1): Use in_charge_arg_for_name.
18293 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
18295 * ir.texi: Update thunk documentation.
18297 * call.c (joust): Fix handling of overloaded builtin operators.
18299 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
18301 * cp-tree.h (DECL_ANTICIPATED): New macro.
18302 Document new use of DECL_LANG_FLAG_7.
18303 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
18304 in the user namespace.
18305 * lex.c (do_identifier): If the identifier's declaration has
18306 DECL_ANTICIPATED on, it has not yet been declared. But do not
18307 replace it with an ordinary implicit declaration.
18309 * tinfo2.cc: Include stdlib.h.
18311 2000-05-29 Mark Mitchell <mark@codesourcery.com>
18313 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
18314 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
18317 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
18319 * decl2.c (lang_decode_option): Use skip_leading_substring instead
18322 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
18324 * operators.def (<?): Duplicated, should have been...
18327 2000-05-27 Alex Samuel <samuel@codesourcery.com>
18328 Mark Mitchell <mark@codesourcery.com>
18330 * cp-tree.h (ansi_opname): Make it a macro.
18331 (ansi_assopname): Likewise.
18332 (struct lang_decl_flags): Add assignment_operator_p.
18333 (struct lang_decl): Add operator_code.
18334 (DECL_VTT_PARM): Adjust.
18335 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
18336 overloaded operator.
18337 (SET_OVERLOADED_OPERATOR_CODE): New macro.
18338 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
18339 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
18340 (opname_tab): Remove.
18341 (assignop_tab): Likewise.
18342 (operator_name_info_t): New type.
18343 (operator_name_info): New variable.
18344 (assignment_operator_name_info): Likewise.
18345 (build_cp_library_fn): Remove declaration.
18346 (push_cp_library_fn): Likewise.
18347 (operator_name_string): Likewise.
18348 (build_decl_overload): Likewise.
18349 * call.c (print_z_candidates): Simplify.
18350 (build_object_call): Adjust usage of ansi_opname. Use
18351 DECL_OVERLOADED_OPERATOR_P.
18352 (op_error): Adjust operator name lookup.
18353 (build_conditional_expr): Adjust usage of ansi_opname.
18354 (build_new_op): Likewise.
18355 (build_op_delete_call): Likewise.
18356 (build_over_call): Likewise.
18357 (joust): Use DECL_OVERLOADED_OPERATOR_P.
18358 * decl.c (duplicate_decls): Copy operator_code.
18359 (init_decl_processing): Adjust parameters to push_cp_library_fn.
18360 (builtin_function): Adjust parameters to build_library_fn_1.
18361 (build_library_fn_1): Accept an overloaded operator code.
18362 (build_library_fn): Pass ERROR_MARK.
18363 (build_cp_library_fn): Accept an overloaded operator code.
18364 (push_cp_library_fn): Likewise.
18365 (grokfndecl): Tweak.
18366 (grokdeclarator): Simplify code to compute names of overloaded
18367 operators. Adjust use of ansi_opname.
18368 (ambi_op_p): Work on tree_codes, not identifiers.
18369 (unary_op_p): Likewise.
18370 (grok_op_properties): Likewise.
18371 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
18372 (lang_mark_tree): Don't try to mark the operator_code.
18373 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
18374 * error.c (dump_decl): Remove special handling for operator
18376 (dump_function_name): Likewise.
18377 (dump_expr): Adjust name lookup of operators.
18378 (op_to_string): Simplify.
18379 (assop_to_string): Likewise.
18380 * init.c (build_new_1): Adjust use of ansi_opname.
18381 * lex.c (opname_tab): Remove.
18382 (assignop_tab): Likewise.
18383 (ansi_opname): Likewise.
18384 (ansi_assopname): Likewise.
18385 (operator_name_string): Likewise.
18386 (reinit_lang_specific): Likewise.
18387 (operator_name_info): New variable.
18388 (assignment_operator_name_info): Likewise.
18389 (init_operators): New function.
18390 (init_parse): Use it.
18391 (do_identifier): Adjust use of ansi_opname.
18392 * method.c (mangle_expression): Don't use ansi_opname for
18394 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
18395 (build_decl_overload): Remove.
18396 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
18397 (do_build_assign_ref): Adjust use of ansi_opname.
18398 (synthesize_method): Likewise.
18399 (implicitly_declare_fn): Likewise.
18400 * operators.def: New file.
18401 * parse.y (operator): Adjust use of ansi_opname.
18402 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
18403 (set_mangled_name_for_template_decl): Don't play games with
18405 (special_function_p): Adjust use of ansi_opname.
18406 * typeck.c (check_return_expr): Likewise.
18407 * Make-lang.in (cc1plus): Depend on operators.def.
18408 * Makefile.in (lex.o): Likewise.
18409 (decl.o): Likewise.
18411 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
18413 * Make-lang.in (cplib2.ready): Eradicate.
18415 2000-05-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18417 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
18418 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
18419 (built_min, cp_tree_equal): Likewise.
18421 2000-05-26 Mark Mitchell <mark@codesourcery.com>
18423 * class.c (layout_nonempty_base_or_field): Replace
18424 `record_layout_info' with `record_layout_info_s'.
18426 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
18429 * cp-tree.h (struct language_function): x_named_labels is now
18430 a struct named_label_list*.
18431 * decl.c (struct named_label_use_list): Renamed from...
18432 (struct named_label_list): ...this. New struct.
18433 (push_binding_level): Don't set eh_region.
18434 (note_level_for_eh): New fn.
18435 (pop_label): Take label and old value directly.
18436 (pop_labels): Adjust for new named_labels format.
18437 (lookup_label): Likewise.
18438 (poplevel): Note characteristics of a binding level containing a
18439 named label. Mess with named label lists earlier.
18440 (mark_named_label_lists): New fn.
18441 (mark_lang_function): Call it.
18442 (use_label): New fn, split out from...
18443 (make_label_decl): ...here. Don't call it.
18444 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
18445 check_previous_gotos): New fns, split out from...
18446 (define_label): ...here.
18447 (check_switch_goto): New fn.
18448 (define_case_label): Call it.
18449 (check_goto): New fn.
18450 * semantics.c (finish_goto_stmt): Call it and use_label.
18451 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
18452 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
18454 2000-05-26 Mark Mitchell <mark@codesourcery.com>
18456 * class.c (build_vtable_entry_ref): Correct usage of
18457 get_vtbl_decl_for_binfo.
18459 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
18460 * method.c (implicitly_declare_fn): Not here.
18462 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
18464 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
18465 (CPTI_PTMD_DESC_TYPE): ... here.
18466 (ptmd_desc_type_node): Rename to ...
18467 (ptm_desc_type_node): ... here.
18468 * decl.c: Likewise.
18469 * rtti.c (ptmd_initializer): Rename to ...
18470 (ptm_initializer): ... here.
18471 (sythesize_tinfo_var): Adjust. Deal with pointer to member
18473 (create_tinfo_types): Adjust.
18475 2000-05-25 Mark Mitchell <mark@codesourcery.com>
18477 Finish implementation of VTTs.
18478 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
18479 CPTI_VTT_PARM_IDENTIFIER.
18480 (vtt_parm_identifier): New macro.
18481 (vtt_parm_type): Likewise.
18482 (BINFO_SUBVTT_INDEX): Likewise.
18483 (BINFO_VPTR_INDEX): Likewise.
18484 (struct lang_decl): Add vtt_parm.
18485 (DECL_VTT_PARM): New macro.
18486 (DECL_USE_VTT_PARM): Likewise.
18487 (DECL_NEEDS_VTT_PARM_P): Likewise.
18488 (get_vtt_name): Declare.
18489 (build_artificial_parm): Likewise.
18490 (fixup_all_virtual_upcast_offsets): Likewise.
18491 (expand_indirect_vtbls_init): Remove.
18492 * call.c (build_new_method_call): Pass the vtt to subobject
18493 constructors and destructors.
18494 * class.c (get_vtt_name): Give it external linkage.
18495 (build_clone): Handle the magic VTT parameters for clones.
18496 (clone_function_decl): Fix typo in comment.
18497 (build_vtt): Keep track of the indices in the VTTs where various
18498 entities are stored.
18499 (build_vtt_inits): Likewise.
18500 (dfs_build_vtt_inits): Likewise.
18501 (build_ctor_vtbl_group): Tweak type of construction vtables.
18502 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
18503 primary bases, when building construction vtables.
18504 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
18505 (initialize_predefined_identifiers): Add vtt_parm_identifier.
18506 (init_decl_processing): Initialize vtt_parm_type.
18507 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
18508 (lang_mark_tree): Make vtt_parm.
18509 * decl2.c (build_artificial_parm): New function.
18510 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
18511 (grokclassfn): Use build_artificial_parm.
18512 * init.c (initialize_vtbl_ptrs): Call
18513 fixup_all_virtual_upcast_offsets directly.
18514 (perform_member_init): Use the complete subobject destructor for
18516 (build_vtbl_address): New function.
18517 (expand_virtual_init): Handle VTTs.
18518 * optimize (maybe_clone_body): Likewise.
18519 * search.c (fixup_all_virtual_upcast_offsets): Give it external
18521 (expand_indirect_vtbls_init): Remove.
18522 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
18523 * tree.c (make_binfo): Make them bigger.
18525 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
18527 * inc/cxxabi.h (__pbase_type_info): Define, based on
18528 __pointer_type_info.
18529 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
18530 (__pointer_to_member_type_info): Likewise.
18531 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
18532 (__pointer_to_member_type_info::__is_pointer_p): Remove.
18533 (__pointer_type_info::__do_catch): Rename to ...
18534 (__pbase_type_info::__do_catch): ... here. Adjust.
18535 (__pbase_type_info::__pointer_catch): Implement.
18536 (__pointer_type_info::__pointer_catch): Adjust.
18537 (__pointer_to_member_type_info::__pointer_catch): Adjust.
18539 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
18541 * tinfo.h (__user_type_info::contained_virtual_p): New
18543 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
18545 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
18546 diamond shaped hierarchy. Add early out for mixed diamond and
18547 duplicate shaped hierarchy.
18549 2000-05-24 Mark Mitchell <mark@codesourcery.com>
18551 * cp-tree.h (build_delete): Change prototype.
18552 (build_vec_delete): Likewise.
18553 * call.c (build_scoped_method_call): Use special_function_kind
18554 values to indicate the kind of destruction to be done.
18555 (build_method_call): Likewise.
18556 * decl.c (finish_destructor_body): Likewise.
18557 (maybe_build_cleanup_1): Likewise. Rename to ...
18558 (maybe_build_cleanup): ... this.
18559 * decl2.c (delete_sanity): Use special_function_kind
18560 values to indicate the kind of destruction to be done.
18561 (build_cleanup): Likewise.
18562 * init.c (perform_member_init): Likewise.
18563 (build_vec_delete_1): Likewise.
18564 (build_dtor_call): Simplify.
18565 (build_delete): Use special_function_kind
18566 values to indicate the kind of destruction to be done.
18567 (build_vbase_delete): Likewise.
18568 (build_vec_delete): Likewise.
18570 * init.c (sort_member_init): Fix typo in error message generation
18573 2000-05-15 Donald Lindsay <dlindsay@cygnus.com>
18575 * semantics.c (begin_class_definition): make the packed
18576 attribute be sensitive to the "-fpack-struct" command line flag
18578 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
18580 Update new-abi upcast algorithm.
18581 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
18582 prototype and meaning of return value.
18583 (__si_class_type_info::__do_upcast): Likewise.
18584 (__vmi_class_type_info::__do_upcast): Likewise.
18585 * tinfo.cc (__class_type_info::__upcast_result): Replace
18586 whole2dst with part2dst. Adjust ctor.
18587 (__class_type_info::__do_upcast): Adjust call of worker function.
18588 (__class_type_info::__do_upcast): Adjust.
18589 (__si_class_type_info::__do_upcast): Adjust. Use parent's
18591 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
18592 virtual base in diamond hierarchy bug.
18594 2000-05-23 Mark Mitchell <mark@codesourcery.com>
18596 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
18597 and bitfield to tinfo_fn_p.
18598 (DECL_TINFO_FN_P): Adjust.
18599 (SET_DECL_TINFO_FN_P): Likewise.
18600 (DECL_MUTABLE_P): Likewise.
18601 (DECL_C_BIT_FIELD): Likewise.
18602 (SET_DECL_C_BIT_FIELD): Likewise.
18603 (CLEAR_DECL_C_BIT_FIELD): Likewise.
18604 (DECL_UNINLINABLE): Likewise.
18605 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
18606 (handle_using_decl): Remove assertion.
18607 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
18608 to build FIELD_DECLs.
18609 (build_base_field): Likewise.
18610 (layout_class_type): Likewise.
18611 * decl.c (init_decl_processing): Likewise.
18612 (build_ptrmemfunc_type): Likewise.
18613 (grokdeclarator): Likewise.
18614 * decl2.c (grok_x_components): Likewise.
18615 * except.c (call_eh_info): Likewise.
18616 * init.c (init_init_processing): Likewise.
18617 * rtti.c (expand_class_desc): Likewise.
18618 (create_pseudo_type_info): Likewise.
18619 (get_vmi_pseudo_type_info): Likewise.
18620 (create_tinfo_types): Likewise.
18621 * ptree.c (print_lang_decl): Adjust.
18622 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
18623 before checking DECL_MUTABLE_P.
18625 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
18626 parameters for template functions.
18627 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
18628 destructors as well as constructors.
18630 2000-05-22 Mark Mitchell <mark@codesourcery.com>
18632 * class.c (build_ctor_vtbl_group): Set inits.
18633 * optimize.c (maybe_clone_body): Set DECL_INLINE and
18634 DECL_THIS_INLINE appropriately for clones.
18636 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
18637 (DECL_CONV_FN_P): Simplify.
18638 (DECL_OPERATOR): Remove.
18639 (language_to_string): Declare.
18640 * decl.c (duplicate_decls): Fix typo in comment.
18641 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
18642 (grok_op_properties): Use DECL_CONV_FN_P instead of
18643 IDENTIFIER_TYPENAME_P.
18644 * dump.c (dequeue_and_dump): Dump the language linkage of
18646 * error.c (language_to_string): Give it external linkage.
18647 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
18648 (implicitly_declare_fn): Set DECL_LANGUAGE.
18649 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
18650 IDENTIFIER_TYPENAME_P.
18651 (tsubst_decl): Likewise.
18652 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
18653 * semantics.c (finish_member_declaration): Don't mark members of
18654 classes declared in an extern "C" region as extern "C".
18656 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18658 * decl2.c (qualified_lookup_using_namespace): Look through
18661 * decl.c (push_using_decl): Return the old decl on namespace level.
18663 2000-05-21 Mark Mitchell <mark@codesourcery.com>
18665 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
18666 (VTT_NAME_PREFIX): New macro.
18667 (CTOR_VTBL_NAME_PREFIX): Likewise.
18668 (get_ctor_vtbl_name): New function.
18669 * class.c (get_vtable_name): Simplify.
18670 (get_vtt_name): New function.
18671 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
18672 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
18673 when a virtual base becomes primary.
18674 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
18676 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
18677 additional parameters.
18678 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
18679 (initialize_array): New function.
18680 (build_vtt): Likewise.
18681 (build_vtt_inits): Likewise.
18682 (dfs_build_vtt_inits): Likewise.
18683 (dfs_fixup_binfo_vtbls): Likewise.
18684 (build_ctor_vtbl_group): Likewise.
18685 (initialize_vtable): Use initialize_array.
18686 (accumulate_vtbl_inits): Reimplement to handle construction
18688 (dfs_accumulate_vtbl_inits): Likewise.
18689 (bulid_vtbl_initializer): Adjust parameter name.
18690 * method.c (build_typename_overload): Remove #if 0'd code.
18691 (get_ctor_vtbl_name): New function.
18692 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
18693 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
18695 * cp-tree.h (struct lang_type): Remove search_slot.
18696 (CLASSTYPE_SEARCH_SLOT): Remove.
18697 (emit_base_init): Change prototype.
18698 (initialize_vtbl_ptrs): Likewise.
18699 (expand_indirect_vtbls_init): Likewise.
18700 (clear_search_slots): Remove.
18701 * decl.c (lang_mark_tree): Don't mark search_slot.
18702 * init.c (initialize_vtbl_ptrs): Simplify.
18703 (emit_base_init): Likewise.
18704 * search.c (struct vbase_info): Document decl_ptr.
18705 (convert_pointer_to_single_level): Remove.
18706 (dfs_find_vbases): Remove.
18707 (dfs_init_base_pointers): Simplify.
18708 (dfs_clear_vbase_slots): Remove.
18709 (dfs_vtable_path_unmark): New function.
18710 (init_vbase_pointers): Simplify.
18711 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
18712 (expand_indirect_vtbls_init): Simplify. Don't call
18713 mark_all_temps_used.
18714 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
18715 initialize_vtbl_ptrs.
18717 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
18719 * except.c: Add static prototypes.
18721 2000-05-20 H.J. Lu <hjl@gnu.org>
18723 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
18725 2000-05-19 Mark Mitchell <mark@codesourcery.com>
18727 Don't create a separate copy of virtual bases for the
18728 CLASSTYPE_VBASECLASSES list.
18729 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
18730 (BINFO_FOR_VBASE): Remove.
18731 (CANONICAL_BINFO): Adjust.
18732 (binfo_for_vbase): New function.
18733 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
18734 instead of BINFO_FOR_VBASE.
18735 (build_vbase_pointer): Likewise.
18736 (build_secondary_vtable): Likewise.
18737 (dfs_mark_primary_bases): Likewise.
18738 (mark_primary_bases): Likewise.
18739 (layout_nonempty_base_or_field): Likewise.
18740 (dfs_set_offset_for_shared_vbases): Likewise.
18741 (dfs_set_offset_for_unshared_vbases): Likewise.
18742 (layout_virtual_bases): Likewise. Adjust for changes to the
18743 CLASSTYPE_VBASECLASSES list.
18744 (dump_class_hierarchy_r): Use binfo_for_vbase
18745 instead of BINFO_FOR_VBASE.
18746 (dump_class_hierarchy): Likewise.
18747 (finish_vtbls): Likewise.
18748 (build_vtbl_initializer): Adjust for changes to the
18749 CLASSTYPE_VBASECLASSES list.
18750 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
18751 * decl.c (finish_destructor_body): Adjust for changes to the
18752 CLASSTYPE_VBASECLASSES list.
18753 * init.c (sort_base_init): Use binfo_for_vbase.
18754 (construct_virtual_bases): Adjust for changes to the
18755 CLASSTYPE_VBASECLASSES list.
18756 (expand_member_init): Use binfo_for_vbase.
18757 (build_vbase_delete): Adjust for changes to the
18758 CLASSTYPE_VBASECLASSES list.
18759 * method.c (do_build_copy_constructor): Likewise.
18760 * rtti.c (get_base_offset): Use binfo_for_vbase.
18761 (expand_class_desc): Remove #if 0'd code.
18762 * search.c (struct vbase_info): Remove vbase_types.
18763 (get_base_distance): Use binfo_for_vbase.
18764 (lookup_field_queue_p): Use CANONICAL_BINFO.
18765 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
18766 (get_pure_virtuals): Adjust for changes to the
18767 CLASSTYPE_VBASECLASSES list.
18768 (dfs_find_vbases): Use binfo_for_vbase.
18769 (dfs_init_vbase_pointers): Likewise.
18770 (init_vbase_pointers): Don't initialize vi.vbase_types.
18771 (virtual_context): Use binfo_for_vbase.
18772 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
18773 CLASSTYPE_VBASECLASSES list.
18774 (expand_indirect_vtbls_init): Simplify.
18775 (dfs_get_vbase_types): Don't replicate virtual bases.
18776 (find_vbase_instance): Use binfo_for_vbase.
18777 (binfo_for_vbase): New function.
18778 * typeck.c (get_delta_difference): Use binfo_for_vbase.
18780 2000-05-17 Mark Mitchell <mark@codesourcery.com>
18782 * decl2.c (finish_anon_union): Generalize error messages to handle
18783 anonymous structures.
18784 * init.c (perform_member_init): Remove `name' parameter.
18785 (build_field_list): New function.
18786 (sort_member_init): Handle anonymous union initialization order
18787 correctly. Check for multiple initializations of the same union.
18788 (emit_base_init): Don't look up fields by name here.
18789 (expand_member_init): Record the result of name lookup for future
18791 * typeck.c (build_component_ref): Fix formatting.
18793 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
18795 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
18796 * typeck.c (build_x_compound_expr): Replace warn_unused with
18799 * decl2.c (lang_decode_option): Update -Wall unused flags by
18800 calling set_Wunused.
18802 2000-05-16 Mark Mitchell <mark@codesourcery.com>
18804 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
18805 * init.c (dfs_vtable_path_unmark): Remove.
18806 * search.c (marked_new_vtable_p): Likewise.
18807 (unmarked_new_vtable_p): Likewise.
18808 (dfs_search_slot_nonempty_p): Likewise.
18809 (dfs_mark): Likewise.
18810 (dfs_vtable_path_unmark): Likewise.
18811 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
18812 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
18813 (dfs_init_vbase_pointers): Remove special-case new ABI code.
18814 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
18815 (init_vbase_pointers): Simplify.
18816 (expand_indirect_vtbls_init): Likewise.
18818 * class.c (copy_virtuals): New function.
18819 (build_primary_table): Use it.
18820 (build_secondary_vtable): Likewise.
18821 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
18822 indicate that no vcall offset is required.
18823 (add_virtual_function): Likewise.
18824 (modify_all_vtables): Likewise.
18825 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
18826 (dfs_accumulate_vtbl_inits): Likewise.
18827 (build_vtbl_initializer): Make changes to handle construction
18829 (dfs_build_vcall_offset_vtbl_entries): Likewise.
18830 (build_rtti_vtbl_entries): Likewise.
18831 (build_vtable_entries): Handle a NULL vcall_index.
18833 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
18835 * decl2.c (lang_decode_option): Fix thinko.
18837 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
18839 * except.c (check_handlers): New fn.
18840 * cp-tree.h: Declare it.
18841 * semantics.c (finish_handler_sequence): Call it.
18842 (finish_function_handler_sequence): Likewise.
18843 (finish_handler_parms): Set TREE_TYPE on the handler.
18844 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
18845 * search.c (get_base_distance_recursive): If protect>1, ignore
18847 (get_base_distance): Don't reduce watch_access.
18849 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
18851 * lex.c: #include diagnostic.h.
18852 (lang_init_options): Set default prefixing rules.
18854 * lang-options.h: Add -fdiagnostics-show-location=.
18856 * decl2.c: #include diagnostic.h.
18857 (lang_decode_option): Handle -fdiagnostics-show-location=.
18859 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
18861 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
18862 * vec.cc: Revert my 2000-05-07 change.
18864 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
18866 * class.c (check_field_decls): Complain about non-static data
18867 members with same name as class in class with constructor.
18869 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
18871 * decl.c (grokdeclarator): Allow non-static data members with
18872 same name as class.
18874 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
18876 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
18877 and pending_inline.filename. Update prototypes.
18878 * decl.c (define_label): Constify filename parameter.
18879 * decl2.c (warn_if_unknown_interface): Constify local char *.
18880 * input.c Constify input_source.filename. Don't declare
18881 input_filename or lineno. Constify filename parameter to feed_input.
18882 * lex.c (init_parse): Constify parameter and return value.
18883 (cp_pragma_interface, cp_pragma_implementation): Constify
18885 (reinit_parse_for_method, reinit_parse_for_block,
18886 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
18887 Constify local char *.
18888 * pt.c: Don't declare lineno or input_filename.
18889 (print_template_context, tsubst_friend_function, tsubst_decl,
18890 tsubst, instantiate_decl): Constify local char *.
18891 * semantics.c (expand_body): Constify local char *.
18892 * tree.c (build_srcloc): Constify filename parameter.
18893 * typeck.c (c_expand_asm_operands): Constify filename
18896 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
18898 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
18899 offsetof expansion.
18901 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
18903 * inc/cxxabi.h: Fix typos in comment.
18904 (__base_class_info::__offset): Use a static_cast.
18906 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
18908 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
18909 of std::size_t and std::ptrdiff_t respectively.
18910 * tinfo.cc: Likewise.
18911 * vec.cc: Likewise.
18913 2000-05-06 Richard Henderson <rth@cygnus.com>
18915 * typeck.c (build_c_cast): Don't warn integer->pointer size
18916 mismatch for constants.
18918 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
18920 * rtti.c (ptmd_initializer): Set non-public, if class is
18923 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
18924 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18925 __cxa_vec_delete): Likewise.
18926 * tinfo.cc (__dynamic_cast): Likewise.
18927 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18928 __cxa_vec_delete): Likewise.
18930 2000-05-04 Mark Mitchell <mark@codesourcery.com>
18932 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
18933 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
18934 (lang_decl_flags): Add vcall_offset.
18935 (THUNK_VCALL_OFFSET): Use it.
18936 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
18937 * method.c (make_thunk): Create the lang_decl here, not in
18939 (emit_thunk): Make generic thunks into ordinary functions once
18940 they have been fed to expand_body.
18941 * semantics.c (expand_body): Set current_function_is_thunk here.
18943 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18945 * class.c (update_vtable_entry_for_fn): Prototype.
18947 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
18950 * search.c (dfs_build_inheritance_graph_order): Prototype.
18952 2000-05-04 Mark Mitchell <mark@codesourcery.com>
18954 * cp-tree.h (special_function_kind): Add various kinds of
18956 (special_function_p): New function.
18957 * class.c (overrides): Don't let one kind of destructor override
18959 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
18960 whether or not to instantiate a template.
18961 * tree.c (special_function_p): Define.
18963 2000-05-03 Mark Mitchell <mark@codesourcery.com>
18965 * cp-tree.def (THUNK_DECL): Remove.
18966 * cp-tree.h (DECL_THUNK_P): New macro.
18967 (DECL_NON_THUNK_FUNCTION_P): Likewise.
18968 (DECL_EXTERN_C_FUNCTION_P): Likewise.
18969 (SET_DECL_THUNK_P): Likewise.
18970 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
18971 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
18972 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
18973 * decl.c (decls_match): Use DECL_EXTERN_C_P.
18974 (duplicate_decls): Likewise.
18975 (pushdecl): Likewise. Adjust thunk handling.
18976 (grokfndecl): Use DECL_EXTERN_C_P.
18977 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
18978 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
18979 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
18980 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
18981 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
18982 DECL_NO_STATIC_CHAIN.
18983 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
18984 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
18985 * search.c (covariant_return_p): Remove THUNK_DECL handling.
18988 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
18990 * tree.c (walk_tree): Set lineno.
18992 2000-05-01 Mark Mitchell <mark@codesourcery.com>
18994 * exception.cc: Update license notice.
18995 * new.cc: Likewise.
18996 * new1.cc: Likewise.
18997 * new2.cc: Likewise.
18998 * tinfo.cc: Likewise.
18999 * tinfo2.cc: Likewise.
19000 * vec.cc: Likewise.
19001 * inc/cxxabi.h: Likewise.
19002 * inc/exception: Likewise.
19003 * inc/new: Likewise.
19004 * inc/new.h: Likewise.
19005 * inc/typeinfo: Likewise.
19007 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
19009 * tree.c (build_target_expr_with_type): If we already have a
19010 TARGET_EXPR, just return it.
19012 * optimize.c (initialize_inlined_parameters): Don't generate an
19013 EXPR_STMT if we can just use DECL_INITIAL.
19014 * decl.c (emit_local_var): Only make the initialization a
19015 full-expression if stmts_are_full_exprs_p.
19017 2000-05-01 Mark Mitchell <mark@codesourcery.com>
19019 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
19021 * call.c (standard_conversion): Use it.
19022 (direct_reference_binding): Likewise.
19023 (build_over_call): Likewise.
19024 (is_properly_derived_from): Likewise.
19025 (compare_ics): Likewise.
19026 * class.c (resolves_to_fixed_type_p): Likewise.
19027 * optimize.c (declare_return_variable): Likewise.
19028 * pt.c (is_specialization_of): Likewise.
19030 * typeck.c (comp_target_parms): Likeiwse.
19031 (build_static_cast): Likewise.
19032 (build_reinterpret_cast): Likewise.
19033 (build_const_cast): Likewise.
19034 (comp_ptr_ttypes_real): Likewise.
19035 (comp_ptr_ttypes_const): Likewise.
19036 * typeck2.c (process_init_constructor): Likewise.
19038 2000-04-30 Scott Snyder <snyder@fnal.gov>
19040 * decl.c (finish_destructor_body): Use the base destructor when
19041 destroying virtual bases.
19043 2000-04-30 Mark Mitchell <mark@codesourcery.com>
19045 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
19047 * optimize.c (struct inline_data): Add target_exprs field.
19048 (declare_return_variable): When a function returns an aggregate,
19049 use the variable declared in the TARGET_EXPR as the remapped
19051 (expand_call_inline): Update the pending target_exprs stack.
19052 (optimize_function): Initialize the stack.
19054 * decl2.c (finish_file): Fix typo in comment.
19056 * method.c (emit_thunk): Don't try to return a `void' value.
19058 * optimize.c (initialize_inlined_parameters): If the parameter is
19059 addressable, we need to make a new VAR_DECL, even if the
19060 initializer is constant.
19062 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
19064 * decl.c (grok_op_properties): Add an extra check of argtypes.
19066 2000-04-27 Mark Mitchell <mark@codesourcery.com>
19068 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
19070 (initialize_inlined_parameters): Try to avoid creating new
19073 2000-04-27 Alex Samuel <samuel@codesourcery.com>
19075 * lex.c (my_get_run_time): Remove.
19076 (init_filename_times): Use get_run_time instead of my_get_run_time.
19077 (check_newline): Likewise.
19078 (dump_time_statistics): Likewise.
19079 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
19080 of computing elapsed time explicitly.
19082 2000-04-26 Mark Mitchell <mark@codesourcery.com>
19084 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
19085 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
19086 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
19087 before calling decl_constant_value.
19088 * class.c (check_bitfield_decl): Likewise.
19089 * cvt.c (ocp_convert): Likewise.
19090 (convert): Likewise.
19091 * decl.c (compute_array_index_type): Likewise.
19092 (build_enumerator): Likewise.
19093 * decl2.c (check_cp_case_value): Likewise.
19094 * pt.c (convert_nontype_argument): Likewise.
19095 (tsubst): Likewise.
19096 * typeck.c (decay_conversion): Likewise.
19097 (build_compound_expr): Likewise.
19098 (build_reinterpret_cast): Likewise.
19099 (build_c_cast): Likewise.
19100 (convert_for_assignment): Likewise.
19102 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
19104 * decl.c (finish_function): Don't play games with DECL_INLINE.
19106 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
19108 * ir.texi: Correct typo.
19110 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19112 * decl.c (grokdeclarator): Reject VLAs as members.
19114 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
19116 * call.c (standard_conversion): Accept conversion between
19119 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
19121 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
19123 * decl2.c (finish_file): Remove double setup for accounting
19126 2000-04-24 Robert Lipe <robertlipe@usa.net>
19128 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
19130 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
19132 * new.cc (set_new_handler): Needs to be in std::.
19134 2000-04-23 Mark Mitchell <mark@codesourcery.com>
19136 * cp-tree.h (lang_decl): Remove pretty_function_p.
19137 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
19138 language-specific node.
19139 * decl.c (cp_make_fname_decl): Use build_decl, not
19140 build_lang_decl, to build the variables.
19141 (grokvardecl): Don't call build_lang_decl for local variables in
19143 (grokdeclarator): Don't call build_lang_decl for local type
19144 declarations in templates.
19145 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
19146 zero'd memory, rather than calling memset.
19147 * pt.c: Include hashtab.h.
19148 (local_specializations): New variable.
19149 (retrieve_local_specialization): Use it.
19150 (register_local_specialization): Likewise.
19151 (tsubst_decl): Don't assume local variables have
19152 DECL_LANG_SPECIFIC.
19153 (instantiate_decl): Set up local_specializations.
19154 * Makefile.in (HTAB_H): New variable.
19156 2000-04-23 Richard Henderson <rth@cygnus.com>
19158 * typeck.c (c_expand_asm_operands): Restore the original
19159 contents of the output list.
19161 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
19163 * ir.texi: Document complex number representation.
19165 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
19167 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
19168 (target_incomplete_p): New function.
19169 (tinfo_base_init): Create comdat NTBS name variable.
19170 (ptr_initializer): Add non_public parameter. Calculate it.
19171 (ptmd_initializer): Likewise.
19172 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
19173 (create_real_tinfo_var): Add non_public parameter. Use it.
19174 Push proxy into global namespace.
19175 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
19177 * inc/typeinfo (type_info::before, type_info::operator==):
19178 Compare __name addresses.
19180 * tinfo2.cc: Remove new-abi builtins comment.
19182 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
19184 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
19186 * call.c (joust): Exit early if we get the same function, too.
19188 * decl2.c (key_method): Return NULL_TREE for template classes.
19189 (import_export_class): Don't need to check for template classes.
19191 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
19193 * lex.c: Remove references to cccp.c.
19195 2000-04-18 Mark Mitchell <mark@codesourcery.com>
19197 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
19198 volatile_memfunc. Add destructor_attr. Adjust dummy.
19199 (DECL_DESTRUCTOR_P): Use destructor_attr.
19200 (DECL_CONST_MEMFUNC_P): Reimplement.
19201 (DECL_VOLATILE_MEMFUNC_P): Remove.
19202 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
19203 (overrides): Use DECL_DESTRUCTOR_P.
19204 (check_for_override): Likewise.
19205 * decl.c (start_function): Likewise.
19206 * decl2.c (grokfclassfn): Likewise.
19207 (check_classfn): Likewise.
19208 (grok_function_init): Likewise.
19210 2000-04-17 Mark Mitchell <mark@codesourcery.com>
19212 * decl2.c (grokfield): Issue error on illegal data member
19215 2000-04-17 Mark P Mitchell <mark@codesourcery.com>
19217 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
19219 2000-04-16 Mark Mitchell <mark@codesourcery.com>
19221 * class.c (build_vtable_entry): Don't build thunks for type-info
19224 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
19226 * decl.c (decls_match): Allow a redeclaration of a builtin to
19227 specify args while the builtin did not.
19229 2000-04-15 Mark Mitchell <mark@codesourcery.com>
19231 * cp-tree.def (THUNK_DECL): Add to documentation.
19232 * cp-tree.h (flag_huge_objects): Declare.
19233 * class.c (modify_vtable_entry): Tidy.
19234 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
19235 Calculate delta appropriately for the new ABI.
19236 (dfs_modify_vtables): Use it.
19237 (modify_all_vtables): Fix thinko in code to add overriding copies
19238 of functions to primary vtables.
19239 (build_clone): Fix typo in comment.
19240 (clone_function_decl): Correct order of destructors in vtable.
19241 (build_vbase_offset_vtbl_entries): Adjust comment.
19242 (dfs_vcall_offset_queue_p): Remove.
19243 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
19244 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
19245 (build_vtable_entry): Correct check for pure virtual functions.
19246 Don't declare flag_huge_objects.
19247 * decl.c (flag_huge_objects): Remove declaration.
19248 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
19249 Use int_size_in_bytes.
19250 (emit_thunk): Handle vcall offset thunks.
19252 2000-04-15 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19254 * decl2.c (parse_time, varconst_time): Delete declarations.
19255 (finish_file): Delete LINENO declaration.
19256 START_TIME and THIS_TIME now long.
19258 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
19260 * class.c (build_base_field): Reformat comment.
19262 * inc/cxxabi.h (stddef.h): Comment inclusion.
19263 (__base_class_info::__offset): Comment shift.
19265 2000-04-12 Mark Mitchell <mark@codesourcery.com>
19267 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
19268 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
19269 (cp_push_exception_identifier): New macro.
19270 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
19271 (DECL_BASE_DESTRUCTOR_P): Likewise.
19272 (DECL_DELETING_DESTRUCTOR_P): Likewise.
19273 (get_vtbl_decl_for_binfo): Fix formatting.
19274 (in_charge_arg_for_name): New macro.
19275 (maybe_build_cleanup_and_delete): Remove declaration.
19276 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
19277 (in_charge_arg_for_name): New function.
19278 (build_new_method_call): Use it. Handle cloned destructors.
19279 (build_clone): Don't make the base constructor virtual.
19280 Automatically defer generated functions.
19281 (clone_function_decl): Handle destructors, too.
19282 (clone_constructors_and_destructors): Likewise.
19283 (create_vtable_ptr): Don't create a vtable entry for a cloned
19285 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
19286 (initialize_predefined_identifiers): Update appropriately.
19287 (finish_destructor_body): Simplify.
19288 (maybe_build_cleanup_and_delete): Remove.
19289 * except.c (expand_throw): Handle new-ABI destructors.
19290 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
19291 (build_dtor_call): New function.
19292 (build_delete): Use it. Simplify.
19293 * optimize.c (maybe_clone_body): Handle destructors.
19294 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
19296 * exception.cc (cleanup_fn): New typedef.
19297 (CALL_CLEANUP): New macro.
19298 (cp_eh_info): Use them.
19299 (__cp_push_exception): Likewise.
19300 (__cp_pop_exception): Likewise.
19302 2000-04-11 Mark Mitchell <mark@codesourcery.com>
19304 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
19305 (complete_dtor_identifier): New macro.
19306 (CLASSTYPE_FIRST_CONVERSION): Remove.
19307 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
19308 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
19309 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
19310 (CLASSTYPE_CONSTRUCTORS): Likewise.
19311 (CLASSTYPE_DESTRUCTORS): Likewise.
19312 (lang_decl): Add cloned_function.
19313 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
19314 (DECL_BASE_CONSTRUCTOR_P): Likewise.
19315 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
19316 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
19317 (DECL_CLONED_FUNCTION_P): Likewise.
19318 (DECL_CLONED_FUNCTION): Likewise.
19319 (clone_function_decl): Declare.
19320 (maybe_clone_body): Likewise.
19321 * call.c (build_user_type_conversion_1): Call complete object
19322 constructors in the new ABI.
19323 (build_new_method_call): Don't add in-charge parameters under the
19325 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
19326 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
19327 CLASSTYPE_DESTRUCTOR_SLOT.
19328 (build_clone): New function.
19329 (clone_function_decl): Likewise.
19330 (clone_constructors_and_destructors): Likewise.
19331 (check_bases_and_members): Use it.
19332 * decl.c (iniitialize_predefined_identifiers): Initialize
19333 complete_dtor_identifier.
19334 (finish_function): Don't add extra code to a clone.
19335 (lang_mark_tree): Mark cloned_function.
19336 * decl2.c (mark_used): Don't bother trying to instantiate things
19338 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
19339 * method.c (set_mangled_name_for_decl): Don't treat clones as
19341 (synthesize_method): Sythesize cloned functions, not the clones.
19342 * optimize.c (inline_data): Update comment on ret_label.
19343 (remap_block): Don't assume DECL_INITIAL exists.
19344 (copy_body_r): Allow ret_label to be NULL.
19345 (maybe_clone_body): Define.
19346 * pt.c (tsubst_decl): Handle clones.
19347 (instantiate_clone): New function.
19348 (instantiate_template): Use it.
19349 (set_mangled_name_for_template_decl): Don't treat clones as
19351 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
19352 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
19353 * semantics.c (expand_body): Clone function bodies as necessary.
19355 * optimize.c (remap_decl): Avoid sharing structure for arrays
19356 whose size is only known at run-time.
19357 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
19359 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
19360 to has_in_charge_parm_p.
19361 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
19362 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
19363 (DECL_COPY_CONSTRUCTOR_P): New macro.
19364 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
19365 (build_user_type_conversion_1): Likewise.
19366 (convert_like_real): Likewise.
19367 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
19368 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
19369 (copy_args_p): Likewise.
19370 (grok_ctor_properties): Likewise.
19371 (start_function): Likewise.
19372 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
19373 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
19374 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
19375 * method.c (do_build_copy_constructor): Use
19376 DECL_HAS_IN_CHARGE_PARM_P.
19377 (synthesize_method): Likewise.
19378 * pt.c (instantiate_template): Remove goto.
19379 * tree.c (build_cplus_method_type): Remove mention of obstacks in
19382 * cp-tre.h (finish_function): Change prototype.
19383 * decl.c (end_cleanup_fn): Adjust caller.
19384 (finish_function): Take only one parameter.
19385 * decl2.c (finish_objects): Adjust caller.
19386 (finish_static_storage_duration_function): Likewise.
19387 * method.c (emit_thunk): Likewise.
19388 * parse.y: Likewise.
19389 * parse.c: Regenerated.
19390 * pt.c (instantiate_decl): Likewise.
19391 * rtti.c (synthesize_tinfo_fn): Likewise.
19392 * semantics.c (expand_body): Likewise.
19394 * cp-tree.h (copy_decl): New function.
19395 * class.c (finish_struct_1): Use it.
19396 * lex.c (copy_decl): Define it.
19397 * pt.c (tsubst_decl): Likewise.
19398 * tree.c (copy_template_template_parm): Likewise.
19400 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
19401 has_nonpublic_assign_ref.
19402 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
19403 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
19404 * class.c (finish_struct_methods): Don't set
19405 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
19406 (interface_only): Don't declare.
19407 (interface_unknown): Likewise.
19409 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19411 * tree.h (HAVE_TEMPLATES): Remove definition.
19412 * lang-options.h (-fthis-is-variable): Remove documentation.
19414 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
19416 * class.c (instantiate_type): Handle object-relative template-id.
19418 * semantics.c (finish_expr_stmt): Call convert_to_void here.
19419 * decl.c (cplus_expand_expr_stmt): Not here.
19421 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
19422 Initialize exprtype earlier.
19424 * parse.y (fn.def1): Check for defining types in return types.
19426 * decl.c (check_tag_decl): Notice extra fundamental types.
19427 Diagnose empty decls in classes, too.
19429 * decl.c (grokdeclarator): Don't override an anonymous name if no
19430 declarator was given.
19432 * cvt.c (convert_to_void): Call resolve_offset_ref.
19434 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
19436 * decl2.c (decl_namespace): Handle getting a type.
19438 * typeck.c (build_c_cast): Re-enable warning for cast between
19439 pointer and integer of different size.
19441 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
19443 * inc/cxxabi.h (__pointer_type_info): Add restrict and
19445 (__pointer_type_info::__pointer_catch): New virtual function.
19446 (__pointer_to_member_type_info): Derive from
19447 __pointer_type_info. Adjust.
19448 (__pointer_to_member_type_info::__do_catch): Remove.
19449 (__pointer_to_member_type_info::__is_pointer_p): Declare.
19450 (__pointer_to_member_type_info::__pointer_catch): Declare.
19451 * rtti.c (qualifier_flags): Add restrict flag.
19452 (ptmd_initializer): Reorder members.
19453 (create_tinfo_types): Expand comments. Reorder
19454 ptmd_desc_type_node members.
19455 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
19457 (__pointer_type_info::__do_catch): Move specific code into
19458 __pointer_catch. Call it.
19459 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
19460 specific catch checking. Fix void conversion check.
19461 (__pointer_to_member_type_info::__do_catch): Remove.
19462 (__pointer_to_member_type_info::__pointer_catch): Implement.
19464 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19466 * lex.c (init_parse): Remove traces of classof and headof.
19467 * decl2.c (flag_operator_names): Default to 1.
19468 (lang_decode_option): Do not set it for -ansi.
19470 2000-04-09 Mark Mitchell <mark@codesourcery.com>
19472 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
19473 (DECL_MAIN_VARIANT): Remove.
19474 * decl.c (duplicate_decls): Don't set it.
19475 (start_function): Likewise.
19476 (lang_mark_tree): Don't mark it.
19477 * decl2.c (defer_fn): Don't use it.
19478 * lex.c (retrofit_lang_decl): Don't set it.
19479 * pt.c (tsubst_decl): Likewise.
19480 * ptree.c (print_lang_decl): Don't print it.
19481 * typeck.c (mark_addressable): Don't use it.
19483 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
19485 * vec.cc: Include <new> and <exception>.
19486 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
19487 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
19489 (__cxa_vec_delete): Catch dtor exceptions.
19491 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
19493 Prepend __ to implementation defined names.
19494 * inc/typeinfo (type_info): Rename _name to __name.
19495 (type_info::type_info): Rename parameter.
19496 (type_info::operator==, type_info::operator!=,
19497 type_info::before): Likewise.
19498 (type_info::is_pointer_p, type_info::is_function_p,
19499 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
19502 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
19503 (__pointer_type_info::__pointer_type_info): Likewise.
19504 (__pointer_type_info::is_pointer_p,
19505 __pointer_type_info::do_catch): Prepend __. Rename parameters.
19506 (__array_type_info::__array_type_info): Rename parameters.
19507 (__function_type_info::__function_type_info): Likewise.
19508 (__function_type_info::is_function_p): Prepend __.
19509 (__enum_type_info::__enum_type_info): Rename parameters.
19510 (__pointer_to_member_type_info::__pointer_to_member_type_info):
19512 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
19514 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
19515 (__class_type_info::__class_type_info): Rename parameters.
19516 (__class_type_info::sub_kind): Prepend __. Adjust member names.
19517 (__class_type_info::upcast_result,
19518 __class_type_info::dyncast_result): Prepend __. Move definition
19520 (__class_type_info::do_upcast, __class_type_info::do_catch,
19521 __class_type_info::find_public_src,
19522 __class_type_info::do_dyncast,
19523 __class_type_info::do_find_public_src): Prepend __. Rename
19525 (__si_class_type_info::__si_class_type_info): Rename parameters.
19526 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
19527 __si_class_type_info::do_find_public_src): Prepent __. Rename
19529 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
19530 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
19531 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
19533 (__dynamic_cast): Rename parameters.
19534 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
19535 type_info::do_catch, type_info::do_upcast): Prepend __.
19536 (contained_p, public_p, virtual_p, contained_public_p,
19537 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
19538 (__class_type_info::do_catch,
19539 __class_type_info::do_upcast): Prepend __. Adjust.
19540 (__class_type_info::__upcast_result,
19541 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
19543 (__class_type_info::find_public_src): Prepend __. Adjust.
19544 (__class_type_info::do_find_public_src,
19545 __si_class_type_info::do_find_public_src,
19546 __vmi_class_type_info::do_find_public_src): Likewise.
19547 (__class_type_info::do_dyncast,
19548 __si_class_type_info::do_dyncast,
19549 __vmi_class_type_info::do_dyncast): Likewise.
19550 (__class_type_info::do_upcast,
19551 __si_class_type_info::do_upcast,
19552 __vmi_class_type_info::do_upcast): Likewise.
19553 (__dynamic_cast): Adjust.
19554 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
19555 (__function_type_info::is_function_p): Likewise.
19556 (__pointer_type_info::do_catch): Likewise. Adjust.
19557 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
19558 (__throw_type_match_rtti_2): Adjust.
19559 (__is_pointer): Adjust.
19561 2000-04-08 Mark Mitchell <mark@codesourcery.com>
19563 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
19564 (complete_ctor_identifier): New macro.
19565 (special_function_kind): Add sfk_copy_constructor and
19566 sfk_assignment_operator.
19567 (LOOKUP_HAS_IN_CHARGE): Remove.
19568 (cons_up_default_function): Rename to ...
19569 (implicitly_declare_fn): ... this.
19570 * call.c (build_new_method_call): Add in-charge parameters for
19572 * class.c (add_implicitly_declared_members): Change parameter name
19573 from cant_have_assignment to cant_have_const_assignment.
19574 Replace calls to cons_up_default_function to implicitly_declare_fn.
19575 * cvt.c (ocp_convert): Use complete_ctor_identifier.
19576 * decl.c (initialize_predefined_identifiers): Initialize it.
19577 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
19578 complex expression.
19579 * init.c (expand_default_init): Don't calculate the in-charge
19581 (build_new_1): Likewise.
19582 * lex.c (cons_up_default_function): Move to method.c.
19583 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
19584 (implicitly_declare_fn): New function.
19585 * typeck.c (build_static_cast): Use complete_ctor_identifier.
19586 (build_modify_expr): Likewise.
19587 * typeck2.c (build_functional_cast): Likewise.
19589 Under the new ABI, constructors don't return `this'.
19590 * cp-tree.h (warn_reorder): Declare.
19591 (special_function_kind): New enum.
19592 (global_base_init_list): Remove declaration.
19593 (emit_base_init): Don't return a value.
19594 (check_base_init): Don't declare.
19595 (is_aggr_typedef): Likewise.
19596 * decl.c (check_special_function_return_type): New function.
19597 (return_types): Remove.
19598 (grokdeclarator): Use check_special_function_return_type.
19599 (start_function): Don't initialize ctor_label under the new ABI.
19600 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
19601 * init.c (begin_init_stmts): Move to top of file.
19602 (finish_init_stmts): Likewise.
19603 (warn_reorder): Don't declare.
19604 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
19606 (check_base_init): Remove.
19607 (is_aggr_typedef): Likewise.
19608 (build_new_1): Don't use the return value of a constructor.
19609 * semantics.c (setup_vtbl_ptr): Don't use the return value
19611 * typeck.c (check_return_expr): Don't magically convert return
19612 statements into `return this' in constructors under the new ABI.
19614 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
19615 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
19616 (base_ctor_identifier): New macro.
19617 (base_dtor_identifier): Likewise.
19618 (deleting_dtor_identifier): Likewise.
19619 * decl.c: Don't include obstack.h.
19620 (obstack_chunk_alloc): Don't define.
19621 (obstack_chunk_free): Likewise.
19622 (struct predefined_identifier): New type.
19623 (initialize_predefined_identifiers): New function.
19624 (init_decl_processing): Use it.
19625 (debug_temp_inits): Remove.
19626 (start_method): Don't call preserve_data.
19627 (hack_incomplete_structures): Update comment.
19628 * init.c (init_init_processing): Don't initialize
19630 (build_offset_rf): Remove dead code.
19631 (build_delete): Use CLASSTYPE_N_BASECLASSES.
19632 * search.c (init_search_processing): Don't initialize
19635 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19637 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
19638 some sign_compare warnings.
19640 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
19642 Rename abi::__vmi_class_type_info members.
19643 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
19644 base_list, detail_masks members to vmi_flags, vmi_base_count,
19645 vmi_bases and vmi_flags_masks respectively.
19646 (__vmi_class_type_info::vmi_flags_masks): Rename
19647 details_unknown_mask to flags_unknown_mask.
19648 * tinfo.cc (__class_type_info::do_upcast): Adjust.
19649 (__vmi_class_type_info::do_find_public_src): Adjust.
19650 (__vmi_class_type_info::do_dyncast): Adjust.
19651 (__vmi_class_type_info::do_upcast): Adjust.
19653 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
19655 * tinfo.cc (convert_to_base): New function.
19656 (get_vbase_offset): Remove. Move into convert_to_base.
19657 (__vmi_class_type_info::do_find_public_src): Adjust.
19658 (__vmi_class_type_info::do_dyncast): Adjust.
19659 (__vmi_class_type_info::do_upcast): Adjust.
19661 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
19663 * tinfo.cc (operator=): Use __builtin_strcmp.
19664 * tinfo2.cc (before): Likewise.
19666 2000-04-06 Mark Mitchell <mark@codesourcery.com>
19668 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
19669 (DECL_SAVED_INLINE): Rename to ...
19670 (DECL_DEFERRED_FN): ... this.
19671 (in_function_p): Remove declaration.
19672 (mark_inline_for_output): Rename to ...
19673 (defer_fn): ... this.
19674 * decl.c (finish_function): Adjust call to mark_inline_for_output.
19675 (in_function_p): Remove definition.
19676 * decl2.c (saved_inlines): Rename to ...
19677 (deferred_fns): ... this.
19678 (saved_inlines_used): Rename to ...
19679 (deferred_fns_used): ... this.
19680 (mark_inline_for_output): Rename to ...
19681 (defer_fn): ... this.
19682 (finish_file): Adjust accordingly.
19683 (init_decl2): Likewise.
19684 * lex.c (cons_up_default_function): Likewise.
19685 * pt.c (mark_decl_instantiated): Likewise.
19686 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
19688 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
19689 * semantics.c (expand_body): Defer more functions.
19691 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
19693 * vec.cc: New file.
19694 * Make-lang.in (CXX_LIB2FUNCS): Add it.
19696 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
19697 __cxa_vec_delete): Declare.
19699 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
19701 * rtti.c (dfs_class_hint_mark): New static function.
19702 (dfs_class_hint_unmark): New static function.
19703 (class_hint_flags): Use them.
19705 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
19707 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
19709 2000-04-05 Mark Mitchell <mark@codesourcery.com>
19711 * cp-tree.h (instantiate_decl): Change prototype.
19712 * decl2.c (mark_used): Adjust call.
19713 * optimize.c (inlinable_function_p): Adjust handling of templates.
19714 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
19715 (do_type_instantiation): Likewise.
19716 (instantiate_decl): Defer more templates.
19717 (instantiate_pending_templates): Adjust logic to handle inline
19720 * Makefile.in (GGC_H): New variable. Use it throughout in place
19723 * call.c: Don't include obstack.h. Include ggc.h.
19724 (obstack_chunk_alloc): Don't define.
19725 (obstack_chunk_free): Likewise.
19726 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
19727 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
19728 (pop_switch): Free it.
19730 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
19732 * dump.c (dequeue_and_dump): Don't try to print the bit_position
19733 if we don't have a DECL_FIELD_OFFSET.
19735 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
19737 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
19738 special_function_p.
19740 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19742 * cfns.gperf (hash, libc_name_p): Prototype.
19744 * rtti.c (build_dynamic_cast_1): Constification.
19746 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
19748 * semantics.c (deferred_type_access_control): Prototype.
19750 2000-04-04 Mark Mitchell <mark@codesourcery.com>
19752 Correct many new ABI issues regarding vbase and vcall offset
19754 * cp-tree.h (BINFO_VTABLE): Document.
19755 (struct lang_type): Tweak formatting.
19756 (BINFO_PRIMARY_BINFO): Add to documentation.
19757 (CLASSTYPE_VSIZE): Fix typo in comment.
19758 (CLASSTYPE_VBASECLASSES): Update documentation.
19759 (BINFO_VBASE_MARKED): Remove.
19760 (SET_BINFO_VBASE_MARKED): Likewise.
19761 (CLEAR_BINFO_VBASE_MARKED): Likewise.
19762 (BINFO_FIELDS_MARKED): Remove.
19763 (SET_BINFO_FIELDS_MARKED): Likewise.
19764 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
19765 (enum access_kind): New enumeration.
19766 (num_extra_vtbl_entries): Remove declaration.
19767 (size_extra_vtbl_entries): Likewise.
19768 (get_vtbl_decl_for_binfo): New function.
19769 (dfs_vbase_unmark): Remove declaration.
19770 (mark_primary_bases): Likewise.
19771 * class.c (SAME_FN): Remove.
19772 (struct vcall_offset_data_s): Move definition.
19773 (build_vbase_pointer): Use `build', not `build_binary_op', to
19774 access the vbase pointer under the new ABI.
19775 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
19776 (build_primary_vtable): Likewise.
19777 (dfs_mark_primary_bases): Move here from search.c.
19778 (mark_primary_bases): Likewise.
19779 (determine_primary_bases): Under the new ABI, don't make a base
19780 class a primary base just because we don't yet have any virtual
19782 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
19783 (num_vfun_entries): Remove.
19784 (dfs_count_virtuals): Likewise.
19785 (num_extra_vtbl_entries): Likewise.
19786 (size_extra_vtbl_entries): Likewise.
19787 (layout_virtual_bases): Iterate in inheritance graph order under
19789 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
19790 indicate that a vfield is present.
19791 (init_class_processing): Initialize access_public_node, etc., from
19793 (get_vtbl_decl_for_binfo): New function.
19794 (dump_class_hierarchy_r): Likewise.
19795 (dump_class_hierarchy): Use it.
19796 (finish_vtbls): Build the vtbls in inheritance graph order.
19797 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
19798 (initialize_vtable): Use get_vtbl_decl_for_binfo.
19799 (accumulate_vtbl_inits): Add comments explaining why a pre-order
19801 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
19802 where the vptr points, even for primary vtables.
19803 (build_vtbl_initializer): Adjust handling of vbase and vcall
19805 (build_vcall_and_vbase_vtable_entries): New function.
19806 (dfs_build_vbase_offset_vtbl_entries): Remove.
19807 (build_vbase_offset_vtbl_entries): Reimplement.
19808 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
19809 were already handled in a primary base class vtable.
19810 (build_vcall_offset_vtbl_entries): Adjust.
19811 (build_rtti_vtbl_entries): Adjust.
19812 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
19813 * init.c (expand_virtual_init): Simplify.
19814 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
19815 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
19816 * search.c (BINFO_ACCESS): New macro.
19817 (SET_BINFO_ACCESS): Likewise.
19818 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
19819 (access_in_type): Likewise.
19820 (dfs_accessible_p): Likewise.
19821 (protected_accessible_p): Likewise.
19822 (lookup_fnfields_1): Adjust documentation.
19823 (dfs_mark_primary_bases): Move to class.c
19824 (mark_primary_bases): Likewise.
19825 (dfs_vbase_unmark): Remove.
19826 (virtual_context): Use BINFO_FOR_VBASE.
19827 (dfs_get_vbase_types): Simplify.
19828 (dfs_build_inheritance_graph_order): New function.
19829 (get_vbase_types): Use it.
19830 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
19832 * tinfo.cc (get_vbase_offset): New function.
19833 (__vmi_class_type_info::do_find_public_src): Use it.
19834 (__vmi_class_type_info::do_dyncast): Likewise.
19835 (__vmi_class_type_info::do_upcast): Likewise.
19837 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
19839 * lang-specs.h: Pass -fno-show-column to the preprocessor.
19841 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
19843 * rtti.c (class_hint_flags): Rename flags.
19844 (class_initializer): Remove flags.
19845 (synthesize_tinfo_var): Combine offset and flags. Add flags
19846 for __vmi_class_type_info.
19847 (create_tinfo_types): Remove flags from __class_type_info and
19848 __si_class_type_info. Merge flags and offset from
19849 base_class_type_info.
19850 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
19851 (__base_class_info::is_virtual_p): Adjust.
19852 (__base_class_info::is_public_p): Adjust.
19853 (__base_class_info::offset): New accessor.
19854 (__class_type_info::details): Remove member.
19855 (__class_type_info::__class_type_info): Lose details.
19856 (__class_type_info::detail_masks): Remove.
19857 (__si_class_type_info::__si_class_type_info): Lose details.
19858 (__vmi_class_type_info::details): New member.
19859 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
19860 (__vmi_class_type_info::detail_masks): New member.
19861 * tinfo.cc (__class_type_info::do_upcast): Initialize result
19862 with unknown_details_mask.
19863 (__vmi_class_type_info::do_find_public_src): Adjust
19864 (__vmi_class_type_info::do_dyncast): Adjust.
19865 (__vmi_class_type_info::do_upcast): Set result details, if
19867 (__dynamic_cast): Temporarily #if out optimization.
19869 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
19871 * rtti.c (get_tinfo_decl): Mark used.
19872 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
19873 mark as dealt with, if we output it.
19875 2000-03-28 Mark Mitchell <mark@codesourcery.com>
19877 * class.c: Reorganize to put virtual function table initialization
19878 machinery at the end of the file.
19880 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
19882 * class.c (finish_struct): Use bitsize_zero_node.
19883 * pt.c (instantiate_class_template): Likewise.
19885 2000-03-28 Mark Mitchell <mark@codesourcery.com>
19887 Put RTTI entries at negative offsets in new ABI.
19888 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
19889 vbase offset at index -3, not -1.
19890 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
19891 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
19892 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
19893 (build_rtti_vtbl_entries): New function.
19894 (set_rtti_entry): Remove.
19895 (build_primary_vtable): Don't use it.
19896 (build_secondary_vtable): Likewise.
19897 (start_vtable): Remove.
19898 (first_vfun_index): New function.
19899 (set_vindex): Likewise.
19900 (add_virtual_function): Don't call start_vtable. Do call
19902 (set_primary_base): Rename parameter.
19903 (determine_primary_base): Likewise.
19904 (num_vfun_entries): Don't use skip_rtti_stuff.
19905 (num_extra_vtbl_entries): Include RTTI information.
19906 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
19907 (skip_rtti_stuff): Remove.
19908 (dfs_modify_vtables): Don't use it.
19909 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
19910 (layout_nonempty_base_or_field): Update size handling.
19911 (create_vtable_ptr): Tweak.
19912 (layout_class_type): Adjust parameter names.
19913 (finish_struct_1): Simplify.
19914 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
19915 (skip_rtti_stuff): Remove.
19916 (first_vfun_index): New function.
19917 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19918 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
19919 (marked_vtable_pathp): Declare.
19920 (unmarked_vtable_pathp): Likewise.
19921 * error.c (dump_expr): Use first_vfun_index to calculate vtable
19923 * rtti.c (build_headof): Look for RTTI at negative offsets.
19924 (get_tinfo_decl_dynamic): Likewise.
19925 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
19927 (create_pseudo_type_info): Do it here instead. Adjust so that
19928 vptr points at first virtual function.
19929 * search.c (marked_vtable_pathp): Make it global.
19930 (unmarked_vtable_pathp): Likewise.
19931 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19932 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
19933 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
19934 (get_pure_virtuals): Likewise.
19935 (expand_upcast_fixups): Likewise.
19936 * tree.c (debug_binfo): Likewise.
19937 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
19940 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19942 * class.c (check_field_decl): Fix typo.
19943 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
19944 (check_methods): Likewise.
19945 (check_field_decls): Likewise.
19946 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
19947 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
19948 Use DECL_RESULT_FLD, not DECL_RESULT.
19949 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
19950 * lex.c (identifier_type): Likewise.
19951 * pt.c (determine_specialization, lookup_template_class): Likewise.
19952 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
19953 (resolve_overloaded_unification, more_specialized): Likewise.
19954 * semantics.c (finish_member_declaration): Likewise.
19955 * typeck.c (build_x_function_call): Likewise.
19957 2000-03-26 Mark Mitchell <mark@codesourcery.com>
19959 * class.c (layout_empty_base): Handle empty bases with non-byte
19961 (build_base_field): Likewise.
19962 (layout_virtual_bases): Likewise.
19964 * class.c (finish_struct_1): Fix typo in this change:
19966 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19968 2000-03-25 Mark Mitchell <mark@codesourcery.com>
19970 * decl.c (grokdeclarator): Count partial specializations when
19971 keeping track of how many template classes have been seen.
19973 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
19975 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19977 * class.c (build_vbase_pointer_fields): layout_field now place_field.
19978 (get_vfield_offset): Use byte_position.
19979 (set_rtti_entry): Set OFFSET to ssizetype zero.
19980 (get_binfo_offset_as_int): Deleted.
19981 (dfs_record_base_offsets): Use tree_low_cst.
19982 (dfs_search_base_offsets): Likewise.
19983 (layout_nonempty_base_or_field): Reflect changes in RLI format
19984 and call byte_position.
19985 (layout_empty_base): Convert offset to ssizetype.
19986 (build_base_field): use rli_size_unit_so_far.
19987 (dfs_propagate_binfo_offsets): Do computation in proper type.
19988 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
19989 (layout_class_type): Reflect changes in RLI names and fields.
19990 (finish_struct_1): Set DECL_FIELD_OFFSET.
19991 * dump.c (dequeue_and_dump): Call bit_position.
19992 * expr.c (cplus_expand_constant): Use byte_position.
19993 * rtti.c (expand_class_desc): Use bitsize_one_node.
19994 * typeck.c (build_component_addr): Use byte_position and don't
19995 special case for zero offset.
19997 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
19999 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
20001 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
20003 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
20006 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
20008 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
20010 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
20011 make_typename_type, check_initializer, cp_finish_decl,
20012 xref_tag): Likewise.
20013 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
20014 decl_namespace, arg_assoc_template_arg, arg_assoc,
20015 validate_nonmember_using_decl, do_class_using_decl): Likewise.
20016 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
20017 args_to_string): Likewise.
20018 * friend.c (is_friend): Likewise.
20019 * lex.c (note_got_semicolon, note_list_got_semicolon,
20020 is_global): Likewise.
20021 * method.c (build_overload_nested_name, build_overload_value,
20022 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
20023 * parse.y (typename_sub, typename_sub1): Likewise.
20024 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
20025 process_partial_specialization, convert_template_argument,
20026 template_args_equal, add_pending_template, lookup_template_class,
20027 for_each_template_parm_r, maybe_fold_nontype_arg,
20028 tsubst, instantiate_template, type_unification_real, unify,
20029 instantiate_pending_templates, set_mangled_name_for_template_decl):
20031 * repo.c (repo_get_id, repo_template_used): Likewise.
20032 * search.c (lookup_field_1): Likewise.
20033 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
20034 * xref.c (classname): Likewise.
20036 2000-03-22 Mark Mitchell <mark@codesourcery.com>
20038 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
20039 (CANONICAL_BINFO): New macro.
20040 (BINFO_NEW_VTABLE_MARKED): Use it.
20041 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
20042 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
20043 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
20045 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20046 (build_secondary_vtable): Likewise.
20047 (dfs_finish_vtbls): Likewise.
20048 (dfs_accumulate_vtbl_inits): Likewise.
20049 (accumulate_vtbl_inits): New function.
20050 (finish_vtbls): Make sure that virtual bases come after
20051 non-virtual bases in the vtable group.
20052 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
20053 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20054 * search.c (struct vbase_info): Move definition.
20055 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20056 (unmarked_new_vtable_p): Likewise.
20057 (dfs_mark_vtable_path): Remove.
20058 (dfs_mark_new_vtable): Remove.
20059 (dfs_unmark_new_vtable): Likewise.
20060 (dfs_clear_search_slot): Likewise.
20061 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20062 (dfs_clear_vbase_slots): Likewise.
20063 (init_vbase_pointers): LIkewise.
20065 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
20067 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
20068 SIZETYPE to a non-SIZETYPE.
20070 2000-03-21 Mark Mitchell <mark@codesourcery.com>
20072 * class.c (layout_virtual_bases): Adjust names in conditionally
20075 * class.c (record_base_offsets): New function.
20076 (layout_conflict_p): Likewise.
20077 (layout_nonempty_base_or_field): Use it.
20078 (layout_empty_base): New function.
20079 (build_base_field): Use it.
20080 (build_base_fields): Update comment.
20081 (layout_virtual_bases): Fold in a little code form
20082 layout_basetypes. Use layout_empty_base.
20083 (layout_basetypes): Remove.
20084 (end_of_class): New function.
20085 (layout_class_type): Use it. Adjust.
20087 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
20088 (fntype_p): Remove.
20089 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
20091 (dfs_skip_nonprimary_vbases_markedp): Likewise.
20092 * typeck.c (fntype_p): Remove.
20094 * cp-tree.h (TI_SPEC_INFO): Remove.
20095 (CLASSTYPE_TI_SPEC_INFO): Likewise.
20096 * pt.c (process_partial_specialization): Likewise.
20098 * class.c (build_base_field): Fix thinko in computation of binfo
20101 * tree.c (mark_local_for_remap_p): Mark variables declared in
20102 TARGET_EXPRs as well.
20104 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
20106 * typeck.c (require_complete_type, complete_type,
20107 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
20108 build_array_ref, convert_arguments, pointer_diff,
20109 build_x_unary_op, build_unary_op, build_c_cast,
20110 build_modify_expr): Use COMPLETE_TYPE_P etc.
20111 * call.c (is_complete, convert_like_real,
20112 build_new_method_call): Likewise.
20113 * class.c (build_vbase_pointer_fields, check_bases,
20114 build_base_field, finish_struct_1, pushclass): Likewise.
20115 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
20116 * decl.c (maybe_process_template_type_declaration, pushtag,
20117 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
20118 layout_var_decl, check_initializer, cp_finish_decl,
20119 grokdeclarator, require_complete_types_for_parms,
20120 grok_op_properties, xref_tag, xref_basetypes,
20121 check_function_type): Likewise.
20122 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
20123 * friend.c (do_friend): Likewise.
20124 * init.c (build_offset_ref): Likewise.
20125 * parse.y (structsp): Likewise.
20126 * pt.c (maybe_process_partial_specialization,
20127 tsubst_friend_function, instantiate_class_template, tsubst,
20128 do_type_instantiation, instantiate_pending_templates): Likewise.
20129 * repo.c (repo_get_id): Likewise.
20130 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
20131 synthesize_tinfo_var, emit_support_tinfos): Likewise.
20132 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
20133 * semantics.c (begin_class_definition): Likewise.
20134 * tree.c (build_cplus_method_type): Likewise.
20135 * typeck2.c (digest_init, build_functional_cast,
20136 add_exception_specifier): Likewise.
20137 * parse.h, parse.c: Regenerated.
20139 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
20141 * inc/cxxabi.h: New header file. Define new-abi entry points.
20142 (__pointer_type_info::target): Rename member to ...
20143 (__pointer_type_info::type): ... here.
20144 (__base_class_info::type): Rename member to ...
20145 (__base_class_info::base): ... here.
20146 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
20147 * cp-tree.h (CPTI_ABI): New global tree enumeration.
20148 (abi_node): New global tree node.
20149 * decl.c (abi_node): Document.
20150 (init_decl_processing): Initialize abi_node.
20151 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
20152 (get_vmi_pseudo_type_info): Likewise.
20153 (create_tinfo_types): Likewise.
20154 (emit_support_tinfos): Likewise.
20155 * tinfo.h (cxxabi.h): Include for new-abi.
20156 Move rtti class definitions to new header file.
20157 * tinfo.cc (abi): Use the namespace.
20158 (std): Move new abi rtti classes from here ...
20159 (__cxxabiv1): ... to here.
20160 * tinfo2.cc (cxxabi.h): Include for new-abi.
20161 Move rtti class definitions to new header file.
20162 (std): Move new abi rtti classes from here ...
20163 (__cxxabiv1): ... to here.
20164 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
20167 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
20168 Jason Merrill <jason@casey.cygnus.com>
20170 * method.c (build_overload_int): Use host_integerp.
20172 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
20174 * init.c (build_offset_ref): Handle the case of a templated member
20177 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20179 * except.c (expand_exception_blocks): Clear catch_clauses_last.
20181 2000-03-18 Mark Mitchell <mark@codesourcery.com>
20183 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
20184 * class.c (check_bitfield_decl): Turn illegal bitfields into
20186 (dfs_propagate_binfo_offsets): Adjust for new size_binop
20188 (dfs_offset_for_unshared_vbases): Likewise.
20189 * cvt.c (cp_convert_to_pointer): Convert NULL to a
20190 pointer-to-member correctly under the new ABI.
20191 * expr.c (cplus_expand_constant): Don't use cp_convert when
20192 turning an offset into a pointer-to-member.
20193 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
20194 when dereferencing them under the new ABI.
20195 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
20196 of pointers-to-members under the new ABI.
20198 * class.c (check_bitfield_decl): Remove restriction on really long
20200 (layout_class_type): Implement new ABI handling of bitfields
20201 longer than their types.
20203 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20205 * parse.y (extdefs): Call ggc_collect.
20206 * parse.c: Regenerated.
20208 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
20210 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
20211 (note_name_declared_in_class): Use OVL_CURRENT to get at a
20212 potential overload.
20214 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20216 * class.c (build_vbase_path): Use integer_zerop.
20217 (build_vtable_entry): Use tree_low_cst.
20218 (get_vfield_offset): Use bit_position.
20219 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
20221 (check_bitfield_decl): Set DECL_SIZE using convert.
20222 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
20223 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
20225 (finish_struct_1): Use bit_position.
20226 (dump_class_hierarchy): Use tree_low_cst.
20227 * cp-tree.h (min_precision): Add declaration.
20228 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
20229 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
20230 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
20231 * expr.c (cplus_expand_constant): Use bit_position.
20232 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
20233 * rtti.c (get_base_offset): Use bit_position.
20234 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
20235 host_integerp, and tree_low_cst.
20236 (pointer_int_sum): Use integer_zerop.
20237 (build_component_addr): Use bit_position.
20239 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
20241 * typeck.c (require_complete_type): Don't assume size_zero_node.
20242 (complete_type_or_else): Likewise.
20244 2000-03-16 Steven Grady <grady@digitaldeck.com>
20245 Jason Merrill <jason@casey.cygnus.com>
20247 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
20249 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
20251 * decl2.c (grokfield): Bail out if type is error_mark_node.
20253 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
20255 * tinfo2.cc (__ptr_to_member_data): Rename to ...
20256 (__pointer_to_member_data): ... here. Adjust.
20257 * rtti.c (create_tinfo_types): Adjust.
20259 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
20261 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
20262 * decl.c (ref_desc_type_node): Undocument.
20263 * rtti.c (ptr_ref_initializer): Rename to ...
20264 (ptr_initializer): ... here. Adjust comments.
20265 (ptmd_initializer): Fix comment thinko.
20266 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
20267 (create_tinfo_types): Remove ref_desc_type_node init.
20268 * tinfo2.cc (__reference_type_info): Remove.
20270 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
20272 * decl.c (cp_finish_decl): Remove obsolete comment.
20274 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
20276 2000-03-14 Mark Mitchell <mark@codesourcery.com>
20278 * cp-tree.h: Tweak documentation.
20279 * class.c (build_vbase_pointer_fields): Layout the fields, too.
20280 (avoid_overlap): Remove.
20281 (get_binfo_offset_as_int): New function.
20282 (dfs_serach_base_offsets): Likewise.
20283 (layout_nonempty_base_or_field): Likewise.
20284 (build_base_field): Layout fields here. Avoid placing two objects
20285 of the same type at the same address, under the new ABI.
20286 (build_base_fields): Adjust accordingly.
20287 (create_vtable_ptr): Return the new field, but don't attach it to
20289 (remove_base_field): Remove.
20290 (remove_base_fields): Remove.
20291 (layout_basetypes): Adjust accordingly.
20292 (layout_class_type): Call layout_field for each field, rather than
20293 just making a wholesale call to layout_type.
20295 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
20297 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
20299 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
20301 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
20303 * except.c (dtor_nothrow): New fn.
20304 (do_pop_exception): Use it. Take type parm.
20305 (push_eh_cleanup): Take type parm.
20306 (expand_start_catch_block): Pass it.
20307 (build_eh_type_type_ref): Accept null type.
20309 2000-03-12 Mark Mitchell <mark@codesourcery.com>
20311 * cp-tree.h (revert_static_member_fn): Change prototype.
20312 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
20313 (grok_op_properties): Likewise.
20314 (start_function): Likewise.
20315 (revert_static_member_fn): Simplify.
20316 * pt.c (check_explicit_specialization): Adjust call to
20317 revert_static_member_fn.
20319 2000-03-11 Mark Mitchell <mark@codesourcery.com>
20321 * cp-tree.h (scope_kind): New type.
20322 (tmpl_spec_kind): Likewise.
20323 (declare_pseudo_global_level): Remove.
20324 (pseudo_global_level_p): Rename to template_parm_scope_p.
20325 (pushlevel): Remove declaration.
20326 (begin_scope): New function.
20327 (finish_scope): Likewise.
20328 (current_tmpl_spec_kind): Likewise.
20329 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
20330 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
20331 Add template_spec_p.
20332 (toplevel_bindings_p): Adjust.
20333 (declare_pseudo_global_level): Remove.
20334 (pseudo_global_level_p): Rename to template_parm_scope_p.
20335 (current_tmpl_spec_kind): New function.
20336 (begin_scope): Likewise.
20337 (finish_scope): Likewise.
20338 (maybe_push_to_top_level): Adjust.
20339 (maybe_process_template_type_declaration): Likewise.
20340 (pushtag): Likewise.
20341 (pushdecl_nonclass_level): Likewise.
20342 (lookup_tag): Likewise.
20343 (grokfndecl): Handle member template specializations. Share
20344 constructor and non-constructor code.
20345 * decl2.c (check_classfn): Handle member template specializations.
20346 * pt.c (begin_template_parm_list): Use begin_scope.
20347 (begin_specialization): Likewise.
20348 (end_specialization): Likewise.
20349 (check_explicit_specialization): Use current_tmpl_spec_kind.
20350 Handle member template specializations.
20351 (end_template_decl): Use finish_scope. Remove call to
20353 (push_template_decl_real): Remove bogus error message.
20354 (tsubst_decl): Fix typo in code contained in comment.
20355 (instantiate_template): Handle member template specializations.
20356 (most_general_template): Likewise.
20358 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
20360 * lex.c (whitespace_cr): Compress consecutive calls to warning().
20361 (do_identifier): Ditto for error().
20363 * pt.c (convert_nontype_argument): Ditto for cp_error().
20364 (convert_template_argument): Ditto for cp_pedwarn().
20366 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
20368 * exception.cc (__check_null_eh_spec): New fn.
20369 * except.c (expand_end_eh_spec): Call it if the spec is throw().
20371 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
20373 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
20374 * except.c (expand_end_eh_spec): Add the return type.
20375 * rtti.c (throw_bad_cast): Add the parmtypes.
20376 (throw_bad_typeid): Likewise.
20378 * semantics.c (expand_stmt): Only leave out rtl for unused
20379 artificials, and set DECL_IGNORED_P on them as well.
20380 * decl.c (wrapup_globals_for_namespace): Likewise.
20382 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
20384 * decl.c (maybe_commonize_var): Skip all artificial decls.
20385 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
20387 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
20389 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
20390 * cp-tree.h: Declare flag_enforce_eh_specs.
20391 * decl.c (store_parm_decls, finish_function): Check it.
20393 C library functions don't throw.
20394 * Makefile.in (cfns.h): New target.
20395 (except.o): Depend on it.
20396 * Make-lang.in (cc1plus): Depend on cfns.gperf.
20397 * cfns.gperf: New file.
20398 * cfns.h: Generated.
20399 * except.c: Include it.
20400 (nothrow_libfn_p): New fn.
20401 * decl.c (grokfndecl): Use it.
20402 * cp-tree.h: Declare it.
20404 * decl.c (push_overloaded_decl_1, auto_function,
20405 define_function): Lose.
20406 (build_library_fn_1): New static fn.
20407 (builtin_function): Use it.
20408 (get_atexit_node): Use build_library_fn_ptr.
20409 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
20410 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
20411 push_void_library_fn, push_throw_library_fn): New fns.
20412 * cp-tree.h: Declare them.
20413 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
20414 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
20415 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
20416 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
20417 * rtti.c (build_runtime_decl): Lose.
20418 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
20419 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
20420 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
20422 * call.c (build_call): Remove result_type parm.
20423 Call mark_used on unused artificial fns.
20424 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
20426 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
20428 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
20430 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
20431 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
20432 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
20433 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
20434 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
20435 expand_generic_desc): Likewise.
20437 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20439 * exception.cc (__cp_pop_exception): Cleanup the original object.
20441 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20443 * decl.c (grok_op_properties): Merge conversion to void warning
20444 with other silly op warnings.
20446 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
20448 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
20449 array CONSTRUCTOR elements. Don't use expr_tree_cons.
20451 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20453 * decl.c (cp_make_fname_decl): New function.
20454 (wrapup_globals_for_namespace): Don't emit unused static vars.
20455 (init_decl_processing): Remove comment about use of
20456 array_domain_type. Set make_fname_decl.
20457 (cp_finish_decl): Remove __FUNCTION__ nadgering.
20458 * semantics.c (begin_compound_stmt): Remove
20459 current_function_name_declared flagging.
20460 (expand_stmt): Don't emit unused local statics.
20461 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
20464 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20466 * typeck.c (convert_for_assignment): Don't look at array
20468 * call.c (convert_like_real): Likewise.
20470 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
20472 Add initial support for '\uNNNN' specifier.
20473 * lex.c (read_ucs): New fn.
20474 (readescape, skip_white_space): Call it.
20475 (is_extended_char, is_extended_char_1): New fns.
20476 (utf8_extend_token): New fn, #if 0'd out.
20477 (real_yylex): Treat extended chars like letters.
20479 * search.c (note_debug_info_needed): Walk the bases even if we
20480 weren't deferring the type itself.
20482 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20484 * decl2.c (finish_objects): Constify a char*.
20486 * method.c (emit_thunk): Likewise.
20488 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
20490 * typeck.c (dubious_conversion_warnings): Look through
20493 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20495 * class.c (dfs_modify_vtables): I is now unsigned.
20496 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
20497 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
20498 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
20499 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
20500 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
20501 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
20502 Call integer_all_onesp.
20503 * typeck2.c (process_init_constructor): Use compare_tree_int.
20505 * lang-specs.h (as): Don't call if -syntax-only.
20507 2000-03-06 Mark Mitchell <mark@codesourcery.com>
20509 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
20510 RTL_EXPR_HAS_NO_SCOPE after all.
20512 2000-03-05 Mark Mitchell <mark@codesourcery.com>
20514 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
20515 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
20516 RTL_EXPR_HAS_NO_SCOPE.
20518 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
20521 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
20523 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
20525 * call.c (convert_like): Macrofy.
20526 (convert_like_with_context): New macro.
20527 (convert_like_real): Renamed from convert_like. Add calling
20528 context parameters, for diagnostics. Add recursive flag. Call
20529 dubious_conversion_warnings for outer conversion.
20530 (build_user_type_conversion): Use convert_like_with_context.
20531 (build_over_call): Likewise. Don't warn about dubious
20532 conversions here. Adjust convert_default_arg calls.
20533 (convert_default_arg): Add context parameters for diagnostics.
20534 Pass through to convert_like_with_context.
20535 * cp-tree.h (convert_default_arg): Add context parameters.
20536 (dubious_conversion_warnings): Prototype new function.
20537 * typeck.c (convert_arguments): Adjust convert_default_arg call.
20538 (dubious_conversion_warnings): New function, broken
20539 out of convert_for_assignment.
20540 (convert_for_assignment): Adjust.
20542 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
20544 * decl2.c (key_method): Break out from...
20545 (import_export_vtable, import_export_class): ...here.
20547 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
20548 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
20550 * search.c (note_debug_info_needed, dfs_debug_mark,
20551 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
20552 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
20554 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
20556 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
20559 2000-03-02 Mark Mitchell <mark@codesourcery.com>
20561 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
20562 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
20563 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
20564 (lang_type): Split gets_new into has_new and has_array_new.
20565 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20566 (TYPE_GETS_NEW): Split into ...
20567 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
20568 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
20569 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
20570 (build_op_new_call): Don't declare.
20571 (build_new_1): Likewise.
20572 * call.c (build_op_new_call): Remove.
20573 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20574 instead of TYPE_NEEDS_DESTRUCTOR.
20575 (finish_struct_bits): Likewise.
20576 (add_implicitly_declared_members): Likewise.
20577 (check_field_decl): Likewise.
20578 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
20579 correctly under the new ABI.
20580 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20581 instead of TYPE_NEEDS_DESTRUCTOR.
20582 (initialize_local_var): Likewise.
20583 (destroy_local_var): Likewise.
20584 (cp_finish_decl): Likewise.
20585 (register_dtor_fn): Likewise.
20586 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
20587 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
20588 TYPE_VEC_DELETE_TAKES_SIZE here.
20589 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
20590 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
20591 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20592 (finish_destructor_body): Likewise.
20593 (maybe_build_cleanup_1): Likewise.
20594 * decl2.c (do_static_destruction): Likewise.
20595 * init.c (build_new_1): Make it static.
20596 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20597 (expand_cleanup_for_base): Likewise.
20598 (get_cookie_size): New function.
20599 (build_new_1): Handle array-new cookies correctly under the new
20601 (build_vec_delete_1): Likewise.
20602 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20603 (build_delete): Likewise.
20604 (build_vec_delete): Handle array-new cookies correctly under the new
20606 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20607 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
20608 TYPE_HAS_ARRAY_NEW_OPERATOR.
20609 * ptree.c (print_lang_type): Check them.
20610 * search.c (context_for_name_lookup): Fix typo in comment.
20611 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20612 * tree.c (break_out_cleanups): Likewise.
20613 (build_cplus_array_test_1): Likewise.
20614 (cp_build_qualified_type_real): Likewise.
20615 * typeck.c (complete_type): Likewise.
20617 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
20618 the command-line, not the end.
20620 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
20622 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
20624 2000-03-02 Tom Tromey <tromey@cygnus.com>
20626 * cp-tree.h (build_java_class_ref): Declare.
20627 * init.c (build_java_class_ref): No longer static.
20628 * except.c (expand_throw): Generate a Java-style `throw' if the
20629 thrown object is a "Java" object.
20630 (initialize_handler_parm): Generate a Java-style lookup of
20631 exception info if the caught object is a "Java" object.
20632 (catch_language, catch_language_init): New globals.
20633 (decl_is_java_type): New function.
20634 (expand_start_catch_block): Don't call push_eh_info() or
20635 push_eh_cleanup() when handling a Java-style "catch". Pass Java
20636 class reference to build_catch_block.
20638 2000-03-02 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20640 * typeck.c (comptypes): Treat sizetype like its language equivalent.
20642 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
20644 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
20645 to merge reference/pointer code and fix incorrect warnings.
20647 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
20649 * search.c (protected_accessible_p): Use context_for_name_lookup.
20651 * init.c (construct_virtual_bases): Fix thinko.
20652 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
20654 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
20656 * decl.c (current_function_decl): Move to toplev.c.
20658 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
20660 * pt.c (fn_type_unification): Unify return type, whenever
20662 (get_bindings_real): Only pass return type when necessary.
20663 Remove explicit return type check.
20664 * class.c (resolve_address_of_overloaded_function): Pass desired
20665 return type to fn_type_unification.
20667 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20669 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
20671 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
20673 * rtti.c (expand_class_desc): Likewise.
20674 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
20675 (THUNK_VCALL_OFFSET): Likewise.
20676 (THUNK_DELTA): Reflect changes in ../tree.h.
20678 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
20680 * search.c (protected_accessible_p): Also allow the access if
20681 the member is public in DERIVED. Lose TYPE parm.
20682 (friend_accessible_p): Lose TYPE parm.
20683 (accessible_p): Adjust.
20685 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20687 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
20688 on things that are not sizes; ssize_binop deleted.
20689 Call size_diffop when appropriate.
20690 (dfs_build_vcall_offset_vtbl_entries): Likewise.
20691 (build_primary_vtable, build_secondary_vtable): Likewise.
20692 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
20693 Variable I is HOST_WIDE_INT.
20694 (get_vfield_offset): Pass proper types to size_binop.
20695 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
20696 (finish_struct_1): Likewise.
20697 (skip_rtti_stuff): Arg N is now pointer to signed.
20698 (layout_class_type): Use size_zero_node.
20699 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
20700 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
20701 * decl.c (complete_arry_type): Pass proper types to size_binop.
20702 (xref_basetypes): BINFO_OFFSET is sizetype.
20703 * error.c (dump_expr): Don't use size_binop non-sizes.
20704 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
20705 * init.c (construct_virtual_bases): Fix type error.
20706 (build_vec_delete_1): Pass proper type to size_binop and don't
20708 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
20709 * rtti.c (get_base_offset): Pass proper type to size_binop.
20710 * search.c (dfs_find_vbases): Fix type error.
20711 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
20712 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
20713 * tree.c (debug_binfo): Variable N is signed.
20714 Use HOST_WIDE_INT_PRINT_DEC.
20715 * typeck.c (comptypes): sizetype is same as equivalent integer type.
20716 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
20717 size_one_node and size_zero_node.
20718 (c_alignof): Use size_one_node.
20719 (build_component_addr): Pass proper types to size_binop.
20720 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
20722 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
20724 Implement class scope using-declarations for functions.
20725 * class.c (handle_using_decl): Call add_method for used functions.
20726 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
20727 (add_method): Used functions are hidden by local functions.
20728 (check_bases_and_members): Handle using-decls before finalizing
20729 CLASSTYPE_METHOD_VEC.
20730 * call.c (add_function_candidate): Add ctype parm; if nonzero,
20731 override the type of 'this' accordingly.
20732 (add_template_candidate, add_template_candidate_real): Add ctype parm.
20733 (convert_class_to_reference, build_user_type_conversion_1,
20734 build_new_function_call, build_object_call, build_new_op,
20735 build_new_method_call): Pass ctype parm.
20737 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
20739 * call.c (convert_class_to_reference, build_user_type_conversion_1,
20740 build_new_function_call, build_object_call, build_new_op,
20741 build_new_method_call, build_op_delete_call): Don't get basetype_path
20743 * typeck.c (build_component_ref): Likewise.
20744 * init.c (build_offset_ref): Likewise.
20745 (resolve_offset_ref): Don't call enforce_access.
20746 Call build_scoped_ref.
20747 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
20748 would cause an error or if -pedantic.
20749 * class.c (alter_access): Lose binfo parm.
20751 2000-02-26 Mark Mitchell <mark@codesourcery.com>
20753 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
20756 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
20758 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
20759 pseudo_type_info creation into the std namespace
20761 2000-02-26 Mark Mitchell <mark@codesourcery.com>
20763 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
20764 (import_export_class): Remove declaration.
20765 * decl2.c (import_export_class): Make it static.
20766 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
20767 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
20768 EXPR_WITH_FILE_LOCATION.
20769 * lex.c (check_newline): Tweak filename/lineno setting.
20770 * semantics.c (begin_while_stmt): Fix typo in comment.
20772 2000-02-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20774 * lang-options.h (-fmessage-length=): Add missing option.
20776 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
20778 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
20780 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
20782 2000-02-25 Jim Wilson <wilson@cygnus.com>
20784 * optimize.c (expand_call_inline): Emit the return label before
20785 evaluating the return value.
20787 2000-02-24 Mark Mitchell <mark@codesourcery.com>
20789 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
20790 than duplicating functionality here.
20791 * optimize.c: Include input.h.
20792 (expand_call_inline): Use push_srcloc and pop_srcloc.
20793 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
20794 * parse.c: Regenerated.
20795 * Makefile.in (lex.o): Depend on input.h.
20796 (optimize.o): Likewise.
20798 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
20800 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
20801 function type, rather than ICE.
20803 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
20805 * decl.c (grokdeclarator): Call decl_type_access_control.
20806 * parse.y (parse_end_decl): Don't call decl_type_access_control if
20809 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
20811 * decl.c (decls_match): Remove obsolete static member nadgering.
20813 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20815 * decl.c (grokdeclarator): Change ANSI to ISO.
20816 * lex.c (consume_string, readescape, do_identifier): Likewise.
20817 (parse_float, real_yylex): Likewise.
20818 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
20819 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
20820 new_type_id, maybe_label_decls, simple_stmt,
20821 for.init.statement): Likewise.
20822 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
20823 * semantics.c (finish_named_return_value): Likewise.
20824 * parse.c: Regenerate.
20826 2000-02-21 Mark Mitchell <mark@codesourcery.com>
20828 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
20829 (CPTI_CLASS_STAR_TYPE): Remove.
20830 (vtable_index_type): Likewise.
20831 (class_star_type_node): Remove.
20832 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
20833 (build_binary_op_nodefault): Remove.
20834 * call.c (build_new_op): Use build_binary_op instead of
20835 build_binary_op_nodefault.
20836 * decl.c (init_decl_processing): Remove class_star_type_node
20837 initialization. Make delta_type_node ptrdiff_type_node under the
20838 new ABI. Initialize vtable_index_type.
20839 (build_ptrmemfunc_type): Build different structures for the new
20841 (build_enumerator): Use build_binary_op instead of
20842 build_binary_op_nodefault.
20843 * method.c (build_overload_value): Mangle pointers-to-members
20844 appropriately under the new ABI.
20845 * typeck.c (build_array_ref): Use build_binary_op instead of
20846 build_binary_op_nodefault.
20847 (get_member_function_from_ptrfunc): Adjust for the new ABI.
20848 (build_binary_op_nodefault): Rename to ...
20849 (build_binary_op): ... this. Remove old version. Adjust for
20850 pointer-to-member comparisons under the new ABI.
20851 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
20852 (build_ptrmemfunc): Adjust for the new ABI.
20853 (expand_ptrmemfunc_cst): Likewise.
20854 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
20855 (pfn_from_ptrmemfunc): Adjust for the new ABI.
20857 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
20859 * call.c (build_object_call): Compress consecutive calls to
20861 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
20862 (build_op_delete_call): Adjust message formatting.
20864 * class.c (check_bases): Compress consecutive calls to
20866 (finish_struct_anon): Say 'ISO C++'.
20868 * decl.c (start_decl): Same here.
20869 (grok_reference_init): Likewise.
20870 (grokfndecl): Correct message formatting.
20871 (grokfndecl): Improve diagnostic.
20872 (check_static_variable_definition): Likewise. Say 'ISO C++'
20873 (compute_array_index_type): Say 'ISO C++'
20874 (create_array_type_for_decl): Compress consecutive calls to
20876 (grokdeclarator): Say 'ISO C++'
20877 (grok_op_properties): Likewise.
20879 * decl2.c (delete_sanity): Clairify diagnostic.
20880 (check_member_template): Same here.
20881 (grok_function_init): Use consistent terminology.
20883 * expr.c (do_case): Say 'ISO C++'
20885 * friend.c (do_friend): Compress consecutive calls to warning.
20887 2000-02-20 Mark Mitchell <mark@codesourcery.com>
20889 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
20890 * class.c (build_secondary_vtable): Reorganize. Don't create a
20891 new vtable under the new ABI.
20892 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
20893 computing the size.
20894 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
20895 the initializing elements.
20896 (initialize_vtable): New function.
20897 (dfs_finish_vtbls): Use it.
20898 (dfs_accumulate_vtbl_inits): New function.
20899 (finish_vtbls): Merge primary and secondary vtables under the new
20901 (finish_struct_1): Remove redundant call to layout_vtable_decl.
20902 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
20905 * class.c (build_vtable): New function, split out from ...
20906 (get_vtable_decl): ... here, and ...
20907 (build_secondary_vtable): ... here.
20909 * pt.c (tsubst_decl): Fix formatting.
20911 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20913 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
20914 (avoid_overlap, build_base_field): Likewise.
20915 (build_base_field, build_base_fields, is_empty_class):
20916 Test DECL_SIZE with integer_zero.
20917 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
20918 * cp-tree.h (struct lang_type): New field size_unit.
20919 (CLASSTYPE_SIZE_UNIT): New macro.
20920 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
20921 (cp_finish_decl): Delete -Wlarger-than processing.
20922 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
20923 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
20924 * tree.c (make_binfo): binfo vector is one entry longer.
20925 (walk_tree): Walk DECL_SIZE_UNIT.
20927 2000-02-19 Mark Mitchell <mark@codesourcery.com>
20929 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
20931 (build_vtable_entry): Don't assume all vtable entries are
20933 (build_vtbl_initializer): Adjust accordingly.
20934 (get_vtable_decl): Fix formatting.
20936 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
20938 * semantics.c (deferred_type_access_control): Walk the entire
20940 (save_type_access_control): Rename from
20941 initial_deferred_type_access_control. Just remember the value.
20942 (decl_type_access_control): New fn.
20943 (begin_function_definition): Use deferred_type_access_control, after
20944 we've started the function. Set type_lookups to error_mark_node.
20945 * parse.y (frob_specs, fn.def1): Adjust.
20946 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
20947 (parse_end_decl, parse_bitfield0, parse_method): New fns.
20948 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
20949 (after_type_component_declarator0): Likewise.
20950 (after_type_component_declarator): Likewise.
20951 (notype_component_declarator): Likewise.
20952 * cp-tree.h: Adjust.
20954 * decl.c (redeclaration_error_message): Allow redeclaration of
20955 namespace-scope decls.
20957 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
20959 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
20961 2000-02-17 Mark Mitchell <mark@codesourcery.com>
20963 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
20964 * decl2.c (grokclassfn): Likewise.
20966 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
20968 * decl2.c (lang_decode_option): Don't set default message length
20970 * lex.c (lang_init_options): Set it here.
20972 2000-02-16 Mark Mitchell <mark@codesourcery.com>
20974 Make DECL_CONTEXT mean the class in which a member function was
20975 declared, even for a virtual function.
20976 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
20977 (DECL_FRIEND_CONTEXT): New macro.
20978 (DECL_REAL_CONTEXT): Remove.
20979 (SET_DECL_FRIEND_CONTEXT): Likewise.
20980 (DECL_VIRTUAL_CONTEXT): Adjust.
20981 (DECL_CLASS_SCOPE_P): Use TYPE_P.
20982 (add_friends): Remove.
20983 (hack_decl_function_context): Likewise.
20984 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
20986 (build_over_call): Fix indentation. Use DECL_CONTEXT
20987 instead of DECL_CLASS_CONTEXT.
20988 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
20989 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
20990 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20991 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
20992 (build_base_field): Likewise.
20993 (finish_struct_1): Likewise.
20994 (build_self_reference): Likewise.
20995 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
20997 (pushtag): Use decl_function_context, not
20998 hack_decl_function_context.
20999 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21000 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
21001 (pushdecl): Remove bogus code.
21002 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
21003 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21004 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21005 Use decl_function_context, nothack_decl_function_context.
21006 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
21007 (grokdeclarator): Likewise. Use decl_function_context, not
21008 hack_decl_function_context.
21009 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
21010 (start_function): Use DECL_FRIEND_CONTEXT, not
21011 DECL_CLASS_CONTEXT. Use decl_function_context, not
21012 hack_decl_function_context.
21013 (finish_function): Use decl_function_context, not
21014 hack_decl_function_context.
21015 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
21016 DECL_CLASS_CONTEXT.
21017 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
21018 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
21019 (grokfield): Likewise.
21020 (finish_builtin_type): Likewise.
21021 (finish_vtable_vardec): Use decl_function_context, not
21022 hack_decl_function_context.
21023 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21024 (start_static_initialization_or_destruction): Likewise.
21025 (finish_static_initialization_or_destruction): Likewise.
21026 (mark_used): Adjust logic for deciding when to synthesize methods.
21027 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
21029 * error.c (dump_function_decl): Use DECL_CONTEXT, not
21030 DECL_CLASS_CONTEXT.
21031 * friend.c (is_friend): Likewise.
21032 (add_friends): Remove.
21033 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
21034 * lex.c (begin_definition_of_inclass_inline): Use
21035 decl_function_context, not hack_decl_function_context.
21036 (process_next_inline): Likewise.
21037 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21038 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
21039 DECL_CLASSS_CONTEXT.
21040 (hack_identifier): Likewise.
21041 (synthesize_method): Use decl_function_context, not
21042 hack_decl_function_context.
21043 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
21045 (is_member_template): Use decl_function_context, not
21046 hack_decl_function_context. Use DECL_CONTEXT, not
21047 DECL_CLASS_CONTEXT.
21048 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
21049 DECL_CLASS_CONTEXT.
21050 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
21052 (push_template_decl_real): Likewise.
21053 (instantiate_class_template): Don't call add_friends.
21054 (tsubst_default_argument): Use DECL_CONTEXT, not
21056 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
21057 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21058 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
21059 DECL_CLASS_CONTEXT.
21060 * repo.c (repo_inline_used): Likewise.
21061 * search.c (current_scope): Adjust for new _CONTEXT macros.
21062 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
21064 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21065 (lookup_fnfields_here):Likewise.
21066 (check_final_overrider): Likewise.
21067 (init_vbase_pointers): Likewise.
21068 (virtual_context): Likewise.
21069 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
21070 (expand_body): Use decl_function_context, not
21071 hack_decl_function_context.
21072 * tree.c (hack_decl_function_context): Remove.
21073 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
21074 DECL_CLASS_CONTEXT.
21075 * typeck2.c (error_not_base_type): Likewise.
21077 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
21079 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
21081 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21083 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
21085 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
21087 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
21089 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
21091 * decl2.c (lang_decode_option): Enable automatic line wrapping.
21093 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
21095 * parse.y (frob_specs): Split out...
21096 (parse_decl): From here.
21097 (fn.def2): Call initial_deferred_type_access_control.
21098 (after_type_component_declarator0): Call frob_specs.
21099 (notype_component_declarator0): Likewise.
21100 * search.c (friend_accessible_p): Nested classes are friends of their
21103 2000-02-10 Mark Mitchell <mark@codesourcery.com>
21105 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
21106 used to create an implicit temporary.
21108 * class.c (dfs_modify_vtables): Tweak calculation of functions to
21111 2000-02-08 Nathan Sidwell <nathan@acm.org>
21113 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
21114 strip array element qualifiers too.
21116 2000-02-07 Mark Mitchell <mark@codesourcery.com>
21118 * decl.c (store_parm_decls): Don't build cleanups for parameters
21119 while processing_template_decl.
21121 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
21123 * cp-tree.h (struct saved_scope): Add incomplete field.
21124 (namespace_scope_incomplete): New macro.
21125 * decl.c (pushdecl): Use it.
21126 (hack_incomplete_structures): Use it. See through artificial
21128 (mark_saved_scope): Mark it.
21130 Implement access control for nested types.
21131 * search.c (type_access_control): New fn.
21132 (accessible_p): Now we do perform access control for types.
21133 * semantics.c (deferred_type_access_control): New fn.
21134 (initial_deferred_type_access_control): New fn.
21135 (begin_function_definition): Call it. Add lookups parm.
21136 * decl.c (struct binding_level): Add this_class field.
21137 (pushlevel_class): Set it.
21138 (mark_binding_level): Mark it.
21139 (lookup_name_real): Use it. Call type_access_control.
21140 (mark_saved_scope): Mark lookups field.
21141 * cp-tree.h (flagged_type_tree): Add lookups field.
21142 (struct saved_scope): Add lookups field.
21143 (type_lookups): New macro.
21144 * parse.y (declmods): Now <ftype>.
21145 (parse_decl): Add lookups parm. Call
21146 initial_deferred_type_access_control.
21147 (lang_extdef): Clear type_lookups.
21148 (typed_declspecs, declmods, typespec): Set lookups field.
21149 (initdcl): Call deferred_type_access_control.
21150 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
21151 component_decl_1, named_parm): Adjust.
21152 * friend.c (is_friend): Nested classes are friends of their
21155 * class.c (currently_open_derived_class): New fn.
21156 * method.c (hack_identifier): Use it.
21158 * lex.c (do_identifier): Remove obsolete code.
21160 * parse.y (typed_typespecs): Propagate new_type_flag properly.
21162 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
21164 * tinfo.h: Remove apostrophes from C++ comment (xgettext
21165 thinks this file is plain C).
21167 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21169 * Makefile.in (call.o): Depend on $(EXPR_H).
21171 * call.c: Include "expr.h".
21173 * class.c (dump_class_hierarchy): Add prototype.
21175 * search.c (dfs_get_pure_virtuals): Likewise.
21177 2000-02-1 Ulrich Drepper <drepper@redhat.com>
21179 * parse.y (simple_stmt): Allow :: token in asm parameter list.
21180 * parse.c: Rebuilt.
21182 2000-01-31 Jim Wilson <wilson@cygnus.com>
21184 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
21185 Store it in DECL_FCONTEXT.
21186 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
21188 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
21190 * tinfo.h (old abi): #include "tconfig.h".
21191 * tinfo.cc (convert_to_base): Move into old abi section.
21193 2000-01-31 Mark Mitchell <mark@codesourcery.com>
21195 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
21196 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
21197 (BINFO_PRIMARY_BINFO): New macro.
21198 (BF_DELTA): Rename to ...
21199 (BV_DELTA): ... this.
21200 (BF_VCALL_INDEX): Rename to ...
21201 (BV_VCALL_INDEX): ... this.
21202 (BF_FN): Rename to ...
21204 * class.c (build_vbase_path): Adjust for changes to reverse_path.
21205 (set_rtti_entry): Rename BF_ macros to BV_ variants.
21206 (modify_vtable_entry): Simplify.
21207 (add_virtual_function): Rename BF_ macros to BV_ variants.
21208 (build_vtable_initializer): Likewise.
21209 (get_class_offset_1): Remove.
21210 (dfs_get_class_offset): Likewise.
21211 (get_class_offset): Likewise.
21212 (dfs_find_final_overrider): New function.
21213 (find_final_overrider): Likewise.
21214 (modify_one_vtable): Remove.
21215 (dfs_find_base): New function.
21216 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
21217 find_final_overrider.
21218 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
21220 (dfs_fixup_vtable_deltas): Remove.
21221 (override_one_vtable): Remove.
21222 (merge_overrides): Likewise.
21223 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
21224 unreal chilren of virtual bases.
21225 (finish_struct_1): Don't use merge_overrides. Don't use
21226 dfs_fixup_vtable_deltas.
21227 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
21230 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
21231 Jason Merrill <jason@yorick.cygnus.com>
21233 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
21235 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
21237 * exception.cc (__throw_bad_typeid): Add missing std::.
21239 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21241 * cp-tree.h (make_thunk): PROTO -> PARAMS.
21243 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
21245 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
21247 Runtime support for new-abi rtti.
21248 * inc/typeinfo (type_info::operator!=): Define in class.
21249 (type_info::before, type_info::name, type_info::operator==,
21250 type_info::operator!=): Define new ABI implementations.
21251 (type_info::is_pointer_p, type_info::is_function_p): Declare
21252 new virtual functions.
21253 (type_info::do_catch, type_info::do_upcast): Likewise.
21255 * tinfo.h (__base_class_info): Define new class.
21256 (__class_type_info): Likewise.
21257 (__si_class_type_info): Likewise.
21258 (__vmi_class_type_info): Likewise.
21259 (__dynamic_cast): Prototype.
21261 * tinfo.cc: Conditionalize old and new rtti mechanisms.
21262 (type_info::is_pointer_p): Define new function.
21263 (type_info::is_function_p): Likewise.
21264 (type_info::do_catch): Likewise.
21265 (type_info::do_upcast): Likewise.
21266 (vtable_prefix): New structure for vtable access.
21267 (adjust_pointer): Define new template function.
21268 (contained_p, public_p, virtual_p, contained_public_p,
21269 contained_nonpublic_p, contained_nonvirtual_p): Define new
21271 (nonvirtual_base_type): New local variable.
21272 (__class_type_info::~__class_type_info): Define.
21273 (__si_class_type_info::~__si_class_type_info): Likewise.
21274 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
21275 (__class_type_info::do_catch): Define new function.
21276 (__class_type_info::do_upcast): Likewise.
21277 (__class_type_info::find_public_src): Likewise.
21278 (__class_type_info::do_find_public_src): Likewise.
21279 (__si_class_type_info::do_find_public_src): Likewise.
21280 (__vmi_class_type_info::do_find_public_src): Likewise.
21281 (__class_type_info::do_dyncast): Likewise.
21282 (__si_class_type_info::do_dyncast): Likewise.
21283 (__vmi_class_type_info::do_dyncast): Likewise.
21284 (__class_type_info::do_upcast): Likewise.
21285 (__si_class_type_info::do_upcast): Likewise.
21286 (__vmi_class_type_info::do_upcast): Likewise.
21287 (__dynamic_cast): Likewise.
21289 * tinfo2.cc (__fundamental_type_info): Define new class.
21290 (__pointer_type_info): Likewise.
21291 (__reference_type_info): Likewise.
21292 (__array_type_info): Likewise.
21293 (__function_type_info): Likewise.
21294 (__enum_type_info): Likewise.
21295 (__ptr_to_member_type_info): Likewise.
21296 (__fundamental_type_info::~__fundamental_type_info): Define.
21297 (__pointer_type_info::~__pointer_type_info): Likewise.
21298 (__reference_type_info::~__reference_type_info): Likewise.
21299 (__array_type_info::~__array_type_info): Likewise.
21300 (__function_type_info::~__function_type_info): Likewise.
21301 (__enum_type_info::~__enum_type_info): Likewise.
21302 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
21303 (__pointer_type_info::do_catch): Define new function.
21304 (__ptr_to_member_type_info::do_catch): Define new function.
21306 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
21307 (__is_pointer): Likewise.
21309 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
21311 2000-01-30 Mark Mitchell <mark@codesourcery.com>
21313 * cp/class.c (build_vtable): Rename to build_primary_vtable.
21314 (prepare_fresh_vtable): Rename to build_secondary_vtable.
21315 (make_new_vtable): New function.
21316 (modify_vtable_entry): Handle generation of new vtables correctly.
21317 (modify_one_vtable): Remove unused parameter.
21318 (dfs_fixup_vtable_deltas): Likewise.
21319 (override_one_vtable): Use build_secondary_vtable.
21320 (finish_struct_1): Use build_primary_vtable and
21321 build_secondary_vtable.
21323 2000-01-28 Ulrich Drepper <drepper@redhat.com>
21325 * cp/decl.c: Adjust variable names, comments, help strings.
21327 2000-01-29 Nathan Sidwell <nathan@acm.org>
21329 * new2.cc (operator delete[]): Use operator delete, don't assume
21332 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
21334 * class.c (build_vtbl_initializer): Add argument to
21335 build_vtable_entry call.
21337 2000-01-27 Mark Mitchell <mark@codesourcery.com>
21339 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
21340 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
21341 (BF_DELTA): New macro.
21342 (BF_VCALL_INDEX): Likewise.
21344 (THUNK_VCALL_OFFSET): Likewise.
21345 (make_thunk): Change prototype.
21346 * class.c (build_vtable_entry): Integrate
21347 build_vtable_entry_for_fn. Handle vcall indices.
21348 (build_vtable_entry_for_fn): Remove.
21349 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
21350 BF_VCALL_INDEX, BF_FN.
21351 (modify_vtable_entry): Integrate common code from
21352 modify_one_vtable and dfs_fixup_vtable_deltas.
21353 (add_virtual_function): Set BF_VCALL_INDEX.
21354 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
21356 (modify_one_vtable): Simplify.
21357 (dfs_fixup_vtable_deltas): Likewise.
21358 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
21359 * method.c (make_thunk): Handle vcall indices.
21361 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
21363 Compiler side new abi rtti (not enabled).
21364 * cp-tree.h (new_abi_rtti_p): New macro.
21365 (emit_support_tinfos): Prototype new function.
21366 (tinfo_decl_p): Likewise.
21367 (emit_tinfo_decl): Likwise.
21368 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
21370 (doing_runtime): New local static.
21371 (init_rtti_processing): Add new-abi initializer.
21372 (get_tinfo_decl): Add new-abi logic.
21373 (tinfo_from_decl): Likewise.
21374 (build_dynamic_cast_1): Likewise.
21375 (qualifier_flags): New static function.
21376 (tinfo_base_init): Likewise.
21377 (generic_initializer): Likewise.
21378 (ptr_ref_initializer): Likewise.
21379 (ptmd_initializer): Likewise.
21380 (class_hint_flags): Likewise.
21381 (class_initializer): Likewise.
21382 (synthesize_tinfo_var): Likewise.
21383 (create_real_tinfo_var): Likewise.
21384 (create_pseudo_type_info): Likewise.
21385 (get_vmi_pseudo_type_info): Likewise.
21386 (create_tinfo_types): Likewise.
21387 (emit_support_tinfos): New global function.
21388 (tinfo_decl_p): New global predicate.
21389 (emit_tinfo_decl): New global function.
21390 * class.c (set_rtti_entry): Generalize for old and new rtti.
21391 (build_vtbl_initializer): Likewise.
21392 * decl2.c (finish_file): Likewise.
21394 2000-01-27 Jim Wilson <wilson@cygnus.com>
21396 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
21397 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
21399 2000-01-27 Mike Stump <mrs@wrs.com>
21401 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
21404 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
21406 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
21408 2000-01-26 J"orn Rennecke <amylaar@cygnus.co.uk>
21410 * optimize.c (calls_setjmp_r): Supply new argument
21411 to special_function_p.
21413 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21415 * call.c: PROTO -> PARAMS.
21416 * class.c: Likewise.
21417 * cp-tree.h: Likewise.
21419 * decl.c: Likewise.
21420 * decl.h: Likewise.
21421 * decl2.c: Likewise.
21422 * dump.c: Likewise.
21423 * errfn.c: Likewise.
21424 * error.c: Likewise.
21425 * except.c: Likewise.
21426 * expr.c: Likewise.
21427 * init.c: Likewise.
21428 * input.c: Likewise.
21431 * method.c: Likewise.
21432 * optimize.c: Likewise.
21433 * parse.y: Likewise.
21435 * repo.c: Likewise.
21436 * rtti.c: Likewise.
21437 * search.c: Likewise.
21438 * semantics.c: Likewise.
21439 * spew.c: Likewise.
21440 * tree.c: Likewise.
21441 * typeck.c: Likewise.
21442 * typeck2.c: Likewise.
21443 * xref.c: Likewise.
21445 2000-01-25 Richard Henderson <rth@cygnus.com>
21447 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
21449 2000-01-25 Mark Mitchell <mark@codesourcery.com>
21451 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
21452 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
21453 (struct vcall_offset_data_s): New type.
21454 (dfs_vcall_offset_queue_p): New function.
21455 (dfs_build_vcall_offset_vtbl_entries): Likewise.
21456 (build_vcall_offset_vtbl_entries): Likewise.
21457 (layout_vtable_decl): Likewise.
21458 (num_vfun_entries): Likewise.
21459 (num_extra_vtbl_entries): Add the entries for vcall offsets.
21460 (build_vtbl_initializer): Likewise.
21461 (dfs_finish_vtabls): Use layout_vtable_decl.
21462 (modify_one_vtables): Always duplicate vtables under the new ABI.
21463 (finish_struct_1): Use layout_vtable_decl.
21465 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21467 * decl.c (member_function_or_else): Change third arg from a format
21468 specifier to an `enum overload_flags'. Callers changed.
21470 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
21472 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
21473 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
21474 build_const_cast, get_delta_difference, check_return_expr): Avoid
21475 ANSI string concatenation usage.
21477 2000-01-24 Mark Mitchell <mark@codesourcery.com>
21479 * class.c (layout_class_type): Put the fields required to make a
21480 class non-empty at the end, not the beginning, of the TYPE_FIELDs
21483 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
21485 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
21488 * decl2.c (mark_used): Do instantiate inlines that have been
21489 explicitly instantiated.
21491 2000-01-24 Richard Henderson <rth@cygnus.com>
21493 * call.c (build_over_call): Use expand_tree_builtin.
21494 * typeck.c (build_function_call_real): Likewise.
21495 (build_binary_op_nodefault): Handle unordered compares.
21497 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
21499 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
21500 cp_tree_index values.
21501 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
21502 New global node #defines for them.
21503 * rtti.c (call_void_fn): Replace with ...
21504 (build_runtime_decl): ... new static function.
21505 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
21506 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
21507 (build_dynamic_cast_1): Always produce correctly typed result.
21508 Explicitly produce type_info addresses. Use dynamic_cast_node.
21509 * exception.cc (__throw_bad_cast): Return `void *'.
21510 (__throw_bad_typeid): Return `const type_info &'.
21512 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
21514 * cp-tree.h (get_vtable_decl): Prototype new function.
21515 * class.c (get_vtable_decl): New function. Broken out from ...
21516 (build_vtable): ... here. Use it.
21517 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
21518 by get_vtable_decl.
21520 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
21522 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
21523 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
21524 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
21525 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
21526 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
21527 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
21528 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
21529 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
21530 (CPTI_TINFO_VAR_ID): New enumeration.
21531 (__tp_desc_type_node, __access_mode_type_node,
21532 __bltn_desc_type_node, __user_desc_type_node,
21533 __class_desc_type_node, __ptr_desc_type_node,
21534 __attr_desc_type_node, __func_desc_type_node,
21535 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
21536 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
21537 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
21538 enum_desc_type_node, class_desc_type_node,
21539 si_class_desc_type_node, vmi_class_desc_type_node,
21540 ptmd_desc_type_node, base_desc_type_node): New #defines.
21541 (tinfo_fn_id, tinfo_fn_type): Rename to ...
21542 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
21543 (tinfo_var_id): New enumeration.
21544 (DECL_TINFO_FN_P): Augment comment.
21545 * decl.c (cp_global_trees): Adjust documentation.
21546 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
21547 tinfo_decl_type and tinfo_var_id.
21548 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
21549 (build_typeid): Remove unused variable.
21550 (get_tinfo_var): Use tinfo_var_id.
21551 (tinfo_name): New static function.
21552 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
21553 (tinfo_from_decl): Likewise.
21554 (get_base_offset): New static function, broken out of
21556 (expand_si_desc): Use tinfo_name.
21557 (expand_class_desc): Likewise. Lose local static variable.
21558 Use base_desc_type_node. Use get_base_offset.
21559 (expand_ptr_desc): Use tinfo_name.
21560 (expand_attr_desc): Likewise.
21561 (expand_generic_desc): Likewise.
21563 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
21564 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
21566 2000-01-23 Mark Mitchell <mark@codesourcery.com>
21568 * cp-tree.h (__eprintf): Remove declaration.
21569 * tree.c (__eprintf): Remove definition.
21571 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
21572 Mark Mitchell <mark@codesourcery.com>
21574 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
21575 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
21577 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
21579 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
21581 2000-01-23 Mark Mitchell <mark@codesourcery.com>
21583 * cp-tree.h (register_dtor_fn): New function.
21584 * decl.c (destroy_local_static): Rename to ...
21585 (register_dtor_fn): ... this. Give it external linkage.
21586 (expand_static_init): Use it.
21587 * decl2.c (do_static_initialization): Likewise, if using
21589 (do_static_destruction): Check that __cxa_atexit is not in use.
21590 (finish_file): Don't call do_static_destruction if using
21593 * typeck.c (convert_arguments): Restore two-message error
21596 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
21598 Remap dynamic cast hint values to be consistent across ABIs.
21599 * search.c (dynamic_cast_base_recurse): Remap generated value.
21600 (get_dynamic_cast_base_type): Adjust documentation.
21601 * tinfo.h (__user_type_info::dyncast): Likewise.
21602 (__user_type_info::find_public_subobj): Remap BOFF meaning.
21603 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
21604 (__class_type_info::do_dyncast): Likewise.
21605 (__class_type_info::do_find_public_subobj): Likewise.
21606 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
21608 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
21610 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
21612 * typeck2.c (incomplete_type_error): Restore previous
21613 cp_error and cp_error_at call sequence.
21615 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
21617 * class.c (dump_class_hierarchy): Make format agree with argument;
21618 cast pointer to unsigned long and print with %lx.
21620 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
21622 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
21624 * typeck.c (composite_pointer_type, common_type,
21625 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
21626 build_function_call_real, convert_arguments,
21627 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
21628 build_unary_op, mark_addressable, build_compound_expr,
21629 build_static_cast, build_reinterpret_cast, build_const_cast,
21630 build_c_cast, build_modify_expr, get_delta_difference,
21631 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
21632 'ISO C++'. Fusion consecutive calls to diagnostic message routines
21634 * typeck2.c (readonly_error, abstract_virtuals_error,
21635 process_init_constructor, check_for_new_type): Likewise.
21637 2000-01-19 Mark Mitchell <mark@codesourcery.com>
21639 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
21642 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
21644 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
21645 (build_x_typeid): Likewise.
21646 (get_tinfo_fn): Likewise.
21647 (get_tinfo_fn_unused): Rename to ...
21648 (get_tinfo_decl): ... here.
21649 * rtti.c (build_headof): Replace logic error with assertion.
21650 (get_tinfo_fn_dynamic): Rename to ...
21651 (get_tinfo_decl_dynamic): ... here. Make static. Use
21652 complete_type_or_else.
21653 (build_x_typeid): Move into ...
21654 (build_typeid): ... here. Adjust call to
21655 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
21656 throw_bad_typeid expression.
21657 (get_tinfo_fn_unused): Rename to ...
21658 (get_tinfo_decl): ... here. Adjust comment.
21659 (get_tinfo_fn): Delete.
21660 (tinfo_from_decl): New static function.
21661 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
21662 (get_typeid): Use complete_type_or_else.
21663 (build_dynamic_cast_1): Adjust calls to
21664 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
21665 * parse.y (primary): Adjust call to build_typeid.
21666 * except.c (build_eh_type_type_ref): Adjust call to
21667 get_tinfo_decl. Mark as used.
21668 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
21669 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
21670 * parse.c: Regenerated.
21672 2000-01-17 Mark Mitchell <mark@codesourcery.com>
21674 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
21675 calling convention.
21676 (resolves_to_fixed_type_p): Document calling convention.
21677 * rtti.c (build_x_typeid): Initialize NONNULL.
21679 * cp-tree.h (build_shared_int_cst): New function.
21680 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
21681 * class.c (modify_vtable_entry): Likewise.
21682 (add_virtual_function): Split out code to generated shared
21683 INTEGER_CSTs to build_share_int_cst.
21684 (modify_all_vtables): Handle all the overridden functions here.
21685 Add overridden functions from non-primary virtual bases to the
21687 (finish_struct_1): Adjust call to modify_all_vtables. Add
21688 overridden functions from non-primary bases to the vtable.
21689 * tree.c (build_shared_int_cst): New function.
21691 * cp-tree.h (scratchalloc): Remove.
21692 (build_scratch_list): Likewise.
21693 * call.c (convert_class_to_reference): Replace build_scratch_list
21694 and build_expr_list with build_tree_list.
21695 (add_candidate): Replace scratchalloc with expralloc. Note memory
21697 (build_user_type_conversion_1): Replace build_scratch_list
21698 and build_expr_list with build_tree_list.
21699 (build_new_op): Likewise.
21700 (build_op_delete_call): Likewise.
21701 (convert_like): Likewise.
21702 * cvt.c (ocp_convert): Likewise.
21703 * decl.c (start_decl): Likewise.
21704 (start_function): Likewise.
21705 (finish_destructor_body): Likewise.
21706 (maybe_build_cleanup_1): Likewise.
21707 * decl2.c (reparse_decl_as_expr): Likewise.
21708 * init.c (perform_member_init): Likewise.
21709 (expand_cleanup_for_base): Likewise.
21710 (build_builtin_delete_call): Likewise.
21711 (build_new_1): Likewise.
21712 (build_delete): Likewise.
21713 * method.c (do_build_assign_ref): Likewise.
21714 * parse.y (already_scoped_stmt): Likewise.
21715 (nontrivial_exprlist): Likewise.
21716 (net_initializer): Likewise.
21717 (initlist): Likewise.
21718 * parse.c: Regenerated.
21719 * rtti.c (build_x_typeid): Likewise.
21720 (build_dynamic_cast_1): Likewise.
21721 * typeck.c (build_x_compound_expr): Likewise.
21722 (build_static_cast): Likewise.
21723 (build_modify_expr): Likewise.
21725 * cp-tree.h (DECL_VINDEX): Add documentation.
21726 * class.c (build_vtable_entry): Likewise.
21727 (start_vtable): Add comment.
21728 (add_virtual_function): Replace pending_hard_virtuals with
21729 overridden_virtuals and pending_virtuals with new_virtuals.
21730 Replace redundant assignments with assertions.
21731 (check_for_override): Add comment.
21732 (check_bases_and_members): Replace pending_hard_virtuals with
21733 overridden_virtuals and pending_virtuals with new_virtuals.
21734 (create_vtbl_ptr): Likewise.
21735 (layout_class_type): Likewise.
21736 (finish_struct_1): Likewise. Add comments.
21738 2000-01-16 Mark Mitchell <mark@codesourcery.com>
21740 * class.c (finish_struct_1): Replace redundant code with
21743 * cp-tree.h (flag_new_abi): Move.
21744 (flag_use_cxa_atexit): Likewise.
21745 (flag_honor_std): Likewise.
21746 (flag_rtti): Likewise.
21747 (vbase_offsets_in_vtable_p): Define.
21748 (vptrs_present_everywhere_p): Likewise.
21749 (TYPE_CONTAINS_VPTR_P): Likewise.
21750 (dfs_walk_real): Declare.
21751 * class.c (build_vbase_pointer_fields): Check
21752 vbase_offsets_in_vtable_p.
21753 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
21755 (build_vbase_offset_vtbl_entries): Simplify.
21756 (build_vbase_offset_vtbl_entries): Adjust.
21757 (build_vbase_pointer): Add ability to look up vbase offsets in
21759 (start_vtable): New function.
21760 (add_virtual_function): Use it.
21761 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
21762 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
21763 (build_vtbl_initializer): Take the type of the complete object as
21764 input. Use it to correctly calculate vbase offsets.
21765 (dfs_finish_vtbls): Pass the complete type to
21766 build_vtbl_initializer.
21767 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
21768 (create_vtable_ptr): Create a vtable even if there are no
21769 new virtual functions, under the new ABI.
21770 (finish_struct_1): Likewise.
21771 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
21772 * decl.c (exapnd_static_init): Remove call to
21773 preserve_initializer.
21774 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
21776 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
21777 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
21778 (construct_virtual_bases): Don't initialize virtual base pointers
21780 (build_aggr_init): Clean up comment.
21781 (expand_aggr_init_1): Likewise.
21782 * rtti.c (expand_class_desc): Store the virtual function table
21783 index where the vbase offset lives in the offset field.
21784 * search.c (dfs_walk_real): Make it global.
21785 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
21786 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
21788 * tinfo.h (USItype): Make it signed under the new ABI.
21789 * tinfo.cc (convert_to_base): New function. Encapsulate base
21790 conversion logic here.
21791 (__class_type_info::do_upcast): Use it.
21792 (__class_type_info::do_dyncast): Likewise.
21793 (__class_type_info::do_find_public_subobj): Likewise.
21795 * init.c (construct_virtual_bases): Don't look up the addresses of
21796 virtual bases at run-time.
21798 * class.c (build_vbase_pointer): Relocate.
21799 (build_vbase_pointer_fields): Likewise.
21800 (dfs_build_vbase_offset_vtbl_entries): Likewise.
21801 (build_vbase_offset_vtbl_entries): Likewise.
21803 * decl.c (init_decl_processing): Complain if -fnew-abi
21804 -fno-vtable-thunks is used.
21806 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
21809 2000-01-15 Mark Mitchell <mark@codesourcery.com>
21811 * cp-tree.h (num_extra_vtbl_entries): New function.
21812 (size_extra_vtbl_entries): Likewise.
21813 (dfs_vtable_path_unmark): Likewise.
21814 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
21815 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
21816 * class.c (num_extra_vtbl_entries): New function.
21817 (size_extra_vtbl_entries): Likewise.
21818 (dfs_build_vbase_offset_vtbl_entries): New function.
21819 (build_vbase_offset_vtbl_entries): Likewise.
21820 (build_vtbl_initializer): Use it.
21821 (finish_struct_1): Adjust vtable sizes (using
21822 num_extra_vtbl_entries).
21823 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
21824 THUNK_DECL is non-NULL before expanding it.
21825 * init.c (expand_virtual_init): Adjust the vtable pointer by
21826 size_extra_vtbl_entries before storing it.
21827 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
21828 Handle TREE_LIST parameters here, not in the dfs_* functions.
21829 (dfs_unmarked_real_bases_queue_p): Adjust.
21830 (dfs_marked_real_bases_queue_p): Likewise.
21831 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
21832 (dfs_vtable_path_marked_real_bases_queue_p): New function.
21833 (dfs_vtable_path_unmark): Likewise.
21835 2000-01-14 Mark Mitchell <mark@codesourcery.com>
21837 * optimize.c (copy_body_r): Clear the operand three of a
21838 TARGET_EXPR when copying it.
21840 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
21842 * method.c (build_decl_overload_real): Check whether we are in ::
21843 before returning __builtin_new/delete.
21845 2000-01-13 Mark Mitchell <mark@codesourcery.com>
21847 * pt.c (tsubst_friend_function): Improve comment.
21848 (instantiate_decl): Avoid crashing when a "nested" function is
21849 instantiated from the top level.
21851 * dump.c (dqeueue_and_dump): Dump
21852 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
21854 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21856 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
21858 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
21860 * g++spec.c (lang_specific_driver): Add -fnew-abi if
21861 ENABLE_NEW_GXX_ABI defined.
21862 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
21863 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
21864 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
21866 2000-01-12 Mark Mitchell <mark@codesourcery.com>
21868 * decl.c (start_cleanup_fn): Call pushdecl.
21870 * call.c (convert_class_to_reference): Fix typos.
21871 (build_conditional_expr): Handle errors gracefully.
21872 * class.c (push_nested_class): Likewise.
21873 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
21874 (DECL_THIS_EXTERN): Use it.
21875 (DECL_THIS_STATIC): Likewise.
21876 * cvt.c (convert_to_void): Handle errors gracefully.
21877 (build_expr_type_conversion): Likewise.
21878 * decl.c (maybe_push_decl): Likewise.
21879 (start_decl_1): Likewise.
21880 (require_complete_types_for_parms): Likewise.
21881 * parse.y (structsp): Likewise.
21882 (base_class): Likewise.
21883 * parse.c: Regenerated.
21884 * pt.c (finish_member_template_decl): Likewise.
21885 * typeck.c (decay_conversion): Likewise.
21887 * cp-tree.h (dfs_skip_vbases): New function.
21888 (find_vbase_instance): Likewise.
21889 * class.c (determine_primary_base): Allow a nearly empty base to
21890 serve as a primary base class under the new ABI.
21891 (get_class_offset_1): Rename to ...
21892 (dfs_get_class_offset): ... this. Simplify. Don't issue error
21894 (get_class_offset): Use it. Issue error messages here.
21895 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
21896 find the right copies of virtual bases.
21897 (fixup_vtable_deltas1): Rename to ...
21898 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
21899 bases as primary bases.
21900 (fixup_vtable_deltas): Remove.
21901 (override_one_vtable): Handle virtual bases as primary bases.
21902 (merge_overrides): Likewise.
21903 (finish_struct_1): Likewise.
21904 (dump_class_hierarchy): Dump primary-ness of bases as well.
21905 * search.c (mark_primary_bases): Use a pre-order traversal to
21906 handle primary virtual bases.
21907 (dfs_skip_vbases): New fiunction.
21908 (expand_upcast_fixups): Adjust to handle primary virtual bases.
21909 (fixup_virtual_upcast_offsets): Likewise.
21910 (fixup_all_virtual_upcast_offsets): Likewise.
21911 (dfs_find_vbase_instances): New function.
21912 (find_vbase_instance): Likewise.
21914 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
21916 * lex.c (DIR_SEPARATOR): Delete macro.
21918 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
21920 * decl2.c (lang_decode_option): Handle automatic line wrapping
21923 2000-01-11 Mark Mitchell <mark@codesourcery.com>
21925 * friend.c (do_friend): Don't resolve scopes when processing
21926 template declarations, even if the qualifying scope doesn't
21927 involve template parameters.
21929 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
21931 * class.c (dfs_modify_vtables_queue_p): Remove.
21932 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
21933 and dfs_marked_real_bases_queue_p instead of
21934 dfs_modify_vtables_queue_p.
21936 * class.c (build_vbase_path): Simplify.
21937 (dfs_propagate_binfo_offsets): New function.
21938 (propagate_binfo_offsets): Use it.
21939 (remove_base_field): Simplify.
21940 (dfs_set_offset_for_vbases): Remove.
21941 (dfs_set_offset_for_shared_vbases): New function.
21942 (dfs_set_offset_for_unshared_vbases): Likewise.
21943 (layout_virtual_bases): Use them.
21944 (layout_basetypes): Don't call propagate_binfo_offsets.
21945 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
21948 * class.c (build_base_field): New function, split out from ...
21949 (build_base_fields): ... here. Use it. Allocate primary bases
21950 first, under the new ABI.
21951 (get_vtable_entry): Remove.
21952 (remove_base_field): New function, split out from ...
21953 (remove_base_fields): ... here. Adjust since primary bases come
21954 first under the new ABI.
21956 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
21957 (initialize_vtbl_ptrs): New function.
21958 (expand_indirect_vtbls_init): Change prototype.
21959 (convert_pointer_to_vbase): Declare.
21960 * init.c (expand_direct_vtbls_init): Remove.
21961 (dfs_initialize_vtbl_ptrs): New function.
21962 (initialize_vtbl_ptrs): Likewise.
21963 (emit_base_init): Use initialize_vtbl_ptrs.
21964 * search.c (convert_pointer_to_vbase): Make it global.
21965 (expand_indirect_vtbls_init): Remove vtable initialization code.
21966 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
21968 * class.c (dfs_finish_vtbls): New function.
21969 (finish_vtbls): Use it.
21970 (dump_class_hierarchy): New function.
21972 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
21973 (BINFO_VBASE_PRIMARY_P): New macro.
21974 (BINFO_VIRTUALS): Add to documentation.
21975 (SET_BINFO_PRIMARY_MARKED_P): Remove.
21976 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21977 (dfs_mark_primary_bases_queue_p): Likewise.
21978 (dfs_unmarked_real_bases_queue_p): New function.
21979 (dfs_marked_real_bases_queue_p): Likewise.
21980 * search.c (dfs_mark_primary_bases): Adjust.
21981 (mark_primary_bases): Likewise.
21982 (get_shared_vbase_if_not_primary): New function.
21983 (dfs_unmarked_real_bases_queue_p): Likewise.
21984 (dfs_marked_real_bases_queue_p): Likewise.
21985 (dfs_get_pure_virtuals): Simplify.
21986 (get_pure_virtuals): Likewise.
21988 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21990 * lex.c: Include tm_p.h.
21992 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
21994 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
21996 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
21998 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
21999 * pt.c (instantiate_decl): Defer comdat templates that might not be
22002 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
22003 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
22004 (finish_file): Likewise.
22006 * decl2.c (import_export_class): Undo 12/14 change.
22008 * error.c (dump_decl): operator new, not operatornew.
22010 * class.c (field_decl_cmp): A nontype is "greater" than a type.
22011 * search.c (lookup_field_1): Look for the last field with the
22014 2000-01-05 Nathan Sidwell <nathan@acm.org>
22016 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
22019 2000-01-05 Nathan Sidwell <nathan@acm.org>
22021 * typeck.c (build_static_cast): Don't strip target qualifiers
22022 when casting from a class.
22024 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
22026 * class.c (warn_hidden): Initialize variable `fndecl'.
22028 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
22030 * decl.c (flag_isoc9x): New variable to be able to use code in
22031 c-common.c. For now always zero.
22033 2000-01-03 Mark Mitchell <mark@codesourcery.com>
22035 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
22036 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
22037 or unshare_base_binfos for virtual bases here.
22038 * search.c (dfs_get_vbase_types): Do it here.
22039 (get_vbase_types): Adjust.
22041 2000-01-02 Mark Mitchell <mark@codesourcery.com>
22043 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
22044 (BINFO_PRIMARY_MARKED_P): Use flag 5.
22045 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
22046 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22047 (unmark_primary_bases): Remove declaration.
22048 (unmarkedp): Declare.
22049 (dfs_vbase_unmark): Likewise.
22050 * class.c (determine_primary_base): Return immediately if there
22051 are no base classes. Call mark_primary_bases here.
22052 (modify_all_direct_vtables): Remove.
22053 (modify_all_indirect_vtables): Remove.
22054 (dfs_modify_vtables_queue_p): New function.
22055 (dfs_modify_vtables): New function.
22056 (modify_all_vtables): Use them.
22057 (build_base_fields): Build FIELD_DECLs for primary virtual base
22059 (create_vtable_ptr): Don't call determine_primary_base here.
22060 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
22061 (dfs_set_offset_for_vbases): ... this.
22062 (layout_virtual_bases): Use it.
22063 (layout_class_type): Call determine_primary_base here.
22064 * search.c (unmarkedp): Make it global.
22065 (shared_marked_p): Simplify.
22066 (shared_unmarked_p): Likewise.
22067 (dfs_primary_bases_queue_p): Remove.
22068 (dfs_unmark_primary_bases): Likewise.
22069 (unmark_primary_bases): Likewise.
22070 (mark_primary_bases): Simplify.
22071 (get_pure_virtuals): Don't call mark_primary_bases here.
22072 (dfs_vbase_unmark): New function.
22073 (get_vbase_types): Simplify.
22075 * class.c (struct base_info): Remove.
22076 (determine_primary_base): Take has_virtual_p rather than a
22077 base_info as input. Don't calculate max_has_virtual.
22078 (finish_struct_bits): Remove max_has_virtual argument.
22079 (create_vtable_ptr): Remove max_has_virtual_p argument.
22080 (layout_virtual_bases): Remove max argument.
22081 (layout_basetypes): Likewise.
22082 (layout_class_type): Remove max_has_virtual_p argument.
22083 (finish_struct_1): Remove max_has_virtual.
22085 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
22086 (layout_basetypes): Remove.
22087 * class.c (propagate_binfo_offsets): Moved here from tree.c.
22088 Update to handle primary virtual bases.
22089 (remove_base_fields): New function, split out from
22091 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
22092 (layout_virtual_bases): New function, split out from
22093 layout_basetypes. Update to handle primary virtual bases.
22094 (layout_basetypes): Moved here from tree.c. Use
22095 remove_base_fields and layout_virtual_bases.
22096 * search.c (dfs_mark_primary_bases_queue_p): New function.
22097 (mark_primary_bases): Use it.
22098 * tree.c (CEIL): Remove.
22099 (propagate_binfo_offsets): Remove.
22100 (layout_basetypes): Remove.
22102 2000-01-01 Mark Mitchell <mark@codesourcery.com>
22104 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
22105 (BINFO_PRIMARY_MARKED_P): New macro.
22106 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
22107 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22108 (mark_primary_bases): New function.
22109 (unmark_primary_bases): Likewise.
22110 * search.c (get_abstract_virtuals_1): Remove.
22111 (dfs_mark_primary_bases): New function.
22112 (mark_primary_bases): Likewise.
22113 (dfs_unmark_primary_bases): Likewise.
22114 (unmark_primary_bases): Likewise.
22115 (dfs_get_pure_virtuals): Likewise.
22117 2000-01-01 Mark Mitchell <mark@codesourcery.com>
22119 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
22120 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
22121 (modify_one_vtable): Adjust.
22122 (fixup_vtable_deltas1): Likewise.
22123 (override_one_vtable): Likewise.
22124 * search.c (get_abstract_virtuals_1): Likewise.
22125 (get_pure_virtuals): Likewise.
22126 (expand_upcast_fixups): Likewise.
22127 * tree.c (debug_binfo): Likewise.
22129 * class.c (build_vtable): Don't return a value. Don't rebuild
22130 vtables for bases that have already been handled.
22131 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
22132 already been handled.
22133 (modify_one_vtable): Adjust accordingly.
22134 (fixup_vtable_deltas1): Likewise.
22135 (finish_struct_1): Likewise.
22137 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
22139 * call.c (build_new_method_call): Also check destructors.