1 2003-11-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4 * class.c (currently_open_derived_class): Check if
5 current_class_type is NULL_TREE.
6 * semantics.c (finish_call_expr): Check if
7 currently_open_derived_class returns NULL_TREE.
8 * cp-tree.h (DERIVED_FROM_P): Add parenthesis around PARENT
11 2003-11-17 Jason Merrill <jason@redhat.com>
13 * init.c (build_new_1): Preevaluate placement args.
14 * call.c (build_op_delete_call): Don't expose placement args to
17 2003-11-16 Jason Merrill <jason@redhat.com>
19 * Make-lang.in (c++.tags): Create TAGS.sub files in each directory
20 and TAGS files that include them for each front end.
22 2003-11-15 Bernardo Innocenti <bernie@develer.com>
25 * name-lookup.c: Revert previous patch for PR c++/2294 to prevent
26 build failure on libjava.
28 2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
31 * name-lookup.c (push_overloaded_decl): Always construct an OVERLOAD
32 unless the declaration is a built-in.
33 (set_namespace_binding): While binding OVERLOADs with only one
34 declaration, we still need to call supplement_binding.
36 2003-11-14 Mark Mitchell <mark@codesourcery.com>
39 * parser.c (cp_parser_enclosed_template_argument_list): New
41 (cp_parser_template_id): Use it.
42 (cp_parser_simple_type_specifier): Recognize invalid template
45 2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
48 * pt.c (unify): Add support for PTRMEM_CST and
49 FIELD_DECL unification.
51 2003-11-13 Richard Earnshaw <rearnsha@arm.com>
53 * decl.c (grokfndecl): Change OK to type tree.
55 2003-11-12 Mark Mitchell <mark@codesourcery.com>
57 * tree.c (build_target_expr_with_type): Treate VA_ARG_EXPR like
60 * decl.c (cp_make_fname_decl): When creating a top-level
61 __FUNCTION__-like symbol, do register it with pushdecl.
63 * decl.c (finish_case_label): Do not check that we are within a
64 switch statement here.
65 * parser.c (struct cp_parser): Add in_iteration_statement_p and
66 in_switch_statement_p.
67 (cp_parser_new): Initialize them.
68 (cp_parser_labeled_statement): Check validity of case labels
70 (cp_parser_selection_statement): Set in_switch_statement_p.
71 (cp_parser_iteration_statement): Set in_iteration_statement_p.
72 (cp_parser_jump_statement): Check validity of break/continue
76 * cp-tree.h (duplicate_decls): Return a tree.
77 * decl.c (duplicate_decls): Clarify documentation. Return
78 error_mark_node to indicate a failed redeclaration.
79 * friend.c (do_friend): Handle that case.
80 * name-lookup.c (pushdecl): Likewise.
82 2003-11-11 Jason Merrill <jason@redhat.com>
84 * cp-tree.h (DECL_NAMESPACE_ASSOCIATIONS): New macro.
85 * name-lookup.c (parse_using_directive): New fn.
86 (is_associated_namespace): New fn.
87 (arg_assoc_namespace): Also check associated namespaces.
88 * name-lookup.h: Declare new fns.
89 * pt.c (maybe_process_partial_specialization): Allow
90 specialization in associated namespace.
91 * parser.c (cp_parser_using_directive): Accept attributes. Use
92 parse_using_directive.
94 2003-11-10 Richard Henderson <rth@redhat.com>
96 * cvt.c (convert_to_void): Use void_zero_node after overload failure.
98 2003-11-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
101 * name-lookup.c (supplement_binding): Gracefully handle names
102 used at non-class scope prior declaration.
104 2003-11-06 Matt Austern <austern@apple.com>
106 * decl.c (duplicate_decls): copy DECL_VISIBILITY field.
107 * method.c (use_thunk): give thunk same visibility as function.
108 * optimize.c (maybe_clone_body): copy DECL_VISIBILITY field.
110 2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
113 * pt.c (instantiate_pending_templates): Save and restore
116 2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
119 * friend.c (add_friend): Don't display previous declaration in
120 case of duplicate friend warning.
122 2003-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
125 * call.c (build_over_call): Check access using primary template
126 if FN is a member function template.
128 2003-11-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
131 * class.c (handle_using_decl): Set input_location before calling
134 2003-10-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
137 * semantics.c (finish_non_static_data_member): Handle when
138 both processing_template_decl and qualifying_scope are true.
140 2003-10-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
143 * class.c (handle_using_decl): Swap arguments of error_not_base_type.
144 * parser.c (cp_parser_direct_declarator): Only resolve typename for
145 namespace scope declarations.
147 2003-10-24 Nathan Sidwell <nathan@codesourcery.com>
149 PR c++/12698, c++/12699, c++/12700, c++/12566
150 * cp-tree.h (THUNK_ALIAS_P, THUNK_ALIAS): New.
151 (debug_class, debug_thunks): New.
152 * class.c (dump_class_hierarchy_1): New break out from ...
153 (dump_class_hierarchy): ... here.
154 (dump_thunk, debug_thunks, debug_class): New.
155 (update_vtable_entry_for_fn): Add ssizetype casts. Correct
156 continued search for primary binfo via virtual.
157 (build_vtbl_initializer): Follow covariant thunk alias.
158 * method.c (make_thunk): Clear DECL_THUNKS of the thunk.
159 (finish_thunk): Look for an alias of the covariant thunk and point
161 (use_thunk): We should never use an alias.
162 * semantics.c (emit_associated_thunks): Do not emit aliases.
165 * cp-tree.h (cp_fname_init): Add TYPE pointer param.
166 * decl.c (cp_fname_init): Add TYPE pointer param. Set it. Don't
167 create an ad-hoc ERROR_MARK.
168 (cp_make_fname_decl): Adjust.
169 * pt.c (tsubst_expr): Adjust.
171 2003-10-23 Jason Merrill <jason@redhat.com>
174 * tree.c (build_target_expr_with_type): Don't call force_rvalue
177 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
179 * call.c: Fix comment formatting.
181 * cxx-pretty-print.c: Likewise.
183 * parser.c: Likewise.
185 * semantics.c: Likewise.
187 * typeck.c: Likewise.
188 * typeck2.c: Likewise.
190 2003-10-21 Mark Mitchell <mark@codesourcery.com>
193 * typeck.c (build_x_conditional_expr): Handle missing middle
194 operands in templates.
195 * mangle.c (write_expression): Issue errors about attempts to
196 mangle a non-existant middle operator to the ?: operator.
198 2003-10-21 Robert Bowdidge <bowdidge@apple.com>
199 * decl.c (cp_finish_decl): Remove clause intended for asm directives
200 in struct or class fields: this code is never executed.
202 2003-10-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
204 * decl.c (start_decl): Exit if push_template_decl returns
207 2003-10-20 Kazu Hirata <kazu@cs.umass.edu>
209 * ChangeLog: Fix typos.
210 * call.c: Fix comment typos.
212 * cp-tree.h: Likewise.
214 * cxx-pretty-print.c: Likewise.
218 * mangle.c: Likewise.
219 * name-lookup.c: Likewise.
220 * parser.c: Likewise.
221 * search.c: Likewise.
222 * semantics.c: Likewise.
224 * typeck.c: Likewise.
226 2003-10-20 Jan Hubicka <jh@suse.cz>
228 * decl.c (start_cleanup_fn): Set DECL_DECLARED_INLINE_P to deffer
231 2003-10-20 Mark Mitchell <mark@codesourcery.com>
233 * Make-lang.in (c++.install-info): Remove.
235 2003-10-20 Jason Merrill <jason@redhat.com>
237 * class.c (layout_class_type): Set DECL_ARTIFICIAL on padding
240 2003-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
242 PR c++/9781, c++/10583, c++/11862
243 * decl.c (cp_finish_decl): Exit immediately if decl is an
245 * pt.c (push_template_decl_real): Return error_mark_node for
246 invalid template declaration of variable.
248 2003-10-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
251 * pt.c (lookup_template_class): Handle when current_class_type
254 2003-10-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
257 * decl.c (make_typename_type): Use dependent_type_p.
258 (make_unbound_class_template): Likewise.
259 * pt.c (instantiate_class_template): Increment
260 processing_template_decl during substitution of template friend
261 function. Preincrement processing_template_decl rather than
263 (get_mostly_instantiated_function_type): Increment
264 processing_template_decl during partial substitution of function
267 2003-10-15 Jan Hubicka <jh@suse.cz>
270 * decl2.c (cxx_callgraph_analyze_expr): Deal with baselink.
272 2003-10-14 Jason Merrill <jason@redhat.com>
275 * tree.c (build_target_expr_with_type): Call force_rvalue for
276 classes with non-trivial copy ctors.
279 * typeck.c (build_modify_expr): Call convert rather than abort.
281 2003-10-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
283 Breack out decl.c (3/n)
284 * name-lookup.c: Include flags.h
285 (lookup_name_current_level): Make static.
286 (add_decl_to_level): Likewise.
287 (push_local_binding): Likewise.
288 (push_overloaded_decl): Likewise.
289 (lookup_using_namespace): Likewise.
290 (qualified_lookup_using_namespace): Likewise.
291 (lookup_type_current_level): Likewise.
292 (unqualified_namespace_lookup): Likewise.
293 (namespace_ancestor): Likewise.
294 (push_using_directive): Likewise.
295 * decl.c (pushdecl): Move to name-lookup.c.
296 (pushdecl_top_level_1): Likewise.
297 (pushdecl_top_level): Likewise.
298 (pushdecl_top_level_and_finish): Likewise.
299 (maybe_push_decl): Likewise.
300 (push_using_decl): Likewise.
301 (push_overloaded_decl): Likewise.
302 (make_anon_name): Likewise.
303 (anon_cnt): Likewise.
304 (clear_anon_tags): Likewise.
305 (maybe_inject_for_scope_var): Likewise.
306 (check_for_out_of_scope_variable): Likewise.
307 * Make-lang.in (cp/name-lookup.o): Depend on flags.h.
308 * decl.c (warn_extern_redeclared_static): Export.
309 * cp-tree.h (warn_extern_redeclared_static): Declare.
311 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
313 * Make-lang.in: Replace uses of $(target_alias) with
314 $(target_noncanonical).
316 2003-10-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
318 * ChangeLog: Add PR number to patch for PR c++/12370.
320 2003-10-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
322 * name-lookup.h (cxx_scope_find_binding_for_name): Don't export.
323 (binding_for_name): Likewise.
324 (cxx_binding_clear): Move to name-lookup.c.
325 * name-lookup.c (cxx_scope_find_binding_for_name): Now static.
326 (binding_for_name): Likewise.
327 * decl2.c (is_ancestor): Move to name-lookup.c
328 (namespace_ancestor): Likewise.
329 (add_using_namespace): Likewise.
330 (ambiguous_decl): Likewise.
331 (lookup_using_namespace): Likewise.
332 (qualified_lookup_using_namespace): Likewise.
333 (set_decl_namespace): Likewise.
334 (decl_namespace): Likewise.
335 (current_decl_namespace): Likewise.
336 (push_decl_namespace): Likewise.
337 (pop_decl_namespace): Likewise.
338 (push_scope): Likewise.
339 (pop_scope): Likewise.
340 (struct arg_lookup): Likewise.
341 (arg_assoc): Likewise.
342 (arg_assoc_args): Likewise.
343 (arg_assoc_type): Likewise.
344 (add_function): Likewise.
345 (arg_assoc_namespace): Likewise.
346 (arg_assoc_class): Likewise.
347 (arg_assoc_template_arg): Likewise.
348 (do_namespace_alias): Likewise.
349 (validate_nonmember_using_decl): Likewise.
350 (do_nonmember_using_decl): Likewise.
351 (do_toplevel_using_decl): Likewise.
352 (do_local_using_decl): Likewise.
353 (do_class_using_decl): Likewise.
354 (do_using_directive): Likewise.
355 (constructor_name_full): Likewise.
356 (constructor_name): Likewise.
357 (constructor_name_p): Likewise.
359 2003-10-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
361 Break out decl.c (2/n)
362 * name-lookup.c: Include diagnostic.h
363 (cxx_binding_free): Make static.
364 (cxx_binding_make): Likewise.
365 (binding_table_new): Likewise
366 (binding_table_free): Likewise.
367 (binding_table_insert): Likewise.
368 (binding_table_find_anon_type): Likewise.
369 (binding_table_reverse_maybe_remap): Likewise.
370 (supplement_binding): Likewise.
371 * name-lookup.h (global_scope_name): Declare extern.
372 (global_type_node): Likewise.
373 (cxx_binding_free): Don't export.
374 (cxx_binding_make): Likewise.
375 (binding_table_new): Likewise.
376 (binding_table_free): Likewise.
377 (binding_table_insert): Likewise.
378 (binding_table_find_anon_type): Likewise.
379 (binding_table_reverse_maybe_remap): Likewise.
380 * Make-lang.in (cp/name-lookup.o): Depend on $(DIAGNOSTIC_H)
381 * decl.c (lookup_namespace_name): Move to name-lookup.c
382 (select_decl): Likewise.
383 (unqualified_namespace_lookup): Likewise.
384 (lookup_qualified_name): Likewise.
385 (lookup_name_real): Likewise.
386 (lookup_name_nonclass): Likewise.
387 (lookup_function_nonclass): Likewise.
388 (lookup_name): Likewise.
389 (lookup_name_current_level): Likewise.
390 (lookup_type_current_level): Likewise.
391 (lookup_flags): Likewise.
392 (qualify_lookup): Likewise.
393 (lookup_tag): Likewise.
394 (lookup_tag_reverse): Likewise.
395 (getdecls): Likewise.
396 (storedecls): Remove.
397 (cxx_remember_type_decls): Move to name-lookup.c.
398 (global_bindings_p): Likewise.
399 (innermost_nonclass_level): Likewise.
400 (toplevel_bindings_p): Likewise.
401 (namespace_bindings_p): Likewise.
402 (kept_level_p): Likewise.
403 (innermost_scope_kind): Likewise.
404 (template_parm_scope_p): Likewise.
405 (push_binding): Likewise.
406 (push_local_binding): Likewise.
407 (add_decl_to_level): Likewise. Make extern.
408 (push_class_binding): Move to name-lookup.c.
409 (resume_level): Likewise. Rename to resume_scope.
410 (begin_scope): Move to name-lookup.c.
412 (binding_depth): Likewise.
413 (is_class_level): Likewise.
414 (cxx_scope_descriptor): Likewise.
415 (cxx_scope_debug): Likewise.
416 (namespace_scope_ht_size): Likewise.
417 (leave_scope): Likewise.
418 (pushlevel_class): Likewise.
419 (poplevel_class): Likewise.
420 (clear_identifier_class_values): Likewise.
421 (pushdecl_with_scope): Likewise.
422 (pushdecl_namespace_level): Likewise.
423 (pushdecl_class_level): Likewise.
424 (push_class_level_binding): Likewise.
425 (push_using_directive): Likewise.
426 (identifier_global_value): Likewise.
427 (keep_next_level_flag): Likewise.
428 (keep_next_level): Likewise.
429 (free_binding_level): Likewise.
430 (set_class_shadows): Likewise.
431 (maybe_push_cleanup_level): Likewise.
432 (cp_namespace_decls): Likewise.
433 (bt_print_entry): Likewise.
434 (print_binding_level): Likewise.
435 (print_other_binding_stack): Likewise.
436 (print_binding_stack): Likewise.
437 (push_namespace): Likewise.
438 (pop_namespace): Likewise.
439 (push_nested_namespace): Likewise.
440 (pop_nested_namespace): Likewise.
441 (cxx_saved_binding_make): Likewise.
442 (struct cxx_saved_binding_make): Likewise.
443 (store_bindings): Likewise.
444 (maybe_push_to_top_level): Likewise.
445 (push_to_top_level): Likewise.
446 (pop_from_top_level): Likewise.
447 (identifier_type_value): Likewise.
448 (set_identifier_type_value): Likewise.
449 (set_identifier_type_value_with_scope): Likewise.
450 (pop_everything): Likewise.
452 (follow_tag_typedef): Likewise.
453 (maybe_process_template_type_declaration): Likewise.
454 (pop_binding): Likewise.
455 * cp-tree.h: Move corresponding declarations to name-lookup.h
457 2003-10-12 Steven Bosscher <steven@gcc.gnu.org>
459 * cvt.c (ocp_convert): Move warning to C common code.
461 2003-10-09 Jason Merrill <jason@redhat.com>
464 * tree.c (build_cplus_array_type): Handle all quals the same.
465 (cp_build_qualified_type_real): Look through arrays first.
467 * tree.c (build_cplus_new): Use build_decl to create a VAR_DECL.
468 (build_target_expr_with_type): Likewise.
470 * pt.c (instantiate_class_template): Sanity check that our
471 enclosing class has been instantiated.
473 2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
475 * cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS.
476 * error.c (dump_function_decl): Use it to skip the dump of the
478 (dump_expr): When dumping a declaration found within an
479 expression, always set TFF_NO_FUNCTION_ARGUMENTS
482 2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
485 * pt.c (tsubst_decl): Substitute also the DECL_NAME node of
488 2003-10-06 Mark Mitchell <mark@codesourcery.com>
491 * call.c (initialize_reference): Tweak error message.
492 * cxx-pretty-print.h (cxx_pretty_printer_flags): Remove
493 pp_cxx_flag_qualified_id and pp_cxx_flag_global_scope.
494 * cxx-pretty-print.c (pp_cxx_id_expression): Always display
495 qualified entities using qualified names.
498 * init.c (build_new_1): Make sure that the expression returned is
501 PR c++/12344, c++/12236, c++/8656
502 * decl.c (start_function): Do not ignore attributes embedded in a
505 2003-10-06 Mark Mitchell <mark@codesourcery.com>
507 * Make-lang.in (c++.info): Remove.
509 (c++.generated-manpages): Replace with ...
510 (generated-manpages): ... this.
512 2003-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
514 * decl.c (struct cp_binding_level): Move to name-lookup.h
515 (current_binding_level): Likewise.
516 (class_binding_level): Likewise.
517 * cp-tree.h (enum scope_kind): Likewise.
519 2003-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
521 * name-lookup.c (binding_entry_free): Nullify name and type
524 2003-10-02 Mark Mitchell <mark@codesourcery.com>
527 * typeck.c (finish_class_member_access_expr): Issue diagnostic
528 on erroneous use of qualified name.
530 2003-09-30 Richard Henderson <rth@redhat.com>
533 * decl.c (duplicate_decls): Copy DECL_SAVED_INSNS too.
535 2003-09-30 Kelley Cook <kelleycoook@wideopenwest.com>
537 * g++spec.c: Convert to ISO C90 prototypes.
538 * parser.c: Likewise.
540 2003-09-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
542 * decl.c (pop_binding): Don't mess with nullifying binding->scope
544 * name-lookup.c: Re-format.
545 (cxx_binding_free): Nullify binding->scope.
547 2003-09-29 Jan Hubicka <jh@suse.cz>
550 * except.c (build_eh_type_type): Call mark_used on the type.
552 2003-09-28 Richard Henderson <rth@redhat.com>
554 * typeck.c (c_expand_asm_operands): Take location_t, instead of
555 individual file and line.
557 2003-09-28 Andreas Jaeger <aj@suse.de>
559 * decl.c (cxx_builtin_type_decls): Convert to ISO C90 function
561 * init.c (push_base_cleanups): Likewise.
562 * decl2.c (finish_file): Likewise.
563 * mangle.c (init_mangle): Likewise.
564 (dump_substitution_candidates): Likewise.
565 * search.c: Likewise.
567 2003-09-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
569 * name-lookup.h (get_global_value_if_present): New function.
570 (is_typename_at_global_scope): Likewise.
571 * except.c (do_begin_catch): Use get_global_value_if_present.
572 (do_end_catch): Likewise.
573 (do_allocate_exception): Likewise.
574 (do_free_exception): Likewise.
575 (build_throw): Likewise.
576 * parser.c (cp_parser_member_declaration): Likewise.
577 * rtti.c (throw_bad_cast): Likewise.
578 (throw_bad_typeid): Likewise.
579 * decl.c (check_tag_decl): Use is_typename_at_global_scope.
580 (grokdeclarator): Likewise.
581 * cp-tree.h (global_namespace): Move to name-lookup.h
582 * call.c (call_builtin_trap): Tidy.
584 2003-09-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
587 * parser.c (cp_parser_nested_name_specifier_opt): Issue correct
588 error message when parser->scope is global_namespace.
590 2003-09-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
592 * cp-tree.h, name-lookup.h, decl.c, decl2.c: Remove reference to
593 macros BINDING_SCOPE, BINDING_VALUE and BINDING_TYPE.
595 2003-09-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
597 * decl.c (pop_binding_level, suspend_binding_level,
598 find_class_binding_level): Merge into leave_scope. Remove.
599 (leave_scope): New function.
601 (poplevel_class): Likewise.
602 (pop_namespace): Likewise.
604 2003-09-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
607 * parser.c (cp_parser_check_access_in_redeclaration): New function.
608 (cp_parser_member_declaration): Use it.
609 (cp_parser_template_declaration_after_export): Likewise.
611 2003-09-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
613 * cp-tree.h (scope_kind): Add new enumerator.
614 (keep_next_level): Change parameter type to bool.
615 (begin_scope): Change prototype.
616 (pushlevel): Remove declaration.
617 * decl.c (push_binding_level): Fold in begin_scope. Remove.
618 (struct cp_binding_level): Remove tag_tranparent field. Make keep
620 (keep_next_level_flag): Make a bool.
621 (cxx_scope_descriptor): Update scope names table
622 (make_cxx_scope): Fold in begin_scope. Remove..
623 (namespace_scope_ht_size): New function.
624 (begin_scope): Change prototype. Return a scope. Tidy.
625 (kept_level_p): Update.
627 (maybe_push_cleanup_level): Simplify.
628 (poplevel): Update for sk_cleanup and keep change.
629 (print_binding_level): Likewise.
630 (initial_push_namespace_scope): Fold in begin_scope. Remove.
631 (push_namespace): Update.
633 (lookup_tag): Likewise.
634 (lookup_name_current_level): Likewise.
635 (lookup_type_current_level): Likewise.
636 (cxx_init_decl_processing): Likewise.
637 (start_function): Likewise.
638 (begin_function_body): Likewise.
639 (start_method): Likewise.
640 * pt.c (push_inline_template_parms_recursive): Likewise.
641 (begin_template_parm_list): Likewise.
642 (begin_specialization): Likewise.
643 * semantics.c (do_pushlevel): Likewise.
644 (begin_compound_stmt): Likewise.
645 (begin_stmt_expr): Likewise.
647 2003-09-21 Richard Henderson <rth@redhat.com>
649 * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
650 method.c, optimize.c, pt.c, semantics.c, tree.c: Revert.
652 2003-09-21 Richard Henderson <rth@redhat.com>
654 * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
655 method.c, optimize.c, pt.c, semantics.c, tree.c: Update for
656 DECL_SOURCE_LOCATION rename and change to const.
658 2003-09-20 Richard Henderson <rth@redhat.com>
660 * decl.c, decl2.c, pt.c: Use %J in diagnostics.
662 2003-09-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
665 * parser.c (cp_parser_direct_declarator): Clear
666 parser->num_template_parameter_lists when parsing function
668 (cp_parser_constructor_declarator_p): Likewise.
670 2003-09-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
673 * pt.c (tsubst_friend_class): Only use innermost template
674 arguments for the injected friend class template.
676 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
679 * pt.c (instantiate_class_template): Increment
680 processing_template_decl around the tsubst of a template member
683 2003-09-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
685 * decl.c (cxx_scope_descriptor): Fix thinko.
686 (struct cp_binding_level): Adjust type of binding_depth field.
688 2003-09-18 Danny Smith <dannysmith@users.sourceforge.net>
691 * call.c (type_passed_as): Check for incomplete type.
692 (convert_for_arg_passing): Likewise.
694 2003-09-18 Nathan Sidwell <nathan@codesourcery.com>
697 * optimize.c (maybe_clone_body): Don't set MARK_USED on parameters
699 * semantics.c (expand_body): Set it here on the remaining clones.
701 2003-09-18 Roger Sayle <roger@eyesopen.com>
703 * lex.c (init_operators): Remove operator_name_info for FFS_EXPR.
704 * class.c (instantiate_type): Remove FFS_EXPR case.
706 2003-09-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
708 * ChangeLog: Fix recent commit.
710 2003-09-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
712 * ChangeLog: Add PR number to patch for PR c++/12316.
714 2003-09-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
716 * error.c (dump_type): Simplify. Use pp_type_specifier_seq for
718 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Fix thinko.
720 2003-09-17 Richard Henderson <rth@redhat.com>
722 * semantics.c (expand_body): Don't save/restore input_location.
724 2003-09-17 Mark Mitchell <mark@codesourcery.com>
727 * cp-tree.h (tsubst_flags_t): Add tf_conv.
728 * class.c (standard_conversion): Pass tf_conv to
730 (resolve_address_of_overloaded_function): Do not call mark_used
731 when just checking conversions.
734 * cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define.
735 * cp-tree.h (cxx_builtin_type_decls): Declare.
736 * decl.c (builtin_type_decls): New variables.
737 (cxx_builtin_type_decls): New function.
738 (record_builtin_type): Add to builtin_type_decls.
740 2003-09-17 Richard Henderson <rth@redhat.com>
743 * semantics.c (expand_or_defer_fn): Inc/dec function_depth.
745 2003-09-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
748 * typeck.c (comptypes): Don't ICE when its first argument is
750 (compparms): Reverse the arguments of same_type_p.
752 2003-09-15 Nathan Sidwell <nathan@codesourcery.com>
755 * typeck.c (convert_arguments): Return error_mark_node for an
756 incomplete parameter. Make error message more informative.
758 2003-09-12 Mark Mitchell <mark@codesourcery.com>
761 * class.c (maybe_note_name_used_in_class): Refine test for whether
762 or not we are in a class scope.
764 * cp-tree.h (language_function): Remove x_expanding_p.
765 (expanding_p): Remove.
766 (doing_semantic_analysis_p): Remove.
767 (scope_kind): Add sk_function_parms, sk_class,
769 (innermost_scope_kind): New method.
770 * call.c (cxx_type_promotes_to): Use type_decays_to.
771 * cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine.
772 (LANG_HOOKS_POPLEVEL): Likewise.
773 * decl.c (cp_binding_level): Remove parm_flag, template_parms_p,
774 template_spec_p, namespace_p, is_for_scope, is_try_scope, and
775 is_catch_scope. Add kind and explicit_spec_p.
776 (cxx_scope_descriptor): Use a lookup table.
777 (find_class_binding_level): Use "kind" field in binding_level, not
779 (pop_binding_level): Likewise.
780 (innermost_nonclass_level): Likewise.
781 (toplevel_bindings_p): Likewise.
782 (namespace_bindings_p): Likewise.
783 (template_parm_scope_p): Likewise.
784 (innermost_scope_kind): New method.
785 (current_tmpl_spec_kind): Use "kind" field in binding_level, not
787 (pushlevel): Remove check for doing_semantic_analysis_p.
788 (begin_scope): Simplify.
789 (add_decl_to_level): Use "kind" field in binding_level, not
791 (push_local_binding): Likewise.
792 (pop_label): Remove check for doing_semantic_analysis_p.
793 (poplevel): Use "kind" field in binding_level, not
795 (set_block): Remove check for doing_semantic_analysis_p.
796 (pushlevel_class): Use "kind" field in binding_level, not
798 (poplevel_class): Likewise.
799 (initial_push_namespace_scope): Likewise.
800 (maybe_push_to_top_level): Likewise.
801 (set_identifier_type_value_with_scope): Likewise.
802 (pop_everything): Likewise.
803 (maybe_process_template_type_declaration): Likewise.
805 (pushdecl): Likewise.
806 (pushdecl_with_scope): Likewise.
807 (check_previous_goto_1): Likewise.
808 (define_label): Likewise.
809 (finish_case_label): Likewise.
810 (lookup_tag): Likewise.
811 (unqualified_namespace_lookup): Likewise.
812 (lookup_name_real): Likewise.
813 (lookup_name_current_level): Likewise.
814 (lookup_type_current_level): Likewise.
815 (record_builtin_type): Likewise.
816 (cp_make_fname_decl): Likewise.
817 (maybe_inject_for_scope_var): Likewise.
818 (cp_finish_decl): Remove check for doing_semantic_analysis_p.
819 (start_function): Use begin_scope, not pushlevel.
820 (finish_function): Use "kind" field in binding_level, not
822 (start_method): Use begin_scope, not pushlevel.
823 (make_label_decl): Do not check expanding_p.
824 (save_function-data): Do not set expanding_p.
825 (cxx_push_function_context): Do not clear expanding_p.
826 * semantics.c (cxx_expand_function_start): Do not set expanding_p.
828 2003-09-14 Mark Mitchell <mark@codesourcery.com>
830 * class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for
831 an bit-field whose width exceeds that of its type.
833 2003-09-14 Geoffrey Keating <geoffk@apple.com>
835 * rtti.c (get_tinfo_decl): Set TREE_PUBLIC for typeinfo decls.
837 2003-09-14 Kazu Hirata <kazu@cs.umass.edu>
839 * ChangeLog: Follow spelling conventions.
840 * parser.c: Likewise.
842 2003-09-13 Richard Henderson <rth@redhat.com>
844 * decl2.c (finish_file): Check cgraph_assemble_pending_functions
845 during relaxation loop.
847 2003-09-11 David Edelsohn <edelsohn@gnu.org>
849 * decl2.c (var_finalized_p): Swap arms of conditional.
851 2003-09-10 Nathan Sidwell <nathan@codesourcery.com>
854 * typeck.c (build_address): If it is a function, mark it used.
855 (build_unary_op): Do not lose object's side-effects when taking
856 address of static member function.
857 * class.c (resolve_address_of_overloaded_function): Use
858 tsubst_flags_t parameter. Only expect overload sets. Adjust.
859 (instantiate_type): Adjust flags passing. Do not lose object's
860 side-effects when taking address of static member function.
862 2003-09-11 Richard Henderson <rth@redhat.com>
864 * semantics.c (expand_or_defer_fn): Update for new
865 cgraph_finalize_function argument.
867 2003-09-10 Richard Henderson <rth@redhat.com>
869 * decl2.c (cxx_callgraph_analyze_expr): Mark argument unused.
871 2003-09-10 Jan Hubicka <jh@suse.cz>
873 * decl2.c (var_finalized_p): New.
874 (maybe_emit_vtables, write_out_vars, finish_file): Use it.
876 2003-09-10 Richard Henderson <rth@redhat.com>
878 * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of
879 mark_member_pointers.
880 (lower_function): Remove.
881 * cp-tree.h: Update to match.
882 * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New.
883 (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove.
885 2003-09-09 Richard Henderson <rth@redhat.com>
887 * semantics.c (expand_or_defer_fn): Update call to
888 cgraph_finalize_function.
890 * semantics.c (expand_or_defer_fn): Use cgraph_finalize_function
893 * decl2.c (finish_file): Avoid out-of-bounds array reference
896 2003-09-09 Richard Henderson <rth@redhat.com>
898 * decl2.c (mark_member_pointers): Rename from
899 mark_member_pointers_and_eh_handlers and don't check eh handlers.
901 2003-09-09 Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
904 * method.c (use_thunk): Clear DECL_RTL of copied nodes.
906 2003-09-08 Mark Mitchell <mark@codesourcery.com>
908 * cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to
909 c_register_builtin_type.
912 * decl2.c (add_function): Do not complain about seeing the same
914 * semantics.c (perform_koenig_lookup): Improve documentation.
917 * pt.c (try_one_overload): Add addr_p parameter.
918 (resolve_overloaded_unification): Pass it.
920 2003-09-08 Richard Henderson <rth@redhat.com>
922 * optimize.c (maybe_clone_body): Inc/dec function_depth.
924 2003-09-08 Richard Henderson <rth@redhat.com>
926 * decl.c (finish_function): Clear current_function_decl.
927 * decl2.c (mark_used): Don't push/pop gc context.
928 * optimize.c (optimize_function): Likewise.
929 * tree.c (cp_cannot_inline_tree_fn): Likewise.
930 * pt.c (instantiate_decl): Inc/dec function_depth instead.
931 * semantics.c (expand_body): Update for tree_rest_of_compilation
934 2003-09-07 Gabriel Dos Reis <gcc@integrable-solutions.net>
937 * error.c (dump_decl): Handle namespace-alias-definition.
938 * decl.c (warn_extern_redeclared_static): There is no point in
939 checking changes in storage class specifier for a namespace
941 (duplicate_decls): Tidy diagnostic message.
942 * cxx-pretty-print.c (pp_cxx_left_brace): New macro.
943 (pp_cxx_right_brace): Likewise.
944 (pp_cxx_original_namespace_definition): New function.
945 (pp_cxx_namespace_alias_definition): Likewise.
946 (pp_cxx_declaration): Use them. Handle NAMESPACE_DECLs.
948 2003-09-07 Jan Hubicka <jh@suse.cz>
950 * decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
951 Avoid re-emitting variables in unit-at-a-time mode.
953 2003-09-06 Mark Mitchell <mark@codesourcery.com>
956 * call.c (standard_conversion): Improve comments.
957 (perform_direct_initialization): Make sure we return an expression
959 * typeck.c (build_static_cast): Check for ambiguity and
960 accessibility when performing conversions.
962 2003-09-06 Gabriel Dos Reis <gdr@integrable-solutions.net>
964 * cp-tree.h (add_binding): Remove declaration.
965 * name-lookup.h (supplement_binding): Declare.
966 * decl.c (add_binding): Move to name-lookup.c.
967 (push_local_binding): Adjust.
968 (push_class_binding): Likewise.
969 (set_identifier_type_value_with_scope): Likewise.
970 * name-lookup.c (supplement_binding): Rename from add_binding.
971 Return a bool. Improve documentation.
972 (set_namespace_binding): Adjust.
973 * Make-lang.in (cp/name-lookup.o): Depend on toplev.h
975 2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
978 * class.c (pushclass): Push dependent using decls for nested
979 classes of templates too.
981 2003-09-06 Roger Sayle <roger@eyesopen.com>
984 * class.c (resolve_address_of_overloaded_function): When building
985 list of matching non-template function decls, ignore anticipated
986 declarations of undeclared or shadowed GCC builtins.
988 2003-09-06 Steven Bosscher <steven@gcc.gnu.org>
991 * decl.c (define_label): Remove unreachable timevar pop.
992 Always return the decl, even if the definition is invalid.
994 2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
997 * parser.c (cp_parser_late_parsing_default_args): Push & pop the
998 unparsed functions queue.
1000 2003-09-05 Mark Mitchell <mark@codesourcery.com>
1003 * call.c (perform_direct_initialization): Correct logic for
1004 direct-initialization of a class type.
1007 * pt.c (lookup_template_function): Robustify.
1009 2003-09-05 Nathan Sidwell <nathan@codesourcery.com>
1012 * pt.c (tsubst_qualified_id): Make sure we get a non-type.
1013 (tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as
1014 is_type_p to lookup_qualified_name.
1016 * semantics.c (finish_call_expr): Refactor some code.
1019 * cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
1020 (build_min_non_dep): Declare.
1021 * tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
1022 (build_min_non_dep): New.
1023 * cvt.c (convert_to_void): Don't explicitly copy
1024 TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
1025 * call.c (build_new_method_call): Use build_min_non_dep.
1026 * decl2.c (grok_array_decl): Likewise.
1027 (build_offset_ref_call_from_tree): Likewise.
1028 * typeck.c (finish_class_member_access_expr,
1029 build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
1030 build_x_conditional_expr, build_x_compound_expr): Likewise.
1031 (build_static_cast, build_reinterpret_cast,
1032 build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
1033 * typeck2.c (build_x_arrow): Use build_min_non_dep.
1034 (build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
1036 * rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
1037 (build_dynamic_cast): Set TREE_SIDE_EFFECTS.
1038 * pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.
1040 2003-09-04 Richard Henderson <rth@redhat.com>
1042 * decl2.c (mark_member_pointers_and_eh_handlers): Update for
1043 change in cgraph_mark_needed_node arguments.
1045 2003-09-02 Geoffrey Keating <geoffk@apple.com>
1048 * decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
1049 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1051 2003-09-04 Nathan Sidwell <nathan@codesourcery.com>
1053 * cp-tree.h (finish_sizeof, finish_alignof): Remove.
1054 (expr_sizeof): Replace with ...
1055 (cxx_sizeof_or_alignof_expr): ... here.
1056 (cxx_sizeof_or_alignof_type): Make complain parameter a bool.
1057 * parser.c (cp_parser_unary_expression): Commonize alignof and
1059 * pt.c (tsubst_copy_and_build): Adjust alignof and sizeof
1061 * semantics.c (finish_sizeof, finish_alignof): Remove.
1062 * typeck.c (cxx_sizeof_or_alignof_type): Complain parameter
1063 becomes bool. Set TREE_READONLY.
1064 (expr_sizeof): Replace with ...
1065 (cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS.
1067 2003-09-04 Mark Mitchell <mark@codesourcery.com>
1069 Remove cast-as-lvalue extension.
1070 * call.c (build_conditional_expr): Correct formatting.
1071 (convert_like_real): Use lvalue_p, not non_cast_lvalue_p.
1072 (initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p.
1073 * cp-tree.h (non_cast_lvalue_p): Remove.
1074 (real_non_cast_lvalue_p): Remove.
1075 (non_cast_lvalue_or_else): Remove.
1076 * tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter.
1077 (real_lvalue_p): Adjust call to lvalue_p_1.
1078 (non_cast_lvalue_p): Remove.
1079 (non_cast_lvalue_or_else): Remove.
1080 (lvalue_p): Adjust call to lvalue_p_1.
1081 (lvalue_or_else): Simplify.
1082 * typeck.c (build_unary_op): Use lvalue_or_else, not
1083 non_cast_lvalue_or_else.
1084 (build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p.
1086 2003-09-03 DJ Delorie <dj@redhat.com>
1088 * decl.c (finish_function): Pass fndecl to aggregate_value_p.
1090 2003-09-03 Mark Mitchell <mark@codesourcery.com>
1093 * class.c (include_empty_classes): Correct logic for ABI version 1.
1095 2003-09-03 Richard Henderson <rth@redhat.com>
1097 * optimize.c (optimize_function): Push/pop ggc context around
1098 the call to optimize_inline_calls.
1100 2003-09-02 Scott Brumbaugh <scottb.lists@verizon.net>
1103 * parser.c (cp_parser_decl_specifier_seq): Add check for a
1104 duplicate friend decl-specifier.
1106 2003-09-02 Mark Mitchell <mark@codesourcery.com>
1109 * pt.c (convert_nontype_argument): Correct representation of
1110 REFERENCE_TYPE expressions.
1113 * cp-tree.h (KOENIG_LOOKUP_P): New macro.
1114 (finish_call_expr): Change prototype.
1115 * parser.c (cp_parser_postfix_expression): Adjust call to
1117 * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
1118 * semantics.c (finish_call_expr): Add koenig_p parameter.
1120 2003-09-01 Mark Mitchell <mark@codesourcery.com>
1123 * cp-tree.h (initialize_reference): Change prototype.
1124 * call.c (initialize_reference): Add cleanup parameter.
1125 * decl.c (grok_reference_init): Likewise.
1126 (check_initializer): Likewise.
1127 (cp_finish_decl): Insert a CLEANUP_STMT if necessary.
1128 (duplicate_decls): When replacing an anticipated builtin, do not
1130 * typeck.c (convert_for_initialization): Correct call to
1131 initialize_reference.
1134 * pt.c (dependent_type_p_r): Pass only the innermost template
1135 arguments to any_dependent_template_arguments_p.
1137 2003-09-01 Josef Zlomek <zlomekj@suse.cz>
1139 * error.c (dump_expr): Kill BIT_ANDTC_EXPR.
1140 * lex.c (init_operators): Kill BIT_ANDTC_EXPR.
1141 * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
1142 * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
1143 (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
1145 2003-08-29 Mark Mitchell <mark@codesourcery.com>
1148 * pt.c (build_non_dependent_expr): Do not build a
1149 NON_DEPENDENT_EXPR for a STRING_CST.
1152 * search.c (add_conversions): Avoid adding two conversion
1153 operators for the same type.
1155 2003-08-29 Mark Mitchell <mark@codesourcery.com>
1158 * pt.c (tsubst_copy_and_build): Correct handling of
1159 address-of-label extension.
1160 * semantics.c (finish_goto_stmt): The address of a label must go
1161 through the lvalue-to-rvalue conversion.
1163 2003-08-29 Richard Henderson <rth@redhat.com>
1164 Jason Merrill <jason@redhat.com>
1166 * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
1167 (LANG_HOOKS_RTL_EXPAND_STMT): New.
1168 * cp-tree.h (cxx_expand_function_start): Declare.
1169 * decl.c (start_function): Use allocate_struct_function.
1170 Move stmts_are_full_exprs_p assertion from expand_body.
1171 Do not free_after_parsing or free_after_compilation.
1172 (cxx_push_function_context): Move code to set struct function
1173 data from genrtl_start_function.
1174 * optimize.c (optimize_function): Don't inc/dec function_depth.
1175 * semantics.c (expand_body): Use tree_rest_of_compilation.
1176 (cxx_expand_function_start): Rename from genrtl_start_function,
1177 omit bits done by tree_rest_of_compilation.
1178 (genrtl_finish_function): Remove.
1179 (clear_decl_rtl): Move to ../tree-optimize.c.
1181 2003-08-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
1184 * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
1186 * cxx-pretty-print.h: Declare.
1187 * error.c (dump_template_parameter): Use it.
1188 (dump_type): Likewise.
1190 2003-08-28 Mark Mitchell <mark@codesourcery.com>
1192 * init.c (decl_constant_value): Deal with COND_EXPR specially.
1193 * call.c (build_conditional_expr): Revert previous patch.
1195 PR optimization/5079
1196 * call.c (build_conditional_expr): Use decl_constant_value to
1197 simplify the arguments.
1199 2003-08-26 Dan Nicolaescu <dann@ics.uci.edu>
1201 * parser.c (struct cp_token): Use enum bitfields.
1202 (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
1203 512B allocation unit.
1204 (cp_parser_token_tree_map_node): Use enum bitfields.
1206 2003-08-26 Nathan Sidwell <nathan@codesourcery.com>
1209 * decl.c (push_class_level_binding): Correct old_decl value from
1210 my 2003-07-29 reorganization.
1212 * call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
1213 (build_new_method_call): Add goto finish.
1214 * semantics.c (simplify_aggr_init_exprs_r): Don't set
1215 TREE_SIDE_EFFECTS on a call.
1217 2003-08-25 Richard Henderson <rth@redhat.com>
1219 * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
1221 2003-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1223 * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
1224 (cxx_pretty_printer): Adjust base type.
1225 (pp_cxx_function_specifier): Declare.
1226 * cxx-pretty-print.c (pp_cxx_whitespace): New macro.
1227 (pp_cxx_left_paren): Likewise.
1228 (pp_cxx_right_paren): Likewise.
1229 (pp_cxx_dot): Likewise.
1230 (pp_cxx_arrow): Likewise.
1231 (pp_cxx_semicolon): Likewise.
1232 (pp_cxx_identifier): Likewise.
1233 (pp_cxx_cv_qualifier_seq): Likewise.
1234 (pp_cxx_storage_class_specifier): Likewise.
1235 (pp_cxx_expression_list): Likewise.
1236 (pp_cxx_space_for_pointer_operator): Likewise.
1237 (pp_cxx_init_declarator): Likewise.
1238 (pp_cxx_call_argument_list): Likewise.
1239 (pp_cxx_nonconsecutive_character): Tidy.
1240 (pp_cxx_conversion_function_id): New function.
1241 (pp_cxx_template_id): Likewise.
1242 (pp_cxx_template_keyword_if_needed): Likewise.
1243 (pp_cxx_nested_name_specifier): Likewise.
1244 (pp_cxx_unqualified_id): Tidy
1245 (pp_cxx_qualified_id): Handle more nodes.
1246 (pp_cxx_primary_expression): Tidy.
1247 (pp_cxx_postfix_expression): Likewise.
1248 (pp_cxx_new_expression): Tidy.
1249 (pp_cxx_delete_expression): Likewise.
1250 (pp_cxx_cast_expression): New function.
1251 (pp_cxx_pm_expression): Tidy.
1252 (pp_cxx_conditional_expression): Likewise.
1253 (pp_cxx_assignment_operator): New function.
1254 (pp_cxx_assignment_expression): Tidy.
1255 (pp_cxx_expression): New function.
1256 (pp_cxx_function_specifier): Likewise.
1257 (pp_cxx_decl_specifier_seq): Likewise.
1258 (pp_cxx_simple_type_specifier): Tidy.
1259 (pp_cxx_type_specifier_seq): Likewise.
1260 (pp_cxx_ptr_operator): New function.
1261 (pp_cxx_implicit_parameter_type): Likewise.
1262 (pp_cxx_parameter_declaration): Tidy.
1263 (pp_cxx_parameter_declaration_clause): New function.
1264 (pp_cxx_exception_specification): Likewise.
1265 (pp_cxx_direct_declarator): Tidy.
1266 (pp_cxx_declarator): Likewise.
1267 (pp_cxx_ctor_initializer): New function.
1268 (pp_cxx_function_definition): Likewise.
1269 (pp_cxx_abstract_declarator): Tidy.
1270 (pp_cxx_direct_abstract_declarator): Likewise.
1271 (pp_cxx_type_id): Likewise.
1272 (pp_cxx_exception_declaration): New function.
1273 (pp_cxx_statement): Likewise.
1274 (pp_cxx_simple_declaration): Likewise.
1275 (pp_cxx_template_parameter_list): Likewise.
1276 (pp_cxx_template_parameter): Likewise.
1277 (pp_cxx_template_declaration): Likewise.
1278 (pp_cxx_explicit_specialization): Likewise.
1279 (pp_cxx_explicit_instantiation): Likewise.
1280 (pp_cxx_declaration): Tidy.
1281 (pp_cxx_pretty_printer_init): Initialize more fields.
1283 2003-08-25 Mark Mitchell <mark@codesourcery.com>
1286 * cp-tree.h (build_cplus_method_type): Remove.
1287 * call.c (standard_conversion): Use build_method_type_directly
1288 instead of build_cplus_method_type.
1289 * class.c (build_clone): Likewise.
1290 (adjust_clone_args): Likewise.
1291 * decl.c (build_ptrmem_type): Likewise.
1292 (grokdeclarator): Likewise.
1293 (check_function_type): Likewise.
1294 * decl2.c (grok_method_quals): Likewise.
1295 (maybe_retrofit_in_chrg): Likewise.
1296 * pt.c (copy_default_args_to_explicit_spec): Likewise.
1297 (tsubst_function_type): Likewise.
1299 * tree.c (build_cplus_method_type): Remove.
1300 * typeck.c (merge_types): Use build_method_type_directly.
1302 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1305 * search.c (dfs_access_in_type): Fix typo in comment.
1306 (dfs_accessible_queue_p): Likewise.
1307 (dfs_accessible_p): Only terminate when a friend is found.
1308 (accessible_p): Return immediately if access_in_type allows
1311 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1313 PR c++/641, c++/11876
1314 * friend.c (add_friend): Add complain parameter.
1315 (make_friend_class): Likewise.
1316 (do_friend): Adjust add_friend call.
1317 * decl.c (grokdeclarator): Adjust make_friend_class call.
1318 * parser.c (cp_parser_member_declaration): Likewise.
1319 (cp_parser_template_declaration_after_export): Likewise.
1320 * pt.c (instantiate_class_template): Adjust make_friend_class
1321 and add_friend call.
1322 * cp-tree.h (make_friend_class): Adjust declaration.
1323 (add_friend): Likewise.
1325 2003-08-21 Jason Merrill <jason@redhat.com>
1328 * call.c (build_conditional_expr): Ignore cv-qual differences for
1331 2003-08-21 Mark Mitchell <mark@codesourcery.com>
1334 * parser.c (cp_parser_id_expression): Add declarator_p parameter.
1335 (cp_parser_primary_expression): Adjust call to
1336 cp_parser_id_expression.
1337 (cp_parser_unqualified_id): Complain about the use of
1338 typedef-names in a destructor declarator.
1339 (cp_parser_postfix_expression): Adjust call to
1340 cp_parser_id_expression.
1341 (cp_parser_type_parameter): Likewise.
1342 (cp_parser_template_argument): Likewise.
1343 (cp_parser_declarator_id): Likewise.
1346 * call.c (standard_conversion): Use same_type_p, not pointer
1347 equality, to compare types.
1350 * parser.c (cp_parser_using_declaration): Check for invalid uses
1351 of template-ids here...
1352 * decl2.c (do_class_using_decl): ... rather than here.
1354 2003-08-20 Mark Mitchell <mark@codesourcery.com>
1357 * pt.c (more_specialized): Bump processing_template_decl.
1359 2003-08-21 Jason Merrill <jason@redhat.com>
1362 * decl.c (grokdeclarator): Recognize a flexible array based on the
1363 type, not the form of the declarator.
1365 2003-08-20 Jason Merrill <jason@redhat.com>
1367 * semantics.c (simplify_aggr_init_expr): Split out from
1368 simplify_aggr_init_exprs_r. Convert slot address to match
1370 * cp-tree.h: Declare it.
1371 * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
1372 DECL_NAME of a user variable.
1374 2003-08-20 Nathan Sidwell <nathan@codesourcery.com>
1377 * pt.c (build_non_dependent_expr): Look inside COND_EXPR and
1379 * semantics.c (finish_expr_stmt): Always convert to void.
1380 * typeck.c (build_x_compound_exp): Always convert to void.
1382 2003-08-19 Mark Mitchell <mark@codesourcery.com>
1385 * cp-tree.h (grok_op_properties): Change prototype.
1386 * decl.c (grok_op_properties): Add complain parameter.
1387 (grokfndecl): Pass it.
1388 * pt.c (tsubst_decl): Adjust accordingly.
1391 * decl.c (start_method): Return immediately if push_template_decl
1392 does not like the declaration.
1393 * pt.c (push_template_decl_real): Disallow member template
1397 * cp-tree.h (add_binding): Add prototype.
1398 * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
1399 (maybe_warn_about_overly_private_class): Use
1400 CLASSTYPE_DESTRUCTORS.
1401 (pushclass): Adjust call to set_identifier_type_value.
1402 * decl.c (add_binding): Give it external linkage.
1403 (push_local_binding): Adjust call to add_binding.
1404 (push_class_binding): Likewise.
1405 (set_identifier_type_value_with_scope): Change prototype. Use
1406 add_binding for global bindings.
1407 (set_identifier_type_value): Adjust accordingly.
1408 (pushtag): Likewise.
1409 (pushdecl): Use set_identifier_type_value, not
1410 set_identifier_type_value_with_scope.
1411 (pushdecl_namespace_level): Adjust calls to
1412 SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
1413 (pushdecl_class_level): Likewise.
1414 (lookup_tag): Use select_decl.
1415 (select_decl): Improve comment.
1416 (record_builtin_type): Do not call pushdecl.
1417 (cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
1418 (cp_finish_decl): Adjust call to set_identifier_type_value.
1419 (check_elaborated_type_specifier): Improve checks for invalid uses
1421 (xref_tag): Adjust call to check_elaborated_type_specifier.
1422 * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
1423 * name-lookup.c (set_namespace_binding): Use add_binding.
1424 * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
1425 rather than an IDENTIFIER_NODE, to represent built-in types, if
1426 requested by the caller.
1427 (cp_parser_postfix_expression): Adjust call.
1428 (cp_parser_type_specifier): Likewise.
1429 (cp_parser_elaborated_type_specifier): Adjust call to
1430 check_elaborated_type_specifier.
1431 * typeck2.c (build_functional_cast): Do not perform name lookups.
1434 * decl.c (expand_static_init): Remove unnecessary code.
1436 2003-08-19 Andrew Pinski <pinskia@physics.uc.edu>
1438 PR c++/10538, PR c/5582
1439 * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
1441 2003-08-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1444 * init.c (build_offset_ref): Perform access checking for
1445 pointer to member correctly.
1447 2003-08-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
1449 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
1451 2003-08-18 Nathan Sidwell <nathan@codesourcery.com>
1454 * cp-tree.h (finish_stmt_expr): Add bool parameter.
1455 * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
1456 adjust the stmt_expr here.
1457 (build_vec_init): Use finish_stmt_expr_expr, convert result to
1459 * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
1461 * pt.c (tsubst_copy): Likewise.
1462 * semantics.c (finish_stmt_expr): Add parameter.
1464 * pt.c (instantiate_class_template): Push to class's scope before
1467 2003-08-17 Jan Hubicka <jh@suse.cz>
1470 * semantics.c (finish_id_expression): Mark all functions as used.
1472 2003-08-16 Nathan Sidwell <nathan@codesourcery.com>
1475 * cvt.c (convert_to_void): Indicate which side of conditional has
1476 no effects, and rhs of comma operator. Test for no sideeffect
1477 expressions here and always build a convert expr.
1478 * init.c (expand_default_init): Convert the init to void.
1479 * typeck.c (build_x_compound_expr): Do not check for side effects
1481 (build_compound_expr): Do not convert lhs when building a
1484 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
1486 * cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
1487 * decl2.c (build_offset_ref_call_from_tree): Use
1488 build_non_dependent_expr.
1489 * error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
1490 * pt.c (build_non_dependent_expr): Set operand.
1492 2003-08-14 Jan Hubicka <jh@suse.cz>
1494 * decl2.c (mark_member_pointers): Rename to...
1495 (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
1496 (lower_function): Update call.
1497 * except.c (eh_type_info): Break out from ...
1498 (build_eh_type): ... here; tinfo is already used.
1499 (finish_eh_spec_block): Mark tinfos as used.
1500 * semantics.c (finish_handler_params): Mark tinfo as used.
1501 * cp-tree.h (eh_type_info): Declare.
1503 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
1505 * pt.c (instantiate_class_template): Set location before
1508 * decl.c (make_typename_type): Use my_friendly_assert.
1509 * pt.c (tsubst_aggr_type): Rearrange context substitution.
1511 2003-08-14 Jan Hubicka <jh@suse.cz>
1513 * method.c (use_thunk): Expand body directly.
1515 2003-08-12 Mark Mitchell <mark@codesourcery.com>
1518 * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
1519 determine whether or not to promote types.
1520 (convert_for_arg_passing): Likewise.
1521 * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
1523 * pt.c (tsubst_decl): Do not expect it to be set.
1527 * cp-tree.h (check_elaborated_type_specifier): Declare.
1528 (handle_class_head): Remove.
1529 (note_got_semicolon): Likewise.
1530 (note_list_got_semicolon): Likewise.
1531 (finish_class_definition): Likewise.
1532 * decl.c (check_elaborated_type_specifier): Make it public.
1534 (handle_class_head): Remove.
1535 * parser.c (cp_parser_elaborated_type_specifier): Use
1536 check_elaborated_type_specifier.
1537 (cp_parser_class_specifier): Do not call finish_class_definition.
1538 (cp_parser_class_head): Or handle_class_head. Check for
1539 over-qualified names.
1540 * semantics.c (finish_class_definition): Remove.
1542 * parser.c (cp_parser_check_for_definition_in_return_type): New
1544 (cp_parser_simple_declaration): Adjust call to
1545 cp_parser_init_declarator.
1546 (cp_parser_decl_specifier_seq): Change type of
1547 declares_class_or_enum parameter.
1548 (cp_parser_explicit_instantiation): Adjust accordingly.
1549 (cp_parser_type_specifier): Change type of
1550 declares_class_or_enum parameter.
1551 (cp_parser_init_declarator): Add declares_class_or_enum
1553 (cp_parser_parameter_declaration): Adjust call to
1554 cp_parser_decl_specifier_seq.
1555 (cp_parser_function_definition): Likewise.
1556 (cp_parser_member_declaration): Likewise.
1557 (cp_parser_single_declaration): Likewise.
1559 * cp-tree.h (lang_type_class): Remove has_call_overloaded,
1560 has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
1561 (TYPE_OVERLOADS_CALL_EXPR): Remove.
1562 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
1563 (TYPE_OVERLOADS_ARROW): Likewise.
1564 (CLASSTYPE_GOT_SEMICOLON): Likewise.
1565 * class.c (check_bases): Do not set them.
1566 (finish_struct_1): Likewise.
1567 * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
1568 (build_ptrmemfunc_type): Likewise.
1569 (grok_op_properties): Do not set TYPE_OVERLOADS_*.
1570 (start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
1571 * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
1572 * lex.c (note_got_semicolon): Remove.
1573 (note_list_got_semicolon): Likewise.
1574 * parser.c (cp_parser_simple_declaration): Do not call
1575 note_list_got_semicolon.
1576 * pt.c (list_eq): Remove.
1577 (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
1578 (instantiate_class_template): Do not set TYPE_OVERLOADS*.
1579 (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
1580 * ptree.c (cxx_print_type): Do not print them.
1581 * semantics.c (finish_member_class_template): Do not call
1582 note_list_got_semicolon.
1584 2003-08-11 Aldy Hernandez <aldyh@redhat.com>
1586 * call.c (standard_conversion): Opaque pointers interconvert.
1588 * testsuite/g++.dg/other/opaque-3.C: New.
1590 2003-08-11 Mark Mitchell <mark@codesourcery.com>
1592 * typeck.c (merge_types): Handle cv-qualified pointer-to-member
1595 2003-08-10 Mark Mitchell <mark@codesourcery.com>
1598 * cp-tree.h (get_vbase): Remove.
1599 (get_vbase_types): Remove.
1600 * init.c (expand_member_init): Correct logic for looking up base
1603 2003-08-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1605 * error.c (dump_expr): Tidy.
1606 * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
1607 (pp_cxx_begin_template_argument_list): Likewise.
1608 (pp_cxx_end_template_argument_list): Likewise.
1609 (is_destructor_name): Likewise.
1610 (pp_cxx_unqualified_id): Likewise.
1611 (pp_cxx_qualified_id): Likewise.
1612 (pp_cxx_id_expression): Likewise.
1613 (pp_cxx_new_expression): Likewise.
1614 (pp_cxx_delete_expression): Likewise.
1615 (pp_cxx_pm_expression): Likewise.
1616 (pp_cxx_type_specifier): Rework.
1617 (pp_cxx_type_id): Likewise.
1618 (pp_cxx_primary_expression): Likewise.
1619 (pp_cxx_postfix_expression): Likewise.
1620 (pp_cxx_unary_expression): Likewise.
1621 (pp_cxx_multiplicative_expression): Likewise.
1622 (pp_cxx_conditional_expression): Likewise.
1623 (pp_cxx_assignment_expression): Likewise.
1624 (pp_cxx_pretty_printer_init): Tidy.
1626 2003-08-10 Nathan Sidwell <nathan@codesourcery.com>
1628 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
1629 NODE is always a TREE_VEC of nonzero size.
1630 (NUM_TMPL_ARGS): NODE is always a TREE_VEC.
1631 * decl2.c (arg_assoc): Template args will be a vec.
1632 * error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
1633 dump_template_argument_list.
1634 (dump_template_parms): Args will be a vec.
1635 * parser.c (cp_parser_template_argument_list): Produce a
1637 * pt.c (coerce_template_parms): Args are always vectors.
1638 (mangle_class_name_for_template): Likewise.
1639 (lookup_template_function): Likewise.
1640 (lookup_template_class): Likewise.
1641 (tsubst_template_args): Likewise.
1642 (tsubst_baselink): Use tsubst_template_args.
1643 (tsubst_qualified_id): Likewise.
1644 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
1645 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
1646 (any_dependent_template_args_p): Args are always vectors.
1647 * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
1650 * call.c (convert_like_real): Add rvalue binding error message.
1651 * error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
1655 * pt.c (dependent_type_p_r): A dependent template-id is a class
1656 type with dependent template arguments, or a bound template
1658 (type_dependent_expression_p): A template function decl cannot
1659 have a dependent context.
1661 2003-08-07 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1664 * parser.c (cp_parser_class_name): Return immediately when scope
1667 2003-08-07 Aldy Hernandez <aldyh@redhat.com>
1669 * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
1671 * cp/call.c (standard_conversion): Support opaque types.
1673 (strip_top_quals): Use cp_build_qualified_type instead of
1676 * cp/typeck.c (convert_for_assignment): Support opaque types.
1678 * testsuite/g++.dg/other/opaque-1.C: New.
1680 * testsuite/g++.dg/other/opaque-2.C: New.
1682 2003-08-06 Aldy Hernandez <aldyh@redhat.com>
1684 * decl.c (grokparms): Use cp_build_qualified_type instead
1687 2003-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
1689 * cxx-pretty-print.h: New file.
1690 * cxx-pretty-print.c: Likewise.
1691 * error.c (scratch_pretty_printer): Change type.
1693 (dump_aggr_type): Likewise.
1694 (dump_global_iord): Likewise.
1695 (dump_expr): Likewise.
1696 (dump_char): Remove.
1697 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
1698 (cxx_initialize_diagnostics): New function.
1699 * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
1700 (CXX_PRETTY_PRINT_H): New variable.
1701 (cp/cxx-pretty-print.o): New rule.
1702 (cp/cp-lang.o): Update dependence.
1703 (cp/error.o): Likewise.
1705 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
1707 * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
1708 (DECL_DECLARED_INLINE_P): Remove.
1709 * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
1710 if decl is a FUNCTION_DECL. This never made sense, but now it is
1711 required to avoid a tree check failure.
1712 * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
1713 * optimize.c (maybe_clone_body): Likewise.
1715 2003-08-04 Roger Sayle <roger@eyesopen.com>
1717 * decl.c (cxx_insert_default_attributes): Delete.
1718 * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
1719 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
1721 2003-08-03 Nathan Sidwell <nathan@codesourcery.com>
1724 * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
1728 * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
1731 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
1734 * cp-tree.def (USING_DECL): Document its type.
1735 * class.c (pushclass): If we're entering a template, push any
1736 dependent using decls it has.
1737 * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
1739 * pt.c (tsubst_decl) <USING_DECL case>: Set type.
1740 (tsubst): Remove USING_DECL checks.
1741 (type_dependent_expression_p): Remove USING_DECL case.
1742 * semantics.c (finish_member_declaration): A USING_DECL's type
1743 indicates whether it is dependent.
1745 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
1747 * cp-tree.h (pushclass): Remove unneeded parameter.
1748 * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
1749 (push_nested_class): Adjust pushclass call.
1750 * pt.c (instantiate_class_template): Likewise.
1751 * semantics.c (begin_class_definition): Likewise.
1753 2003-08-01 Nathanael Nerode <neroden@gcc.gnu.org>
1755 * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
1757 2003-08-01 Mark Mitchell <mark@codesourcery.com>
1760 * decl.c (decls_match): Don't ignore the types of template
1764 * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
1766 2003-08-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1768 PR c++/8442, c++/8806
1769 * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
1771 (check_elaborated_type_specifier): Add allow_template_p
1772 parameter. Check tag mismatch and class template.
1773 (xref_tag): Add template_header_p parameter. Add assertion
1774 that name is an IDENTIFIER_NODE. Remove implicit typename
1775 warning. Simplify lookup process if globalize is true.
1776 (cxx_init_decl_processing): Adjust call to xref_tag.
1777 (xref_tag_from_type): Likewise.
1778 * decl2.c (handle_class_head): Likewise.
1779 * parser.c (cp_parser_elaborated_type_specifier,
1780 cp_parser_class_head): Likewise.
1781 * rtti.c (init_rtti_processing, build_dynamic_cast1,
1782 tinfo_base_init, emit_support_tinfos): Likewise.
1783 * class.c (is_base_of_enclosing_class): Remove.
1784 * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
1785 template template argument.
1786 * cp-tree.h (xref_tag): Adjust declaration.
1787 (is_base_of_enclosing_class): Remove.
1788 * NEWS: Document template template argument change.
1790 2003-08-01 Nathan Sidwell <nathan@codesourcery.com>
1792 * parser.c (cp_parser_init_declarator,
1793 cp_paser_member_declaration): Reformat.
1794 * pt.c (lookup_template_class, type_unification_real, unify,
1795 type_dependent_expression_p): Reformat.
1798 * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
1800 (finish_stmt_expr_expr): Declare.
1801 * parser.c (cp_parser_primary_expression): Tell
1802 cp_parser_compount_statement that it is a statement expression.
1803 (cp_parser_statement, cp_parser_labeled_statement,
1804 cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
1805 in_statement_expr_p parameter.
1806 (cp_parser_expression_statement): Likewise. Call
1807 finish_stmt_expr_expr for final expression of a statement
1809 (cp_parser_for_init_statement,
1810 cp_parser_implicitly_scoped_statement,
1811 cp_parser_already_scoped_statement, cp_parser_function_definition,
1812 cp_parser_try_block, cp_parser_handled): Adjust.
1813 * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
1814 (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
1815 (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
1816 * semantics.c (finish_expr_stmt): Do not deal with statement
1818 (begin_stmt_expr): Clear last_expr_type.
1819 (finish_stmt_expr_expr): New.
1820 (finish_stmt_expr): Process the value expression.
1822 * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
1823 compound expr inside the target's initializer.
1826 * parser.c (cp_parser_primary_expression): Do not set
1827 non-constant-p merely because it is a dependent scope.
1830 * decl2.c (do_class_using_decl): Set type to NULL_TREE.
1831 * semantics.c (finish_expr_stmt): Do not convert to void in a
1834 2003-07-31 Nathan Sidwell <nathan@codesourcery.com>
1836 * pt.c (coerce_template_parms): Refactor.
1837 (fn_type_unification): Increment processing_template_decl when
1838 tsubsting an incomplete set of explicit args.
1841 * pt.c (instantiate_class_template): Increment
1842 processing_template_decl around the tsubst of a template member
1844 (tsubst_qualified_id): Assert we do not have a dependent scope.
1846 * pt.c (coerce_template_template_parms, lookup_template_class,
1847 can_complete_type_without_circularity, instantiate_class_template,
1848 tsubst_decl, unify): Reformat.
1850 2003-07-31 Jan Hubicka <jh@suse.cz>
1852 * decl2.c (maybe_make_one_only): Use mark_referenced.
1853 * method.c (use_thunk): Likewsie.
1855 2003-07-30 Jan Hubicka <jh@suse.cz>
1857 * class.c (build_vtable_entry_ref): Kill.
1858 (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
1859 (build_vfn_ref): Do not call build_vtable_entry_ref.
1860 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
1861 * cp-tree.h (prepare_assemble_variable): Kill.
1862 * cp-decl.c (prepare_assemble_variable): Kill.
1864 2003-07-29 Geoffrey Keating <geoffk@apple.com>
1866 * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
1867 of setting valid_pch by hand.
1869 2003-07-29 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1871 * decl.c (finish_enum): Initialize underlying_type.
1873 2003-07-29 Nathan Sidwell <nathan@codesourcery.com>
1876 * decl.c (add_binding): Add bval local variable.
1877 (push_class_level_binding): Likewise. Allow a USING_DECL to be
1879 * decl2.c (do_class_using_decl): The type of a using decl is
1881 * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
1882 function call lookup code.
1883 * pt.c (tsubst): A USING_DECL will have unknown type.
1884 (tsubst_copy_and_build): Allow a using decl.
1885 (type_dependent_expression_p): A USING_DECL will make it
1887 * semantics.c (finish_member_declaration): Push a dependent using
1890 2003-07-28 Mark Mitchell <mark@codesourcery.com>
1893 * parser.c (cp_parser_postfix_expression): Do not call mark_used.
1894 * semantics.c (finish_id_expression): Call mark_used for all
1897 2003-07-28 Mark Mitchell <mark@codesourcery.com>
1900 * call.c (standard_conversion): Allow all integral->enumeral
1901 conversions, after marking them as bad.
1902 * decl.c (finish_enum): Make sure that all enumerators are
1903 properly converted to the underlying type.
1904 (build_enumerator): Set DECL_CONTEXT for namespace-scope
1906 * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
1907 (tsubst_enum): Tidy.
1909 * Make-lang.in (typeck.o): Depend on convert.h.
1910 (class.o): Likewise.
1912 * call.c: Include convert.h.
1913 (convert_arg_to_ellipsis): Use convert_to_real.
1914 * class.c: Include convert.h.
1915 (build_base_path): Use convert_to_integer.
1916 * rtti.c: Include convert.h.
1917 (build_headof): Use convert_to_integer.
1918 * typeck.c: Include convert.h.
1919 (decay_conversion): Use convert_to_integer.
1920 (build_unary_op): Use build_nop.
1921 (get_delta_difference): Use convert_to_integer.
1922 (build_ptrmemfunc): Avoid unnecessary conversions.
1924 2003-07-28 Jan Hubicka <jh@suse.cz>
1926 * decl2.c (mark_member_pointers): Verify that member pointer points to
1929 2003-07-28 Nathan Sidwell <nathan@codesourcery.com>
1931 * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
1932 (finish_compound_stmt): Remove no scope arg.
1933 * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
1934 end_compound_stmt calls.
1935 (expand_static_init, begin_destructor_body, begin_function_body,
1936 finish_function_body): Likewise.
1937 * decl2.c (start_objects, finish_objects,
1938 start_static_storage_duration_function,
1939 finish_static_storage_duration_function): Likewise.
1940 * init.c (begin_init_stmts, finish_init_stmts,
1941 construct_virtual_base, build_vec_init): Likewise.
1942 * method.c (do_build_assign_ref, synthesize_method): Likewise.
1943 * parser.c (cp_parser_compound_statement,
1944 cp_parser_implicitly_scoped_statement,
1945 cp_parser_already_scoped_statement): Likewise.
1946 * pt.c (tsubst_expr): Likewise.
1947 * semantics.c (begin_compound_stmt): No scope arg is a bool.
1948 (finish_compound_stmt): Remove no scope arg.
1950 * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
1953 2003-07-27 Mark Mitchell <mark@codesourcery.com>
1955 * call.c (standard_conversion): Tweak handling of
1956 pointer-to-member types.
1957 * pt.c (tsubst): Correctly qualify pointers-to-data member types.
1958 * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
1959 pointer-to-data member types.
1961 2003-07-27 Nathan Sidwell <nathan@codesourcery.com>
1963 * parser.c (cp_parser_type_parameter): Reformat.
1964 (cp_parser_parameter_declaration): Deprecate default args where
1967 2003-07-26 Nathan Sidwell <nathan@codesourcery.com>
1971 * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
1972 (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
1973 * init.c (begin_init_stmts): Make static. Return is_global
1974 value. Always call begin_stmt_expr.
1975 (finish_init_stmts): Make static. Add is_global parm. Always
1976 building a stmt tree.
1977 (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
1978 (build_vec_init): Likewise. Always building a stmt tree.
1979 (expand_default_init): Always building a stmt tree.
1980 (get_temp_regvar): Likewise.
1981 * semantics.c (begin_global_stmt_expr,
1982 finish_global_stmt_expr): Remove.
1984 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
1986 * cp-tree.h (build_compound_expr): Take LHS & RHS args.
1987 (build_x_compound_expr_from_list): Declare.
1988 * typeck.c (build_x_compound_expr_from_list): New.
1989 (build_x_compound_expr): Adjust.
1990 (build_compound_expr): Remove unreachable code. Take two
1992 * decl.c (grok_reference_init): Use
1993 build_x_compound_expr_from_list.
1994 (expand_static_init): Adjust build_compound_expr call.
1995 (cxx_maybe_build_cleanup): Likewise.
1996 * init.c (perform_member_init): Use
1997 build_x_compound_expr_from_list.
1998 (build_new_1): Likewise.
1999 (build_vec_delete): Adjust build_compound_expr calls.
2000 (build_vbase_delete): Likewise.
2001 * typeck2.c (store_init_value): Use
2002 build_x_compound_expr_from_list.
2003 (build_functional_cast): Likewise.
2005 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2007 * cp-tree.h (enum tsubst_flags_t): Add tf_user.
2008 * decl.c (make_typename_type): Pass it.
2009 * pt.c (lookup_template_class): Use it.
2010 (resolve_typename_type): Pass it.
2011 * semantics.c (finish_template_type): Pass it.
2013 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2016 * cp-tree.h (qualified_name_lookup_error): Declare.
2017 * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
2019 (tsubst_expr) <DECL_STMT case>: Likewise.
2020 (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
2021 * semantics.c (qualified_name_lookup_error): New, broken out of ...
2022 (finish_id_expression): ... here. Use it.
2024 2003-07-25 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
2026 * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
2028 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2031 * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
2032 (tsubst_template_arg): New.
2033 (tsubst_template_arg_vector): Rename to ...
2034 (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
2035 tsubst_template_arg.
2036 (coerce_template_parms): Use tsubst_template_arg for default
2038 (tsubst_template_parms): Likewise.
2039 (tsubst_aggr_type): Adjust.
2040 (tsubst_decl): Likewise.
2041 (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
2042 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
2044 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
2046 * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
2047 * error.c: Use the new pretty-printer framework.
2049 2003-07-24 Per Bothner <pbothner@apple.com>
2051 * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
2052 which causes errors messages to incorrectly mention included files.
2054 2003-07-24 Mark Mitchell <mark@codesourcery.com>
2056 * cp-tree.h (convert_to_base_statically): Declare.
2057 * call.c (build_special_member_call): Convert INSTANCE to the base
2059 * class.c (convert_to_base_statically): New method.
2060 * init.c (construct_virtual_base): Use it.
2061 * method.c (do_build_assign_ref): Fix typo in comment.
2063 2003-07-24 Jason Merrill <jason@redhat.com>
2065 * decl.c: Just set truthvalue_* to boolean_*.
2067 2003-07-24 Nathan Sidwell <nathan@codesourcery.com>
2069 * decl.c (reshape_init): Remove unreachable code.
2071 2003-07-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2074 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
2076 2003-07-23 Mark Mitchell <mark@codesourcery.com>
2079 * cp-tree.h (accessible_base_p): Declare.
2080 * call.c (build_over_call): Use it.
2081 * search.c (accessible_base_p): New function, split out from ...
2082 (lookup_base): ... here.
2085 * call.c (build_conditional_expr): Use perform_implicit_conversion
2086 and error_operand_p. Robustify.
2087 * typeck.c (build_unary_op): Use perform_implicit_conversion.
2089 2003-07-23 Nathan Sidwell <nathan@codesourcery.com>
2092 * parser.c (cp_parser_nested_name_specifier): Reset scope on
2094 (cp_parser_elaborated_type_specifier): Likewise.
2096 2003-07-22 Mark Mitchell <mark@codesourcery.com>
2098 Eliminate use of POINTER_TYPE for pointers-to-members.
2099 * call.c (standard_conversion): Rework pointer-to-member handling.
2101 (add_builtin_candidate): Likewise.
2102 (resolve_scoped_fn_name): Remove.
2103 (build_conditional_expr): Rework pointer-to-member handling.
2104 (compare_ics): Likewise.
2105 * class.c (check_field_decls): Use TYPE_PTR_P.
2106 * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
2108 * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
2109 (TYPE_PTRMEM_P): Add comment.
2110 (TYPE_PTR_P): Simplify.
2111 (TYPE_PTROB_P): Correct definition.
2112 (TYPE_PTR_TO_MEMBER_P): New macro.
2113 (TYPE_PTRMEM_CLASS_TYPE): Adjust.
2114 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2115 (resolved_scoped_fn_name): Remove declaration.
2116 (build_offset_ref): Change prototype.
2117 (resolve_offset_ref): Remove.
2118 (comp_target_types): Remove.
2119 * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
2121 (convert_to_reference): Use can_convert.
2122 (ocp_convert): Improve error handling. Rework pointer-to-member
2124 (perform_qualification_conversions): Rework pointer-to-member
2126 * decl.c (build_ptrmem_type): Handle functions too.
2127 (create_array_type_for_decl): Remove OFFSET_TYPE error message.
2128 (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
2129 (grokparms): Remove OFFSET_TYPE error message.
2130 * dump.c (cp_dump_tree): Rework pointer-to-member handling.
2131 * error.c (dump_type_prefix): Likewise.
2132 * expr.c (cplus_expand_constant): Use build_nop.
2133 * init.c (build_offset_ref): Add address_p parameter. Fold in
2134 necessary bits from resolve_offset_ref.
2135 (resolve_offset_ref): Remove.
2136 * parser.c (cp_parser_postfix_expression): Remove special case
2137 code for OFFSET_TYPE.
2138 * pt.c (convert_nontype_argument): Rework pointer-to-member
2140 (convert_template_argument): Likewise.
2142 (invalid_nontype_parm_type_p): Likewise.
2143 (dependent_type_p_r): Likewise.
2144 * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
2145 (target_incomplete_p_): Rework pointer-to-member
2147 (get_pseudo_ti_init): Likewise.
2148 (get_pseudo_ti_desc): Likewise.
2149 * semantics.c (finish_qualified_id_expr): Adjust call to
2150 build_offset_ref. Remove use of resolve_offset_ref.
2151 * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
2152 * typeck.c (target_type): Use TYPE_PTRMEM_P.
2153 (type_unknown_p): Remove obsolete code about the time before
2154 non-dependent expressions were handled correctly.
2155 (qualify_type_recursive): Remove.
2156 (composite_pointer_type_r): New function.
2157 (composite_pointer_type): Use it.
2158 (merge_types): Remove dead comments.
2159 (comp_cv_target_types): Remove.
2160 (comp_target_types): Likewise.
2161 (comp_target_parms): Likewise.
2162 (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
2163 (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
2164 (build_binary_op): Do not use of comp_target_types.
2165 (pointer_diff): Remove OFFSET_TYPE case.
2166 (build_unary_op): Adjust pointer-to-member handling.
2167 (unary_complex_lvalue): Likewise.
2168 (check_for_casting_away_constness): Add description parameter.
2169 (build_static_cast): Pass it.
2170 (build_reinterpret_cast): Use check_for_casting_away_constness.
2171 (build_const_cast): Adjust pointer-to-member handling.
2172 (build_c_cast): Likewise.
2173 (convert_for_assignment): Remove OFFSET_TYPE error message.
2174 (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
2175 (comp_ptr_ttypes_reinterpret): Remove.
2176 (casts_away_constness_r): Adjust pointer-to-member handling.
2177 (casts_away_constness): Liekwise.
2178 (strip_all_pointer_quals): Remove.
2179 * typeck2.c (digest_init): Adjust pointer-to-member handling.
2180 (build_m_component_ref): Likewise.
2182 2003-07-22 Wolfgang Bangerth <bangerth@dealii.org>
2184 * lex.c (unqualified_fn_lookup_error): Mention that the error
2185 message needs to be kept in synch with the manual.
2187 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
2190 * decl.c (grokdeclarator): An array member is only a flexible
2191 array member if the field itself is the array.
2193 2003-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2196 * decl.c (xref_basetypes): Handle error_mark_node.
2198 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
2200 * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
2201 * tree.c (lvalue_p_1): Set it.
2202 * class.c (check_field): Don't allow non-packed non-POD fields to
2204 * call.c (reference_binding): Need a temporary for all bitfield
2206 (convert_like_real): Check it is ok to make a temporary here.
2208 2003-07-21 Nathan Sidwell <nathan@codesourcery.com>
2210 * cp-tree.h (hack_identifier): Remove.
2211 * method.c (hack_identifier): Remove.
2212 * semantics.c (finish_id_expression): Expand hack_identifier
2215 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2217 * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
2218 semantics.c typeck.c: Remove unnecessary casts.
2220 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
2222 * cp-tree.h (hack_identifier): Remove.
2223 * method.c (hack_identifier): Remove.
2224 * semantics.c (finish_id_expression): Expand hack_identifier
2227 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
2229 * cp-tree.h (finish_non_static_data_member): Add object param.
2230 * method.c (hack_identifier): Adjust.
2231 * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
2232 again for a FIELD_DECL.
2233 * semantics.c (finish_non_static_data_member): Add object
2234 parameter. Always save the DECL in the COMPONENT_REF.
2235 * call.c (resolve_scoped_fn_name): Adjust.
2237 2003-07-17 Zack Weinberg <zack@codesourcery.com>
2239 * pt.c (get_bindings): Make definition consistent with
2240 forward declaration.
2242 2003-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2245 * friend.c (add_friend): Check access for member functions
2248 2003-07-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
2251 * typeck.c (build_class_member_access_expr): Improve diagnostic.
2253 2003-07-16 Mark Mitchell <mark@codesourcery.com>
2256 * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
2258 (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
2259 * decl.c (duplicate_decls): Merge
2260 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2261 * parser.c (cp_parser_postfix_expression): Adjust call to
2262 cp_parser_initializer_list and
2263 cp_parser_parenthesized_expression_list.
2264 (cp_parser_parenthesized_expression_list): Add non_constant_p.
2265 (cp_parser_new_placement): Adjust call to
2266 cp_parser_parenthesized_expression_list.
2267 (cp_parser_direct_new_declarator): Likewise.
2268 (cp_parser_conditional_expression): Remove.
2269 (cp_parser_constant_expression): Parse an assignment-expression,
2270 not a conditional-expression.
2271 (cp_parser_simple_declaration): Resolve expression/declaration
2272 ambiguity more quickly.
2273 (cp_parser_mem_initializer): Adjust call to
2274 cp_parser_parenthesized_expression_list.
2275 (cp_parser_init_declarator): Keep track of whether or not the
2276 initializer is a constant-expression.
2277 (cp_parser_initializer): Add non_constant_p parameter.
2278 (cp_parser_initializer_clause): Likewise.
2279 (cp_parser_initializer_list): Likewise.
2280 (cp_parser_attribute_list): Adjust call to
2281 cp_parser_parenthesized_expression_list.
2282 (cp_parser_functional_cast): Likewise.
2283 * pt.c (tsubst_decl): Copy
2284 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2285 (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
2286 * semantics.c (finish_id_expression): Use
2287 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2289 2003-07-16 Neil Booth <neil@daikokuya.co.uk>
2291 * lang-options.h: Remove.
2293 2003-07-16 Andrew Pinski <pinskia@physics.uc.edu>
2296 * class.c (field_decl_cmp): Remove.
2297 (resort_field_decl_cmp): Remove.
2298 (resort_sorted_fields): Remove.
2299 (add_fields_to_vec): Rename to ...
2300 (add_fields_to_record_type): this.
2301 (finish_struct_1): Change to be using
2302 sorted_fields_type's fields.
2303 * cp-tree.h (lang_decl): In lang_decl_u3
2304 change sorted_fields to be a pointer to
2306 (resort_sorted_fields): Remove prototype.
2307 * search.c (lookup_field_1): Change to be using
2308 sorted_fields_type's fields.
2310 2003-07-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2313 * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
2314 is a member of other class.
2315 * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
2316 is a specialization of function template.
2318 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
2321 * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
2324 2003-07-15 Mark Mitchell <mark@codesourcery.com>
2326 * cp-tree.def (LOOKUP_EXPR): Remove.
2327 * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
2328 (LOOKUP_EXPR_GLOBAL): Remove.
2329 (get_bindings): Remove.
2330 (is_aggr_type_2): Remove.
2331 * call.c (resolved_scoped_fn_name): Remove support for
2333 * decl.c (grokfndecl): Likewise.
2334 (grokdeclarator): Likewise.
2335 * error.c (dump_decl): Likewise.
2336 (dump_expr): Likewise.
2337 * friend.c (do_friend): Likewise.
2338 * init.c (build_offset_ref): Likewise.
2339 * lex.c (unqualified_fn_lookup_error): Use pedwarn. Do not create
2341 * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
2342 * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
2344 * pt.c (get_bindings): Give it internal linkage.
2345 (check_explicit_specialization): Remove support for LOOKUP_EXPR.
2346 (lookup_template_function): Likewise.
2347 (for_each_tempalte_parm_r): Likewise.
2348 (tsubst_decl): Likewise.
2349 (tsubst_qualified_id): Handle template template parameters.
2350 (tsubst_copy): Remove support for LOOKUP_EXPR.
2351 (tsubst_copy_and_build): Likewise.
2352 (most_general_template): Likewise.
2353 (value_dependent_expression_p): Likewise.
2354 (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
2356 * semantics.c (perform_koenig_lookup): Do not create
2358 (finish_fname): Likewise.
2359 (finish_id_expression): Likewise.
2360 * tree.c (is_aggr_type_2): Remove.
2362 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
2365 * typeck.c (check_return_expr): Fix thinko in diagnostic.
2367 2003-07-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2370 * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
2373 2003-07-14 Mark Mitchell <mark@codesourcery.com>
2376 * pt.c (dependent_scope_ref_p): New function.
2377 (value_dependent_expression_p): Use it.
2378 (type_dependent_expression_p): Likewise.
2380 * pt.c (tsubst_friend_function): Use reregister_specialization.
2383 * cp-tree.h (lookup_qualified_name): Adjust prototype.
2384 * decl.c (lookup_qualified_name): Add complain parameter. Adjust
2385 call to is_aggr_type.
2386 * parser.c (cp_parser_lookup_name): Adjust call to
2387 lookup_qualified_name.
2388 * pt.c (tsubst_qualified_id): Likewise.
2389 (tsubst_copy_and_build): Likewise.
2390 * semantics.c (finish_qualified_id_expr): Deal with erroneous
2393 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2396 * call.c (op_error): Properly format REALPART_EXPR and
2398 * error.c (dump_expr): Likewise.
2400 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2402 * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
2404 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2407 * call.c (initialize_reference): Improve diagnostic.
2409 2003-07-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2412 * pt.c (more_specialized_class): Add full_args parameter.
2413 (most_specialized_class): Adjust calls to more_specialized_class.
2414 * cp-tree.h (more_specialized_class): Adjust declaration.
2416 2003-07-14 Dan Nicolaescu <dann@ics.uci.edu>
2418 * lex.c (enum tree_node_kind): Delete.
2420 2003-07-13 Mark Mitchell <mark@codesourcery.com>
2423 * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
2424 (SET_DECL_SELF_REFERENCE_P): Likewise.
2425 * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
2426 * pt.c (tsubst_decl): Copy it.
2427 * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
2429 * pt.c (reregister_specialization): Fix thinko in previous change.
2431 * cp-tree.h (cp_id_kind): New type.
2432 (unqualified_name_lookup_error): Change prototype.
2433 (unqualified_fn_lookup_error): New function.
2434 (do_identifier): Remove.
2435 (do_scoped_id): Likewise.
2436 (tsubst_copy_and_build): Change prototype.
2437 (reregister_specialization): New function.
2438 (perform_koenig_lookup): Likewise.
2439 (finish_id_expression): Likewise.
2440 * call.c (build_method_call): Adjust call to
2441 unqualified_name_lookup_error.
2442 * decl.c (duplicate_decls): Use reregister_specialization.
2443 * lex.c (is_global): Remove.
2444 (unqualified_name_lookup_error): Return a value.
2445 (do_identifier): Remove.
2446 (do_scoped_id): Likewise.
2447 (identifier_typedecl_value): Remove.
2448 (unqualified_fn_lookup_error): New function.
2449 * parser.c (cp_parser_id_kind): Remove.
2450 (cp_parser_non_constant_id_expression): Remove.
2451 (cp_parser_primary_expression): Use finish_id_expression.
2452 (cp_parser_class_or_namespace_name): Use cp_id_kind, not
2454 (cp_parser_postfix_expression): Use perform_koenig_lookup.
2455 (cp_parser_template_argument): Use cp_id_kind.
2456 (cp_parser_fold_non_dependent_expr): Adjust call to
2457 tsubst_copy_and_build.
2458 * pt.c (unregister_specialization): Rename to ...
2459 (reregister_specialization): This.
2460 (tsubst_friend_function): Use it.
2461 (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
2462 (tsubst_qualified_id): Likewise.
2463 (tsubst_expr): Likewise.
2464 (tsubst_copy_and_build): Add function_p parameter. Use
2465 finish_id_expression. Introduce RECUR macro.
2466 (tsubst_non_call_postfix_expression): New function.
2467 (regenerate_decl_from_template): Use reregister_specialization.
2468 * semantics.c (perform_koenig_lookup): New function.
2469 (finish_id_expression): Likewise.
2471 2003-07-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2473 * pt.c (push_access_scope_real): Remove.
2474 (push_access_scope): Move code from push_access_scope_real.
2475 (pop_access_scope): Don't check for TEMPLATE_DECL.
2476 (instantiate_template): Defer access checking during template
2478 (regenerate_decl_from_template): Tidy.
2480 2003-07-11 Nathanael Nerode <neroden@gcc.gnu.org>
2483 * operators.def: Add definitions for __imag__, __real__.
2485 2003-07-11 Nathan Sidwell <nathan@codesourcery.com>
2488 * parser.c (cp_parser_expression_list): Rename to ...
2489 (cp_parser_parenthesized_expression_list): ... here. Add attribute
2490 parameter, parse the surounding parentheses.
2491 (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
2492 parameters. Return int.
2493 (cp_parser_skip_to_closing_parenthesis or comma): Remove.
2494 (cp_parser_postfix_expression): Adjust function call parsing.
2495 (cp_parser_new_placement): Adjust.
2496 (cp_parser_new_initializer): Likewise.
2497 (cp_parser_cast_expression): Likewise.
2498 (cp_parser_selection_statement): Likewise.
2499 (cp_parser_mem_initializer): Likewise.
2500 (cp_parser_asm_definition): Likewise.
2501 (cp_parser_init_declarator): Likewise.
2502 (cp_parser_declarator): Make
2503 cdtor_or_conv_p an int ptr.
2504 (cp_parser_direct_declarator): Likewise. Check for a parameter
2505 list on cdtors & conv functions.
2506 (cp_parser_initializer): Adjust.
2507 (cp_parser_member_declaration): Adjust.
2508 (cp_parser_attribute_list): Move code into
2509 cp_parser_parens_expression_list.
2510 (cp_parser_functional_cast): Adjust.
2511 * pt.c (type_dependent_expression_p): Erroneous expressions are
2514 2003-07-11 Geoffrey Keating <geoffk@apple.com>
2516 * decl.c (cp_finish_decl): Handle 'used' attribute.
2518 * cp-lang.c (c_reset_state): New dummy routine.
2519 * cp-tree.h (finish_file): Move prototype to c-common.h.
2520 * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
2522 2003-07-11 Mark Mitchell <mark@codesourcery.com>
2525 * pt.c (tsubst_qualified_id): Implement suggested resolution for
2527 (type_dependent_expression_p): Likewise.
2529 2003-07-10 Mark Mitchell <mark@codesourcery.com>
2531 * typeck.c (build_binary_op): Do not warn about signed
2532 vs. unsigned comparisons in the bodies of templates.
2535 * parser.c (cp_parser_postfix_expression): Check dependency of
2538 2003-07-09 Mark Mitchell <mark@codesourcery.com>
2541 * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
2545 * error.c (decl_to_string): Do not print default argument
2548 * cp-tree.h (break_out_calls): Remove declaration.
2549 * tree.c (break_out_calls): Remove.
2550 * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
2552 2003-07-09 Nathan Sidwell <nathan@codesourcery.com>
2555 * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
2556 * decl2.c (constructor_name_p): Avoid repeated constructor_name
2558 * decl.c (grokdeclarator): Refactor ctor/dtor detection.
2560 2003-07-09 Mark Mitchell <mark@codesourcery.com>
2562 * typeck.c (build_x_unary_op): Take note of the fact that
2563 PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
2566 * parser.c (cp_parser_primary_expression): Preserve the form of
2567 qualified expressions in templates, even if they are not
2569 * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
2570 (tsubst_qualified_id): Likewise.
2571 * search.c (accessible_p): Treat everything in the body of a
2572 template as accessible.
2574 2003-07-08 Mark Mitchell <mark@codesourcery.com>
2576 * cp-tree.def (NON_DEPENDENT_EXPR): New node.
2577 * cp-tree.h (build_call_from_tree): Remove.
2578 (build_member_call): Likewise.
2579 (dependent_template_arg_p): Remove.
2580 (any_dependent_template_arguments_p): New function.
2581 (dependent_template_id_p): Likewise.
2582 (any_type_dependent_arguments_p): Likewise.
2583 (build_non_dependent_expr): Likewise.
2584 (build_non_dependent_args): Likewise.
2585 (build_x_compound_expr): Adjust prototype.
2586 * call.c (build_new_method_call): Handle non-dependent expressions
2588 * decl2.c (grok_array_decl): Likewise.
2589 (build_offset_ref_call_from_tree): Likewise.
2590 (build_call_from_tree): Remove.
2591 * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
2592 (dump_expr): Likewise.
2593 * init.c (build_member_call): Remove.
2594 * mangle.c (write_expression): Update handling for template-ids.
2595 * parser.c (cp_parser_primary_expression): Use
2596 any_dependent_template_arguments_p. Update constant-expression
2598 (cp_parser_postfix_expression): Use
2599 any_type_dependent_arguments_p. Simplify call processing.
2600 (cp_parser_unary_expression): Simplify.
2601 (cp_parser_expression): Adjust for changes to
2602 build_x_compound_expr.
2603 (cp_parser_template_argument): Implement standard-conforming
2604 parsing of non-type template arguments.
2605 (cp_parser_direct_declarator): Use
2606 cp_parser_fold_non_dependent_expr.
2607 (cp_parser_fold_non_dependent_expr): New function.
2608 (cp_parser_next_token_ends_template_argument_p): Likewise.
2609 * pt.c (convert_template_argument): Do not call
2610 maybe_fold_nontype_arg.
2611 (tsubst_baselink): Likewise.
2612 (tsubst_copy_and_build): Share common code. Make sizeof/alignof
2613 processing work correctly for non-dependent expressions. Adjust
2614 handling of COMPOUND_EXPR. Simplify call processing.
2615 (value_dependent_expression_p): Deal with functional casts and
2616 sizeof/alignof correctly.
2617 (type_dependent_expression_p): Handle overloaded functions.
2618 (any_type_dependent_arguments_p): New function.
2619 (any_dependent_template_arguments_p): Likewise.
2620 (dependent_template_p): Treat SCOPE_REFs as dependent.
2621 (dependent_template_id_p): Simplify.
2622 (build_non_dependent_expr): New function.
2623 (build_non_dependent_args): Likewise.
2624 * semantics.c (finish_stmt_expr): Don't make dependent
2625 statement-expresions have void type.
2626 (finish_call_expr): Handle non-dependent expressions
2628 * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
2629 * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
2630 type size_t, even in templates.
2631 (expr_sizeof): Likewise.
2632 (finish_class_member_access_expr): Handle non-dependent expressions
2634 (build_x_indirect_ref): Likewise.
2635 (build_x_binary_op): Likewise.
2636 (build_x_unary_op): Likewise.
2637 (build_x_conditional_expr): Likewise.
2638 (build_x_compound_expr): Likewise.
2639 * typeck2.c (build_x_arrow): Likewise.
2641 2003-07-09 Jan Hubicka <jh@suse.cz>
2643 * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
2644 * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
2645 (start_function): Use DECL_ESTIMATED_INSNS.
2646 * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
2648 * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
2651 2003-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2654 * pt.c (instantiate_class_template): Don't call xref_tag to
2655 inject name when the friend class is a specialization.
2657 2003-07-07 Mark Mitchell <mark@codesourcery.com>
2659 * cp-tree.h (build_scoped_method_call): Remove.
2660 (lookup_qualified_name): Remove parameter.
2661 (tsubst_copy_and_build): Declare.
2662 (finish_qualified_object_call_expr): Remove.
2663 (check_accessibility_of_qualified_id): New function.
2664 (finish_qualified_id_expr): Likewise.
2665 (non_reference): Likewise.
2666 (build_expr_from-tree): Remove.
2667 * call.c (non_reference): Remove.
2668 (build_scoped_method_call): Likewise.
2669 (build_method_call): Use error_operand_p. Assert that we are not
2670 processing a template.
2671 (standard_conversion): Use non_reference.
2672 * class.c (build_vtbl_entry_ref): Likewise.
2673 (build_vtbl_ref_1): Likewise.
2674 * cvt.c (build_expr_type_conversion): Use non_reference.
2675 * decl.c (lookup_qualified_name): Remove flags parameter.
2676 (grok_op_properties): Use non_reference.
2677 * decl2.c (grok_array_decl): Likewise.
2678 (build_expr_from_tree): Remove.
2679 (build_offset_ref_call_from_tree): Update comment.
2680 * error.c (parm_to_string): Call reinit_global_formatting_buffer.
2681 * except.c (prepare_eh_types): Use non_reference.
2682 (can_convert_eh): Likewise.
2683 * init.c (build_dtor_call): Avoid using build_method_call.
2684 * mangle.c (write_template_param): Remove misleading comment.
2685 * method.c (locate_copy): Use non_reference.
2686 * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
2687 (cp_parser_primary_expression): Do not create SCOPE_REFs is
2688 non-dependent contexts.
2689 (cp_parser_postfix_expression): Use finish_qualified_id_expr.
2690 (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
2691 build_expr_from_tree.
2692 (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
2693 Use check_accessibility_of_qualified_id.
2694 * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
2695 build_expr_from_tree.
2696 (tsubst_baselink): New function.
2697 (tsubst_qualified_id): Likewise.
2698 (tsubst_copy): Use them. Remove support for METHOD_CALL_EXPR.
2699 (tsubst_expr): Adjust call to lookup_qualified_name.
2700 (tsubst_copy_and_build): Handle SCOPE_REFs specially. Adjust
2701 handling of CALL_EXPRs.
2702 (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
2703 * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
2704 * search.c (check_final_overrider): Likewise.
2705 * semantics.c (check_accessibility_of_qualified_id): New function.
2706 (finish_qualified_object_call_expr): Remove.
2707 * typeck.c (target_type): Use non_reference.
2708 (cxx_sizeof_or_alignof_type): Likewise.
2709 (dubious_conversion_warnings): Likewise.
2710 (convert_for_initialization): Likewise.
2711 (non_reference): New function.
2713 2003-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2715 * decl.c (print_binding_level, print_other_binding_stack,
2716 print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
2718 * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
2720 2003-07-07 Andreas Jaeger <aj@suse.de>
2722 * friend.c: Convert to ISO C90 prototypes.
2724 * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
2726 * cfns.h: Regenerate.
2728 * typeck.c: Convert remaining prototypes to ISO C90.
2729 * search.c: Likewise.
2731 * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
2732 * semantics.c (expand_or_defer_fn): Likewise
2733 * mangle.c (discriminator_for_string_literal): Likewise.
2734 * g++spec.c (lang_specific_driver): Likewise.
2736 * search.c (lookup_base_r): Remove unused variable.
2738 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
2740 * semantics.c: (genrtl_try_block) Adjust emit_line_note
2743 2003-07-07 Andreas Jaeger <aj@suse.de>
2745 * search.c (lookup_base_r): Remove unused variable.
2747 2003-07-06 Michael Chastain <mec@shout.net>
2750 * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
2751 assigning to input_filename directly.
2753 2003-07-06 Kazu Hirata <kazu@cs.umass.edu>
2755 * call.c: Fix comment formatting.
2756 * class.c: Likewise.
2757 * cp-tree.h: Likewise.
2759 * decl2.c: Likewise.
2760 * error.c: Likewise.
2761 * method.c: Likewise.
2762 * name-lookup.c: Likewise.
2763 * parser.c: Likewise.
2766 * search.c: Likewise.
2767 * typeck.c: Likewise.
2769 2003-07-06 Mark Mitchell <mark@codesourcery.com>
2772 * search.c (lookup_base_r): Remove is_non_public and
2773 within_current_scope parameters. Remove other dead code.
2774 (lookup_base): Adjust call to lookup_base_r.
2775 (adjust_result_of_qualified_name_lookup): Improve comment.
2776 * semantics.c (finish_call_expr): Use maybe_dummy_object.
2778 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
2780 * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
2781 LANG_HOOKS_MISSING_ARGUMENT): Override.
2783 2003-07-05 Mark Mitchell <mark@codesourcery.com>
2786 * typeck.c (build_static_cast): Check for reference conversions
2789 2003-07-04 Mark Mitchell <mark@codesourcery.com>
2791 * cp-tree.h (perform_integral_promotions): Declare.
2792 * call.c (build_addr_func): Use decay_conversion.
2793 (convert_arg_to_ellipsis): Likewise. Remove misleading comment.
2794 (convert_for_arg_passing): Use perform_integral_promotions.
2795 * cvt.c (build_expr_type_conversion): Use decay_conversion.
2796 (type_promotes_to): Do not return a cv-qualified type.
2797 * decl.c (grok_reference_init): Fix formatting.
2798 (get_atexit_node): Use decay_conversion.
2799 (build_enumerator): Use perform_integral_promotions.
2800 * init.c (build_vec_init): Use decay_conversion.
2801 * semantics.c (finish_expr_stmt): Likewise.
2802 (finish_switch_cond): Use perform_integral_promotions.
2803 * typeck.c (default_conversion): Likewise.
2804 (perform_integral_promotions): New function.
2805 (build_indirect_ref): Use decay_conversion.
2806 (build_array_ref): Use perform_integral_promotions.
2807 (convert_arguments): Use decay_conversion.
2808 (build_unary_op): Use perform_integral_promotions.
2809 (build_c_cast): Use decay_conversion.
2810 (build_modify_expr): Likewise.
2811 (convert_for_initialization): Likewise.
2812 * typeck2.c (build_x_arrow): Likewise.
2814 2003-07-04 Kazu Hirata <kazu@cs.umass.edu>
2816 * call.c: Fix comment typos.
2817 * class.c: Likewise.
2818 * cp-tree.h: Likewise.
2820 * decl2.c: Likewise.
2823 * mangle.c: Likewise.
2824 * parser.c: Likewise.
2826 * search.c: Likewise.
2827 * semantics.c: Likewise.
2829 * typeck.c: Likewise.
2831 2003-07-04 Zack Weinberg <zack@codesourcery.com>
2833 * parser.c (cp_lexer_read_token): No need to handle string
2834 constant concatenation.
2836 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2838 * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
2839 (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
2840 ATTRIBUTE_GCC_CXXDIAG.
2842 2003-07-03 Mark Mitchell <mark@codesourcery.com>
2844 * call.c (build_addr_func): Handle bound pointers-to-members.
2845 (build_method_call): Do not call resolve_offset_ref.
2846 (implicit_conversion): Likewise.
2847 (resolve_scoped_fn_name): Use finish_non_static_data_member, not
2849 (resolve_args): Do not call resolve_offset_ref.
2850 (build_conditional_expr): Likewise.
2851 (build_new_method_call): Likewise.
2852 * cp-tree.def (OFFSET_REF): Update documentation.
2853 * cvt.c (cp_convert_to_pointer): Update handling of conversions from
2854 pointers to members to pointers.
2855 (ocp_convert): Do not call resolve_offset_ref.
2856 (convert_to_void): Likewise.
2857 (build_expr_type_conversion): Likewise.
2858 * decl2.c (delete_sanity): Likewise.
2859 * init.c (resolve_offset_ref): Simplify greatly.
2860 (build_vec_delete): Do not call resolve_offset_ref.
2861 * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
2863 (cp_parser_unary_expression): Use
2864 cp_parser_simple_cast_expression.
2865 (cp_parser_delete_expression): Likewise.
2866 (cp_parser_cast_expression): Likewise.
2867 (cp_parser_pm_expression): Use cp_parser_binary_op.
2868 (cp_parser_simple_cast_expression): New function.
2869 * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
2870 * semantics.c (finish_increment_expr): Likewise.
2871 (finish_typeof): Likewise.
2872 * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
2873 * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
2874 (decay_conversion): Do not call resolve_offset_ref.
2875 (finish_class_member_access_expr): Likewise.
2876 (convert_arguments): Likewise.
2877 (build_x_binary_op): Handle DOTSTAR_EXPR.
2878 (condition_conversion): Do not call resolve_offset_ref.
2879 (unary_complex_lvalue): Likewise.
2880 (build_static_cast): Likewise.
2881 (build_reinterpret_cast): Likewise.
2882 (build_const_cast): Likewise.
2883 (build_c_cast): Likewise.
2884 (build_modify_expr): Likewise.
2885 (convert_for_assignment): Likewise.
2886 (convert_for_initialization): Likewise.
2887 * typeck2.c (build_x_arrow): Likewise.
2888 (build_m_component_ref): Simplify.
2890 * call.c (build_scoped_method_call): Use convert_to_void.
2891 (build_method_call): Likewise.
2892 * class.c (check_field_decls): Remove dead code.
2893 * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
2894 * decl2.c (grok_array_decl): Remove dead code.
2895 (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
2896 as pointer-to-member representation.
2897 * init.c (build_offset_ref): Tidy.
2898 (build_vec_delete_1): Use convert_to_void.
2899 * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
2900 as pointer-to-member representation.
2902 2003-07-03 Nathan Sidwell <nathan@codesourcery.com>
2905 * decl.c (grokdeclarator): Return friend decls, not
2907 * decl2.c (grokfield): Alter friend decl check.
2908 * parser.c (struct cp_parser): Document default_arg chain on
2909 unparsed_functions_queue.
2910 (cp_parser_save_default_args): New.
2911 (cp_parser_init_declarator, cp_parser_function_definition,
2912 cp_parser_member_declaration): Call it.
2913 (cp_parser_class_specifier): Remove unused variable. Alter
2914 processing of unparsed_functions_queue.
2916 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2918 * class.c (add_method, check_field_decl): Fix format specifier.
2919 * decl.c (duplicate_decls, pushdecl, check_goto,
2920 fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
2921 start_enum): Likewise.
2922 * decl2.c (ambiguous_decl): Likewise.
2923 * pt.c (redeclare_class_template): Likewise.
2925 2003-07-02 Nathan Sidwell <nathan@codesourcery.com>
2928 * pt.c (type_unification_real): Don't unify exprs of error type.
2929 * tree.c (error_type): Don't die on error_type.
2932 * decl2.c (arg_assoc_class): Don't die on NULL type.
2933 * typeck.c (type_unknown_p): Don't die on untyped expressions.
2935 2003-07-01 Mark Mitchell <mark@codesourcery.com>
2938 * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
2941 2003-07-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2943 * error.c (locate_error): %P takes an `int', not a `tree'.
2945 2003-07-02 Jan Hubicka <jh@suse.cz>
2947 * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
2948 (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
2949 clear DECL_DEFER_OUTPUT once function is processed; avoid flags
2952 * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
2953 (expand_or_defer_fn): Declare.
2954 (lower_function): Declare.
2955 * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
2956 * decl2.c: Include cgraph.h and varpool.h
2957 (maybe_emit_vtables): Make explicit instantations as needed.
2958 (mark_member_pointers, lower_function): New functions.
2959 (finish_file): Do unit-at-a-time.
2960 * method.c (synthesize_method): Use expand_or_defer_fn.
2961 * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
2962 * parser.c (cp_parser_function_definition_after_decl): Use
2964 * pt.c (instantiate_decl): Likewise.
2965 * semantics.c: Include cgraph.h
2966 (expand_or_defer_fn): Break out from ...
2967 (expand_body): ... here; deal with unit-at-a-time.
2968 * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
2969 LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
2971 2003-07-01 Mark Mitchell <mark@codesourcery.com>
2973 * call.c (resolve_scoped_fn_name): Return error_mark_node for
2976 2003-07-01 Mark Mitchell <mark@codesourcery.com>
2979 * call.c (resolve_scoped_fn_name): Check that the qualifying scope
2982 2003-07-01 Giovanni Bajo <giovannibajo@libero.it>
2985 * error.c (dump_decl): Handle BIT_NOT_EXPR as
2986 pseudo destructor calls.
2988 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
2990 * cp-tree.h (define_label): Replace filename and lineno
2991 arguments with a location_t.
2992 * decl.c (pop_label): Adjust define_label call.
2993 (define_label): Replace filename and lineno arguments with a
2995 * semantics.c (finish_label): Adjust define_label call.
2997 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3000 * decl2.c (grokfield): Do not build NOP_EXPRs around the
3003 2003-06-30 Neil Booth <neil@daikokuya.co.uk>
3005 * Make-lang.in: Update.
3006 * cp-lang.c (c_language): Define.
3007 (LANG_HOOKS_INIT_OPTIONS): Use common hook.
3008 * cp-tree.h (cxx_init_options): Remove.
3009 * lex.c: Don't include diagnostic.h.
3010 (cxx_init_options): Remove.
3012 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3015 * error.c (dump_expr): Support correctly the COMPOUND_EXPR
3016 tree generated within a template. Use dump_expr to dump an
3019 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3021 * mangle.c (write_expression): Exit gracefully when trying to
3024 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3027 * parser.c (cp_parser_primary_expression): A VAR_DECL with a
3028 (value- or type-) dependent expression as DECL_INITIAL is a
3029 valid constant-expression (at parser time).
3031 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3034 * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
3035 USING_DECL, instead of print_tree_identifier.
3037 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3039 * cp-tree.h (language_to_string): Adjust declaration.
3040 * dump.c (cp_dump_tree): Adjust usage.
3041 * error.c (dump_char): Use output_formatted_scalar. Tidy.
3042 (parm_to_string): Lose unused parameter. Tidy.
3043 (expr_to_string): Likewise.
3044 (code_to_string): Likewise.
3045 (language_to_string): Likewise.
3046 (op_to_string): Likewise.
3047 (assop_to_string): Likewise.
3048 (digit_buffer): Remove.
3049 (dump_type): Format builtin vector type as __vector__.
3051 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3053 * error.c (print_integer): Remove.
3054 (dump_type_suffix): Adjust.
3055 (dump_expr): Likewise.
3057 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
3059 * error.c (print_instantiation_partial_context): Take a
3061 (print_instantiation_full_context): Adjust.
3062 (print_instantiation_context): Adjust.
3064 * cp-tree.h (cp_line_of, cp_file_of): Remove.
3065 * error.c (cp_line_of, cp_file_of): Merge into ...
3066 (location_of): ... here. Make static, return a location_t.
3067 (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
3069 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
3072 * call.c (joust): Move warn_conversion check outwards.
3074 2003-06-27 Zack Weinberg <zack@codesourcery.com>
3076 * decl.c (build_typename_type)
3077 * mangle.c (write_template_template_arg)
3078 * parser.c (cp_parser_scope_through_which_access_occurs)
3079 * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
3080 * repo.c (get_base_filename)
3081 * semantics.c (maybe_convert_cond):
3082 Mark the definition static, matching the forward declaration.
3084 2003-06-27 Mark Mitchell <mark@codesourcery.com>
3087 * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
3089 2003-06-27 Mark Mitchell <mark@codesourcery.com>
3092 * decl.c (finish_enum): Implement DR377.
3094 * decl.c (cp_finish_decl): Don't make variables with reference
3095 type readonly while they are being initialized.
3097 2003-06-26 Mark Mitchell <mark@codesourcery.com>
3100 * typeck.c (build_static_cast): Avoid returning expressions with
3103 2003-06-26 Nathan Sidwell <nathan@codesourcery.com>
3105 * call.c (build_op_delete_call): Use strip_array_call. Correct
3106 error message to say 'delete' or 'delete[]'.
3108 2003-06-26 Giovanni Bajo <giovannibajo@libero.it>
3111 * pt.c (check_explicit_specialization): When looking up a
3112 template function from an identifier outside class-scope, bind
3113 it to CP_DECL_CONTEXT.
3115 2003-06-25 Mark Mitchell <mark@codesourcery.com>
3118 * search.c (lookup_base_r): Rely on accessible_p, rather than
3119 trying to emulate that logic here.
3122 * call.c (convert_like): Pass issue_conversion_warnings.
3123 (convert_like_with_context): Likewise.
3124 (convert_like_real): Add issue_conversion_warnings parameter.
3125 (perform_direct_initialization_if_possible): New function.
3126 * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
3127 * typeck.c (check_for_casting_away_constness): New function.
3128 (build_static_cast): Rewrite.
3130 2003-06-24 Nathan Sidwell <nathan@codesourcery.com>
3132 * call.c (enforce_access): Assert we get a binfo.
3133 (build_op_delete_call): Pass a binfo to
3134 perform_or_defer_access_check.
3135 * class.c (alter_access): Likewise.
3136 * decl.c (make_typename_type): Likewise.
3137 (make_unbound_class_template): Likewise.
3138 * lex.c (do_identifier): Likewise.
3139 * method.c (hack_identifier): Likewise.
3140 * parser.c (cp_parser_lookup_name): Likewise.
3141 * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
3143 * semantics.c (finish_non_static_data_member): Likewise.
3144 (perform_or_defer_access_check): Expect a binfo.
3145 * typeck.c (comptypes): Expect types.
3147 * mangle.c (find_substitution): Don't pass a non-type to same_type_p
3148 * friend.c (make_friend_class): Likewise.
3149 * pt.c (check_default_tmpl_args): Likewise.
3150 (lookup_template_class): Likewise.
3152 2003-06-24 Jan Hubicka <jh@suse.cz>
3154 * method.c (thunk_labelno): Move outside ifdef block to make garbage
3157 2003-06-24 Jan Hubicka <jh@suse.cz>
3159 * class.c (build_vtable): Make vtables.
3160 * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
3161 * decl2.c (output_vtable_inherit): Rename to ...
3162 (prepare_assemble_variable): ... this one; change interface.
3163 (maybe_emit_vtables): Do not call output_vtable_inherit.
3164 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
3165 * cp-tree.h (prepare_assemble_variable): New.
3167 2003-06-23 Andrew Pinski <pinskia@physics.uc.edu>
3169 * method.c: add prototype for make_alias_for_thunk.
3170 (thunk_labelno, make_alias_for_thunk): only define
3171 if ASM_OUTPUT_DEF is defined.
3173 2003-06-23 Jakub Jelinek <jakub@redhat.com>
3175 * method.c (thunk_labelno): New variable.
3176 (make_alias_for_thunk): New function.
3177 (use_thunk): Use it if defined ASM_OUTPUT_DEF. Put the thunk
3178 into the same section as the function it is calling.
3179 Include gt-cp-method.h.
3180 * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
3181 (cp/method.o): Depend on gt-cp-method.h.
3182 * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
3184 2003-06-23 Jan Hubicka <jh@suse.cz>
3186 * decl.c (register_dtor_fn): Mark cleanup as used.
3187 * decl2.c (mark_vtable_entries): Skip nops.
3188 * rtti.c (get_tinfo_ptr): Mark tinfo as used.
3189 (build_dynamic_cast_1): Likewise.
3190 (tinfo_base_init): Likewise.
3191 (emit_tinfo_decl): Likewise.
3193 2003-06-23 Jakub Jelinek <jakub@redhat.com>
3195 * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
3198 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3201 * call.c (joust): Warn about choosing conversion sequence only if
3204 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3207 * call.c (op_error): Tidy.
3208 * error.c (dump_expr): Properly format 'T()' when T is an
3211 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3214 * decl.c (grok_op_properties): Warn possible confusing conversion
3215 only if -Wconversion.
3217 2003-06-20 Mark Mitchell <mark@codesourcery.com>
3220 * parser.c (cp_parser_class_head): See through dependent names
3221 when parsing a class-head.
3224 * pt.c (try_class_unification): Correct handling of member class
3227 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
3229 * semantics.c (genrtl_finish_function): Adjust
3230 expand_function_end call.
3232 2003-06-19 Mark Mitchell <mark@codesourcery.com>
3235 * pt.c (tsubst_decl): Do not try to substitute into non-dependent
3237 (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
3240 * cp-tree.h (pushdecl_class_level): Change prototype.
3241 (push_class_level_binding): Likewise.
3242 * decl.c (add_binding): Reject duplicate static data members.
3243 (pushdecl_class_level): Return a value indicating whether or not
3244 the binding was valid.
3245 (push_class_level_binding): Likewise.
3246 * semantics.c (finish_member_declaration): Don't keep invalid
3250 * call.c (initialize_reference): Do not use cp_finish_decl to emit
3251 temporary variables.
3252 * cp-tree.h (static_aggregates): Declare.
3253 (pushdecl_top_level_and_finish): Likewise.
3254 * decl.c (pushdecl_top_level_1): New function.
3255 (pushdecl_top_level): Use it.
3256 (pushdecl_top_level_and_finish): New function.
3257 (initialize_local_var): Remove redundant code.
3258 (cp_finish_decl): Remove support for RESULT_DECLs. Don't check
3260 * decl.h (static_aggregates): Remove.
3261 * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
3262 * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
3263 (tinfo_base_init): Likewise.
3265 2003-06-19 Matt Austern <austern@apple.com>
3268 * init.c (build_zero_init): Assert that number of array elements
3269 is an integer constant.
3270 (build_default_init) Don't use build_zero_init for arrays with
3271 variable number of elements.
3273 2003-06-19 Andreas Jaeger <aj@suse.de>
3275 * cp-tree.h: Remove duplicated declarations.
3277 2003-06-18 Nathanael Nerode <neroden@gcc.gnu.org>
3279 * pt.c: Convert to ISO C.
3280 * semantics.c: Convert to ISO C.
3282 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
3284 * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
3285 at_least_as_qualified_p, more_qualified_p): Return bool.
3286 * typeck.c: ANSIFY function definitions.
3287 (comp_array_types): Take redeclaration bool parameter.
3288 (comptypes): Rearrange STRICT handling.
3289 (at_least_as_qualified_p, more_qualified_p,
3290 comp_cv_qualification): Cache cv quals.
3291 (compparms): Rearrange loop.
3293 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
3295 * cp-tree.h (COMPARE_RELAXED): Rename to ...
3296 (COMPARE_DERIVED): ... here. Adjust comment.
3297 (resolve_typename_type_in_current_instantiation): Remove.
3298 (cp_tree_equal, comptypes): Return a bool.
3299 * cvt.c (convert_to_reference): Adjust comptypes call.
3300 * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
3301 (resolve_typename_type_in_current_instantiation): Remove.
3302 * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
3303 IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
3304 calls. Refactor code.
3305 * typeck.c (comp_array_types): Return bool. Lose callback.
3306 parameter. Adjust cp_tree_equal calls.
3307 (comptypes): Return bool. Adjust strict handling. Remove relaxed
3308 enumeration and java type handling. Deal with typename types here.
3309 Adjust recursive and cp_tree_equals calls. Adjust base and derived
3311 (comp_target_types): Remove unreachable code. Adjust
3312 same_or_base_type_p calls.
3313 (ptr_reasonably_similar): Adjust base and derived check.
3315 * typeck.c (maybe_warn_about_returning_address_of_local): Remove
3317 (check_return_expr): Adjust error messages.
3318 * cp-tree.def (SCOPE_REF): Correct comment.
3320 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3322 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3325 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
3327 * optimize.c (dump_function): Form complete flag name by
3328 prefixing 'fdump-' to string returned by dump_flag_name().
3330 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3332 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3335 2003-06-17 Jason Merrill <jason@redhat.com>
3338 * decl.c (grokfndecl): Don't mark a function inline for
3339 -finline-functions if it isn't defined.
3341 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3344 * class.c (handle_using_decl): Robustify.
3347 * cp-tree.h (DECL_CONV_FN_TYPE): New method.
3348 * mangle.c (struct globals): Remove internal_mangling_p.
3349 (write_unqualified_name): Use DECL_CONV_FN_TYPE.
3350 (write_template_parm): Don't write out the level number.
3351 (conv_type_names): New variable.
3352 (hash_type): New function.
3353 (compare_type): Likewise.
3354 (mangle_conv_op_name_for_type): Don't try to mangle conversion
3356 * search.c (lookup_conversion_operator): New function.
3357 (lookup_fnfields_1): Use it.
3359 2003-06-17 Andreas Jaeger <aj@suse.de>
3361 * except.c: Remove duplicate declaration of push_eh_cleanup.
3363 * call.c: Remove extra declaration of inhibit_warnings.
3365 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
3367 2003-06-16 Jens-Michael Hoffmann <jensmh@gmx.de>
3368 * mangle.c: Convert to ISO C.
3370 2003-06-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3372 * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
3375 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
3377 * tree.c: Convert to ISO C.
3379 2003-06-16 Kazu Hirata <kazu@cs.umass.edu>
3381 * cp-tree.h: Follow spelling conventions.
3382 * mangle.c: Likewise.
3383 * method.c: Likewise.
3384 * parser.c: Likewise.
3386 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
3388 * decl.c (start_function): Adjust init_function_start call.
3389 * method.c (use_thunk): Likewise.
3390 * semantics.c (genrtl_start_function): Likewise.
3392 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
3394 * Make-lang.in: Remove c-options.o.
3396 2003-06-13 Nathanael Nerode <neroden@gcc.gnu.org>
3398 * lex.c: Convert to ISO C.
3400 2003-05-19 Jens-Michael Hoffmann <jensmh@gmx.de>
3401 * init.c: removes use of PARAMS macro. Use ISO style function
3402 declarations. (Not copyright-significant change.)
3404 * rtti.c: Remove PARAMS.
3406 * typeck2.c: Convert to ISO C.
3408 2003-06-12 Mark Mitchell <mark@codesourcery.com>
3411 * typeck.c (build_c_cast): Check that the destination type is
3414 2003-06-11 Mark Mitchell <mark@codesourcery.com>
3417 * cp-tree.h (finish_declarator): Remove.
3418 * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
3419 erroneous declarations.
3420 * semantics.c (finish_declarator): Remove.
3422 2003-06-11 Roger Sayle <roger@eyesopen.com>
3424 * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
3425 global static constructor/destructor if it will be empty, i.e.
3426 either doesn't call any ctors/dtors or only calls pure or const
3429 2003-06-11 Mark Mitchell <mark@codesourcery.com>
3431 * mangle.c (tm_p.h): Include it.
3432 * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
3435 * tree.c (cp_cannot_inline_fn): Check for "inline" before
3438 2003-06-10 Jason Merrill <jason@redhat.com>
3441 * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
3443 2003-06-10 Andrew Pinski <pinskia@physics.uc.edu>
3445 * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
3446 (start_cleanup_cnt): New.
3448 2003-06-10 Mark Mitchell <mark@codesourcery.com>
3451 * cp-tree.h (template_for_substitution): Declare.
3452 * decl2.c (mark_used): Use it when figuring out whether or not a
3454 * pt.c (template_for_substitution): Give it external linkage.
3455 * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
3458 2003-06-09 Zack Weinberg <zack@codesourcery.com>
3461 * mangle.c (write_real_cst): New function. Implement
3462 ABI-compliant mangling of floating-point literals when
3463 -fabi-version>=2; provide backward compatibility with 3.3 when
3464 -fabi-version=1 (with warning). Clarify commentary.
3465 (write_template_arg_literal): Use write_real_cst.
3467 2003-06-07 Andreas Jaeger <aj@suse.de>
3469 * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
3471 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
3473 * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
3474 (LANG_HOOKS_HANDLE_OPTION): Override.
3475 * cp-tree.h (cxx_init_options): Update.
3476 * lex.c (cxx_init_options): Update.
3478 2003-06-05 Jan Hubicka <jh@suse.cz>
3480 * Make-lang.in: Add support for stageprofile and stagefeedback
3482 2003-06-04 J"orn Rennecke <joern.rennecke@superh.com>
3484 * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
3486 2003-06-04 Andreas Jaeger <aj@suse.de>
3488 * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
3490 2003-06-03 Jason Merrill <jason@redhat.com>
3492 * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
3494 * cp/decl.c (reshape_init): Handle vectors.
3496 * testsuite/g++.dg/init/array10.C: New.
3498 2003-06-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3501 * pt.c (check_explicit_specialization): Check for 'static'
3504 2003-05-31 Diego Novillo <dnovillo@redhat.com>
3506 * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
3507 the operand of a CONSTRUCTOR node.
3509 2003-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
3511 * decl.c (cp_binding_level::this_entity): Rename from this_class.
3512 (cxx_scope_descriptor): New function.
3513 (cxx_scope_debug): Likewise.
3514 (push_binding_level): Use it.
3515 (pop_binding_level): Likewise.
3516 (suspend_binding_level): Likewise.
3517 (resume_binding_level): Likewise.
3518 (pushlevel_class): Adjust use of this_class.
3519 (pushtag): Likewise.
3520 (lookup_name_real): Likewise.
3521 (global_scope_name): New variable.
3522 (initialize_predefined_identifiers): Initialize it.
3523 (push_namespace): Use it.
3524 (make_cxx_scope): New function.
3525 (pushlevel): Use it.
3526 (pushlevel_class): Likewise.
3527 (push_binding_level): Simplify. Loose the last two arguments.
3528 (make_binding_level): Remove.
3529 (initial_push__namespace_scope): New function.
3530 (push_namespace): Use it. Simplify.
3531 (cxx_init_decl_processing): Likewise.
3532 (declare_namespace_level): Remove.
3534 2003-05-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3537 * pt.c (instantiate_decl): Don't use full template arguments if
3538 we are dealing with specializations.
3540 2003-05-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3542 * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
3543 (binding_depth): Unconditionally define.
3544 (is_class_level): Likewise.
3545 (indent): Likewise. Take an indenting parameter.
3546 (push_binding_level): Remove conditional definittion.
3547 (pop_binding_level): Likewise.
3548 (suspend_binding_level): Likewise.
3549 (resume_binding_level): Likewise.
3550 (pushlevel): Likewise.
3551 (pushlevel_class): Likewise.
3552 (poplevel_class): Likewise.
3553 (pop_everything): Likewise.
3555 2003-05-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
3557 * name-lookup.h (global_scope_p): New macro.
3558 * decl.c (pop_binding_level): Use it. Don't refer directly to
3559 global_binding_level.
3560 (suspend_binding_level): Likewise.
3561 (global_bindings_p): Likewise.
3562 (print_other_binding_stack): Likewise.
3563 (print_binding_stack): Likewise.
3564 (maybe_push_to_top_level): Likewise.
3565 (pushdecl_namespace_level): Likewise.
3566 (cxx_init_decl_processing): Likewise.
3567 (start_decl): Likewise.
3568 (cp_finish_decl): Likewise.
3569 (start_function): Likewise.
3570 (global_binding_level): Remove.
3572 2003-05-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3574 * parser.c (cp_parser_explicit_instantiation): Restore old
3575 access before template instantiation.
3577 2003-05-23 Geoffrey Keating <geoffk@apple.com>
3579 * lang-specs.h: Use -o to specify preprocessor's output file.
3580 Make -no-integrated-cpp work when building PCH files.
3582 2003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3585 * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
3586 check for implicitly created typedef to an enum.
3588 2003-05-21 Jason Merrill <jason@redhat.com>
3590 * init.c (build_vec_delete): Copy the address into a temporary
3591 variable before calling build_vec_delete_1.
3592 * decl2.c (delete_sanity): Don't call stabilize_reference.
3594 2003-05-21 Nathan Sidwell <nathan@codesourcery.com>
3596 * pt.c (register_specialization): Update the decl's location,
3598 (check_explicit_specialization): Likewise.
3600 2003-05-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3602 * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
3604 2003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
3607 * decl.c (duplicate_decls): Re-invoke make_decl_rtl
3608 if the old decl had instantiated DECL_RTL.
3609 (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
3611 2003-05-19 Matt Austern <austern@apple.com>
3613 * lang-options.h: Document -Wno-invalid-offsetof
3614 * typeck.c (build_class_member_access_expr): Don't complain about
3615 (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
3617 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
3619 * name-lookup.c (free_binding_entry): fix where the GTY markers are.
3620 (binding_entry_make): Make entry->chain NULL after getting an entry.
3621 fix the spelling of chain in a comment.
3622 (binding_table_free): speed up by having temporary variable.
3623 (binding_table_new): set table->chain to be NULL after allocating
3625 (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
3626 binding->previous to NULL after getting an binding for speed.
3628 2003-05-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
3630 * cp-tree.h (struct lang_type_class): Replace data member tags
3631 with hash-table nested_udts.
3632 (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
3633 * class.c (unreverse_member_declarations): Don't touch
3635 (pushclass): Use cxx_remember_type_decls.
3636 * decl.c (struct cp_binding_level): Replace data member tags with
3637 hash-table type_decls.
3638 (pop_binding_level): Handle level->type_decls.
3639 (kept_level_p): Adjust.
3640 (poplevel): Remove unused local variable.
3641 (bt_print_entry): New function.
3642 (print_binding_level): Use it.
3643 (push_namespace): Build current_binding_level->type_decls.
3644 (maybe_process_template_type_declaration): Adjust.
3645 (pushtag): Likewise.
3646 (clear_anon_tags): Use binding_table_remove_anonymous_types.
3648 (cxx_remember_type_decls): Rename from storetags. Adjust.
3649 (lookup_tag): Use binding_table_find_anon_type. Tidy.
3650 (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
3651 (cxx_init_decl_processing): Build global_binding_level->type_decls.
3652 (store_parm_decls): Remove pointless code.
3653 * name-lookup.c (free_binding_entry): New variable.
3654 (ENTRY_INDEX): New macro.
3655 (struct binding_table_s): New datatype.
3656 (binding_entry_make): New function.
3657 (binding_entry_free): Likewise.
3658 (binding_table_construct): Likewise.
3659 (binding_table_free): Likewise.
3660 (binding_table_new): Likewise.
3661 (binding_table_expand): Likewise.
3662 (binding_table_insert): Likewise.
3663 (binding_table_find): Likewise.
3664 (binding_table_find_anon_type): Likewise.
3665 (binding_table_reverse_maybe_remap): Likewise.
3666 (binding_table_remove_anonymous_types): Likewise.
3667 (binding_table_foreach): Likewise.
3668 * name-lookup.h (binding_table): New type.
3669 (binding_entry): Likewise.
3670 (bt_foreach_proc): Likewise.
3671 (struct binding_entry_s): New datatype.
3672 (SCOPE_DEFAULT_HT_SIZE): New macro.
3673 (CLASS_SCOPE_HT_SIZE): Likewise.
3674 (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
3675 (NAMESPACE_STD_HT_SIZE): Likewise.
3676 (GLOBAL_SCOPE_HT_SIZE): Likewise.
3677 (binding_table_new): Declare.
3678 (binding_table_free): Likewise.
3679 (binding_table_insert): Likewise.
3680 (binding_table_find_anon_type): Likewise.
3681 (binding_table_reverse_maybe_remap): Likewise.
3682 (binding_table_remove_anonymous_types): Likewise.
3683 (binding_table_foreach): Likewise.
3684 (binding_table_find): Likewise.
3685 (cxx_remember_type_decls): Likewise.
3686 * pt.c (bt_instantiate_type_proc): New function.
3687 (do_type_instantiation): Use it.
3688 * search.c (lookup_field_r): Use binding_table_find.
3690 2003-05-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3692 * semantics.c (perform_deferred_access_checks): Don't discard
3695 2003-05-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3697 * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
3698 libiberty VA_ macros, always use stdarg.
3699 * rtti.c (create_pseudo_type_info): Likewise.
3700 * tree.c (build_min_nt, build_min): Likewise.
3702 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3704 * ptree.c (cxx_print_type, cxx_print_xnode): Use string
3705 concatentation on HOST_WIDE_INT_PRINT_* format specifier to
3706 collapse multiple function calls into one.
3707 * tree.c (debug_binfo): Likewise.
3709 2003-05-15 Jason Merrill <jason@redhat.com>
3712 * call.c (conditional_conversion): Don't consider implicit
3713 conversions if T2 is a base of T1.
3714 * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
3715 (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
3717 * parser.c (cp_parser_primary_expression): Convert a static data
3718 member from reference.
3720 2003-05-15 Mark Mitchell <mark@codesourcery.com>
3722 * call.c (build_op_delete_call): Avoid creating unnecessary types.
3723 * class.c (instantiate_type): Remove tests for tf_no_attributes.
3724 * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
3725 (COMPARE_NO_ATTRIBUTES): Remove.
3726 * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
3729 * semantics.c (finish_typeof): Refine type-dependency check.
3731 2003-05-13 Jason Merrill <jason@redhat.com>
3733 * typeck.c (build_modify_expr): Don't always stabilize the lhs and
3734 rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
3736 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3738 * method.c (synthesize_method): Call push/pop_deferring_access_checks.
3740 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3742 PR c++/10230, c++/10481
3743 * semantics.c (finish_non_static_data_member): Handle when the
3744 non-static member is not from a base of the current class type.
3746 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3749 * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
3750 template and has dependent context.
3752 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3754 * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
3756 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3759 * cp-tree.h (saved_scope): Remove check_access field.
3760 (tsubst_flags_t): Remove tf_parsing.
3761 * decl.c (maybe_push_to_top_level): Don't initialize
3762 scope_chain->check_access.
3763 (make_typename_type, make_unbound_class_template): Don't use
3765 (register_dtor_fn): Use push/pop_deferring_access_checks
3766 instead of scope_chain->check_access.
3767 * method.c (use_thunk): Likewise.
3768 * parser.c (cp_parser_explicit_instantiation
3769 (cp_parser_constructor_declarator_p): Don't call
3770 push/pop_deferring_access_checks here.
3771 (cp_parser_template_argument, cp_parser_class_name): Don't use
3773 (yyparse): Check flag_access_control.
3774 * pt.c (instantiate_class_template): Call
3775 push/pop_deferring_access_checks.
3776 * semantics.c (push_deferring_access_checks): Propagate
3778 (perform_or_defer_access_check): Make sure basetype_path is
3779 a type before comparison.
3780 * call.c (build_op_delete_call, build_over_call): Use
3781 perform_or_defer_access_check.
3782 * class.c (alter_access): Likewise.
3783 * init.c (build_offset_ref): Likewise.
3784 * lex.c (do_identifier): Likewise.
3785 * method.c (hack_identifier): Likewise.
3786 * search.c (lookup_member): Likewise.
3787 * semantics.c (finish_non_static_data_member): Likewise.
3788 (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
3789 instead of flag_access_control.
3791 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3794 * parser.c (cp_parser_class_name): Remove check_access parameter.
3795 All caller adjusted. Update declaration.
3796 (cp_parser_lookup_name): Likewise.
3797 * semantics.c (push_deferring_access_checks): Change parameter type
3798 to enum deferring_kind. All caller adjusted.
3799 (resume_deferring_access_checks): Adjust to use new enum.
3800 (stop_deferring_access_checks): Likewise.
3801 (perform_or_defer_access_check): Likewise.
3802 * cp-tree.h (deferring_kind): New enum.
3803 (deferred_access): Adjust field type.
3804 (push_deferring_access_checks): Update declaration.
3806 2003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3808 PR c++/10555, c++/10576
3809 * pt.c (lookup_template_class): Handle class template with
3810 multiple levels of parameters when one of the levels contain
3813 2003-05-08 Jason Merrill <jason@redhat.com>
3815 * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
3816 expression. Undo some of the recent reorg.
3818 2003-05-07 Richard Henderson <rth@redhat.com>
3821 * cfns.gperf: Comment out POSIX thread cancellation points,
3822 plus abort and raise.
3823 * cfns.h: Regenerate.
3825 2003-05-07 Jason Merrill <jason@redhat.com>
3827 * call.c (build_conditional_expr): Don't assume that the folded
3828 expression has result_type.
3830 2003-05-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3832 * typeck.c (build_unary_op): Deal with const qualifier in
3833 invalid pointer-to-member earlier.
3835 2003-05-05 Jason Merrill <jason@redhat.com>
3838 * call.c (conditional_conversion): Build an RVALUE_CONV if
3839 we're just changing the cv-quals.
3840 (build_conditional_expr): Don't call convert to change
3843 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3846 * typeck.c (build_unary_op): Don't output const qualifier when
3847 output invalid pointer-to-member diagnostics.
3849 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3851 * decl.c: Fix typos.
3853 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3856 * decl.c (start_function): Use same_type_p to check return type
3859 2003-05-03 Zack Weinberg <zack@codesourcery.com>
3862 * cp/typeck.c (build_x_compound_expr): No need to check
3863 extra_warnings as well as warn_unused_value.
3865 2003-05-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3867 PR c++/9364, c++/10553, c++/10586
3868 * decl.c (make_typename_type): Don't crash on illegal code.
3870 2003-05-03 Nathan Sidwell <nathan@codesourcery.com>
3872 * class.c (finish_struct): Use location_t and input_location
3874 * decl.c (make_label_decl): Likewise.
3875 (use_label): Likewise.
3876 * decl2.c (warn_if_unknown_interface): Likewise.
3877 (start_static_initialization_or_destruction): Likewise.
3878 (generate_ctor_or_dtor_function): Likewise.
3879 (finish_file): Likewise.
3880 * error.c (print_instantiation_full_context): Likewise.
3881 * init.c (create_temporary_var): Likewise.
3882 * method.c (synthesize_method): Likewise.
3883 * parser.c (cp_token): Likewise.
3884 (cp_lexer_set_source_position_from_token): Likewise.
3885 (cp_lexer_get_preprocessor_token): Likewise.
3886 (cp_parser_statement): Likewise.
3887 * pt.c (tsubst_friend_function): Likewise.
3888 (instantiate_class_template): Likewise.
3889 (tsubst_decl): Likewise.
3891 (instantiate_decl): Likewise.
3892 * semantics.c (begin_class_definition): Likewise.
3893 (expand_body): Likewise.
3895 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
3897 * class.c (finish_struct): Rename lineno to input_line.
3898 * decl.c (push_binding_level, pop_binding_level,
3899 suspend_binding_level, resume_binding_level, make_label_decl,
3900 use_label, start_function): Likewise.
3901 * decl2.c (warn_if_unknown_interface,
3902 start_static_initialization_or_destruction,
3903 generate_ctor_or_dtor_function, finish_file): Likewise.
3904 * error.c (cp_line_of, print_instantiation_full_context,
3905 print_instantiation_context): Likewise.
3906 * except.c (check_handlers_1, check_handlers): Likewise.
3907 * init.c (create_temporary_var): Likewise.
3908 * method.c (use_thunk, synthesize_method): Likewise.
3909 * parser.c (cp_lexer_set_source_position_from_token,
3910 cp_lexer_get_preprocessor_token): Likewise.
3911 * pt.c (push_tinst_level, pop_tinst_level,
3912 tsubst_friend_function, instantiate_class_template, tsubst_decl,
3913 tsubst, tsubst_expr, instantiate_decl): Likewise.
3914 * semantics.c (genrtl_try_block, finish_label_stmt,
3915 begin_class_definition, expand_body,
3916 genrtl_finish_function): Likewise.
3917 * tree.c (build_min_nt, build_min): Likewise.
3919 2003-05-01 Mark Mitchell <mark@codesourcery.com>
3921 * decl2.c (comdat_linkage): Don't externalize explicit
3924 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3927 * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
3930 2003-05-01 Steven Bosscher <steven@gcc.gnu.org>
3932 * cp-tree.h (struct lang_id2): Remove. Move fields from here...
3933 (struct lang_identifier): ... to here.
3934 (LANG_ID_FIELD): Remove.
3935 (SET_LANG_ID): Remove.
3936 (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
3937 (SET_IDENTIFIER_LABEL_VALUE): Likewise.
3938 (IDENTIFIER_IMPLICIT_DECL): Likewise.
3939 (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
3940 (IDENTIFIER_ERROR_LOCUS): Likewise.
3941 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
3943 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3946 * pt.c (convert_template_argument): Correct diagnostic.
3948 2003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3950 PR c++/9432, c++/9528
3951 * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
3953 2003-04-30 Garbiel Dos Reis <gcc@integrable-solutions.net>
3955 * decl.c (check_previous_goto_1): Adjust prototype.
3956 (check_previous_goto): Adjust use.
3957 (check_switch_goto): Likewise.
3958 (use_label): Adjust.
3959 (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
3960 (struct named_label_use_list): Use location_t datatype.
3962 2003-04-29 Mark Mitchell <mark@codesourcery.com>
3965 * pt.c (mark_decl_instantiated): Defer all explicit instantiations
3966 that have not yet been written out.
3968 2003-04-29 Mark Mitchell <mark@codesourcery.com>
3971 * class.c (layout_class_type): Mark overlong bitfields as having
3972 the maximum size permitted by their type, after layout.
3975 * error.c (dump_expr): Correctly handling of NEW_EXPR.4
3977 2003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3979 * call.c (build_operator_new_call): Fix typo.
3980 * lang-options.h: Likewise.
3982 2003-04-29 Mark Mitchell <mark@codesourcery.com>
3985 * cp-tree.h (lookup_field_1): Declare it.
3986 * search.c (lookup_field_1): Make it public.
3987 * decl.c (reshape_init): Handle designated initializers.
3989 * decl.c (maybe_commonize_var): Further tweak support for systems
3990 without weak symbols.
3992 2003-04-27 Mark Mitchell <mark@codesourcery.com>
3994 * decl.c (maybe_commonize_var): Fix thinko in last patch.
3996 2003-04-27 Mark Mitchell <mark@codesourcery.com>
3999 * method.c (use_thunk): Decrement immediate_size_expand.
4002 * cp-tree.h (DECL_VAR_MARKED_P): New macro.
4003 (DECL_MAYBE_TEMPLATE): Remove.
4004 * class.c (fixed_type_or_null): Avoid infinite recursion.
4006 * decl.c (maybe_commonize_var): Make the code match the comments.
4007 * pt.c (instantiate_decl): Move call to import_export_decl.
4009 2003-04-26 Mark Mitchell <mark@codesourcery.com>
4011 * decl2.c (finish_file): Fix merge botch.
4013 2003-04-25 Mark Mitchell <mark@codesourcery.com>
4015 * decl2.c (finish_file): Don't call import_export_decl for
4016 functions that are not defined.
4017 (handle_class_head): Robustify.
4018 * pt.c (instantiate_decl): Do not call cp_finish_decl for
4019 variables that are not defined.
4021 2003-04-24 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
4023 * call.c (print_z_candidates): Fix off by one error.
4025 2003-04-24 Nathan Sidwell <nathan@codesourcery.com>
4028 * call.c (joust): Don't warn about conversion ops that are exact
4029 or cv-conversions. Rearrange to avoid multiple type comparisons.
4031 2003-04-23 Mark Mitchell <mark@codesourcery.com>
4034 * call.c (build_cxx_call): Robustify.
4036 2003-04-23 Neil Booth <neil@daikokuya.co.uk>
4038 * Make-lang.in (lex.o): Remove mbchar.h.
4039 * lex.c (MULTIBYTE_CHARS): Lose.
4040 * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
4043 2003-04-23 Mark Mitchell <mark@codesourcery.com>
4046 * cp-tree.h (duplicate_tag_error): Remove.
4047 * class.c (duplicate_tag_error): Remove.
4048 * semantics.c (begin_class_definition): Return immediately for a
4049 duplicate class definition.
4052 * decl.c (grokdeclarator): Correct logic for "mutable" errors.
4054 2003-04-22 Mark Mitchell <mark@codesourcery.com>
4057 * search.c (lookup_fnfields_1): Handle empty slots in the method
4061 * decl.c (check_elaborated_type_specifier): New function, split
4063 (xref_tag): ... here. Use the new function in more places.
4065 * rtti.c (throw_bad_typeid): Use build_cxx_call.
4067 2003-04-21 Mark Mitchell <mark@codesourcery.com>
4069 * call.c (build_over_call): Use build_cxx_call.
4070 (build_cxx_call): New method, split out of build_over_call.
4071 * cp-tree.h (language_function): Add can_throw.
4072 (build_cxx_call): Declare it.
4073 * decl.c (finish_function): If a function does not contain any
4074 calls to functions that can throw an exception, indicate that
4076 * decl2.c (mark_used): Do not defer the instantiation of
4077 functions, if the current function does not throw.
4078 * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
4079 * pt.c (instantiate_decl): Make sure import_export_decl is called
4080 before emitting things.
4081 * rtti.c (throw_bad_cast): Use build_cxx_call.
4082 (build_dynamic_cast_1): Likewise.
4083 * typeck.c (build_function_call): Likewise.
4085 2003-04-21 Nathan Sidwell <nathan@codesourcery.com>
4088 * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
4089 expressions. Reverts my 2002-08-08 patch.
4091 * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
4094 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
4096 * cp/decl2.c (start_static_storage_duration_function): Take count
4097 arg, don't check if it wraps round.
4098 (generate_ctor_or_dtor_function): Add locus arg, use it.
4099 (generate_ctor_and_dtor_functions_for_priority): Data arg is a
4101 (finish_file): Set line numbers to past EOF for synthesized
4104 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
4107 * search.c (lookup_field_1): Final scan goes backwards for
4108 types, forwards for non-types.
4110 2003-04-17 Roger Sayle <roger@eyesopen.com>
4113 * decl.c (duplicate_decls): Preserve "const", "noreturn" and
4114 "nothrow" function attributes.
4116 2003-04-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4119 * pt.c (type_dependent_expression_p): Handle array new.
4121 2003-04-15 Mark Mitchell <mark@codesourcery.com>
4124 * parser.c (cp_parser_primary_expression): Reorganize logic for
4125 dealing with name lookup failures.
4127 2003-04-15 Jason Merrill <jason@redhat.com>
4129 * decl2.c (mark_used): Don't instantiate anything if
4132 2003-04-14 Ziemowit Laski <zlaski@apple.com>
4134 * tree.c (build_cplus_array_type_1): Do not call
4135 uses_template_parms() on a NULL index_type.
4137 2003-04-13 Roger Sayle <roger@eyesopen.com>
4139 * decl.c (duplicate_decls): Preserve pure and malloc attributes.
4141 2003-04-12 Mark Mitchell <mark@codesourcery.com>
4144 * init.c (build_new_1): Reorganize.
4146 2003-04-12 Zack Weinberg <zack@codesourcery.com>
4148 * class.c (initialize_array)
4149 * decl.c (reshape_init)
4150 * decl2.c (build_expr_from_tree)
4151 * init.c (build_zero_init)
4152 * pt.c (tsubst_copy, tsubst_copy_and_build)
4153 * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
4154 (ptm_initializer, class_initializer, get_pseudo_ti_init)
4155 * semantics.c (finish_compound_literal)
4156 * typeck.c (build_ptrmemfunc1)
4157 * typeck2.c (store_init_value, process_init_constructor)
4158 (build_functional_cast): Use build_constructor.
4160 2003-04-12 Zack Weinberg <zack@codesourcery.com>
4162 * call.c (print_z_candidates): Use gcc_gettext_width, not
4163 strlen, to determine how much padding to use.
4165 2003-04-10 Zack Weinberg <zack@codesourcery.com>
4167 * decl.c: Update all calls to shadow_warning.
4169 2003-04-10 Mark Mitchell <mark@codesourcery.com>
4171 * class.c (layout_class_type): Correct handling for overlong
4172 bit-fields whose width is the same as an integer type.
4174 2003-04-06 Zack Weinberg <zack@codesourcery.com>
4176 * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
4177 * cp-lang.c (cp_tree_size): New function.
4178 (LANG_HOOKS_TREE_SIZE): Override.
4180 * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
4181 tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
4182 (union lang_tree_node): Remove common and srcloc members.
4183 (build_srcloc_here): Don't prototype.
4184 * decl.c (cp_tree_node_structure): Kill SRCLOC case.
4185 * pt.c (pending_templates): Correct comment.
4186 * tree.c (build_srcloc, build_srcloc_here): Kill.
4188 2003-04-06 Zack Weinberg <zack@codesourcery.com>
4190 * call.c: Include intl.h.
4191 (print_z_candidate): Always use inform; get rid of errfn
4192 argument. Reorganize so that all the strings get picked up
4193 by xgettext. Note obligation of caller to pass first argument
4195 (print_z_candidates): Update to match. Indent second and
4196 successive candidates by strlen() of translated message.
4197 (joust): Restructure ambiguous-conversion pedwarn so that
4198 translators see a complete sentence. Update calls to
4201 * Make-lang.in (cp/call.o): Update dependencies.
4203 2003-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4205 * decl.c (set_current_binding_level): Delete, revert last change.
4206 (current_binding_level): Modify to allow it as as lvalue.
4208 2003-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4210 * name-lookup.c (find_binding): Pass appropriate pointer type to
4211 POP_TIMEVAR_AND_RETURN.
4213 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4215 * Make-lang.in (cp-warn): Add $(STRICT_WARN).
4216 * cp-tree.h: Don't insist on having GNUC.
4218 2003-04-03 Jason Merrill <jason@redhat.com>
4220 * cvt.c (ocp_convert): Only abort if we try to convert an object
4221 of TREE_ADDRESSABLE type.
4223 * class.c (build_vtable): Set DECL_ALIGN here.
4224 (get_vtable_decl): Not here.
4225 (layout_vtable_decl): Or here.
4226 (create_vtable_ptr): Or here.
4227 (layout_class_type): Or here.
4228 (check_bitfield_decl): Don't mess with field alignment.
4230 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4232 * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
4233 DEF_ASSN_OPERATOR): Delete spurious semi-colon.
4234 * rtti.c (dfs_class_hint_mark): Likewise.
4236 * decl.c (push_local_name, push_class_level_binding,
4237 maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
4238 functions returning void.
4239 * decl2.c (add_using_namespace): Likewise.
4241 * decl.c (print_binding_level, print_other_binding_stack,
4242 print_binding_stack): Cast argument of %p specifier to void*.
4243 * ptree.c (cxx_print_decl): Likewise.
4245 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
4246 VAR_FUNCTION_OR_PARM_DECL_CHECK,
4247 VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
4248 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
4249 LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
4251 * decl.c (set_current_binding_level): New macro. Use throughout
4252 when setting the current binding level.
4254 * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
4256 * method.c (mangling_flags): Likewise.
4258 * cp-tree.h (lang_type_header): Add __extension__ and use
4259 CHAR_BITFIELD for members.
4261 2003-04-02 Geoffrey Keating <geoffk@apple.com>
4264 * mangle.c: Include gt-cp-mangle.h.
4265 (subst_identifiers): Mark with GTY.
4266 * config-lang.in (gtfiles): Add cp/mangle.c.
4267 * Make-lang.in: (gt-cp-mangle.h): New rule.
4268 (cp/mangle.o): Depends on gt-cp-mangle.h.
4270 2003-04-01 Andrew Pinski <pinskia@physics.uc.edu>
4272 * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
4273 after \$(srcdir)/cp/name-lookup.h.
4274 * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
4275 of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file.
4276 * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
4277 (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
4279 2003-03-31 Jason Merrill <jason@redhat.com>
4282 * class.c (check_field_decl): Don't set DECL_ALIGN.
4284 2003-03-30 Mark Mitchell <mark@codesourcery.com>
4287 * decl.c (grokdeclarator): Tidy, slightly.
4288 * search.c (lookup_field_1): Add want_type parameter.
4289 (lookup_field_r): Adjust call to lookup_field_1.
4291 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4293 * Make-lang.in (cp/name-lookup.o): Add more dependencies.
4295 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4297 * cp-tree.h (binding_for_name: Move to name-lookup.h Adjust
4299 (cxx_scope_find_binding_for_name): Likewise.
4300 * decl.c (find_binding: Move to name-lookup.c.
4301 (binding_for_name): Likewise.
4302 (cxx_scope_find_binding_for_name): Likewise.
4303 (BINDING_LEVEL): Remove.
4304 (push_binding): Tidy.
4305 (push_class_binding): Likewise.
4306 (pop_binding): Likewise.
4307 (poplevel): Likewise.
4308 (poplevel_class): Likewise.
4309 (set_identifier_type_value_with_scope): Likewise.
4310 (push_overloaded_decl): Likewise.
4311 (lookup_tag): Likewise.
4312 (unqualified_namespace_lookup): Likewise.
4313 (lookup_name_current_level): Likewise.
4314 (maybe_inject_for_scope_var): Likewise.
4315 (namespace_binding): Move to name-lookup.c.
4316 (set_namespace_binding): Likewise.
4317 * decl2.c (lookup_using_namespace): Tidy.
4318 (qualified_lookup_using_namespace): Likewise.
4319 (do_toplevel_using_decl): Likewise.
4320 * name-lookup.c: Include "timevar.h"
4321 * name-lookup.h (cxx_scope): Declare.
4322 (struct cxx_binding): Lose member "has_level". Adjust "scope"
4324 (BINDING_SCOPE): Adjust definition.
4325 (BINDING_HAS_LEVEL_P): Remove.
4327 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4329 * name-lookup.c: New file.
4330 * name-lookup.h: Likewise..
4331 * decl.c (push_binding): Adjust use cxx_binding_make.
4332 (free_bindings): Move to name-lookup.c
4333 (pop_binding): Use cxx_binding_free.
4334 (binding_for_name): Tidy.
4335 * cp-tree.h: Include "name-lookup.h"
4336 (cxx_binding_make): Move to name-lookup.h
4337 (cxx_binding_clear): Likewise.
4338 (struct cxx_binding): Likewise.
4339 (LOCAL_BINDING_P): Likewise.
4340 (INHERITED_VALUE_BINDING_P): Likewise.
4341 (BINDING_SCOPE): Likewise.
4342 (BINDING_HAS_LEVEL_P): Likewise.
4343 (BINDING_VALUE): Likewise.
4344 (BINDING_TYPE): Likewise.
4345 * config-lang.in (gtfiles): Add cp/name-lookup.h
4346 * Make-lang.in (cp/name-lookup.o): New rule.
4347 (CXX_OBJS): Add cp/name-lookup.o
4348 (CXX_TREE_H): Add cp/name-lookup.h
4350 2003-03-28 Jason Merrill <jason@redhat.com>
4353 * cvt.c (force_rvalue): New fn.
4354 * call.c (build_conditional_expr): Use it.
4355 * cp-tree.h: Declare it.
4357 2003-03-28 Mike Stump <mrs@apple.com>
4359 * error.c (dump_expr): Add 0x to printed hex numbers to make
4360 output match source code better.
4362 2003-03-28 Mark Mitchell <mark@codesourcery.com>
4365 * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
4368 * decl2.c (generate_ctor_or_dtor_function): Tolerate a
4369 non-existant ssdf_decls array.
4370 (finish_file): Call generator_ctor_or_dtor_function when there are
4371 static constructors or destructors and no other static
4374 2003-03-28 Nathan Sidwell <nathan@codesourcery.com>
4377 * decl2.c (finish_file): Don't warn about explicitly instantiated
4380 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
4383 * pt.c (lookup_template_class): Only check instantiated args if
4384 they do not contain template parameters.
4386 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
4389 * parser.c (cp_parser_function_definition): Set
4390 DECL_INITIALIZED_IN_CLASS for members.
4391 * pt.c (instantiate_decl): Only reduce the template args for
4392 friends that are not defined in class.
4394 2003-03-25 Jason Merrill <jason@redhat.com>
4396 * call.c (print_z_candidate): Change name of first arg to msgid.
4397 (joust): Add comment for translators.
4399 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
4401 PR c++/9898, PR c++/383, DR 322
4402 * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
4403 through reference types on both PARM and ARG.
4405 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
4408 * error.c (dump_expr) <BASELINK>: Use dump_expr.
4409 * pt.c (maybe_fold_nontype_args): New function.
4410 (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
4411 <TEMPLATE_ID_EXPR>: Break out folding code, call it.
4412 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
4413 maybe_fold_nontype_args.
4415 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
4418 * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
4420 2003-03-23 Mark Mitchell <mark@codesourcery.com>
4423 * typeck.c (cxx_mark_addressable): Adjust call to
4424 gen_mem_addressof or put_var_into_stack.
4426 2003-03-22 Nathan Sidwell <nathan@codesourcery.com>
4428 PR c++/9978, c++/9708
4429 * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
4430 * call.c (add_template_candidate_real): Adjust
4431 instantiate_template call.
4432 * class.c (resolve_address_of_overloaded_function): Likewise.
4433 * decl.c (build_enumerator): Set TREE_CONSTANT.
4434 * pt.c (check_instantiated_args): New.
4435 (push_inline_template_parms_recursive): Set TREE_CONSTANT,
4437 (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
4438 (reduce_template_parm_level): Likewise.
4439 (process_template_parm): Likewise.
4440 (check_explicit_specialization): Adjust instantiate_template call.
4441 (convert_template_argument): Don't check non-type argument here.
4442 (lookup_template_class): Check them here.
4443 (tsubst_friend_function): Adjust instantiate_template call.
4444 (instantiate_template): Add tsubst_flags parameter, use it. Check
4447 2003-03-21 Zack Weinberg <zack@codesourcery.com>
4449 * decl.c: Update calls to shadow_warning.
4451 2003-03-21 Nathan Sidwell <nathan@codesourcery.com>
4454 * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
4455 (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
4457 2003-03-20 Mark Mitchell <mark@codesourcery.com>
4459 * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
4461 * cp/pt.c (instantiate_class_template): Fix formatting.
4463 2003-03-14 Matt Austern <austern@apple.com>
4465 * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
4466 (unemitted_tinfo_decl_p): Remove.
4467 (emit_tinfo_decl): Change declaration to remove unused parameter.
4468 * decl2.c (finish_file): Change tinfo emission to loop through
4469 unemitted_tinfo_decls array instead of looping through all decls.
4470 * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
4471 unused second parameter.
4472 (init_rtti_processing): initialize unemitted_tinfo_decls varray.
4473 (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
4474 (emit_tinfo_decl): remove unused second parameter, add assertion
4475 that decl hasn't already been emitted.
4477 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
4479 * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
4480 type from 'int' to 'bool'. Replace 0 and 1 with true and false in
4483 2003-03-19 Jason Merrill <jason@redhat.com>
4485 PR c++/8316, c++/9315, c++/10136
4486 * call.c (print_z_candidate): Split out from...
4487 (print_z_candidiates): ...here.
4490 2003-03-17 Roger Sayle <roger@eyesopen.com>
4493 * decl.c (duplicate_decls): Use the new type when prototyping
4494 anticipated decls, even when the types match. This defines the
4495 exception list for the built-in function.
4497 2003-03-17 Jason Merrill <jason@redhat.com>
4500 * typeck.c (build_class_member_access_expr): Compare
4503 2003-03-17 Mark Mitchell <mark@codesourcery.com>
4506 * parser.c (cp_parser_declarator_id): Clear parser->scope.
4508 2003-03-16 Jason Merrill <jason@redhat.com>
4511 * decl.c (finish_function): Only allow the NRVO to use variables
4512 declared at function scope.
4514 2003-03-17 Andreas Jaeger <aj@suse.de>
4516 * Make-lang.in (cp/TAGS): Remove.
4518 2003-03-16 Nathan Sidwell <nathan@codesourcery.com>
4521 * cp-tree.h (struct language_function): Add in_base_initializer.
4522 (in_base_initializer): define it.
4523 (expand_member_init): Remove INIT param.
4524 * init.c (expand_member_init): Remove INIT param, return the member.
4525 (emit_mem_initializers): Set in_base_initializer.
4526 * class.c (build_base_path): Check in_base_initializer.
4527 * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
4528 * pt.c (tsubst_initializer_list): Likewise.
4530 2003-03-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
4532 * decl.c (binding_for_name): Fix initialization thinko.
4534 2003-03-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
4536 Compile-time improvement: 2/n.
4537 * cp-tree.h (struct cxx_binding): New datatype;
4538 (struct lang_identifier): Use it.
4539 (LOCAL_BINDING_P): Adjust definition.
4540 (INHERITED_VALUE_BINDING_P): Likewise.
4541 (BINDING_SCOPE): Likewise.
4542 (BINDING_HAS_LEVEL_P): Likewise.
4543 (BINDING_VALUE): Likewise.
4544 (BINDING_TYPE): Likewise.
4545 (IDENTIFIER_VALUE): Likewise.
4546 (struct tree_binding): Remove.
4547 (TS_CP_BINDING): Likewise.
4548 ((union lang_tree_node): Remove field "binding".
4549 (cxx_binding_clear): New macro.
4550 (binding_for_name): Adjust return type.
4551 (qualified_lookup_using_namespace): Adjust prototype.
4552 (lookup_using_namespace): Adjust prototype.
4553 (cxx_scope_find_binding_for_name): Declare.
4554 * cp-tree.def: Remove CPLUS_BINDING definition.
4555 * decl.c (push_binding): Adjust local variable type.
4556 (add_binding): Likewise.
4557 (push_class_binding): Likewise.
4558 (pop_binding): Likewise.
4559 (poplevel): Likewise.
4560 (poplevel_class): Likewise.
4561 (free_bindings): Adjust type.
4562 (find_binding): Adjust return type, add a third parameter. Remove
4563 non-useful assertion now that we use static typing.
4564 (cxx_scope_find_binding_for_name): New function.
4565 (binding_for_name): Use it. Adjust local variable type. Simplify.
4566 (namespace_binding): Simplify.
4567 (set_namespace_binding): Likewise.
4568 (set_identifier_type_value_with_scope): Adjust local variable type.
4569 (lookup_tag): Don't type-abuse of local variable 'old'.
4570 (lookup_namespace_name): Likewise. Allocate binding on stack.
4571 (select_decl): Adjust prototype.
4572 (unqualified_namespace_lookup): Allocate binding on stack.
4573 Don't type-abuse of local variable 'val'.
4574 (lookup_name_real): Likewise.
4575 (maybe_inject_for_scope_var): Adjust local variable type.
4576 (cp_tree_node_structure): Remove CPLUS_BINDING case label.
4577 (namespace_binding): Adjust logic, simplify.
4578 (BINDING_LEVEL): Adjust definition.
4579 (push_class_level_binding): Adjust local variable type.
4580 (struct cxx_saved_binding): Adjust field 'binding' type.
4581 * decl2.c (ambiguous_decl): Adjust prototype.
4582 (lookup_using_namespace): Adjust local variable type.
4583 (qualified_lookup_using_namespace): Catch type error and correct
4584 ensueing logic error.
4585 (do_nonmember_using_decl): Adjust local variable type. Allocate
4586 temporary cxx_binding on stack.
4587 (do_toplevel_using_decl): Adjust local variable type.
4588 * ptree.c (cxx_print_cxx_binding): New function.
4589 (cxx_print_identifier): Use it.
4590 (cxx_print_xnode): Delete CPLUS_BINDING case label.
4592 2003-03-15 Roger Sayle <roger@eyesopen.com>
4594 * tree.c (count_functions): Fix whitespace.
4596 2003-03-15 Neil Booth <neil@daikokuya.co.uk>
4598 * Make-lang.in: Update.
4600 2003-03-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4603 * pt.c (maybe_process_partial_specialization): Handle
4604 member class template when enclosing class template is
4605 explicit specialized.
4606 (most_general_template): Stop looking when DECL is already
4609 2003-03-13 Jason Merrill <jason@redhat.com>
4612 * search.c (lookup_conversions): Call complete_type here.
4613 * call.c (implicit_conversion): Not here.
4615 2003-03-13 Mark Mitchell <mark@codesourcery.com>
4617 * decl2.c (do_nonmember_using_decl): Correct handling of
4618 simultaneous type/non-type bindings.
4620 * call.c (initialize_reference): Remove bogus assertion.
4621 * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
4623 2003-03-12 Andrew Lewycky <andrew@mxc.ca>
4626 * expr.c (cxx_expand_expr): Return const0_rtx for throw
4629 2003-03-11 Mark Mitchell <mark@codesourcery.com>
4632 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4633 to merge old and new declarations.
4635 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
4638 * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
4639 (cp/g++.1): Build it from scratch in the build tree.
4640 (c++.install-man): Depend on it. Install it from the build tree.
4641 (c++.mostlyclean): Clean it.
4643 2003-03-11 Mark Mitchell <mark@codesourcery.com>
4646 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4647 to merge old and new declarations.
4650 * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
4652 2003-03-11 Jason Merrill <jason@redhat.com>
4655 * search.c (lookup_member): Fix handling of functions in a class
4658 2003-03-11 Mark Mitchell <mark@codesourcery.com>
4661 * call.c (convert_class_to_reference): Adjust usage of
4663 (any_viable): Remove.
4664 (splice_viable): Combine with any_viable.
4665 (print_z_candidates): Avoid printing duplicates.
4666 (build_user_type_conversion_1): Adjust usage of splice_viable.
4667 (build_new_function_call): Likewise.
4668 (build_operator_new_call): Likewise.
4669 (build_object_call): Likewise.
4670 (build_conditional_expr): Likewise.
4671 (build_new_op): Likewise.
4672 (build_new_method_call): Likewise.
4673 (joust): Remove spurious comment.
4674 * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
4675 * decl2.c (arg_assoc_class): Simplify.
4676 * friend.c (add_friend): Likewise.
4678 2003-03-11 Jason Merrill <jason@redhat.com>
4681 * decl2.c (check_classfn): A member template only matches a
4684 2003-03-11 Neil Booth <neil@daikokuya.co.uk>
4686 * Make-lang.in (CXX_C_OBJS): Update.
4687 * lang-specs.h: Don't define __GNUG__ here.
4689 2003-03-10 Mark Mitchell <mark@codesourcery.com>
4691 * call.c (perform_overload_resolution): New function.
4692 (build_new_function_call): Use it.
4693 (build_operator_new_call): Likewise.
4694 (add_candidates): Add explicit_targs and template_only parameters.
4695 (build_new_op): Adjust accordingly.
4696 * cp-tree.h (build_operator_new_call): New function.
4697 (build_function_call_real): Remove.
4698 (build_function_call_maybe): Likewise.
4699 * init.c (build_new_1): Use build_operator_new_call.
4700 * typeck.c (build_function_call_real): Rename to ...
4701 (build_function_call): ... this.
4703 2003-03-10 Devang Patel <dpatel@apple.com>
4706 * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
4708 2003-03-10 Jason Merrill <jason@redhat.com>
4711 * decl.c (push_using_directive): Push before recursing.
4713 PR c++/9868, c++/9524
4714 * call.c (resolve_scoped_fn_name): Handle the case of a function
4717 * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
4718 argument in the pointer-to-member case.
4720 2003-03-09 Mark Mitchell <mark@codesourcery.com>
4723 * cp-lang.c (cxx_get_alias_set): Use alias set zero for
4724 pointers to member functions.
4727 * decl.c (build_ptrmemfunc_type): Do not allow default arugments
4728 in pointer-to-member-function types.
4730 2003-03-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
4732 * expr.c (cplus_expand_constant): Use C90 prototype style.
4733 (cxx_expand_expr): Likewise.
4735 2003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4738 * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
4741 2003-03-08 Geoffrey Keating <geoffk@apple.com>
4743 * lang-specs.h (c++-header): Change .pch to .gch.
4745 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
4747 * cp-tree.h (cxx_init): Update prototype.
4748 * lex.c (cxx_init): Similarly.
4750 2003-03-08 Mark Mitchell <mark@codesourcery.com>
4753 * cp-tree.h (begin_mem_initializers): Remove.
4754 * parser.c (cp_parser_mem_initializer_list): Inline it here.
4755 Do not call finish_mem_initializers if not in a constructor.
4756 (cp_parser_class_head): Fix typo in error message.
4757 * semantics.c (begin_mem_initializers): Remove.
4758 * testsuite/g++.dg/parser/constructor1.C: New test.
4761 * call.c (add_function_candidate): Skip builtin fuctions that have
4762 not yet been declared.
4765 * init.c (build_new_1): Correct logic for determining whether or
4766 not to use an array cookie.
4769 * parser.c (cp_parser_postfix_expression): Call
4770 finish_non_static_data_member, even when processing_template_decl.
4773 * cp-tree.h (is_ancestor): New function.
4774 (handle_class_head): Change prototype.
4775 * decl2.c (is_namespace_ancestor): Rename to ...
4776 (namespace_anecestor): ... this.
4777 (set_decl_namespace): Adjust accordingly.
4778 (handle_class_head): Remove unnecessary parameters.
4779 * parser.c (cp_parser_class_head): Check that
4780 nested-name-specifiers are used appropriately.
4782 2003-03-07 Mark Mitchell <mark@codesourcery.com>
4784 * call.c (reference_binding): Remove REF_IS_VAR parameter.
4785 (implicit_conversion): Adjust call to reference_binding.
4786 (make_temporary_var_for_ref_to_type): Add TYPE parameter.
4787 (initialize_reference): Adjust handling for references bound to
4789 * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
4791 (real_non_cast_lvalue_p): New method.
4792 * cvt.c (build_up_reference): Adjust use of
4793 make_temporary_var_for_ref_to_temp.
4794 * tree.c (real_non_cast_lvalue_p): New method.
4796 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
4798 * except.c (init_exception_processing): Use C90 prototype style.
4799 (cp_protect_cleanup_actions): Likewise.
4800 (prepare_eh_type): Likewise.
4801 (build_eh_type_type): Likewise.
4802 (build_exc_ptr): Likewise.
4803 (do_begin_catch): Likewise.
4804 (dtor_nothrow): Likewise.
4805 (do_end_catch): Likewise.
4806 (push_eh_cleanup): Likewise.
4807 (decl_is_java_type): Likewise.
4808 (choose_personality_routine): Likewise.
4809 (initialize_handler_parm): Likewise.
4810 (expand_start_catch_block): Likewise.
4811 (expand_end_catch_block): Likewise.
4812 (begin_eh_spec_block): Likewise.
4813 (finish_eh_spec_block): Likewise.
4814 (do_allocate_exception): Likewise.
4815 (do_free_exception): Likewise.
4816 (wrap_cleanups_r): Likewise.
4817 (stabilize_throw_expr): Likewise.
4818 (build_throw): Likewise.
4819 (complete_ptr_ref_or_void_ptr_p): Likewise.
4820 (is_admissible_throw_operand): Likewise.
4821 (nothrow_libfn_p): Likewise.
4822 (can_convert_eh): Likewise.
4823 (check_handlers_1): Likewise.
4824 (check_handlers): Likewise.
4826 2003-03-06 Mark Mitchell <mark@codesourcery.com>
4828 * call.c (merge_conversion_sequences): New function.
4829 (build_conv): Set ICS_USER_FLAG for USER_CONVs.
4830 (convert_class_to_reference): Correct handling of second
4831 standard conversion sequence in a user-defined conversion
4833 (build_user_type_conversion_1): Use merge_conversion_sequences.
4834 * cp-tree.def: Add comments for CONV nodes.
4835 * rtti.c (get_tinfo_decl): Use build_address/build_nop.
4837 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
4839 * error.c (init_error): Use C90 prototype style.
4840 (dump_scope): Likewise.
4841 (dump_qualifiers): Likewise.
4842 (dump_template_argument): Likewise.
4843 (dump_template_argument_list): Likewise.
4844 (dump_template_parameter): Likewise.
4845 (dump_template_bindings): Likewise.
4846 (dump_type): Likewise.
4847 (dump_typename): Likewise.
4848 (class_key_or_enum): Likewise.
4849 (dump_aggr_type): Likewise.
4850 (dump_type_prefix): Likewise.
4851 (dump_type_suffix): Likewise.
4852 (dump_global_iord): Likewise.
4853 (dump_simple_decl): Likewise.
4854 (dump_decl): Likewise.
4855 (dump_template_decl): Likewise.
4856 (dump_function_decl): Likewise.
4857 (dump_parameters): Likewise.
4858 (dump_exception_spec): Likewise.
4859 (dump_function_name): Likewise.
4860 (dump_template_parms): Likewise.
4861 (dump_char): Likewise.
4862 (dump_expr_list): Likewise.
4863 (dump_expr): Likewise.
4864 (dump_binary_op): Likewise.
4865 (dump_unary_op): Likewise.
4866 (type_as_string): Likewise.
4867 (expr_as_string): Likewise.
4868 (decl_as_string): Likewise.
4869 (context_as_string): Likewise.
4870 (lang_decl_name): Likewise.
4871 (cp_file_of): Likewise.
4872 (cp_line_of): Likewise.
4873 (decl_to_string): Likewise.
4874 (expr_to_string): Likewise.
4875 (fndecl_to_string): Likewise.
4876 (code_to_string): Likewise.
4877 (language_to_string): Likewise.
4878 (parm_to_string): Likewise.
4879 (op_to_string): Likewise.
4880 (type_to_string): Likewise.
4881 (assop_to_string): Likewise.
4882 (args_to_string): Likewise.
4883 (cv_to_string): Likewise.
4884 (cxx_print_error_function): Likewise.
4885 (cp_diagnostic_starter): Likewise.
4886 (cp_diagnostic_finalizer): Likewise.
4887 (cp_print_error_function): Likewise.
4888 (function_category): Likewise.
4889 (print_instantiation_full_context): Likewise.
4890 (print_instantiation_partial_context): Likewise.
4891 (maybe_print_instantiation_context): Likewise.
4892 (print_instantiation_context): Likewise.
4893 (cp_printer): Likewise.
4894 (print_integer): Likewise.
4895 (print_non_consecutive_character): Likewise.
4896 (locate_error): Likewise.
4898 2003-03-06 Mark Mitchell <mark@codesourcery.com>
4901 * call.c (reference_binding): Add ref_is_var parameter.
4902 (implicit_conversion): Adjust call to reference_binding.
4903 (initialize_reference): Likewise.
4906 * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
4910 * class.c (get_basefndecls): Use lookup_fnfields_1.
4912 2003-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4915 * parser.c (cp_parser_type_parameter): Remove redundant `expect'
4917 (cp_parser_single_declaration): Likewise.
4919 2003-03-05 Jason Merrill <jason@redhat.com>
4922 * call.c (build_conditional_expr): Use convert rather than an
4925 2003-03-02 Matt Austern <austern@apple.com>
4927 * decl.c (cp_binding_level): Add static_decls varray member.
4928 (add_decl_to_level): Add static/inline namespace scope
4929 declarations to static_decls array.
4930 (wrapup_global_for_namespace): Pass static_decls only, instead of
4931 all decls, to wrapup_global_declarations/check_global_declarations.
4932 (push_namespace): Initialize static_decls for ordinary namespaces.
4933 (cxx_init_decl_processing): Initialize static_decls for global
4936 2003-03-05 Mark Mitchell <mark@codesourcery.com>
4938 * class.c (end_of_class): Correct thinko.
4940 2003-03-04 Nathanael Nerode <neroden@gcc.gnu.org>
4942 * config-lang.in: Replace ${libstdcxx_version} by its value.
4944 2003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4946 * cp-tree.h (cxx_saved_binding): Declare.
4947 (struct saved_scope): Adjust type of field 'old_binding'.
4948 * decl.c (cxx_saved_binding_make): New macro.
4949 (struct cxx_saved_binding): Define.
4950 (store_bindings): Adjust prototype. Use cxx_saved_binding to save
4952 (maybe_push_to_top_level): Adjust local variable type.
4953 (pop_from_top_level): Likewise.
4955 2003-03-04 Tom Tromey <tromey@redhat.com>
4957 * Make-lang.in (c++.tags): New target.
4959 2003-03-04 Neil Booth <neil@daikokuya.co.uk>
4961 * Make-lang.in: Update.
4963 2003-03-03 Jason Merrill <jason@redhat.com>
4965 * decl.c (finish_enum): Do set the type in a template. Simplify.
4966 * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
4968 2003-03-03 Mark Mitchell <mark@codesourcery.com>
4971 * call.c (convert_class_to_reference): Correct conversion
4973 (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
4974 (implicit_conversion): Adjust call to reference_binding.
4975 (add_candidate): Change type of candidates parameter.
4976 (add_function_candidate): Likewise.
4977 (add_conv_candidate): Likewise.
4978 (build_builtin_candidate): Likewise.
4979 (add_builtin_candidate): Likewise.
4980 (add_builtin_candidates): Likewise.
4981 (add_template_candidate_real): Likewise.
4982 (add_template_candidate): Likewise.
4983 (add_template_conv_candidate): Likewise.
4984 (build_user_type_conversion_1): Adjust accordingly.
4985 (build_object_call): Likewise.
4986 (build_conditional_expr): Likewise.
4987 (add_candidates): Likewise.
4988 (build_new_op): Likewise.
4989 (convert_like_real): Use USER_CONV_CAND. Use build_nop.
4990 (build_new_method_call): Adjust calls to add_function_candidate.
4991 (make_temporary_var_for_ref_to_temp): New function.
4992 (initialize_reference): Add decl parameter.
4993 * class.c (build_rtti_vtbl_entries): Use build_address and
4995 * cp-tree.h (initialize_reference): Change prototype.
4996 (make_temporary_var_for_ref_to_temp): New function.
4997 (build_type_conversion): Change prototype.
4998 (build_address): New function.
4999 (build_nop): Likewise.
5000 * cvt.c (cp_convert_to_pointer): Adjust call to
5001 build_type_conversion. Avoid indicating redundant NOP_EXPRs.
5003 (convert_to_pointer_force): Use build_nop.
5004 (build_up_reference): Use make_temporary_var_for_ref_to_temp.
5005 (convert_to_reference): Adjust call to build_type_conversion.
5006 (ocp_convert): Likewise.
5007 (build_type_conversion): Remove for_sure parameter.
5008 * decl.c (grok_reference_init): Use initialize_reference.
5009 * typeck.c (build_address): New function.
5010 (build_nop): Likewise.
5011 (build_unary_op): Use them.
5012 (build_ptrmemfunc): Tidy slightly.
5013 (convert_for_initialization): Adjust call to
5014 initialize_reference.
5015 * typeck2.c (store_init_value): Remove #if 0'd code.
5017 2003-03-03 Jason Merrill <jason@redhat.com>
5019 * decl.c (start_function): Clear DECL_NUM_STMTS.
5021 * class.c (get_vtable_decl): Use vtbl_type_node.
5022 (build_primary_vtable): Check for it.
5024 2003-03-02 Aldy Hernandez <aldyh@redhat.com>
5026 * decl.c (check_initializer): Check for vector_opaque_p.
5028 2003-03-02 Ashif Harji <asharji@uwaterloo.ca>
5030 * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
5031 invoke an external cpp during compilation.
5033 2003-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
5035 * decl.c (duplicate_decls): Convert use of warning_with_decl() to
5037 (start_decl): Likewise.
5038 (start_function): Likewise.
5040 2003-03-01 Neil Booth <neil@daikokuya.co.uk>
5042 * Make-lang.in (CXX_C_OBJS): Update.
5044 2003-02-28 Mark Mitchell <mark@codesourcery.com>
5047 * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
5050 2003-02-28 Aldy Hernandez <aldyh@redhat.com>
5052 * parser.c (cp_parser_init_declarator): Revert opaque
5053 vector_opaque_p change.
5054 Do not include target.h.
5056 2003-02-28 Mark Mitchell <mark@codesourcery.com>
5059 * cp-tree.h (build_zero_init): Add parameter.
5060 * decl.c (cp_finish_decl): Adjust call.
5061 * init.c (build_zero_init): Add nelts parameter. Adjust recursive
5063 (build_default_init): Add nelts parameter. Adjust calls to
5065 (build_new_1): Adjust call to build_default_init.
5066 * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
5068 2003-02-26 Devang Patel <dpatel@apple.com>
5070 * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
5071 required. Postpone enum setting for template decls.
5072 (build_enumerator): Delay copying value node until finish_enum
5073 (). Remove #if 0'ed code.
5074 * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
5075 (tsubst_copy): Add check for enum type.
5077 2003-02-25 Mark Mitchell <mark@codesourcery.com>
5080 * decl2.c (prune_vars_needing_no_initialization): Do not throw
5081 away initializations for DECL_EXTERNAL VAR_DECLs.
5082 (finish_file): Adjust accordingly.
5083 * pt.c (instantiate_decl): Do not defer VAR_DECLs.
5085 2003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
5087 * decl.c (add_binding): Time TV_NAME_LOOKUP.
5088 (push_class_binding): Likewise.
5089 (set_namespace_binding): Likewise.
5091 2003-02-24 Mark Mitchell <mark@codesourcery.com>
5094 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
5095 specializations back to the main template.
5096 * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
5097 * pt.c (resolve_typename_type): Likewise.
5099 2003-02-24 Jeffrey D. Oldham <oldham@codesourcery.com>
5102 * pt.c (tsubst_copy_and_build): For a templated function inside a
5103 scope, process template arguments.
5105 2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5108 * typeck2.c (abstract_virtuals_error): Don't check when
5109 TYPE is still template parameter dependent.
5111 2003-02-23 Mark Mitchell <mark@codesourcery.com>
5114 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
5115 * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
5116 * pt.c (instantiate_class_template): Don't try to instantiate
5118 (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
5120 2003-02-21 Mark Mitchell <mark@codesourcery.com>
5123 * decl.c (grokdeclarator): Do not allow parameters with variably
5126 2003-02-21 Nathan Sidwell <nathan@codesourcery.com>
5128 * search.c (grow_bfs_bases): Remove. Fold into ...
5129 (bfs_walk): ... here, fix fencepost error. Fix merge lossage
5132 2003-02-20 Mark Mitchell <mark@codesourcery.com>
5135 * mangle.c (mangle_conv_op_name_for_type): Issue an error message
5136 when the G++ 3.2 ABI prevents correct compilation.
5138 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
5140 Change base class access representation. Share virtual base
5142 * cp/call.c (build_special_member_call): Remove binfo_for_vbase
5144 * cp/class.c (build_base_path): Likewise.
5145 (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
5146 (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
5147 (make_new_vtable): Adjust.
5148 (force_canonical_binfo_r): Delete.
5149 (force_canonical_binfo): Delete.
5150 (mark_primary_virtual_base): Delete.
5151 (dfs_unshared_virtual_bases): Delete.
5152 (mark_primary_bases): Adjust.
5153 (maybe_warn_about_overly_private_class): Adjust.
5154 (dfs_base_derived_from): Delete.
5155 (base_derived_from): Follow the inheritance chain.
5156 (struct find_final_overrider_data): Add vpath member.
5157 (dfs_find_final_overrider): Adjust.
5158 (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
5159 (find_final_overrider): Adjust.
5160 (update_vtable_entry_for_fn): Adjust.
5161 (modify_all_vtables): Adjust.
5162 (walk_subobject_offsets): Adjust.
5163 (layout_nonempty_base_or_field): Adjust.
5164 (layout_empty_base): Remove last parameter. Adjust.
5165 (build_base_field): Adjust.
5166 (build_base_fields): Adjust.
5167 (propagate_binfo_offsets): Remove last parameter. Adjust.
5168 (dfs_set_offset_for_unshared_vbases): Delete.
5169 (layout_virtual_bases): Adjust.
5170 (finish_struct_1): Adjust.
5171 (init_class_processing): Don't init access nodes.
5172 (dfs_get_primary_binfo): Delete.
5173 (get_primary_binfo): Adjust.
5174 (dump_class_hierarchy_r): Remove most derived arg, add IGO
5176 (dump_class_hierarchy): Adjust.
5177 (finish_vtbls): Adjust.
5178 (get_original_base): Delete.
5179 (build_vtt_inits): Adjust.
5180 (dfs_build_secondary_vptr_vtt_inits): Adjust.
5181 (dfs_ctor_vtable_bases_queue_p): Adjust.
5182 (build_ctor_vtbl_group): Adjust.
5183 (dfs_accumulate_vtbl_inits): Adjust.
5184 (build_vtbl_initializer): Adjust.
5185 (build_vbase_offset_vtbl_entries): Adjust.
5186 (add_vcall_offset_vtbl_entries_1): Adjust.
5187 * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
5188 (access_*_node): Remove.
5189 (CANONICAL_BINFO): Delete.
5190 (BINFO_UNSHARED_MARKED): Remove.
5191 (BINFO_MARKED): Set LANG_FLAG_0 directly.
5192 (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
5193 (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
5194 (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
5196 (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
5197 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
5198 (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
5200 (BINFO_DEPENDENT_BASE_P): New.
5201 (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
5203 (markedp, unmarkedp): Adjust.
5204 (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
5205 dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
5206 find_vbase_instance, binfo_for_vbase): Delete.
5207 (copied_binfo, original_binfo): Declare.
5208 (finish_base_specifier): Add virtual_p arg.
5209 (unshare_base_binfos): Delete.
5210 (copy_base_binfos): Declare.
5211 (reverse_path): Delete.
5212 * cp/decl.c (xref_basetypes): Access and virtuality passed
5213 differently. Don't copy direct base binfos here. Call
5215 * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
5216 (initialize_vtbl_ptrs): Adjust.
5217 (expand_member_init): Adjust.
5218 * cp/parser.c (cp_parser_base_specifier): Adjust.
5219 * cp/pt.c (instantiate_class_template): Adjust.
5220 (get_template_base_recursive): Adjust.
5221 * cp/rtti.c (get_pseudo_ti_init): Adjust.
5222 (get_pseudo_ti_desc): Adjust.
5223 * cp/tree.c (unshare_base_binfos): Rename to ...
5224 (copy_base_binfos): ... here, reimplement.
5225 (make_binfo): Set BINFO_DEPENDENT_BASE_P.
5226 (reverse_path): Remove.
5227 * cp/typeck.c (get_delta_difference): Adjust error messages.
5228 * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
5229 * cp/search.c (lookup_base_r): Adjust.
5230 (dynamic_cast_base_recurse): Adjust.
5231 (canonical_binfo): Remove.
5232 (dfs_canonical_queue): Remove.
5233 (dfs_assert_unmarked_p): Remove.
5234 (assert_canonical_unmarked): Remove.
5235 (shared_marked_p, shared_unmarked_p): Remove.
5236 (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
5237 (dfs_access_in_type): Adjust.
5238 (access_in_type): Adjust.
5239 (dfs_accessible_queue_p): Adjust.
5240 (dfs_accessible_p): Adjust.
5241 (is_subobject_of_p_1, is_subobject_of_p): Remove.
5242 (struct lookup_field_info): Remove from_dep_base_p field.
5243 (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
5244 (lookup_field_r): Remove dependent base code.
5245 (lookup_member): Likewise.
5246 (dfs_walk, dfs_walk_real): Add access arg to queue fn.
5247 (dfs_unmarked_real_bases_queue_p): Remove.
5248 (dfs_marked_real_bases_queue_p): Remove.
5249 (dfs_skip_vbases): Remove.
5250 (dfs_get_pure_virtuals): Adjust.
5251 (markedp, unmarkedp): Adjust.
5252 (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
5253 (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
5254 (dfs_unmark): Adjust.
5255 (dfs_get_vbase_types):Remove.
5256 (dfs_build_inheritance_graph_order): Remove.
5257 (get_vbase_types): Remove
5258 (dfs_find_vbase_instance): Remove.
5259 (find_vbase_instance): Remove.
5260 (dfs_debug_unmarkedp): Adjust.
5261 (dependent_base_p): Remove.
5262 (dfs_push_type_decls): Adjust.
5263 (dfs_push_decls): Adjust.
5264 (dfs_no_overlap_yet): Adjust.
5265 (copied_binfo): New function.
5266 (original_binfo): New function.
5267 (binfo_for_vbase): Remove.
5269 2003-02-18 Zack Weinberg <zack@codesourcery.com>
5271 * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
5272 (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
5275 2003-02-18 Mark Mitchell <mark@codesourcery.com>
5278 * class.c (layout_class_type): In the 3.2 ABI, take into account
5279 trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
5281 2003-02-18 Matt Austern <austern@apple.com>
5283 * cp/cp-lang.c: Change lang hooks so that final_write_globals does
5285 * cp/decl.c (wrapup_globals_for_namespace): Remove special
5286 handling of global namespace.
5288 2003-02-18 Geoffrey Keating <geoffk@apple.com>
5290 * cp-tree.h (rid_to_yy): Delete.
5291 (C_RID_YYCODE): Delete.
5292 (finish_file): Delete redundant declaration.
5294 2003-02-18 Jason Merrill <jason@redhat.com>
5297 * decl.c (reshape_init): Don't mess with initializer labels.
5300 * parser.c (cp_parser_postfix_expression): Set idk properly for
5301 object->scope::member.
5303 2003-02-18 Ben Elliston <bje@redhat.com>
5306 * decl.c (duplicate_decls): Fix typo in comment.
5308 2003-02-17 Michael Elizabeth Chastain <mec@shout.net>
5311 * class.c (build_base_field): Mark fields for base classes with
5314 2003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5317 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
5318 CONSTRUCTOR_ELTS only once.
5320 2003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5323 * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
5324 (dump_type_suffix): Likewise.
5326 2003-02-14 Nathan Sidwell <nathan@codesourcery.com>
5328 * search.c: ANSIfy function declarations and definitions.
5329 * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
5330 * call.c (build_method_call, resolve_scoped_fn_name,
5331 build_java_interface_fn_ref): Adjust lookup_field, lookup_member
5333 * class.c (handle_using_decl): Likewise.
5334 * decl.c (make_typename_type, make_unmound_class_template,
5335 start_decl, compute_array_index_type): Likewise.
5336 * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
5337 * init.c (expand_member_init, build_member_call): Likewise.
5338 * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
5339 resolve_typename_type): Likewise.
5340 * typeck.c (lookup_destructor, finish_class_member_access_exprm
5341 build_prememfunc_access_expr): Likewise.
5343 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
5345 * decl2.c: Include "timevar.h".
5346 (namespace_ancestor): Time name lookup.
5347 (add_using_namespace): Likewise.
5348 (lookup_using_namespace): Likewise.
5349 (qualified_lookup_using_namespace): Likewise.
5350 (decl_namespace): Likewise.
5351 (lookup_arg_dependent): Likewise.
5352 * lex.c (do_identifier): Likewise.
5353 (do_scoped_id): Likewise.
5354 * pt.c (lookup_template_class): Likewise.
5356 2003-02-14 Andrew Pinski <pinskia@physics.uc.edu>
5358 * decl.c: (define_label): Fix warning for return 0 instead of NULL.
5360 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
5362 * decl.c: Include "timevar.h".
5363 (poplevel): Time name lookup.
5364 (find_binding): Likewise.
5365 (push_namespace): Likewise.
5366 (pop_nested_namespace): Likewise.
5367 (store_bindings): Likewise.
5368 (maybe_push_to_top_level): Likewise.
5369 (pop_from_top_level): Likewise.
5370 (push_local_name): Likewise.
5371 (pushtag): Likewise.
5372 (pushdecl): Likewise.
5373 (pushdecl_with_scope): Likewise.
5374 (pushdecl_namespace_level): Likewise.
5375 (pushdecl_top_level): Likewise.
5376 (pushdecl_class_level): Likewise.
5377 (push_class_level_binding): Likewise.
5378 (push_using_decl): Likewise.
5379 (push_using_directive): Likewise.
5380 (push_overloaded_decl): Likewise.
5381 (lookup_label): Likewise.
5382 (define_label): Likewise.
5383 (lookup_tag): Likewise.
5384 (lookup_tag_reverse): Likewise.
5385 (lookup_namespace_name): Likewise.
5386 (select_decl): Likewise.
5387 (unqualified_namespace_lookup): Likewise.
5388 (lookup_name_real): Likewise.
5389 (lookup_name_current_level): Likewise.
5390 (lookup_type_current_level): Likewise.
5391 (maybe_inject_for_scope_var): Likewise.
5392 (xref_tag): Likewise.
5394 * Make-lang.in (cp/decl.o): Add dependency on timevar.h
5396 2003-02-12 Phil Edwards <pme@gcc.gnu.org>
5398 * decl.c (build_enumerator): Remove unneeded test.
5400 2003-02-09 Dan Nicolaescu <dann@ics.uci.edu>
5402 * cp-tree.h (struct lang_type_header): Make all fields unsigned
5405 2003-02-03 Mark Mitchell <mark@codesourcery.com>
5408 * call.c (z_candidate): Add args.
5409 (convert_class_to_reference): Set it.
5410 (implicit_conversion): Tidy.
5411 (add_candidate): Add args parameter.
5412 (add_function_candidate): Adjust call to add_candidate.
5413 (add_conv_candidate): Likewise.
5414 (build_builtin_candidate): Likewise.
5415 (build_user_type_conversion_1): Eliminate wasteful tree_cons
5417 (build_new_function_call): Likewise.
5418 (build_object_call): Likewise.
5419 (add_candidates): New function.
5420 (build_new_op): Use it.
5421 (covert_like_real): Adjust call to build_over_call.
5422 (build_over_call): Remove args parameter.
5423 * operators.def: Add <?= and >?=.
5425 2003-02-01 Richard Sandiford <rsandifo@redhat.com>
5427 * typeck.c (build_indirect_ref): Don't check flag_volatile.
5429 2003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5432 * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
5434 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
5436 * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
5437 BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
5438 (BINFO_LANG_ELTS): New #define.
5439 * tree.c (make_binfo): Use BINFO_LANG_ELTS.
5441 2003-01-30 Geoffrey Keating <geoffk@apple.com>
5443 * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
5445 2003-01-30 Mark Mitchell <mark@codesourcery.com>
5447 * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
5449 * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
5450 rather than TYPE_LANG_FLAG_0.
5451 (TYPE_BUILT_IN): Remove.
5452 (TYPE_DEPENDENT_P): New macro.
5453 (TYPE_DEPENDENT_P_VALID): Likewise.
5454 (lang_type_class): Add fields_readonly.
5455 * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
5456 * pt.c (dependent_type_p_r): New function, split out from ...
5457 (dependent_type_p): ... here. Memoize results.
5458 * search.c (dependent_base_p): Use dependent_type_p, not
5459 uses_template_parms.
5460 * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
5463 2003-01-29 Mark Mitchell <mark@codesourcery.com>
5465 * call.c (build_field_call): Use build_new_op, not build_opfncall.
5466 (prep_operand): New function.
5467 (build_new_op): Use it. Remove dead code.
5468 * class.c (pushclass): Change "modify" parameter type from int to
5470 (currently_open_class): Use same_type_p, not pointer equality.
5471 (push_nested_class): Adjust calls to pushclass, remove modify
5473 * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
5474 (pushclass): Change prototype.
5475 (push_nested_class): Likewise.
5476 (grokoptypename): Remove.
5477 (build_opfncall): Remove.
5478 (value_dependent_expression_p): Declare.
5479 (resolve_typename_type): Likewise.
5480 (resolve_typename_type_in_current_instantiation): Likewise.
5481 (enter_scope_of): Remove.
5483 (tsubst_expr): Likewise.
5484 (tsubst_copy): Likewise.
5485 (tsubst_copy_and_build): Likewise.
5486 * decl.c (warn_about_implicit_typename_lookup): Remove.
5487 (finish_case_label): Return error_mark_node for erroneous labels.
5488 (start_decl): Adjust calls to push_nested_class.
5489 (grokfndecl): Call push_scope/pop_scope around call to
5491 (grokdeclarator): Do not call tsubst.
5492 (start_function): Adjust calls to push_nested_class.
5493 * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
5494 (check_classfn): Use push_scope/pop_scope around type comparisions.
5495 (grokoptypename): Remove.
5496 (push_sscope): Adjust call to push_nested_class.
5497 * error.c (dump_type): Show cv-qualification of typename types.
5498 * init.c (build_member_call): Use build_new_op, not
5500 * method.c (build_opfncall): Remove.
5501 * parser.c (cp_parser): Add allow_non_constant_expression_p and
5502 non_constant_expression_p.
5503 (cp_parser_constant_expression): Adjust prototype.
5504 (cp_parser_resolve_typename_type): Remove.
5505 (cp_parser_non_constant_expression): New function.
5506 (cp_parser_non_constant_id_expression): Likewise.
5507 (cp_parser_new): Set allow_non_constant_expression_p and
5508 non_constant_expression_p.
5509 (cp_parser_primary_expression): Reject `this' and `va_arg' in
5510 constant-expressions. Note that dependent names aren't really
5512 (cp_parser_postfix_expression): Reject conversions to non-integral
5513 types in constant-expressions. Neither are increments or
5515 (cp_parser_unary_expression): Reject increments and decrements in
5516 constant-expressions.
5517 (cp_parser_direct_new_declarator): Adjust call to
5518 cp_parser_constant_expression.
5519 (cp_parser_cast_expression): Reject conversions to non-integral
5520 types in constant-expressions.
5521 (cp_parser_assignment_expression): Rejects assignments in
5522 constant-expressions.
5523 (cp_parser_expression): Reject commas in constant-expressions.
5524 (cp_parser_labeled_statement): Adjust call to
5525 cp_parser_constant_expression.
5526 (cp_parser_direct_declarator): Simplify array bounds, even in
5527 templates, when they are non-dependent. Use
5528 resolve_typename_type, not cp_parser_resolve_typename_type.
5529 (cp_parser_class_head): Use resolve_typename_type, not
5530 cp_parser_resolve_typename_type.
5531 (cp_parser_member_declaration): Adjust call to
5532 cp_parser_constant_expression.
5533 (cp_parser_constant_initializer): Likewise.
5534 (cp_parser_constructor_declarator): Use resolve_typename_type, not
5535 cp_parser_resolve_typename_type.
5536 (cp_parser_late_parsing_default_args): Adjust call to
5538 * pt.c (tsubst): Give it internal linkage.
5539 (tsubst_expr): Likewise.
5540 (tsubst_copy): Likewise.
5541 (tsubst_copy_and_build): Likewise.
5542 (push_access_scope_real): Likewise.
5543 (tsubst_friend_class): Likewise.
5544 (instantiate_class_template): Adjust call to pushclass.
5545 (value_dependent_expression_p): Give it external linkage.
5547 (resolve_typename_type): New function.
5548 * semantics.c (finish_call_expr): Use build_new_op, not
5550 (begin_constructor_declarator): Remove.
5551 (begin_class_definition): Adjust call to pushclass.
5552 (enter_scope_of): Remove.
5553 * typeck.c (comptypes): Resolve typename types as appropriate.
5554 (build_x_indirect_ref): Use build_new_op, not build_opfncall.
5555 (build_x_compound_expr): Likewise.
5556 (build_modify_expr): Likewise.
5557 (build_x_modify_expr): Likewise.
5558 * typeck2.c (build_x_arrow): Likewise.
5560 2003-01-29 Fariborz Jahanian <fjahanian@apple.com>
5562 * pt.c (last_pending_template) Declare GTY().
5564 2003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5567 * parser.c (cp_parser_elaborated_type_specifier): Convert
5568 TEMPLATE_DECL to TYPE_DECL only when processing template friends.
5569 (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
5571 2003-01-28 Nathan Sidwell <nathan@codesourcery.com>
5574 * pt.c (unify): Don't unify '*T' with 'U C::*'.
5577 * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
5578 inside a declarator.
5580 2003-01-27 Nathan Sidwell <nathan@codesourcery.com>
5582 * class.c (update_vtable_entry_for_fn): Add index parameter.
5583 Generate vcall thunk for covariant overriding from a virtual
5585 (dfs_modify_vtables): Adjust.
5587 2003-01-25 Nathan Sidwell <nathan@codesourcery.com>
5590 * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
5592 (cp_parser_base_specifier): Look for and consume a
5593 TEMPLATE keyword. Replace switch with array index.
5596 * semantics.c (finish_non_static_data_member): Remember the
5597 field's type even in a template.
5600 * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
5604 * parser.c (cp_parser_cast_expression): Be more tentative.
5606 2003-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5608 * cp-tree.h (flagged_type_tree_s): Remove.
5609 (check_for_new_type): Likewise.
5610 * typeck2.c (check_for_new_type): Likewise.
5612 2003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
5614 * dump.c: ANSIfy function declarations and definitions.
5616 * cp-tree.h, decl.h: Get rid of PARAMS. Again.
5618 2003-01-22 Mark Mitchell <mark@codesourcery.com>
5621 * init.c (build_new): Set the type of the new-expression, even
5622 when processing_templte_decl.
5625 * parser.c (cp_parser_primary_expression): Improve error message
5626 for templates used in an expression context.
5629 * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
5630 parse when encountering "typedef".
5632 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
5634 * class.c, parser.c: ANSIfy function definitions and declarations.
5636 2003-01-22 Mark Mitchell <mark@codesourcery.com>
5639 * error.c (dump_decl): For an OVERLOAD, just print the name of the
5640 function; it doesn't make sense to try to print its type.
5641 * semantics.c (finish_typeof): Issue errors about invalid uses.
5644 * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
5646 (cp_parser_expression_statement): Use it.
5647 (cp_parser_explicit_instantiation): Likewise.
5648 * pt.c (do_decl_instantiation): Improve error handling logic.
5650 2003-01-22 Mark Mitchell <mark@codesourcery.com>
5653 * parser.c (cp_parser_using_declaration): Issue error messages
5654 about name resolution failures here.
5657 * class.c (currently_open_derived_class): Use dependent_type_p.
5658 * cp-tree.h (dependent_type_p): New function.
5659 (dependent_template_arg_p): Likewise.
5660 (dependent_template_p): Likewise.
5661 (type_dependent_expression_p): Likewise.
5662 * parser.c (cp_parser_dependent_type_p): Remove.
5663 (cp_parser_value_dependent_type_p): Likewise.
5664 (cp_parser_type_dependent_expression_p): Likewise.
5665 (cp_parser_dependent_template_arg_p): Likewise.
5666 (cp_parser_dependent_template_id_p): Likewise.
5667 (cp_parser_dependent_template_p): Likewise.
5668 (cp_parser_diagnose_invalid_type_name): Replace
5669 cp_parser_dependent_type_p with dependent_type_p, etc.
5670 (cp_parser_primary_expresion): Likewise.
5671 (cp_parser_nested_name_specifier_opt): Likewise.
5672 (cp_parser_postfix_expression): Likewise.
5673 (cp_parser_unary_expression): Likewise.
5674 (cp_parser_template_name): Likewise.
5675 (cp_parser_class_name): Likewise.
5676 (cp_parser_lookup_name): Likewise.
5677 * pt.c (dependent_type_p): New function.
5678 (value_dependent_expression_p): Likewise.
5679 (type_dependent_expression_p): Likewise.
5680 (dependent_template_arg_p): Likewise.
5681 (dependent_template_id_p): Likewise.
5682 (dependent_template_p): Likewise.
5686 * parser.c (cp_parser_simple_declaration): Return quickly when
5687 encountering errors.
5689 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5691 Make-lang.in (cp/decl.o-warn): Add -Wno-error.
5693 2003-01-17 Jason Merrill <jason@redhat.com>
5695 PR c++/9167, c++/9358
5696 * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
5698 2003-01-17 Jason Merrill <jason@redhat.com>
5701 * call.c (build_conditional_expr): Always do lvalue-rvalue
5704 2003-01-17 Mark Mitchell <mark@codesourcery.com>
5707 * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
5708 * cp-tree.h (BASELINK_BINFO): Adjust.
5709 (BASELINK_FUNCTIONS): Likewise.
5710 (BASELINK_ACCESS_BINFO): Likewise.
5711 (tree_baselink): New structure.
5712 (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
5713 (lang_tree_node): Add baselink.
5714 * decl.c (cp_tree_node_structure): Add BASELINK case.
5715 * search.c (build_baselink): Adjust.
5716 * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P
5717 test from TREE_LIST case.
5720 * parser.c (cp_parser_constructor_declarator_p): Do not assume
5721 that a constructor cannot be declared outside of its own class.
5723 * parser.c (cp_parser_resolve_typename_type): If the scope cannot
5724 be resolved, neither can the qualified name.
5726 * rtti.c (get_pseudo_ti_desc): Fix thinko.
5728 2003-01-16 Jason Merrill <jason@redhat.com>
5731 * init.c (build_vec_init): Re-add maxindex parm.
5732 (perform_member_init, build_aggr_init): Pass it.
5733 (build_new_1): Pass it. Use an incomplete array type for full_type.
5734 * typeck.c (build_modify_expr): Pass it.
5735 * cp-tree.h: Adjust.
5737 2003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
5739 * cp-tree.h (tsubst_copy_and_build): New declaration.
5740 * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
5741 (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment.
5742 (tsubst_copy_and_build): New function.
5744 2003-01-16 Mark Mitchell <mark@codesourcery.com>
5746 * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
5747 (PARTIAL_INSTANTIATION_P): Remove.
5748 (IMPLICIT_TYPENAME_P): Likewise.
5749 (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
5750 (build_typename_type): Remove declaration.
5751 (parmlist_is_exprlist): Likewise.
5752 * decl.c (build_typename_type): Make it static, remove third
5754 (push_class_binding): Don't do implicit typename stuff.
5755 (make_typename_type): Likewise.
5756 (lookup_name_real): Likewise.
5757 (grokdeclarator): Don't try to convert declarations into
5758 initializations. Don't do implicit typename stuff.
5759 (parmlist_is_exprlist): Remove.
5760 (xref_basetypes): Simplify.
5761 * decl2.c (grokfield): Don't try to convert declarations into
5763 (build_anon_union_vars): Do this while processing templates, too.
5764 (finish_anon_union): Likewise.
5765 * error.c (dump_type): Remove implicit typename handling.
5766 * parser.c (cp_parser_diagnose_invalid_type_name): New method.
5767 (cp_parser_primary_expression): Correct handling of names not
5768 found by unqualified name lookup in templates.
5769 (cp_parser_nested_name_specifier_opt): Avoid checking dependency
5770 of types when possible.
5771 (cp_parser_simple_declaration): Complain intelligently about some
5772 invalid declarations.
5773 (cp_parser_member_declaration): Likewise.
5774 (cp_parser_constructor_declarator_p): Don't check when we're in a
5776 * pt.c (instantiate_class_template): Remove
5777 PARTIAL_INSTANTIATION_P gunk.
5778 * search.c (lookup_field_r): Don't build implicit typenames.
5779 (marked_pushdecls_p): Don't enter dependent base types.
5780 (unmarked_pushdecls_p): Likewise.
5781 * semantics.c (begin_class_definition): Remove implicit typename
5784 2003-01-16 Nathan Sidwell <nathan@codesourcery.com>
5787 * parser.c (cp_parser_direct_declarator): If accepting either
5788 abstract or named, the name must be an unqualified-id.
5790 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5792 * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
5794 2003-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5796 * decl2.c (check_classfn): Fix uninitialized warning.
5797 (build_anon_union_vars): Likewise.
5798 * pt.c (tsubst_copy): Likewise.
5800 2003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
5802 Further conform g++'s __vmi_class_type_info to the C++ ABI
5804 * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
5806 (class_hint_flags): Likewise.
5808 2003-01-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5810 * config-lang.in: Add semantics.c to gtfiles.
5811 * cp-tree.h (flagged_type_tree_s): Remove lookups field.
5812 (saved_scope): Likewise.
5813 (type_lookups): Remove.
5814 (deferred_access): New structure.
5815 (type_access_control): Remove.
5816 (save_type_access_control): Likewise.
5817 (reset_type_access_control): Likewise.
5818 (decl_type_access_control): Likewise.
5819 (push_deferring_access_checks): Declare.
5820 (resume_deferring_access_checks): Likewise.
5821 (stop_deferring_access_checks): Likewise.
5822 (pop_deferring_access_checks): Likewise.
5823 (get_deferred_access_checks): Likewise.
5824 (pop_to_parent_deferring_access_checks): Likewise.
5825 (perform_deferred_access_checks): Likewise.
5826 (perform_or_defer_access_check): Likewise.
5827 * decl.c (make_typename_type): Use perform_or_defer_access_check.
5828 (make_unbound_class_template): Likewise.
5829 (grokdeclarator): Don't call decl_type_access_control.
5830 * parser.c (cp_parser_context): Remove deferred_access_checks
5831 and deferring_access_checks_p fields.
5832 (cp_parser_context_new): Adjust.
5833 (cp_parser): Remove access_checks_lists.
5834 (cp_parser_defer_access_check): Remove.
5835 (cp_parser_start_deferring_access_checks): Remove.
5836 (cp_parser_stop_deferring_access_checks): Remove.
5837 (cp_parser_perform_deferred_access_checks): Remove.
5838 (cp_parser_nested_name_specifier_opt): Use new deferred access
5840 (cp_parser_simple_declaration): Likewise.
5841 (cp_parser_template_id): Likewise.
5842 (cp_parser_function_definition): Likewise.
5843 (cp_parser_class_specifier): Likewise.
5844 (cp_parser_lookup_name): Likewise.
5845 (cp_parser_single_declaration): Likewise.
5846 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
5847 (cp_parser_parse_tentatively): Likewise.
5848 (cp_parser_parse_definitely): Likewise.
5849 (yyparse): Likewise.
5850 (cp_parser_init_declarator): Remove access_checks parameter.
5851 Use new deferred access functions.
5852 (cp_parser_function_definition_from_specifiers_and_declarator):
5854 (cp_parser_class_head): Remove deferring_access_checks_p and
5855 saved_access_checks parameters. Use new deferred access functions.
5856 (cp_parser_member_specification_opt): Don't call
5857 reset_type_access_control.
5858 * search.c (type_access_control): Remove.
5859 * semantics.c: Include "gt-cp-semantics.h".
5860 (deferred_type_access_control): Remove.
5861 (deferred_access_stack): New variable.
5862 (deferred_access_free_list): Likewise.
5863 (push_deferring_access_checks): New function.
5864 (resume_deferring_access_checks): Likewise.
5865 (stop_deferring_access_checks): Likewise.
5866 (pop_deferring_access_checks): Likewise.
5867 (get_deferred_access_checks): Likewise.
5868 (pop_to_parent_deferring_access_checks): Likewise.
5869 (perform_deferred_access_checks): New function, adapted from
5870 cp_parser_perform_deferred_access_checks.
5871 (perform_or_defer_access_check): New function, adapted from
5872 cp_parser_defer_access_check.
5873 (current_type_lookups): Remove.
5874 (deferred_type_access_control): Likewise.
5875 (decl_type_access_control): Likewise.
5876 (save_type_access_control): Likewise.
5877 (reset_type_access_control): Likewise.
5878 (begin_function_definition): Adjust.
5879 (begin_class_definiton): Likewise.
5881 2003-01-13 Jason Merrill <jason@redhat.com>
5884 * class.c (build_base_path): Take the address before calling save_expr.
5886 * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
5887 all the ambiguous conversions are bad.
5889 * class.c (maybe_warn_about_overly_private_class): Don't stop
5890 searching when we find a nonprivate method.
5892 * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
5894 2003-01-12 Mark Mitchell <mark@codesourcery.com>
5896 * cp-tree.h (get_arglist_len_in_bytes): Remove.
5899 * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
5900 typeame types more robustly.
5902 2003-01-11 Phil Edwards <pme@gcc.gnu.org>
5904 * parser.c: Fix comment typos.
5906 2003-01-10 Mark Mitchell <mark@codesourcery.com>
5909 * parser.c (cp_parser_scope_through_which_access_occurs): Handle
5910 an object_type which is not a class type.
5912 2003-01-10 Geoffrey Keating <geoffk@apple.com>
5914 * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
5915 (cp_parser_late_parsing_default_args): Likewise.
5917 2003-01-10 Nathanael Nerode <neroden@gcc.gnu.org>
5919 * cfns.gperf: ANSIfy function declarations.
5920 * cfns.h: Regenerate.
5921 * cp-tree.h: ANSIfy function declarations.
5923 2003-01-10 Mark Mitchell <mark@codesourcery.com>
5925 * cp-tree.h (reparse_absdcl_as_expr): Remove.
5926 (reparse_absdcl_as_casts): Likewise.
5927 (reparse_decl_as_expr): Likewise.
5928 (finish_decl_parsing): Likewise.
5929 * decl2.c (reparse_absdcl_as_expr): Remove.
5930 (reparse_absdcl_as_casts): Likewise.
5931 (repase_decl_as_expr): Likewise.
5932 (finish_decl_parsing): Likewise.
5937 * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
5939 (cp_parser_nested_name_specifier_opt): Correct the
5940 check_dependency_p false.
5941 (cp_parser_postfix_expression): Fix formatting.
5942 (cp_parser_decl_specifier_seq): Avoid looking for constructor
5943 declarators when possible.
5944 (cp_parser_template_id): Avoid performing name-lookup when
5946 (cp_parser_class_head): Do not count specializations when counting
5947 levels of templates.
5948 (cp_parser_constructor_declarator_p): Return immediately if
5949 there's no chance that the tokens form a constructor declarator.
5950 * rtti.c (throw_bad_typeid): Add comment. Do not return an
5951 expression with reference type.
5952 (get_tinfo_decl_dynamic): Do not return an expression with
5954 (build_typeid): Add comment. Do not return an expression with
5956 * typeck.c (build_class_member_access_expr): Improve handling of
5957 conditionals and comma-expressions as objects.
5959 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
5961 * cfns.gperf: ANSIfy function declarations.
5962 * cfns.h: Regenerate.
5963 * cp-tree.h: ANSIfy function declarations.
5964 * parser.c: ANSIfy function declarations & definitions.
5966 * decl.c (bad_specifiers): Fix parameter order error I introduced.
5968 2003-01-09 Geoffrey Keating <geoffk@apple.com>
5970 Merge from pch-branch:
5972 2003-01-09 Geoffrey Keating <geoffk@apple.com>
5974 Merge to tag pch-merge-20030102:
5976 * semantics.c (finish_translation_unit): Don't call finish_file.
5977 * parser.c: Don't include ggc.h.
5978 (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
5979 read first token here. Don't allow PCH files after the first
5981 (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
5982 (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
5983 (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
5984 (cp_parser_late_parsing_for_member): Don't duplicate call to
5985 cp_lexer_set_source_position_from_token.
5986 (cp_parser_late_parsing_default_args): Likewise.
5987 (yyparse): Call finish_file after clearing the_parser.
5989 2002-12-11 Geoffrey Keating <geoffk@apple.com>
5991 * Make-lang.in: Remove $(GGC_H) from all dependencies.
5992 (CXX_TREE_H): Add $(GGC_H).
5993 * class.c: Don't include ggc.h.
5994 (field_decl_cmp): Make parameters be 'const void *' to match qsort.
5995 (method_name_cmp): Likewise.
5996 (resort_data): New variable.
5997 (resort_field_decl_cmp): New.
5998 (resort_method_name_cmp): New.
5999 (resort_sorted_fields): New.
6000 (resort_type_method_vec): New.
6001 (finish_struct_methods): Delete cast.
6002 (finish_struct_1): Delete cast.
6003 * cp-tree.h: Include ggc.h.
6004 (struct lang_type_class): Add reorder attribute to field `methods'.
6005 (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
6006 (resort_sorted_fields): New prototype.
6007 (resort_type_method_vec): New prototype.
6008 * call.c: Don't include ggc.h.
6010 * decl2.c: Likewise.
6013 * method.c: Likewise.
6014 * optimize.c: Likewise.
6015 * parse.y: Likewise.
6018 * search.c: Likewise.
6019 * semantics.c: Likewise.
6023 * lang-specs.h: Remove comment.
6025 2002-12-03 Geoffrey Keating <geoffk@apple.com>
6027 * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
6028 (operator_name_info): Mark to be saved for PCH, specify size.
6029 (assignment_operator_name_info): Likewise.
6031 2002-11-19 Geoffrey Keating <geoffk@apple.com>
6033 * decl.c (anon_cnt): Mark to be saved for PCH.
6035 2002-10-25 Geoffrey Keating <geoffk@apple.com>
6037 * lex.c (init_reswords): Delete now-untrue comment.
6038 Allocate ridpointers using GGC.
6040 2002-10-04 Geoffrey Keating <geoffk@apple.com>
6042 * cp-tree.h (union lang_decl_u2): Add tags to all fields.
6044 * g++spec.c (lang_specific_driver): Don't include standard
6045 libraries in `added'.
6047 2002-08-27 Geoffrey Keating <geoffk@redhat.com>
6049 * decl2.c (finish_file): Call c_common_write_pch.
6050 * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
6052 2002-08-17 Geoffrey Keating <geoffk@redhat.com>
6054 * g++spec.c (lang_specific_driver): Treat .h files as C++ header
6055 files when using g++.
6056 * lang-specs.h: Handle compiling C++ header files.
6058 2003-01-09 Jakub Jelinek <jakub@redhat.com>
6060 * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
6062 2003-01-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6064 * pt.c (push_access_scope_real): Call push_to_top_level for
6065 function in namespace scope.
6066 (pop_access_scope): Call pop_from_top_level for function in
6069 2003-01-09 Jakub Jelinek <jakub@redhat.com>
6071 * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
6073 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
6075 * Make-lang.in (c++.install-common, c++.install-man,
6076 c++.uninstall): Prepend $(DESTDIR) to destination paths in
6077 all (un)installation commands.
6078 (c++.install-common): Rewrite $(LN) commands to support
6079 DESTDIR with "ln" as well as with "ln -s".
6081 2003-01-08 Jason Merrill <jason@redhat.com>
6083 * parser.c (cp_parser_primary_expression): See through explicitly
6084 scoped ALIAS_DECLs, too.
6086 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
6088 * decl.c: Remove some #if 0 code.
6090 * decl.c: ANSIfy function declarations.
6092 2003-01-07 Mark Mitchell <mark@codesourcery.com>
6094 * parser.c (cp_parser_asm_definition): Correct handling of omitted
6097 2003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6100 * decl.c (make_typename_type): Check access only when tf_error.
6101 (make_unbound_class_template): Likewise.
6102 * pt.c (saved_access_scope): New variable.
6103 (push_access_scope_real): New function.
6104 (push_access_scope): Likewise.
6105 (pop_access_scope): Likewise.
6106 (tsubst_default_argument): Use them.
6107 (instantiate_template): Likewise.
6108 (regenerate_decl_from_template): Likewise.
6109 (instantiate_decl): Likewise.
6110 (get_mostly_instantiated_function_type): Likewise.
6112 2003-01-07 Nathanael Nerode <neroden@gcc.gnu.org>
6114 * tree.c: Delete bogus #if 0 code.
6116 2003-01-07 Andreas Schwab <schwab@suse.de>
6118 * class.c (layout_class_type): Don't use
6119 PCC_BITFIELD_TYPE_MATTERS if not defined.
6121 2003-01-06 Mark Mitchell <mark@codesourcery.com>
6124 * decl2.c (build_cleanup): Mark the object as used.
6126 * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
6127 (hash_local_specialization): New function.
6128 (register_local_specialization): Revert 2003-01-05 change.
6129 (instantiate_decl): Use hash_local_specialization when creating
6130 the local_specializations table.
6132 * decl2.c (mark_used): Do not synthesize thunks.
6134 * class.c (layout_class_type): Correct handling of unnamed
6135 bitfields wider than their types.
6138 * parser.c (cp_parser): Remove default_arg_types. Update
6139 documentation for unparsed_functions_queues.
6140 (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
6142 (cp_parser_new): Don't set parser->default_arg_types.
6143 (cp_parser_function_definition): Adjust usage of
6144 unparsed_funtions_queues.
6145 (cp_parser_class_specifier): Don't mess with
6146 parser->default_arg_types. Handle default argument processing in
6147 a separate phase from function body processing.
6148 (cp_parser_template_declaration_after_export): Adjust usage of
6149 unparsed_functions_queues.
6150 (cp_parser_late_parsing_for_member): Do not handle default
6153 2003-01-06 Nathan Sidwell <nathan@codesourcery.com>
6156 * parser.c (cp_parser_declarator_kind): New enum.
6157 (cp_parser_declarator): Adjust.
6158 (cp_parser_direct_declarator): Adjust. Allow for either named or
6159 abstract declarator. Prefer abstract, if possible. Allow
6160 parenthesized function name.
6161 (cp_parser_condition): Adjust cp_parser_declarator call.
6162 (cp_parser_explicit_instantiation): Likewise.
6163 (cp_parser_init_declarator): Likewise.
6164 (cp_parser_type_id): Likewise.
6165 (cp_parser_function_definition): Likewise.
6166 (cp_parser_member_declaration): Likewise.
6167 (cp_parser_parameter_declaration): Use cp_parser_declarator to do
6168 the tentative parsing.
6169 (cp_parser_exception_declaration): Likewise.
6171 2003-01-05 Mark Mitchell <mark@codesourcery.com>
6173 * parser.c (cp_parser_template_parameter): Adjust call to
6174 cp_parser_parameter_declaration.
6175 (cp_parser_parameter_declaration_list): Likewise.
6176 (cp_parser_parameter_declaration): Replace
6177 greater_than_is_operator_p with template_parm_p parameter. Do not
6178 cache tokens for template default arguments.
6180 * pt.c (retrieve_local_specialization): Use htab_find, not
6181 htab_find_with_hash.
6182 (register_local_specialization): Use htab_find_slot, not
6183 htab_find_slot_with_hash.
6184 (instantiate_decl): Pass a hash function to htab_create.
6186 2003-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6188 * parser.c (cp_parser_binary_expression,
6189 cp_parser_multiplicative_expression,
6190 cp_parser_additive_expression, cp_parser_shift_expression,
6191 cp_parser_relational_expression, cp_parser_equality_expression,
6192 cp_parser_and_expression, cp_parser_exclusive_or_expression,
6193 cp_parser_inclusive_or_expression,
6194 cp_parser_logical_and_expression, cp_parser_logical_or_expression,
6195 cp_parser_binary_expression): Const-ify.
6197 2003-01-04 Mark Mitchell <mark@codesourcery.com>
6199 * method.c (use_thunk): Disable access control while building the
6202 2003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
6204 * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
6207 2003-01-03 Matt Austern <austern@apple.com>
6209 * cp-tree.h (struct lang_type_class): add field for key method
6210 (cp_global_trees): rename dynamic_classes to keyed_classes
6211 (key_method): add definition
6212 * class.c (finish_struct_1): compute class's key method, and add
6213 the class to keyed_classes list if there is no key method.
6214 * decl.c (finish_function): add class to keyed_classes list if we
6215 see a definition of the class's key method.
6216 * pt.c (instantiate_class_template): add template specialization
6217 of a dynamic class to keyed_classes list.
6218 * decl2.c (key_method): remove
6219 (finish_file): iterate only through keyed_classes list when
6220 deciding whether to emit vtables, remove class from its list after
6223 2003-01-02 Jason Merrill <jason@redhat.com>
6225 * call.c (build_conditional_expr): Stabilize lvalues properly.
6226 * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
6227 * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
6228 Don't allow CALL_EXPR or VA_ARG_EXPR, either.
6230 * call.c (convert_like_real): Call decl_constant_value for an
6231 IDENTITY_CONV even if there are no more conversions.
6233 * cvt.c (build_up_reference): Don't push unnamed temps.
6235 * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
6237 * dump.c (cp_dump_tree): Don't try to dump class-specific fields
6238 for a backend struct.
6240 * except.c (wrap_cleanups_r, build_throw): Make
6241 MUST_NOT_THROW_EXPRs void.
6242 * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
6244 * init.c (build_vec_delete_1): Pre-evaluate the base address.
6246 * init.c (get_temp_regvar): Simplify logic.
6248 * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
6249 our replacement is a decl.
6251 * decl.c (cp_make_fname_decl): Push the decls inside the
6254 2003-01-03 Nathan Sidwell <nathan@codesourcery.com>
6257 * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
6260 2003-01-03 Graham Stott <graham.stott@btinternet.com>
6262 * parser.c (struct cp_parser): Add access_checks_lists field
6263 (cp_parser_simple_declaration): Use.
6264 (cp_parser_init_declarator): Likewise.
6266 2003-01-02 Mark Mitchell <mark@codesourcery.com>
6268 * parser.c (cp_parser_declaration): Accept the __extension__
6269 keyword before the declaration.
6272 * parser.c (cp_parser_parameter_declaration): Allow attributes to
6273 appear after the declarator.
6275 * call.c (build_new_method_call): Fix typo in message format
6278 2003-01-02 Mark Mitchell <mark@codesourcery.com>
6280 * parser.c (cp_lexer_next_token_is): Declare it inline.
6281 (cp_lexer_set_source_position_from_token): Likewise.
6282 (cp_lexer_debugging_p): Likewise.
6283 (cp_parser_parsing_tentatively): Likewise.
6284 (cp_parser_nested_name_specifier_opt): Reduce the number of calls
6285 to the cp_lexer_peek_token.
6287 * parser.c (cp_parser_sizeof_operand): Do not evaluate the
6290 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
6292 * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
6293 cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
6294 cp/repo.c: Fix copyright years.
6296 2003-01-01 Neil Booth <neil@daikokuya.co.uk>
6298 * lex.c: Remove superfluous include of cpplib.h.
6299 (CONSTRAINT): Define without conditions.
6300 (init_cp_pragma): Use c_register_pragma.
6302 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
6304 * .cvsignore: Remove.
6306 2002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl>
6308 * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
6309 except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
6310 lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
6311 pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
6312 typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
6314 * lex.h: parse.y is dead, so don't mention it. Also replace the
6315 copyright header with the default GNU copyright header.
6317 2002-12-31 Mark Mitchell <mark@codesourcery.com>
6319 * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
6320 (lookup_name_namespace_only): Likewise.
6321 (begin_only_namespace_names): Likewise.
6322 (end_only_namespace_names): Likewise.
6323 * decl.c (only_namespace_names): Remove.
6324 (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
6325 (lookup_name_real): Do not check only_namespace_names.
6326 (lookup_name_namespace_only): Remove.
6327 (begin_only_namespace_names): Likewise.
6328 (end_only_namespace_names): Likewise.
6329 * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
6330 nested-name-specifiers more gracefully.
6331 (cp_parser_class_or_namespace_name): Avoid looking up namespace
6332 names when they cannot possibly appear.
6333 (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
6334 (cp_parser_elaborated_type_specifier): Likewise.
6335 (cp_parser_namespace_name): Only look for namespace names.
6336 (cp_parser_lookup_name): Add is_namespace parameter.
6337 (cp_parser_lookup_name_simple): Adjust call to
6338 cp_parser_lookup_name.
6340 * parser.c (cp_parser_dependent_type_p): Fix thinko.
6342 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
6344 * .cvsignore: Update.
6346 2002-12-31 Nathan Sidwell <nathan@codesourcery.com>
6348 * class.c (modify_vtable_entry): Remove unused variable.
6349 (get_vcall_index): Always expect a non-thunk.
6350 (update_vtable_entry_for_fn): Combine covariant adjustments, when
6351 overriding a thunk. Pass get_vcall_index a non-thunk.
6353 * decl2.c (finish_file): Mark undefined inlines as extern.
6355 2002-12-31 Mark Mitchell <mark@codesourcery.com>
6357 * cp-tree.def (RETURN_INIT): Remove.
6358 * cp-tree.h (DECL_IN_MEMORY_P): Remove.
6359 (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
6360 (note_level_for_for): Remove.
6361 (note_level_for_try): Likewise.
6362 (note_level_for_catch): Likewise.
6363 (finish_named_return_value): Likewise.
6364 (do_pushlevel): Change prototype.
6365 (pending_lang_change): Remove.
6366 * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
6368 (note_level_for_for): Remove.
6369 (note_level_for_try): Likewise.
6370 (note_level_for_catch): Likewise.
6371 (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
6372 * parser.c (cp_parser_context_free_list): Make it "deletable".
6373 (cp_parser_template_argument): Remove misleading comment.
6374 * pt.c (tsubst_expr): Remove RETURN_INIT code.
6375 * semantics.c (genrtl_named_return_value): Remove.
6376 (do_pushlevel): Take a scope kind as an argument.
6377 (begin_if_stmt): Adjust.
6378 (begin_while_stmt): Likewise.
6379 (begin_for_stmt): Likewise.
6380 (finish_for_init_stmt): Likewise.
6381 (begin_switch_stmt): Likewise.
6382 (begin_handler): Likewise.
6383 (begin_compound_stmt): Likewise.
6384 (finish_named_return_value): Remove.
6385 (cp_expand_stmt): Remove RETURN_INIT case.
6386 * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
6388 2002-12-31 Mark Mitchell <mark@codesourcery.com>
6391 * parser.c (cp_parser_direct_declarator): Handle erroneous
6392 parenthesized declarators correctly.
6394 2002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
6396 * cp-tree.h (pending_lang_change): Declare.
6398 2002-12-30 Mark Mitchell <mark@codesourcery.com>
6400 * parser.c (cp_parser_context_free_list): New variable.
6401 (cp_parser_context_new): Use it.
6402 (cp_parser_error): Check return code from
6403 cp_parser_simulate_error.
6404 (cp_parser_simulate_error): Return a value.
6405 (cp_parser_id_expression): Optimize common case.
6406 (cp_parser_class_name): Likewise.
6407 (cp_parser_class_specifier): Adjust call to
6408 cp_parser_late_parsing_default_args.
6409 (cp_parser_lookup_name): Optimize common case.
6410 (cp_parser_late_parsing_for_member): Adjust call to
6411 cp_parser_late_parsing_default_args.
6412 (cp_parser_late_parsing_default_args): Add scope parameter.
6413 (cp_parser_require): Avoid creating the error message unless it's
6415 (cp_parser_parse_definitely): Place free'd contexts on the free
6418 * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
6420 2002-12-30 David Edelsohn <edelsohn@gnu.org>
6422 * parser.c (cp_parser_parameter_declaration_clause): Treat system
6423 header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
6425 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
6427 * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
6430 2002-12-30 Mark Mitchell <mark@codesourcery.com>
6434 * Make-lang.in (gt-cp-spew.h): Remove.
6435 * cp-tree.h (do_pending_lang_change): Remove.
6436 (do_identifier): Change prototype.
6437 (finish_id_expr): Remove.
6438 * decl.c (lookup_name_real): Remove yylex variable.
6439 * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
6440 * lex.c (init_cpp_parse): Remove.
6441 (reduce_cmp): Likewise.
6442 (token_cmp): Likewise.
6444 (lastiddecl): Likewise.
6445 (token_count): Likewise.
6446 (reduce_count): Likewise.
6448 (print_parse_statistics): Likewise.
6449 (do_pending_lang_change): Likewise.
6450 (do_identifier): Remove parsing parameter.
6451 * lex.h (lastiddecl): Remove.
6452 (looking_for_typename): Remove.
6453 (looking_for_template): Likewise.
6454 (pending_lang_change): Likewise.
6456 * semantics.c (finish_id_expr): Remove.
6458 * decl.c (grokdeclarator): Diagnost "extern thread" and "static
6461 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
6463 * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
6464 end, not the C front end.
6466 2002-12-30 Nathan Sidwell <nathan@codesourcery.com>
6468 * cp-tree.h (THUNK_TARGET): New macro.
6469 (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
6470 (finish_thunk): Remove offset parms.
6471 * class.c (find_final_overrider): Look through thunks.
6472 (get_vcall_index): Use THUNK_TARGET.
6473 (update_vtable_entry_for_fn): Look through thunks. Set covariant
6474 fixed offset here. Adjust finish_thunk call.
6475 (build_vtbl_initializer): Adjust finish_thunk calls.
6476 * mangle.c (mangle_call_offset): Remove superfluous if.
6477 (mangle_thunk): Adjust.
6478 * method.c (make_thunk): Adjust.
6479 (finish_thunk): Adjust.
6480 (thunk_adjust): Remove assert.
6481 (use_thunk): Use THUNK_TARGET
6482 * dump1.c (cp_dump_tree): Adjust thunk dumping.
6485 * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
6486 * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
6488 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
6490 Remove traditional C constructs 4/n.
6491 * decl2.c (grok_method_quals, warn_if_unknown_interface,
6492 grok_x_components, cp_build_parm_decl, build_artificial_parm,
6493 maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
6494 delete_sanity, check_member_template, check_java_method,
6495 check_classfn, finish_static_data_member_decl, grokfield,
6496 grokbitfield, grokoptypename, grok_function_init,
6497 cplus_decl_attributes, constructor_name, defer_fn,
6498 build_anon_union_vars, finish_anon_union, coerce_new_type,
6499 coerce_delete_type, comdat_linkage, maybe_make_one_only,
6500 key_method, import_export_vtable, import_export_class,
6501 output_vtable_inherit, import_export_decl, import_export_tinfo,
6502 build_cleanup, get_guard, get_guard_bits, get_guard_cond,
6503 set_guard, start_objects, finish_objects,
6504 start_static_storage_duration_function,
6505 finish_static_storage_duration_function, get_priority_info,
6506 start_static_initialization_or_destruction,
6507 finish_static_initialization_or_destruction,
6508 do_static_initialization, do_static_destruction,
6509 prune_vars_needing_no_initialization, write_out_vars,
6510 reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
6511 add_using_namespace, merge_functions, ambiguous_decl,
6512 lookup_using_namespace, lookup_using_namespace,
6513 qualified_lookup_using_namespace, set_decl_namespace,
6514 decl_namespace, current_decl_namespace, push_decl_namespace,
6515 pop_decl_namespace, push_scope, pop_scope, add_function,
6516 arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
6517 lookup_arg_dependent, do_namespace_alias,
6518 validate_nonmember_using_decl, do_nonmember_using_decl,
6519 do_toplevel_using_decl, do_local_using_decl,
6520 do_class_using_decl, do_using_directive, check_default_args,
6521 mark_used, handle_class_head): Use C90 prototypings. Use booleans.
6522 * parser.c (cp_parser_class_head): Use booleanss.
6523 * decl.c (walk_globals, walk_vtables): Likewise.
6524 * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
6525 walk_globals): Change return type from 'int' to 'bool'.
6526 * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
6527 throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
6528 build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
6529 get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
6530 qualifier_flags, tinfo_base_init, generic_initializer,
6531 ptr_initializer, dfs_class_hint_mark, ptm_initializer,
6532 dfs_class_hint_unmark, class_hint_flags, class_initializer,
6533 typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
6534 get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
6535 unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
6536 * repo.c (repo_compile_flags, repo_template_declared,
6537 repo_template_defined, repo_class_defined, repo_get_id,
6538 repo_template_used, repo_vtable_used, repo_inline_used,
6539 repo_tinfo_used, repo_template_instantiated, extract_string,
6540 open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
6541 finish_repo): Likewise.
6542 * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
6543 cxx_print_xnode): Likewise..
6544 * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
6545 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
6546 * cxxfilt.c (demangle_it, print_demangler_list, usage,
6547 standard_symbol_characters, hp_symbol_characters, main, fatal):
6549 (strip_underscore): Change type from 'int' to 'bool'.
6550 (main): Use boolean constants.
6552 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
6554 Remove traditional C constructs 3/n.
6555 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
6556 build_up_reference, warn_ref_binding, convert_to_reference,
6557 convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
6558 convert_to_void, convert, convert_force, build_type_conversion,
6559 build_expr_type_conversion, type_promotes_to,
6560 perform_qualification_conversions): Use C90 prototyping style.
6561 * decl2.c (grok_array_decl): Use boolean constant.
6562 (delete_sanity): Likewise.
6563 * typeck.c (build_unary_op): Likewise.
6564 * semantics.c (finish_switch_cond): Likewise.
6565 * parser.c (cp_parser_direct_new_declarator): Likewise.
6566 * init.c (build_new): Likewise.
6568 2002-12-27 Mark Mitchell <mark@codesourcery.com>
6570 * Make-lang.in (po-generated): Remove parse.c.
6571 (CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
6572 ($(srcdir)/cp/parse.h): Remove target.
6573 ($(srcdir)/cp/parse.c): Likewise.
6574 (gt-cp-parse.h): Likewise.
6575 (gt-cp-parser.h): New target.
6576 (c++.distclean): Do not remove parse.output.
6577 (c++.maintainer-clean): Do not remove parse.c or parse.h.
6578 (cp/spew.o): Remove target.
6579 (cp/lex.o): Adjust dependencies.
6580 (cp/pt.o): Likewise.
6581 (cp/parse.o): Likewise.
6582 (cp/TAGS): Do not mention parse.c.
6583 (cp/parser.o): New target.
6584 * NEWS: Mention the new parser.
6585 * call.c (build_scoped_method_call): Simplify.
6586 (build_method_call): Likewise.
6587 (build_new_function_call): Adjust calls to add_function_candidate
6588 and add_template_candidate.
6589 (build_new_op): Improve handling of erroroneous operands.
6590 (convert_default_arg): Remove circular argument processing.
6591 (name_as_c_string): New function.
6592 (build_new_method_call): Use it.
6593 (perform_implicit_conversion): Use error_operand_p.
6594 * class.c (finish_struct_anon): Use constructor_name_p.
6595 (check_field_decls): Likewise.
6596 (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
6597 (resolve_address_of_overloaded_function): Likewise.
6598 (instantiate_type): Tweak pointer-to-member handling.
6599 (get_primary_binfo): Remove incorrect assertion.
6600 * config-lang.in (gtfiles): Add parser.c, remove parse.c.
6601 * cp-tree.h (DEFARG_TOKENS): New macro.
6602 (default_arg): New structure.
6603 (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
6604 (lang_tree_node): Add default_arg.
6605 (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
6606 (type_info_ref_type): New macro.
6607 (saved_scope): Make processing_explicit_instantiation a boolean.
6608 (check_access): New field.
6609 (unparsed_text): Remove.
6610 (language_function): Remove unparsed_inlines.
6611 (error_operand_p): New macro.
6612 (lang_decl): Adjust pending_inline_info.
6613 (DEFARG_POINTER): Remove.
6614 (tag_types): Add typenames.
6615 (lookup_ualified_name): Declare.
6616 (lookup_name_real): Likewise.
6617 (shadow_tag): Adjust prototype.
6618 (get_scope_of_declarator): Declare it.
6619 (process_next_inline): Remove it.
6620 (check_for_missing_semicolon): Likewise.
6621 (maybe_get_template_decl_from_type_decl): Declare it.
6622 (finish_label_stmt): Adjust prototype.
6623 (finish_non_static_data_meber): Declare it.
6624 (finish_pseudo_destructor_call_expr): Rename to ...
6625 (finish_pseudo_destructor_expr): ... this.
6626 (finish_compound_literal): Declare it.
6627 (begin_inline_definitions): Remove it.
6628 (init_spew): Remove.
6629 (peekyylex): Likewise.
6630 (arbitrate_lookup): Likewise.
6631 (frob_opname): Likewise.
6632 (maybe_snarf_defarg): Likewise.
6633 (add_defarg_fn): Likewise.
6634 (do_pending_defargs): Likewise.
6635 (done_pending_defargs): Likewise.
6636 (unprocessed_defarg_fn): Likewise.
6637 (replace_defarg): Likewise.
6638 (end_input): Likewise.
6639 (get_overloaded_fn): Likewise.
6640 * cvt.c (convert_to_reference): Improve error handling.
6641 * decl.c (lookup_name_real): Do not declare it static.
6642 (maybe_push_to_top_level): Set check_access.
6643 (identifier_type_value): Adjust call to lookup_name_real.
6644 (lookup_qualified_name): New method.
6645 (lookup_name_real): Remove special-case parsing code.
6646 (lookup_name-nonclass): Adjust call to lookup_name_real.
6647 (lookup_name_namespace_only): Likewise.
6648 (lookup_name): Likewise.
6649 (check_tag_decl): Return the type declared.
6650 (shadow_tag): Likewise.
6651 (register_dtor_fn): Tweak check_access.
6652 (grokfndecl): Use constructor_name_p.
6653 (get_scope_of_declarator): New function.
6654 (grokdeclarator): Obscure tweaks for slightly different declarator
6656 (start_method): Return error_mark_node to indicate failure.
6657 (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
6658 * decl2.c (constructor_name_full): Simplify.
6659 (constructor_name): Use it.
6660 (build_expr_from_tree): Adjust for changes to do new parser.
6661 (push_scope): Improve robustness.
6662 (validate_nonmember_using_decl): Process declarations, not names.
6663 (do_class_using_decl): Likewise.
6664 (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
6666 * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
6667 * expr.c (cxx_expand_expr): Handle BASELINKs.
6668 * init.c (member_init_ok_or_else): Issue more errors.
6669 (build_offset_ref): Tweak handling of FUNCTION_DECLs.
6670 * lex.c: Do not include parse.h.
6671 (yypring): Do not declare.
6673 (make_reference_declarator): Remove error-generating code.
6674 (rid_to_yy): Remove.
6675 (cxx_init): Do not call init_spew.
6677 (check_for_missing_semicolon): Remove.
6678 * lex.h (got_scope): Remove.
6679 (got_object): Remove.
6680 * method.c (hack_identifier): Use finish_non_static_data_member.
6681 (implicitly_declare_fn): Adjust use of constructor_name.
6682 * parser.c: New file.
6683 * pt.c (parse.h): Do not include it.
6684 (maybe_get_template_decl_from_template): Do not declare it.
6685 (finish_member_template_decl): Tweak.
6686 (begin_explicit_instantiation): Adjust for
6687 processing_explicit_instantiation being boolean.
6688 (end_explicit_instantiation): Likewise.
6689 (maybe_process_partial_specialization): Tighten specialization
6691 (retrieve_local_specialization): Adjust ue of hash table.
6692 (eq_local_specializations): New function.
6693 (register_local_specialization): Likewise.
6694 (push_template_decl_real): Remove unnecessary test.
6695 (maybe_get_template_decl_from_type_decl): Don't make it static.
6696 (for_each_template_parm_r): Handle TYPEOF_TYPE.
6697 (tsubst_copy): Use retrieive_local_specialization to handle
6698 PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
6699 Handle COMPONENT_REFs with pseudo-destructor-expressions.
6700 Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
6701 (tsubst_expr): Pass decls, not names, to do_local_using_decl.
6702 (unify): Tweak handling of CONST_DECLs.
6703 (regenerate_decl_from_template): Use push_nested_class.
6704 (template_for_substitution): New funciton.
6705 (instantiate_decl): Use it. Register parameters as local
6707 * rtti.c (init_rtti_processing): Set type_info_ref_type.
6708 (build_typeid): Use it.
6709 (get_typeid): Likeise.
6710 * search.c (accessible_p): Use check_access, not
6711 flag_access_control.
6712 (adjust_result_of_qualified_name_lookup): Pay attention to the
6714 * semantics.c (finish_asm_stmt): Adjust error handling.
6715 (finish_label_stmt): Return the statement.
6716 (finish_non_static_data_member): New function.
6717 (finish_class_expr): Handle BASELINKs.
6718 (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
6719 (finish_object_call_expr): Simplify handling during templates.
6720 (finish_pseudo_destructor_call_expr): Rename to ...
6721 (finish_pseudo_dtor_expr): ... this.
6722 (finish_compound_literal): New function.
6723 (begin_inline_definitions): Remove.
6724 (finish_sizeof): Remove special template handling.
6725 * spew.c: Do not include parse.h.
6726 * tree.c (get_overloaded_fn): Remove.
6727 * typeck.c (build_class_member_access_expr): Handle
6728 PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
6729 (lookup_destructor): New function.
6730 (finish_class_member_access_expr): Use it.
6731 (convert_arguments): Simplify.
6732 (build_unary_op): Handle BASELINKs.
6734 2002-12-26 Nathan Sidwell <nathan@codesourcery.com>
6737 * decl2.c (mark_used): Defer inline functions.
6738 (finish_file): Merge deferred_fns loops. Check all used
6739 inline functions have a definition.
6740 * method.c (make_thunk): Thunks are not inline.
6742 PR c++/5116, c++/764
6743 * call.c (build_new_op): Make sure template class operands are
6746 2002-12-24 Nathan Sidwell <nathan@codesourcery.com>
6749 * cp-tree.h (resolve_scoped_fn_name): Prototype.
6750 * call.c (resolve_scoped_fn_name): New function. Deal with
6751 more template expansion. Broken out of ...
6752 * parse.y (parse_finish_call_expr): ... here. Call it.
6753 * decl2.c (build_expr_from_tree, CALL_EXPR): Use
6754 resolve_scoped_fn_name and build_call_from_tree.
6757 * decl.c (duplicate_decls): Templates may be disambiguated by
6761 * decl2.c (check_classfn): Use lookup_fnfield_1. List all
6762 conversion operators on failure.
6764 2002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6766 Remove traditional C constructs 2/n.
6767 * call.c (tourney, build_field_call, equal_functions, joust,
6768 compare_ics, build_over_call, build_java_interface_fn_ref,
6769 convert_like_real, op_error, build_object_call, resolve_args,
6770 build_vfield_ref, check_dtor_name, build_scoped_method_call,
6771 build_addr_func, build_call, build_method_call, null_ptr_cst_p,
6772 sufficient_parms_p, build_conv, non_reference, strip_top_quals,
6773 standard_conversion, reference_related_p,
6774 reference_compatible_p, convert_class_to_reference,
6775 direct_reference_binding, reference_binding,
6776 ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
6777 add_template_conv_candidate, any_viable, any_strictly_viable,
6778 build_this, splice_viable, print_z_candidates,
6779 build_user_type_conversion, build_new_function_call,
6780 conditional_conversion, build_conditional_expr, build_new_op,
6781 build_op_delete_call, enforce_access, call_builtin_trap,
6782 convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
6783 convert_default_arg, type_passed_as, convert_for_arg_passing,
6784 in_charge_arg_for_name, is_properly_derived_from,
6785 maybe_handle_implicit_object, maybe_handle_ref_bind,
6786 source_type, add_warning, can_convert, can_convert_arg,
6787 perform_implicit_conversion, can_convert_arg_bad,
6788 initialize_reference, add_conv_candidate,
6789 add_template_candidate_real, add_template_candidate): Ansify.
6791 2002-12-22 Nathan Sidwell <nathan@codesourcery.com>
6794 * cp-tree.h (grokoptypename): Add SCOPE parameter.
6795 * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
6796 if in a template scope.
6797 * parse.y (unoperator): Return the scope.
6798 (operator_name): Adjust grokoptypename call.
6800 2002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6802 * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
6803 * decl.c (make_unbound_class_template): Adjust. Check for tf_error.
6804 * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
6806 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
6808 * ChangeLog: Fix a typo.
6809 * class.c: Fix comment typos.
6810 * cp-tree.h: Likewise.
6812 2002-12-18 Jason Merrill <jason@redhat.com>
6814 Handle anonymous unions at the tree level.
6815 C++ ABI change: Mangle anonymous unions using the name of their
6816 first named field (by depth-first search). Should not cause
6817 binary compatibility problems, though, as the compiler previously
6818 didn't emit anything for affected unions.
6819 * cp-tree.def (ALIAS_DECL): New tree code.
6820 * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
6821 first field, not the largest.
6822 (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
6823 push the decl, and write it out at namespace scope.
6824 * decl.c (lookup_name_real): See through an ALIAS_DECL.
6825 (pushdecl): Add namespace bindings for ALIAS_DECLs.
6826 * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
6827 of a decl which doesn't have one.
6828 * typeck.c (build_class_member_access_expr): Don't recurse if
6829 we already have the type we want.
6831 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6834 * friend.c (make_friend_class): Allow partial specialization
6835 when declaration is not a template friend.
6837 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6840 * pt.c (lookup_template_class): Copy TREE_PRIVATE and
6841 TREE_PROTECTED to created decl nodes.
6843 2002-12-18 Mark Mitchell <mark@codesourcery.com>
6845 * class.c (build_base_field): Do not set DECL_PACKED on the
6848 2002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
6850 * cp-tree.h (struct tree_srcloc): Use location_t.
6851 (SOURCE_LOCUS): New.
6852 (SRCLOC_FILE, SRCLOC_LINE): Adjust.
6854 2002-12-17 Jason Merrill <jason@redhat.com>
6856 * decl.c (finish_function): Also complain about no return in
6858 * semantics.c (finish_return_stmt): Also call check_return_expr in
6860 * typeck.c (check_return_expr): In a template, just remember that we
6863 2002-12-16 Jason Merrill <jason@redhat.com>
6865 * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
6868 * semantics.c (do_pushlevel): Call pushlevel after adding the
6870 (do_poplevel): Call poplevel before adding the SCOPE_STMT.
6871 * parse.y (function_body): Go back to using compstmt.
6872 * decl.c (pushdecl): Skip another level to get to the parms level.
6874 * call.c (build_new_method_call): Use is_dummy_object to determine
6875 whether or not to evaluate the object parameter to a static member
6878 2002-12-14 Jason Merrill <jason@redhat.com>
6880 * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
6881 return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
6882 * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
6883 don't bother with an AGGR_INIT_EXPR.
6884 (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
6885 just generate a new decl normally. Take return slot parm.
6886 * cp-tree.h: Adjust prototype.
6888 2002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
6891 * cvt.c (convert_to_pointer_force): Don't try comparing against
6894 2002-12-13 Geoffrey Keating <geoffk@apple.com>
6896 * cp-tree.h: Have the multiple-include guards around
6899 2002-12-10 David Edelsohn <edelsohn@gnu.org>
6901 * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
6903 (snarf_method): Same.
6904 (snarf_defarg): Same.
6906 2002-12-10 Mark Mitchell <mark@codesourcery.com>
6909 * pt.c (tsubst_copy): Handle destructor names more correctly.
6911 2002-12-10 Matt Austern <austern@apple.com>
6913 * cp-tree.h: get rid of needs_virtual_reinit bit.
6915 2002-12-09 Mark Mitchell <mark@codesourcery.com>
6917 * NEWS: Document removal of in-class initialization extension for
6918 static data members of non-arithmetic, non-enumeration type.
6919 * decl.c (check_static_variable_definition): Do not allow that
6921 * decl2.c (grokfield): Do not call digest_init when processing
6924 2002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6926 * error.c (dump_expr): Fix format specifier warning.
6928 2002-12-04 Geoffrey Keating <geoffk@apple.com>
6930 * class.c (finish_struct_1): Correct comment.
6931 * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
6933 2002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6936 * error.c (dump_expr): Don't ever try to dump a non-existent
6939 2002-12-03 Nathan Sidwell <nathan@codesourcery.com>
6941 Implement covariant returns.
6942 * cp-tree.h (IS_AGGR_TYPE_2): Remove.
6943 (struct lang_decl_flags): Add this_thunk_p flag.
6944 Rename vcall_offset to virtual_offset.
6945 (struct lang_decl): Rename delta to fixed_offset.
6946 (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
6947 (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
6948 (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
6949 (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
6950 (make_thunk): Add this_adjusting arg.
6951 (finish_thunk): Declare.
6952 (mangle_thunk): Add this_adjusting arg.
6953 * class.c (get_vcall_index): Use base function for lookup.
6954 (update_vtable_entry_for_fn): Generate covariant thunk.
6955 (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
6956 (build_vtbl_initializer): Use base function for lookup.
6957 Finish covariant thunk here. Adjust thunk generation.
6958 * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
6959 Adjust thunk dumping.
6960 * mangle.c (mangle_call_offset): New function.
6961 (mangle_thunk): Adjust for covariant thunks.
6962 * method.c (make_thunk): Adjust. Do not set name here.
6963 (finish_thunk): New function. Set name here.
6964 (use_thunk): Generate covariant thunks too.
6965 (thunk_adjust): New function.
6966 * search.c (covariant_return_p): Remove. Fold into ...
6967 (check_final_overrider): ... here. Simplify.
6968 * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
6970 2002-12-03 Jason Merrill <jason@redhat.com>
6973 * call.c (build_over_call): Check specifically for TARGET_EXPR
6976 PR c++/8461, c++/8625
6977 * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
6978 (cp_convert_parm_for_inlining): Remove.
6979 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
6981 * cp-tree.h (ADDR_IS_INVISIREF): Remove.
6982 * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
6984 * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
6985 an ambiguous conversion.
6987 2002-12-03 Mark Mitchell <mark@codesourcery.com>
6990 * decl.c (reshape_init): Handle erroneous initializers.
6992 2002-12-02 Mark Mitchell <mark@codesourcery.com>
6995 * spew.c (remove_last_token): Make sure that last_chunk is set
6999 * error.c (dump_expr): Handle character constants with
7002 2002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7005 * decl.c (grokdeclarator): Require class-key for all friend class.
7006 Output the correct type and context in the error message.
7008 2002-12-01 Mark Mitchell <mark@codesourcery.com>
7011 * pt.c (unify): Use variably_modified_type_p to test validity of
7012 template argument types.
7015 * cp-tree.h (lang_type_class): Add typeinfo_var.
7016 (CLASSTYPE_TYPEINFO_VAR): New macro.
7017 * rtti.c (get_tinfo_decl): Use it.
7020 * init.c (expand_member_init): Always get the main variant of a
7023 2002-12-01 Mark Mitchell <mark@codesourcery.com>
7027 * decl.c (cxx_init_decl_processing): Use size_type_node, not
7029 * decl2.c (coerce_new_type): Likewise.
7030 * except.c (do_allocate_exception): Likewise.
7032 2002-11-30 Zack Weinberg <zack@codesourcery.com>
7034 * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
7035 dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
7036 lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
7037 repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
7038 typeck2.c: Include coretypes.h and tm.h.
7039 * Make-lang.in: Update dependencies.
7041 2002-11-30 Mark Mitchell <mark@codesourcery.com>
7044 * decl.c (layout_var_decl): Deal gracefully with erroneous types.
7045 (check_initializer): Validate the type of the initialized
7046 variable, even if the initializer is absent.
7047 * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
7050 * typeck.c (convert_for_assignment): Do not use
7051 decl_constant_value on the operand.
7054 * pt.c (instantiate_decl): Handle template friends defined outside
7055 of the class correctly.
7057 2002-11-29 Joe Buck <jbuck@synopsys.com>
7059 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
7062 2002-11-29 Mark Mitchell <mark@codesourcery.com>
7064 * class.c (walk_subobject_offsets): Recur on binfos as well as on
7066 (layout_nonempty_base_or_field): Pass it a binfo when processing a
7068 (layout_empty_base): Likewise.
7069 (build_base_field): Likewise.
7071 2002-11-27 Mark Mitchell <mark@codesourcery.com>
7073 * class.c (build_base_field): Make sure we get the canonical base
7074 when descending through primary bases.
7076 2002-11-26 Geoffrey Keating <geoffk@apple.com>
7078 * decl.c (check_initializer): Don't error on initialisation of
7079 a scalar with a brace-enclosed expression.
7081 2002-11-26 Nathan Sidwell <nathan@codesourcery.com>
7083 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
7084 (template_parms_equal): Remove prototype.
7085 * typeck.c (buuld_indirect_ref): Reformat.
7087 2002-11-25 Jason Merrill <jason@redhat.com>
7089 * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
7092 2002-11-25 Mark Mitchell <mark@codesourcery.com>
7094 * tree.c (cp_build_qualified_type_real): Correct handling of
7096 * class.c (walk_subobject_offsets): Fix thinko.
7097 (build_base_field): Record offsets of empty bases in primary
7099 (layout_class_type): Record offsets of empty bases in fields.
7101 * search.c (is_subobject_of_p_1): Fix thinko.
7102 (lookup_field_queue_p): Likewise.
7104 2002-11-24 Mark Mitchell <mark@codesourcery.com>
7106 * class.c (layout_class_type): Reuse tail padding when laying out
7109 2002-11-22 Mark Mitchell <mark@codesourcery.com>
7111 * rtti.c (qualifier_flags): Fix thinko.
7113 2002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
7115 Remove traditional C constructs 1/n.
7116 * cp-tree.h (init_method, set_mangled_name_for_decl,
7117 build_opfncall, hack_identifier, make_thunk, use_thunk,
7118 synthesize_method, implicitly_declare_fn,
7119 skip_artificial_parms_for, optimize_function, calls_setjmp_p,
7120 maybe_clone_body): Remove use of PARAMS.
7122 * method.c (do_build_assign_ref, do_build_copy_constructor,
7123 synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
7125 (synthesize_method): Use 'bool' type and constants instead of
7127 (locate_copy): Likewise.
7128 (implicitly_declare_fn): Likewise.
7130 * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
7131 Remove old-style declaration.
7132 (maybe_clone_body): Use 'bool' type and constants.
7134 2002-11-21 Glen Nakamura <glen@imodulo.com>
7137 * typeck.c (get_member_function_from_ptrfunc): Make sure that a
7138 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
7139 of the branches of a COND_EXPR.
7141 2002-11-19 Mark Mitchell <mark@codesourcery.com>
7143 * pt.c (for_each_template_parm): Free allocated memory.
7144 * search.c (is_subobject_of_p_1): New function.
7145 (is_subobject_of_p): Avoid walking virtual bases multiple times.
7147 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
7149 * g++spec.c (lang_specific_spec_functions): New.
7151 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
7153 * ChangeLog: Follow spelling conventions.
7154 * class.c: Likewise.
7155 * decl2.c: Likewise.
7157 2002-11-14 Zack Weinberg <zack@codesourcery.com>
7159 * search.c (dfs_push_decls): Do not try to reorder elements
7160 3..n of method_vec if method_vec has only two elements.
7161 Reverse order of two tests to avoid accessing unallocated
7164 2002-11-14 Mark Mitchell <mark@codesourcery.com>
7166 * class.c (dfs_find_final_overrider): Adjust so that the most
7167 derived object is a binfo, rather than a class type.
7168 (find_final_overrider): Likewise.
7169 (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
7170 (add_vcall_offset): Likewise.
7172 2002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7175 * pt.c (instantiate_template): Push class scope for member
7177 (get_mostly_instantiated_function_type): Likewise. Don't call
7178 tsubst on context. Remove CONTEXTP and TPARMSP parameters.
7179 * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
7180 * mangle.c (write_encoding, write_unqualified_name): Adjust.
7182 2002-11-07 Mark Mitchell <mark@codesourcery.com>
7184 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
7185 vcall offfsets. Split out ...
7186 (add_vcall_offset): ... new function.
7189 * pt.c (for_each_template_parm): Add htab parameter.
7190 (process_partial_specialization): Adjust call.
7191 (push_template_decl_real): Likewise.
7192 (pair_fn_data): Add visited.
7193 (for_each_template_parm_r): Avoid walking duplicates more than
7195 (uses_template_parms): Adjust call to for_each_template_parm.
7197 2002-11-07 Mark Mitchell <mark@codesourcery.com>
7199 * class.c (add_implicitly_declared_members): Put implicitly
7200 declared functions at the end of TYPE_METHODs when -fabi-version
7203 2002-11-05 Geoffrey Keating <geoffk@apple.com>
7205 * decl2.c (finish_file): Correct spelling.
7207 2002-11-03 Mark Mitchell <mark@codesourcery.com>
7209 * call.c (build_special_member_call): Do not try to lookup VTTs by
7211 * class.c (vtbl_init_data): Add generate_vcall_entries.
7212 (get_vtable_decl): Do not look up virtual tables by name.
7213 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
7214 (set_primary_base): Do not set CLASSTYPE_RTTI.
7215 (determine_primary_base): Likewise.
7216 (get_matching_virtual): Remove.
7217 (get_vcall_index): New function.
7218 (update_vtable_entry_for_fn): Do not try to use virtual thunks
7219 when they are not required. Assign vcall indices at this point.
7220 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
7221 Do update dynamic_classes.
7222 (build_vtt): Do not add VTTs to the symbol table.
7223 (build_ctor_vtbl_group): Likewise.
7224 (build_vtbl_initializer): Simplify handling of vcall indices.
7225 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
7226 for the most derived class.
7227 (add_vcall_offset_vtbl_entries_1): But do not actually add them to
7229 * cp-tree.h (dynamic_classes): New macro.
7230 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
7231 (CLASSTYPE_RTTI): Remove.
7232 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
7233 (CLASSTYPE_VCALL_INDICES): New macro.
7234 (CLASSTYPE_VTABLES): Likewise.
7235 (BV_USE_VCALL_INDEX_P): Remove.
7236 (build_vtable_path): Remove.
7237 * decl2.c (finish_vtable_vardecl): Remove.
7238 (key_method): Remove #if 0'd code.
7239 (finish_vtable_vardecl): Rename to ...
7240 (maybe_emit_vtables): ... this.
7241 (finish_file): Use it.
7242 * search.c (look_for_overrides_here): Update comment.
7244 2002-11-01 Zack Weinberg <zack@codesourcery.com>
7247 * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
7249 2002-10-30 Jason Merrill <jason@redhat.com>
7252 * cp-tree.h (ADDR_IS_INVISIREF): New macro.
7253 * call.c (convert_for_arg_passing): Set it.
7254 * except.c (stabilize_throw_expr): Recurse for such an arg.
7256 2002-10-31 Mark Mitchell <mark@codesourcery.com>
7258 * cp-tree.h (lang_decl_flags): Remove init_priority.
7259 (lang_decl): Add delta.
7260 (GLOBAL_INIT_PRIORITY): Remove.
7261 (THUNK_DELTA): Revise definition.
7262 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
7263 * dump.c (cp_dump_tree): Don't dump it.
7265 2002-10-30 Mark Mitchell <mark@codesourcery.com>
7268 * typeck2.c (process_init_constructor): Call complete_array_type.
7271 * decl.c (make_typename_type): Issue errors about invalid results.
7273 2002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7275 Core issue 287, PR c++/7639
7276 * cp-tree.h (lang_type_class): Add decl_list field.
7277 (CLASSTYPE_DECL_LIST): New macro.
7278 (maybe_add_class_template_decl_list): Add declaration.
7279 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
7280 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
7281 (maybe_add_class_template_decl_list): New function.
7282 (add_implicitly_declared_members): Use it.
7283 * decl.c (maybe_process_template_type_declaration): Likewise.
7284 (pushtag): Likewise.
7285 * friend.c (add_friend): Likewise.
7286 (make_friend_class): Likewise.
7287 * semantics.c (finish_member_declaration): Likewise.
7288 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
7289 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
7290 to process members and friends in the order of declaration.
7292 2002-10-29 Mark Mitchell <mark@codesourcery.com>
7295 * decl.c (finish_destructor_body): Create the label to jump to
7296 when returning from a destructor here.
7297 (finish_function_body): Rather than here.
7299 2002-10-25 Zack Weinberg <zack@codesourcery.com>
7302 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
7303 SCOPE_REF is not null before dereferencing it.
7305 2002-10-25 Mark Mitchell <mark@codesourcery.com>
7307 * call.c (build_over_call): Use DECL_CONTEXT, not
7308 DECL_VIRTUAL_CONTEXT.
7309 * class.c (modify_vtable_entry): Don't mess with
7310 DECL_VIRTUAL_CONTEXT.
7311 (set_vindex): Remove.
7312 (set_primary_base): Remove vfuns_p parameter.
7313 (determine_primary_base): Likewise.
7314 (modify_all_vtables): Likewise.
7315 (layout_class_type): Likewise. Adjust calls to other functions
7317 (finish_struct_1): Adjust calls to modified functions. Set
7319 * cp-tree.h (lang_type_class): Remove vsize.
7320 (CLASSTYPE_VSIZE): Remove.
7321 (lang_decl): Remove thunks.
7322 (DECL_THUNKS): Adjust.
7323 (DECL_VIRTUAL_CONTEXT): Remove.
7324 (duplicate_decls): Don't copy it.
7325 * pt.c (build_template_decl): Don't set it.
7326 (tsubst_decl): Likewise.
7327 * typeck.c (expand_ptrmemfunc_cst): Don't use it.
7329 * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
7330 (build_vtable_entry): Remove.
7331 * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
7332 (lang_decl): Add thunks.
7333 (DECL_THUNKS): New macro.
7334 * decl.c (duplicate_decls): Copy it.
7335 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
7336 * semantics.c (emit_associated_thunks): Simplify.
7338 2002-10-24 David Edelsohn <edelsohn@gnu.org>
7341 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
7342 lang_type structure exists before accessing field.
7343 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
7344 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
7345 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
7346 * class.c (check_field_decls): Use new macros.
7347 * typeck2.c (process_init_constructor): Remove redundant check for
7348 existence of lang_type structure.
7350 2002-10-24 Mark Mitchell <mark@codesourcery.com>
7352 * class.c (end_of_base): New method.
7353 (end_of_class): Use it. Check indirect virtual bases.
7355 * class.c (check_field_decls): Fix typo.
7357 2002-10-23 Mark Mitchell <mark@codesourcery.com>
7360 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
7364 * spew.c (next_token): Do not return an endless stream of
7365 END_OF_SAVED_INPUT tokens.
7366 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
7367 the cached token stream.
7368 (snarf_defarg): Likewise.
7370 2002-10-23 Zack Weinberg <zack@codesourcery.com>
7372 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
7373 variably_modified_type_p.
7374 * cp-tree.h: Remove prototype of variably_modified_type_p.
7375 * tree.c (variably_modified_type_p): Remove; now implemented
7376 in language-independent code.
7378 2002-10-22 Mark Mitchell <mark@codesourcery.com>
7381 * spew.c (snarf_parenthesized_expression): New function.
7382 (snarf_block): Use it.
7384 2002-10-22 Richard Henderson <rth@redhat.com>
7386 * method.c (use_thunk): Always compute vcall_value; assert that
7387 it is not zero. Use can_output_mi_thunk; use output_mi_thunk
7388 for vcall thunks as well.
7390 2002-10-21 Mark Mitchell <mark@codesourcery.com>
7392 * class.c (empty_base_at_nonzero_offset_p): New function.
7393 (layout_nonempty_base_or_field): Do not check for conflicts when
7394 laying out a virtual base using the GCC 3.2 ABI.
7395 (build_base_field): Correct checking for presence of empty classes
7396 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
7398 * class.c (include_empty_classes): Use normalize_rli.
7399 (layout_class_type): Likewise.
7401 * decl.c (reshape_init): Tweak handling of character arrays.
7404 * cp-tree.h (lang_type_class): Add contains_empty_class_p.
7405 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
7406 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
7407 (check_field_decls): Likewise.
7408 (layout_class_type): Likewise.
7409 (finish_struct_1): Initialize it.
7410 (walk_subobject_offsets): Use it to prune searches.
7412 2002-10-20 Mark Mitchell <mark@codesourcery.com>
7414 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
7415 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
7416 TARGET_ASM_OUTPUT_MI_THUNK in comments.
7418 2002-10-18 Zack Weinberg <zack@codesourcery.com>
7420 * decl.c (start_decl): Point users of the old initialized-
7421 typedef extension at __typeof__.
7423 2002-10-18 Mark Mitchell <mark@codesourcery.com>
7425 * Make-lang.in (method.o): Depend on TARGET_H.
7426 * method.c (target.h): Include it.
7427 (use_thunk): Use target hooks. Use vcall thunks, if available.
7429 2002-10-18 Mark Mitchell <mark@codesourcery.com>
7431 * class.c (base_derived_from): Make sure return value is a bool.
7433 2002-10-18 Mark Mitchell <mark@codesourcery.com>
7435 * class.c (find_final_overrider_data_s): Remove overriding_fn and
7437 (dfs_base_derived_from): New function.
7438 (base_derived_from): Likewise.
7439 (dfs_find_final_overrider): Use base_derived_from.
7440 (find_final_overrider): Adjust.
7442 2002-10-18 Jason Merrill <jason@redhat.com>
7445 * semantics.c (finish_for_cond, finish_while_cond): Don't mess
7446 with condition decls in a template.
7448 2002-10-17 Nathan Sidwell <nathan@codesourcery.com>
7450 * class.c (add_method): Compare template parms too.
7452 2002-10-17 Mark Mitchell <mark@codesourcery.com>
7455 * class.c (handle_using_decl): Allow the declaration used to be
7456 from an ambiguous base.
7458 * pt.c (convert_template_argument): Revert this change:
7459 2002-10-16 Mark Mitchell <mark@codesourcery.com>
7460 * pt.c (convert_template_argument): Do not fold non-type
7461 template rguments when inside a template.
7463 * init.c (expand_default_init): Handle brace-enclosed initializers
7466 2002-10-16 Mark Mitchell <mark@codesourcery.com>
7468 * mangle.c (write_expression): Correct handling of enumeration
7470 (write_template_arg): Likewise.
7471 * pt.c (convert_template_argument): Do not fold non-type template
7472 arguments when inside a template.
7475 * cvt.c (convert_to_reference): Allow references as the incoming
7478 2002-10-16 Mark Mitchell <mark@codesourcery.com>
7481 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
7482 build_qualified_type.
7484 2002-10-15 Richard Henderson <rth@redhat.com>
7486 * error.c (dump_expr): Use real_to_decimal directly, and with
7489 2002-10-15 Mark Mitchell <mark@codesourcery.com>
7491 * decl.c (reshape_init): Fix typo.
7493 * cp-tree.h (operator_name_info_t): Add arity.
7494 * lex.c (init_operators): Initialize it.
7495 * mangle.c (write_conversion_operator_name): New function.
7496 (write_unqualified_name): Use it.
7497 (write_template_args): Accept template arguments as a TREE_LIST.
7498 (write_expression): Adjust handling of qualified names to match
7501 2002-10-15 Jason Merrill <jason@redhat.com>
7503 * call.c (call_builtin_trap): New fn.
7504 (convert_arg_to_ellipsis): Use it. Downgrade error to warning.
7505 (build_call): Don't set current_function_returns_abnormally outside
7508 2002-10-14 Mark Mitchell <mark@codesourcery.com>
7510 * class.c (check_field_decls): Remove empty_p parameter. Instead,
7511 clear CLASSTYPE_EMPTY_P.
7512 (build_base_field): Likewise.
7513 (build_base_fields): Likewise.
7514 (check_bases_and_members): Likewise.
7515 (create_vtbl_ptr): Likewise.
7516 (layout_class_type): Likewise. Ensure that empty classes have
7517 size zero when used as base classes in the 3.2 ABI.
7518 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
7519 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
7521 (is_empty_class): Correct definition when using post-3.2 ABI.
7522 * cp-tree.h (lang_type_class): Add empty_p.
7523 (CLASSTYPE_EMPTY_P): New macro.
7525 2002-10-12 Nathan Sidwell <nathan@codesourcery.com>
7527 * init.c (build_delete): Do not apply save_expr for arrays.
7528 (build_vec_delete): Likewise.
7530 2002-10-14 Mark Mitchell <mark@codesourcery.com>
7532 * decl.c (layout_var_decl): Call layout_decl even for variables
7533 whose type is an array with unspecified bounds.
7536 * lex.c (do_identifier): Add another option for the parsing
7538 * parse.y (do_id): Use it.
7540 2002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
7542 PRs C++/6803, C++/7721 and C++/7803
7543 * decl.c (grokdeclarator): Gracefully handle template-name as
7546 2002-10-11 Jason Molenda <jmolenda@apple.com>
7548 * init.c (build_field_list): Provide uses_unions_p with a default
7551 2002-10-11 Mark Mitchell <mark@codesourcery.com>
7554 * cp-tree.h (variably_modified_type_p): New function.
7555 (grokdeclarator) Tighten check for variably modified types as
7557 * pt.c (convert_template_argument): Do not allow variably modified
7558 types as template arguments.
7559 * tree.c (variably_modified_type_p): New function.
7561 * NEWS: Document removal of "new X = ..." extension.
7562 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
7563 brace-enclosed initializers.
7564 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
7565 (initialize_local_var): Remove declaration.
7566 (expand_static_init): Likewise.
7567 * decl.c (next_initializable_field): New function.
7568 (reshape_init): Likewise.
7569 (check_initializer): Use them. Build dynamic initializer for
7570 aggregates here too.
7571 (initialize_local_var): Simplify, and incorporate cleanup
7572 insertion code as well.
7573 (destroy_local_var): Remove.
7574 (cp_finish_decl): Tidy.
7575 (expand_static_init): Fold checks for whether or not a variable
7576 needs initialization into this function. Simplify.
7577 * decl2.c (do_static_initialization): Simplify.
7578 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
7579 be done for us automatically.
7580 (expand_default_init): Handle brace-enclosed initializers
7582 (expand_aggr_init_1): Remove RTL-generation code.
7583 (build_vec_init): Remove "new X = ..." support.
7584 * parse.y (new_initializer): Likewise.
7585 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
7586 brace-enclosed initializer.
7587 (create_pseudo_type_info): Likewise.
7588 * typeck2.c (store_init_value): Don't try to handle digest_init
7589 being called more than once.
7590 (digest_init): Tidy handling of brace-enclosed initializers.
7592 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7594 * decl.c (typename_hash): Use htab_hash_pointer.
7596 2002-10-10 Jim Wilson <wilson@redhat.com>
7598 * decl.c (duplicate_decls): Don't call decl_attributes.
7600 2002-10-09 Zack Weinberg <zack@codesourcery.com>
7603 * decl.c (start_decl): Unconditionally issue error for
7604 'typedef foo = bar'.
7605 (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
7606 (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
7608 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7610 * decl2.c (prune_vtable_vardecl): Delete unused function.
7612 2002-10-03 Mark Mitchell <mark@codesourcery.com>
7615 * decl2.c (finish_anon_union): Do not expand anonymous unions when
7616 procesing template functions.
7617 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7618 type. Call layout_decl.
7619 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7621 2002-10-07 Richard Henderson <rth@redhat.com>
7623 * decl2.c, pt.c: Revert c++/7754 fix.
7625 2002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7628 * error.c (dump_expr) [REAL_CST]: Output in decimal format.
7630 2002-10-03 Mark Mitchell <mark@codesourcery.com>
7633 * pt.c (for_each_template_parm_r): Handle BASELINKs.
7636 * decl2.c (finish_anon_union): Do not expand anonymous unions when
7637 procesing template functions.
7638 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7639 type. Call layout_decl.
7640 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7642 2002-10-03 Mark Mitchell <mark@codesourcery.com>
7645 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
7646 template parameters.
7647 (globals): Add entity and need_abi_warning.
7648 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
7649 CLASSTYPE_TEMPLATE_INFO.
7650 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
7652 (write_prefix): Handle typename types correctly.
7653 (write_template_prefix): Handle template template parameters
7655 (start_mangling): Add entity parameter.
7656 (finish_mangling): Warn about names whose mangling will change.
7657 (mangle_decl_string): Adjust.
7658 (mangle_type_string): Likewise.
7659 (mangle_special_for_type): Likewise.
7660 (mangle_ctor_vtbl_for_type): Likewise.
7661 (mangle_thunk): Likewise.
7662 (mangle_guard_variable): Likewise.
7663 (mangle_ref_init_variable): Likewise.
7665 2002-10-02 Mark Mitchell <mark@codesourcery.com>
7668 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
7669 * cp-tree.h (emit_base_init): Rename to ....
7670 (emit_mem_initializers): ... this.
7671 (expand_member_init): Change prototype.
7672 * init.c (perform_member_init): Compute explicit, rather than
7673 requiring it as a parameter.
7674 (sort_member_init): Rename to ...
7675 (sort_mem_initializers): ... this. Process bases and data members
7677 (sort_base_init): Remove.
7678 (emit_base_init): Rename to ...
7679 (emit_mem_initializers): ... this.
7680 (expand_aggr_vbase_init_1): Remove.
7681 (construct_virtual_bases): Rename to ...
7682 (construct_virtual_base): ... this.
7683 (expand_member_init): Rework handling of base initializers.
7684 * method.c (do_build_copy_constructor): Use
7685 finish_mem_initializers.
7686 * parse.y (member_init): Adjust calls to expand_member_init.
7687 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
7688 (tsubst_initializer_list): Use expand_member_init.
7689 * semantics.c (finish_mem_intiailizers): Simplify.
7691 2002-10-02 Matt Austern <austern@apple.com>
7692 * decl.c (walk_vtables_r): Fixed typo that caused result to
7693 never get a nonzero value.
7695 2002-10-02 Roger Sayle <roger@eyesopen.com>
7697 PR optimization/6627
7698 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
7699 from here, and move it to tree.h.
7700 * decl.c (cxx_init_decl_processing): If storing the vbit
7701 in function pointers, ensure that force_align_functions_log
7704 2002-10-02 Matt Austern <austern@apple.com>
7706 * class.c (check_field_decls): Changed warning about const member
7707 variables so that it doesn't get issued for a class aggregate.
7709 2002-10-01 Mark Mitchell <mark@codesourcery.com>
7711 * decl.c (cp_finish_decl): Make sure array types are laid out,
7712 even if the array bounds are unknown.
7714 2002-10-01 Steve Ellcey <sje@cup.hp.com>
7716 * class.c (build_vtbl_initializer): Change build_c_cast
7719 2002-10-01 Mark Mitchell <mark@codesourcery.com>
7721 * decl.c (cp_finish_decl): Make sure array types are laid out,
7722 even if the array bounds are unknown.
7724 * decl.c (cp_finish_decl): Correct check for dynamic
7725 initialization of thread-local storage.
7727 2002-09-30 Nathan Sidwell <nathan@codesourcery.com>
7729 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
7732 2002-09-30 Steve Ellcey <sje@cup.hp.com>
7734 * class.c (build_vtbl_initializer): Add cast.
7735 (add_vcall_offset_vtbl_entries_1):
7736 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
7738 2002-09-30 Mark Mitchell <mark@codesourcery.com>
7740 * class.c (walk_subobject_offsets): Correct the calculation of
7741 offsets for virtual bases. Correct the counting of array
7743 (layout_nonempty_base_or_field): Simplify. Correct the
7744 calculation of offsets to be propagated through the binfo
7746 (build_base_field): Avoid creating a FIELD_DECL for empty bases.
7747 Add the FIELD_DECL to TYPE_FIELDS.
7748 (build_base_fields): Adjust accordingly.
7749 (layout_virtual_bases): Use build_base_field.
7750 (end_of_class): Return a tree, not an integer.
7751 (warn_about_ambiguous_direct_bases): Rename to ...
7752 (warn_about_ambiguous_bases): ... this.
7753 (include_empty_classes): New function.
7754 (layout_class_type): Create an alternative version of the type to
7755 be used when as a base class type. Do not call
7756 finish_record_layout until we are done laying out the class.
7757 * cp-tree.h (lang_type_class): Remove size, size_unit. Add
7759 (CLASSTYPE_SIZE): Reimplement.
7760 (CLASSTYPE_SIZE_UNIT): Likewise.
7761 (CLASSTYPE_ALIGN): Likweise.
7762 (CLASSTYPE_USER_ALIGN): Likewise.
7763 (CLASSTYPE_AS_BASE): New macro.
7764 (DECL_INITIALIZED_P): Likewise.
7765 (extract_init): Remove prototype.
7766 (build_forced_zero_init): Rename to ...
7767 (build_zero_init): ... this.
7768 (force_store_init_value): Remove.
7769 * decl.c (obscure_complex_init): Remove.
7770 (duplicate_decls): Copy DECL_INITIALIZED_P.
7771 (check_initializer): Do not leave junk in DECL_INITIAL.
7772 (cp_finish_decl): Handle zero-initialization of entities with
7773 static storage duration.
7774 * expr.c (extract_init): Remove.
7775 * init.c (build_forced_zero_init): Remove.
7776 (build_zero_init): New function.
7777 (build_default_init): Use it.
7778 (build_field_list): Skip FIELD_DECLs for base subobjects.
7779 (push_base_cleanups): Likewise.
7780 * method.c (do_build_assign_ref): Likewise.
7781 (synthesize_exception_spec): Likewise.
7782 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
7783 (regenerate_decl_from_template): To not set DECL_INITIAL for a
7784 static data member whose initialization took place in its class.
7785 (instantiate_decl): Do not pass an initializer to cp_finish_decl
7787 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
7788 (dfs_unuse_fields): Likewise.
7789 * tree.c (pod_type_p): Handle error_mark_node.
7790 (zero_init_p): Likewise.
7791 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
7793 * typeck2.c (store_init_value): Remove #if 0'd code.
7794 (force_store_init_value): Remove.
7795 (process_init_constructor): Use build_zero_init.
7797 2002-09-29 Nathan Sidwell <nathan@codesourcery.com>
7800 * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
7802 2002-09-29 Kazu Hirata <kazu@cs.umass.edu>
7804 * cp-tree.h: Fix comment typos.
7808 2002-09-25 Mark Mitchell <mark@codesourcery.com>
7810 * cp/class.c (contains_empty_class_p): New method.
7811 (walk_subobject_offsets): Correct computation of field offset.
7812 (layout_empty_base): Correct placement of emtpy base classes.
7813 (layout_class_type): Warn about ABI changes.
7815 2002-09-23 Mark Mitchell <mark@codesourcery.com>
7817 * cp/class.c (layout_virtual_bases): Do not round the size of the
7818 type to a multiple of the alignment before laying out virtual bases.
7819 (layout_class_type): Correct handling of bit-fields that are wider
7820 than their type inside unions. Round the size of the type to a
7821 even number of bytes when computing the size without virtual
7823 * cp/cp-tree.h (abi_version_at_least): New macro.
7825 2002-09-21 Kazu Hirata <kazu@cs.umass.edu>
7827 * ChangeLog: Follow spelling conventions.
7828 * ChangeLog.2: Likewise.
7830 * class.c: Likewise.
7831 * cp-tree.h: Likewise.
7834 * decl2.c: Likewise.
7835 * except.c: Likewise.
7836 * friend.c: Likewise.
7837 * g++spec.c: Likewise.
7840 * mangle.c: Likewise.
7841 * method.c: Likewise.
7842 * operators.def: Likewise.
7843 * optimize.c: Likewise.
7846 * search.c: Likewise.
7847 * semantics.c: Likewise.
7850 * typeck.c: Likewise.
7852 2002-09-18 Devang Patel <dpatel@apple.com>
7854 * cp/cp-tree.h: New prototype for walk_vtabls().
7855 * cp/decl.c (walk_vtables_r): New function.
7856 (struct cp_binding_level): Add new members, namespaces,
7857 names_size and vtables.
7858 (add_decl_to_level): Add decl in namespaces or vtables
7859 chain, if conditions match.
7860 (walk_vtables): New function.
7861 (walk_namespaces_r): Travers separate namespace chain
7862 for namespace decls.
7863 (wrapup_globals_for_namespace): Use names_size instead
7865 * cp/decl2.c (finish_file): Use walk_vtables() instead of
7866 walk_globals() to walk vtable decls.
7868 2002-09-18 Nathan Sidwell <nathan@codesourcery.com>
7870 * decl.c (grokdeclarator): Use assert, not internal_error. Don't
7871 ICE with invalid pointers & references.
7873 2002-09-17 Zack Weinberg <zack@codesourcery.com>
7875 * Make-lang.in: Remove all references to the demangler.
7876 * cxxfilt.c: Moved to binutils.
7878 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
7881 * pt.c (tsubst_decl): Remove assert.
7883 Remove DR 295 implementation.
7884 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
7885 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
7886 about ignoring volatile qualifiers.
7888 * search.c (lookup_member): Correct documentation.
7890 2002-09-16 Geoffrey Keating <geoffk@apple.com>
7892 * cp-tree.h (union lang_tree_node): Add chain_next option.
7894 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
7896 * parse.y (parse_finish_call_expr): Check lookup_member result.
7899 * semantic.c (finish_asm_stmt): Fix operand/output_operands
7901 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
7903 2002-09-15 Nathan Sidwell <nathan@codesourcery.com>
7906 * call.c (build_over_call): Convert this pointer for fns found by
7909 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
7911 * ChangeLog: Follow spelling conventions.
7912 * ChangeLog.1: Likewise.
7914 2002-09-14 Nathan Sidwell <nathan@codesourcery.com>
7917 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
7919 2002-09-14 Kazu Hirata <kazu@cs.umass.edu>
7921 * error.c: Fix comment formatting.
7922 * except.c: Likewise.
7924 * friend.c: Likewise.
7925 * g++spec.c: Likewise.
7928 * mangle.c: Likewise.
7929 * method.c: Likewise.
7930 * optimize.c: Likewise.
7933 * search.c: Likewise.
7934 * semantics.c: Likewise.
7937 * typeck.c: Likewise.
7938 * typeck2.c: Likewise.
7940 2002-09-13 Matt Austern <austern@apple.com>
7943 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
7944 * cp/call.c: Change call-by-const-reference mechanism to use
7945 non_cast_lvalue_p when deciding whether the create a temporary.
7946 We need a temporary when passing, e.g. (long) x by const ref.
7948 2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
7950 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
7952 2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
7954 * decl.c: Fix comment formatting.
7955 * decl2.c: Likewise.
7957 2002-09-12 Kazu Hirata <kazu@cs.umass.edu>
7959 * call.c: Fix comment formatting.
7960 * class.c: Likewise.
7961 * cp-lang.c: Likewise.
7962 * cp-tree.h: Likewise.
7965 2002-09-11 Zack Weinberg <zack@codesourcery.com>
7967 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
7968 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
7969 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
7970 minor adjustments (use version_string, eliminate yet another
7971 duplicate of xmalloc)
7973 2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7975 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
7977 2002-09-05 Jason Merrill <jason@redhat.com>
7979 * typeck2.c (add_exception_specifier): Only pedwarn for an
7981 (require_complete_eh_spec_types): New fn.
7982 (cxx_incomplete_type_diagnostic): Also support pedwarning.
7983 * typeck.c (complete_type_or_diagnostic): Likewise.
7984 * call.c (build_call): Call require_complete_eh_spec_types.
7985 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
7986 on an incomplete type.
7988 2002-09-04 Jakub Jelinek <jakub@redhat.com>
7990 * decl.c (start_cleanup_fn): Clear interface_only before
7991 start_function, restore it afterwards.
7993 2002-09-02 Nathan Sidwell <nathan@codesourcery.com>
7995 * cp-tree.h (finish_builtin_type): Remove.
7996 * decl2.c (finish_builtin_type): Move to common code.
7997 * decl.c (build_ptrmemfunc_type): Adjust.
7998 * rtti.c (create_pseudo_type_info): Adjust.
7999 (create_tinfo_types): Adjust.
8001 2002-08-31 Jason Merrill <jason@redhat.com>
8003 * cp-lang.c (cp_expr_size): Allow initialization from a
8006 2002-08-30 Richard Henderson <rth@redhat.com>
8009 * tree.c: Include target.h.
8010 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
8012 * Makefile.in (tree.o): Update.
8014 2002-08-27 Mark Mitchell <mark@codesourcery.com>
8016 * class.c (layout_virtual_bases): Warn about bugs in G++ that
8017 result in incorrect object layouts.
8018 (layout_class_type): Likewise.
8020 2002-08-24 Matt Austern <austern@apple.com>
8022 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
8024 (real_lvalue_p): Update caller.
8026 (non_cast_lvalue_or_else): New.
8027 * tree.h: Declare it.
8028 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
8030 2002-08-22 Mark Mitchell <mark@codesourcery.com>
8032 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
8033 and COND_EXPR specially; fix error message output.
8035 2002-08-22 Jason Merrill <jason@redhat.com>
8037 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
8038 * semantics.c (nullify_returns_r): Likewise.
8040 2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
8043 * typeck.c (finish_class_member_access_expr): Diagnose cases where
8044 name lookup finds nothing.
8046 2002-08-15 Jason Merrill <jason@redhat.com>
8048 * semantics.c (finish_then_clause): Remove redundant assignment.
8049 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
8050 extra binding level outside the if/switch statement.
8051 (finish_while_cond, finish_for_cond): Rewrite complex condition
8054 2002-08-15 Alexandre Oliva <aoliva@redhat.com>
8056 * parse.y (sizeof, alignof, typeof): New non-terminals to
8057 increment skip_evaluation. Replace terminals with them and
8058 decrement skip_evaluation at the end of rules using them.
8059 * decl2.c (mark_used): Don't assemble_external if
8060 skipping evaluation.
8062 2002-08-15 Gabriel Dos Reis <gdr@nerim.net>
8065 * parse.y (parse_finish_call_expr): Handle incomplete
8066 type used to name a scope.
8068 2002-08-15 Nathan Sidwell <nathan@codesourcery.com>
8071 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
8072 regression caused by my 2002-08-08 patch.
8074 2002-08-13 Mark Mitchell <mark@codesourcery.com>
8076 * decl.c (pushdecl_class_level): Honor requests to bind names to
8079 2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8081 * decl2.c (build_call_from_tree): Fix uninitialized variable.
8082 * parse.y (parse_finish_call_expr): Likewise.
8083 * repo.c (old_args, old_dir, old_main): Const-ify.
8085 2002-08-11 Gabriel Dos Reis <gdr@nerim.net>
8087 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
8088 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
8089 * optimize.c (maybe_clone_body): Likewise.
8090 * pt.c (tsubst_enum): Likewise.
8091 (lookup_template_class): Likewise.
8092 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
8094 2002-08-10 Neil Booth <neil@daikokuya.co.uk>
8096 * lang-specs.h: Remove -ansi.
8098 2002-08-10 Nathan Sidwell <nathan@codesourcery.com>
8100 * tree.c (maybe_dummy_object): Replace // with /* */
8102 2002-08-09 Mark Mitchell <mark@codesourcery.com>
8104 * call.c (standard_conversion): Use build_ptrmem_type.
8105 * cp-tree.h (build_ptrmem_type): New function.
8106 (adjust_result_of_qualified_name_lookup): Likewise.
8107 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
8108 static data members.
8109 (build_ptrmem_type): New function.
8110 (grokdeclarator): Do not use build_offset_type when encountering a
8112 * parse.y (parse_finish_call_expr): Use
8113 adjust_result_of_qualified_name_lookup.
8114 * search.c (adjust_result_of_qualified_name_lookup): New function.
8115 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
8116 accessing OFFSET_TYPEs directly.
8118 2002-08-08 Mike Stump <mrs@apple.com>
8120 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
8121 (type_decays_to): Likewise.
8122 * class.c (find_final_overrider): Likewise.
8123 (maybe_note_name_used_in_class): Likewise.
8124 * decl.c (current_tmpl_spec_kind): Likewise.
8125 (add_binding): Likewise.
8126 (push_class_binding): Likewise.
8127 (duplicate_decls): Likewise.
8128 (layout_var_decl): Likewise.
8129 (grokfndecl): Likewise.
8130 (grokdeclarator): Likewise.
8131 (check_default_argument): Likewise.
8132 * decl2.c (handle_class_head): Likewise.
8133 * error.c (dump_template_decl): Likewise.
8134 * init.c (build_offset_ref): Likewise.
8135 * pt.c (check_specialization_scope): Likewise.
8136 (determine_specialization): Likewise.
8137 (check_explicit_specialization): Likewise.
8138 (maybe_check_template_type): Likewise.
8139 (process_partial_specialization): Likewise.
8140 (check_default_tmpl_args): Likewise.
8141 (push_template_decl_real): Likewise.
8142 (convert_template_argument): Likewise.
8143 (try_class_unification): Likewise.
8144 (get_bindings_real): Likewise.
8145 (do_decl_instantiation): Likewise.
8146 * semantics.c (begin_function_definition): Likewise.
8147 (finish_member_declaration): Likewise.
8148 (check_multiple_declarators): Likewise.
8149 * typeck.c (comp_array_types): Likewise.
8150 (comptypes): Likewise.
8151 (expr_sizeof): Likewise.
8152 (build_binary_op): Likewise.
8153 (dubious_conversion_warnings): Likewise.
8154 (check_return_expr): Likewise.
8156 2002-08-08 Mark Mitchell <mark@codesourcery.com>
8158 * typeck.c (build_class_member_access_expr): Do not return
8159 error_mark_node when no error has occurred.
8161 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8163 * typeck.c (build_component_addr): Remove.
8164 (build_unary_op): Just check it's not a bitfield, and then build
8167 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8169 * class.c (convert_to_base): Correct check for error_mark_node.
8170 (create_vtable_ptr): Remove unused VFUNS_P parm.
8172 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8174 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
8176 2002-08-07 Mark Mitchell <mark@codesourcery.com>
8178 Rework build_component_ref.
8179 * call.c (build_vfield_ref): Do not go through build_component_ref.
8180 (build_field_call): Use build_class_member_access_expr.
8181 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
8182 (build_object_call): Likewise.
8183 * class.c (convert_to_base): New function.
8184 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
8185 (instantiate_type): Handle BASELINKs.
8186 * cp-tree.def (BASELINK): New tree code.
8187 * cp-tree.h (BASELINK_P): Reimplement.
8188 (SET_BASELINK_P): Remove.
8189 (BASELINK_BINFO): Reimplement.
8190 (BASELINK_FUNCTIONS): Likewise.
8191 (BASELINK_ACCESS_BINFO): Likewise.
8192 (BASELINK_OPTYPE): Likewise.
8193 (convert_to_base): New function.
8195 (build_object_ref): Remove.
8196 (build_component_ref_1): Likewise.
8197 (build_component_ref): Likewise.
8198 (build_x_component_ref): Likewise.
8199 (build_class_member_access_expr): New function.
8200 (finish_class_member_access_expr): Likewise.
8201 (build_ptrmemfunc_access_expr): Likewise.
8202 * decl.c (grokdeclarator): Handle BASELINKs.
8203 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
8204 finish_class_member_access_expr.
8205 (arg_assoc): Handle BASELINKs.
8206 (do_class_using_decl): Likewise.
8207 * error.c (dump_decl): Likewise.
8208 (dump_expr): Use build_ptrmemfunc_access_expr.
8209 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
8211 (build_throw): Use BASELINK_FUNCTIONS.
8212 * init.c (perform_member_init): Use
8213 build_class_member_access_expr.
8214 (build_offset_ref): Handle BASELINKs. Use
8215 build_class_member_access_expr.
8216 * method.c (hack_identifier): Likewise.
8217 * parse.y (do_id): Use BASELINK, not TREE_LIST.
8218 (primary): Remove uses of build_object_ref.
8219 * pt.c (lookup_template_function): Handle BASELINKs.
8220 (resolve_overloaded_unification): Likewise.
8221 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
8222 (lookup_field): Use BASELINK, not TREE_LIST.
8223 (lookup_fnfiels): Likewise.
8224 (setup_class_bindings): Likewise.
8225 * semantics.c (finish_object_call_expr): Do not use
8226 build_method_call when we already know what function is being
8228 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
8229 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
8231 (name_p): New function.
8232 * typeck.c (build_object_ref): Remove.
8233 (build_component_ref_1): Likewise.
8234 (build_x_component_ref): Likewise.
8235 (build_class_member_access_expr): New function.
8236 (finish_class_member_access_expr): Likewise.
8237 (build_ptrmemfunc_access_expr): Likewise.
8238 (get_member_function_from_ptrfunc): Use
8239 build_ptrmemfunc_access_expr.
8240 (build_binary_op): Likewise.
8241 (build_unary_op): Likewise.
8242 (build_ptrmemfunc): Likewise.
8243 (pfn_from_ptrmemfunc): Likewise.
8244 * typeck2.c (build_m_component_ref): Adjust comment.
8246 2002-08-07 Neil Booth <neil@daikokuya.co.uk>
8248 * Make-lang.in (CXX_C_OBJS): Update.
8249 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
8250 * cp-tree.h (cxx_decode_option): Remove.
8251 * decl2.c (compare_options, lang_f_options, unsupported_options,
8252 cxx_decode_option): Remove.
8254 2002-08-06 Gabriel Dos Reis <gdr@nerim.net>
8256 * typeck.c (build_x_unary_op): Handle pointer-to-member.
8258 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
8260 * class.c: Don't include obstack.h.
8262 * decl2.c: Delete bogus comment.
8263 * error.c: Don't include obstack.h.
8264 * except.c: Likewise.
8265 (dump_type): Correct comment.
8266 * method.c: Don't include obstack.h.
8269 2002-08-04 Gabriel Dos Reis <gdr@nerim.net>
8272 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
8273 expressions to pointer-to-data-member of pointer-to-member-functions.
8275 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
8277 * cvt.c (ocp_convert): Delete obsolete code.
8278 * parse.y (permanent_obstack): Delete declaration.
8279 * pt.c (permanent_obstack): Delete declaration.
8280 * repo.c (permanent_obstack): Delete declaration.
8281 (open_repo_file): Use xmalloc instead of permanent_obstack.
8282 (init_repo): Use xstrdup instead of permanent_obstack.
8284 2002-08-04 Nathan Sidwell <nathan@codesourcery.com>
8286 * cp-tree.h (VF_DERIVED_VALUE): Remove.
8287 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
8289 2002-08-03 Nathan Sidwell <nathan@codesourcery.com>
8292 C++ ABI change - vfunc ordering.
8293 * class.c (add_virtual_function): Remove.
8294 (dfs_modify_all_vtables): Take list of all declared
8295 virtuals. Assign all that are not in primary base.
8296 (check_for_override): Adjust comments.
8297 (create_vtable_ptr): Take single list of virtuals. Build chain
8298 of declared virtuals here.
8299 (layout_class_type): Take single list of virtuals. Adjust.
8300 (finish_struct_1): Keep virtuals on single list. Adjust.
8302 2002-08-02 Mark Mitchell <mark@codesourcery.com>
8304 * init.c (build_member_call): Use build_new_method_call, not
8307 2002-08-02 Krister Walfridsson <cato@df.lth.se>
8309 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
8311 2002-08-02 Mark Mitchell <mark@codesourcery.com>
8313 * call.c (build_method_call): Issue a more helpful error message
8314 about ambiguous method names.
8316 2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
8318 * tree.c (build_shared_int_cst): Make cache file scope, and
8321 2002-08-02 Jason Merrill <jason@redhat.com>
8323 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
8324 (cp_expr_size): New fn.
8325 * call.c (build_over_call): Lose empty class hackery.
8326 (convert_arg_to_ellipsis): Promote non-POD warning to error.
8327 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
8329 * semantics.c (expand_body): Do tree optimization in the function
8332 2002-08-01 Neil Booth <neil@daikokuya.co.uk>
8334 * cp-tree.h: Move all warning and flag declarations to c-common.h.
8335 * decl.c: Move all warning and flag variables to c-common.c.
8336 * decl2.c: Move all warning and flag variables to c-common.c.
8337 * lex.c (flag_digraphs): Remove.
8338 (warn_traditional): Now in c-common.c.
8340 2002-07-31 Mark Mitchell <mark@codesourcery.com>
8342 * call.c (build_field_call): Do not look up the field by name.
8343 (build_method_call): Simplify.
8344 (struct z_candidate): Add access_path and conversion_path. Remove
8346 (convert_class_to_reference): Adjust use of
8347 add_function_candidate.
8348 (add_candidate): Add conversion_path argument.
8349 (add_function_candidate): Use it.
8350 (add_conv_dndidate): Likewise.
8351 (build_builtin_candidate): Likewise.
8352 (add_template_candidate_real): Add conversion_path argument.
8353 (add_template_conv_candidate): Likewise.
8354 (add_template_candidate): Likewise.
8355 (build_user_type_conversion_1): Use it.
8356 (build_new_function_call): Remove name lookup code. Adjust use of
8357 add_template_candidate and add_function_candidate.
8358 (build_new_op): Likewise.
8359 (convert_like_real): Use build_special_member_call.
8360 (build_over_call): Use cand->conversion_path.
8361 (build_special_member_call): New method.
8362 (build_new_method_call): Remove name lookup code.
8363 * cp-tree.def (OFFSET_REF): Update documentation.
8364 (TEMPLATE_ID_EXPR): Likewise.
8365 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
8366 (BASELINK_OPTYPE): Likewise.
8367 (build_new_method_call): Adjust prototype.
8368 (build_special_member_call): New method.
8369 (build_baselink): New method.
8370 (build_offset_ref_call_from_tree): Likewise.
8371 (build_call_from_tree): Likewise.
8372 (finish_qualified_call_expr): Remove.
8373 (finish_call_expr): Adjust prototype.
8374 (build_x_function_call): Remove.
8375 * cvt.c (ocp_convert): Use build_special_member_call.
8376 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
8377 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
8379 (build_offset_ref_call_from_tree): New function.
8380 (build_call_from_tree): Likewise.
8381 * init.c (expand_cleanup): Use build_special_member_call.
8382 (expand_default_init): Likewise.
8383 (build_member_call): Use finish_call_expr.
8384 (build_new_1): Use build_special_member_call.
8385 (push_base_cleanups): Likewise.
8386 * method.c (do_build_assign_ref): Likewise.
8387 * parse.y (template_id): Do not pass a COMPONENT_REF to
8388 lookup_template_function.
8389 (primary): Use parse_finish_call_epxr, not finish_call_expr.
8390 (parse_finish_call_expr): New function.
8391 * pt.c (lookup_template_function): Add assertions.
8392 * search.c (lookup_base): Allow T to be a binfo.
8393 (build_baselink): New function.
8394 (lookup_member): Use it.
8395 * semantics.c (finish_call_expr): Do not do name lookup.
8396 (finish_object_call_expr): Remove #if 0'd code.
8397 (finish_qualified_call_expr): Remove.
8398 * typeck.c (build_x_function_call): Remove.
8399 (build_static_case): Use build_special_member_call.
8400 * typeck2.c (build_functional_cast): Likewise.
8402 2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
8404 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
8406 2002-07-30 Gabriel Dos Reis <gdr@nerim.net>
8408 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
8410 2002-07-30 Nathan Sidwell <nathan@codesourcery.com>
8412 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
8415 2002-07-29 Alan Modra <amodra@bigpond.net.au>
8417 * cp-tree.h: Comment typo fix.
8419 2002-07-29 Richard Earnshaw <rearnsha@arm.com>
8421 * spew.c (space_for_token): Allocate zeroed memory for a new token
8424 2002-07-27 Roger Sayle <roger@eyesopen.com>
8426 * decl.c (builtin_function_1): No need to explicitly mark
8427 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
8429 2002-07-27 Roger Sayle <roger@eyesopen.com>
8431 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
8433 2002-07-26 Jason Merrill <jason@redhat.com>
8435 * call.c (build_over_call): Likewise.
8436 (cp_convert_parm_for_inlining): New fn.
8437 (convert_for_arg_passing): New fn.
8438 (convert_default_arg, build_over_call): Use it.
8439 (type_passed_as): New fn.
8440 * pt.c (tsubst_decl): Use it.
8441 * decl2.c (cp_build_parm_decl): New fn.
8442 (build_artificial_parm): Use it.
8443 (start_static_storage_duration_function): Likewise.
8444 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
8445 (grokparms): Don't mess with DECL_ARG_TYPE.
8446 * typeck.c (convert_arguments): Use convert_for_arg_passing.
8447 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
8449 * cp-tree.h: Declare new fns.
8451 2002-07-26 Neil Booth <neil@daikokuya.co.uk>
8453 * cp-tree.h (flag_operator_names): Remove.
8454 * decl2.c (flag_operator_names): Remove.
8455 (lang_f_options): Remove operator-names.
8456 * lex.c (D_OPNAME): Remove.
8457 (reswords): Remove operator names.
8458 (rid_to_yy): Remove operator names.
8459 (init_reswords): No need to handle D_OPNAME.
8460 * spew.c (read_process_identifier): There are no operator
8463 2002-07-26 Jason Merrill <jason@redhat.com>
8465 * dump.c (cp_dump_tree): Call c_dump_tree.
8466 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
8468 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
8470 * error.c (print_whitespace): Remove.
8471 * g++spec.c (LIBUNWIND): Move.
8472 * mangle.c (mangled_position, write_signed_number): Remove.
8474 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
8476 * decl2.c (cxx_decode_option): Similarly.
8478 2002-07-25 Gabriel Dos Reis <gdr@nerim.net>
8480 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
8481 (cxx_sizeof_or_alignof_type): Take a third argument.
8482 (cxx_sizeof): Adjust definition.
8483 (cxx_alignof): Likewise.
8484 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
8485 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
8487 (c_sizeof_nowarn): Remove definition.
8488 (build_unary_op): Use cxx_sizeof_nowarn.
8490 2002-07-24 Geoffrey Keating <geoffk@redhat.com>
8492 * tree.c (cp_build_qualified_type_real): When copying
8493 pointer-to-method types, unshare the record that holds
8494 the cached pointer-to-member-function type.
8496 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
8498 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
8500 2002-07-23 Gabriel Dos Reis <gdr@nerim.net>
8503 * typeck.c (cxx_sizeof_or_alignof_type): New function.
8504 (c_sizeof): Remove definition.
8505 (expr_sizeof): Use cxx_sizeof.
8506 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
8507 * decl.c (finish_destructor_body): Use cxx_sizeof.
8508 * semantics.c (finish_alignof): Likewise.
8509 (finish_alignof): Use cxx_alignof.
8510 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
8511 (cxx_sizeof_or_alignof_type): Declare.
8512 (my_friendly_assert): Move to ../c-common.h.
8514 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
8516 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
8518 2002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8520 PR c++/7347, c++/7348
8521 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
8522 * decl.c (make_typename_type): Use it.
8523 (make_unbound_class_template): Likewise.
8524 (lookup_name_real): Don't call type_access_control if scope is
8525 template parameter dependent.
8526 * parse.y (template_arg): Call make_unbound_class_template with
8528 (nest_name_specifier): Call make_typename_type with tf_parsing set.
8529 (typename_sub0): Likewise.
8530 (typename_sub1): Likewise.
8531 (instantiate_decl): Push class scope.
8532 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
8533 for both static variable and member function template.
8534 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
8536 * search.c (type_access_control): Do type access for TEMPLATE_DECL
8539 2002-07-20 Roger Sayle <roger@eyesopen.com>
8541 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
8542 test by using positive_option. Make whitespace consistent.
8544 2002-07-20 Gabriel Dos Reis <gdr@nerim.net>
8546 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
8547 members with 'locus'. Adjust use throughout.
8548 (struct feed): Likewise.
8549 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
8551 (snarf_defarg): Use error(), not error_with_file_and_line().
8553 2002-07-19 Chris Demetriou <cgd@broadcom.com>
8555 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
8556 cpp_options is included.
8558 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8560 PR c++/2862, c++/2863
8561 * pt.c (determine_specialization): Compare the length of
8562 TYPE_ARG_TYPES. Tidy.
8564 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8567 * decl.c (duplicate_decls): Don't propagate inlining parameters from
8568 olddecl to newdecl when newdecl is a specialization of the
8569 instantiation olddecl.
8571 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8573 PR c++/4802, c++/5387
8574 * decl.c (make_typename_type): Use enforce_access.
8576 2002-07-17 Scott Snyder <snyder@fnal.gov>
8579 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
8581 2002-07-12 Mark Mitchell <mark@codesourcery.com>
8583 * class.c (add_method): Correct handling of conversion operators.
8585 2002-07-11 Mark Mitchell <mark@codesourcery.com>
8588 * class.c (add_method): Simplify.
8590 2002-07-11 Jason Merrill <jason@redhat.com>
8593 * tree.c (cp_copy_res_decl_for_inlining): Also copy
8596 2002-07-10 Graham Stott <graham.stott@btinternet.com>
8598 * pt.c (template_parm_this_level_p, push_template_decl_real):
8599 Pass depth as int pointer.
8601 2002-07-11 Tim Josling <tej@melbpc.org.au>
8603 Remove front end hard coding from gengtype.c.
8605 * config-lang.in (gtfiles): Add files needed for this front end.
8607 2002-07-10 Mark Mitchell <mark@codesourcery.com>
8609 * cp-tree.h (unqualified_name_lookup_error): Declare it.
8610 (begin_function_definition): Adjust prototype.
8611 * lex.c (unqualified_name_lookup_error): New function, split out
8613 (do_identifier): ... here.
8614 * parse.y (parse_begin_function_definition): New function.
8616 * semantics.c (begin_function_definition): Accept decl-specifiers
8617 and attributes as separate parameters.
8619 2002-07-10 Jason Merrill <jason@redhat.com>
8622 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
8623 modifying the old one.
8625 2002-07-09 Mark Mitchell <mark@codesourcery.com>
8627 * cp-tree.h (constructor_name_p): Declare it.
8628 (check_template_template_default_arg): Likewise.
8629 * class.c (handle_using_decl): Use constructor_name_p.
8630 * decl.c (grokdeclarator): Likewise.
8631 * decl2.c (constructor_name_p): Define it.
8632 * init.c (build_member_call): Use constructor_name_p.
8633 * parse.y (template_parm): Use check_template_template_default_arg.
8634 * pt.c (check_explicit_specialization): Use constructor_name_p.
8635 * semantics.c (check_template_template_default_arg): New function.
8637 2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8639 * pt.c (can_complete_type_without_circularity): Add static to
8640 function definition.
8642 2002-07-08 Mark Mitchell <mark@codesourcery.com>
8644 * cp-tree.h (have_extern_spec): Declare it
8645 * decl.c (have_extern_spec): Define it.
8646 (start_decl): Eliminate use of used_extern_spec.
8647 (start_function): Likewise.
8648 * parse.y (have_extern_spec): Remove declaration.
8649 (used_extern_spec): Likewise.
8650 (frob_specs): Eliminate use of used_extern_spec.
8651 (.hush_warning): Likewise.
8653 2002-07-07 Mark Mitchell <mark@codesourcery.com>
8655 * Make-lang.in (cp/parse.o): Depend on decl.h.
8656 * cp-tree.h (do_decl_instantiation): Change prototype.
8657 * parse.y: Include decl.h.
8658 (parse_decl_instantiation): New function.
8659 (explicit_instantiation): Use it.
8660 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
8663 2002-07-07 Roger Sayle <roger@eyesopen.com>
8665 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
8666 constructor and destructor tests when passed a TEMPLATE_DECL.
8668 2002-07-05 Jason Merrill <jason@redhat.com>
8670 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
8673 PR optimization/7145
8674 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
8676 2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
8678 Repair damage on weak-impared targets caused by my previous patch.
8679 * cp-tree.h (import_export_tinfo): Add parameter.
8680 * decl2.c (import_export_tinfo): Add parameter, post adjust
8682 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
8683 import_export_tinfo.
8685 2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8688 * init.c (build_aggr_init): Remove qualifiers of init before calling
8690 (build_vec_init): Flatten multi-dimensional array during cleanup.
8691 (build_vec_delete_1): Abort if the type of each element is array.
8693 2002-07-03 Graham Stott <graham.stott@btinternet.com>
8695 * pt.c (instantiate_class_template): Fix typo.
8697 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8699 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
8700 by CVS conflict in my last patch.
8702 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8705 * pt.c (can_complete_type_without_circularity): New function.
8706 (instantiate_class_template): Use it.
8707 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
8708 message due to incomplete fields.
8710 2002-07-01 Mark Mitchell <mark@codesourcery.com>
8713 * mangle.c (write_expression): Add mangling for sizeof when
8715 * operators.def: Remove stale comment.
8717 2002-06-30 Nathan Sidwell <nathan@codesourcery.com>
8719 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
8720 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
8721 (tinfo_decl_type): Replace with ...
8722 (type_info_ptr_type): ... this.
8723 (import_export_tinfo): Declare.
8724 (tinfo_decl_p): Rename to ...
8725 (unemitted_tinfo_decl_p): ... this.
8726 * decl2.c (import_export_decl): Break out tinfo handling into ...
8727 (import_export_tinfo): ... here. New function.
8728 (finish_file): Adjust.
8729 * rtti.c (TINFO_REAL_NAME): New macro.
8730 (init_rtti_processing): Create the tinfo types.
8731 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
8732 (get_tinfo_decl): Adjust.
8733 (get_tinfo_ptr): New function.
8734 (get_type_id): Use it.
8735 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
8736 (ptr_initializer): Use get_tinfo_ptr.
8737 (ptm_initializer): Likewise.
8738 (synthesize_tinfo_var): Break into ...
8739 (get_pseudo_ti_init): ... this. Just create the initializer.
8740 (get_pseudo_ti_desc): .. and this.
8741 (create_real_tinfo_var): Remove.
8742 (create_pseudo_type_info): Don't create the vtable decl here.
8743 (get_vmi_pseudo_type_info): Remove.
8744 (create_tinfo_types): Adjust.
8745 (tinfo_decl_p): Rename to ...
8746 (unemitted_tinfo_decl_p): ... here. Adjust.
8747 (emit_tinfo_decl): Adjust. Create the initializer.
8749 2002-06-27 Mark Mitchell <mark@codesourcery.com>
8752 * pt.c (tsubst_friend_class): Substitute into the context of the
8753 friend before using it.
8755 2002-06-26 Mark Mitchell <mark@codesourcery.com>
8757 * cp-tree.h (xref_tag): Change prototype.
8758 (handle_class_head): Likewise.
8759 (build_x_component_ref): Likewise.
8760 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
8761 (xref_tag): Take attributes as a separate parameter.
8762 (xref_tag_from_type): Adjust call to xref_tag.
8763 * decl2.c (build_expr_from_tree): Adjust call to
8764 build_x_component_ref.
8765 (handle_class_head): Take attributes as a separate parameter.
8766 * parse.y (parse_xref_tag): New function.
8767 (parse_handle_class_head): Likewise.
8768 (primary): Use parse_xref_tag.
8769 (class_head_decl): Use parse_handle_class_head.
8770 (class_head_defn): Likewise.
8771 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
8772 (build_dynamic_cast_1): Likewise.
8773 (create_pseudo_type_info): Likewise.
8774 (emit_support_tinfos): Likewise.
8775 * typeck.c (build_object_ref): Adjust call to
8776 build_x_component_ref.
8777 (build_x_component_ref): Remove protect parameter.
8779 2002-06-25 Mark Mitchell <mark@codesourcery.com>
8781 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
8782 * class.c (handle_using_decl): Likewise.
8783 (instantiate_type): Likewise.
8784 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
8785 (xref_basetypes): Change prototype.
8786 (begin_mem_initializers): New function.
8787 (get_overloaded_fn): Likewise.
8788 * decl.c (xref_basetypes): Simplify.
8789 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
8790 * init.c (build_offset_ref): Likewise.
8791 * parse.y (base_init): Use begin_mem_initializers().
8792 (structsp): Adjust call to xref_basetypes.
8793 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
8794 (instantiate_class_template): Adjust call to xref_basetypes.
8795 * semantics.c (begin_mem_initializers): New function.
8796 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
8797 (really_overloaded_fn): Likewise.
8798 (get_overloaded_fn): New function.'
8799 (get_first_fn): USe BASELINK_FUNCTIONS.
8801 2002-06-24 Mark Mitchell <mark@codesourcery.com>
8803 * cp-tree.h (SCALAR_TYPE_P): New macro.
8804 (check_for_out_of_scope_variable): New function.
8805 (at_class_scope_p): Likewise.
8806 (finish_fname): Likewise.
8807 * class.c (finish_struct): Use at_function_scope_p.
8808 * decl.c (check_for_out_of_scope_variable): New function, split
8809 out from do_identifier.
8810 (finish_enum): Use at_function_scope_p.
8811 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
8812 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
8813 (primary): Use at_function_scope_p.
8814 * search.c (at_class_scope_p): New function.
8815 * semantics.c (finish_fname): Likewise.
8816 (check_multiple_declarators): Use at_function_scope_p.
8818 2002-06-23 Mark Mitchell <mark@codesourcery.com>
8820 * parse.y (parse_scoped_id): New function.
8822 * cp-tree.h (do_scoped_id): Adjust declaration.
8823 * lex.c (do_scoped_id): Remove call to yylex.
8824 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
8825 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
8826 expanding it inline.
8828 2002-06-23 Matt Thomas <matt@3am-software.com>
8830 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
8833 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8835 * mangle.c (integer_type_codes): Const-ify.
8837 2002-06-20 Richard Henderson <rth@redhat.com>
8840 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
8841 Call put_var_into_stack.
8843 2002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8845 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
8846 array size calculation.
8848 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8851 * pt.c (tsubst_expr): Handle FILE_STMT.
8853 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8856 * pt.c (lookup_template_class): Don't build complete argument of
8857 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
8860 2002-06-19 Akim Demaille <akim@epita.fr>
8862 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
8864 * spew.c, lex.c: Adjust.
8865 * parse.y (explicit_instantiation): Add empty action to override
8866 the default $$ = $1 where it introduces a type clash.
8868 2002-06-14 Jason Merrill <jason@redhat.com>
8870 * semantics.c (begin_for_stmt): Push the 'for' scope before
8871 adding the FOR_STMT.
8874 * class.c (build_base_field): Set DECL_PACKED.
8875 (layout_class_type): Don't use tail padding of PODs.
8876 * mangle.c (write_unqualified_name): Fix template conversion op
8879 2002-06-16 Richard Henderson <rth@redhat.com>
8882 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
8883 after template instantiation.
8885 2002-06-16 Richard Henderson <rth@redhat.com>
8887 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
8889 2002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
8891 * cp-tree.h (compiler_error): Remove declaration.
8892 * lex.c (compiler_error): Remove definition.
8894 2002-06-14 Steve Ellcey <sje@cup.hp.com>
8896 * g++spec.c (LIBUNWIND): New.
8897 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
8899 2002-06-13 Jessica Han <jessica@cup.hp.com>
8901 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
8902 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
8903 (build_vbase_offset_vtbl_entries): Likewise.
8904 * rtti.c (build_headof): Likewise.
8905 (get_tinfo_decl_dynamic): Likewise.
8906 (create_pseudo_type_info): Likewise.
8908 2002-06-12 Stan Shebs <shebs@apple.com>
8910 * mpw-config.in: Remove file, no longer used.
8911 * mpw-make.sed: Ditto.
8913 2002-06-07 Zack Weinberg <zack@codesourcery.com>
8915 * decl2.c: Update call to cpp_handle_option.
8917 2002-06-07 H.J. Lu (hjl@gnu.org)
8919 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
8921 2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
8923 * error.c (cp_error_at): Fix typo.
8925 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
8927 * error.c (cp_diagnostic_starter): Adjust call.
8928 (maybe_print_instantiation_context): Change prototype to take a
8929 'diagnostic_info *'.
8930 (print_instantiation_full_context): Likewise.
8931 (print_instantiation_partial_context): Likewise.
8932 (cp_diagnostic_starter): Likewise.
8933 (cp_diagnostic_finalizer): Likewise.
8934 (cp_print_error_function): Likewise.
8935 (cp_printer): Take a secondary parameter as a 'text_info *'.
8936 Remove output_state savings. Adjust calls.
8938 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
8940 * pt.c (inline_parm_levels): Mark for GC.
8942 * mangle.c (start_mangling): Allocate G.substitutions here...
8943 (init_mangle): ... rather than here.
8944 (finish_mangling): Clear the varray pointer when done with it.
8945 * spew.c (yylexstring): Don't use VARRAY_FREE.
8946 * search.c (bfs_walk): Don't use VARRAY_FREE.
8947 * decl2.c (pending_statics): Use gengtype to mark.
8948 (deferred_fns): Likewise.
8949 (ssdf_decls): Likewise.
8950 (init_decl2): Delete.
8951 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
8952 (cxx_init_decl_processing): Don't call init_decl2.
8953 (cxx_pop_function_context): Don't use VARRAY_FREE.
8954 * cp-tree.h (struct saved_scope): No need for special marking
8956 (struct language_function): Likewise.
8957 (local_classes): Use gengtype to mark.
8958 (init_decl2): Delete prototype.
8959 * class.c (init_class_processing): Don't use
8960 ggc_add_tree_varray_root.
8961 (build_vtbl_initializer): Don't use VARRAY_FREE.
8963 * decl.c (typename_compare): Don't use same_type_p.
8965 * decl.c: Include hashtab.h instead of hash.h.
8966 (typename_hash): Update to use htab_h.
8967 (typename_compare): Likewise.
8968 (typename_htab): Use gengtype to mark.
8969 (build_typename_type): Update to use htab_h.
8970 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
8972 * Make-lang.in (gt-cp-tree.h): New rule.
8973 (cp/tree.o): Depend on gt-cp-tree.h.
8974 * config-lang.in (gtfiles): Add cp/tree.c.
8975 * tree.c: Include gt-cp-tree.h.
8976 (list_hash_table): Use gengtype to mark.
8977 (init_tree): Use gengtype to mark trees.
8979 * Make-lang.in (cp/decl.o): Add debug.h dependency.
8980 * call.c (struct z_candidate): Use gengtype.
8981 (USER_CONV_CAND): Use WRAPPER_ZC.
8982 (convert_class_to_reference): Use build_zc_wrapper.
8983 (build_type_conversion_1): Likewise.
8984 (build_over_call): Use WRAPPER_ZC.
8985 (add_warning): Use build_zc_wrapper.
8986 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
8987 * cp-tree.h (struct lang_identifier): Use gengtype.
8988 (struct template_parm_index_s): Likewise.
8989 (struct ptrmem_cst): Likewise.
8990 (struct tree_binding): Likewise.
8991 (struct tree_overload): Likewise.
8992 (struct tree_srcloc): Likewise.
8993 (struct tree_wrapper): Likewise. Also modify to have a pointer
8994 to struct z_candidate rather than void.
8995 (enum cp_tree_node_structure_enum): New.
8996 (union lang_tree_node): New.
8997 (cxx_mark_tree): Delete prototype.
8998 (cp_tree_node_structure): New prototype.
8999 (build_ptr_wrapper): Delete prototype.
9000 (build_int_wrapper): Delete prototype.
9001 (build_zc_wrapper): New prototype.
9002 * decl.c: Include debug.h
9003 (cxx_mark_tree): Delete.
9004 (cp_tree_node_structure): New.
9005 * tree.c (build_ptr_wrapper): Delete.
9006 (build_int_wrapper): Delete.
9007 (build_zc_wrapper): New.
9009 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
9010 Correct typo. Patch from k_fukui@highway.ne.jp.
9012 * semantics.c (current_stmt_tree): Update for change to
9013 struct language_function.
9014 (finish_mem_initializers): Likewise.
9015 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
9016 * cp-tree.h (struct language_function): Rename from
9017 cp_language_function. Change all uses.
9018 (cp_function_chain): Don't need to cast.
9020 * class.c (duplicate_tag_error): Reset discriminator.
9021 (check_bases_and_members): Update for data structure changes.
9022 * cp-tree.h (struct lang_id2): Use gengtype.
9023 (flagged_type_tree): Likewise.
9024 (SET_LANG_ID): Use GGC on struct lang_id2.
9025 (struct cp_language_function): Use gengtype. Remove field
9026 'x_vcalls_possible_p'.
9027 (current_vcalls_possible_p): Delete.
9028 (struct lang_type_header): New.
9029 (struct lang_type_class): Rename from struct lang_type. Include
9030 struct lang_type_header.
9031 (struct lang_type_ptrmem): New.
9032 (struct lang_type): New.
9033 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
9034 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
9035 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
9036 (struct lang_decl_flags): Use gengtype. Add discriminators.
9037 (struct lang_decl): Use gengtype. Add and use discriminators.
9038 Update the macros that reference moved fields.
9039 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
9040 (SET_DECL_THUNK_P): Set discriminator too.
9041 (clear_inline_text_obstack): Delete prototype.
9042 (finish_inline_definitions): Delete prototype.
9043 (mark_pending_inlines): Delete prototype.
9044 (lang_check_failed): New prototype.
9045 * decl.c (struct named_label_use_list): Use gengtype.
9046 (struct named_label_list): Likewise.
9047 (mark_binding_level): Delete.
9048 (mark_named_label_lists): Delete.
9049 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
9050 (cxx_init_decl_processing): Use generated marker routine.
9051 (begin_destructor_body): Delete dead set to
9052 current_vcalls_possible_p.
9053 (mark_lang_function): Delete.
9054 (mark_cp_function_context): Delete.
9055 (lang_mark_tree): Use generated marker routines.
9056 * decl2.c (start_objects): Set discriminator when setting
9057 GLOBAL_INIT_PRIORITY.
9058 * lex.c (retrofit_lang_decl): Set discriminators.
9059 (copy_lang_type): Update for changes to lang_type structure.
9060 (cp_make_lang_type): Set discriminator.
9061 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
9062 * search.c: Include ggc.h.
9063 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
9064 (finish_inline_definitions): Delete.
9065 * spew.c (struct token): Use gengtype.
9066 (struct token_chunk): New.
9067 (struct unparsed_text): Use gengtype. Store tokens in chunks.
9068 (struct feed): Use gengtype.
9069 (feed_obstack): Delete.
9070 (feed): Mark as GC root.
9071 (pending_inlines): Mark as GC root.
9072 (pending_inlines_tail): Likewise.
9073 (processing_these_inlines): Likewise.
9074 (token_obstack): Make static.
9075 (first_token): Likewise.
9076 (init_spew): Don't initialize deleted things; use gengtype for roots.
9077 (clear_inline_text_obstack): Delete.
9078 (feed_input): Use GC for struct feed. Update for changes to
9079 struct unparsed_text.
9080 (mark_pending_inlines): Delete.
9081 (next_token): Rename from add_token. Change all callers. Update
9082 for changes to struct unparsed_text.
9083 (space_for_token): New.
9084 (remove_last_token): New.
9085 (alloc_unparsed_text): New.
9086 (snarf_block): Take an unparsed_text. Update for changes to struct
9088 (snarf_method): Update for changes to struct unparsed_text.
9089 (snarf_defarg): Update for changes to struct unparsed_text.
9090 * tree.c (lang_check_failed): New.
9092 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
9093 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
9094 (cp/spew.o): Add dependency on gt-<filename>.h.
9095 (cp/decl2.o): Add dependency on gt-<filename>.h.
9096 (cp/call.o): Add dependency on gt-<filename>.h.
9097 (cp/pt.o): Add dependency on gt-<filename>.h.
9098 (cp/repo.o): Add dependency on gt-<filename>.h.
9099 (cp/parse.o): Add dependency on gt-<filename>.h.
9100 * call.c: Use gengtype for roots.
9101 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
9102 decl2.c parse.y pt.c repo.c spew.c.
9103 * cp-tree.h: Use gengtype for roots.
9104 (struct saved_scope): Use GGC, gengtype.
9105 (cp_parse_init): Delete prototype.
9106 (init_pt): Delete prototype.
9107 * decl.c: Use gengtype for roots.
9108 (mark_saved_scope): Delete.
9109 (cxx_init_decl_processing): Don't call deleted initilisation
9111 (signed_size_zero_node): Delete, unused.
9112 * decl.h: Use gengtype for roots.
9113 * decl2.c: Use gengtype for roots.
9114 * lex.h: Use gengtype for roots.
9115 * parse.y: Use gengtype for roots.
9116 (cp_parse_init): Delete.
9117 * pt.c: Use gengtype for roots.
9119 * repo.c: Use gengtype for roots.
9120 * spew.c: Use gengtype for roots.
9122 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
9123 (cp/decl.o): Add dependency on gtype-cp.h.
9124 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
9125 Include gtype-cp.h. Allow for filename changes.
9127 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
9128 (cp/decl.o): Add cp/gt-decl.h dependency.
9129 * config-lang.in (gtfiles): New.
9130 * tree.h: Rename struct binding_level to struct cp_binding_level.
9131 * decl.c: Rename struct binding_level to struct cp_binding_level.
9132 Include cp/gt-decl.h.
9133 (struct cp_binding_level): Use gengtype.
9134 (make_binding_level): Use GGC on struct cp_binding_level.
9135 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
9136 (cxx_init_decl_processing): Mark free_binding_level as
9139 * decl.c (mark_cp_function_context): Update calling sequence.
9141 * decl.c (start_function): Don't free 'struct
9142 cp_language_function'.
9143 (pop_cp_function_context): Likewise.
9144 (save_function_data): Allocate it using GC.
9145 * semantics.c (genrtl_start_function): Don't free 'struct
9146 cp_language_function'.
9148 2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
9150 * lang-specs.h: Use cpp_debug_options.
9152 2002-05-28 Zack Weinberg <zack@codesourcery.com>
9154 * mangle.c, tree.c: Include real.h.
9155 * Make-lang.in: Update dependency lists.
9157 2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
9159 * lex.c: Don't include c-lex.h.
9160 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
9162 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
9164 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
9166 2002-05-22 Richard Henderson <rth@redhat.com>
9168 * decl.c (obscure_complex_init): Check for VAR_DECL
9169 before using DECL_THREAD_LOCAL.
9171 2002-05-22 Richard Henderson <rth@redhat.com>
9173 * decl.c (check_tag_decl): Handle RID_THREAD.
9174 (obscure_complex_init): Reject run-time init of tls.
9175 (grokvardecl, grokdeclarator): Handle RID_THREAD.
9176 * lex.c (reswords): Add __thread.
9177 (rid_to_yy): Map RID_THREAD to SCSPEC.
9179 2002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
9181 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
9182 * cp-tree.h (cxx_post_options): Kill.
9183 * cp-lex.c (cxx_post_options): Kill.
9185 2002-05-21 Richard Henderson <rth@redhat.com>
9187 * lex.c (rid_to_yy): Add RID_THREAD.
9189 2002-05-21 Alexandre Oliva <aoliva@redhat.com>
9191 * init.c (build_vec_init): Test for trivial copy-assignment when
9192 copy-assigning arrays.
9194 2002-05-20 Andreas Jaeger <aj@suse.de>
9196 * init.c (build_default_init): Remove unused variable.
9198 2002-05-20 Alexandre Oliva <aoliva@redhat.com>
9200 * call.c (any_strictly_viable): New.
9201 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
9203 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9205 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
9207 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9210 * pt.c (do_decl_instantiation): Don't complain explicit
9211 instantiation after explicit specialization.
9212 (do_type_instantiation): Likewise.
9214 2002-05-19 Alexandre Oliva <aoliva@redhat.com>
9216 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
9218 (complete_type_or_else): ... this. Redefined as macro.
9219 (cxx_incomplete_type_diagnostic): Declare.
9220 (cxx_incomplete_type_error): Define as macro.
9221 * init.c (build_delete): Warn about incomplete types other than
9222 void, and use the built-in operator delete for them.
9223 * typeck.c (complete_type_or_diagnostic): Renamed from
9224 complete_type_or_else. Added warn_only argument, passed to...
9225 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
9226 warnings or errors depending on new warn_only argument. Renamed
9228 (cxx_incomplete_type_error): ... this. New implementation in
9229 terms of cxx_incomplete_type_diagnostic.
9231 2002-05-18 Jason Merrill <jason@redhat.com>
9234 * decl2.c (import_export_decl): If we clear
9235 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
9237 2002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9240 * pt.c (verify_class_unification): Don't check if PARM is template
9241 parameter dependent. Simplify.
9242 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
9243 parameter dependent expression.
9245 2002-05-14 Jason Merrill <jason@redhat.com>
9247 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
9249 (synthesize_tinfo_var): Take the public decl.
9250 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
9251 (emit_tinfo_decl): Adjust. Call import_export_decl.
9252 * decl2.c (import_export_decl): Simplify tinfo decl handling.
9254 2002-05-14 Alexandre Oliva <aoliva@redhat.com>
9256 * cp-tree.h (struct lang_type): Added non_zero_init.
9257 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
9258 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
9259 * class.c (check_field_decls): Test non_zero_init.
9260 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
9261 zero-to-NULL conversions.
9262 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
9263 type that needs zero-initialization without zeros.
9264 (check_initializer_decl): Compute zero-initializer for types
9265 that require a non-trivial one.
9266 * init.c (build_forced_zero_init): New function.
9267 (build_default_init): Use it.
9268 * tree.c (zero_init_p): New function.
9269 * typeck2.c (force_store_init_value): New function.
9270 (process_init_constructor): Create non-trivial zero-initializers
9271 for array members and class fields.
9273 2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
9275 * lang-specs.h: Remove redundant -lang-c++.
9277 2002-05-13 Jason Merrill <jason@redhat.com>
9279 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
9280 (fixed_type_or_null): See through reference vars.
9281 (build_base_path): Vtable contents are constant.
9282 * typeck.c (get_member_function_from_ptrfunc): Likewise.
9284 2002-05-12 Jason Merrill <jason@redhat.com>
9286 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
9289 2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
9291 * cp-tree.h (flag_ansi): Remove.
9292 * decl2.c (flag_ansi): Remove.
9293 (cxx_decode_option): Set flag_iso and flag_undef.
9295 2002-05-09 Jason Merrill <jason@redhat.com>
9297 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
9298 Use subtraction rather than a bitmask to get the index.
9299 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
9301 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
9303 2002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
9305 * Make-lang.in (decl2.o): Update.
9306 * cp-tree.h (warn_multichar): Remove.
9307 * decl2.c: Include c-common.h.
9308 (warn_multichar): Remove.
9310 2002-05-03 Jason Merrill <jason@redhat.com>
9312 * tree.c (build_cplus_array_type): Only const and volatile get
9315 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
9317 2002-04-30 Mark Mitchell <mark@codesourcery.com>
9319 ABI change, returning simple classes from functions.
9320 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
9321 TYPE_HAS_TRIVIAL_INIT_REF is false or
9322 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
9324 2002-04-30 Jason Merrill <jason@redhat.com>
9327 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
9328 anonymous class with a typedef if there are attributes.
9330 2002-04-29 Paul Eggert <eggert@twinsun.com>
9332 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
9334 2002-04-29 Jakub Jelinek <jakub@redhat.com>
9337 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
9340 2002-04-29 Mark Mitchell <mark@codesourcery.com>
9343 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
9344 enter that scope before name lookup.
9347 * method.c (do_build_copy_constructor): Avoid building
9348 cv-qualified reference types.
9350 2002-04-29 Nathan Sidwell <nathan@codesourcery.com>
9353 * decl.c (grok_op_properties): Assignment ops don't have to return
9354 by value. operator% should.
9356 2002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
9359 * decl.c (duplicate_decls): Call merge_weak.
9361 2002-04-26 Richard Henderson <rth@redhat.com>
9363 * parse.y (malloced_yyss, malloced_yyvs): New.
9364 (yyoverflow): Re-add. Set them.
9365 (free_parser_stacks): New.
9367 2002-04-26 Mark Mitchell <mark@codesourcery.com>
9370 * method.c (do_build_assign_ref): Pass a derivation to
9371 build_method_call when calling base class assignment operators.
9373 2002-04-26 Richard Henderson <rth@redhat.com>
9375 * parse.y (yyoverflow): Revert.
9377 2002-04-26 Richard Henderson <rth@redhat.com>
9380 * parse.y (string): Remove. Update all uses to use STRING
9381 instead, and not call combine_strings.
9382 * rtti.c (tinfo_name): Use fix_string_type.
9383 * semantics.c (finish_asm_stmt): Don't call combine_strings.
9384 * spew.c (yylexstring): New.
9385 (read_token): Use it.
9387 2002-04-25 Richard Henderson <rth@redhat.com>
9390 * parse.y (yyoverflow): New.
9392 2002-04-25 Jason Merrill <jason@redhat.com>
9395 * search.c (check_final_overrider): No longer static.
9396 * class.c (update_vtable_entry_for_fn): Call it.
9397 * cp-tree.h: Adjust.
9399 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
9401 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
9402 * cp-tree.h (cxx_set_yydebug): Die.
9403 * lex.c (YYDEBUG): Get from c-lex.h.
9404 (cxx_set_yydebug): Remove.
9405 * parse.y: Include c-lex.h.
9406 (YYDEBUG): Get from c-lex.h.
9408 2002-04-24 Mark Mitchell <mark@codesourcery.com>
9411 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
9414 2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
9416 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
9417 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
9419 * cp-tree.h (cp_attribute_table): Rename.
9420 * decl.c (lang_attribute_table): Remove declaration.
9421 (cxx_init_decl_processing): Don't set it.
9422 * tree.c (cp_attribute_table): Rename.
9424 2002-04-24 Jason Merrill <jason@redhat.com>
9427 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
9428 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
9429 The pedwarn for array assignment is now unconditional.
9430 * tree.c (build_cplus_array_type_1): Still process simple array types
9431 normally in templates.
9434 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
9437 2002-04-23 Jakub Jelinek <jakub@redhat.com>
9439 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
9440 node with attributes.
9442 2002-2-23 David O'Brien <obrien@FreeBSD.org>
9444 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
9445 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
9447 2002-04-23 Mark Mitchell <mark@codesourcery.com>
9450 * pt.c (tsubst_friend_class): Handle templates with explicit
9454 * typeck.c (merge_types): Remember the cv-qualification of pointer
9455 types when merging them.
9457 2002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
9459 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
9460 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
9461 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
9462 cxx_mark_function_context): New.
9463 * decl.c (push_cp_function_context, pop_cp_function_context,
9464 mark_cp_function_context): Rename for consistency.
9465 (cxx_init_decl_processing): Don't set old hooks.
9467 2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
9469 * call.c (convert_type_from_ellipsis): Rename, update.
9470 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
9471 * cp-tree.h (convert_type_from_ellipsis): Rename.
9472 * decl.c (cxx_init_decl_processing): Don't set hook.
9474 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
9476 * call.c (build_new_method_call): Update.
9477 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
9478 * cp-tree.h (cxx_incomplete_type_error): New.
9479 * decl.c (grokdeclarator, grokparms): Update.
9480 * decl2.c (check_classfn): Update.
9481 * pt.c (tsubst): Update.
9482 * typeck.c (complete_type_or_else, expr_sizeof,
9483 decay_conversion): Update.
9484 * typeck2.c (incomplete_type_error): Rename.
9485 (add_exception_specifier): Update.
9487 2002-04-18 Jason Merrill <jason@redhat.com>
9490 * search.c (setup_class_bindings): A class template qualifies as a
9493 2002-04-17 Jakub Jelinek <jakub@redhat.com>
9496 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
9499 2002-04-16 Mark Mitchell <mark@codesourcery.com>
9501 * init.c (begin_init_stmts): Remove commented out code.
9502 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
9503 * semantics.c (begin_gobal_stmt_expr): Adjust call to
9504 expand_start_stmt_expr.
9506 2002-04-15 Mark Mitchell <mark@codesourcery.com>
9508 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
9509 dso_handle itself, to __cxa_atexit.
9511 2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9513 * error.c (cxx_print_error_function): Adjust call to macros.
9515 2002-04-14 Jakub Jelinek <jakub@redhat.com>
9517 * class.c (layout_virtual_bases): Do all dsize computation on trees.
9519 2002-04-14 Jason Merrill <jason@redhat.com>
9521 * typeck.c (get_member_function_from_ptrfunc): Don't do
9522 gratuitious division and multiplication on
9523 ptrmemfunc_vbit_in_delta targets.
9525 2002-04-12 Mark Mitchell <mark@codesourcery.com>
9528 * semantics.c (finish_expr_stmt): Remember the type of the
9529 expression before any conversions are performed.
9531 2002-04-12 Mark Mitchell <mark@codesourcery.com>
9534 * call.c (add_template_candidate_real): Do not treat member
9535 templates as copy constructors.
9537 2002-04-12 Mark Mitchell <mark@codesourcery.com>
9539 * decl.c (duplicate_decls): Do not copy the RTL for a variable
9540 declaration if the old variable had an incomplete type and the new
9542 (complete_vars): Do not call layout_decl for completed variables.
9544 2002-04-12 Richard Sandiford <rsandifo@redhat.com>
9546 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
9547 with an explicit one.
9548 (follow_tag_typedef): New.
9549 (lookup_tag): Use it to extract the tag of an explicit typedef.
9550 (xref_tag): Likewise.
9552 2002-04-11 Andrew Haley <aph@redhat.com>
9554 * typeck.c (type_after_usual_arithmetic_conversions):
9555 If two types have the same variant, return immediately.
9556 When two floating-point operands are the same precision:
9557 convert to float if one of the operands is float;
9558 if neither operand is one of the standard types, return the type
9559 of the first operand.
9561 2002-04-10 Nathan Sidwell <nathan@codesourcery.com>
9564 * decl.c (make_typename_type): Remove implicit typenameness.
9566 2002-04-09 Jason Merrill <jason@redhat.com>
9568 PR optimization/6189
9569 * semantics.c (genrtl_start_function): Don't free
9570 DECL_SAVED_FUNCTION_DATA for inline functions.
9572 * init.c (build_member_call): For now, don't convert to
9573 intermediate base if it would cause an error.
9575 2002-04-08 Paolo Carlini <pcarlini@unitus.it>
9577 * parse.y (namespace_qualifier, maybe_identifier,
9578 begin_explicit_instantiation, end_explicit_instantiation,
9579 apparent_template_type, .finish_template_type,
9580 do_id, maybe_init, defarg_again, component_decl_1):
9581 Add ending ';', in accordance with POSIX.
9583 2002-04-06 Mark Mitchell <mark@codesourcery.com>
9586 * class.c (layout_class_type): Remember incomplete static
9588 (finish_struct_1): Call complete_vars, not
9589 hack_incomplete_structures.
9590 * cp-tree.h (hack_incomplete_structures): Rename to ...
9591 (complete_vars): ... this.
9592 (struct saved_scope): Remove incomplete.
9593 (namespace_scope_incomplete): Remove.
9594 * decl.c (struct binding_level): Remove incomplete.
9595 (incomplete_vars): New variable.
9596 (mark_binding_level): Don't mark incomplete.
9597 (print_binding_level): Don't print it.
9598 (mark_saved_scope): Don't mark incomplete.
9599 (pushdecl): Use maybe_register_incopmlete_var.
9600 (cxx_init_decl_processing): Register incomplete_vars for GC.
9601 (start_decl_1): Clarify error message.
9602 (hack_incomplete_vars): Remove.
9603 (maybe_register_incomplete_var): New function.
9604 (complete_vars): Likewise.
9606 2002-04-06 Jason Merrill <jason@redhat.com>
9609 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
9610 set before checking it.
9613 * init.c (build_member_call): Use build_scoped_ref.
9614 (resolve_offset_ref): Likewise.
9615 * call.c (build_scoped_method_call): Likewise.
9616 * tree.c (maybe_dummy_object): Kludge around current_class_type being
9618 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
9619 * cp-tree.h: Adjust.
9621 * init.c (push_base_cleanups): Just use build_scoped_method_call.
9624 * method.c (implicitly_declare_fn): Pass unqualified type to
9625 synthesize_exception_spec.
9627 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
9629 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
9630 * cvt.c: Update comment.
9631 * init.c (expand_cleanup_for_base): Update.
9632 * semantics.c (finish_parenthesized_expr): Update.
9633 * typeck.c (cp_truthvalue_conversion): Update.
9635 2002-04-04 Jason Merrill <jason@redhat.com>
9637 * semantics.c (finish_eh_cleanup): New fn.
9638 * cp-tree.h: Add prototype.
9639 * init.c (perform_member_init, expand_cleanup_for_base): Use
9641 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
9642 * cp-tree.h: Remove references.
9643 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
9644 * dump.c (cp_dump_tree): Likewise.
9645 * pt.c (tsubst_expr): Likewise.
9646 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
9647 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
9648 * tree.c (cp_statement_code_p): Likewise.
9650 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
9653 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
9657 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
9659 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
9661 2002-04-03 Richard Henderson <rth@redhat.com>
9663 * cp-lang.c (cxx_warn_unused_global_decl): New.
9664 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
9666 2002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
9668 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
9669 * tree.c (init_tree): Don't set hook.
9671 2002-04-03 Roger Sayle <roger@eyesopen.com>
9674 * decl.c (duplicate_decls): Don't mess with assembler names when
9675 redeclaring builtin functions as static.
9677 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9679 * call.c (build_addr_func): Update.
9680 * class.c (resolve_address_of_overloaded_function): Update.
9681 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
9682 * cp-tree.h (cxx_mark_addressable): New.
9683 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
9684 * decl2.c (build_cleanup): Update.
9685 * except.c (build_throw): Update.
9686 * init.c (resolve_offset_ref): Update.
9687 * pt.c (convert_nontype_argument): Update.
9688 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
9689 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
9690 unary_complex_lvalue): Update.
9691 (mark_addressable): Rename.
9693 2002-04-01 Roger Sayle <roger@eyesopen.com>
9696 * decl.c (duplicate_decls): Overwrite the RTL when (and only
9697 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
9698 but follow the SET_DECL_RTL idiom used elsewhere in the function.
9700 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9702 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
9703 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
9704 * decl.c (grokdeclarator): Update.
9705 * mangle.c (write_integer_cst): Update.
9706 * typeck.c (build_binary_op): Update.
9708 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
9710 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
9711 * lex.c (cxx_init): Don't set hook.
9713 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
9715 * Make-lang.in (error.o): Update.
9716 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
9717 * cp-tree.h (struct diagnostic_context): Predeclare.
9718 (cxx_print_error_function): New.
9719 * error.c: Include langhooks-def.h.
9720 (lang_print_error_function): Rename. Update.
9721 (init_error): Don't set hook.
9723 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
9725 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
9727 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
9728 * decl.c (finish_enum): Similarly.
9729 * error.c (dump_type): Similarly.
9730 * lex.c (cxx_init): Similarly.
9731 * mangle.c (write_builtin_type): Similarly.
9732 * typeck.c (comptypes): Similarly.
9734 2002-03-28 Roger Sayle <roger@eyesopen.com>
9737 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
9738 in the g++ front-end.
9739 (duplicate_decl): Allow redefinition of anticipated built-ins.
9740 Fix inlining problem by over-writing the old DECL_RTL.
9741 (lookup_namespace_name): Fail to find an identifier in the
9742 specified namespace if its still anticipated.
9743 (builtin_function_1): New function split out from builtin_function
9744 to create a builtin in the current namespace with given context.
9745 (builtin_function): Call builtin_function_1 to define the
9746 appropriate builtins in both the std and global namespaces.
9747 (select_decl): Don't test for anticipated decls here.
9748 (unqualified_namespace_lookup): Instead ignore them whilst
9749 searching through scopes and namespaces.
9750 * decl2.c (do_nonmember_using_decl): If a using declaration
9751 specifies an anticipated built-in function, mark it as no longer
9752 anticipated in that scope.
9753 (ambiguous_decl): Avoid resolving to an anticipated decl.
9754 * lex.c (do_scoped_id): Fail to find an identifier in the global
9755 namespace if its still anticipated.
9757 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
9759 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
9760 * cp-tree.h (cp_make_lang_type): Rename.
9761 * lex.c (cp_make_lang_type): Rename.
9762 (make_aggr_type): Update.
9763 * tree.c (init_tree): Don't set make_lang_type_fn.
9765 2002-03-29 Jakub Jelinek <jakub@redhat.com>
9768 * class.c (finish_struct_1): Update static field's DECL_MODE even
9769 if its type is a variant of t.
9771 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
9773 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
9774 * cp-tree.h (cxx_insert_default_attributes): New.
9775 * decl.c (insert_default_attributes): Rename.
9777 2002-03-27 Mark Mitchell <mark@codesourcery.com>
9780 * call.c (build_op_delete_call): Allow for the fact the placement
9781 may be a COMPOUND_EXPR.
9783 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
9785 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
9786 * cp-tree.h (init_cplus_expand): Remove.
9787 (cxx_expand_expr): New.
9788 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
9790 (init_cplus_expand): Remove.
9791 * lex.c (cxx_init): Don't call init_cplus_expand.
9793 2002-03-26 Mark Mitchell <mark@codesourcery.com>
9796 * init.c (build_new_1): Allow for the fact the result of
9797 build_function_call may be a COMPOUND_EXPR.
9799 2002-03-26 Nathan Sidwell <nathan@codesourcery.com>
9802 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
9803 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9804 (dfs_skip_nonprimary_vbases_markedp): Remove.
9805 * search.c (get_shared_vbase_if_not_primary): Remove.
9806 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9807 (dfs_skip_nonprimary_vbases_markedp): Remove.
9808 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
9809 (dfs_marked_real_bases_queue_p): Likewise.
9811 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
9813 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
9814 * cp-tree.h (cxx_mark_tree): New.
9815 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
9817 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
9819 * cp-tree.h (cxx_maybe_build_cleanup): New.
9820 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
9821 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
9822 * tree.c (build_target_expr): Update.
9823 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
9825 2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
9827 * decl2.c (cxx_decode_option): Handle -E.
9828 * lang-specs.h (default_compilers): Preprocess with cc1plus.
9829 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
9831 2002-03-23 Jakub Jelinek <jakub@redhat.com>
9834 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
9836 2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9838 * error.c (dump_type): Be careful about implicit typenames.
9840 2002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9843 * semantics.c (finish_base_specifier): Handle erronous base
9846 2002-03-22 Zack Weinberg <zack@codesourcery.com>
9848 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
9851 2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
9853 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
9854 an index into the vtable_entry array regardless of
9855 TARGET_PTRMEMFUNC_VBIT_LOCATION.
9857 2002-03-21 Aldy Hernandez <aldyh@redhat.com>
9859 * tree.c (cp_cannot_inline_tree_fn): Same.
9861 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
9863 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
9864 insert_block, getdecls, global_bindings_p): New.
9866 2002-03-20 Nathan Sidwell <nathan@codesourcery.com>
9869 * mangle.c (struct globals) Add internal_mangling_p member.
9870 (write_template_param): Do internal mangling, if needed.
9871 (mangle_conv_op_name_for_type): Request internal mangling.
9873 2002-03-20 Jason Merrill <jason@redhat.com>
9876 * init.c (build_delete): Check access for a member op delete here.
9877 * decl2.c (delete_sanity): Not here.
9879 2002-03-19 Jason Merrill <jason@redhat.com>
9882 * class.c (get_vfield_name): Use the constructor_name.
9884 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
9886 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
9887 * cp-tree.h (lang_printable_name): Rename.
9888 * error.c (lang_decl_name): Use new hook.
9889 * lex.c (cxx_init): Remove old hook.
9890 * pt.c (tsubst_decl): Use new hook.
9891 * tree.c (lang_printable_name): Rename.
9893 2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
9896 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
9897 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
9898 only after recording the declaration.
9900 2002-03-18 Jason Merrill <jason@redhat.com>
9903 * init.c (resolve_offset_ref): Hand off to build_component_ref.
9905 PR c++/4222, c++/5995
9906 * call.c (build_over_call): Fix empty class logic.
9909 * cp-tree.h (struct saved_scope): Add last_parms field.
9910 * decl.c (maybe_push_to_top_level): Save last_function_parms.
9911 (pop_from_top_level): Restore it.
9914 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
9918 * pt.c (tsubst_friend_function): Use decl_namespace_context.
9920 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
9921 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
9922 type with a nontrivial destructor.
9924 2002-03-17 Jason Merrill <jason@redhat.com>
9927 * class.c (build_base_path): Virtual base layout is fixed in
9930 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
9932 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
9933 * parse.y (yyparse): Remove macro.
9935 2002-03-17 Jason Merrill <jason@redhat.com>
9938 * init.c (build_new_1): Pass the right pointer to op delete.
9940 2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
9943 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
9944 conversion operators go.
9945 (struct lang_decl_flags): Add template_conv_p and unused
9947 (DECL_TEMPLATE_CONV_FN_P): New macro.
9948 * call.c (build_user_type_conversion_1): Don't check second type
9949 conversion of overload set first.
9950 * class.c (add_method): Make sure templated conversion operators
9951 all end up on slot 2.
9952 * lex.c (do_identifier): A conversion operator token might be
9953 satisfied by a templated conversion operator.
9954 * pt.c (check_explicit_specialization): Use
9955 CLASSTYPE_FIRST_CONVERSION_SLOT.
9956 (template_parm_this_level_p): New function.
9957 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
9958 * search.c (lookup_fnfields_1): Template conversions will be on
9960 * typeck.c (build_component_ref): Preserve the type of an
9961 conversion operator name on the overload type.
9962 (build_x_function_call): Retrieve the conversion operator name.
9964 2002-03-15 Richard Henderson <rth@redhat.com>
9966 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
9968 2002-03-15 Mark Mitchell <mark@codesourcery.com>
9970 * cp-tree.h (CLEANUP_DECL): Remove.
9971 (CLEANUP_EXPR): Likewise.
9972 * decl.c (destroy_local_var): Simplify.
9973 (maybe_build_cleanup): Tidy.
9974 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
9975 * semantics.c (cp_expand_stmt): Likewise.
9976 * cp/tree.c (cp_statement_code_p): Likewise.
9978 2002-03-15 Jason Merrill <jason@redhat.com>
9981 * decl.c (duplicate_decls): Use merge_types instead of common_type.
9982 * typeck.c (common_type): Just hand off to
9983 type_after_usual_arithmetic_conversions and
9984 composite_pointer_type.
9985 (merge_types): New fn.
9986 (commonparms): Use it instead of common_type.
9987 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
9988 (composite_pointer_type): Also handle attributes.
9989 * cp-tree.h: Declare merge_types.
9991 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
9993 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
9995 2002-03-14 Richard Henderson <rth@redhat.com>
9997 * decl.c: Include c-pragma.h.
9998 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
9999 * Make-lang.in: Update dependencies.
10001 2002-03-14 Jakub Jelinek <jakub@redhat.com>
10004 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
10005 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
10007 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
10009 * mangle.c (write_builtin_type): Handle 128-bit integers even if
10010 they are not a standard integer type.
10012 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
10014 * cp-tree.h (init_init_processing): Remove declaration.
10015 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
10016 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
10018 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10020 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
10022 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
10024 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
10025 cplus_tree_code_name): Delete.
10026 (cxx_init): Don't call add_c_tree_codes, instead set
10027 lang_unsafe_for_reeval. Don't try to copy into the various
10030 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
10033 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
10034 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
10037 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
10039 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
10040 DR209 is now not a defect.
10041 * cp-tree.h (skip_type_access_control): Remove.
10042 * decl.c (grokdeclarator): Do type access control for friend
10044 * semantics.c (decl_type_access_control): Don't reset
10045 current_type_lookups.
10046 (save_type_access_control): Always save the lookups.
10047 (skip_type_access_control): Remove.
10048 (finish_class_definition): Don't change type_lookups.
10050 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
10052 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
10054 * typeck.c (build_static_cast): Compare non-qualified types
10055 with pointer to member conversions.
10057 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
10058 Daniel Berlin <dan@dberlin.org>
10060 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
10061 (cxx_get_alias_set): Use it.
10063 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10065 * cp-tree.h (stabilize_expr): Prototype.
10067 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
10069 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
10070 conditional return void.
10072 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
10074 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
10075 * cp-tree.h (cxx_unsave): New.
10076 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
10077 (init_tree): Update.
10079 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10081 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
10082 explicit sizeof/sizeof.
10083 * decl2.c (cxx_decode_option): Likewise.
10084 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
10086 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
10089 * decl.c (lookup_tag): Only reject enum/class mismatch, not
10090 class/union mismatch.
10091 * parse.y (check_class_key): New function.
10092 (structsp): Call it.
10094 2002-03-01 Michael Matz <matz@suse.de>
10096 * typeck.c (cp_pointer_int_sum): Complete inner type which is
10097 used later by size_in_bytes().
10099 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
10101 * cp-tree.h: Require __GNUC__ to be #defined.
10102 (build_init): Add missing prototype.
10104 2002-03-01 Jason Merrill <jason@redhat.com>
10106 * except.c: Don't include decl.h or obstack.h. Do include
10108 (build_throw): Destroy temporaries from the thrown
10109 expression before calling __cxa_throw. Construct a thrown
10110 temporary directly into the exception object.
10111 (stabilize_throw_expr): New function.
10112 (wrap_cleanups_r): New function.
10113 * tree.c (stabilize_expr): New function.
10114 * init.c (build_init): New function.
10115 * Make-lang.in (cp/except.o): Adjust .h deps.
10117 2002-02-28 Jason Merrill <jason@redhat.com>
10119 * search.c (lookup_base_r): Don't clear is_non_public just because
10120 we found a friendly scope.
10122 * decl.c (finish_function): Only warn about missing return
10123 statement with -Wreturn-type.
10125 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
10127 * class.c (build_clone): Update.
10128 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
10129 * cp-tree.h (cxx_dup_lang_specific_decl): New.
10130 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
10131 (copy_decl): Update.
10132 * method.c (make_thunk): Update.
10134 2002-02-27 Zack Weinberg <zack@codesourcery.com>
10136 * decl2.c: Delete traditional-mode-related code copied from
10137 the C front end but not used, or used only to permit the
10140 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
10143 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
10146 2002-02-22 Jakub Jelinek <jakub@redhat.com>
10149 * semantics.c (finish_switch_cond): Don't call get_unwidened
10150 if error_mark_node.
10152 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
10154 PR c++/2645, DR 295
10155 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
10157 (make_typename_type): Use tsubst_flags_t.
10158 * decl.c (make_typename_type): Adjust. Return non-artificial
10159 TYPE_DECLs, if required.
10160 (grokdeclarator): Simplify CVR qualification handling. Allow bad
10161 qualifiers on typedef types.
10162 * decl2.c (handle_class_head): Adjust make_typename_type call.
10163 * parse.y (nested_name_specifier): Likewise.
10164 (typename_sub0): Likewise.
10165 (typename_sub1): Likewise.
10166 * pt.c (convert_template_argument): Adjust make_typename_type
10168 (tsubst): Adjust cp_build_qualified_type_real calls.
10169 (check_cv_quals_for_unify): Cope with allowing bad qualifications
10170 on template type parms.
10171 (instantiate_decl): Recheck substitutions to give warnings on bad
10173 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
10175 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
10177 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
10179 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
10180 unless DECL_ALWAYS_INLINE.
10182 2002-02-20 Jakub Jelinek <jakub@redhat.com>
10184 * typeck.c (cp_pointer_int_sum): Renamed from
10185 pointer_int_sum, call pointer_int_sum.
10187 2002-02-20 Jakub Jelinek <jakub@redhat.com>
10189 * decl.c (duplicate_decls): Return 0 if issued error about
10192 2002-02-19 Jason Merrill <jason@redhat.com>
10194 ABI change: Mangle `void (A::*)() const' as
10195 M1AKFvvE, not MK1AFvvE.
10196 * mangle.c (write_function_type): Write cv-quals for member
10197 function type here.
10198 (write_pointer_to_member_type): Not here.
10200 2002-02-18 Jason Merrill <jason@redhat.com>
10202 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
10203 (do_decl_instantiation): Likewise.
10205 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
10208 * decl.c (duplicate_decls): Make warning unconditional
10209 if duplicate default argument declarations are present.
10211 2002-02-17 Jakub Jelinek <jakub@redhat.com>
10213 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
10216 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
10218 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
10219 remove incorrect comment. Move #if 0'd code to common path. Use
10220 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
10222 2002-02-13 Jason Merrill <jason@redhat.com>
10224 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
10225 (finish_function): Don't warn if current_function_returns_null.
10227 * typeck2.c (digest_init): Do handle values of vector type.
10229 * typeck2.c (digest_init, process_init_constructor): Treat vectors
10232 2002-02-11 Jason Merrill <jason@redhat.com>
10234 * parse.y (reserved_declspecs): Don't handle attributes.
10235 (reserved_typespecquals): Handle them here.
10236 * Make-lang.in (parse.c): Adjust expected conflicts.
10238 2002-02-08 Jakub Jelinek <jakub@redhat.com>
10240 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
10241 instead of compstmt.
10242 (compstmt_or_stmtexpr): Renamed from compstmt.
10243 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
10245 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
10247 Rename instantiate_type_flags to tsubst_flags_t & expand use.
10248 * cp-tree.h (instantiate_type_flags): Rename to ...
10249 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
10250 add tf_warning flag.
10251 (instantiate_type): Adjust prototype.
10252 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
10253 do_type_instantiation, cp_build_qualified_type_real): Likewise.
10254 cp_build_qualified_type: Adjust.
10255 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
10257 * call.c (standard_conversion): Rename itf_* to tf_*.
10258 (reference_binding): Likewise.
10259 (convert_like_real): Likewise.
10260 * cvt.c (cp_convert_to_pointer): Likewise.
10261 (convert_to_reference): Likewise.
10262 * decl.c (lookup_namespace_name): Use tf_* flags.
10263 (make_typename_type): Likewise.
10264 (grokdeclarator): Likewise.
10265 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
10266 (coerce_template_template_parms, convert_template_argument,
10267 coerce_template_parms, maybe_get_template_decl_from_type_decl,
10268 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
10269 instantiate_class_template, tsubst_template_arg_vector,
10270 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
10271 tsubst_decl, tsubst_arg_types, tsubst_function_type,
10272 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
10273 instantiate_template, fn_type_unification,
10274 resolve_overloaded_unification, verify_class_unification,
10275 unify, get_bindings_real, do_type_instantiation,
10276 regenerate_decl_from_template, instantiate_decl,
10277 tsubst_initializer_list, tsubst_enum,
10278 get_mostly_instantiated_function_type,
10279 invalid_nontype_parm_type_p): Likewise.
10280 * tree.c (cp_build_qualified_type_real): Likewise.
10281 * typeck.c (build_binary_op): Rename itf_* to tf_*.
10282 (build_ptrmemfunc): Likewise.
10283 (convert_for_assignment): Likewise.
10285 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
10288 * decl.c (grokdeclarator): Allow friend declarations from
10290 * decl2.c (handle_class_head): Don't push into template parm contexts.
10291 * pt.c (push_template_decl_real): Template parm contexts are never
10294 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
10296 * class.c: Include target.h.
10297 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
10298 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
10300 * Make-lang.in: Adjust deps.
10302 2002-02-05 Jason Merrill <jason@redhat.com>
10304 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
10306 2002-02-04 Jakub Jelinek <jakub@redhat.com>
10308 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
10309 (finish_switch_cond): Set SWITCH_TYPE.
10311 2002-02-04 Richard Henderson <rth@redhat.com>
10313 * method.c (use_thunk): Always initialize the block tree. Reindent.
10314 * semantics.c (expand_body): Emit thunks after function, not before.
10316 2002-02-04 Jason Merrill <jason@redhat.com>
10318 * decl.c (start_function): Call cplus_decl_attributes immediately
10319 after grokdeclarator.
10321 * decl.c (start_function): Combine DECL_RESULT handling code.
10323 2002-02-03 Jason Merrill <jason@redhat.com>
10326 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
10327 (cp/xref.o): Remove dependencies.
10328 * class.c (finish_struct_1, check_methods): Don't call xref fns.
10329 (finish_struct_1): Likewise.
10330 * friend.c (make_friend_class): Likewise.
10331 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
10332 * spew.c (read_process_identifier): Likewise.
10334 2002-02-01 Jason Merrill <jason@redhat.com>
10337 * decl.c (finish_function): Warn about a non-void function with
10338 no return statement and no abnormal exit.
10339 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
10340 (current_function_returns_abnormally): New macro.
10341 * call.c (build_call): Set it.
10343 * typeck.c (build_component_ref): Always complain about offsetof
10344 constructs on non-PODs. Only make it an error for members of
10347 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
10348 (dump_function_decl): Always dump parms.
10350 * decl2.c (finish_static_data_member_decl): Complain about a local
10351 class with a static data member.
10354 * search.c (lookup_field_1): Don't xref a static data member
10355 just because we looked it up.
10357 2002-01-31 Jason Merrill <jason@redhat.com>
10359 * Make-lang.in (parse.c): Handle .output file.
10362 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
10364 * semantics.c (finish_class_definition): Adjust.
10366 Allow attributes in parms and casts.
10367 * parse.y (named_parm): Don't strip attrs.
10368 (declmods): Remove 'attributes' production.
10369 (nonempty_cv_qualifiers): Accept attributes.
10370 (ATTRIBUTE): Give precedence.
10371 * decl.c (groktypename): Handle attributes.
10372 (grokparms): Likewise.
10374 2002-01-29 Jakub Jelinek <jakub@redhat.com>
10376 * decl2.c (cxx_decode_option): Pass 0 as last argument to
10378 * lang-specs.h: Use cpp_unique_options instead of cpp_options
10379 when used together with cc1_options.
10381 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
10384 * typeck2.c (digest_init): Make sure non-array core type is
10386 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
10387 constructor, rather than build a new one.
10388 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
10389 PURPOSE of constructor elts.
10391 2002-01-23 Zack Weinberg <zack@codesourcery.com>
10393 * Make-lang.in (parse.c): Adjust expected number of
10394 shift-reduce conflicts.
10395 (decl.o): Depend on diagnostic.h.
10396 * decl.c: Include diagnostic.h.
10397 (grokdeclarator): Check for null pointer.
10398 (finish_function): Don't abort when
10399 current_binding_level->parm_flag != 1, if errors have
10400 occurred; throw away the statement tree and extra binding
10401 levels, and continue.
10402 * lex.c (note_list_got_semicolon): Check for null pointer.
10403 * method.c (hack_identifier): Just return error_mark_node if
10404 value is error_mark_node.
10405 * parse.y (primary: TYPEID(type_id)): No need to use
10406 TYPE_MAIN_VARIANT here.
10407 (handler_seq): Accept an empty list of catch clauses and
10408 generate a fake handler block to avoid later crashes.
10409 (ansi_raise_identifier): Accept the error token too.
10410 * semantics.c (begin_class_definition,
10411 finish_class_definition): Check for error_mark_node.
10413 2002-01-23 Zack Weinberg <zack@codesourcery.com>
10415 * typeck2.c (friendly_abort): Delete definition.
10416 * cp-tree.h (friendly_abort): Don't prototype.
10417 (my_friendly_assert): Use fancy_abort.
10419 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
10421 * cp-tree.h (my_friendly_abort): Remove.
10423 2002-01-23 Jakub Jelinek <jakub@redhat.com>
10425 * spew.c (pending_inlines, pending_inlines_tail,
10426 processing_these_inlines): Make static.
10427 (mark_pending_inlines): Remove static.
10428 (begin_parsing_inclass_inline): If in function, save pi
10429 for GC to cp_function_chain->unparsed_inlines instead.
10430 (process_next_inline): Likewise.
10431 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
10432 (mark_pending_inlines): Add prototype.
10433 * decl.c (spew_debug): Remove unused extern.
10434 (mark_lang_function): Call mark_pending_inlines.
10436 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
10438 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
10439 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
10440 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
10441 Change my_fancy_abort() to abort().
10443 2002-01-23 Jason Merrill <jason@redhat.com>
10446 * class.c (fixed_type_or_null): Fix thinko.
10449 * init.c (resolve_offset_ref): Use build_indirect_ref.
10451 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
10453 2002-01-22 Jason Merrill <jason@redhat.com>
10455 * parse.y (function_body): Suppress the block for the outermost
10457 * decl.c (pushdecl): Don't try to skip it.
10458 (begin_function_body): Keep the block we create, not the next one.
10459 * init.c (emit_base_init): Don't mess with keep_next_level.
10461 * class.c (build_base_path): Tweak formatting.
10463 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
10465 Fix regression introduced with patch for c++/775
10466 * parse.y (class_head_defn): Check for template specializations
10467 with a different class-key.
10469 2002-01-17 Jason Merrill <jason@redhat.com>
10471 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
10472 (begin_function_body): Call them and keep_next_level.
10473 * init.c (emit_base_init): Call keep_next_level.
10474 * semantics.c (setup_vtbl_ptr): Lose.
10475 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
10476 (vtbls_set_up_p): Lose.
10477 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
10478 * method.c (do_build_copy_constructor): Likewise.
10479 (synthesize_method): Call finish_mem_initializers.
10480 * parse.y (nodecls): Likewise.
10482 * error.c (dump_type_suffix): Print the exception specs before
10484 (dump_function_decl): Here, too.
10486 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
10488 2002-01-10 Ira Ruben <ira@apple.com>
10491 * decl.c (start_method): Handle attrlist.
10493 2002-01-10 Jakub Jelinek <jakub@redhat.com>
10495 * decl2.c (max_tinst_depth): Increase default limit to 500.
10497 2002-01-10 Graham Stott <grahams@redhat.com>
10499 * spew.c (YYCHAR): Uppercase macro parameter and add
10501 (YYCODE): Likewise.
10502 (NAME): Uppercase macro parameter.
10504 2002-01-09 Graham Stott <grahams@redhat.com>
10506 * decl.h (grokdeclarator): Wrap long line.
10508 * semantics.c (FINISH_COND): Uppercase macro paramaters and
10511 2002-01-08 Graham Stott <grahams@redhat.com>
10513 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
10514 (PALLOC): Uppercase macro parameter and whitespace.
10515 (SALLOC): Uppercase macro parameter.
10516 (SFREE): Uppercase macros parameter, add parenthese and
10518 (STREQL): Uppercase macro parameter and whitespace.
10519 (STRNEQ): Likewise.
10520 (STRLSS): Likewise.
10521 (STRLEQ): Likewise.
10522 (STRGTR): Likewise.
10523 (STRGEQ): Likewise.
10525 * call.c (convert_like): Add parenthesis and wrap.
10526 (convert_like_with_context): Likewise.
10527 (ICS_RANK): Whitespace.
10528 (NEED_TEMPORARY_P): Remove parenthesis.
10530 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
10532 (VTT_MARKED_BINFO_P): Likewise.
10534 * decl.c (BINDING_LEVEL): Add parenthesis.
10535 (DEF_OPERATOR): Likewise.
10537 * mangle.c (MANGLE_TRACE): Add parenthesis.
10538 (MANGLE_TRACE_TREE): Likewise.
10539 (write_signed_number): Likewise.
10540 (write_unsigned_number): Likewise.
10542 * pt.c (ccat): Uppercase macro parameter.
10545 * search.c (SET_BINFO_ACCESS): Add parenthesis.
10547 2002-01-07 Jason Merrill <jason@redhat.com>
10549 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
10553 * method.c (make_thunk): If !flag_weak, give the thunk the
10554 function's linkage.
10555 (use_thunk): Here, too.
10557 2002-01-07 Graham Stott <grahams@redhat.com>
10559 * error.c: Update copyright date.
10560 (print_scope_operator): Add parenthesis.
10561 (print_left_paren): Likewise.
10562 (print_right_paren): Likewise.
10563 (print_left_bracket): Likewise.
10564 (print_right_bracket): Likewise.
10565 (print_template_argument_list_start): Likewise.
10566 (print_template_argument_list_end): Likewise.
10567 (print_non_consecutive_character): Likewise.
10568 (print_tree_identifier): Likewise.
10569 (print_identifier): Likewise.
10570 (NEXT_CODE): Uppercase macro parameter.
10571 (ident_fndecl): Delete unused.
10572 (GLOBAL_THING): Likewise.
10574 2002-01-06 Graham Stott <grahams@redhat.com>
10576 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
10577 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
10578 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
10579 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
10580 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
10581 (C_IS_RESERVED_WORD): Uppercase macro parameter.
10582 (C_RID_YYCODE) Likewise.
10583 (ptrmem_cst): Use rtx.
10584 (LOCAL_BINDING_P): Add whitespace.
10585 (INHERITED_VALUE_BINDING_P): Likewise.
10586 (BINDING_SCOPE): Wrap long line.
10587 (BINDING_HAS_LEVEL_P): Remove parenthesis.
10588 (BINDING_VALUE): Wrap long line.
10589 (BINDING_TYPE): Whitespace.
10590 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
10591 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
10592 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
10593 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
10594 (same_type_p): Uppercase macro parameters.
10595 (same_type_ignoring_top_level_qualifiers_p): Likewise.
10596 (OVL_FUNCTION): Wrap long line.
10597 (OVL_CHAIN): Whitespace.
10598 (OVL_CURRENT): Add parenthesis and whitespace.
10599 (OVL_NEXT): Whitespace.
10600 (OVL_USED): Likewise.
10601 (IDENTIFIER_TYPE_VALUE): Likewise.
10602 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
10603 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
10604 (LANG_ID_FIELD): Whitespace.
10605 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
10606 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
10607 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
10608 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
10609 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
10610 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
10611 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
10612 (IDENTIFIER_VIRTUAL_P): Likewise.
10613 (IDENTIFIER_OPNAME_P): Likewise.
10614 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
10615 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
10616 (C_SET_EXP_ORIGINAL_CODE): Likewise.
10617 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
10618 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
10619 (IS_AGGR_TYPE): Uppercase macro parameter.
10620 (CLASS_TYPE_P): Likewise.
10621 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
10622 (IS_AGGR_TYPE_2): Whitespace.
10623 (TAGGED_TYPE_P): Uppercase macro parameter.
10624 (TYPE_BUILT_IN): Whitespace.
10625 (TYPE_FOR_JAVA): Likewise.
10626 (FUNCTION_ARG_CHAIN): Remove parenthesis.
10627 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
10628 (FUNCTION_FIRST_USER_PARAM): Likewise.
10629 (PROMOTES_TO_AGGR_TYPE): Whitespace.
10630 (DERIVED_FROM_P): Add parenthesis and wrap.
10631 (UNIQUELY_DERIVED_FROM_P): Likewise.
10632 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
10633 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
10634 (CLASSTYPE_USE_TEMPLATE): Whitespace.
10635 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
10636 (TYPE_GETS_DELETE): Add parenthesis.
10637 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
10638 (TYPE_HAS_ASSIGN_REF): Likewise,
10639 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
10640 (TYPE_HAS_INIT_REF): Likewise.
10641 (TYPE_HAS_CONST_INIT_REF): Likewise.
10642 (TYPE_BEING_DEFINED): Likewise.
10643 (TYPE_LANG_SPECIFIC): Likewise.
10644 (CLASSTYPE_RTTI): Likewise.
10645 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
10646 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
10647 (TYPE_OVERLOADS_ARROW): Likewise.
10648 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
10649 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
10650 (CLASSTYPE_METHOD_VEC): Likewise.
10651 (CLASSTYPE_MARKED_N): Likewise.
10652 (CLASSTYPE_MARKED): Likewise.
10653 (CLASSTYPE_MARKED2): Likewise.
10654 (CLASSTYPE_MARKED3): Likewise.
10655 (CLASSTYPE_MARKED4): Likewise.
10656 (CLASSTYPE_MARKED5): Likewise.
10657 (CLASSTYPE_MARKED6): Likewise.
10658 (SET_CLASSTYPE_MARKED): Whitespace.
10659 (CLEAR_CLASSTYPE_MARKED): Likewise.
10660 (SET_CLASSTYPE_MARKED2): Likewise.
10661 (CLEAR_CLASSTYPE_MARKED2): Likewise.
10662 (SET_CLASSTYPE_MARKED3): Likewise.
10663 (CLEAR_CLASSTYPE_MARKED3): Likewise.
10664 (SET_CLASSTYPE_MARKED4): Likewise.
10665 (CLEAR_CLASSTYPE_MARKED4): Likewise.
10666 (SET_CLASSTYPE_MARKED5): Likewise.
10667 (CLEAR_CLASSTYPE_MARKED5): Likewise.
10668 (SET_CLASSTYPE_MARKED6): Likewise.
10669 (CLEAR_CLASSTYPE_MARKED6): Likewise.
10670 (CLASSTYPE_TAGS): Likewise.
10671 (CLASSTYPE_VSIZE): Likewise.
10672 (CLASSTYPE_VBASECLASSES): Likewise.
10673 (CANONICAL_BINFO): Add parenthesis.
10674 (CLASSTYPE_SIZE(NODE): Likewise.
10675 (CLASSTYPE_SIZE_UNIT): Likewise.
10676 (CLASSTYPE_ALIGN(NODE): Likewise.
10677 (CLASSTYPE_USER_ALIGN): Likewise.
10678 (TYPE_JAVA_INTERFACE): Likewise.
10679 (CLASSTYPE_PURE_VIRTUALS): Likewise.
10680 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
10681 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
10682 (CLASSTYPE_HAS_MUTABLE): Likewise.
10683 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
10684 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
10685 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
10686 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
10687 (CLASSTYPE_INTERFACE_ONLY): Likewise.
10688 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
10689 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10690 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
10691 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10692 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
10693 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
10694 (BINFO_UNSHARED_MARKED): Whitespace.
10695 (BINFO_MARKED): Whitespace and wrap.
10696 (SET_BINFO_MARKED): Likewise.
10697 (CLEAR_BINFO_MARKED): Likewise.
10698 (BINFO_VTABLE_PATH_MARKED): Likewise.
10699 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
10700 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
10701 (BINFO_SUBVTT_INDEX): Remove parenthesis.
10702 (BINFO_VPTR_INDEX): Likewise.
10703 (BINFO_PRIMARY_BASE_OF): Likewise,
10704 (CLASSTYPE_VFIELDS): Whitespace.
10705 (VF_DERIVED_VALUE): Wrap long line.
10706 (NAMESPACE_LEVEL): Whitespace.
10707 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
10708 (DEFARG_POINTER): Whitespace.
10709 (DECL_NEEDED_P): Remove parenthesis.
10710 (DECL_LANGUAGE): Whitespace.
10711 (SET_DECL_LANGUAGE): Add parenthesis.
10712 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
10713 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
10714 (DECL_IN_AGGR_P): Whitespace.
10715 (DECL_FRIEND_P): Likewise.
10716 (DECL_BEFRIENDING_CLASSES): Likewise.
10717 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
10718 (DECL_NONCONVERTING_P): Whitespace.
10719 (DECL_PURE_VIRTUAL_P): Likewise.
10720 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
10721 (DECL_PENDING_INLINE_INFO): Whitespace.
10722 (DECL_SORTED_FIELDS): Likewise.
10723 (DECL_DEFERRED_FN): Likewise.
10724 (DECL_TEMPLATE_INFO): Likewise.
10725 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
10726 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
10727 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
10728 (TMPL_ARGS_LEVEL): Likewise.
10729 (SET_TMPL_ARGS_LEVEL): Likewise.
10730 (INNERMOST_TEMPLATE_PARMS): Whitespace.
10731 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
10732 (INTEGRAL_CODE_P(CODE): Add parenthesis.
10733 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
10734 (TYPE_HAS_CONSTRUCTOR): Whitespace.
10735 (TREE_HAS_CONSTRUCTOR): Likewise.
10736 (TYPE_HAS_DESTRUCTOR): Likewise.
10737 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
10738 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
10739 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
10740 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
10741 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
10742 (TYPE_PTRMEMFUNC_P): Likewise.
10743 (TYPE_PTRMEMFUNC_FLAG): Likewise.
10744 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
10745 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
10746 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
10747 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
10748 (DECL_ACCESS): Whitespace.
10749 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
10750 (DECL_GLOBAL_DTOR_P): Likewise.
10751 (GLOBAL_INIT_PRIORITY): Likewise.
10752 (DECL_TEMPLATE_PARMS): Likewise.
10753 (DECL_TEMPLATE_RESULT): Likewise.
10754 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
10755 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
10756 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
10757 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
10758 (PRIMARY_TEMPLATE_P): Add parenthesis.
10759 (DECL_USE_TEMPLATE): Whitespace.
10760 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10761 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10762 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10763 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10764 (CALL_DECLARATOR_PARMS): Remove parenthesis.
10765 (CALL_DECLARATOR_QUALS): Likewise.
10766 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
10767 (TEMP_NAME_P): Wrap.
10768 (VFIELD_NAME_P): Likewise.
10769 (B_SET): Uppercase macro parameters and add parenthesis.
10772 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
10773 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
10774 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
10775 (same_or_base_type_p): Likewise.
10776 (cp_deprecated): Likewise.
10778 2002-01-05 Richard Henderson <rth@redhat.com>
10780 * semantics.c (expand_body): Revert last change.
10782 2002-01-04 Jason Merrill <jason@redhat.com>
10785 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
10788 * class.c (build_vtbl_initializer): Check for a lost primary
10789 before calculating the vtable entry to throw away.
10791 2002-01-02 Jason Merrill <jason@redhat.com>
10793 * semantics.c (expand_body): Call outlining_inline_function when
10794 emitting an inline function out of line.
10796 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10798 PR c++/5116, c++/764 reversion
10799 * call.c (build_new_op): Revert the instantiations. They are
10802 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10805 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
10807 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10810 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
10811 (tsubst, case POINTER_TYPE): Handle pmfs here.
10812 (tsubst, case OFFSET_TYPE): Check it is not an offset to
10813 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
10815 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10818 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
10819 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
10820 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
10822 (tsubst_template_parms): Break up loop statements.
10823 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
10824 parm PARM_DECLs don't get promoted.
10826 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10829 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
10830 (build_x_function_call): Cope with a COMPONENT_REF containing a
10833 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10836 * pt.c (convert_template_argument): Be more careful determining
10837 when RECORD_TYPE templates are or are not templates.
10839 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10842 * cp-tree.h (handle_class_head): Adjust prototype.
10843 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
10844 parameters. Use for all class heads.
10845 * parse.y (named_class_head_sans_basetype, named_class_head,
10846 named_complex_class_head_sans_basetype,
10847 named_class_head_sans_basetype_defn,
10848 unnamed_class_head): Remove.
10849 (class_head, class_head_apparent_template): Recognize class heads
10850 (class_head_decl, class_head_defn): New reductions. Process class
10852 (structsp): Adjust class definition and class declaration
10854 (maybe_base_class_list): Give diagnostic on empty list.
10856 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10859 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
10860 single non-static member.
10861 (unary_complex_lvalue): If it cannot be a pointer to member, don't
10862 make it so. Check it is not pointer to reference.
10864 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10867 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
10868 are processing a template decl.
10870 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10872 PR c++/5116, c++/764
10873 * call.c (build_new_op): Make sure template class operands are
10874 instantiated. Simplify arglist construction.
10876 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
10878 * call.c (build_user_type_conversion_1): Use my_friendly_assert
10879 rather than if ... abort.
10880 * cvt.c (convert_to_reference): Likewise.
10881 * semantics.c (setup_vtbl_ptr): Likewise.
10882 * pt.c (lookup_template_class): Comment typo.
10884 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
10887 * pt.c (push_template_decl_real): Make sure DECL has
10888 DECL_LANG_SPECIFIC.
10890 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
10893 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
10894 for non-reference fields.
10895 * typeck.c (require_complete_type): Use resolve_offset_ref).
10897 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
10900 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
10902 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
10905 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
10906 up. Don't stabilize_references when initializing a reference.
10908 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10910 * decl2.c (lang_f_options): Const-ify.
10912 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
10914 * config-lang.in (diff_excludes): Remove.
10916 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
10919 * typeck.c (build_function_call_real): Use original function
10920 expression for errors.
10922 2001-12-18 Jason Merrill <jason@redhat.com>
10925 * class.c (add_method): Do compare 'this' quals when trying to match a
10926 used function. Don't defer to another used function.
10928 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
10930 * pt.c (instantiate_clone): Remove, fold into ...
10931 (instantiate_template): ... here. Simplify by removing mutual
10933 * typeck2.c (build_m_component_ref): Don't cv qualify the function
10934 pointed to by a pointer to function.
10935 * class.c (delete_duplicate_fields_1): Typo.
10937 2001-12-18 Jason Merrill <jason@redhat.com>
10939 C++ ABI change: destroy value arguments in caller.
10940 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
10941 create an extra binding level for the parameters.
10942 * decl.c (store_parm_decls): Don't do parameter cleanups.
10944 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
10946 * call.c (build_new_method_call): Use '%#V'.
10947 * error.c (cv_to_string): Use V parameter to determine padding.
10949 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
10951 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
10952 spellings in messages.
10954 2001-12-17 Zack Weinberg <zack@codesourcery.com>
10956 * cp-tree.h: Delete #defines for cp_error, cp_warning,
10957 cp_pedwarn, and cp_compiler_error.
10958 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
10959 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
10960 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
10961 typeck2.c: Change calls to the above macros to use their
10962 language-independent equivalents: error, warning, pedwarn, and
10963 internal_error respectively.
10965 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
10967 * decl2.c (finish_file): Remove back_end_hook.
10969 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
10971 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
10972 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
10973 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
10975 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
10977 * lang-options.h: Use American spelling in messages.
10979 2001-12-13 Jason Merrill <jason@redhat.com>
10981 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
10983 Use cleanups to run base and member destructors.
10984 * init.c (push_base_cleanups): New function, split out from...
10985 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
10986 * decl.c (finish_destructor_body): Move vbase destruction code to
10987 push_base_cleanups.
10988 (begin_function_body, finish_function_body): New fns.
10989 (finish_function): Move [cd]tor handling and call_poplevel to
10990 finish_function_body.
10991 (pushdecl): Skip the new level.
10992 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
10993 (setup_vtbl_ptr): Call push_base_cleanups.
10994 * method.c (synthesize_method): Call {begin,end}_function_body.
10995 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
10996 * cp-tree.h: Declare new fns.
10997 * parse.y (function_body, .begin_function_body): New nonterminals.
10998 (fndef, pending_inline, function_try_block): Use function_body.
10999 (ctor_initializer_opt, function_try_block): No longer has a value.
11000 (base_init): Remove .set_base_init token.
11001 (.set_base_init, compstmt_or_error): Remove.
11002 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
11004 * optimize.c (maybe_clone_body): Fix parameter updating.
11006 2001-12-12 Jason Merrill <jason@redhat.com>
11008 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
11009 * semantics.c (genrtl_start_function): Don't pass
11010 parms_have_cleanups or push an extra binding level.
11011 (genrtl_finish_function): Lose cleanup_label cruft.
11013 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
11014 (ctor_label): Remove.
11015 * semantics.c (finish_return_stmt): Lose ctor_label support.
11016 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
11017 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
11020 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
11021 check for [cd]tors.
11022 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
11024 * decl.c (finish_function): Check VMS_TARGET, not VMS.
11026 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
11027 (end_cleanup_fn): And poplevel.
11029 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
11030 if we're in a template.
11032 2001-12-12 Jakub Jelinek <jakub@redhat.com>
11034 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
11035 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
11036 THIS_NAME_P): Delete.
11037 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
11038 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
11039 with internal naming scheme.
11040 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
11042 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
11044 * decl.c (grokdeclarator): Deprecated implicit typename use.
11046 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
11049 * parse.y (frob_specs): Indicate it is a language linkage which
11050 contained the extern.
11051 * decl.c (grokdeclarator): Allow extern language linkage with
11054 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
11057 * decl.c (add_binding): Don't reject duplicate typedefs involving
11058 template parameters.
11060 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
11062 * parse.y, semantics.c: Similarly.
11064 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
11067 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
11068 (copy_args_p): Rename to ...
11069 (copy_fn_p): ... here.
11070 (grok_special_member_properties): New function.
11071 (grok_op_properties): Lose VIRTUALP parameter.
11072 (copy_assignment_arg_p): Remove.
11073 * call.c (build_over_call): Use copy_fn_p.
11074 * decl.c (grokfndecl): Reformat. Adjust call to
11075 grok_op_properties.
11076 (copy_args_p): Rename to ...
11077 (copy_fn_p): ... here. Reject template functions. Check for pass
11079 (grok_special_member_properties): Remember special functions.
11080 (grok_ctor_properties): Don't remember them here, just check.
11081 (grok_op_properties): Likewise.
11082 (start_method): Call grok_special_member_properties.
11083 * decl2.c (grokfield): Likewise.
11084 (copy_assignment_arg_p): Remove.
11085 (grok_function_init): Don't remember abstract assignment here.
11086 * pt.c (instantiate_class_template): Call
11087 grok_special_member_properties.
11088 (tsubst_decl): Adjust grok_op_properties call.
11090 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
11092 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
11093 RID_TYPES_COMPATIBLE_P.
11095 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
11097 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
11098 call to build_aggr_init.
11099 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
11101 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
11103 * parse.y: Replace uses of the string non-terminal with STRING.
11104 Don't perform string concatentaion here.
11105 (string): Remove non-terminal.
11106 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
11108 2001-12-05 Jason Merrill <jason@redhat.com>
11110 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
11111 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
11112 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
11113 * pt.c (push_tinst_level): No longer static.
11114 * cp-tree.h: Declare them.
11116 * init.c (resolve_offset_ref): Don't check access for the base
11117 conversion to access a FIELD_DECL.
11119 * cp-tree.h (TYPE_REFFN_P): New macro.
11120 * decl.c (bad_specifiers): Check it, too.
11122 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
11123 on the __*_type_info type if we haven't seen a definition.
11125 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
11127 * decl.c: Include c-common.h.
11128 (shadow_warning): Move to c-common.c.
11130 2001-12-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11132 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
11134 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
11136 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
11138 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
11141 * init.c (sort_base_init): Allow binfos to be directly specified.
11142 * method.c (do_build_copy_constructor): Explicitly convert to the
11144 (do_build_assign_ref): Likewise.
11146 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
11148 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
11149 declaration and initialization.
11151 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
11153 * typeck2.c: Remove leading capital from diagnostic messages, as
11154 per GNU coding standards.
11156 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
11159 * decl.c (xref_basetypes): Handle attributes between
11162 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
11165 * parse.y (named_complex_class_head_sans_basetype): Add new
11167 * Make-lang.in (parse.c): Adjust expected conflict count.
11169 2001-12-03 Jason Merrill <jason@redhat.com>
11171 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
11172 immediate binfos for our virtual bases.
11174 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
11176 * call.c (build_java_interface_fn_ref): Similarly.
11177 * except.c (is_admissible_throw_operand): Similarly.
11178 * init.c (build_java_class_ref): Similarly.
11179 * xref.c (open_xref_file): Similarly.
11181 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
11183 * class.c (finish_struct): Remove trailing periods from messages.
11184 * decl.c (check_tag_decl): Similarly.
11185 * lex.c (cxx_set_yydebug): Similarly.
11186 * typeck2.c (friendly_abort): Similarly.
11188 2001-11-29 Mark Mitchell <mark@codesourcery.com>
11191 * cp-tree.h (ovl_member): Remove.
11192 * decl2.c (merge_functions): Handle extern "C" functions
11194 * tree.c (ovl_member): Remove.
11196 2001-11-29 Mark Mitchell <mark@codesourcery.com>
11199 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
11200 FUNCTION_DECL, as input.
11201 (mark_overriders): Remove.
11202 (warn_hidden): Rework for the new ABI.
11204 2001-11-29 Mark Mitchell <mark@codesourcery.com>
11207 * call.c (convert_like_real): Do not build additional temporaries
11208 for rvalues of class type.
11210 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
11212 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
11213 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
11214 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
11215 (DERIVED_FROM_P): Likewise.
11216 (enum base_access): Renumber, add ba_quiet bit mask.
11217 (get_binfo): Remove.
11218 (get_base_distance): Remove.
11219 (binfo_value): Remove.
11220 (ACCESSIBLY_DERIVED_FROM_P): Remove.
11221 * call.c (standard_conversion): Use lookup_base.
11222 * class.c (strictly_overrides): Likewise.
11223 (layout_virtual_bases): Likewise.
11224 (warn_about_ambiguous_direct_bases): Likewise.
11225 (is_base_of_enclosing_class): Likewise.
11226 (add_vcall_offset_vtbl_entries_1): Likewise.
11227 * cvt.c (build_up_reference): Adjust comment.
11228 * init.c (build_member_call): Reformat.
11229 * search.c (get_binfo): Remove.
11230 (get_base_distance_recursive): Remove.
11231 (get_base_distance): Remove.
11232 (lookup_base_r): Tweak.
11233 (lookup_base): Add ba_quiet control. Complete the types here.
11234 (covariant_return_p): Use lookup_base.
11235 * tree.c (binfo_value): Remove.
11236 (maybe_dummy_object): Use lookup_base.
11237 * typeck.c (build_static_cast): Use lookup_base.
11238 (get_delta_difference): Likewise.
11239 * typeck2.c (binfo_or_else): Use lookup_base.
11240 (build_scoped_ref): Add back error_mark_check.
11241 (build_m_component_ref): Use lookup_base.
11243 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
11245 * Make-lang.in (c++.generated-manpages): New dummy target.
11247 2001-11-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11249 * Make-lang.in (cp-lang.o): Depends on c-common.h.
11250 * cp-lang.c (c-common.h): Include.
11251 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
11252 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
11253 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
11255 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
11257 * decl2.c (c_language): Move to c-common.c.
11258 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
11260 (cxx_init): Update.
11262 2001-11-26 Jason Merrill <jason@redhat.com>
11264 * call.c (joust): Remove COND_EXPR hack.
11266 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
11268 * search.c (lookup_base_r): Declare bk in variable declaration
11271 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
11274 * class.c (build_vbase_pointer): Remove.
11275 (build_vbase_path): Remove.
11276 (build_base_path): New function.
11277 * cp-tree.h (base_access, base_kind): New enumerations.
11278 (build_base_path): Declare.
11279 (convert_pointer_to_real): Remove.
11280 (convert_pointer_to): Remove.
11281 (lookup_base): Declare.
11282 (convert_pointer_to_vbase): Remove.
11283 * call.c (build_scoped_method_call): Use lookup_base &
11284 build_base_path instead of convert_pointer_to_real,
11285 get_base_distance & get_binfo.
11286 (build_over_call): Likewise.
11287 * cvt.c (cp_convert_to_pointer): Likewise.
11288 (convert_to_pointer_force): Likewise.
11289 (build_up_reference): Likewise.
11290 (convert_pointer_to_real): Remove.
11291 (convert_pointer_to): Remove.
11292 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
11293 instead of convert_pointer_to_vbase & build_vbase_path.
11294 (emit_base_init): Use build_base_path instead of
11295 convert_pointer_to_real.
11296 (expand_virtual_init): Lose unrequired conversions.
11297 (resolve_offset_ref): Use lookup_base and build_base_path
11298 instead of convert_pointer_to.
11299 * rtti.c (build_dynamic_cast_1): Use lookup_base &
11300 build_base_path instead of get_base_distance & build_vbase_path.
11301 * search.c (get_vbase_1): Remove.
11302 (get_vbase): Remove.
11303 (convert_pointer_to_vbase): Remove.
11304 (lookup_base_r): New function.
11305 (lookup_base): New function.
11306 * typeck.c (require_complete_type): Use lookup_base &
11307 build_base_path instead of convert_pointer_to.
11308 (build_component_ref): Likewise.
11309 (build_x_function_call): Likewise.
11310 (get_member_function_from_ptrfunc): Likewise.
11311 (build_component_addr): Likewise.
11312 * typeck2.c (build_scoped_ref): Likewise.
11314 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
11316 * cp-tree.h (CP_TYPE_QUALS): Removed.
11317 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
11318 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
11319 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
11320 * dump.c (cp_dump_tree): Use void* dump_info argument to match
11321 lang-hooks prototype.
11322 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
11323 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
11324 CP_TYPE_QUALS changed to cp_type_quals.
11325 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
11326 (CXX_C_OBJS): Remove c-dump.o.
11328 2001-11-21 Mark Mitchell <mark@codesourcery.com>
11331 * pt.c (lookup_template_class): Ensure that all specializations
11332 are registered on the list corresponding to the most general
11335 2001-11-20 Mark Mitchell <mark@codesourcery.com>
11337 * call.c (non_reference): Add documentation.
11338 (convert_class_to_reference): Do not strip reference types
11339 from conversion operators.
11340 (maybe_handle_ref_bind): Simplify.
11341 (compare_ics): Correct handling of references.
11343 2001-11-19 John Wilkinson <johnw@research.att.com>
11345 * dump.c (dump_op): New function.
11346 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
11347 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
11348 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
11350 2001-11-19 Mark Mitchell <mark@codesourcery.com>
11353 * semantics.c (finish_sizeof): Make sure that expression created
11354 while processing a template do not have a type.
11355 (finish_alignof): Likewise.
11356 * typeck.c (c_sizeof): Likewise.
11357 (expr_sizeof): Likewise.
11359 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
11361 * lex.c (cxx_finish): Call c_common_finish.
11362 (finish_parse): Remove.
11364 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11366 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
11367 when displaying error message about missing array bounds.
11369 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11371 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
11373 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
11375 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
11377 * cp-tree.h (print_class_statistics): Restore.
11379 2001-11-15 Jason Merrill <jason@redhat.com>
11381 * method.c (use_thunk): Don't emit debugging information for thunks.
11383 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
11384 * decl.c (make_typename_type): Handle getting a class template.
11385 * search.c (lookup_field_r): A class template is good enough for
11388 * call.c (convert_like_real): Only use cp_convert for the bad part.
11389 (standard_conversion): Also allow bad int->enum.
11390 * typeck.c (ptr_reasonably_similar): Also allow functions to
11391 interconvert. Pointers to same-size integers are reasonably
11394 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
11397 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
11400 * init.c (sort_base_init): Remove unreachable code.
11401 (expand_member_init): Adjust comment to reflect reality. Simplify
11402 and remove unreachable code.
11404 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
11406 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
11407 (cxx_init): Update prototype.
11408 * decl.c (init_decl_processing): Rename. Move null node init
11409 to its creation time.
11410 * lex.c (cxx_init_options): Update.
11411 (cxx_init): Combine with old init_parse; also call
11412 cxx_init_decl_processing.
11414 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
11416 * decl.c (check_initializer): Try to complete the type of an
11417 array element before checking whether it's complete. Don't
11418 complain about arrays with complete element types but an
11420 (cp_finish_decl): Build the hierarchical constructor before
11421 calling maybe_deduce_size_from_array_init.
11423 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
11425 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
11427 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
11430 * parse.y (already_scoped_stmt): Remove.
11431 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
11433 2001-11-12 H.J. Lu <hjl@gnu.org>
11435 * cvt.c (ocp_convert): Don't warn the address of a weak
11436 function is always `true'.
11438 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
11440 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
11441 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
11442 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
11443 * cp-tree.h (print_class_statistics): Remove.
11444 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
11445 cxx_print_identifier, cxx_set_yydebug): New.
11446 * lex.c (set_yydebug): Rename c_set_yydebug.
11447 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
11448 lang_print_xnode): Rename.
11449 * tree.c (print_lang_statistics): Rename.
11451 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11453 * class.c (dump_array): Fix format specifier warning.
11455 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
11457 * cp-lang.c (LANG_HOOKS_NAME): Override.
11458 (struct lang_hooks): Constify.
11459 * lex.c (cxx_init_options): Update.
11460 (lang_identify): Remove.
11461 * parse.y (language_string): Remove.
11463 2001-11-08 Andreas Franck <afranck@gmx.de>
11465 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
11466 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
11467 suggested by autoconf.
11468 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
11469 (c++.install-common): Use the transformed target alias names.
11471 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
11473 * Make-lang.in: Update.
11474 * cp-lang.c: Include langhooks-def.h.
11476 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11478 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
11480 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11482 * lex.c (copy_lang_type): Add static prototype.
11484 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11486 * pt.c (unify): Handle SCOPE_REF.
11488 2001-11-01 Jakub Jelinek <jakub@redhat.com>
11490 * tree.c (cp_copy_res_decl_for_inlining): Adjust
11491 DECL_ABSTRACT_ORIGIN for the return variable.
11493 2001-10-31 Zack Weinberg <zack@codesourcery.com>
11495 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
11497 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
11499 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
11500 semantics.c, spew.c: Fix spelling errors.
11502 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11504 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
11506 2001-10-25 Zack Weinberg <zack@codesourcery.com>
11508 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
11511 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11513 * cp-lang.c (cxx_get_alias_set): New function.
11514 Point LANG_HOOKS_GET_ALIAS_SET to it.
11516 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11518 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
11519 * cp-tree.h (make_unbound_class_template): Prototype new function.
11520 * decl.c (make_unbound_class_template): New function.
11521 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
11522 * error.c (dump_type): Likewise.
11523 * mangle.c (write_type): Likewise.
11524 * parse.y (template_parm): Likewise.
11525 (template_argument): Use make_unbound_class_template.
11526 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
11527 (tsubst): Likewise.
11528 (tsubst_copy): Likewise.
11530 * tree.c (walk_tree): Likewise.
11531 * typeck.c (comptypes): Likewise.
11533 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11535 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
11536 extra calls into fewer ones.
11538 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
11540 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
11541 Warn when merging inline with attribute noinline.
11542 (start_decl, start_function): Warn if inline and attribute
11543 noinline appear in the same declaration.
11545 2001-10-16 H.J. Lu <hjl@gnu.org>
11547 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
11548 for tree checking disabled.
11550 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
11552 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
11553 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
11555 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
11557 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
11558 (unify): Only handle MINUS_EXPR specially if the above flag is set
11559 and the subtracted constant is 1. Clear the flag on recursive calls.
11560 Set it when unifying the maximum value in an INTEGER_TYPE's range.
11562 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
11564 * decl.c (bad_specifiers): Don't allow exception specifications
11567 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
11569 * cp/lex.c (init_cp_pragma): Similarly.
11571 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11573 * pt.c (lookup_template_class): Build complete template arguments
11574 for BOUND_TEMPLATE_TEMPLATE_PARM.
11576 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11578 * cp-tree.h (TYPE_BINFO): Update comment.
11579 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
11580 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
11581 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
11582 (copy_type): Prototype new function.
11583 * lex.c (copy_lang_decl): Gather tree node statistics.
11584 (copy_lang_type): New function.
11585 (copy_type): Likewise.
11586 (cp_make_lang_type): Create lang_type for
11587 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
11588 and BOUND_TEMPLATE_TEMPLATE_PARM.
11589 * pt.c (tsubst): Use copy_type instead of copy_node.
11590 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
11592 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11594 * pt.c (determine_specialization): Ignore functions without
11595 DECL_TEMPLATE_INFO.
11597 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
11600 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
11602 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
11604 * typeck2.c (store_init_value): Don't re-digest a bracketed
11607 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
11610 2001-10-11 Richard Henderson <rth@redhat.com>
11612 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
11613 of an asm statement.
11614 (build_vtbl_ref_1): Split out from build_vtbl_ref.
11615 (build_vfn_ref): Use it to handle vtable descriptors before
11616 calling build_vtable_entry_ref.
11617 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
11619 2001-10-10 Richard Henderson <rth@redhat.com>
11621 * parse.y (asm_operand): Allow named operands.
11622 * semantics.c (finish_asm_stmt): Tweek for changed location
11623 of the operand constraint.
11625 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
11627 * call.c (standard_conversion): Add bad conversion between
11628 integers and pointers.
11629 (convert_like_real): Don't use convert_for_initialization for bad
11630 conversions; complain here and use cp_convert.
11631 (build_over_call): Don't handle bad conversions specially.
11632 (perform_implicit_conversion): Allow bad conversions.
11633 (can_convert_arg_bad): New fn.
11634 * cp-tree.h: Declare it.
11635 * typeck.c (convert_for_assignment): Use it.
11636 (ptr_reasonably_similar): Any target type is similar to void.
11638 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
11640 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
11641 (cp/cp-lang.o): New rule.
11642 * cp-tree.h: Declare hooks.
11643 * tree.c: Make hooks non-static.
11644 (init_tree): Don't initialize hooks here.
11645 * lex.c: Likewise. Move definition of lang_hooks to...
11646 * cp-lang.c: ... new file.
11648 2001-10-08 Richard Henderson <rth@redhat.com>
11650 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
11651 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
11653 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11655 * class.c (build_vtable_entry_ref): Const-ify.
11656 * decl.c (predefined_identifier,
11657 initialize_predefined_identifiers): Likewise.
11658 * init.c (build_new_1): Likewise.
11659 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
11662 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
11664 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
11665 (INSNS_PER_STMT): Likewise.
11666 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
11667 (copy_body, initialize_inlined_parameters): Likewise.
11668 (declare_return_variable, inlinable_function_p): Likewise.
11669 (expand_call_inline, expand_calls_inline): Likewise.
11670 (optimize_inline_calls, clone_body): Likewise.
11671 * tree.c (walk_tree): Moved to ../tree-inline.c.
11672 (walk_tree_without_duplicates): Likewise.
11673 (copy_tree_r, remap_save_expr): Likewise.
11675 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
11677 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
11678 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
11679 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
11680 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
11681 (flag_inline_trees): Moved declaration to ../tree-inline.h.
11682 (walk_tree): Moved declaration to ../tree-inline.h.
11683 (walk_tree_without_duplicates, copy_tree_r): Likewise.
11684 (remap_save_expr): Likewise.
11685 * decl.c: Include tree-inline.h.
11686 (lang_mark_tree): Don't mark inlined_fns.
11687 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
11688 * optimize.c: Include tree-inline.h.
11689 (optimize_inline_calls): Move declaration to ../tree.h, as
11691 (remap_decl): Use language-independent constructs and hooks.
11692 (remap_block, copy_body_r, declare_return_variable): Likewise.
11693 (inlinable_function_p): Likewise. Don't test for
11694 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
11695 no longer language-specific.
11696 (optimize_inline_calls): Likewise. Make it non-static. Moved
11697 call of dump_function to...
11698 (optimize_function): Here...
11699 (clone_body): New function, extracted from...
11700 (maybe_clone_body): ... here. Build decl_map locally and pass
11701 it on to clone_body.
11702 * pt.c, semantics.c: Include tree-inline.h.
11703 * tree.c: Likewise.
11704 (cp_walk_subtrees): New language-specific hook for tree inlining.
11705 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
11706 cp_is_overload_p, cp_auto_var_in_fn_p,
11707 cp_copy_res_decl_for_inlining): Likewise.
11708 (walk_tree): Move language-specific constructs into...
11709 (cp_walk_subtrees): this new function.
11710 (copy_tree_r): Use language-independent constructs and hooks.
11711 (init_tree): Initialize tree inlining hooks.
11712 (remap_save_expr): Adjust prototype so that the declaration
11713 does not require the definition of splay_tree.
11715 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
11717 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
11718 to build the declaration instead of the declaration itself.
11720 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
11722 * decl2.c (cxx_decode_option): Add 'else'.
11724 * spew.c (end_input): No longer static.
11725 * cp-tree.h: Declare it.
11726 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
11728 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
11730 * call.c (build_over_call), typeck.c (build_function_call_real):
11731 Pass type attributes to check_function_format rather than name or
11732 assembler name. Don't require there to be a name or assembler
11733 name to check formats.
11735 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
11737 * decl.c (init_decl_processing): Don't call
11738 init_function_format_info. Initialize lang_attribute_table
11740 (builtin_function): Call decl_attributes.
11741 (insert_default_attributes): New.
11743 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
11745 * decl.c (grokdeclarator): Copy array typedef handling from C
11748 * decl.c (grokdeclarator): Copy too-large array handling from C
11751 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
11753 * config-lang.in (target_libs): Added target-gperf, so that we
11754 don't try to build it if C++ is disabled.
11756 2001-09-23 Zack Weinberg <zack@codesourcery.com>
11758 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
11759 (cp/errfn.o): Delete rule.
11760 (cp/error.o): Depend on flags.h.
11761 * errfn.c: Delete file.
11762 * cp-tree.h: Declare warn_deprecated. Remove definitions of
11763 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
11764 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
11765 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
11766 internal_error respectively. Make cp_deprecated into a macro.
11767 Don't define cp_printer typedef or declare cp_printers.
11768 * error.c: Include flags.h.
11769 Delete: struct tree_formatting_info, print_function_argument_list,
11770 print_declaration, print_expression, print_function_declaration,
11771 print_function_parameter, print_type_id, print_cv_qualifier_seq,
11772 print_type_specifier_seq, print_simple_type_specifier,
11773 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
11774 print_parameter_declaration_clause, print_exception_specification,
11775 print_nested_name_specifier, and definition of cp_printers.
11776 (locate_error): New function.
11777 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
11778 rewritten in terms of locate_error and diagnostic.c.
11779 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
11780 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
11781 (init_error): Adjust to match.
11783 2001-09-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11785 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
11787 2001-09-21 Richard Henderson <rth@redhat.com>
11789 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
11790 (build_vtbl_initializer): Likewise.
11791 (build_vfn_ref): New.
11792 * cp-tree.h: Declare it.
11793 * call.c (build_over_call): Use it.
11794 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
11795 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
11797 2001-09-21 J"orn Rennecke <amylaar@redhat.com>
11799 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
11801 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
11803 Table-driven attributes.
11804 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
11805 * decl2.c (cplus_decl_attributes): Only take one attributes
11807 * cp-tree.c (cplus_decl_attributes): Update prototype.
11808 * class.c (finish_struct), decl.c (start_decl, start_function),
11809 decl2.c (grokfield), friend.c (do_friend), parse.y
11810 (parse_bitfield): Update calls to cplus_decl_attributes.
11811 * decl.c (grokdeclarator): Take a pointer to a single ordinary
11813 * decl.h (grokdeclarator): Update prototype.
11814 * decl2.c (grokfield): Take a single ordinary attribute list.
11815 * friend.c (do_friend): Likewise.
11816 * decl.c (shadow_tag, groktypename, start_decl,
11817 start_handler_parms, grokdeclarator, grokparms, start_function,
11818 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
11819 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
11820 (process_template_parm, do_decl_instantiation): Pass single
11821 ordinary attribute lists around.
11822 * decl.c (grokdeclarator): Correct handling of nested attributes.
11824 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
11825 * decl.c (grokdeclarator): Embedded attrs bind to the right,
11828 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
11829 (cp_attribute_table): Declare.
11830 * decl.c (valid_lang_attribute): Don't define.
11831 (lang_attribute_table): Define.
11832 (init_decl_processing): Initialize lang_attribute_table instead of
11833 valid_lang_attribute.
11834 * tree.c (cp_valid_lang_attribute): Remove.
11835 (handle_java_interface_attribute, handle_com_interface_attribute,
11836 handle_init_priority_attribute): New functions.
11837 (cp_attribute_table): New array.
11838 * decl2.c (import_export_class): Don't use
11839 targetm.valid_type_attribute.
11841 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
11843 * Make-lang.in (cp/error.o): Depend on real.h
11844 * error.c: #include "real.h"
11846 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11848 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
11849 xmalloc/strcpy/strcat.
11851 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11853 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
11855 * pt.c (tsubst_decl): Likewise.
11857 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11859 * decl2.c (lang_f_options): Const-ification.
11860 * lex.c (cplus_tree_code_name): Likewise.
11861 * spew.c (yyerror): Likewise.
11863 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
11866 * class.c (force_canonical_binfo_r): Check & move an indirect
11867 primary base first.
11868 (force_canonical_binfo): Check that it's not already
11870 (mark_primary_virtual_base): Remove BINFO parameter.
11871 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
11873 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
11875 Remove TYPE_NONCOPIED_PARTS.
11876 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
11877 CLASSTYPE_PURE_VIRTUALS.
11878 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
11879 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
11880 (layout_class_type): Don't call fixup_inline_methods here ...
11881 (finish_struct_1): ... call it here.
11883 2001-09-04 Mark Mitchell <mark@codesourcery.com>
11885 * decl.c (duplicate_decls): Remove code deadling with
11887 * decl2.c (finish_file): Likewise.
11888 * pt.c (instantiate_decl): Likewise.
11889 * semantics.c (expand_body): Don't defer local functions if
11890 they wouldn't be deferred for some other reason. Don't
11891 generate RTL for functions that will not be emitted.
11892 (genrtl_start_function): Remove code deadling with
11894 (genrtl_finish_function): Likewise.
11896 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
11899 * call.c (build_over_call): Do not optimize any empty base
11902 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11904 * error.c (dump_template_decl): Output template parameters
11905 together with their specifiers.
11906 Output `class' prefix for template template parameter.
11907 (dump_decl): Fix formatting.
11909 2001-08-30 Kurt Garloff <garloff@suse.de>
11911 * optimize.c (inlinable_function_p): Allow only smaller single
11912 functions. Halve inline limit after reaching recursive limit.
11914 2001-08-30 Joern Rennecke <amylaar@redhat.com>
11915 Jason Merrill <jason_merrill@redhat.com>
11917 * class.c (build_vtable_entry_ref): Subtract in char*, not
11920 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
11922 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
11923 (build_cplus_array_type): Use cp_build_qualified_type, not
11924 TYPE_MAIN_VARIANT, to get an unqualified version.
11926 * decl2.c (grok_alignof): Lose.
11927 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
11928 * typeck.c (c_alignof): Lose.
11929 * semantics.c (finish_sizeof, finish_alignof): New.
11930 * parse.y: Use them.
11931 * cp-tree.h: Declare them.
11933 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
11935 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
11936 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
11937 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
11939 2001-08-19 Jakub Jelinek <jakub@redhat.com>
11941 * typeck2.c (add_exception_specifier): Only require complete type if
11942 not in processing template declaration.
11944 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11946 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
11947 GNU_xref_start_scope and GNU_xref_end_scope.
11949 * tree.c (TYPE_HASH): Moved to ../tree.h.
11951 2001-08-16 Mark Mitchell <mark@codesourcery.com>
11953 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
11956 2001-08-14 Richard Henderson <rth@redhat.com>
11958 * class.c, cp-tree.h (build_vfn_ref): Remove.
11959 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
11961 2001-08-13 Mark Mitchell <mark@codesourcery.com>
11963 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
11964 empty class assignment as having side-effects to avoid
11967 2001-08-13 Zack Weinberg <zackw@panix.com>
11969 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
11970 * except.c: Include libfuncs.h.
11972 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
11974 * decl.c (grokdeclarator): Clarify diagnostic message.
11976 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11978 * decl2.c (do_nonmember_using_decl): Replace using directive
11979 with using declaration in the error message.
11981 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11983 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
11984 criterion to avoid rebuilding expression tree instead of
11985 processing_template_decl.
11987 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
11989 Support named return value optimization for inlines, too.
11990 * decl.c (finish_function): Nullify returns here.
11991 * semantics.c (genrtl_start_function): Not here.
11992 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
11993 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
11994 Also nullify the CLEANUP_STMT for the nrv.
11995 * cp-tree.h: Declare it.
11996 * optimize.c (declare_return_variable): Replace the nrv with the
11998 * typeck.c (check_return_expr): Be more flexible on alignment check.
11999 Ignore cv-quals when checking for a matching type.
12001 2001-08-09 Richard Henderson <rth@redhat.com>
12003 * decl2.c (finish_objects): Use target hooks instead of
12004 assemble_constructor and assemble_destructor.
12006 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
12008 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
12010 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
12013 Stop using TYPE_NONCOPIED_PARTS.
12014 * call.c (build_over_call): Be careful when copy constructing
12015 or assigning to an empty class.
12016 * class.c (check_bases_and_members): It has a
12017 COMPLEX_ASSIGN_REF if it has a vptr.
12018 (layout_class_type): Don't add empty class padding to
12019 TYPE_NONCOPIED_PARTS.
12020 (finish_struct_1): Don't add the VFIELD either.
12021 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
12024 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
12026 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
12028 2001-08-06 Richard Henderson <rth@redhat.com>
12030 * decl2.c (finish_objects): Pass a symbol_ref and priority to
12031 assemble_{constructor,destructor}. Remove priority handling.
12033 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12035 Don't allow template-id in using-declaration.
12036 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
12037 (do_class_using_decl): Likewise.
12039 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
12041 * cp/spew.c (read_token): No need to pop buffers.
12043 2001-08-02 Stan Shebs <shebs@apple.com>
12045 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
12046 (fnaddr_from_vtable_entry): Remove decl.
12047 * method.c (use_thunk): Update comment.
12049 2001-08-01 Andrew Cagney <ac131313@redhat.com>
12051 * repo.c (get_base_filename): Change return value to const char
12054 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
12058 * cp-tree.h (flag_honor_std): Remove.
12059 (CPTI_FAKE_STD): Remove.
12060 (std_node): Remove comment about it being NULL.
12061 (fake_std_node): Remove.
12062 * decl.c (in_fake_std): Remove.
12063 (walk_namespaces_r): Remove fake_std_node check.
12064 (push_namespace): Remove in_fake_std code.
12065 (pop_namespace): Likewise.
12066 (lookup_name_real): Remove fake_std_node check.
12067 (init_decl_processing): Always create std_node. Always add
12068 std:: things there.
12069 (builtin_function): Always put non '_' fns in std.
12070 * decl2.c (flag_honor_std): Remove.
12071 (lang_f_options): Remove honor-std.
12072 (unsupported_options): Add honor-std.
12073 (set_decl_namespace): Remove fake_std_node check.
12074 (validate_nonmember_using_decl): Likewise.
12075 (do_using_directive): Likewise.
12076 (handle_class_head): Likewise.
12077 * dump.c (cp_dump_tree): Likewise.
12078 * except.c (init_exception_processing): Adjust.
12079 * init.c (build_member_call): Remove fake_std_node check.
12080 (build_offset_ref): Likewise.
12081 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
12082 * rtti.c (init_rtti_processing): Adjust.
12084 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
12086 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
12087 operand while calling cp_tree_equal.
12089 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
12091 The 3.0 ABI no longer has vbase pointer fields.
12092 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
12093 FORMAT_VBASE_NAME): Remove.
12094 * method.c (do_build_copy_constructor): Adjust.
12095 (do_build_assign_ref): Adjust.
12096 * search.c (lookup_field_r): Adjust.
12097 * typeck.c (build_component_ref): Adjust.
12099 The 3.0 ABI always has a vtable pointer at the start of every
12101 * rtti.c (build_headof_sub): Remove.
12102 (build_headof): Adjust.
12103 (get_tinfo_decl_dynamic): No need to check flag_rtti
12105 (create_real_tinfo_var): Explain why we need a hidden name.
12107 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
12110 * class.c (update_vtable_entry_for_fn): The fixed adjustment
12111 of a virtual thunk should be from declaring base.
12113 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
12115 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
12116 the shared virtual base, so preserving inheritance graph order.
12118 2001-07-30 Andreas Jaeger <aj@suse.de>
12120 * decl2.c: Remove unused var global_temp_name_counter.
12122 2001-07-28 Richard Henderson <rth@redhat.com>
12124 * method.c (pending_inlines): Remove.
12126 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
12128 * class.c (mark_primary_virtual_base): Don't adjust base
12130 (dfs_unshared_virtual_bases): Adjust them here.
12131 (mark_primary_bases): Explain why we adjust at the end.
12133 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
12135 * class.c (finish_struct_1): When copying the primary base's
12136 VFIELD, make sure we find it is at offset zero.
12138 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12140 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
12141 tsubst_expr for default template arguments.
12143 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
12146 * spew.c (yylex): Only copy the token's lineno, if it is
12149 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
12152 * call.c (resolve_args): Simplify, call
12153 convert_from_reference.
12154 (build_new_op): Resolve and convert from reference ARG1
12155 earlier. Adjust ARG2 & ARG3 resolve and conversion.
12157 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
12159 * decl.c (last_function_parm_tags): Remove.
12160 (current_function_parm_tags): Remove.
12161 (init_decl_processing): Adjust.
12162 (start_function): Adjust.
12163 (store_parm_decls): Adjust.
12166 * decl.c (grokdeclarator): Detect when a function typedef is
12167 declaring a function, and create last_function_parms correctly.
12169 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
12171 * call.c (joust): Only prefer a non-builtin candidate to a builtin
12172 one if they have the same signature.
12174 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
12175 it rather than toplevel_bindings_p. Give it a mangled name if static.
12176 (convert_to_reference): Adjust.
12177 * decl2.c (get_temp_name): Lose.
12178 * mangle.c (mangle_ref_init_variable): New fn.
12179 (mangle_guard_variable): Strip the ref-init header.
12180 * cp-tree.h: Adjust.
12181 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
12183 (grok_reference_init): Always use DECL_INITIAL.
12185 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12188 * call.c (build_conditional_expr): Recheck args after
12190 * cp-tree.h (build_conditional_expr): Move to correct file.
12191 * typeck.c (decay_conversion): Diagnose any unknown types
12193 (build_binary_op): Don't do initial decay or default
12194 conversions on overloaded functions.
12195 (build_static_cast): Don't do a decay conversion here.
12197 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12200 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
12201 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
12203 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12205 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
12206 (create_vtbl_ptr): ... here.
12208 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12210 * class.c (build_vbase_offset_vbtl_entries): Look for
12211 non-primary base of which we are a sub vtable.
12213 2001-07-24 Phil Edwards <pme@sources.redhat.com>
12215 * semantics.c (finish_this_expr): Remove unused code.
12217 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
12219 Simplify rtti, now we've only one ABI.
12220 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
12222 (tinfo_decl_id, tinfo_var_id): Remove.
12223 (get_typeid_1): Remove.
12225 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
12226 (typeid_ok_p): New function.
12227 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
12228 (get_tinfo_decl): Remove old abi documentation.
12229 (tinfo_from_decl): Remove.
12230 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
12231 (get_typeid_1): Remove.
12232 (get_base_offset): Remove.
12233 (synthesize_tinfo_var): Absorb get_base_offset.
12234 (create_real_tinfo_var): Don't use tinfo_decl_id.
12236 2001-07-23 Graham Stott <grahams@redhat.com>
12238 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
12239 variable has_two_argument_delete_p.
12241 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
12243 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
12244 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
12245 (CPTI_INDEX_IDENTIFIER): Remove.
12246 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
12247 (delta2_identifier): Remove.
12248 (index_identifier): Remove.
12249 (pfn_or_delta2_identifier): Remove.
12250 (flag_vtable_thunks): Remove.
12251 (VTABLE_DELTA2_NAME): Remove.
12252 (VTABLE_INDEX_NAME): Remove.
12253 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
12254 (vfunc_ptr_type_node): Adjust.
12255 (VTABLE_NAME_PREFIX): Adjust.
12256 (build_vfn_ref): Lose first parameter.
12257 (fixup_all_virtual_upcast_offsets): Remove.
12258 * decl.c (initialize_predefined_identifiers): Remove
12259 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
12260 (init_decl_processing): Remove no-vtable-thunk code.
12261 * decl2.c (flag_vtable_thunks): Remove.
12262 (mark_vtable_entries): Remove no-vtable-thunk code.
12263 * error.c (dump_decl): Remove no-vtable-thunk code.
12264 (dump_expr): Adjust ptr to member function code.
12265 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
12267 * rtti.c (build_headof): Remove no-vtable-thunk code.
12268 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
12269 * search.c (get_base_distance): Remove expand_upcast_fixups case.
12270 (virtual_context) Remove.
12271 (expand_upcast_fixups): Remove.
12272 (fixup_virtual_upcast_offsets): Remove.
12273 (fixup_all_virtual_upcast_offsets): Remove.
12274 * typeck.c (get_member_function_from_ptrfunc): Remove
12275 no-vtable-thunk code.
12276 * call.c (build_over_call): Adjust call to build_vfn_ref.
12277 * class.c (build_vfn_ref): Lose first parameter. Remove
12278 no-vtable-thunk code.
12279 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
12280 (build_vtable_entry): Remove no-vtable-thunk code.
12282 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
12284 Remove old-abi remnants. Remove comments about old abi
12285 behavior. Remove references to 'new-abi' in comments.
12286 * cp-tree.h: Adjust comments.
12287 (vbase_offsets_in_vtable_p): Delete.
12288 (vcall_offsets_in_vtable_p): Delete.
12289 (vptrs_present_everywhere_p): Delete.
12290 (all_overridden_vfuns_in_vtables_p): Delete.
12291 (merge_primary_and_secondary_vtables_p): Delete.
12292 (TYPE_CONTAINS_VPTR_P): Adjust.
12293 (VTT_NAME_PREFIX): Remove.
12294 (CTOR_VTBL_NAME_PREFIX): Remove.
12295 (init_vbase_pointers): Remove.
12296 * class.c: Adjust coments.
12297 (build_vbase_pointer_fields): Delete.
12298 (build_vbase_pointer): Remove old-abi code.
12299 (build_secondary_vtable): Likewise.
12300 (modify_all_vtables): Likewise.
12301 (create_vtable_ptr): Likewise.
12302 (layout_class_type): Likewise.
12303 (finish_struct_1): Likewise.
12304 (finish_vtbls): Likewise.
12305 (dfs_finish_vtbls): Delete.
12306 (build_vbase_offset_vtbl_entries): Remove old-abi code.
12307 * cvt.c: Adjust comments.
12308 * decl.c: Adjust comments.
12309 * decl2.c: Adjust comments.
12310 * init.c: Adjust comments.
12311 (construct_virtual_bases): Remove old-abi code.
12312 * lang-specs.h: Remove -fno-new-abi.
12313 * mangle.c: Adjust comments.
12314 * rtti.c: Adjust comments.
12315 (get_base_offset): Remove old-abi-code.
12316 * search.c: Adjust comments.
12317 (dfs_init_vbase_pointers): Remove.
12318 (dfs_vtable_path_unmark): Remove.
12319 (init_vbase_pointers): Remove.
12320 * semantics.c: Adjust comments.
12321 (emit_associated_thunks): Remove old-abi code.
12322 * typeck.c: Adjust comments.
12324 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
12326 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
12329 2001-07-19 Mark Mitchell <mark@codesourcery.com>
12331 * class.c (finish_struct_anon): Forbid nested classes.
12333 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
12335 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
12336 * optimize.c: Include debug.h.
12337 (maybe_clone_body): Use debug hook.
12338 * semantics.c: Include debug.h.
12339 (expand_body): Use debug hook.
12341 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
12343 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
12345 2001-07-18 Mark Mitchell <mark@codesourcery.com>
12347 * class.c (type_requires_array_cookie): New function.
12348 (check_methods): Don't try to figure out whether the type needs a
12350 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
12351 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
12352 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
12353 * pt.c (instantiate_class_template): Don't set
12354 TYPE_VEC_DELETE_TAKES_SIZE.
12355 * NEWS: Document ABI changes from GCC 3.0.
12357 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
12358 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
12360 * NEWS (Changes in GCC 3.0): Fix typo.
12362 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
12364 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
12365 which attributes are to be attached, and a flags argument. Update
12366 call to decl_attributes.
12367 (grokfield): Update call to decl_attributes.
12368 * class.c (finish_struct): Update call to cplus_decl_attributes.
12369 * cp-tree.h (cplus_decl_attributes): Update prototype.
12370 * decl.c (start_decl, grokdeclarator, start_function): Update
12371 calls to decl_attributes and cplus_decl_attributes.
12372 * friend.c (do_friend): Update call to cplus_decl_attributes.
12373 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
12375 2001-07-12 Mark Mitchell <mark@codesourcery.com>
12377 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
12378 for `register' variables with an asm-specification.
12380 2001-07-11 Mark Mitchell <mark@codesourcery.com>
12382 * semantics.c (finish_asm_stmt): Mark the output operands
12383 to an asm addressable, if necessary.
12385 2001-07-11 Ben Elliston <bje@redhat.com>
12387 * Revert this change -- there is a subtle bug.
12390 * decl.c (finish_enum): New "attributes" argument; pass it to
12391 cplus_decl_attributes. Use a narrower type if the enum is packed.
12392 * cp-tree.h (finish_enum): Adjust prototype.
12393 * parse.y (enum_head): New non-terminal.
12394 (structsp): Use it. Enums now may be preceded or followed by
12395 optional attributes -- pass their chained tree to finish_enum().
12396 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
12398 2001-07-10 Mark Mitchell <mark@codesourcery.com>
12400 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
12403 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
12405 * semantics.c (cp_expand_stmt): Fix for null
12406 current_function_return_value.
12408 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
12410 * call.c (build_op_delete_call): Initialize fn.
12411 (convert_like_real): Delete conditional.
12412 (joust): Initialize *w and *l.
12413 * class.c: Add prototype for binfo_ctor_vtable.
12414 (get_primary_binfo): Initialize result.
12415 * init.c (build_java_class_ref): Initialize name.
12417 2001-07-09 Erik Rozendaal <dlr@acm.org>
12419 * typeck.c (unary_complex_lvalue): Do not duplicate the
12420 argument to modify, pre-, or post-increment when used as an
12421 lvalue and when the argument has side-effects.
12423 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
12425 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12426 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
12427 cplus_decl_attributes even if attrs is NULL.
12428 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12430 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
12432 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
12433 calls to decl_attributes.
12435 2001-07-06 Ira Ruben <ira@apple.com>
12437 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
12438 be DECL_TEMPLATE_RESULT.
12440 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12442 * cp-tree.h (copy_template_template_parm): Rename to ...
12443 (bind_template_template_parm): ... here.
12444 * tree.c (copy_template_template_parm): Rename to ...
12445 (bind_template_template_parm): ... here. Remove the case when
12446 NEWARGS is NULL_TREE.
12447 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
12448 BOUND_TEMPLATE_TEMPLATE_PARM.
12449 * pt.c (lookup_template_class): Adjust.
12451 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
12453 * cvt.c (convert_lvalue): New fn.
12454 * cp-tree.h: Declare it.
12455 * method.c (do_build_assign_ref): Use it.
12456 (do_build_copy_constructor): Convert parm to base types
12457 before calling base constructors.
12459 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
12460 DECL_USER_ALIGN. Check flag_elide_constructors instead of
12462 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
12464 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
12466 * optimize.c (optimize_inline_calls): New function, broken out
12468 (optimize_function): ... here. Call it. Don't inline if it is
12470 (dump_function): Print name of dump flag causing this dump.
12471 * semantics.c (expand_body): Move thunk inline check to
12474 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
12476 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
12477 (comptypes): Use target.comp_type_attributes.
12479 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
12481 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
12483 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12485 * error.c (lang_print_error_function): Add a `diagnostic_context *'
12488 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
12490 * decl2.c (import_export_class): Update.
12492 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
12494 * error.c (init_error): Adjust settings.
12496 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
12498 * error.c (init_error): Adjust settings.
12500 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
12502 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
12503 return pointers to data members by reference rather than by value.
12505 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
12507 Implement the Named Return Value optimization.
12508 * cp-tree.h (struct cp_language_function): Add x_return_value.
12509 (current_function_return_value): Now a macro.
12510 * decl.c: Don't define it.
12511 (define_label, finish_case_label): Don't clear it.
12512 (init_decl_processing): Don't register it with GC.
12513 * semantics.c (genrtl_finish_function): Don't check it for
12514 no_return_label. Copy the RTL from the return value to
12515 current_function_return_value and walk, calling...
12516 (nullify_returns_r): ...this new fn.
12517 * typeck.c (check_return_expr): Set current_function_return_value.
12519 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
12521 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
12522 sharing a ctor vtable with. Merge code for cases 1 and 2.
12523 (binfo_ctor_vtable): New fn.
12524 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
12526 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
12528 * class.c (dfs_find_final_overrider): Fix logic.
12530 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
12531 virtual thunk instead of non-virtual.
12532 (get_matching_virtual): Uncomment.
12534 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
12535 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
12538 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
12540 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
12541 we've not emerged from the hierarchy of RTTI_BINFO on reaching
12542 a non-virtual base.
12544 2001-06-13 Mark Mitchell <mark@codesourcery.com>
12546 * NEWS: Update release number.
12548 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
12550 PR c++/3130, c++/3131, c++/3132
12551 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
12552 * class.c (force_canonical_binfo_r): Move
12553 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
12554 virtual bases unless they're primary and what they're primary
12555 too has been moved.
12556 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
12557 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
12558 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
12560 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
12561 (layout_nonempty_base_or_field): Add most derived type
12563 (layout_empty_base): Likewise.
12564 (build_base_field): Likewise.
12565 (build_base_fields): Likewise.
12566 (propagate_binfo_offsets): Add most derived type
12567 parameter. Skip non canonical virtual bases too.
12568 (dfs_set_offset_for_unshared_vbases): Don't skip primary
12569 bases. Do skip canonical bases.
12570 (layout_virtual_bases): Adjust.
12571 (layout_class_type): Adjust.
12572 (dfs_get_primary_binfo): Build list of virtual primary base
12574 (get_primary_binfo): Check that the shared virtual primary
12575 base candidate was found first.
12576 (accumulate_vtbl_inits): Don't do anything for non-vptr
12577 containing binfos. For case 1 primary virtual bases, keep
12578 checking that we've not emerged from the hierarchy of RTTI_BINFO.
12580 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
12583 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
12584 hierarchy looking for primary bases for a ctor
12585 vtable. Recursively call oneself, if we meet our primary via
12586 this route and haven't met it yet via inheritance graph order.
12588 2001-06-11 Mark Mitchell <mark@codesourcery.com>
12590 * lang-options.h: Emit documentation for -fno-honor-std, not
12593 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
12595 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
12596 Don't clobber delta.
12597 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
12599 2001-06-10 Mark Mitchell <mark@codesourcery.com>
12600 Gabriel Dos Reis <gdr@codesourcery.com>
12602 * Make-lang.in (cp/call.o): Depend on diagnostic.h
12603 (cp/typeck.o): Depend on diagnostic.h
12604 (cp/typeck2.o): Depend on diagnostic.h
12605 (cp/repo.o): Depend on dignostic.h
12606 * typeck.c: #include diagnostic.h
12607 (convert_for_initialization): Remove extern declaration for
12608 warningcount and errorcount.
12610 * call.c: #include diagnostic.h
12611 (convert_like_real): Remove extern declaration for warnincount and
12614 * repo.c: #include diagnostic.h
12615 * typeck2.c: #include diagnostic.h
12617 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
12619 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
12620 in previous change.
12622 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
12625 * friend.c (do_friend): Use push_decl_namespace for classes at
12628 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
12629 Jason Merrill <jason_merrill@redhat.com>
12632 * class.c (build_secondary_vtable): Use assert, rather than an error
12634 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
12635 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
12636 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
12637 Don't set BINFO_VTABLE for a primary virtual base.
12639 2001-06-07 Mark Mitchell <mark@codesourcery.com>
12641 * decl.c (duplicate_decls): Update source position information
12642 when a template function is defined.
12644 2001-06-07 Phil Edwards <pme@sources.redhat.com>
12646 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
12648 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
12651 * decl.c (pushtag): Don't push into a complete type's scope.
12653 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
12655 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
12656 (struct lang_decl_flags): Lose generate_with_vtable_p.
12657 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
12658 * class.c (copy_virtuals): Adjust.
12659 * decl2.c (mark_vtable_entries): Adjust.
12660 * method.c (make_thunk, build_vtable_entry): Adjust.
12661 * class.c (update_vtable_entry_for_fn): Only look as far as the
12662 first defining class.
12663 (build_vtbl_initializer): Put nothing in the slot for a function only
12664 defined in a lost primary virtual base.
12665 (add_vcall_offset_vtbl_entries_1): Use the same code for
12666 the lost primary case and the normal case.
12667 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
12668 (get_vfield_offset, get_derived_offset): Lose.
12669 (dfs_find_final_overrider): Use look_for_overrides_here.
12670 (get_matching_virtual): New fn.
12671 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
12672 not BV_VCALL_INDEX.
12673 * search.c (look_for_overrides_here): Split out from...
12674 (look_for_overrides_r): Here.
12676 * class.c (find_final_overrider): Return error_mark_node on error.
12678 * decl2.c (key_method): #if 0 accidental change.
12680 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
12682 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
12683 (build_over_call): Likewise.
12684 * decl.c (grokparms): Likewise.
12685 * pt.c (tsubst_decl): Likewise.
12686 * typeck.c (convert_arguments): Likewise.
12688 2001-06-05 Mark Mitchell <mark@codesourcery.com>
12690 * semantics.c (begin_class_definition): Robustify.
12692 * pt.c (instantiate_decl): Tell the repository code about the
12693 clones, not the cloned functions.
12694 * repo.c (repo_template_used): Explicitly instantiate the cloned
12695 function, not the clones.
12697 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12699 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
12700 ICS_BAD_FLAG on created conversion.
12701 (compare_ics): Break out rank.
12703 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12705 * decl.c (xref_tag): Remove extraneous %s on dependent name
12708 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12710 * class.c (layout_vtable_decl): Fix off by one error on
12712 (build_vtt): Likewise.
12713 (build_ctor_vtbl_group): Likewise.
12715 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12717 * class.c (maybe_indent_hierarchy): New function.
12718 (dump_class_hierarchy_r): Add flags. Dump extra binfo
12719 information, if enabled. Use maybe_indent_hierarchy. Adjust
12721 (dump_class_hierarchy): Adjust prototype. Adjust output format.
12722 (dump_array, dump_vtable, dump_vtt): New functions.
12723 (finish_struct_1): Adjust hierarchy dumping.
12724 (initialize_vtable): Call dump_vtable.
12725 (build_vtt): Call dump_vtt.
12726 (build_ctor_vtbl_group): Call dump_vtable.
12727 * decl2.c (flag_dump_class_layout): Remove.
12728 (cxx_decode_option): Remove dump translation unit
12729 and dump class hierarchy check. Call dump_switch_p.
12730 (finish_file): Adjust dumping.
12731 (dump.c): Only dump base classes if not TDF_SLIM.
12732 Only dump namespace members if not TDF_SLIM.
12733 * optimize.c (dump_function): New function.
12734 (optimize_function): Call dump_function.
12735 * semantics.c (expand_body): Use dump_enabled_p.
12737 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
12740 Part missed from first commit
12741 * decl2.c (finish_anon_union): Copy context.
12743 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
12746 * optimize.c (remap_decl): Remap anonymous aggregate members too.
12748 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
12751 * semantics.c (expand_body): Don't optimize thunks.
12753 2001-05-25 Sam TH <sam@uchicago.edu>
12755 * cp-tree.h lex.h: Fix header include guards.
12757 2001-05-25 Mark Mitchell <mark@codesourcery.com>
12759 * decl.c (init_decl_processing): Tweak.
12761 2001-05-24 Mark Mitchell <mark@codesourcery.com>
12763 * decl.c (duplicate_decls): Tidy.
12764 (init_decl_processing): Always set flag_no_builtin.
12766 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
12769 * decl2.c (do_local_using_decl): Push the decls, even in a
12772 2001-05-22 Mark Mitchell <mark@codesourcery.com>
12774 * optimize.c (initialize_inlined_parameters): Don't set
12775 TREE_READONLY for a VAR_DECL taking the place of an inlined
12778 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
12780 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
12781 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
12784 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
12786 * parse.y: Refer to compound literals as such, not as
12787 constructor-expressions.
12789 2001-05-21 Mark Mitchell <mark@codesourcery.com>
12791 * call.c (build_op_delete_call): Ignore exception-specifications
12792 when looking for matching delete operators.
12793 * init.c (build_new_1): Compute whether or not the allocation
12794 function used is a placement allocation function or not, and
12795 communicate this information to build_op_delete_call.
12797 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
12799 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
12800 (build_vtbl_ref): Adjust.
12801 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
12802 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
12804 (unsupported_options): Correspondingly.
12806 * decl2.c (maybe_make_one_only): Check flag_weak, not
12807 supports_one_only().
12809 * cp-tree.def (START_CATCH_STMT): Lose.
12810 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
12811 * tree.c (cp_statement_code_p): Don't case it.
12812 * semantics.c (cp_expand_stmt): Likewise.
12813 * cp-tree.h (START_CATCH_TYPE): Lose.
12814 (HANDLER_TYPE): New.
12815 * except.c (expand_start_catch_block): Don't start any blocks.
12817 (expand_end_catch_block): Don't end any blocks.
12818 * parse.y (handler): Don't pass anything from finish_handler_parms
12820 * pt.c (tsubst_expr): Likewise.
12821 * semantics.c (begin_handler): Call note_level_for_catch here.
12822 (finish_handler_parms): Don't return anything.
12823 (genrtl_catch_block, begin_catch_block): Lose.
12824 (genrtl_handler): Call expand_start_catch here.
12826 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
12828 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
12829 (get_vtable_decl, build_vtt): Not here.
12831 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
12834 * optimize.c (update_cloned_parm): Copy addressability and other
12837 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12839 * pt.c (determine_specialization): Ignore artificial functions.
12841 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
12843 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
12844 (C_RID_CODE): Remove.
12845 * lex.c (cxx_init_options): Call set_identifier_size. Update.
12846 (init_parse): Don't do it here.
12848 2001-05-18 Diego Novillo <dnovillo@redhat.com>
12850 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
12851 function declaration to avoid stripping the symbol's attributes.
12853 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
12855 * decl.c (pushdecl): Adjust error string.
12856 (xref_tag): Adjust friend class injection warning. Remove the
12857 inherited name from the class shadowed scope.
12859 2001-05-17 Mark Mitchell <mark@codesourcery.com>
12861 * except.c (cp_protect_cleanup_actions): New function.
12862 (init_exception_processing): Don't set protect_cleanup_actions
12863 here. Do set lang_protect_cleanup_actions.
12865 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
12867 * spew.c (read_token): Call yyerror on all unexpected tokens.
12869 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
12871 * init.c (member_init_ok_or_else): Take a tree rather than
12873 (expand_member_init): Adjust.
12875 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
12877 * decl.c (duplicate_decls): Suppress warning about duplicate
12878 decls if the first decl is a friend.
12880 2001-05-12 Zack Weinberg <zackw@stanford.edu>
12882 * except.c (choose_personality_routine): Export. Add
12883 explanatory comment. Take an enum languages, not a boolean.
12884 (initialize_handler_parm): Adjust to match.
12885 * cp-tree.h: Prototype choose_personality_routine.
12886 * lex.c (handle_pragma_java_exceptions): New function.
12887 (init_cp_pragma): Register #pragma GCC java_exceptions.
12889 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
12891 * method.c (build_mangled_C99_name): Remove unused prototype.
12893 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
12895 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
12896 * typeck.c (get_member_function_from_ptrfunc,
12897 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
12898 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
12900 Reverted Geoff Keating's 2001-05-03's patch.
12902 2001-05-11 Ira Ruben <ira@apple.com>
12904 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
12906 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
12908 * cp-tree.h (finish_label_expr, lookup_label): Delete.
12909 * parse.y: Update for '&&'; don't issue warning here.
12910 * semantics.c (finish_label_expr): Delete.
12912 2001-05-07 Mark Mitchell <mark@codesourcery.com>
12914 * splay-tree.h (splay_tree_max): New function.
12915 (splay_tree_min): Likewise.
12917 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
12919 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
12920 (pfn_vflag_identifier): Define.
12921 Update comment about layout of pointer functions.
12922 (build_ptrmemfunc1): Update prototype.
12923 (expand_ptrmemfunc_cst): Update prototype.
12924 * decl.c (initialize_predefined_identifiers): Initialize
12925 pfn_vflag_identifier.
12926 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
12927 an extra field to the type.
12928 * expr.c (cplus_expand_constant): Pass 'flag' between
12929 expand_ptrmemfunc_cst and build_ptrmemfunc1.
12930 * typeck.c (get_member_function_from_ptrfunc): When
12931 FUNCTION_BOUNDARY < 16, look at additional field to determine
12932 if a pointer-to-member is a real pointer or a vtable offset.
12933 (build_ptrmemfunc1): Add new parameter to contain extra field.
12934 (build_ptrmemfunc): Pass the extra field around.
12935 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
12936 (pfn_from_ptrmemfunc): Ignore the extra field.
12938 2001-05-03 Mark Mitchell <mark@codesourcery.com>
12940 * cp-tree.h (flag_inline_trees): Update documentation.
12941 * decl.c (init_decl_processing): Adjust handling of
12942 flag_inline_functions and flag_inline_trees to support -O3.
12943 (grokfndecl): Set DECL_INLINE on all functions if that's what
12944 the user requested.
12945 (save_function_data): Clear DECL_INLINE in
12946 current_function_cannot_inline is non-NULL.
12947 * decl2.c (flag_inline_trees): Update documentation.
12949 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
12951 * dump.c (cp_dump_tree, USING_STMT case): New case.
12952 * tree.c (cp_statement_code_p): Add USING_STMT.
12953 * decl2.c (do_using_directive): Add the using directive statement.
12955 * tree.c (walk_tree): Reformat an if block.
12957 2001-05-02 Mark Mitchell <mark@codesourcery.com>
12959 * decl.c (compute_array_index_type): Don't try to do anything with
12960 the indices when processing a template.
12962 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12964 * call.c: NULL_PTR -> NULL.
12965 * class.c: Likewise.
12967 * decl.c: Likewise.
12968 * decl2.c: Likewise.
12969 * except.c: Likewise.
12970 * init.c: Likewise.
12971 * rtti.c: Likewise.
12972 * search.c: Likewise.
12973 * tree.c: Likewise.
12974 * typeck.c: Likewise.
12975 * typeck2.c: Likewise.
12977 2001-05-02 Mark Mitchell <mark@codesourcery.com>
12979 * decl2.c (do_using_directive): Revert previous patch.
12981 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
12983 * cp-tree.def (USING_STMT): New statement node.
12984 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
12985 * decl2.c (do_using_directive): Add USING_STMT to statement
12986 tree. Don't emit errors when processing template decl.
12987 * pt.c (tsubst_expr, USING_STMT case): New case.
12988 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
12990 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
12992 * call.c (build_new_op): Convert args from reference here.
12993 (build_conditional_expr): Don't convert here.
12995 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
12997 * spew.c (last_token_id): New static variable.
12998 (read_token): Set it here.
12999 (yyerror): Use it here.
13001 2001-04-30 Richard Henderson <rth@redhat.com>
13003 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
13004 * decl.c: Likewise.
13006 2001-04-30 Mark Mitchell <mark@codesourcery.com>
13008 * gxxint.texi: Remove.
13009 * Make-lang.in: Remove all traces of gxxint.texi.
13011 2001-04-30 Mark P Mitchell <mark@codesourcery.com>
13013 * decl2.c (start_static_initialization_or_destruction): Correct
13014 logic to handle the -fno-use-cxa-atexit case.
13016 2001-04-30 Mark Mitchell <mark@codesourcery.com>
13018 * optimize.c (update_cloned_parm): New function.
13019 (maybe_clone_body): Use it. Update the `this' parameter too.
13021 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
13023 * decl2.c (unsupported_options): Add new-abi.
13024 * lang-options.h: Remove no longer supported options.
13026 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
13028 * except.c (can_convert_eh): Don't check template parms,
13029 typename types etc.
13031 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
13033 * optimize.c (maybe_clone_body): Copy parameter names and locations.
13035 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
13037 * cp-tree.h (adjust_clone_args): Prototype new function.
13038 * class.c (adjust_clone_args): New function.
13039 * decl.c (start_function): Call it for in charge ctors.
13041 2001-04-26 Mark Mitchell <mark@codesourcery.com>
13043 * method.c (use_thunk): Make sure that thunks really are emitted
13046 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
13048 * mangle.c (write_chars): New macro.
13049 (hwint_to_ascii): New function
13050 (write_number): Use it.
13051 (write_integer_cst): Deal with really big numbers.
13053 2001-04-25 Mark Mitchell <mark@codesourcery.com>
13055 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
13058 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
13060 * decl.c (grokdeclarator): Set context of namespace scope
13063 2001-04-24 Zack Weinberg <zackw@stanford.edu>
13065 * cp/optimize.c: Include hashtab.h.
13066 (struct inline_data): Add tree_pruner.
13067 (expand_call_inline, expand_calls_inline): Use it when calling
13069 (optimize_function): Initialize and free tree_pruner.
13071 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
13073 Lazy __FUNCTION__ generation.
13074 * cp-tree.def (FUNCTION_NAME): Remove.
13075 * cp-tree.h (function_name_declared_p): Remove.
13076 (cp_fname_init): Prototype.
13077 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
13078 don't call declare_function_name. Call start_fname_decls.
13079 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
13080 clobber the line number.
13081 (cp_fname_init): New function.
13082 (start_function): Call start_fname_decls.
13083 (finish_function): Call finish_fname_decls.
13084 * lex.c (reswords): Add slots for __FUNCTION__ et al.
13085 (rid_to_yy): Add mappings for __FUNCTION__ et al.
13086 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
13087 * parse.y (VAR_FUNC_NAME): New token.
13088 (primary): Add VAR_FUNC_NAME.
13089 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
13091 (tsubst, FUNCTION_NAME case): Remove.
13092 (tsubst_copy, FUNCTION_NAME case): Remove.
13093 (tsubst_expr, DECL_STMT case): Be careful with a
13094 DECL_PRETTY_FUNCTION_P.
13095 (instantiate_decl): Remove function_name_declared_p.
13096 * semantics.c (begin_compound_statement): Don't call
13097 declare_function_name here.
13098 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
13099 (finish_translation_unit): Call finish_fname_decls.
13100 (expand_body): Remove function_name_declared_p.
13101 * typeck2.c (digest_init): Allow any ERROR_MARK.
13103 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
13105 * pt.c (tsubst_decl): Use VOID_TYPE_P.
13106 * semantics.c: Fix some typos.
13108 2001-04-23 Phil Edwards <pme@sources.redhat.com>
13110 * cp/decl2.c (flag_honor_std): Always initialize to 1.
13112 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13114 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
13116 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
13118 * except.c (build_throw): Wrap the initialization of the exception
13119 object in a MUST_NOT_THROW_EXPR.
13120 (do_free_exception): #if 0.
13122 2001-04-20 Mark Mitchell <mark@codesourcery.com>
13124 * cp-tree.h (finish_enum): Change prototype.
13125 * decl.c (finish_enum): Reorganize.
13126 * parse.y (structsp): Adjust calls to finish_enum.
13128 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
13130 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
13133 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
13135 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
13136 (layout_empty_base): Return at end flag.
13137 (build_base_field): Likewise.
13138 (build_base_fields): Likewise.
13139 (layout_virtual_bases): Don't add 1 to eoc value.
13140 (end_of_class): Use full size for empty bases.
13141 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
13142 empty bases. Don't add 1 to eoc value. Only add trailing padding
13143 if we're an empty class with no empty bases.
13144 (dump_class_hierarchy): Dump size and alignment.
13146 2001-04-20 Jakub Jelinek <jakub@redhat.com>
13148 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
13151 2001-04-20 Jakub Jelinek <jakub@redhat.com>
13153 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
13154 is found, look first if name does not match the structure name.
13156 2001-04-19 Mark Mitchell <mark@codesourcery.com>
13158 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
13160 (SET_DECL_LANGUAGE): New macro.
13161 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
13162 (pushdecl): Likewise.
13163 (build_library_fn_1): Likewise.
13164 (build_cp_library_fn): Likewise.
13165 (grokfndecl): Likewise.
13166 (grokvardecl): Mark `extern "C"' variables as having C linkage.
13167 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
13168 * lex.c (retrofit_lang_decl): Likewise.
13169 * mangle.c (mangle_decl_string): Don't mangle the names of
13170 variables declared with C language linkage.
13171 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
13173 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
13175 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
13176 flag_access_control from uninitialized storage.
13178 2001-04-15 Mark Mitchell <mark@codesourcery.com>
13180 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
13181 * mangle.c (write_pointer_to_member_type): Fix mangling of
13182 pointers to cv-qualified member function types.
13184 * init.c (build_delete): Create a SAVE_EXPR for the address if
13185 we're going to use it more than once.
13187 2001-04-13 Mark Mitchell <mark@codesourcery.com>
13189 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
13190 (expand_ptremfunc_cst): Change prototype.
13191 (delta2_from_ptrmemfunc): Remove.
13192 * expr.c (cplus_expand_constant): Adjust call to
13193 expand_ptrmemfunc_cst.
13194 * typeck.c (build_ptrmemfunc1): Simplify.
13195 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
13196 results in a constant.
13197 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
13198 (delta2_from_ptrmemfunc): Remove.
13199 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
13201 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
13203 * cp-tree.h (decl_namespace_list): New macro.
13204 (struct saved_scope): Add decl_ns_list.
13205 * decl.c (mark_saved_scope): Mark it.
13206 * decl2.c: Lose static decl_namespace_list.
13207 (init_decl2): Don't save it.
13209 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13211 * cp-tree.h (warn_return_type, yylex): Delete redundant
13214 * decl.c (current_class_depth, global_namespace): Likewise.
13216 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
13218 * repo.c (flag_use_repository): Likewise.
13220 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13222 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
13223 set_block, pushdecl, getdecls, gettags, init_decl_processing,
13224 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
13225 lvalue_or_else, print_lang_statistics, comp_target_types,
13226 unsigned_type, signed_type, signed_or_unsigned_type,
13227 build_function_call, mark_addressable, incomplete_type_error):
13228 Delete redundant declarations.
13230 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
13232 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
13233 (TYPE_ANONYMOUS_P): New macro.
13234 (TAGGED_TYPE_P): New macro.
13235 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
13236 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
13237 * tree.c (no_linkage_helper): Likewise.
13238 * semantics.c (begin_class_definition): Likewise.
13239 * pt.c (convert_template_argument): Likewise.
13240 * lex.c (check_for_missing_semicolon): Likewise.
13242 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
13244 * class.c (dfs_unshared_virtual_bases): New function.
13245 (mark_primary_bases): Call it.
13246 (check_bases): Ignore virtual bases when determining
13249 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
13251 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
13253 2001-04-11 Mark Mitchell <mark@codesourcery.com>
13255 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
13256 cloned function to the clone.
13258 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13260 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
13262 * semantics.c: Include expr.h.
13264 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
13266 * method.c (implicitly_declare_fn): Commonize code for copy ctor
13267 and assignment op. Set TREE_USED for parameter.
13269 2001-04-10 Mark Mitchell <mark@codesourcery.com>
13271 * class.c (find_final_overrider_data): Add `candidates'.
13272 (dfs_find_final_overrider): Don't issue error messages
13274 (find_final_overrider): Issue error messages here.
13275 (build_base_field): Don't warn about amgibuous direct bases here.
13276 (warn_about_ambiguous_direct_bases): New function.
13277 (layout_class_type): Use it.
13279 2001-04-10 Richard Henderson <rth@redhat.com>
13281 * typeck.c (build_array_ref): Push the array reference inside
13282 COMPOUND_EXPR and COND_EXPR.
13284 2001-04-05 Mark Mitchell <mark@codesourcery.com>
13286 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
13287 * decl.c (duplicate_decls): Adjust accordingly.
13288 (maybe_commonize_var): Likewise.
13289 (grokfndecl): Likewise.
13290 (start_function): Likewise.
13291 (start_method): Likewise.
13292 * decl2.c (key_method): Likewise.
13293 (import_export_decl): Likewise.
13294 * method.c (implicitly_declare_fn): Likewise.
13295 * optimize.c (maybe_clone_body): Likewise.
13297 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
13299 * lang-specs.h: Add __DEPRECATED.
13301 2001-04-05 J"orn Rennecke <amylaar@redhat.com>
13303 * search.c (get_dynamic_cast_base_type): When building a new
13304 constant, set its type to ssizetype.
13306 2001-04-04 Jakub Jelinek <jakub@redhat.com>
13308 * optimize.c (expand_call_inline): Only add newly inlined statements
13309 into inlined_stmts.
13311 2001-04-03 Mark Mitchell <mark@codesourcery.com>
13313 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
13314 (OPERATOR_FORMAT): Likewise.
13315 (OPERATOR_TYPENAME_FORMAT): Likewise.
13316 * operators.def: Remove old name-mangling information.
13317 * decl.c (grok_op_properties): Adjust accordingly.
13318 * lex.c (init_operators): Likewise.
13319 * rtti.c (get_tinfo_decl): Issue error messages about types that
13320 have variable size.
13322 2001-04-03 Mark Mitchell <mark@codesourcery.com>
13324 * decl2.c (import_export_decl): Don't call import_export_class
13325 when processing an inline member function.
13326 * semantics.c (expand_body): Call import_export_decl before
13327 emitting inline functions.
13329 2001-03-28 Richard Henderson <rth@redhat.com>
13331 IA-64 ABI Exception Handling:
13332 * cp-tree.def (EH_SPEC_BLOCK): New.
13333 (MUST_NOT_THROW_EXPR): New.
13334 * cp-tree.h: Update changed function declarations.
13335 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
13336 (CPTI_CALL_UNEXPECTED): New.
13337 (struct cp_language_function): Rename x_eh_spec_try_block
13338 to x_eh_spec_block.
13339 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
13340 * decl.c (current_binding_level): If no current function
13341 bindings, revert to scope_chain.
13342 (initialize_predefined_identifiers): Remove __cp_push_exception.
13343 (store_parm_decls): Use begin_eh_spec_block.
13344 (finish_function): Use finish_eh_spec_block.
13345 (mark_lang_function): Update for name changes.
13346 * decl2.c (finish_file): No mark_all_runtime_matches.
13347 * dump.c (cp_dump_tree): Handle new tree codes.
13348 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
13349 * except.c (catch_language_init, catch_language): Remove.
13350 (init_exception_processing): Don't set language code.
13351 Initialize call_unexpected_node, protect_cleanup_actions,
13352 eh_personality_libfunc, lang_eh_runtime_type.
13353 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
13354 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
13355 (prepare_eh_type): Split out type canonicalizations ...
13356 (build_eh_type_type): ... from here.
13357 (build_eh_type_type_ref): Remove.
13358 (mark_all_runtime_matches): Remove.
13359 (build_exc_ptr): New.
13360 (do_begin_catch, do_end_catch): New.
13361 (do_pop_exception): Remove.
13362 (build_terminate_handler): Remove.
13363 (choose_personality_routine): Split out language choice from ...
13364 (initialize_handler_parm): ... here.
13365 Use MUST_NOT_THROW_EXPR.
13366 (expand_start_catch_block): Use do_begin_catch. Simplify Java
13367 exception object handling.
13368 (expand_start_eh_spec, expand_end_eh_spec): Remove.
13369 (expand_exception_blocks, alloc_eh_object): Remove.
13370 (begin_eh_spec_block, finish_eh_spec_block): New.
13371 (do_allocate_exception, do_free_exception): New.
13372 (expand_throw): Merge into ...
13373 (build_throw): ... here. Update for abi.
13374 * expr.c (cplus_expand_expr): No expand_internal_throw.
13375 Handle MUST_NOT_THROW_EXPR.
13376 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
13377 * semantics.c (*) Update for except.h name changes.
13378 (genrtl_try_block): No protect_with_terminate.
13379 (genrtl_eh_spec_block): New.
13380 (genrtl_handler): Don't emit the goto here.
13381 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
13382 (genrtl_finish_function): Don't expand_exception_blocks.
13383 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
13385 2001-03-28 Richard Henderson <rth@redhat.com>
13387 * decl.c (struct named_label_list): Rename eh_region to
13388 in_try_scope, add in_catch_scope.
13389 (struct binding_level): Rename eh_region to is_try_scope,
13390 add is_catch_scope.
13391 (note_level_for_try): Rename from note_level_for_eh.
13392 (note_level_for_catch): New.
13393 (poplevel): Copy both is_try_scope and is_catch_scope to
13394 the named_label_list struct.
13395 (check_previous_goto_1): Don't check for catch block via
13396 DECL_ARTIFICIAL; use in_try_scope instead.
13397 (check_goto): Likewise.
13398 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
13399 * except.c (expand_start_catch_block): Call note_level_for_catch.
13400 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
13402 2001-03-27 Richard Henderson <rth@redhat.com>
13404 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
13405 exceptions_via_longjmp.
13407 2001-03-27 Phil Edwards <pme@sources.redhat.com>
13409 * pt.c (check_default_tmpl_args): Make error messages clearer.
13411 2001-03-26 Phil Edwards <pme@sources.redhat.com>
13413 * error.c: Also undefine 'A' macro used for cp_printers definition.
13415 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13417 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
13419 2001-03-26 Mike Yang <yang@research.att.com>
13420 Mark Mitchell <mark@codesourcery.com>
13422 * dump.c (dump_access): New function.
13423 (cp_dump_tree): Use it. Dump basetype information for class
13426 2001-03-26 Mark Mitchell <mark@codesourcery.com>
13428 * Makefile.in (optimize.o): Depend on params.h.
13429 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
13430 (init_decl_processing): Set flag_no_inline when doing
13432 * optimize.c: Include params.h.
13433 (struct inline_data): Improve documentation of FNS. Add
13434 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
13435 (INSNS_PER_STMT): New macro.
13436 (remap_block): Use CLONING_P.
13437 (inlinable_function_p): Don't inline big functions.
13438 (expand_call_inline): Keep track of how much inlining we've done.
13439 (optimize_function): Set FIRST_INLINED_FN.
13440 (maybe_clone_body): Set CLONING_P.
13441 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
13443 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
13444 rest_of_compilation. Clear DECL_RTL for local variables
13446 (clear_decl_rtl): New function.
13448 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
13451 * cp-tree.h (skip_type_access_control,
13452 reset_type_access_control): Prototype.
13453 * decl.c (grokdeclarator): Access of friends is not checked.
13454 * parse.y (component_decl_list): Reset type access control.
13455 * semantics.c (decl_type_access_control): Clear
13456 current_type_lookups.
13457 (save_type_access_control): Don't save if not deferring.
13458 (skip_type_access_control, reset_type_access_control): New
13460 (begin_class_definition): Do type access control for basetypes.
13461 Start deferred access control.
13462 (finish_class_definition): Resume immediate access control if
13463 this is a local class.
13465 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13467 * class.c (add_method): Use memcpy/memmove, not bcopy.
13469 * decl.c (duplicate_decls): Likewise.
13471 2001-03-23 Jakub Jelinek <jakub@redhat.com>
13473 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
13476 2001-03-23 Jakub Jelinek <jakub@redhat.com>
13478 * decl.c (local_names): Define.
13479 (push_local_name): New.
13480 (grok_reference_init): Return init if initializing static reference
13481 variable with non-constant instead of emitting it.
13482 Move expand_static_init call to cp_finish_decl.
13483 (layout_var_decl): Call push_local_name.
13484 (maybe_commonize_var): Allow inlining functions even if they have
13485 static local variables, use comdat_linkage for them if flag_weak.
13486 (check_initializer): Call obscure_complex_init if
13487 grok_reference_init returned nonzero.
13488 (save_function_data): Clear x_local_names.
13489 (pop_cp_function_context): Free x_local_names.
13490 (mark_inlined_fns): Remove.
13491 (mark_lang_function): Mark x_local_names.
13492 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
13493 Mark inlined_fns as tree, remove call to mark_inlined_fns.
13494 * class.c (alter_access): Ensure DECL_ACCESS is never set if
13495 DECL_DISCRIMINATOR_P.
13496 * cp-tree.h (cp_language_function): Add x_local_names.
13497 (lang_decl_flags): Add discriminator into u2.
13498 (lang_decl_inlined_fns): Remove.
13499 (lang_decl): inlined_fns is now a TREE_VEC.
13500 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
13501 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
13502 TREE_VEC, not a custom structure.
13503 (optimize_function): Likewise.
13504 * mangle.c (discriminator_for_local_entity): Discriminate among
13505 VAR_DECL local entities.
13506 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
13509 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
13511 Add support for Java interface method calls.
13512 * cp-tree.h (struct lang_type): Add java_interface flag.
13513 (TYPE_JAVA_INTERFACE): New macro.
13514 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
13515 by setting TYPE_JAVA_INTERFACE.
13516 * call.c (java_iface_lookup_fn): New static.
13517 (build_over_call): If calling a method declared in a
13518 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
13519 expression which resolves the function address.
13520 (build_java_interface_fn_ref): New function.
13522 2001-03-22 Richard Henderson <rth@redhat.com>
13524 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
13525 * except.c: Don't include it.
13527 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
13528 based on an idea from Joe Buck <jbuck@synopsys.com>
13530 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
13532 (data_def, component_decl): Add reductions to bad_decl.
13534 2001-03-22 Jakub Jelinek <jakub@redhat.com>
13536 * method.c (do_build_assign_ref): Don't use build_modify_expr for
13537 anonymous aggregates, since they don't have assignment operator
13539 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
13540 assignment operators for anonymous structure fields.
13542 2001-03-21 Jason Merrill <jason@redhat.com>
13544 * pt.c (instantiate_decl): Abort if we see a member constant
13545 instantiation that doesn't already have its initializer.
13546 Downgrade explicit instantiation without definition to pedwarn.
13548 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
13549 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
13550 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
13552 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
13553 (pending_vtables): Remove.
13554 * decl2.c (pending_vtables): Remove.
13555 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
13556 CLASSTYPE_VTABLE_NEEDS_WRITING.
13557 (import_export_class): Likewise.
13558 (init_decl2): Don't mark pending_vtables.
13559 * lex.c (handle_pragma_vtable): Just sorry.
13560 * pt.c (instantiate_class_template): Don't mess with
13561 CLASSTYPE_VTABLE_NEEDS_WRITING.
13562 (mark_class_instantiated): Likewise.
13563 * ptree.c (print_lang_type): Don't print it.
13564 * semantics.c (begin_class_definition): Don't set it.
13566 * pt.c (template_tail): Replace with last_pending_template.
13567 (maybe_templates, maybe_template_tail): Remove.
13568 (add_pending_template): Adjust.
13569 (instantiate_pending_templates): Adjust.
13571 * cp-tree.h (struct saved_scope): Remove lang_stack field.
13572 (current_lang_stack): Remove.
13573 * decl.c (maybe_push_to_top_level): Don't initialize it.
13574 (duplicate_decls): Use current_lang_depth.
13575 (xref_basetypes): Likewise.
13576 * class.c (current_lang_depth): New fn.
13577 (push_lang_context): Use more varray functionality.
13578 (pop_lang_context): Likewise.
13580 * error.c (GLOBAL_THING): Always use '__'.
13582 2001-03-21 Mark Mitchell <mark@codesourcery.com>
13584 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
13586 * mangle.c (mangle_decl_string): Mangle the names of overloaded
13587 operators, even when they have `extern "C"' linkage.
13589 2001-03-19 Mark Mitchell <mark@codesourcery.com>
13591 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
13592 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13593 where it's not necessary.
13594 (add_method): Remove optimization involving comparison of
13595 DECL_ASSEMBLER_NAME.
13596 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
13597 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13598 where it's not necessary.
13599 (check_methods): Likewise.
13600 (build_clone): Likewise.
13601 (built_vtt): Likewise.
13602 * cp-tree.h (DECL_NEEDED_P): Likewise.
13603 * decl.c (pushtag): Likewise.
13604 (duplicate_decls): Likewise.
13605 (pushdecl): Likewise.
13606 (builtin_function): Likewise.
13607 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
13608 (build_cp_library_fn): Likewise.
13609 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
13610 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13611 where it's not necessary.
13612 (make_rtl_for_nonlocal_decl): Likewise.
13613 (cp_finish_decl): Likewise.
13614 (grokfndecl): Likewise.
13615 (grokvardecl): Likewise.
13616 (grokdeclarator): Likewise.
13617 (start_function): Likewise.
13618 (cp_missing_return_ok_p): Likewise.
13619 * decl2.c (grokclassfn): Likewise.
13620 (check_classfn): Likewise.
13621 (finish_static_data_member_decl): Likewise.
13622 (grokfield): Likewise.
13623 * error.c (GLOBAL_IORD_P): Remove.
13624 (dump_global_iord): Improve output.
13625 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
13626 * except.c (nothrow_libfn_p): Summarily reject any function not in
13628 * init.c (build_java_class_ref): Don't explicitly set
13629 DECL_ASSEMBLER_NAME after calling mangle_decl.
13630 * mangle.c (mangle_decl_string): Handle extern "C" functions.
13631 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
13632 * method.c (set_mangled_name_for_decl): Don't explicitly set
13633 DECL_ASSEMBLER_NAME after calling mangle_decl.
13634 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
13635 IDENTIFIER_GLOBAL_VALUE for the thunk.
13636 * pt.c (set_mangled_name_for_template_decl): Remove.
13637 (check_explicit_specialization): Don't use it.
13638 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
13639 (tsubst_friend_function): Likewise.
13640 (tsubst_decl): Likewise.
13641 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
13642 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
13643 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13644 where it's not necessary.
13645 (tinfo_base_init): Likewise.
13646 (create_real_tinfo_var): Likewise.
13647 * search.c (looup_field_1): Likewise.
13648 * semantics.c (finish_named_return_value): Likewise.
13649 * tree.c (init_tree): Set lang_set_decl_assembler_name.
13651 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
13653 Correct semantics restrictions checking in throw-expression.
13654 * except.c (is_admissible_throw_operand): New function.
13655 (build_throw): Use it.
13657 2001-03-14 Mark Mitchell <mark@codesourcery.com>
13659 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
13662 2001-03-14 Mark Mitchell <mark@codesourcery.com>
13664 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13665 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
13666 * decl.c (duplicate_decls): Likewise.
13667 (builtin_function): Likewise.
13668 (build_library_fn): Likewise.
13669 (build_cp_library_fn): Likewise.
13670 (check_initializer): Likewise.
13671 (cp_finish_decl): Likewise.
13672 * decl2.c (grokfield): Likewise.
13673 (grok_function_init): Remove #if 0'd code.
13674 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13675 * friend.c (do_friend): Likewise.
13676 * init.c (get_temp_regvar): Likewise.
13677 * method.c (make_thunk): Likewise.
13678 * pt.c (tsubst_friend_function): Likewise.
13679 (tsubst_decl): Likewise.
13680 (regenerate_decl_from_template): Likewise.
13681 * semantics.c (genrtl_named_return_value): Likewise.
13682 (expand_body): Likewise.
13683 (genrtl_finish_function): Likewise.
13684 * tree.c (cp_tree_equal): Likewise.
13686 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
13688 * call.c (convert_like_real): Add extra semantics to INNER
13689 parameter. Don't convert to temporary if a user conversion
13690 gives us an lvalue that we're about to bind to a reference.
13691 Set INNER to indicate pending reference binding on recursive
13694 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
13696 * cp/lex.c: Delete duplicate pending_lang_change.
13698 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
13700 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
13702 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
13703 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
13705 2001-03-09 Zack Weinberg <zackw@stanford.edu>
13707 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
13709 2001-03-08 Stan Shebs <shebs@apple.com>
13711 * cp-tree.h (set_identifier_local_value): Remove unused decl.
13713 2001-03-06 Zack Weinberg <zackw@stanford.edu>
13715 * spew.c: Remove references to CPP_OSTRING.
13717 2001-03-06 Andrew Haley <aph@redhat.com>
13719 * typeck.c (convert_arguments): Check that we have an fndecl.
13721 2001-03-05 Andrew Haley <aph@redhat.com>
13723 * typeck.c (convert_arguments): Don't do ellipsis conversion for
13724 __built_in_constant_p.
13726 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
13728 * typeck.c (build_static_cast): Allow enum to enum conversions
13731 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
13733 * class.c (check_field_decls): Pointers to member do not a
13734 non-pod struct make, as per DR 148.
13736 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
13738 * call.c (joust): cp_pedwarn when using gnu extension concerning
13739 worst conversion sequences.
13741 2001-03-01 Zack Weinberg <zackw@stanford.edu>
13743 * decl.c: Replace all uses of 'boolean' with 'bool'.
13745 2001-03-01 Zack Weinberg <zackw@stanford.edu>
13747 * lang-specs.h: Add zero initializer for cpp_spec field to
13748 all array elements that need one. Don't put an #ifdef inside
13749 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
13752 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
13754 Implement using decls inside template functions.
13755 * decl2.c (validate_nonmember_using_decl): Don't special case
13756 fake_std_node in the global namespace. Don't reject early when
13757 processing a template.
13758 (do_local_using_decl): Add to statement tree. Don't do further
13759 processing when building a template.
13760 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
13762 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
13764 * decl2.c (do_nonmember_using_decl): Don't complain if we find
13765 same function. Do complain about ambiguating extern "C"
13768 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
13770 Remove floating point and complex type template constant parms.
13771 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
13772 COMPLEX_TYPE extensions.
13773 (invalid_nontype_parm_type_p): Likewise.
13775 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
13777 * except.c (call_eh_info): Revert "match_function"'s type.
13779 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
13781 Fix ctor vtable vcall offsets.
13782 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
13783 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
13784 (get_matching_base): Remove.
13785 (get_original_base): New function.
13786 (build_vtbl_initializer): Initialize vid.rtti_binfo.
13787 Use a virtual thunk for a ctor vtable with an index
13788 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
13789 primary base within a constructor vtable. Only set
13790 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
13791 when primary base has been lost.
13792 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
13794 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
13796 * call.c (joust): Ensure more_specialized()'s argument length
13797 parameter has correct value for constructors.
13799 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
13801 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
13803 * decl.c (mark_inlined_fns): Prototype.
13805 2001-02-22 Mark Mitchell <mark@codesourcery.com>
13807 * spew.c (yylex): Correct handling of friends.
13809 2001-02-22 Mark Mitchell <mark@codesourcery.com>
13811 * mangle.c (write_encoding): Pass write_function_type the
13812 FUNCTION_DECL for the function being encoded.
13813 (write_function_type): Pass it along to write_bare_function_type.
13814 (write_bare_function_type): Pass it along to write_method_parms.
13815 (write_method_parms): Don't mangle the compiler-generated
13816 parameters to a constructor or destructor.
13818 2001-02-22 Andreas Jaeger <aj@suse.de>
13820 * optimize.c: Include toplev.h for
13821 note_deferral_of_defined_inline_function prototype.
13823 2001-02-22 Jakub Jelinek <jakub@redhat.com>
13825 * cp-tree.h (struct lang_decl_inlined_fns): New.
13826 (struct lang_decls): Add inlined_fns.
13827 (DECL_INLINED_FNS): New macro.
13828 * optimize.c (struct inline_data): Add inlined_fns.
13829 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
13830 (inlinable_function_p): Likewise, fix typo in comment,
13831 function is not inlinable if it already inlined function currently
13833 (expand_call_inline): Add fn to inlined_fns if necessary.
13834 (optimize_function): Initialize inlined_fns.
13835 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
13836 * decl.c (mark_inlined_fns): New function.
13837 (lang_mark_tree): Call it.
13839 2001-02-21 Jason Merrill <jason@redhat.com>
13841 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
13842 (DECL_UNINLINABLE): Move to middle-end.
13844 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
13845 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
13846 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
13847 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
13848 parms and outer BLOCK. note_deferral_of_defined_inline_function.
13850 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
13851 second parm of op=.
13853 2001-02-19 Mark Mitchell <mark@codesourcery.com>
13855 * decl2.c (set_decl_namespace): Allow explicit instantiations in
13858 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13860 * optimize.c (expand_call_inline): Don't walk subtrees of type
13863 2001-02-18 Mark Mitchell <mark@codesourcery.com>
13865 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
13868 2001-02-18 Jason Merrill <jason@redhat.com>
13870 Do put the VTT parameter in DECL_ARGUMENTS.
13871 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
13872 (current_vtt_parm): New macro.
13873 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
13874 (DECL_HAS_VTT_PARM_P): New macro.
13875 (DECL_VTT_PARM): Remove.
13876 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
13877 * decl.c (duplicate_decls): Only copy the operator code if
13879 (start_function): Set current_vtt_parm.
13880 (lang_mark_tree): Don't mark vtt_parm.
13881 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
13882 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
13883 * class.c (build_clone): Maybe remove the VTT parm.
13884 * optimize.c (maybe_clone_body): Set up the VTT parm.
13885 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
13886 * call.c (build_over_call): Just allow the VTT arg.
13887 * method.c (make_thunk): Don't set DECL_VTT_PARM.
13888 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
13889 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
13890 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
13891 * error.c (dump_function_decl): Likewise.
13892 * call.c (build_user_type_conversion_1, convert_like_real): Abort
13893 if we try to call a constructor with in-charge or VTT parms.
13894 * method.c (skip_artificial_parms_for): New fn.
13895 * call.c (add_function_candidate, build_over_call): Call it.
13896 * call.c (build_new_method_call): Use current_vtt_parm.
13897 * init.c (expand_virtual_init): Likewise.
13898 * class.c (same_signature_p): No longer static.
13899 * cp-tree.h: Declare it.
13900 * search.c (look_for_overrides_r): Use it.
13902 2001-02-17 Mark Mitchell <mark@codesourcery.com>
13904 * cp-tree.h (new_abi_rtti_p): Remove.
13905 (name_mangling_version): Likewise.
13906 (flag_do_squangling): Likewise.
13907 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
13908 * decl.c (grokfndecl): Likewise.
13909 * decl2.c (name_mangling_version): Remove.
13910 (flag_do_squangling): Likewise.
13911 (lang_f_options): Remove `squangle'.
13912 (unsupported_options): Add `squangle'.
13913 (cxx_decode_option): Issue a warning about uses of
13914 -fname-mangling-version.
13915 (finish_file): Remove old ABI support.
13916 * pt.c (check_explicit_specialization): Likewise.
13917 (tsubst_decl): Likewise.
13918 * rtti.c (init_rtti_processing): Likewise.
13919 (build_headof): Likewise.
13920 (get_tinfo_decl_dynamic): Likewise.
13921 (tinfo_from_decl): Likewise.
13922 (build_dynamic_cast_1): Likewise.
13923 (synthesize_tinfo_var): Likewise.
13924 * init.c (build_new): Allow enumeration types for the array-bounds
13925 in a direct-new-declarator.
13927 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
13929 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
13930 TREE_PROTECTED from the template being specialized.
13932 2001-02-17 Jason Merrill <jason@redhat.com>
13934 * decl2.c (build_artificial_parm): Set TREE_READONLY.
13936 * decl.c (bad_specifiers): Allow throw specs on things with
13937 pointer-to-function or -member-function type.
13938 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
13941 2001-02-17 Mark Mitchell <mark@codesourcery.com>
13943 * call.c (check_dtor_name): Handle template names correctly.
13945 2001-02-16 Jason Merrill <jason@redhat.com>
13947 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
13948 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
13949 * optimize.c (maybe_clone_body): Don't substitute it.
13950 * call.c (build_new_method_call): Check in_chrg instead.
13951 * init.c (expand_virtual_init): Likewise.
13953 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
13955 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
13956 class-type introduces at least a type-name.
13958 2001-02-16 Jakub Jelinek <jakub@redhat.com>
13960 * call.c (convert_like_real): Create a temporary for non-lvalue.
13962 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
13964 * cp-tree.h: Fix typos in comments.
13966 2001-02-16 Jason Merrill <jason@redhat.com>
13968 * optimize.c (remap_block): If we're compiling a clone, pass the
13969 new block to insert_block.
13971 2001-02-16 Mark Mitchell <mark@codesourcery.com>
13973 * semantics.c (finish_asm_stmt): Robustify.
13975 2001-02-15 Mark Mitchell <mark@codesourcery.com>
13977 * pt.c (push_template_decl_real): Don't remangle the name of a
13980 2001-02-15 Jim Meyering <meyering@lucent.com>
13982 * Make-lang.in (c++.install-common): Depend on installdirs.
13983 (c++.install-info): Likewise.
13984 (c++.install-man): Likewise.
13986 2001-02-15 Mark Mitchell <mark@codesourcery.com>
13988 * typeck2.c (build_m_component_ref): Robustify.
13990 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
13992 * friend.c (do_friend): Don't take the nested [template] class
13993 into account when deciding whether to warn about the friend
13994 function not referring to a template function.
13996 2001-02-14 Jakub Jelinek <jakub@redhat.com>
13998 * typeck.c (build_unary_op): Clarify error message.
14000 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
14002 * parse.y (component_constructor_declarator): allow optional
14003 parentheses around constructor class name.
14005 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14007 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
14009 * init.c (emit_base_init): Remove incorrect comment about
14011 * method.c (make_thunk): Fix comment alignment.
14013 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14015 Kill remnants of this is variable.
14016 * cp-tree.h (flag_this_is_variable): Remove.
14017 * decl2.c (flag_this_is_variable): Remove.
14018 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
14019 (build_vbase_path): The path is non-static, even in a cdtor.
14020 (resolves_to_fixed_type_p): Add additional return value.
14021 * search.c (init_vbase_pointers): Adjust.
14022 * tree.c (lvalue_p_1): Adjust.
14023 * typeck.c (mark_addressable): Adjust.
14025 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14027 * pt.c (unify): Don't check cv quals of array types.
14029 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14031 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
14032 check whether we already have the type.
14034 2001-02-13 Mark Mitchell <mark@codesourcery.com>
14036 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
14037 * call.c (build_op_delete_call): Simplify to remove duplicate
14039 * class.c (clone_function_decl): Don't build the deleting variant
14040 of a non-virtual destructor.
14041 * decl.c (finish_destructor_body): Don't call delete if this is a
14042 non-virtual destructor.
14043 * init.c (build_delete): Explicitly call `operator delete' when
14044 deleting an object with a non-virtual destructor.
14046 2001-02-13 Jason Merrill <jason@redhat.com>
14048 * lang-specs.h: Add more __EXCEPTIONS.
14050 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
14052 * typeck2.c (process_init_constructor): Check
14053 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
14055 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
14057 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
14058 Remove spurious information in comment. Allow further
14059 adjustments of REFERENCE_TYPE args.
14061 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
14063 * errfn.c (cp_deprecated): Tweak diagnostic text.
14064 * parse.y (new_initializer): Deprecate initializer lists
14067 2001-02-12 Mark Mitchell <mark@codesourcery.com>
14069 Remove old ABI support.
14071 2001-02-11 Mark Mitchell <mark@codesourcery.com>
14073 * decl2.c (flag_vtable_thunks): Always set it to 1.
14074 (flag_new_abi): Likewise.
14075 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
14077 * Makefile.in (g++spec.o): Fix typo.
14079 2001-02-09 Jason Merrill <jason@redhat.com>
14081 * lang-specs.h: Restore definition of __EXCEPTIONS.
14083 2001-02-08 Jason Merrill <jason@redhat.com>
14085 * search.c (shared_member_p): New function.
14086 (lookup_field_r): Use it.
14087 * cp-tree.h (SHARED_MEMBER_P): Remove.
14089 * method.c (process_overload_item): Handle template-dependent array
14091 * pt.c (type_unification_real): If we end up with undeduced nontype
14094 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
14097 * typeck2.c (friendly_abort): Don't say anything if we have
14098 earlier errors or sorries.
14100 * decl.c (check_tag_decl): Notice attempts to redefine bool and
14101 wchar_t. Ignore if in_system_header.
14103 * decl.c (maybe_push_cleanup_level): New fn...
14104 (start_decl_1): ...split out from here.
14105 * cvt.c (build_up_reference): Use it.
14106 * cp-tree.h: Declare it.
14108 2001-02-07 Mark Mitchell <mark@codesourcery.com>
14110 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
14113 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
14115 * pt.c (lookup_template_class): Make sure it's a primary
14116 template or template_template_parm when called from the parser.
14117 (instantiate_template_class): Add assertion.
14119 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
14121 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
14122 from error_mark_node.
14124 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
14126 Fix specification and implementation bugs in V3 ABI
14127 construction vtables.
14128 * cp-tree.h (flag_dump_class_layout): New flag.
14129 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
14130 (BINFO_LOST_PRIMARY_P): New flag.
14131 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
14132 (BINFO_PRIMARY_MARKED_P): Rename to ...
14133 (BINFO_PRIMARY_P): ... here.
14134 (binfo_via_virtual): New prototype.
14135 * decl2.c (flag_dump_class_layout): New flag.
14136 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
14137 use `=' as a file name separator.
14138 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
14140 (build_vtbl_address): If this is a virtual primary base, then
14141 get the vtbl of what it is ultimately primary for.
14142 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
14143 for BINFO_PRIMARY_P.
14144 (dfs_skip_nonprimary_vbases_markedp): Likewise.
14145 (get_shared_vbase_if_not_primary): Likewise.
14146 (dfs_get_pure_virtuals): Likewise.
14147 (expand_upcast_fixups): Likewise.
14148 (fixup_virtual_upcast_offsets): Likewise.
14149 (dfs_find_vbase_instance): Likewise.
14150 (find_vbase_instance): Likewise.
14151 (binfo_from_vbase): Adjust comment to reflect reality.
14152 (binfo_via_virtual): New function.
14153 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
14154 for binfo walking during VTT construction.
14155 (dfs_mark_primary_bases): Remove.
14156 (force_canonical_binfo_r): New function.
14157 (force_canonical_binfo): New function.
14158 (mark_primary_virtual_base): New function.
14159 (mark_primary_bases): Walk in inheritance graph order, use
14160 mark_primary_virtual_base.
14161 (determine_primary_base): Use some more intermediate variables.
14162 (dfs_find_final_overrider): Don't check for overriding along a
14164 (dfs_modify_vtables): Walk into primary virtual bases too.
14165 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
14166 (build_base_fields): Likewise.
14167 (dfs_set_offset_for_unshared_vbases): Likewise.
14168 (layout_virtual_bases): Likewise.
14169 (end_of_class): Likewise.
14170 (finish_struct_1): Call dump_class_hierarchy, if requested.
14171 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
14172 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
14173 (dump_class_hierarchy): Add file parameter. Append to file, if
14175 (finish_vtbls): Adjust accumulate_vtbl_inits call.
14176 Use canonical base for virtual bases.
14177 (build_vtt): Add more comments. Adjust build_vtt_inits call.
14178 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
14179 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
14180 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
14182 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
14183 from DATA. We want virtual primary bases and all bases via virtual.
14184 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
14185 virtual base when not a construction vtable.
14186 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
14187 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
14188 Use canonical bases when processing virtual bases.
14189 (accumulate_vtbl_inits): We're interested in any base via a
14191 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
14192 within a construction vtable, determine what is being overridden.
14193 (build_vtbl_initializer): Add more comments
14194 (add_vcall_offset_vtbl_entries_1): Adjust comment.
14195 (build_rtti_vtbl_entries): Check if the base has lost its
14198 2001-02-05 Mark Mitchell <mark@codesourcery.com>
14200 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
14202 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14204 * decl.c (pushdecl): Call abort instead of fatal.
14205 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
14206 * init.c (build_new_1): Likewise.
14207 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
14208 * decl.c (build_typename_type): hash_table_init now returns void.
14209 decl.c (init_decl_processing): Make an error non-fatal.
14211 2001-02-04 Mark Mitchell <mark@codesourcery.com>
14213 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
14215 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
14216 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
14217 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
14218 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
14219 * decl.c (maybe_commonize_var): Use the new name-mangling where
14221 * decl2.c (comdat_linkage): Enhance comments. Make all
14222 compiler-generated things static, if COMDAT is not available.
14223 (get_tinfo_decl): Do not make typeinfo objects that belong in the
14225 (tinfo_base_init): Use the correct mangled name for typeinfo
14226 strings, and push them into the global scope.
14227 (typeinfo_in_lib_p): New function.
14228 (synthesize_tinfo_var): Use it.
14229 (create_real_tinfo_var): Likewise.
14231 2001-02-03 Jakub Jelinek <jakub@redhat.com>
14233 * decl.c (push_class_binding): Use context_for_name_lookup instead
14234 of CP_DECL_CONTEXT.
14235 * search.c (context_for_name_lookup): Remove static. Check for NULL
14236 context in the loop.
14237 * cp-tree.h (context_for_name_lookup): Add prototype.
14239 2001-02-02 Jakub Jelinek <jakub@redhat.com>
14241 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
14242 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
14244 * call.c (convert_class_to_reference, build_user_type_conversion_1,
14245 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
14247 2001-02-02 Mark Mitchell <mark@codesourcery.com>
14249 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
14250 of macros used when compiling g++spec.c.
14251 * g++spec.c (lang_specific_driver): Link with the shared
14254 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
14256 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
14257 make_reference_declarator, make_call_declarator), method.c
14258 (implicitly_declare_fn), parse.y (namespace_using_decl,
14259 notype_unqualified_id, expr_or_declarator, new_type_id,
14260 after_type_declarator, direct_after_type_declarator,
14261 notype_declarator, complex_notype_declarator,
14262 complex_direct_notype_declarator, qualified_id,
14263 notype_qualified_id, overqualified_id, direct_new_declarator,
14264 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
14265 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
14266 instead of build_parse_node.
14268 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14270 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
14271 (minus_one_node): Moved to top level gcc directory. Renamed
14272 to integer_minus_one_node.
14274 * init.c (init_init_processing): Don't set minus_one_node.
14275 (build_vec_init): Use integer_minus_one_node.
14277 * rtti.c (get_tinfo_decl_dynamic): Likewise.
14279 2001-01-28 Jakub Jelinek <jakub@redhat.com>
14281 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
14282 identical and they would be replaced with constant, remove
14283 MODIFY_EXPR from the tree.
14285 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14287 * Make-lang.in: Remove all dependencies on defaults.h.
14288 * call.c: Don't include defaults.h.
14289 * decl.c: Likewise.
14290 * decl2.c: Likewise.
14291 * except.c: Likewise.
14293 * rtti.c: Likewise.
14294 * tree.c: Likewise.
14295 * typeck.c: Likewise.
14297 2001-01-25 Jakub Jelinek <jakub@redhat.com>
14299 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
14300 operators even in "C" linkage.
14301 * method.c (set_mangled_name_for_decl): Likewise.
14302 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
14303 overloaded operators in "C" linkage.
14305 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
14307 * pt.c (tsubst_decl): Remove IN_DECL parameter.
14308 (tsubst_arg_types): Check parameter is not void.
14309 (tsubst): Adjust tsubst_decl call.
14311 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
14313 * call.c (add_builtin_candidate): Quote std properly, from
14316 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14318 * pt.c (check_explicit_specialization): Clone constructors and
14321 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
14323 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
14324 indicates anything special about template depth. Make sure we
14325 only count the user visible template classes.
14327 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
14329 * call.c (build_conv): Typo in comment.
14330 (add_builtin_candidate): Add more explanation.
14331 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
14332 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
14333 when we have enumeral types.
14334 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
14335 candidates for relops and eqops.
14336 (joust): Simplify control flow. Allow a non-template user
14337 function to hide a builtin.
14339 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
14341 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
14342 (more_specialized): Add deduction parameter.
14343 * call.c (joust): Adjust more_specialized call.
14344 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
14345 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
14346 (get_bindings_order): Remove.
14347 (get_bindings_real): Add DEDUCE parameter.
14348 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
14349 REFERENCE_TYPE jig for DEDUCE_ORDER.
14350 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
14351 maybe_adjust_types_for_deduction.
14352 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
14354 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
14355 (check_cv_quals_for_unify): Use new unify qualifier flags.
14356 (unify): Clear new unify qualifier flags.
14357 (get_bindings_real): Add DEDUCE parameter.
14358 (get_bindings): Adjust call to get_bindings_real.
14359 (get_bindings_overload): Likewise.
14360 (most_specialized_instantiation): Adjust call to
14363 2001-01-19 Jason Merrill <jason@redhat.com>
14365 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
14367 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
14370 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
14372 * decl2.c (arg_assoc_class): Fix double iteration logic.
14374 2001-01-19 Jason Merrill <jason@redhat.com>
14376 * init.c (build_delete): Always call convert_force to strip cv-quals.
14378 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
14379 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
14380 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
14382 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14384 * search.c (get_vbase_1): Count only virtual bases.
14386 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14388 * class.c (duplicate_tag_error): Robustify flag clearing.
14390 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14392 * cp-tree.h (lookup_template_class): Add complain parm.
14393 * decl.c (lookup_namespace_name): Adjust call to
14394 lookup_template_class.
14395 (make_typename_type): Likewise.
14396 * semantics.c (finish_template_type): Likewise.
14397 * pt.c (lookup_template_class): Add complain parm. Adjust.
14398 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
14399 (tsubst): Likewise.
14401 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14403 * pt.c (copy_default_args_to_explicit_spec): Preserve
14404 object's CV quals. Reorganize.
14406 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14408 * typeck.c (build_modify_expr): Say `initialization' for
14410 * init.c (build_default_init): Convert to enumeral type, if
14413 2001-01-18 Jakub Jelinek <jakub@redhat.com>
14415 * parse.y (nomods_initdcl0): Properly set things up for
14418 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14420 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
14421 (type_unification_real): Set it.
14424 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14426 * decl.c (finish_destructor_body): Convert to vbase pointer here.
14428 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14430 * semantics.c (begin_class_definition): Check we're not inside a
14431 template parm list.
14433 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14435 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
14438 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14440 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
14441 * call.c (build_over_call): Add comment.
14443 2001-01-16 Daniel Berlin <dberlin@redhat.com>
14445 * cvt.c (ocp_convert): Handle vector type conversion
14446 * typeck2.c (digest_init): Handle vector type initializations
14448 2001-01-16 Phil Edwards <pme@sources.redhat.com>
14450 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
14453 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
14455 * pt.c (check_nontype_parm): Rename to ...
14456 (invalid_nontype_parm_type_p): ... here.
14457 (process_template_parm): Adjust.
14458 (convert_template_argument): Adjust.
14460 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
14462 * pt.c (check_nontype_parm): New function.
14463 (process_template_parm): Use it.
14464 (convert_template_argument): Use it.
14465 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
14468 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
14470 * tree.c: Add defaults.h
14471 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
14472 * Make-lang.in (cp/tree.o): Add defaults.h.
14474 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
14476 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
14478 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
14480 * g++.1: Change to be ".so man1/gcc.1".
14482 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
14484 * Make-lang.in (c++.info, c++.install-info): Build and install g++
14486 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
14487 ($(srcdir)/cp/g++int.info): New target.
14488 * gxxint.texi: Add info directory entry. Use @@ in email address.
14489 * .cvsignore: Update.
14491 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
14493 * typeck.c (build_c_cast): Do template processing earlier.
14494 Always pedwarn on array casts.
14496 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
14498 * friend.c (make_friend_class): Make sure a templated class is
14499 actually a template.
14501 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14503 * decl2.c (get_guard): Set linkage from guarded decl.
14505 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14507 * call.c (convert_default_arg): Check for unprocessed
14509 * cp-tree.h (replace_defarg): Move to spew.c.
14510 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
14511 spew.c, which is where they really are.
14512 (done_pending_defargs): Declare.
14513 (unprocessed_defarg_fn): Declare.
14514 * decl.c (replace_defarg): Move to spew.c
14515 * parse.y (structsp): Call done_pending_defargs.
14516 * spew.c (defarg_fns): Rearrange list structure.
14517 (defarg_fnsdone): New static variable.
14518 (defarg_depfns): New static variable.
14519 (init_spew): Adjust.
14520 (add_defarg_fn): Store the type in TREE_TYPE.
14521 (do_pending_defargs): Detect and deal with ordering constraints
14523 (done_pending_defargs): New function.
14524 (unprocessed_defarg_fn): New function.
14525 (replace_defarg): Moved from decl.c. Robustify. Don't save
14526 if circularity detected.
14528 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14530 * pt.c (unify): Check array has a domain, before checking
14531 whether it is variable sized.
14533 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14535 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
14536 parameters with pointers to arrays of unknown bound.
14538 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14540 * parse.y (template_parm_header, template_spec_header): New
14541 reductions. Split out from ...
14542 (template_header): ... here. Use them.
14543 (template_template_parm): Use template_parm_header.
14544 * semantics.c (finish_template_template_parm): Add assert.
14546 2001-01-10 Mark Mitchell <mark@codesourcery.com>
14548 * mangle.c (write_builtin_type): Fix thinko.
14550 * pt.c (copy_default_args_to_explicit_spec_1): New function.
14551 (copy_default_args_to_explicit_spec): Likewise.
14552 (check_explicit_specialization): Use it.
14554 * class.c (finish_struct_1): Remove last argument in call to
14555 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
14556 * decl.c (builtin_function): Likewise.
14557 (build_cp_library_fn): Likewise.
14558 (check_initializer): Likewise.
14559 (make_rtl_for_nonlocal_decl): Likewise.
14560 (cp_finish_decl): Likewise.
14561 (start_function): Likewise.
14562 * decl2.c (finish_anon_union): Likewise.
14563 * friend.c (do_friend): Likewise.
14564 * init.c (build_java_class_ref): Likewise.
14565 * method.c (make_thunk): Likewise.
14566 * pt.c (tsubst_friend_function): Likewise.
14567 * semantics.c (expand_body): Likewise.
14569 2001-01-10 Mark Mitchell <mark@codesourcery.com>
14571 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
14572 looking at DECL_CLONED_FUNCTION for non-functions.
14574 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
14576 * error.c (dump_template_parameter): Use parm to determine how
14577 to print default value.
14579 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
14581 * class.c (duplicate_tag_error): Clear more flags.
14583 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
14585 * call.c (build_new_method_call): Use binfo_for_vbase.
14587 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
14589 * cp-tree.h (flag_cond_mismatch): Don't declare.
14590 * decl2.c (flag_cond_mismatch): Don't define.
14591 (lang_f_options): Remove cond-mismatch.
14592 (unsupported_options): Add cond-mismatch.
14594 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
14596 * class.c (handle_using_decl): Reject using of constructor name
14597 of sourcing class. Allow injecting of a method with same name as
14598 nested class. Fixup error messages.
14600 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
14602 * decl2.c (lang_decode_option): Handle -Wformat=2.
14604 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
14606 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
14607 initialized_in_class.
14608 (DECL_DEFINED_IN_CLASS_P): Rename to ...
14609 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
14610 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
14611 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
14612 * pt.c (check_default_tmpl_args): Adjust for
14613 DECL_INITIALIZED_IN_CLASS_P.
14614 (instantiate_class_template): Likewise.
14615 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
14617 * class.c (finish_struct): Constify saved_filename.
14619 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
14621 * class.c (duplicate_tag_error): Adjust diagnostic.
14622 (finish_struct): Locally set location to start of struct.
14623 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
14625 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
14627 * decl.c (struct binding_level): Adjust class_shadowed comments
14628 to reflect reality.
14629 (push_class_level_binding): Adjust comments to reflect reality.
14630 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
14631 Don't set TREE_VALUE on the class_shadowed list.
14633 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14635 * decl2.c (acceptable_java_type): Allow references too.
14636 * init.c (build_java_class_ref): When using the new ABI, search
14637 `class$' and have it mangled with `mangle_decl.'
14638 * mangle.c (write_java_integer_type_codes): New function.
14639 (write_builtin_type): Detect and mangle Java integer and real
14642 2001-01-07 Mark Mitchell <mark@codesourcery.com>
14644 * decl2.c (grokfield): Don't accept `asm' specifiers for
14645 non-static data members.
14647 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14649 * expr.c (cplus_expand_expr): Don't reset `target'.
14651 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
14653 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
14655 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
14657 * parse.y (template_datadef): Check for error_mark_node.
14659 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
14661 * cp-tree.def (DEFAULT_ARG): Make `x' class.
14663 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
14665 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
14666 (record_builtin_type): Make non-static.
14667 (flag_short_double): Don't declare.
14668 (init_decl_processing): Remove the creation of many tree nodes now
14669 in c_common_nodes_and_builtins.
14670 (build_void_list_node): New function.
14671 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
14672 * cp-tree.h (flag_short_wchar): Don't declare.
14674 2001-01-04 Mark Mitchell <mark@codesourcery.com>
14676 * call.c (build_conv): Don't use build1 for USER_CONV.
14677 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
14679 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
14681 * lex.c (lang_init): Call c_common_lang_init.
14683 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
14685 * search.c (lookup_fnfields_here): Remove.
14686 (look_for_overrides_r): Use lookup_fnfields_1.
14687 Ignore functions from using declarations.
14689 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
14691 Implement exceptions specifiers for implicit member functions.
14692 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
14693 * method.c (synthesize_exception_spec): New function.
14694 (locate_dtor, locate_ctor, locate_copy): New functions.
14695 (implicitly_declare_fn): Generate the exception spec too.
14696 * search.c (check_final_overrider): Check artificial functions
14698 * typeck2.c (merge_exception_specifiers): New function.
14700 2001-01-03 Jason Merrill <jason@redhat.com>
14702 * init.c (build_default_init): New fn.
14703 (perform_member_init): Split out from here.
14704 (build_new_1): Use it. Simplify initialization logic.
14705 (build_vec_init): Take an array, rather than a pointer and maxindex.
14706 Speed up simple initializations. Don't clean up if we're assigning.
14707 * cp-tree.h: Adjust.
14708 * decl2.c (do_static_initialization): Remove TREE_VEC case.
14709 * parse.y (new_initializer): Return void_zero_node for ().
14710 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
14711 * typeck2.c (digest_init): Only complain about user-written
14714 2000-12-22 Mike Stump <mrs@wrs.com>
14716 * decl2.c: (max_tinst_depth): Increase to 50.
14718 2001-01-02 Mark Mitchell <mark@codesourcery.com>
14720 * class.c (invalidate_class_lookup_cache): Zero the
14721 previous_class_values.
14722 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
14724 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
14725 * decl.c (free_bindings): New variable.
14726 (push_binding): Don't create a new binding if we have one on the
14728 (pop_binding): Put old bindings on the free list.
14729 (init_decl_processing): Use size_int, not build_int_2.
14730 Register free_bindings as a GC root.
14731 (cp_make_fname_decl): Use size_int, not build_int_2.
14732 (push_inline_template_parms_recursive): Likewise.
14733 (end_template_parm_list): Likewise.
14734 (for_each_template_parm): Do not use walk_tree_without_duplicates.
14735 (tsubst_template_parms): Use size_int, not build_int_2.
14736 (tsubst): Likewise.
14737 * rtti.c (get_vmi_pseudo_type_info): Likewise.
14739 2001-01-02 Richard Henderson <rth@redhat.com>
14741 * parse.y (asm): Set ASM_INPUT_P.
14743 2001-01-02 Jason Merrill <jason@redhat.com>
14745 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
14748 * typeck.c (cp_truthvalue_conversion): New fn.
14749 * cvt.c (ocp_convert): Use it.
14751 * cp-tree.h: Lose c-common.c decls.
14753 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
14754 * cvt.c (convert_to_void): Use type_unknown_p.
14756 * typeck.c (strip_all_pointer_quals): Also strip quals from
14757 pointer-to-member types.
14759 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
14762 * call.c (build_new_method_call): Do evaluate the object parameter
14763 when accessing a static member.
14764 * typeck.c (build_component_ref): Likewise.
14766 2001-01-02 Andreas Jaeger <aj@suse.de>
14768 * decl.c (cp_missing_noreturn_ok_p): New.
14769 (init_decl_processing): Set lang_missing_noreturn_ok_p.
14771 2000-12-29 Jakub Jelinek <jakub@redhat.com>
14773 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
14775 2000-12-29 Mark Mitchell <mark@codesourcery.com>
14777 * class.c (pushclass): Remove #if 0'd code.
14778 * cp-tree.h (overload_template_name): Remove.
14779 * decl.c (store_bindings): Simplify.
14780 (pop_from_top_level): Likewise.
14781 * pt.c (overload_template_name): Remove.
14782 (instantiate_decl): Don't call push_to_top_level if it's not
14785 2000-12-28 Mark Mitchell <mark@codesourcery.com>
14787 * pt.c (register_local_specialization): Don't return a value.
14788 (lookup_template_class): Use move-to-front heuristic when looking
14789 up template instantiations.
14790 (instantiate_decl): Only push_to_top_level when we're actually
14791 going to instantiate the template.
14793 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
14795 * search.c (binfo_for_vtable): Return least derived class, not
14796 most. Handle secondary vtables.
14798 2000-12-22 Jason Merrill <jason@redhat.com>
14800 * pt.c (more_specialized): Don't optimize len==0.
14801 (fn_type_unification): If we're adding the return type, increase len.
14803 * typeck.c (build_binary_op): Fix pmf comparison logic.
14805 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
14806 DECL_STATIC_FUNCTION_P.
14808 * semantics.c (genrtl_finish_function): Don't try to jump to
14809 return_label unless it exists.
14811 In partial ordering for a call, ignore parms for which we don't have
14813 * call.c (joust): Pass len to more_specialized.
14814 (add_template_candidate_real): Strip 'this', pass len.
14815 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
14816 (get_bindings_order): New fn. Pass len down.
14817 (get_bindings_real): Strip 'this', pass len.
14818 (fn_type_unification): Likewise.
14819 (type_unification_real): Succeed after checking 'len' args.
14820 (most_specialized_instantiation): Lose explicit_args parm.
14821 * class.c (resolve_address_of_overloaded_function): Strip 'this',
14824 2000-12-21 Jason Merrill <jason@redhat.com>
14826 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
14827 DECL_TEMPLATE_RESULT.
14829 * search.c (lookup_field_r): Call lookup_fnfields_1, not
14830 lookup_fnfields_here.
14832 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
14834 * call.c (build_object_call): Also allow conversions that return
14835 reference to pointer to function.
14836 (add_conv_candidate): Handle totype being ref to ptr to fn.
14837 (build_field_call): Also allow members of type reference to function.
14838 Lose support for calling pointer to METHOD_TYPE fields.
14840 * error.c (dump_expr): Handle *_CAST_EXPR.
14842 * typeck2.c (build_scoped_ref): Always convert to the naming class.
14844 * tree.c (break_out_cleanups): Lose.
14845 * cp-tree.h: Remove prototype.
14846 * typeck.c (build_component_ref): Don't break_out_cleanups.
14847 (build_compound_expr): Likewise.
14848 * semantics.c (finish_expr_stmt): Likewise.
14850 2000-12-20 Richard Henderson <rth@redhat.com>
14852 * cp-tree.h: Update declarations.
14853 * decl.c (finish_case_label): Return the new stmt node.
14854 * semantics.c (finish_goto_stmt): Likewise.
14855 (finish_expr_stmt, finish_return_stmt): Likewise.
14856 (finish_break_stmt, finish_continue_stmt): Likewise.
14857 (finish_asm_stmt): Likewise.
14858 * parse.y (already_scoped_stmt): Set STMT_LINENO.
14859 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
14860 (simple_if, simple_stmt): Return the new stmt node.
14861 (save_lineno): New.
14863 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
14865 * cp-tree.h: Don't declare warn_long_long.
14867 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14869 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
14872 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14874 * pt.c (unify): Handle when both ARG and PARM are
14875 BOUND_TEMPLATE_TEMPLATE_PARM.
14877 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14879 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
14880 DECL_TEMPLATE_PARM_P.
14882 2000-12-15 Jason Merrill <jason@redhat.com>
14884 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
14886 * init.c (build_new_1): Don't strip quals from type.
14888 * decl.c (pushdecl): Don't check for linkage on a non-decl.
14890 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
14892 * call.c (build_new_function_call): Lose space before paren in
14894 (build_new_method_call): Likewise.
14896 * typeck2.c (build_m_component_ref): Propagate quals from datum.
14898 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14900 * pt.c (check_explicit_specialization): Propagate default
14901 function arguments to explicit specializations.
14903 2000-12-13 DJ Delorie <dj@redhat.com>
14905 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
14908 2000-12-08 Jason Merrill <jason@redhat.com>
14910 * error.c (dump_function_name): Don't let the user see __comp_ctor.
14912 Clean up copy-initialization in overloading code.
14913 * call.c (build_user_type_conversion_1): Die if we are asked to
14914 convert to the same or a base type.
14915 (implicit_conversion): Avoid doing so. Lose reference binding code.
14916 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
14917 direct-initialization. Also do direct-init part of copy-init.
14918 (build_user_type_conversion): Don't provide context to convert_like.
14919 * cvt.c (ocp_convert): build_user_type_conversion will now provide
14920 the constructor call for copy-init.
14922 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
14923 instantiation of a member template.
14924 (do_decl_instantiation): Not here.
14926 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
14928 * class.c (check_field_decls): Don't special case anonymous
14929 fields in error messages.
14930 (note_name_declared_in_class): Use %D on diagnostic.
14932 * tree.c (pod_type_p): Use strip_array_types.
14933 (cp_valid_lang_attribute): Likewise.
14934 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
14935 multiple evaluations.
14936 (cp_has_mutable_p): Use strip_array_types.
14938 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
14940 * cp-tree.h (sufficient_parms_p): Declare new function.
14941 * call.c (sufficient_parms_p): New function, broken out of ...
14942 (add_function_candidate): ... here. Use it.
14943 (add_conv_candidate): Use it.
14944 * decl.c (grok_ctor_properties): Use it.
14946 2000-12-07 Jakub Jelinek <jakub@redhat.com>
14948 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
14950 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
14952 * decl2.c (lang_decode_option): Handle -Wformat-security.
14954 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14956 * pt.c (verify_class_unification): New function.
14957 (get_class_bindings): Use it.
14958 (try_class_unification): Tidy.
14959 (unify): Handle when argument of a template-id is not
14960 template parameter dependent.
14961 (template_args_equal): Handle when TREE_CODE's do not match.
14963 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
14965 * lang-specs.h (c++): When invoking the stand-alone preprocessor
14966 for -save-temps, pass all relevant -Defines to it, and then don't
14967 pass them to cc1plus.
14969 2000-12-05 Will Cohen <wcohen@redhat.com>
14971 * decl.c (finish_case_label): Cleared
14972 more_cleanups_ok in surrounding function scopes.
14973 (define_label): Likewise.
14975 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
14977 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
14978 (get_matching_virtual): Remove.
14979 (look_for_overrides): Declare new function.
14980 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
14982 * class.c (check_for_override): Move base class iteration code
14983 to look_for_overrides.
14984 * search.c (next_baselink): Remove.
14985 (get_virtuals_named_this): Remove.
14986 (get_virtual_destructor): Remove.
14987 (tree_has_any_destructors_p): Remove.
14988 (struct gvnt_info): Remove.
14989 (check_final_overrider): Remove `virtual' from error messages.
14990 (get_matching_virtuals): Remove. Move functionality to ...
14991 (look_for_overrides): ... here, and ...
14992 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
14995 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
14997 * typeck.c (get_delta_difference): If via a virtual base,
14999 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
15002 2000-12-04 Richard Henderson <rth@redhat.com>
15004 * error.c (dump_tree): Use output_add_string not OB_PUTS.
15006 2000-12-04 Jason Merrill <jason@redhat.com>
15008 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
15009 (write_builtin_type): Pass intSI_type_node and the like through
15011 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
15012 Pass intSI_type_node and the like through type_for_mode.
15013 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
15014 * pt.c (tsubst, unify): Likewise.
15015 * tree.c (walk_tree): Likewise.
15016 * error.c (dump_type): Likewise.
15017 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
15019 * Make-lang.in: Tweak top comment for emacs.
15020 (cp/TAGS): Restore.
15022 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
15024 * class.c (clone_function_decl): Robustify.
15026 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
15028 * decl.c (store_bindings): Only search in the non modified
15029 old_bindings for duplicates.
15031 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
15033 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
15034 TYPE_POLYMORPHIC_P.
15036 * typeck.c (build_static_cast): Remove unused variable.
15038 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15040 * pt.c: Fix typo in comment.
15042 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
15044 * decl2.c (warn_format): Remove definition.
15045 (lang_decode_option): Handle -Wformat-nonliteral,
15046 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
15048 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
15050 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
15051 (init_decl_processing): Don't create string_type_node,
15052 const_string_type_node, wint_type_node, intmax_type_node,
15053 uintmax_type_node, default_function_type, ptrdiff_type_node and
15054 unsigned_ptrdiff_type_node. Adjust position of call to
15055 c_common_nodes_and_builtins.
15056 (identifier_global_value): New function.
15058 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
15060 * call.c (standard_conversion): Reject pointer to member
15061 conversions from ambiguous, inaccessible or virtual bases.
15062 * typeck.c (build_static_cast): Don't check pointers to members
15065 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
15067 * method.c (do_build_copy_constructor): Preserve cv
15068 qualifications when accessing source object members.
15069 (do_build_assign_ref): Likewise. Remove separate diagnostics for
15072 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
15074 * method.c (do_build_assign_ref): Construct appropriately
15075 CV-qualified base reference. Don't allow const casts in base
15078 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
15080 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
15081 incomplete return type.
15083 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15085 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
15086 * semantics.c (finish_base_specifier): Accept a _TYPE not a
15089 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15091 * spew.c (yyerror): Cope if yylval.ttype is NULL.
15093 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15095 * decl.c (grokdeclarator): Diagnose undefined template contexts.
15097 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15099 * decl.c (grokdeclarator): Do type access control on friend
15102 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
15104 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
15105 bison parser ickiness.
15106 * pt.c (tsubst_friend_function): Enter namespace scope when
15107 tsubsting the function name.
15108 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
15110 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
15112 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
15113 * cvt.c (cp_convert_to_pointer): Add force parameter.
15114 Allow conversions via virtual base if forced.
15115 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
15116 (ocp_convert): Likewise.
15117 * search.c (binfo_from_vbase): Return the virtual base's binfo.
15118 * typeck.c (get_delta_difference): Adjust handling of virtual
15121 2000-11-26 Mark Mitchell <mark@codesourcery.com>
15123 * tree.c (struct list_hash): Remove.
15124 (list_hash_table): Make it be an htab.
15125 (struct list_proxy): New type.
15126 (list_hash_eq): New function.
15127 (list_hash_pieces): Renamed from ...
15128 (list_hash): ... this.
15129 (list_hash_lookup): Remove.
15130 (list_hash_add): Remove.
15131 (hash_tree_cons): Use the generic hashtable.
15132 (mark_list_hash): Remove.
15133 (init_tree): Create the hashtable.
15135 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
15137 * method.c (build_mangled_C9x_name): Rename to
15138 build_mangled_C99_name. Change C9X references in comments to
15141 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
15143 * parse.y (unary_expr): Move VA_ARG from here ...
15144 (primary): ... to here.
15146 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
15148 * semantics.c (finish_id_expr): If type is error_mark, return
15151 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
15153 * pt.c (lookup_template_class): Simplify loop exit constructs.
15154 Cope when there is no partial instantiation of a template
15157 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
15159 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
15161 2000-11-22 Mark Mitchell <mark@codesourcery.com>
15163 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
15166 * pt.c (do_decl_instantiate): Explicitly clone constructors and
15167 destructors that haven't already been cloned.
15169 2000-11-20 Richard Henderson <rth@redhat.com>
15171 * parse.y (yyparse_1): Rename the parser entry point.
15173 2000-11-20 Alex Samuel <samuel@codesourcery.com>
15175 * mangle.c (write_name): Use <unscoped-name> for names directly in
15177 (write_unscoped_name): Accept names directly in function scope.
15179 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
15181 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
15182 * parse.y (extdef): Add EXPORT reduction.
15183 * spew.c (yylex): Don't skip export here.
15185 2000-11-19 Mark Mitchell <mark@codesourcery.com>
15187 * decl.c (init_decl_processing): Correct name of pure virtual
15188 function under the new ABI.
15189 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
15190 (throw_bad_typeid): Likewise for bad typeid function.
15192 2000-11-18 Mark Mitchell <mark@codesourcery.com>
15194 * decl.c (grokparms): Don't even function types of `void' type,
15196 * mangle.c (write_type): Don't crash when confronted with the
15199 * decl.c (grokparms): Don't create parameters of `void' type.
15201 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
15203 * lex.c (mark_impl_file_chain): Delete.
15204 (init_parse): Remove call to ggc_add_string_root. No need to
15205 ggc_strdup a string constant. Do not add impl_file_chain to GC
15207 (handle_pragma_implementation): No need to ggc_strdup main_filename.
15209 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
15211 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
15213 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
15215 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
15216 * decl.c (grokdeclarator): Don't reject void parms here.
15217 (require_complete_types_for_parms): Simplify, use
15218 complete_type_or_else.
15219 (grokparms): Remove bitrot. Remove funcdef parm.
15220 Deal with ellipsis parm lists here.
15221 * semantics.c (finish_parmlist): Don't append void_list_node
15222 here. Set PARMLIST_ELLIPSIS_P.
15224 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
15226 * typeck2.c (incomplete_type_error): Reorganize to avoid
15227 excessive diagnostics.
15229 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
15231 * lex.c (struct impl_files, internal_filename): Constify a char *.
15233 2000-11-16 Mark Mitchell <mark@codesourcery.com>
15235 * mangle.c (write_special_name_constructor): Don't generate
15236 assembler junk when confronted with an old-style constructor.
15237 (write_special_name_destructor): Likewise.
15238 (mangle_decl_string): Do it here instead.
15240 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
15242 * call.c (op_error): Make error messages clearer.
15244 2000-11-15 Mark Mitchell <mark@codesourcery.com>
15246 * decl.c (wrapup_globals_for_namespace): Don't mark things
15247 TREE_ASM_WRITTEN when they're not.
15249 2000-11-15 Jason Merrill <jason@redhat.com>
15251 * typeck2.c (friendly_abort): Uncount the error before handing
15252 off to fancy_abort.
15254 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
15256 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
15258 2000-11-14 Mark Mitchell <mark@codesourcery.com>
15260 * class.c (build_vtbl_initializer): Fix typo in comment.
15261 * typeck.c (expr_sizeof): Don't crash on errors.
15263 2000-11-14 Jim Wilson <wilson@redhat.com>
15265 * lang-specs.h: Add %2 after %(cc1_options).
15267 2000-11-14 Richard Henderson <rth@redhat.com>
15269 * typeck.c (c_sizeof): Be strict about casting result value
15270 back to c_size_type_node.
15271 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
15273 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
15275 * typeck.c (build_unary_op): Use boolean_increment from
15276 c-common.c, moving the relevant code there.
15278 2000-11-11 Jason Merrill <jason@redhat.com>
15280 * typeck.c (mark_addressable): Don't call put_var_into_stack.
15282 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
15285 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15287 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
15288 * lex.c (copy_lang_decl): Likewise.
15290 2000-11-09 Mark Mitchell <mark@codesourcery.com>
15292 * dump.c (cp_dump_tree): Don't dump function bodies here.
15294 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
15295 (dump.o): Update dependency list.
15296 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
15297 (flag_dump_translation_unit): Likewise.
15298 (CP_TYPE_QUALS): Adjust definition.
15299 (DECL_C_BIT_FIELD): Remove.
15300 (SET_DECL_C_BIT_FIELD): Likewise.
15301 (CLEAR_DECL_C_BIT_FIELD): Likewise.
15302 (add_maybe_template): Likewise.
15303 (strip_array_types): Likewise.
15304 (dump_node_to_file): Likewise.
15305 (cp_dump_tree): New function.
15306 * decl.c (init_decl_processing): Set lang_dump_tree.
15307 * decl2.c (flag_dump_translation_unit): Remove.
15308 * dump.c: Move most of it to ../c-dump.c.
15309 (cp_dump_tree): New function.
15310 * pt.c (add_maybe_template): Remove.
15311 * typeck.c (strip_array_types): Likewise.
15313 2000-11-07 Eric Christopher <echristo@redhat.com>
15315 * decl.c (init_decl_processing): Change definition of
15316 __wchar_t to wchar_t. Remove artificial declaration of
15318 * lex.c: Change instances of __wchar_t to wchar_t.
15320 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
15322 * lex.c (do_identifier): Don't lookup_name for operators.
15323 * parse.y (operator): Save looking_for_typename.
15324 (unoperator): Restore it.
15325 * spew.c (frob_opname): Use nth_token for lookahead.
15327 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
15329 * decl.c (grok_op_properties): Always use coerce_new_type and
15330 coerce_delete_type.
15331 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
15332 exception specification. Tidy up.
15333 (coerce_delete_type): Preserve exception specification. Tidy up.
15335 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
15337 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
15338 (push_binding_level), error.c (cp_tree_printer), pt.c
15339 (process_partial_specialization, tsubst_template_arg_vector),
15340 search.c (lookup_member): Use memset () instead of bzero ().
15342 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
15344 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
15346 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
15348 * Make-lang.in (c++.distdir): Remove.
15350 2000-11-04 Mark Mitchell <mark@codesourcery.com>
15352 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
15353 declarations from different namespaces to be combined.
15355 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
15357 * decl.c: Include tm_p.h.
15359 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
15361 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
15363 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
15365 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
15366 (build_overload_value), repo.c (open_repo_file), xref.c
15367 (open_xref_file): Use strchr () and strrchr () instead of index ()
15370 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
15372 * call.c (build_over_call): Call fold on the CALL_EXPR.
15374 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
15376 * error.c (dump_template_decl): Separate template hearders with
15379 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
15381 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
15382 TS_* flags with corresponding TFF_*. Adjust prototypes of
15383 functions (which used to take a tree_string_flags) to take an int.
15385 * cp-tree.h (enum tree_string_flags): Remove
15386 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
15387 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
15388 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15389 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15390 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
15391 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
15392 (type_as_string, decl_as_string, expr_as_string,
15393 context_as_string): Adjust prototype.
15395 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
15396 instead of TS_PLAIN.
15398 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
15399 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
15402 2000-10-30 Mark Mitchell <mark@codesourcery.com>
15404 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
15405 (linkage_kind): New enumeration.
15406 (decl_linkage): New function.
15407 * decl2.c (comdat_linkage): Extend comment.
15408 * error.c (dump_function_decl): Print the arguments used to
15409 instantiate a template, even when not printing the type of the
15411 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
15412 not TREE_PUBLIC, to test for external linkage.
15413 * tree.c (decl_linkage): New function.
15415 2000-10-28 Mark Mitchell <mark@codesourcery.com>
15417 * pt.c (instantiate_decl): Always instantiate static data members
15418 initialized in-class.
15420 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
15422 * Make-lang.in: Move all build rules here from Makefile.in,
15423 adapt to new context. Wrap all rules that change the current
15424 directory in parentheses. Expunge all references to $(P).
15425 When one command depends on another and they're run all at
15426 once, use && to separate them, not ;. Add OUTPUT_OPTION to
15427 all object-file generation rules. Delete obsolete variables.
15429 * Makefile.in: Delete.
15430 * config-lang.in: Delete outputs= line.
15432 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
15434 * error.c (dump_function_decl): Print no space between
15435 `ptr-operator' the `type-specifier' of the return type.
15436 (dump_type_prefix): Make sure we put space at the appropriate
15439 2000-10-23 Jason Merrill <jason@redhat.com>
15441 * call.c (equal_functions): Also call decls_match for extern "C" fns.
15443 2000-10-22 Jason Merrill <jason@redhat.com>
15445 * call.c (build_conditional_expr): Use ocp_convert to force
15448 2000-10-22 Mark Mitchell <mark@codesourcery.com>
15450 * call.c (standard_conversion): Use RVALUE_CONVs for all
15451 expressions that satisfy lvalue_p, not just those that satisfy
15454 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
15456 * typeck.c (c_sizeof): Return an expression of `size_t' type,
15457 not one with TYPE_IS_SIZETYPE set.
15458 (dubious_conversion_warnings): Remove special-case code.
15460 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
15462 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
15463 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
15464 (dump_type_prefix): Print vector-of-int as 'int vector'.
15465 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
15466 * tree.c (walk_tree): Handle VECTOR_TYPE.
15468 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
15470 2000-10-21 Jason Merrill <jason@redhat.com>
15472 * parse.y (operator): Set got_object from got_scope.
15473 Set looking_for_typename.
15474 * decl.c (lookup_name_real): Clear val after setting from_obj.
15475 Reorganize diagnostic.
15477 2000-10-20 Jason Merrill <jason@redhat.com>
15479 * tree.c (walk_tree): Don't walk into default args.
15481 * error.c (dump_expr): Use host_integerp.
15483 2000-10-20 David Edelsohn <edelsohn@gnu.org>
15485 * typeck2.c (abstract_virtuals_error): Use "because" instead of
15486 "since" in error message.
15488 2000-10-20 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15490 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
15492 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
15494 * decl.c (revert_static_member_fn): Fixed typo.
15496 2000-10-19 Mark Mitchell <mark@codesourcery.com>
15498 * class.c (subobject_offset_fn): New type.
15499 (dfs_record_base_offsets): Remove.
15500 (record_base_offsets): Likewise.
15501 (dfs_search_base_offsets): Likewise.
15502 (record_subobject_offset): New function.
15503 (check_subobject_offset): Likewise.
15504 (walk_subobject_offsets): Likewise.
15505 (record_subobject_offsets): Likewise.
15506 (layout_conflict_p): Reimplement.
15507 (layout_nonempty_base_or_field): Correct handling of type
15508 conflicts during layout.
15509 (layout_empty_base): Likewise.
15510 (build_base_field): Adjust to handle new representation of empty
15512 (build_base_fields): Likewise.
15513 (layout_virtual_bases): Likewise.
15514 (splay_tree_compare_integer_csts): New function.
15515 (layout_class_type): Use a splay_tree, rather than a varray, to
15516 represent the offsets of empty bases.
15518 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
15519 * decl.c (select_decl): Don't return declarations that are
15522 2000-10-18 Mark Mitchell <mark@codesourcery.com>
15524 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
15525 (fake_std_node): New macro.
15526 * decl.c (in_std): Rename to ...
15527 (in_fake_std): ... this.
15528 (flag_no_builtin): Remove.
15529 (flag_no_nonansi_builtin): Likewise.
15530 (walk_namespaces_r): Use fake_std_node.
15531 (push_namespace): Use std_identifier.
15532 (pop_namespace): Use in_fake_std.
15533 (lookup_name_real): Use fake_std_node.
15534 (init_decl_processing): When -fhonor-std, create the `std'
15535 namespace. Don't create a dummy fake_std_node in that case.
15536 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
15537 (builtin_function): Put builtins whose names don't begin
15538 with `_' in the std namespace.
15539 * decl2.c (flag_no_builtin): Remove.
15540 (flag_no_nonansi_builtin): Likewise.
15541 (set_decl_namespace): Use fake_std_node.
15542 (validate_nonmember_using_decl): Likewise.
15543 (do_using_directive): Likewise.
15544 (handle_class_head): Likewise.
15545 * dump.c (dequeue_and_dump): Likewise.
15546 * except.c (init_exception_processing): Use std_identifier.
15547 * init.c (build_member_call): Use fake_std_node.
15548 * rtti.c (init_rtti_processing): Use std_identifier.
15550 2000-10-17 Mark Mitchell <mark@codesourcery.com>
15552 * cp-tree.h (back_end_hook): Remove declaration.
15553 * decl2.c (back_end_hook): Remove definition.
15555 * dump.c (dequeue_and_dump): Dump TREE_USED.
15557 2000-10-17 Brad Lucier <lucier@math.purdue.edu>
15559 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
15561 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
15563 * decl.c (WINT_TYPE): Define.
15564 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
15565 c_size_type_node, signed_size_type_node and wint_type_node.
15567 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
15569 * decl2.c (warn_missing_format_attribute): New variable.
15570 (lang_decode_option): Decode -Wmissing-format-attribute.
15572 2000-10-16 Mark Mitchell <mark@codesourcery.com>
15574 * typeck.c (qualify_type): Remove.
15575 (composite_pointer_type): Fix handling of conversions to `cv void*'.
15577 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15579 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
15581 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15583 * Makefile.in (parse.c, parse.h): Create atomically.
15585 2000-10-12 Mark Mitchell <mark@codesourcery.com>
15587 * class.c (current_obstack): Remove.
15588 * decl.c (ggc_p): Remove.
15589 (start_decl): Don't use decl_tree_cons.
15590 (grokdeclarator): Don't use build_decl_list.
15591 (start_function): Don't use decl_tree_cons.
15592 (finish_function): Don't mess with obstacks.
15593 * decl2.c (grok_x_components): Don't use build_decl_list.
15594 * lex.c (make_call_declarator): Don't call decl_tree_cons.
15595 (implicitly_declare_fn): Don't call build_decl_list.
15596 * parse.y (frob_specs): Don't call build_decl_list or
15598 (expr_or_declarator_intern): Don't call decl_tree_cons.
15599 (primary): Don't call build_decl_list.
15600 (fcast_or_absdcl): Likewise.
15601 (typed_declspecs): Don't call decl_tree_cons.
15602 (reserved_declspecs): Don't call build_decl_list.
15603 (declmods): Likewise.
15604 (reserved_typespecquals): Likewise.
15606 (new_type_id): Likewise.
15607 (cv_qualifiers): Likewise.
15608 (after_type_declarator_intern): Likewise.
15609 (notype_declarator_intern): Likewise.
15610 (absdcl_intern): Likewise.
15611 (named_parm): Likewise.
15612 * pt.c (most_specialized_class): Likewise.
15613 * repo.c (temporary_obstack): Make it a structure, not a pointer.
15614 (init_repo): Initialize it.
15615 * search.c (current_obstack): Remove.
15616 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
15618 2000-10-09 Richard Henderson <rth@cygnus.com>
15620 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
15621 (c++ language support bits for libgcc): Remove.
15622 (c++.clean): Remove cplib2.txt cleanup.
15623 * config-lang.in (headers, lib2funcs): Remove.
15625 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
15626 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
15627 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
15628 * inc/new.h, inc/typeinfo: Remove files.
15630 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
15632 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
15634 (init_decl_processing): Initialize intmax_type_node and
15637 2000-10-06 Richard Henderson <rth@cygnus.com>
15639 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
15640 (original_result_rtx): Remove.
15641 * decl.c (save_function_data): Don't clear x_result_rtx.
15642 (mark_lang_function): Don't mark it either.
15643 * expr.c (fixup_result_decl): Remove.
15644 * semantics.c (genrtl_named_return_value): Frob the return decl
15645 before calling emit_local_var.
15646 (genrtl_finish_function): Don't call fixup_result_decl.
15647 Always emit the jump to return_label.
15649 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
15651 * pt.c (lookup_template_class): Set current access for enum.
15652 (tsubst_enum): Set file & line for enum decl.
15654 * spew.c (yylex): Remove unused variable.
15656 2000-10-05 Richard Henderson <rth@cygnus.com>
15658 * semantics.c (genrtl_finish_function): Don't init or check
15659 can_reach_end; remove noreturn and return value checks.
15661 2000-10-05 Tom Tromey <tromey@cygnus.com>
15663 * init.c (build_java_class_ref): Use `build_static_name' with a
15664 suffix, not a prefix, to build the class object's name.
15666 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15668 * cp-tree.h (access_kind): Fix comment typo.
15669 * decl2.c (grokfield): Fix diagnostic typo.
15670 * semantics.c (finish_template_type): Fix comment typo.
15671 (finish_qualified_object_call_expr): Likewise.
15673 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15675 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
15678 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15680 * spew.c (frob_id): New static function.
15681 (frob_opname): Use it.
15684 2000-10-01 Mark Mitchell <mark@codesourcery.com>
15686 * decl.c (lang_mark_false_label_stack): Remove.
15687 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
15689 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
15691 * gxxint.texi: Use @email for formatting email addresses.
15693 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
15695 * error.c: Remove direct obstack manipulation. Replace with
15696 output_buffer-based formatting. Adjust calls to removed macros.
15697 (obstack_chunk_alloc, obstack_chunk_free): Remove.
15698 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
15699 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
15701 2000-09-24 Mark Mitchell <mark@codesourcery.com>
15703 * ir.texi: Move to ../c-tree.texi.
15705 2000-09-20 Jason Merrill <jason@redhat.com>
15707 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
15709 2000-09-21 Andreas Jaeger <aj@suse.de>
15711 * errfn.c: Move declaration of cp_printer and cp_printers to ...
15712 * cp-tree.h: ... here.
15714 * error.c: Remove declaration of cp_printer.
15716 2000-09-20 Mark Mitchell <mark@codesourcery.com>
15718 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
15720 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
15722 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
15725 2000-09-18 Mark Mitchell <mark@codesourcery.com>
15727 * decl.c (start_function): Robustify.
15729 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15731 * cp-tree.h (check_function_format): Accept a `status' parameter.
15733 * call.c, typeck.c: Updates calls to `check_function_format'.
15735 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
15737 * decl2.c (handle_class_head): Always push some scope even
15740 2000-09-16 Mark Mitchell <mark@codesourcery.com>
15742 * cp-tree.h (struct cp_language_function): Remove
15743 x_scope_stmt_stack and name_declared.
15744 (current_scope_stmt_stack): Remove.
15745 (function_name_declared_p): New macro.
15746 (struct lang_decl_flags): Use c_lang_decl as a base class.
15748 (struct lang_decl): Replace saved_tree with context.
15749 (DECL_FRIEND_CONTEXT): Adjust accordingly.
15750 (SET_DECL_FRIEND_CONTEXT): Likewise.
15751 (DECL_VIRTUAL_CONTEXT): Likewise.
15752 (DECL_SAVED_TREE): Remove.
15753 (C_DECLARED_LABEL_FLAG): Likewise.
15754 (cplus_expand_expr_stmt): Don't declare.
15755 (add_decl_stmt): Likewise.
15756 (add_scope_stmt): Likewise.
15757 * decl.c (mark_stmt_tree): Remove.
15758 (case_compare): Likewise.
15759 (finish_case_label): Use c_add_case_label.
15760 (init_decl_processing): Set more language-specific hooks.
15761 (build_enumerator): Fix typo in comment.
15762 (cplus_expand_expr_stmt): Remove.
15763 (mark_lang_function): Use mark_c_language_function.
15764 (lang_mark_tree): Use c_mark_lang_decl.
15765 * decl2.c: Change order of inclusion.
15766 * except.c: Likewise.
15767 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
15768 back on c_expand_expr.
15769 * friend.c: Include expr.h.
15770 * init.c: Change order of inclusion.
15771 * Makefile.in: Update dependencies.
15772 * lex.h (free_lang_decl_chain): Remove.
15773 * optimize.c (maybe_clone_body): Use function_name_declared_p.
15774 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
15776 (instantiate_decl): Use function_name_declared_p.
15777 * semantics.c (lang_expand_expr_stmt): Remove.
15778 (set_current_function_name_declared): Likewise.
15779 (current_function_name_declared): Likewise.
15780 (begin_compound_stmt): Use function_name_declared_p.
15781 (add_decl_stmt): Remove.
15782 (setup_vtbl_ptr): Use function_name_declared_p.
15783 (add_scope_stmt): Remove.
15784 (current_scope_stmt_stack): New function.
15785 (cp_expand_stmt): Don't handle SCOPE_STMTs.
15786 (expand_body): Use function_name_declared_p.
15787 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
15788 * typeck.c: Change order of includes.
15789 (convert_sequence): Remove.
15791 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
15793 * lex.c (reswords): Add _Complex.
15795 2000-09-14 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15797 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
15799 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
15801 * init.c (begin_init_stmts): Don't use // comments.
15803 2000-09-12 Jason Merrill <jason@redhat.com>
15805 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
15806 all non-extern arrays.
15808 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
15809 typenames, too. Downgrade complaint to pedwarn.
15810 (xref_tag): Warn about surprising behavior of 'friend struct T'.
15811 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
15812 'class This::Inherited'.
15814 2000-09-12 Mark Mitchell <mark@codesourcery.com>
15816 * decl.c (finish_case_label): Given the LABEL_DECL a
15819 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
15821 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
15822 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
15823 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15824 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15825 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
15827 (sorry_for_unsupported_tree, print_scope_operator,
15828 print_left_paren, print_right_paren, print_left_bracket,
15829 print_right_bracket, print_whitespace): Likewise.
15830 (aggr_variety): Rename to class_key_or_enum.
15831 (print_type): Rename to print_type_id.
15832 (print_type_specifier_seq, print_simple_type_specifier,
15833 print_elaborated_type_specifier,
15834 print_rest_of_abstract_declarator,
15835 print_parameter_declaration_clause, print_exception_specification,
15836 print_nested_name_specifier, print_template_id,
15837 typedef_original_name, print_template_argument_list_start,
15838 print_template_argument_list_end): New functions.
15840 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
15842 * ir.texi: Add more documentation.
15844 2000-09-11 Mark Mitchell <mark@codesourcery.com>
15846 * cp-tree.h (struct saved_scope): Remove x_function_parms.
15847 (current_function_parms): Don't define.
15848 (struct cp_language_function): Remove parms_stored.
15849 (current_function_just_assigned_this): Don't define.
15850 (current_function_parms_stored): Likewise.
15851 (static_ctors): Declare.
15852 (static_dtors): Likewise.
15853 (SF_EXPAND): Don't define.
15854 (expand_start_early_try_stmts): Remove declaration.
15855 (store_parm_decls): Likewise.
15856 * decl.c (static_ctors): Don't declare.
15857 (static_dtors): Likewise.
15858 (struct binding_level): Remove this_block.
15859 (poplevel): Remove dead code.
15860 (set_block): Likewise.
15861 (mark_binding_level): Don't mark this_block.
15862 (mark_saved_scope): Don't mark x_function_parms.
15863 (init_decl_processing): Don't add current_function_parms as a GC
15865 (check_function_type): Change prototype.
15866 (start_function): Remove RTL-generation code.
15867 (expand_start_early_try_stmts): Remove.
15868 (store_parm_decls): Give it internal linkage. Remove
15869 RTL-generation code.
15870 (finish_function): Remove RTL-generation code.
15871 * decl2.c (static_ctors): Fix formatting.
15872 (static_dtors): Likewise.
15873 * method.c (use_thunk): Don't call store_parm_decls.
15874 (synthesize_method): Likewise.
15875 * optimize.c (maybe_clone_body): Likewise.
15876 * parse.y (fn.def2): Likewise.
15877 (.set_base_init): Likewise.
15878 (nodecls): Likewise.
15879 * pt.c (instantiate_decl): Likewise.
15880 * rtti.c (synthesize_tinfo_fn): Likewise.
15881 * semantics.c (genrtl_try_block): Simplify.
15882 (expand_body): Use genrtl_start_function and
15883 genrtl_finish_function.
15884 (genrtl_start_function): New function.
15885 (genrtl_finish_function): Likewise.
15887 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
15889 * error.c (cp_tree_printer, case 'P'): Append break.
15891 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
15893 * cp-tree.h (frob_opname): Declare.
15894 * parse.y (saved_scopes): New static variable.
15895 (cp_parse_init): Adjust.
15896 (do_id): If lastiddecl is NULL, do do_identifier.
15897 (operator): Save scope information.
15898 (unoperator): New reduction. Restore scope information.
15899 (operator_name): Append unoperator. Call frob_opname.
15900 * spew.c (frob_opname): Define.
15902 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
15904 * decl.c, rtti.c: Include defaults.h if not already included.
15905 Don't define the *_TYPE_SIZE macros.
15907 2000-09-09 Mark Mitchell <mark@codesourcery.com>
15909 * cp-tree.h (push_switch): Change prototype.
15910 (check_cp_case_value): Remove declaration.
15911 (decl_constant_value): Likewise.
15912 * decl.c (struct cp_switch): Add switch_stmt and cases.
15913 (case_compare): New function.
15914 (push_switch): Set switch_stmt. Initialize cases.
15915 (pop_switch): Clean up cases.
15916 (define_case_label): Rename to ...
15917 (finish_case_label): ... this. Do semantic analysis for case
15919 (start_function): Correct comment.
15920 * decl2.c (check_cp_case_value): Remove.
15921 * expr.c (do_case): Remove.
15922 * pt.c (tsubst_expr): Adjust call to finish_case_label.
15923 * semantics.c (genrtl_do_poplevel): Remove declaration.
15924 (RECHAIN_STMTS): Remove.
15925 (finish_break_stmt): Use build_break_stmt.
15926 (finish_continue_stmt): Use build_continue_stmt.
15927 (finish_switch_cond): Adjust condition here, rater than in
15928 c_expand_start_case.
15929 (finish_case_label): Remove.
15930 * typeck.c (c_expand_return): Remove.
15931 (c_expand_start_case): Likewise.
15933 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
15935 * ir.texi: Document type nodes.
15937 2000-09-06 Mark Mitchell <mark@codesourcery.com>
15939 * cp-tree.h (init_cp_semantics): Declare.
15940 (genrtl_try_block): Don't declare.
15941 (genrtl_handler): Likewise.
15942 (genrtl_catch_block): Likewise.
15943 (genrtl_ctor_stmt): Likewise.
15944 (genrtl_subobject): Likewise.
15945 (genrtl_do_poplevel): Likewise.
15946 (genrtl_named_return_value): Likewise.
15947 * lex.c (init_parse): Call init_cp_semantics.
15948 * semantics.c (genrtl_try_block): Give it internal linkage.
15949 (genrtl_handler): Likewise.
15950 (genrtl_catch_block): Likewise.
15951 (genrtl_ctor_stmt): Likewise.
15952 (genrtl_subobject): Likewise.
15953 (genrtl_do_poplevel): Likewise.
15954 (genrtl_named_return_value): Likewise.
15955 (lang_expand_stmt): Rename to ...
15956 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
15957 (init_cp_semantics): Define.
15959 * decl.c (initialize_local_var): Remove RTL-generating code.
15960 * semantics.c (genrtl_try_block): Fix formatting.
15962 Move statement-tree facilities from C++ to C front-end.
15963 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
15964 (void_zero_node): Remove.
15965 (stmt_tree): Likewise.
15966 (scope_chain): Adjust.
15967 (language_function): Rename to cp_language_function.
15968 (cp_function_chain): Adjust.
15969 (current_stmt_tree): Remove.
15970 (last_tree): Likewise.
15971 (last_expr_type): Likewise.
15972 (struct lang_decl): Adjust.
15973 (STMT_IS_FULL_EXPR_P): Remove.
15974 (add_tree): Remove.
15975 (begin_stmt_tree): Likewise.
15976 (finish_stmt_tree): Likewise.
15977 (walk_tree_fn): Likewise.
15978 (walk_stmt_tree): Likewise.
15979 * class.c (finish_struct): Replace use of add_tree with add_stmt.
15980 * decl.c (mark_stmt_tree): Adjust type.
15981 (init_decl_processing): Don't build void_zero_node.
15982 (initialize_local_var): Adjust usage of current_stmt_tree.
15983 (finish_enum): Use add_stmt, not add_tree.
15984 (save_function_data): Adjust use of language_function.
15985 (finish_constructor_body): Use add_stmt, not add_tree.
15986 (finish_destructor_body): Likewise.
15987 (push_cp_function_context): Adjust use of language_function.
15988 (pop_cp_function_context): Likewise.
15989 (mark_lang_function): Likewise.
15990 (mark_cp_function_context): Likewise.
15991 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
15992 (build_vec_init): Likewise.
15993 * semantics.c (SET_LAST_STMT): Remove.
15994 (RECHAIN_STMTS): Don't use it.
15995 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
15996 (current_stmt_tree): Define.
15997 (add_tree): Remove.
15998 (finish_goto_stmt): Use add_stmt, not add_tree.
15999 (finish_expr_stmt): Likewise.
16000 (begin_if_stmt): Likewise.
16001 (finish_then_clause): Likewise.
16002 (begin_while_stmt): Likewise.
16003 (begin_do_stmt): Likewise.
16004 (finish_return_stmt): Likewise.
16005 (begin_for_stmt): Likewise.
16006 (finish_break_stmt): Likewise.
16007 (finish_continue_stmt): Likewise.
16008 (begin_switch_stmt): Likewise.
16009 (finish_case_label): Likewise.
16010 (begin_try_block): Likewise.
16011 (begin_function_try_block): Likewise.
16012 (begin_handler): Likewise.
16013 (begin_catch_block): Likewise.
16014 (begin_compound_stmt): Likewise.
16015 (begin_asm_stmt): Likewise.
16016 (finish_asm_stmt): Likewise.
16017 (finish_label_stmt): Likewise.
16018 (add_decl_stmt): Likewise.
16019 (finish_subobject): Likewise.
16020 (finish_decl_cleanup): Likewise.
16021 (finish_named_return_value): Likewise.
16022 (setup_vtbl_ptr): Likewise.
16023 (add_scope_stmt): Likewise.
16024 (finish_stmt_expr): Likewise.
16025 (prune_unused_decls): Remove.
16026 (begin_stmt_tree): Likewise.
16027 (finish_stmt_tree): Likewise.
16028 (prep_stmt): Adjust use of current_stmt_tree.
16029 (lang_expand_stmt): Likewise.
16030 * tree.c (statement_code_p): Remove.
16031 (cp_statement_code_p): New function.
16032 (walk_stmt_tree): Remove.
16033 (init_tree): Set lang_statement_code_p.
16035 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
16037 Integrated preprocessor.
16039 * Make-lang.in, Makefile.in: Remove all references to input.c,
16040 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
16041 * gxx.gperf, hash.h, input.c: Delete.
16042 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
16043 initialized properly.
16045 * class.c (fixup_pending_inline): Take a tree, not a
16046 struct pending_inline *. All callers changed.
16047 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
16048 RID_PROTECTED entries in ridpointers[] array here.
16049 * decl.c (duplicate_decls): Do not refer to struct
16051 (record_builtin_type, init_decl_processing): Use RID_MAX not
16053 (grokdeclarator): Use C_IS_RESERVED_WORD.
16054 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
16056 (grok_x_components): Do not inspect pending_inlines chain.
16058 * cp-tree.h (struct lang_identifier): Add rid_code entry.
16059 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
16060 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
16061 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
16062 TIME_IDENTIFIER_FILEINFO): Kill.
16064 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
16065 single 32-bit word.
16066 * parse.y: Call do_pending_inlines unconditionally.
16067 reinit_parse_for_method is now snarf_method. fn.defpen is no
16068 longer necessary. Remove unnecessary <itype> annotation on
16069 SCOPE. Do not refer to end_of_file or struct pending_inline.
16070 * semantics.c (begin_inline_definitions): Call
16071 do_pending_inlines unconditionally.
16073 * lex.c: Remove all code now shared with C front end.
16074 Initialize cpplib properly if USE_CPPLIB. Put reserved words
16075 into the get_identifier table. Rewrite pragma handling to
16076 work with the registry. Move code to save tokens for later
16077 processing to spew.c.
16079 * spew.c: Rewrite everything in terms of token streams instead
16080 of text. Move routines here from lex.c / input.c as
16081 appropriate. GC-mark trees hanging off the pending inlines
16084 2000-09-06 Mark Mitchell <mark@codesourcery.com>
16086 * NEWS: Mention that the named return value extension has been
16088 * cp-tree.h (original_result_rtx): Define.
16089 (TREE_REFERENCE_EXPR): Remove.
16090 (DECL_VPARENT): Likewise.
16091 (pushdecl_nonclass_level): Likewise.
16092 (store_return_init): Likewise.
16093 (reinit_lang_specific): Likewise.
16094 (genrtl_named_return_value): Change prototype.
16095 * decl.c (original_result_rtx): Remove.
16096 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
16097 Do not generate RTL for local variables here.
16098 (store_return_init): Remove.
16099 * semantics.c (genrtl_named_return_value): Simplify. Fold in
16101 (finish_named_return_value): Adjust accordingly. Warn that this
16102 extension is deprecated.
16103 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
16105 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16107 * pt.c (type_unification_real): Replace switch with if.
16108 (unify): Tsubst non-type parms before comparing.
16110 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16112 * error.c (dump_typename): New function, broken out of ...
16113 (dump_type): ... here. Use it.
16114 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
16116 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16118 * init.c (build_offset_ref): Deal with namespace scoped
16121 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16123 * class.c (resolve_address_of_overloaded_function): Add
16124 explanation message.
16125 * decl.c (define_case_label): Reformat explanation.
16126 * decl2.c (finish_static_data_member_decl): Likewise.
16127 (grokfield): Likewise.
16128 * friend.c (do_friend): Likewise.
16130 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
16132 * tree.c (walk_tree): Expose tail recursion.
16133 (walk_stmt_tree): New function.
16134 * cp-tree.h: Prototype walk_stmt_tree.
16135 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
16136 the BLOCKs directly. If a BLOCK has no variables after
16137 pruning, discard it.
16138 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
16139 restore the line number.
16141 2000-09-05 Mark Mitchell <mark@codesourcery.com>
16143 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
16144 (pt.o): Remove dependency on HTAB_H.
16145 * cp-tree.h: Include hashtab.h.
16146 (walk_tree): Change prototype.
16147 (walk_tree_without_duplicates): New function.
16148 * decl.c (check_default_argument): Use it.
16149 * optimize.c (remap_decl): Adjust calls to walk_tree.
16150 (copy_body): Likewise.
16151 (expand_calls_inline): Likewise.
16152 (calls_setjmp_p): Use walk_tree_without_duplicates.
16153 * pt.c: Don't include hashtab.h.
16154 (for_each_template_parm): Use walk_tree_without_duplicates.
16155 * semantics.c (finish-stmt_tree): Likewise.
16156 (expand_body): Likewise.
16157 * tree.c (walk_tree): Add additional parameter.
16158 (walk_tree_without_duplicates): New function.
16159 (count_trees): Use it.
16160 (verify_stmt_tree): Adjust call to walk_tree.
16161 (find_tree): Use walk_tree_without_duplicates.
16162 (no_linkage_check): Likewise.
16163 (break_out_target_exprs): Adjust call to walk_tree.
16164 (cp_unsave): Likewise.
16166 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
16168 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
16169 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
16170 * cp-tree.h (TYPE_BINFO): Adjust comment.
16171 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
16172 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
16173 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
16174 (TYPE_TEMPLATE_INFO): Likewise.
16175 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
16176 * class.c (push_nested_class): Likewise.
16177 * decl.c (lookup_name_real): Likewise.
16178 (grokdeclarator): Likewise.
16179 (grok_op_properties): Likewise.
16180 (xref_tag): Likewise.
16181 (xref_basetypes): Likewise.
16182 * decl2.c (constructor_name_full): Likewise.
16183 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
16184 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
16185 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
16186 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16187 (dump_type_suffix): Likewise.
16188 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
16190 (get_aggr_from_typedef): Likewise.
16191 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
16192 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16193 (write_template_parm): Likewise.
16194 (write_template_template_parm): Check tree code instead of
16195 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16196 * method.c (build_overload_nested_name): Add
16197 BOUND_TEMPLATE_TEMPLATE_PARM.
16198 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
16199 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16200 * pt.c (convert_template_argument): Check tree code instead of
16201 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16202 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
16203 (for_each_template_parm): Adjust comment.
16204 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
16205 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16206 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
16207 template_args_equal to compare template template parameter cases.
16208 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16209 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
16211 * tree.c (copy_template_template_parm): Decide whether to create
16212 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
16213 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16214 (copy_tree_r): Likewise.
16215 * typeck.c (comptypes): Likewise. Check tree code instead of
16216 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16218 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
16220 * decl.c (finish_function): Move the code for handling functions
16221 marked with the constructor and destructor attributes inside the
16224 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
16226 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
16228 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
16230 * pt.c (lookup_template_class): Remove abort.
16231 * tree.c (get_type_decl): Allow error_mark_node.
16233 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
16235 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
16238 2000-09-03 Mark Mitchell <mark@codesourcery.com>
16240 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
16243 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
16245 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
16246 union tag mismatch error reporting.
16248 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
16250 * call.c (build_scoped_method_call): Check it is not a namespace.
16252 2000-08-30 Jason Merrill <jason@redhat.com>
16254 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
16256 * tree.c (bot_manip): Check TREE_CONSTANT rather than
16257 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
16258 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
16260 * decl.c (start_function): Always call make_function_rtl.
16262 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
16264 * semantics.c (prune_unused_decls): New function.
16265 (finish_stmt_tree): Call it via walk_tree.
16267 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
16269 * class.c (build_secondary_vtable): Constify a char *.
16270 * decl.c (init_decl_processing): Initialize function_id_node,
16271 pretty_function_id_node, and func_id_node.
16272 * input.c (struct input_source): Constify 'str'.
16273 (feed_input): Constify first argument.
16274 * mangle.c (write_identifier): Constify argument.
16275 * pt.c (mangle_class_name_for_template): Constify argument.
16277 2000-08-29 Mark Mitchell <mark@codesourcery.com>
16279 * typeck.c (mark_addressable): Remove code that pokes around in
16282 2000-08-28 Jason Merrill <jason@redhat.com>
16284 * lex.c (file_name_nondirectory): Move to toplev.c.
16286 * cp-tree.h (LOCAL_CLASS_P): New macro.
16287 * class.c (finish_struct_1): Use it.
16289 2000-08-27 Alex Samuel <samuel@codesourcery.com>
16291 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
16292 (write_encoding): Pass another argument to write_name.
16293 (write_name): Add ignore_local_scope parameter. Fix handling of
16295 (write_nested_name): Use write_unqualified_name.
16296 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
16297 (write_template_prefix): Use write_unqualified_name.
16298 (write_component): Remove.
16299 (write_local_name): Add parameter. Use direct local entity to
16300 discriminator calculation.
16301 (write_class_enum_type): Pass another argument to write_name.
16302 (write_template_template_arg): Likewise.
16303 (make_guard_variable): Likewise.
16305 2000-08-27 Jason Merrill <jason@redhat.com>
16307 * decl.c (pushdecl): Matching decls for local externs are found in
16308 the current level. Propagate linkage information from previous
16311 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
16313 * ir.texi (Expressions): Fix typo.
16315 2000-08-25 Greg McGary <greg@mcgary.org>
16317 * tree.c (init_tree): Use ARRAY_SIZE.
16319 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
16321 * error.c (cp_tree_printer): Rework.
16323 2000-08-25 Mark Mitchell <mark@codesourcery.com>
16325 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
16327 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
16328 (cp-demangle.o): Remove target.
16329 (dyn-string.o): Likewise.
16331 * decl.c (grokfndecl): Require that `main' return an `int'.
16332 * mangle.c (write_encoding): Don't mangle return types for
16333 conversion functions.
16335 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
16337 * error.c (tree_formatting_info): New data type.
16338 (tree_being_formatted): New macro.
16339 (tree_formatting_flags): Likewise.
16340 (put_whitespace): Likewise.
16341 (print_tree_identifier): Likewise.
16342 (print_identifier): Likewise.
16343 (cp_tree_printer, print_function_argument_list, print_declaration,
16344 print_expression, print_function_declaration,
16345 print_function_parameter, print_type, print_cv_qualifier): New
16347 (init_error): Initialize lang_printer.
16349 2000-08-24 Jason Merrill <jason@redhat.com>
16351 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
16352 adjustment necessary.
16354 2000-08-24 Greg McGary <greg@mcgary.org>
16356 * cp-tree.h (MAIN_NAME_P): Remove macro.
16358 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
16360 * error.c (print_instantiation_context): Don't forget to flush the
16363 2000-08-23 Jason Merrill <jason@redhat.com>
16365 * typeck.c (build_ptrmemfunc): Save the input pmf.
16367 * method.c (process_modifiers): Use same_type_p.
16369 2000-08-23 Mark Mitchell <mark@codesourcery.com>
16371 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
16372 * mangle.c (write_function_type): Change prototype.
16373 (write_encoding): Don't mangle return types for
16374 constructors or destructors.
16375 (write_type): Adjust call to write_function_type.
16376 * pt.c (instantiate_template): Instantiate alternate entry points
16377 when instantiating the main function.
16379 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
16381 * error.c (cp_print_error_function): Don't use embedded '\n' in
16384 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
16386 * decl.c (init_decl_processing): Remove bogus initialization.
16387 * error.c (lang_print_error_function): Restore here.
16388 (init_error): Initialize print_error_function.
16390 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16392 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
16394 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
16396 * Makefile.in (error.o): Depends on diagnostic.h
16398 * cp-tree.h (problematic_instantiation_changed,
16399 record_last_problematic_instantiation, current_instantiation,
16400 print_instantiation_context): Declare.
16401 (maybe_print_template_context): Remove.
16403 * decl.c (init_decl_processing): Set print_error_function to NULL.
16404 (lang_print_error_function): Remove, since we're using a new
16407 * error.c: #include diagnostic.h
16408 (function_category): New function.
16409 (cp_diagnostic_starter): Likewise.
16410 (cp_diagnostic_finalizer): Likewise.
16411 (cp_print_error_function): Likewise.
16412 (maybe_print_instantiation_context): Likewise.
16413 (print_instantiation_full_context): Likewise.
16414 (print_instantiation_partial_context): Likewise.
16415 (print_instantiation_context): Define.
16416 (init_error): Initialize diagnostic pager and finalizer.
16418 * pt.c (problematic_instantiation_changed): Define.
16419 (record_last_problematic_instantiation): Likewise.
16420 (current_instantiation): Likewise.
16421 (maybe_print_template_context): Remove.
16422 (print_template_context): Likewise.
16423 (current_tinst_level): Make static to reflect Brendan Kehoe's
16424 change of 1995-04-13.
16425 (push_tinst_level): Call print_instantiation_context.
16427 2000-08-21 Nix <nix@esperi.demon.co.uk>
16429 * lang-specs.h: Do not process -o or run the assembler if
16432 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
16434 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
16436 * decl2.c (lang_decode_option): Disable gettext attributes for
16439 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
16441 * lex.c (lang_init_options): Default diagnostic message maximum
16442 length to 80, when line-wrapping.
16444 2000-08-20 Mark Mitchell <mark@codesourcery.com>
16446 * class.c (build_vtbl_initializer): Clear the entire
16447 vtbl_init_data. Start keeping track of the functions for which we
16448 have created vcall offsets here.
16449 (dfs_build_vcall_offset_vtbl_entries): Remove.
16450 (build_vcall_offset_vtbl_entries): Reimplement.
16451 (add_vcall_offset_vtbl_entries_r): New function.
16452 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
16453 computing when vcall offsets are necessary.
16455 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16457 * decl.c (member_function_or_else): Use cp_error ... %T.
16458 (grokdeclarator): Likewise.
16459 (start_method): Likewise.
16460 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
16462 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16464 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
16467 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16469 * cp-tree.h (PTRMEM_OK_P): New macro.
16470 (itf_ptrmem_ok): New enumeration value.
16471 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
16472 argument. Diagnose implicit pointer to member.
16473 (instantiate_type): Don't diagnose implicit pointer to member
16474 here. Pass itf_ptrmem_ok if ok. Adjust calls to
16475 resolve_address_of_overloaded_function.
16476 * init.c (build_offset_ref): Set PTRMEM_OK_P.
16477 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
16478 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
16479 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
16480 (build_unary_op): Deal with single non-static member in
16483 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16485 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
16487 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16489 * cp-tree.h (enum_name_string): Remove prototype.
16490 (report_case_error): Remove prototype.
16491 * cp/typeck2.c (enum_name_string): Remove.
16492 (report_case_error): Remove.
16493 * error.c (dump_expr): Deal with enum values directly.
16494 Correctly negate integer constant.
16496 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16498 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
16499 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
16500 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
16501 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
16502 (__cxa_vec_new): Use __cxa_vec_new2.
16503 (__cxa_vec_delete): Use __cxa_vec_delete2.
16505 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16507 * vec.cc (__cxa_vec_new): Set "C" linkage.
16508 (__cxa_vec_ctor): Likewise.
16509 (__cxa_vec_cctor): Likewise.
16510 (__cxa_vec_dtor): Likewise.
16511 (__cxa_vec_delete): Likewise.
16512 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
16513 (__cxa_vec_ctor): Likewise.
16514 (__cxa_vec_cctor): Likewise.
16515 (__cxa_vec_dtor): Likewise.
16516 (__cxa_vec_delete): Likewise.
16518 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16520 * class.c (instantiate_type): Reinstate local variable
16521 deleted in previous change.
16523 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
16526 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16528 * cp-tree.h (instantiate_type_flags): New enumeration.
16529 (instantiate_type): Change parameter.
16530 * class.c (instantiate_type): Adjust prototype. Adjust.
16531 * call.c (standard_conversion): Adjust instantiate_type call.
16532 (reference_binding): Likewise.
16533 (build_op_delete_call): Likewise.
16534 (convert_like_real): Likewise.
16535 * cvt.c (cp_convert_to_pointer): Likewise.
16536 (convert_to_reference): Likewise.
16537 * pt.c (convert_nontype_argument): Likewise.
16538 * typeck.c (build_binary_op): Likewise.
16539 (build_ptrmemfunc): Likewise.
16540 (convert_for_assignment): Likewise.
16542 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16544 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
16545 (current_aggr): Define.
16546 * decl.c (grokdeclarator): Make sure a friend class is an
16547 elaborated type specifier.
16548 * parse.y (current_aggr): Remove static definition.
16549 (cp_parse_init): Adjust.
16550 (structsp): Clear and restore current_aggr.
16551 (component_decl_list): Clear current_aggr.
16553 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
16554 aggregate tag on the typename's context.
16556 * pt.c (tsubst_friend_class): Return error_mark_node, if
16557 parms becomes NULL.
16558 (instantiate_class_template): Ignore error_mark_node friend types.
16560 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
16562 * cvt.c (warn_ref_binding): New static function, broken out of ...
16563 (convert_to_reference): ... here. Use it.
16565 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
16567 * parse.y (template_arg): Add rule for template qualified with
16570 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16572 * decl2.c (add_function): Reorganize.
16573 (arg_assoc): Do not consider function template decls.
16575 2000-08-11 Jason Merrill <jason@redhat.com>
16577 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
16580 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16582 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
16583 (lookup_nested_tag): Likewise.
16585 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
16588 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16590 * parse.y (named_complex_class_head_sans_basetype): Remove
16593 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16595 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
16596 explicit TEMPLATE_ID_EXPR args.
16597 (build_expr_from_tree, case CALL_EXPR): Likewise.
16599 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16601 * decl.c (check_tag_decl): Diagnose typename's which don't
16604 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
16606 * init.c (build_aggr_init): Reject bogus array initializers
16609 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
16611 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
16613 * cp/tinfo.cc (__dynamic_cast): Likewise.
16614 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
16616 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
16618 * cvt.c (convert_to_pointer_force): Fix error message when
16619 attempting to cast from ambiguous base.
16621 2000-08-08 Jason Merrill <jason@redhat.com>
16623 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
16624 (tsubst_template_arg_vector): Likewise.
16626 * decl2.c (build_anon_union_vars): Choose the largest field; don't
16627 assume that one will be as large as the union.
16629 2000-08-07 Kazu Hirata <kazu@hxi.com>
16631 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
16632 * decl.c (pop_labels): Likewise.
16634 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
16636 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
16638 (__pointer_to_member_type_info): Likewise.
16639 (__base_class_info): Likewise.
16640 (__class_type_info): Likewise.
16641 (__si_class_type_info): Likewise.
16642 (__vmi_class_type_info): Likewise.
16643 * tinfo.cc (__si_class_type_info::__do_find_public_src):
16644 Changed member names to match specifications.
16645 (__vmi_class_type_info::__do_find_public_src): Likewise.
16646 (__si_class_type_info::__do_dyncast): Likewise.
16647 (__vmi_class_type_info::__do_dyncast): Likewise.
16648 (__si_class_type_info::__do_upcast): Likewise.
16649 (__vmi_class_type_info::__do_upcast): Likewise.
16650 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
16651 (__pbase_type_info::__pointer_catch): Likewise.
16652 (__pointer_type_info::__pointer_catch): Likewise.
16653 (__pointer_to_member_type_info::__pointer_catch): Likewise.
16655 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
16657 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
16658 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
16659 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
16661 2000-08-04 Mark Mitchell <mark@codesourcery.com>
16663 * cp-tree.h (add_method): Change prototype.
16664 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
16665 Don't double the size of the method vector in the error case.
16666 (handle_using_decl): Adjust call to add_method.
16667 (add_implicitly_declared_members): Likewise.
16668 (clone_function_decl): Likewise.
16669 * decl2.c (check_classfn): Likewise.
16670 * semantics.c (finish_member_declaration): Likewise.
16672 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
16674 * decl.c (flag_isoc94): New variable.
16676 2000-08-02 Jason Merrill <jason@redhat.com>
16678 * pt.c (do_type_instantiation): Add complain parm; don't complain
16679 if called recursively.
16680 * cp-tree.h, parse.y: Adjust.
16682 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
16684 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
16685 -Wno-strict-prototypes.
16687 * g++spec.c: Adjust type of second argument to
16688 lang_specific_driver, and update code as necessary.
16690 * cp-tree.h: Don't prototype min_precision here.
16691 (my_friendly_assert): Cast expression to void.
16692 * semantics.c (do_poplevel): Initialize scope_stmts.
16694 2000-08-02 Mark Mitchell <mark@codesourcery.com>
16696 * cp-tree.h (DECL_NEEDED_P): Tweak.
16698 2000-07-28 Jason Merrill <jason@redhat.com>
16700 * lang-specs.h: Use %i in rule for .ii files.
16702 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
16704 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
16706 2000-07-30 Mark Mitchell <mark@codesourcery.com>
16708 Allow indirect primary bases.
16709 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
16711 (CLASSTYPE_VFIELD_PARENT): Remove.
16712 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
16713 (BINFO_PRIMARY_BINFO): Remove.
16714 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
16715 (BINFO_VBASE_PRIMARY_P): Likewise.
16716 (BINFO_PRIMARY_BASE_OF): New macro.
16717 (BINFO_INDIRECT_PRIMARY_P): Likewise.
16718 (get_primary_binfo): New function.
16719 * decl.c (lang_mark_tree): Make lang_type::primary_base.
16720 * class.c (vcall_offset_data_s): Rename to ...
16721 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
16722 and add ctor_vtbl_p.
16723 (get_derived_offset): Use get_primary_binfo.
16724 (dfs_mark_primary_bases): Adjust handling of virtual primary
16726 (mark_primary_bases): Likewise.
16727 (set_primary_base): Take a binfo, not an integer, as a
16728 representation of the primary base.
16729 (indirect_primary_base_p): Remove.
16730 (determine_primary_base): Adjust for indirect primary bases.
16731 (dfs_find_final_overrider): Fix typo in coment.
16732 (update_vtable_entry_for_fn): Use get_primary_binfo.
16733 (layout_nonempty_base_or_field): Tweak.
16734 (build_base_fields): Adjust for new primary base semantics.
16735 (dfs_propagate_binfo_offsets): Remove.
16736 (propagate_binfo_offsets): Rewrite.
16737 (dfs_set_offset_for_shared_vbases): Remove.
16738 (layout_virtual_bases): Don't use it.
16739 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
16741 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
16742 CLASSTYPE_VFIELD_PARENT.
16743 (dfs_get_primary_binfo): New function.
16744 (get_primary_binfo): Likewise.
16745 (dump_class_hierarchy_r): Tweak printing of primary bases.
16746 (build_vtbl_initializer): Fix typo in comments. Use
16748 (build_vcall_and_vbase_vtbl_entries): Likewise.
16749 (build_vbaes_offset_vtbl_entries): Likewise.
16750 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
16751 BV_VCALL_INDEX to handle indirect primary bases.
16752 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
16753 (build_rtti_vtbl_entries): Likewise.
16754 * search.c (get_shared_vbase_if_not_primary): Tweak.
16755 (find_vbase_instance): Likewise.
16756 (binfo_for_vtable): Simplify.
16757 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
16758 (make_binfo): Make it have 11 entries.
16760 2000-07-30 Alex Samuel <samuel@codesourcery.com>
16762 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
16763 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
16764 ascertaining primaryness.
16765 (G): Remove template_args.
16766 (decl_is_template_id): New function.
16767 (write_encoding): Use decl_is_template_id.
16768 (write_name): Likewise. Handle type_decls. Get main variant of
16770 (write_nested_name): Likewise.
16771 (write_prefix): Likewise.
16772 (write_template_prefix): Likewise.
16773 (write_special_name_constructor): Remove defunct production from
16775 (write_bare_function_type): Remove comment about absent parameter.
16776 (write_template_template_arg): Add missing grammar production to
16779 2000-07-27 Jason Merrill <jason@redhat.com>
16781 * decl.c (duplicate_decls): If common_type produces a non-typedef
16782 type for a typedef, just use the old type.
16784 2000-07-27 Mark Mitchell <mark@codesourcery.com>
16786 * cp-tree.h (function_depth): Declare.
16787 (verify_stmt_tree): Likewise.
16788 (find_tree): Likewise.
16789 * decl.c (function_depth): Give it external linkage.
16790 * optimize.c (optimize_function): Increment and decrement it.
16791 * tree.c (verify_stmt_tree_r): New function.
16792 (verify_stmt_tree): Likewise.
16793 (find_tree_r): Likewise.
16794 (find_tree): Likewise.
16796 2000-07-27 Jason Merrill <jason@redhat.com>
16798 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
16800 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
16802 2000-07-26 Mark Mitchell <mark@codesourcery.com>
16804 * decl.c (start_cleanup_fn): Mark the function as `inline'.
16805 * decl2.c (get_guard): Call cp_finish_decl, not
16806 rest_of_decl_compilation, for local guards.
16807 * lex.c (do_identifier): Remove unused variable.
16809 2000-07-26 Marc Espie <espie@cvs.openbsd.org>
16811 * parse.y: Add missing ';'.
16813 2000-07-26 Mark Mitchell <mark@codesourcery.com>
16815 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
16818 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
16820 Kill strict_prototype. Backwards compatibility only for
16821 non NO_IMPLICIT_EXTERN_C systems.
16822 * cp-tree.h (flag_strict_prototype): Remove.
16823 (strict_prototype): Remove.
16824 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16825 * decl.c (maybe_push_to_top_level): Adjust.
16826 (pop_from_top_level): Adjust.
16827 (decls_match): Only allow sloppy parm matching for ancient
16829 (init_decl_processing): Adjust.
16830 (grokdeclarator): Adjust.
16831 * decl2.c (flag_strict_prototype): Remove.
16832 (strict_prototype): Remove.
16833 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16834 (lang_f_options): Remove "strict-prototype".
16835 (unsupported-options): Add "strict-prototype".
16836 * lex.c (do_identifier): Adjust.
16837 (do_scoped_id): Adjust.
16838 * parse.y (empty_parms): Adjust.
16839 * class.c (push_lang_context): Adjust.
16840 (pop_lang_context): Adjust.
16841 * typeck.c (comp_target_parms): Adjust.
16843 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
16845 * decl.c (poplevel): Deal with anonymous variables at for scope.
16846 (maybe_inject_for_scope_var): Likewise.
16848 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
16850 * decl.c: Remove all signal handling code, now done in toplev.c.
16852 2000-07-23 Mark Mitchell <mark@codesourcery.com>
16854 * decl.c (make_rtl_for_nonlocal_decl): Rework.
16856 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
16859 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
16861 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
16862 Define my_friendly_assert and my_friendly_abort as macros
16863 which may call friendly_abort. Prototype friendly abort, not
16864 my_friendly_abort or my_friendly_assert.
16865 * decl.c (signal_catch): Report the signal caught in the error
16866 message. Call fatal directly.
16867 * typeck2.c (ack, my_friendly_assert): Delete.
16868 (my_friendly_abort): Rename to friendly_abort. Expect file,
16869 line, and function parameters. Report the abort code, then
16870 call fancy_abort. Do not mask an abort if errors have
16873 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
16875 * typeck.c (comp_target_parms): Remove obsolete parameter.
16876 (comp_target_types): Adjust.
16878 2000-07-17 Jason Merrill <jason@redhat.com>
16880 * typeck.c (mark_addressable): Never set TREE_USED.
16881 * call.c (build_call): Don't abort on calls to library functions
16882 that have been declared normally.
16884 * typeck.c (build_binary_op): Fix grammar in warning.
16886 * exception.cc (__eh_free): Fix prototype.
16888 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
16890 * decl.c (pushdecl): Handle seeing an OVERLOAD in
16891 IDENTIFIER_NAMESPACE_VALUE.
16893 2000-07-16 Mark Mitchell <mark@codesourcery.com>
16895 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
16896 * method.c (use_thunk): Correct handling of vcall offsets.
16898 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
16900 * .cvsignore: parse.h and parse.c have no cp- prefix.
16902 2000-07-13 Mark Mitchell <mark@codesourcery.com>
16904 * .cvsignore: New file.
16906 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
16908 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
16910 2000-07-12 Mark Mitchell <mark@codesourcery.com>
16912 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
16914 * parse.h: Likewise.
16916 2000-07-11 Mark Mitchell <mark@codesourcery.com>
16918 * class.c (layout_class_type): Add pointers to virtual bases after
16919 base classes under the old ABI.
16921 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
16923 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
16924 (finish_continue_stmt): Likewise.
16925 (begin_for_stmt): Remove call to note_level_for_for.
16926 (finish_goto_stmt): Change call from build_min_nt
16928 (finish_expr_stmt): Likewise.
16929 (begin_if_stmt): Likewise.
16930 (begin_while_stmt): Likewise.
16931 (finish_while_stmt): Likewise.
16932 (finish_return_stmt): Likewise.
16933 (begin_for_stmt): Likewise.
16934 (finish_for_stmt): Likewise.
16935 (finish_break_stmt): Likewise.
16936 (begin_switch_stmt): Likewise.
16937 (finish_case_label): Likewise.
16938 (genrtl_try_block): Likewise.
16939 (begin_try_block): Likewise.
16940 (begin_handler): Likewise.
16941 (begin_compound_stmt): Likewise.
16942 (finish_asm_stmt): Likewise.
16943 (finish_label_stmt): Likewise.
16944 (add_decl_stmt): Likewise.
16945 (finish_subobject): Likewise.
16946 (finish_decl_cleanup): Likewise.
16947 (finish_named_return_value): Likewise.
16948 (setup_vtbl_ptr): Likewise.
16949 (add_scope_stmt): Likewise.
16950 * decl.c (finish_constructor_body): Likewise.
16951 (finish_destructor_body): Likewise.
16952 * optimize.c (copy_body_r): Likewise.
16953 (initialize_inlined_parameters): Likewise.
16954 (declare_return_variable): Likewise.
16955 (expand_call_inline): Likewise.
16957 2000-07-10 Jakub Jelinek <jakub@redhat.com>
16959 * semantics.c (expand_body): Sync interface information
16960 at the end of function body expansion.
16962 2000-07-09 Jason Merrill <jason@redhat.com>
16964 * init.c (build_new_1): Bail early if the call to new fails.
16966 * decl.c (compute_array_index_type): Check specifically for
16967 an INTEGER_CST, not just TREE_CONSTANT.
16969 * decl.c (duplicate_decls): Don't call duplicate_decls on
16970 the DECL_TEMPLATE_RESULT.
16971 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
16974 * error.c (dump_template_bindings): Don't crash if we had an
16975 invalid argument list.
16977 * typeck.c (c_expand_start_case): Do narrowing here.
16978 * semantics.c (finish_switch_cond): Not here.
16980 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
16982 * parse.y (asm_clobbers): Do string concatenation.
16984 2000-07-09 Mark Mitchell <mark@codesourcery.com>
16986 * decl.c (pushtag): Don't put local classes in template functions
16987 on the local_classes list.
16989 2000-07-04 Scott Snyder <snyder@fnal.gov>
16991 * decl2.c (get_guard): Add missing return for old ABI local
16994 2000-07-09 Mark Mitchell <mark@codesourcery.com>
16996 * cp-tree.h (char_type_p): New function.
16997 * decl.c (init_decl_processing): Don't initialize
16998 signed_wchar_type_node or unsigned_wchar_type_node.
16999 (complete_array_type): Handle brace-enclosed string-constants.
17000 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
17001 * tree.c (char_type_p): New function.
17002 * typeck2.c (digest_init): Use char_type_p.
17004 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
17006 * pt.c (tsubst): Don't layout type, if it's error_mark.
17008 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
17010 * pt.c (instantiate_pending_templates): Reset template level.
17012 2000-07-05 Jason Merrill <jason@redhat.com>
17014 * call.c (joust): Don't complain about `operator char *()' beating
17015 `operator const char *() const'.
17017 2000-07-04 scott snyder <snyder@fnal.gov>
17018 Jason Merrill <jason@redhat.com>
17020 * repo.c (repo_get_id): Handle the case where a class with virtual
17021 bases has a null TYPE_BINFO_VTABLE.
17023 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
17024 Jason Merrill <jason@redhat.com>
17026 * parse.y (member_init): Just pass in the type.
17027 * init.c (expand_member_init): Handle getting a type.
17029 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17030 Jason Merrill <jason@redhat.com>
17032 * decl.c (finish_function): Warn if a function has no return
17034 Suggested by Andrew Koenig.
17035 * typeck.c (check_return_expr): Do set current_function_returns_value
17036 if we got an error_mark_node.
17038 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
17040 * decl2.c (push_decl_namespace): Push the original namespace.
17042 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
17044 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
17045 * semantics.c (begin_class_definition): Clear it.
17047 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
17049 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
17050 (genrtl_expr_stmt): Likewise.
17051 (genrtl_decl_stmt): Likewise.
17052 (genrtl_if_stmt): Likewise.
17053 (genrtl_while_stmt): Likewise.
17054 (genrtl_do_stmt): Likewise.
17055 (genrtl_return_stmt): Likewise.
17056 (genrtl_for_stmt): Likewise.
17057 (genrtl_break_stmt): Likewise.
17058 (genrtl_continue_stmt): Likewise.
17059 (genrtl_scope_stmt): Likewise.
17060 (genrtl_switch_stmt): Likewise.
17061 (genrtl_case_label): Likewise.
17062 (genrtl_begin_compound_stmt): Likewise.
17063 (genrtl_finish_compound_stmt): Likewise.
17064 (genrtl_compound_stmt): Likewise.
17065 (genrtl_asm_stmt): Likewise.
17067 * init.c (begin_init_stmts): Remove call to
17068 genrtl_begin_compound_stmt.
17069 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
17071 * semantics.c (lang_expand_stmt): Changed call to
17072 genrtl_compound_stmt to ignore return value.
17074 2000-07-02 Mark Mitchell <mark@codesourcery.com>
17076 * mangle.c (canonicalize_for_substitution): Return the canonical
17079 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
17081 * typeck.c (commonparms): Remove obstack manipulations.
17083 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
17085 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
17087 * Makefile.in (OBJS): Added ../c-semantics.o.
17088 (OBJDEPS): Likewise.
17090 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
17092 (struct stmt_tree): Added comment.
17093 (current_function_name_declared): Removed.
17094 (stmts_are_full_exprs_p): Likewise.
17095 (genrtl_do_pushlevel): Likewise.
17096 (genrtl_clear_out_block): Likewise.
17097 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
17098 (DECL_ANON_UNION_ELEMS): Likewise.
17099 (emit_local_var): Likewise.
17100 (make_rtl_for_local_static): Likewise.
17101 (do_case): Likewise.
17102 (expand_stmt): Likewise.
17103 (genrtl_decl_cleanup): Likewise.
17104 (c_expand_asm_operands): Likewise.
17105 (c_expand_return): Likewise.
17106 (c_expand_start_case): Likewise.
17108 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
17109 (emit_local_var): Likewise.
17110 (initialize_local_var): Change reference to
17111 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
17112 Change reference to stmts_are_full_exprs_p to
17113 current_stmt_tree->stmts_are_full_exprs_p.
17114 (push_cp_function_context): Likewise.
17116 * expect.c (expand_throw): Change reference to
17117 stmts_are_full_exprs_p.
17119 * init.c (build_aggr_init): Change reference to
17120 stmts_are_full_exprs_p.
17121 (build_vec_init): Likewise.
17123 * optimize.c (maybe_clone_body): Change reference to
17124 current_function_name_declared to
17125 cp_function_chain->name_declared.
17127 * pt.c (instantiate_decl): Change reference to
17128 current_function_name_declared to
17129 cp_function_chain->name_declared.
17131 * semantics.c (expand_cond): Moved declaration to c-common.h.
17132 (genrtl_do_pushlevel): Moved to c-semantics.c.
17133 (genrtl_clear_out_block): Likewise.
17134 (genrtl_goto_stmt): Likewise.
17135 (genrtl_expr_stmt): Likewise.
17136 (genrtl_decl_stmt): Likewise.
17137 (gerntl_if_stmt): Likewise.
17138 (genrtl_while_stmt): Likewise.
17139 (genrtl_do_stmt): Likewise.
17140 (genrtl_return_stmt): Likewise.
17141 (genrtl_for_stmt): Likewise.
17142 (genrtl_break_stmt): Likewise.
17143 (genrtl_continue_stmt): Likewise.
17144 (genrtl_scope_stmt): Likewise.
17145 (genrtl_switch_stmt): Likewise.
17146 (genrtl_case_label): Likewise.
17147 (genrtl_begin_compound_stmt): Likewise.
17148 (genrtl_finish_compound_stmt): Likewise.
17149 (genrtl_compound_stmt): Likewise.
17150 (genrtl_asm_stmt): Likewise.
17151 (genrtl_decl_cleanup): Likewise.
17152 (expand_cond): Likewise.
17153 (expand_stmt): Renamed to ...
17154 (lang_expand_stmt): ... this.
17155 (lang_expand_expr_stmt): Initialize.
17156 (set_current_function_name_declared): Likewise.
17157 (stmts_are_full_exprs_p): Likewise.
17158 (current_function_name_declared): Likewise.
17159 (anon_aggr_type_p): Likewise.
17160 (do_poplevel): Change reference to
17161 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
17162 Change reference to stmts_are_full_exprs_p to
17163 current_stmt_tree->stmts_are_full_exprs_p.
17164 (add_tree): Likewise.
17165 (finish_expr_stmt): Likewise.
17166 (prep_stmt): Likewise.
17167 (lang_expand_stmt): Likewise.
17168 (begin_compound_stmt): Change reference to
17169 current_function_name_declared to
17170 cp_function_chain->name_declared and call to
17171 current_function_name_declared().
17172 (setup_vtbl_ptr): Likewise.
17173 (genrtl_do_poplevel): Removed.
17175 2000-06-30 Jason Merrill <jason@redhat.com>
17177 * init.c (init_init_processing): Go back to aligning like
17178 double_type_node for old ABI.
17179 (get_cookie_size): Make cookie larger if we get a type that needs
17181 (build_vec_delete): Call it.
17183 * typeck.c (qualify_type_recursive): New fn.
17184 (composite_pointer_type): Use it.
17185 (build_binary_op): Use composite_pointer_type.
17187 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
17188 Jason Merrill <jason@redhat.com>
17190 * typeck.c (check_return_expr): Don't complain about returning
17191 NULL from operator new if -fcheck-new.
17192 * cp-tree.h: Declare flag_check_new here.
17193 * init.c: Not here.
17195 2000-06-28 Alex Samuel <samuel@codesourcery.com>
17197 * mangle.c (find_substitution): Use same_type_p.
17198 (write_encoding): Don't check for substitutions.
17200 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
17202 * parse.y (expr_no_comma_rangle): New non-terminal.
17203 (template_parm): Use it for default parameter case.
17204 (template_arg): Use it.
17205 (expr_no_commas): Remove commented out undefined extensions.
17206 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
17207 * parse.h, parse.c: Rebuilt.
17209 2000-06-30 Mark Mitchell <mark@codesourcery.com>
17211 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
17212 (finish_asm_stmt): Do it here, instead.
17214 * cp-tree.h (ridpointers): Don't declare.
17215 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
17216 (record_builtin_java_type): Likewise.
17217 (init_decl_processing): Likewise.
17218 * lex.c: Move inclusion of lex.h.
17219 (ridpointers): Don't define.
17220 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
17222 * lex.h (enum rid): Rename to ...
17223 (enum cp_rid): ... this.
17224 (ridpointers): Don't declare.
17225 * parse.y: Move inclusion of lex.h.
17226 * parse.c: Regenerated.
17227 * spew.c: Move inclusion of lex.h.
17229 * cp-tree.h (struct language_function): Remove temp_name_counter.
17230 (temp_name_counter): Remove.
17231 (get_temp_name): Change prototype.
17232 (get_guard): New function.
17233 (get_guard_cond): Likewise.
17234 (set_guard): Likewise.
17235 * cvt.c (build_up_reference): Adjust call to get_temp_name.
17236 * decl.c (expand_static_init): Use get_guard and friends to
17237 implement guard variables.
17238 * decl2.c (get_temp_name): Assume that the variables created are
17240 (get_sentry): Rename to ...
17241 (get_guard): ... this. Implement new ABI guard variables.
17242 (get_guard_bits): New function.
17243 (get_guard_cond): Likewise.
17244 (set_guard): Likewise.
17245 (start_static_initialization_or_destruction): Use them.
17246 (do_static_initialization): Replace sentry with guard throughout.
17247 (do_static_destruction): Likewise.
17248 * init.c (create_temporary_var): Add comment.
17250 2000-06-28 Alex Samuel <samuel@codesourcery.com>
17252 * mangle.c (find_substitution): Use same_type_p.
17253 (write_encoding): Don't check for substitutions.
17255 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
17257 * parse.y (expr_no_comma_rangle): New non-terminal.
17258 (template_parm): Use it for default parameter case.
17259 (template_arg): Use it.
17260 (expr_no_commas): Remove commented out undefined extensions.
17261 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
17262 * parse.h, parse.c: Rebuilt.
17264 2000-06-29 Mark Mitchell <mark@codesourcery.com>
17266 * cp-tree.h (flag_const_strings): Remove.
17267 (warn_parentheses): Likewise.
17268 (warn_format): Likewise.
17269 (common_type): Likewise.
17270 (default_conversion): Likewise.
17271 (build_binary_op): Likewise.
17272 (cp_build_binary_op): New macro.
17273 * call.c (build_new_op): Use cp_build_binary_op instead of
17275 * class.c (build_vtable_entry_ref): Likewise.
17276 * decl.c (expand_static_init): Likewise.
17277 (compute_array_index_type): Likewise.
17278 (build_enumerator): Likewise.
17279 * decl2.c (delete_sanity): Likewise.
17280 (start_static_initialization_or_destruction): Likewise.
17281 * error.c (dump_type_suffix): Likewise.
17282 * init.c (resolve_offset_ref): Likewise.
17283 (build_new): Likewise.
17284 (build_new_1): Likewise.
17285 (build_vec_delete_1): Likewise.
17286 (build_vec_init): Likewise.
17287 (build_delete): Likewise.
17288 * rtti.c (synthesize_tinfo_fn): Likewise.
17289 (synthesize_tinfo_var): Likewise.
17290 * search.c (expand_upcast_fixups): Likewise.
17291 (fixup_all_virtual_upcast_offsets): Likewise.
17292 * typeck.c (build_array_ref): Likewise.
17293 (get_member_function_from_ptrfunc): Likewise.
17294 (build_binary_op): Add parameter.
17295 (pointer_int_sum): Use cp_build_binary_op.
17296 (pointer_diff): Likewise.
17297 (build_modify_expr): Likewise.
17298 (get_delta_difference): Likewise.
17299 (build_ptrmemfunc): Likewise.
17301 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
17303 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
17304 * decl.c (create_implicit_typedef): Adjust.
17305 * decl2.c (build_artificial_parm): Adjust.
17306 * method.c (implicitly_declare_fn): Adjust.
17307 * pt.c (push_inline_template_parms_recursive): Adjust.
17308 (process_template_parm): Adjust.
17309 (overloaded_template_name): Adjust.
17310 * semantics.c (finish_template_template_parm): Adjust.
17312 2000-06-28 Mark Mitchell <mark@codesourcery.com>
17314 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
17315 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
17316 where to emit thunks.
17317 (build_vtt): Adjust call to build_vtt_inits.
17318 (build_vtt_inits): Add parameter to indicate whether or not
17319 sub-VTTs for virtual bases should be included. Adjust handling of
17320 construction vtables.
17321 (get_matching_base): New function.
17322 (dfs_build_vtt_inits): Rename to ...
17323 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
17324 construction vtables.
17325 (dfs_fixup_binfo_vtbls): Likewise.
17326 (build_ctor_vtbl_groups): Build construction vtables for virtual
17328 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
17329 to build construction vtbls.
17330 (dfs_accumulate_vtbl_inits): Adjust handling of
17331 construction vtables.
17333 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
17336 2000-06-27 Mark Mitchell <mark@codesourcery.com>
17338 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
17340 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
17342 * search.c (hides): Remove.
17343 (is_subobject_of_p): Add most_derived parameter. Use
17345 (lookup_field_queue_p): Adjust.
17346 (lookup_field_r): Adjust.
17348 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
17350 * decl2.c (handle_class_head): Bash typedefs to the type's main
17353 2000-06-25 Mark Mitchell <mark@codesourcery.com>
17355 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
17356 (begin_global_stmt_expr): ... this.
17357 (genrtl_finish_stmt_expr): Rename to ...
17358 (finish_global_stmt_expr): ... this.
17359 * init.c (begin_init_stmts): Adjust calls.
17360 (finish_init_stmts): Likewise.
17361 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
17362 (begin_global_stmt_expr): ... this.
17363 (genrtl_finish_stmt_expr): Rename to ...
17364 (finish_global_stmt_expr): ... this.
17366 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
17368 * search.c (lookup_member): Fix typo in comment.
17370 2000-06-24 Jason Merrill <jason@redhat.com>
17372 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
17373 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
17375 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17377 * parse.y (complex_direct_notype_declarator): Support global_scope.
17378 * Makefile.in: Adjust conflict count.
17380 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17382 * parse.y (template_arg): Convert TEMPLATE_DECL
17383 that is a template template parameter to
17384 TEMPLATE_TEMPLATE_PARM here.
17386 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
17387 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
17388 (copy_template_template_parm): Adjust prototype.
17389 * decl.c (grokdeclarator): Remove dead code.
17390 * pt.c (process_template_parm): Tidy.
17391 (lookup_template_class): Construct nodes in
17392 copy_template_template_parm.
17393 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
17394 lookup_template_class. Use TYPE_TI_TEMPLATE.
17395 * tree.c (copy_template_template_parm): Add NEWARGS
17397 (mapcar): Adjust call to copy_template_template_parm.
17398 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
17399 * method.c (build_template_template_parm_names): Change error
17400 code to avoid compilation warning.
17402 * gxxint.texi: Document template template parameter
17405 2000-06-21 Alex Samuel <samuel@codesourcery.com>
17407 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
17408 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
17409 (cp-demangle.o): New rule.
17410 (dyn-string.o): Likewise.
17411 * inc/cxxabi.h (__cxa_demangle): New declaration.
17413 2000-06-22 Mark Mitchell <mark@codesourcery.com>
17415 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
17416 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
17417 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
17418 a tree, not an int.
17419 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
17420 (make_thunk): Change prototype.
17421 (emit_thunk): Rename to use_thunk.
17422 (mangle_thunk): Change prototype.
17423 * class.c (get_derived_offset): Simplify.
17424 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
17425 BV_GENERATE_THUNK_WITH_VTABLE_P.
17426 (build_primary_vtable): Simplify.
17427 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
17428 (dfs_find_base): Remove.
17429 (update_vtable_entry_for_fn): Correct bug in finding the base
17430 where a virtual function was first declared. Figure out whether
17431 or not to emit a vcall-thunk with the vtables in which it appears.
17432 Correct logic for deciding whether to use an ordinary thunk, or a
17434 (finish_struct_1): Remove unnecssary code.
17435 (build_vtbl_initializer): Use ssize_int for the running counter of
17437 (build_vtbl_initializer): Only use vcall thunks where necessary.
17438 Mark thunks as needing to be emitted with their vtables, or not.
17439 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
17440 indices. Use size_binop.
17441 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
17442 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
17444 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
17445 (build_vtable_entry): Mark thunks as needing to be emitted with
17446 their vtables, or not.
17447 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
17448 * decl2.c (mark_vtable_entries): Use use_thunk instead of
17450 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
17452 * error.c (dump_expr): Use BV_FN.
17453 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
17455 * method.c (make_thunk): Likewise.
17456 (emit_thunk): Rename to use_thunk. Allow callers to decide
17457 whether or not to actually emit the thunk. Adjust for changes in
17458 representation of vcall offsets.
17459 * search.c (dfs_get_pure_virtuals): Use BV_FN.
17460 * semantics.c (emit_associated_thunks): New function.
17461 (expand_body): Use it.
17462 * ir.texi: Adjust decriptions of thunks.
17464 2000-06-22 Jason Merrill <jason@redhat.com>
17466 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
17467 (tsubst_friend_function): Copy it here.
17469 * decl.c (grok_op_properties): Fix typo.
17471 * decl2.c (delete_sanity): Clarify warning, avoid failure on
17474 * pt.c (check_explicit_specialization): Clarify error.
17476 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
17477 an old OVERLOAD when we're declaring a non-function.
17478 (pushdecl, destroy_local_var): Check for error_mark_node.
17479 (warn_extern_redeclared_static): Also bail early if
17480 we're a CONST_DECL.
17481 (push_overloaded_decl): Ignore an old error_mark_node.
17483 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
17485 * call.c (build_x_va_arg): Check if in a template decl.
17486 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
17488 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
17490 * class.c (push_lang_context): TYPE_NAME gets you to the Java
17492 * decl.c (check_goto): Computed gotos assumed OK.
17494 2000-06-20 Jason Merrill <jason@redhat.com>
17496 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
17497 for which we don't need to look for instantiations.
17499 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
17501 * parse.y (program): Always call finish_translation_unit.
17502 * parse.c, parse.h: Rebuilt.
17504 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
17506 * method.c: Don't include hard-reg-set.h.
17508 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
17510 * rtti.c (get_base_offset): Cope when vbase field is in a base.
17512 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
17514 * call.c (build_conditional_expr): Use VOID_TYPE_P.
17515 * cvt.c (cp_convert_to_pointer): Likewise.
17516 (convert_to_void): Likewise.
17517 * error.c (dump_expr): Likewise.
17518 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
17519 * init.c (build_delete): Likewise.
17520 * method.c (emit_thunk): Likewise.
17521 * optmize.c (declare_return_variable): Likewise.
17522 * rtti.c (get_tinfo_decl_dynamic): Likewise.
17523 (get_typeid): Likewise.
17524 (build_dynamic_cast_1): Likewise.
17525 * typeck.c (composite_pointer_type): Likewise.
17526 (common_type): Likewise.
17527 (build_indirect_ref): Likewise.
17528 (build_binary_op): Likewise.
17529 (build_x_compound_expr): Likewise.
17530 (check_return_expr): Likewise.
17531 * typeck2.c (add_exception_specifier): Likewise.
17533 * mangle.c (write_method_parms): Use direct comparison for end
17536 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
17538 * cp-tree.h (genrtl_try_block): Declare function.
17539 (genrtl_handler): Likewise.
17540 (genrtl_catch_block): Likewise.
17541 (genrtl_ctor_stmt): Likewise.
17542 (genrtl_subobject): Likewise.
17543 (genrtl_decl_cleanup): Likewise.
17544 (genrtl_do_poplevel): Likewise.
17545 (genrtl_do_pushlevel): Likewise.
17546 (genrtl_clear_out_block): Likewise.
17547 (genrtl_goto_stmt): Likewise.
17548 (genrtl_expr_stmt): Likewise.
17549 (genrtl_decl_stmt): Likewise.
17550 (genrtl_if_stmt): Likewise.
17551 (genrtl_while_stmt): Likewise.
17552 (genrtl_do_stmt): Likewise.
17553 (genrtl_return_stmt): Likewise.
17554 (genrtl_for_stmt): Likewise.
17555 (genrtl_break_stmt): Likewise.
17556 (genrtl_continue_stmt): Likewise.
17557 (genrtl_scope_stmt): Likewise.
17558 (genrtl_switch_stmt): Likewise.
17559 (genrtl_case_label): Likewise.
17560 (genrtl_begin_compound_stmt): Likewise.
17561 (genrtl_finish_compound_stmt): Likewise.
17562 (genrtl_compound_stmt): Likewise.
17563 (genrtl_asm_stmt): Likewise.
17564 (genrtl_named_return_value): Likewise.
17565 (genrtl_begin_stmt_expr): Likewise.
17566 (genrtl_finish_stmt_expr): Likewise.
17567 (finish_for_stmt): Removed first argument.
17568 (finish_switch_stmt): Likewise.
17570 * semantics.c (genrtl_try_block): Define function.
17571 (genrtl_handler): Likewise.
17572 (genrtl_catch_block): Likewise.
17573 (genrtl_ctor_stmt): Likewise.
17574 (genrtl_subobject): Likewise.
17575 (genrtl_decl_cleanup): Likewise.
17576 (genrtl_do_poplevel): Likewise.
17577 (genrtl_do_pushlevel): Likewise.
17578 (genrtl_clear_out_block): Likewise.
17579 (genrtl_goto_stmt): Likewise.
17580 (genrtl_expr_stmt): Likewise.
17581 (genrtl_decl_stmt): Likewise.
17582 (genrtl_if_stmt): Likewise.
17583 (genrtl_while_stmt): Likewise.
17584 (genrtl_do_stmt): Likewise.
17585 (genrtl_return_stmt): Likewise.
17586 (genrtl_for_stmt): Likewise.
17587 (genrtl_break_stmt): Likewise.
17588 (genrtl_continue_stmt): Likewise.
17589 (genrtl_scope_stmt): Likewise.
17590 (genrtl_switch_stmt): Likewise.
17591 (genrtl_case_label): Likewise.
17592 (genrtl_begin_compound_stmt): Likewise.
17593 (genrtl_finish_compound_stmt): Likewise.
17594 (genrtl_compound_stmt): Likewise.
17595 (genrtl_asm_stmt): Likewise.
17596 (genrtl_named_return_value): Likewise.
17597 (genrtl_begin_stmt_expr): Likewise.
17598 (genrtl_finish_stmt_expr): Likewise.
17599 (finish_for_stmt): Removed first argument and generate rtl
17601 (finish_switch_stmt): Likewise.
17602 (do_poplevel): Removed generate rtl specific code.
17603 (do_pushlevel): Likewise.
17604 (add_tree): Likewise.
17605 (finish_goto_stmt): Likewise.
17606 (finish_expr_stmt): Likewise.
17607 (begin_if_stmt): Likewise.
17608 (finish_if_stmt_cond): Likewise.
17609 (finish_then_clause): Likewise.
17610 (begin_else_clause): Likewise.
17611 (finish_else_clause): Likewise.
17612 (finish_if_stmt): Likewise.
17613 (clear_out_block): Likewise.
17614 (begin_while_stmt): Likewise.
17615 (finish_while_stmt_cond): Likewise.
17616 (finish_while_stmt): Likewise.
17617 (begin_do_stmt): Likewise.
17618 (finish_do_body): Likewise.
17619 (finish_do_stmt): Likewise.
17620 (finish_return_stmt): Likewise.
17621 (begin_for_stmt): Likewise.
17622 (finish_for_init_stmt): Likewise.
17623 (finish_for_cond): Likewise.
17624 (finish_for_expr): Likewise.
17625 (finish_break_stmt): Likewise.
17626 (finish_continue_stmt): Likewise.
17627 (begin_switch_stmt): Likewise.
17628 (finish_switch_cond): Likewise.
17629 (finish_case_label): Likewise.
17630 (begin_try_block): Likewise.
17631 (begin_function_try_block): Likewise.
17632 (finish_try_block): Likewise.
17633 (finish_cleanup_try_block): Likewise.
17634 (finish_cleanup): Likewise.
17635 (finish_function_try_block): Likewise.
17636 (finish_handler_sequence): Likewise.
17637 (finish_function_handler_sequence): Likewise.
17638 (begin_handler): Likewise.
17639 (finish_handler_parms): Likewise.
17640 (begin_catch_block): Likewise.
17641 (finish_handler): Likewise.
17642 (begin_compound_stmt): Likewise.
17643 (finish_compound_stmt): Likewise.
17644 (finish_asm_stmt): Likewise.
17645 (finish_label_stmt): Likewise.
17646 (finish_label_decl): Likewise.
17647 (finish_subobject): Likewise.
17648 (finish_decl_cleanup): Likewise.
17649 (finish_named_return_value): Likewise.
17650 (begin_stmt_expr): Likewise.
17651 (finish_stmt_expr): Likewise.
17653 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
17654 to call genrtl_expr_stmt when appropriate.
17656 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
17657 begin_compound_expr to call genrtl_begin_stmt_expr and
17658 genrtl_begin_compound_expr when appropriate.
17659 (finish_init_stmts): Changed calls to finish_compound_expr and
17660 finish_stmt_expr to call genrtl_finish_compound_expr and
17661 genrtl_finish_stmt_expr when appropriate.
17662 (expand_default_init): Changed call to finish_expr_stmt to call
17663 genrtl_expr_stmt when appropriate.
17664 (build_vec_init): Likewise.
17666 * parse.y (simple_stmt): Removed first argument from call to
17667 finish_for_stmt. Removed first argument from call to
17668 finish_switch_stmt.
17670 * parse.c: Regenerated.
17672 * pt.c (tsubst_expr): Removed first argument from call to
17673 finish_for_stmt. Removed first argument from call to
17674 finish_switch_stmt.
17676 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
17678 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
17679 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
17681 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
17682 (cplus_tree_code_length[]): Likewise.
17683 (cplus_tree_code_name[]): Likewise.
17684 (init_parse): Added call to add_c_tree_codes. Changed
17685 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
17687 2000-06-16 Mark Mitchell <mark@codesourcery.com>
17689 * cp-tree.h (finish_mem_initializers): Declare.
17690 (count_trees): Likewise.
17691 * parse.y (base_init): Use finish_mem_initializers.
17692 * semantics.c (finish_mem_initializers): New function.
17694 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
17695 the number of trees.
17697 (count_trees): Don't use it.
17699 2000-06-15 Jason Merrill <jason@redhat.com>
17701 * tree.c (count_trees): New debugging function.
17703 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
17704 * init.c (build_member_call): Pull out the name of a DECL.
17706 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
17707 * semantics.c (expand_body): Push to TV_INTEGRATION here.
17708 * optimize.c (optimize_function): Not here.
17709 * pt.c (instantiate_decl): Push to TV_PARSE.
17711 2000-06-15 Mark Mitchell <mark@codesourcery.com>
17713 * cp-tree.h (struct language_function): Remove x_base_init_list
17714 and x_member_init_list.
17715 (current_base_init_list): Remove.
17716 (current_member_init_list): Likewise.
17717 (setup_vtbl_ptr): Change prototype.
17718 (emit_base_init): Likewise.
17719 (expand_member_init): Likewise.
17720 (reinit_parse_for_function): Remove.
17721 * decl.c (save_function_data): Don't clear x_base_init_list and
17722 x_member_init_list.
17723 (mark_language_function): Don't mark them.
17724 * init.c (perform_member_init): Tweak comment.
17725 (sort_member_init): Take the list of initializers as an argument.
17726 (sort_base_init): Likewise.
17727 (emit_base_init): Likewise.
17728 (expand_member_init): Return the initializer. Don't use global
17730 * lex.c (reinit_parse_for_function): Remove.
17731 * method.c (build_template_parm_names): Correct substitution.
17732 (do_build_copy_constructor): Don't use current_member_init_list
17733 and current_base_init_list.
17734 (synthesize_method): Likewise.
17735 * parse.y (base_init): Split mem-initializers into
17736 base-initializers and field-initializers.
17737 (member_init_list): Build up the list here.
17738 (member_init): Return the initializer.
17739 (fn.depfn): Don't use reinit_parse_for_function.
17740 * parse.c: Regenerated.
17741 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
17743 (tsubst_expr): Don't use current_member_init_list
17744 and current_base_init_list.
17745 (tsubst_expr_values): Rename to ...
17746 (tsubst_initializer_list): ... this. Use convert_from_reference.
17747 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
17748 and current_base_init_list.
17749 (begin_function_definition): Don't call reinit_parse_for_function.
17751 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
17753 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
17756 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
17758 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
17760 * cp-tree.h (IF_COND): Move to c-common.h.
17761 (THEN_CLAUSE): Likewise.
17762 (ELSE_CLAUSE): Likewise.
17763 (WHILE_COND): Likewise.
17764 (WHILE_BODY): Likewise.
17765 (DO_COND): Likewise.
17766 (DO_BODY): Likewise.
17767 (RETURN_EXPR): Likewise.
17768 (EXPR_STMT_EXPR): Likewise.
17769 (FOR_INIT_STMT): Likewise.
17770 (FOR_COND): Likewise.
17771 (FOR_EXPR): Likewise.
17772 (FOR_BODY): Likewise.
17773 (SWITCH_COND): Likewise.
17774 (SWITCH_BODY): Likewise.
17775 (CASE_LOW): Likewise.
17776 (CASE_HIGH): Likewise.
17777 (GOTO_DESTINATION): Likewise.
17778 (COMPOUND_BODY): Likewise.
17779 (ASM_CV_QUAL): Likewise.
17780 (ASM_STRING): Likewise.
17781 (ASM_OUTPUTS): Likewise.
17782 (ASM_INPUTS): Likewise.
17783 (ASM_CLOBBERS): Likewise.
17784 (DECL_STMT_DECL): Likewise.
17785 (STMT_EXPR_STMT): Likewise.
17786 (LABEL_STMT_LABEL): Likewise.
17787 (SCOPE_BEGIN_P): Likewise.
17788 (SCOPE_END_P): Likewise.
17789 (SCOPE_STMT_BLOCK): Likewise.
17790 (SCOPE_NULLIFIED_P): Likewise.
17791 (SCOPE_NO_CLEANUPS_P): Likewise.
17792 (SCOPE_PARTIAL_P): Likewise.
17793 (ASM_VOLATILE_P): Likewise.
17794 (STMT_LINENO): Likewise.
17795 (STMT_LINENO_FOR_FN_P): Likewise.
17797 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
17798 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
17799 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
17800 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
17801 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
17803 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
17805 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
17806 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
17808 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
17809 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
17810 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
17812 2000-06-14 Mark Mitchell <mark@codesourcery.com>
17814 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
17815 * class.c (dfs_find_final_overrider): Set it appropriately.
17816 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
17817 avoid unneeded secondary vptrs.
17819 2000-06-13 Jakub Jelinek <jakub@redhat.com>
17821 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
17822 (check_bitfield_decl, check_field_decl): Likewise.
17823 (build_vtbl_or_vbase_field, build_base_field): Likewise.
17824 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
17825 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
17826 (xfer_tag, finish_enum): Likewise.
17827 * decl2.c (finish_builtin_type): Likewise.
17828 * init.c (init_init_processing): Likewise.
17829 * pt.c (instantiate_class_template): Likewise.
17830 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
17831 * cp-tree.h (struct lang_type): Add user_align member.
17832 (CLASSTYPE_USER_ALIGN): Define.
17834 2000-06-13 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
17836 * Make-lang.in (c++.install-common): Install g++-cross in
17837 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
17838 $(target_alias)-g++ and $(target_alias)-c++.
17840 2000-06-12 Mark Mitchell <mark@codesourcery.com>
17842 * class.c (vcall_offset_data_s): Add last_init and fns.
17843 (overrides): Rename to same_signature_p.
17844 (dfs_find_final_overrider): Adjust accordingly.
17845 (mark_overriders): Likewise.
17846 (warn_hidden): Likewise.
17847 (build_vtbl_initializer): Reorganize machinery for building things
17848 at negative offsets.
17849 (build_vcall_and_vbase_vtbl_entries): Likewise.
17850 (build_vbase_offset_vtbl_entries): Likewise.
17851 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
17852 offset entries. Do not create two entries for functions with the
17854 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
17855 (build_rtti_vtbl_entries): Reorganize machinery for building things
17856 at negative offsets.
17858 * optimize.c (expand_call_inline): Don't recurse into the code
17859 used to initialize the parameters more than once.
17861 2000-06-11 Mark Mitchell <mark@codesourcery.com>
17863 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
17864 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
17865 (find_substitution): Only use the `Sa' substitution for
17866 std::allocator, not instantiations of it.
17867 (write_template_prefix): Move comment. Only use a TREE_LIST to
17868 represent substitutions for a member template.
17869 (write_array_type): Mangle array dimensions correctly.
17870 * optimize.c (maybe_clone_body): Copy more information from the
17872 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
17873 on the regenerated declaration.
17875 2000-06-11 Chip Salzenberg <chip@valinux.com>
17876 Mark Mitchell <mark@codesourcery.com>
17878 * class.c (build_vtable): Clarify comment.
17879 (build_ctor_vtbl_group): Pass the most derived type to
17882 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17884 * decl2.c (compare_options): Don't needlessly cast away const-ness.
17886 2000-06-10 Mark Mitchell <mark@codesourcery.com>
17888 * decl.c (add_binding): Handle duplicate declarations of external
17891 2000-06-09 Chip Salzenberg <chip@valinux.com>
17892 Mark Mitchell <mark@codesourcery.com>
17894 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
17896 (write_signed_number): New macro.
17897 (write_unsigned_number): Likewise.
17898 (write_source_name): Use them.
17899 (write_number): Handle signed and unsigned values.
17900 (write_integer_cst): Use tree_int_cst_sgn, and use
17901 write_unsigned_number or write_signed_number as appropriate.
17902 (write_discriminator): Use write_unsigned_number or
17903 write_signed_number as appropriate.
17904 (write_template_arg_literal): Likewise.
17905 (write_array_type): Use tree_low_cst.
17906 (write_template_parm): Use write_unsigned_number or
17907 write_signed_number as appropriate.
17908 (write_substitution): Adjust call to write_number.
17909 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
17910 (write_expression): Handle non-type template arguments of
17911 reference type correctly.
17912 (mangle_thunk): Use write_signed_number.
17914 2000-06-09 Chip Salzenberg <chip@valinux.com>
17916 * mangle.c (find_substition): Don't mangle objects with typename
17917 substitutions (e.g. "cin" as "Si").
17919 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
17921 * call.c (add_candidate): Use ggc_alloc_cleared.
17922 * decl.c (lookup_label): Likewise.
17923 * lex.c (retrofit_lang_decl): Likewise.
17925 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
17927 * semantics.c (expand_body): Push to TV_EXPAND.
17928 * optimize.c (optimize_function): Push to TV_INTEGRATION.
17929 * decl.c (start_function): Always call announce_function.
17931 * tinfo2.cc: Just declare abort.
17933 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
17935 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
17936 whenever @ is a symbolic name.
17938 2000-06-08 Jakub Jelinek <jakub@redhat.com>
17940 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
17942 2000-06-07 Mark Mitchell <mark@codesourcery.com>
17944 * decl.c (pushdecl): Look up functions by DECL_NAME, not
17945 DECL_ASSEMBLER_NAME.
17947 2000-06-06 Mark Mitchell <mark@codesourcery.com>
17949 * decl2.c (c_language): Define.
17951 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
17953 * lex.c (lang_init_options): Tweak.
17955 * decl2.c: Remove #inclusion of diagnostic.h
17956 (lang_decode_option): Move diagnostic formatting options to
17959 * lang-options.h: Remove documentation for diagnostic options.
17961 * Makefile.in (lex.o): Depends upon diagnostic.h
17963 2000-06-06 Mark Mitchell <mark@codesourcery.com>
17965 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
17966 the same DECL_RESULT, it's not a redefinition.
17967 * pt.c (tsubst_decl): Remove code to handle illegal
17970 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
17972 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
17974 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
17976 * search.c (maybe_suppress_debug_info): Don't check
17977 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
17979 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
17982 Remember instantiation context in deferred instantiations.
17983 * cp-tree.h (struct tinst_level): Remove.
17984 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
17985 * pt.c (current_tinst_level): Now a tree.
17986 (print_template_context, push_tinst_level, pop_tinst_level,
17987 tinst_for_decl): Adjust.
17988 (reopen_tinst_level): New fn.
17989 (init_pt): Register current_tinst_level as a root.
17990 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
17991 of the pending templates list.
17992 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
17993 * lex.c (extract_interface_info): Adjust.
17994 * decl2.c (warn_if_unknown_interface): Adjust.
17996 2000-06-05 Mark Mitchell <mark@codesourcery.com>
17998 * class.c (indirect_primary_base_p): New function.
17999 (determine_primary_base): Use it.
18001 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
18003 Update new-abi dynamic cast algorithm.
18004 * tinfo.cc (__class_type_info::__dyncast_result): Add
18005 whole_details. Adjust constructor.
18006 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
18007 Avoid unnecessary searching.
18008 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
18010 2000-06-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18012 * decl.c (init_decl_processing): Don't call record_component_aliases.
18013 * tree.c (build_cplus_array_type_1): Likewise.
18015 2000-06-04 Mark Mitchell <mark@codesourcery.com>
18017 * ir.texi: Correct typo.
18018 * mangle.c (write_expression): Handle non-type template arguments
18019 with reference type.
18020 * method.c (build_overload_value): Likewise.
18021 * pt.c (convert_nontype_argument): Explicitly represent conversion
18022 to a reference with an ADDR_EXPR.
18023 (unify): Always unify arguments in left-to-right order.
18025 2000-06-03 Alex Samuel <samuel@codesourcery.com>
18026 Mark Mitchell <mark@codesourcery.com>
18028 * Make-lang.in (CXX_SRCS): Add mangle.c.
18029 * Makefile.in (CXX_OBJS): Add mangle.o.
18030 (mangle.o): New rule.
18032 * class.c (local_classes): New variable.
18033 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
18034 (get_vtt_name): Use mangle_vtt_name for new ABI.
18035 (init_class_processing): Initialize local_classes.
18036 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
18037 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
18038 (std_identifier): New macro.
18039 (DECL_VOLATILE_MEMFUNC_P): New macro.
18040 (DECL_NAMESPACE_STD_P): Likewise.
18041 (local_classes): Declare.
18042 (get_mostly_instantiated_function_type): Declare.
18043 (init_mangle): Declare.
18044 (mangle_decl): Likewise.
18045 (mangle_type_string): Likewise.
18046 (mangle_type): Likewise.
18047 (mangle_typeinfo_for_type): Likewise.
18048 (mangle_typeinfo_string_for_type): Likewise.
18049 (mangle_vtbl_for_type): Likewise.
18050 (mangle_vtt_for_type): Likewise.
18051 (mangle_ctor_vtbl_for_type): Likewise.
18052 (mangle_thunk): Likewise.
18053 (mangle_conv_op_name_for_type): Likewise.
18054 (mangle_guard_variable): Likewise.
18055 * decl.c (pushtag): Keep track of local classes.
18056 (initialize_predefined_identifiers): Initialize std_identifier.
18057 (init_decl_processing): Use std_identifier.
18058 (start_decl): Don't treat instantiations as specializations.
18059 (grokdeclarator): Likewise.
18060 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
18061 name for fully-instantiated templates.
18062 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
18063 destructors with the new ABI.
18064 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
18065 (grokfield): Use mangle_type for new ABI.
18066 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
18067 (get_sentry): Use mangle_guard_variable for new ABI.
18068 (start_static_initialization_or_destruction): Likewise.
18069 * expr.c (extract_aggr_init): Remove.
18070 (extract_scalar_init): Likewise.
18071 (extract_init): Remove #if 0'd code.
18072 * mangle.c: New function.
18073 * method.c (build_mangled_name): Assert not flag_new_abi.
18074 (build_static_name): Likewise.
18075 (build_decl_overload_real): Likewise.
18076 (build_typename_overload): Likewise.
18077 (build_overload_with_type): Likewise.
18078 (build_overload_name): Likewise.
18079 (get_ctor_vtbl_name): Likewise.
18080 (start_squangling): Likewise.
18081 (get_id_2): Likewise.
18082 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
18083 (init_method): Call init_mangle for new ABI.
18084 (make_thunk): Call mangle_thunk for new ABI.
18085 * operators.def: Correct new ABI manglings for the `%' operator.
18087 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
18088 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
18089 (lookup_template_class): Call mangle_decl for new ABI.
18090 (get_mostly_instantiated_function_type): New function.
18091 (set_mangled_name_for_template_decl): Use it.
18092 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
18093 the new ABI. Use mangle_conv_op_name_for_type for instantiated
18094 conversion op names.
18095 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
18096 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
18097 (tinfo_base_init): Likewise. Mangle typeinfo string name with
18098 mangle_typeinfo_string_for_type.
18100 2000-06-03 Mark Mitchell <mark@codesourcery.com>
18102 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
18103 (INNERMOST_TEMPLATE_ARGS): New macro.
18104 (innermost_args): Remove.
18105 (get_innermost_template_args): New function.
18106 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
18107 * error.c (dump_function_decl): Be caution when using
18108 most_general_template.
18109 * method.c (build_template_parm_names): Use
18110 INNERMOST_TEMPLATE_ARGS.
18111 * pt.c (add_to_template_args): Tidy comment
18112 (get_innermost_template_args): New function.
18113 (check_explicit_specialization): Clear DECL_INITIAL for a new
18115 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
18117 (push_template_decl): Always register specializations of the most
18119 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
18120 (coerce_template_parms): Likewise.
18121 (lookup_template_class): Likewise.
18122 (innermost_args): Remove.
18123 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
18124 (tsubst_decl): Handle tricky specializations. Use
18125 get_innermost_template_args.
18126 (instantiate_template): Simplify handling of partial
18128 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
18129 (most_general_template): Reimplement, in a more straightforward
18131 (regenerate_decl_from_template): Tweak formatting. Use
18132 TMPL_ARGS_DEPTH for clarity.
18133 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
18135 * dump.c (dequeue_and_dump): Dump information about thunks.
18137 2000-06-01 Richard Henderson <rth@cygnus.com>
18139 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
18141 2000-06-01 Richard Henderson <rth@cygnus.com>
18143 * decl2.c (unsupported_options): Fix typo, make const.
18144 (lang_decode_option): Fix bsearch argument order.
18146 2000-06-01 Mark Mitchell <mark@codesourcery.com>
18148 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
18151 2000-05-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18153 * cp-tree.h (c_get_alias_set): Deleted.
18154 * Makefile.in (decl.o): Include ../expr.h.
18155 * decl.c (expr.h): Include.
18156 (init_decl_processing): Call record_component_aliases for arrays.
18157 (grokdeclarator): Likewise.
18158 Set TREE_ADDRESSABLE for fields that aren't bitfields.
18159 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
18161 2000-05-31 Mark Mitchell <mark@codesourcery.com>
18163 Remove guiding declaration support.
18164 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
18165 (flag_guiding_decls): Remove.
18166 * call.c (build_user_type_conversion_1): Remove support for
18168 (build_new_function_call): Likewise.
18169 (build_new_op): Likewise.
18170 (build_new_method_call): Likewise.
18171 * decl.c (start_function): Likewise.
18172 * friend.c (is_friend): Likewise.
18173 (do_friend): Likewise.
18174 * decl2.c ((flag_dump_translation_unit): Make it const.
18175 (flag_guiding_decls): Remove.
18176 (unsupported_options): New variable
18177 (compare_options): New function.
18178 (lang_decode_option): Use them.
18180 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
18182 * method.c (mangle_expression): Adjust test for legal expression
18185 * pt.c (instantiate_decl): Save and restore the local
18186 specializations list.
18188 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
18190 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
18192 2000-05-30 Mark Mitchell <mark@codesourcery.com>
18194 * call.c (add_template_candidate_real): Handle member template
18195 constructors for classes with virtual bases.
18196 (build_user_type_conversion_1): Use in_charge_arg_for_name.
18197 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
18199 * ir.texi: Update thunk documentation.
18201 * call.c (joust): Fix handling of overloaded builtin operators.
18203 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
18205 * cp-tree.h (DECL_ANTICIPATED): New macro.
18206 Document new use of DECL_LANG_FLAG_7.
18207 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
18208 in the user namespace.
18209 * lex.c (do_identifier): If the identifier's declaration has
18210 DECL_ANTICIPATED on, it has not yet been declared. But do not
18211 replace it with an ordinary implicit declaration.
18213 * tinfo2.cc: Include stdlib.h.
18215 2000-05-29 Mark Mitchell <mark@codesourcery.com>
18217 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
18218 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
18221 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
18223 * decl2.c (lang_decode_option): Use skip_leading_substring instead
18226 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
18228 * operators.def (<?): Duplicated, should have been...
18231 2000-05-27 Alex Samuel <samuel@codesourcery.com>
18232 Mark Mitchell <mark@codesourcery.com>
18234 * cp-tree.h (ansi_opname): Make it a macro.
18235 (ansi_assopname): Likewise.
18236 (struct lang_decl_flags): Add assignment_operator_p.
18237 (struct lang_decl): Add operator_code.
18238 (DECL_VTT_PARM): Adjust.
18239 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
18240 overloaded operator.
18241 (SET_OVERLOADED_OPERATOR_CODE): New macro.
18242 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
18243 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
18244 (opname_tab): Remove.
18245 (assignop_tab): Likewise.
18246 (operator_name_info_t): New type.
18247 (operator_name_info): New variable.
18248 (assignment_operator_name_info): Likewise.
18249 (build_cp_library_fn): Remove declaration.
18250 (push_cp_library_fn): Likewise.
18251 (operator_name_string): Likewise.
18252 (build_decl_overload): Likewise.
18253 * call.c (print_z_candidates): Simplify.
18254 (build_object_call): Adjust usage of ansi_opname. Use
18255 DECL_OVERLOADED_OPERATOR_P.
18256 (op_error): Adjust operator name lookup.
18257 (build_conditional_expr): Adjust usage of ansi_opname.
18258 (build_new_op): Likewise.
18259 (build_op_delete_call): Likewise.
18260 (build_over_call): Likewise.
18261 (joust): Use DECL_OVERLOADED_OPERATOR_P.
18262 * decl.c (duplicate_decls): Copy operator_code.
18263 (init_decl_processing): Adjust parameters to push_cp_library_fn.
18264 (builtin_function): Adjust parameters to build_library_fn_1.
18265 (build_library_fn_1): Accept an overloaded operator code.
18266 (build_library_fn): Pass ERROR_MARK.
18267 (build_cp_library_fn): Accept an overloaded operator code.
18268 (push_cp_library_fn): Likewise.
18269 (grokfndecl): Tweak.
18270 (grokdeclarator): Simplify code to compute names of overloaded
18271 operators. Adjust use of ansi_opname.
18272 (ambi_op_p): Work on tree_codes, not identifiers.
18273 (unary_op_p): Likewise.
18274 (grok_op_properties): Likewise.
18275 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
18276 (lang_mark_tree): Don't try to mark the operator_code.
18277 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
18278 * error.c (dump_decl): Remove special handling for operator
18280 (dump_function_name): Likewise.
18281 (dump_expr): Adjust name lookup of operators.
18282 (op_to_string): Simplify.
18283 (assop_to_string): Likewise.
18284 * init.c (build_new_1): Adjust use of ansi_opname.
18285 * lex.c (opname_tab): Remove.
18286 (assignop_tab): Likewise.
18287 (ansi_opname): Likewise.
18288 (ansi_assopname): Likewise.
18289 (operator_name_string): Likewise.
18290 (reinit_lang_specific): Likewise.
18291 (operator_name_info): New variable.
18292 (assignment_operator_name_info): Likewise.
18293 (init_operators): New function.
18294 (init_parse): Use it.
18295 (do_identifier): Adjust use of ansi_opname.
18296 * method.c (mangle_expression): Don't use ansi_opname for
18298 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
18299 (build_decl_overload): Remove.
18300 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
18301 (do_build_assign_ref): Adjust use of ansi_opname.
18302 (synthesize_method): Likewise.
18303 (implicitly_declare_fn): Likewise.
18304 * operators.def: New file.
18305 * parse.y (operator): Adjust use of ansi_opname.
18306 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
18307 (set_mangled_name_for_template_decl): Don't play games with
18309 (special_function_p): Adjust use of ansi_opname.
18310 * typeck.c (check_return_expr): Likewise.
18311 * Make-lang.in (cc1plus): Depend on operators.def.
18312 * Makefile.in (lex.o): Likewise.
18313 (decl.o): Likewise.
18315 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
18317 * Make-lang.in (cplib2.ready): Eradicate.
18319 2000-05-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18321 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
18322 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
18323 (built_min, cp_tree_equal): Likewise.
18325 2000-05-26 Mark Mitchell <mark@codesourcery.com>
18327 * class.c (layout_nonempty_base_or_field): Replace
18328 `record_layout_info' with `record_layout_info_s'.
18330 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
18333 * cp-tree.h (struct language_function): x_named_labels is now
18334 a struct named_label_list*.
18335 * decl.c (struct named_label_use_list): Renamed from...
18336 (struct named_label_list): ...this. New struct.
18337 (push_binding_level): Don't set eh_region.
18338 (note_level_for_eh): New fn.
18339 (pop_label): Take label and old value directly.
18340 (pop_labels): Adjust for new named_labels format.
18341 (lookup_label): Likewise.
18342 (poplevel): Note characteristics of a binding level containing a
18343 named label. Mess with named label lists earlier.
18344 (mark_named_label_lists): New fn.
18345 (mark_lang_function): Call it.
18346 (use_label): New fn, split out from...
18347 (make_label_decl): ...here. Don't call it.
18348 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
18349 check_previous_gotos): New fns, split out from...
18350 (define_label): ...here.
18351 (check_switch_goto): New fn.
18352 (define_case_label): Call it.
18353 (check_goto): New fn.
18354 * semantics.c (finish_goto_stmt): Call it and use_label.
18355 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
18356 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
18358 2000-05-26 Mark Mitchell <mark@codesourcery.com>
18360 * class.c (build_vtable_entry_ref): Correct usage of
18361 get_vtbl_decl_for_binfo.
18363 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
18364 * method.c (implicitly_declare_fn): Not here.
18366 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
18368 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
18369 (CPTI_PTMD_DESC_TYPE): ... here.
18370 (ptmd_desc_type_node): Rename to ...
18371 (ptm_desc_type_node): ... here.
18372 * decl.c: Likewise.
18373 * rtti.c (ptmd_initializer): Rename to ...
18374 (ptm_initializer): ... here.
18375 (sythesize_tinfo_var): Adjust. Deal with pointer to member
18377 (create_tinfo_types): Adjust.
18379 2000-05-25 Mark Mitchell <mark@codesourcery.com>
18381 Finish implementation of VTTs.
18382 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
18383 CPTI_VTT_PARM_IDENTIFIER.
18384 (vtt_parm_identifier): New macro.
18385 (vtt_parm_type): Likewise.
18386 (BINFO_SUBVTT_INDEX): Likewise.
18387 (BINFO_VPTR_INDEX): Likewise.
18388 (struct lang_decl): Add vtt_parm.
18389 (DECL_VTT_PARM): New macro.
18390 (DECL_USE_VTT_PARM): Likewise.
18391 (DECL_NEEDS_VTT_PARM_P): Likewise.
18392 (get_vtt_name): Declare.
18393 (build_artificial_parm): Likewise.
18394 (fixup_all_virtual_upcast_offsets): Likewise.
18395 (expand_indirect_vtbls_init): Remove.
18396 * call.c (build_new_method_call): Pass the vtt to subobject
18397 constructors and destructors.
18398 * class.c (get_vtt_name): Give it external linkage.
18399 (build_clone): Handle the magic VTT parameters for clones.
18400 (clone_function_decl): Fix typo in comment.
18401 (build_vtt): Keep track of the indices in the VTTs where various
18402 entities are stored.
18403 (build_vtt_inits): Likewise.
18404 (dfs_build_vtt_inits): Likewise.
18405 (build_ctor_vtbl_group): Tweak type of construction vtables.
18406 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
18407 primary bases, when building construction vtables.
18408 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
18409 (initialize_predefined_identifiers): Add vtt_parm_identifier.
18410 (init_decl_processing): Initialize vtt_parm_type.
18411 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
18412 (lang_mark_tree): Make vtt_parm.
18413 * decl2.c (build_artificial_parm): New function.
18414 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
18415 (grokclassfn): Use build_artificial_parm.
18416 * init.c (initialize_vtbl_ptrs): Call
18417 fixup_all_virtual_upcast_offsets directly.
18418 (perform_member_init): Use the complete subobject destructor for
18420 (build_vtbl_address): New function.
18421 (expand_virtual_init): Handle VTTs.
18422 * optimize (maybe_clone_body): Likewise.
18423 * search.c (fixup_all_virtual_upcast_offsets): Give it external
18425 (expand_indirect_vtbls_init): Remove.
18426 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
18427 * tree.c (make_binfo): Make them bigger.
18429 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
18431 * inc/cxxabi.h (__pbase_type_info): Define, based on
18432 __pointer_type_info.
18433 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
18434 (__pointer_to_member_type_info): Likewise.
18435 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
18436 (__pointer_to_member_type_info::__is_pointer_p): Remove.
18437 (__pointer_type_info::__do_catch): Rename to ...
18438 (__pbase_type_info::__do_catch): ... here. Adjust.
18439 (__pbase_type_info::__pointer_catch): Implement.
18440 (__pointer_type_info::__pointer_catch): Adjust.
18441 (__pointer_to_member_type_info::__pointer_catch): Adjust.
18443 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
18445 * tinfo.h (__user_type_info::contained_virtual_p): New
18447 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
18449 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
18450 diamond shaped hierarchy. Add early out for mixed diamond and
18451 duplicate shaped hierarchy.
18453 2000-05-24 Mark Mitchell <mark@codesourcery.com>
18455 * cp-tree.h (build_delete): Change prototype.
18456 (build_vec_delete): Likewise.
18457 * call.c (build_scoped_method_call): Use special_function_kind
18458 values to indicate the kind of destruction to be done.
18459 (build_method_call): Likewise.
18460 * decl.c (finish_destructor_body): Likewise.
18461 (maybe_build_cleanup_1): Likewise. Rename to ...
18462 (maybe_build_cleanup): ... this.
18463 * decl2.c (delete_sanity): Use special_function_kind
18464 values to indicate the kind of destruction to be done.
18465 (build_cleanup): Likewise.
18466 * init.c (perform_member_init): Likewise.
18467 (build_vec_delete_1): Likewise.
18468 (build_dtor_call): Simplify.
18469 (build_delete): Use special_function_kind
18470 values to indicate the kind of destruction to be done.
18471 (build_vbase_delete): Likewise.
18472 (build_vec_delete): Likewise.
18474 * init.c (sort_member_init): Fix typo in error message generation
18477 2000-05-15 Donald Lindsay <dlindsay@cygnus.com>
18479 * semantics.c (begin_class_definition): make the packed
18480 attribute be sensitive to the "-fpack-struct" command line flag
18482 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
18484 Update new-abi upcast algorithm.
18485 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
18486 prototype and meaning of return value.
18487 (__si_class_type_info::__do_upcast): Likewise.
18488 (__vmi_class_type_info::__do_upcast): Likewise.
18489 * tinfo.cc (__class_type_info::__upcast_result): Replace
18490 whole2dst with part2dst. Adjust ctor.
18491 (__class_type_info::__do_upcast): Adjust call of worker function.
18492 (__class_type_info::__do_upcast): Adjust.
18493 (__si_class_type_info::__do_upcast): Adjust. Use parent's
18495 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
18496 virtual base in diamond hierarchy bug.
18498 2000-05-23 Mark Mitchell <mark@codesourcery.com>
18500 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
18501 and bitfield to tinfo_fn_p.
18502 (DECL_TINFO_FN_P): Adjust.
18503 (SET_DECL_TINFO_FN_P): Likewise.
18504 (DECL_MUTABLE_P): Likewise.
18505 (DECL_C_BIT_FIELD): Likewise.
18506 (SET_DECL_C_BIT_FIELD): Likewise.
18507 (CLEAR_DECL_C_BIT_FIELD): Likewise.
18508 (DECL_UNINLINABLE): Likewise.
18509 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
18510 (handle_using_decl): Remove assertion.
18511 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
18512 to build FIELD_DECLs.
18513 (build_base_field): Likewise.
18514 (layout_class_type): Likewise.
18515 * decl.c (init_decl_processing): Likewise.
18516 (build_ptrmemfunc_type): Likewise.
18517 (grokdeclarator): Likewise.
18518 * decl2.c (grok_x_components): Likewise.
18519 * except.c (call_eh_info): Likewise.
18520 * init.c (init_init_processing): Likewise.
18521 * rtti.c (expand_class_desc): Likewise.
18522 (create_pseudo_type_info): Likewise.
18523 (get_vmi_pseudo_type_info): Likewise.
18524 (create_tinfo_types): Likewise.
18525 * ptree.c (print_lang_decl): Adjust.
18526 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
18527 before checking DECL_MUTABLE_P.
18529 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
18530 parameters for template functions.
18531 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
18532 destructors as well as constructors.
18534 2000-05-22 Mark Mitchell <mark@codesourcery.com>
18536 * class.c (build_ctor_vtbl_group): Set inits.
18537 * optimize.c (maybe_clone_body): Set DECL_INLINE and
18538 DECL_THIS_INLINE appropriately for clones.
18540 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
18541 (DECL_CONV_FN_P): Simplify.
18542 (DECL_OPERATOR): Remove.
18543 (language_to_string): Declare.
18544 * decl.c (duplicate_decls): Fix typo in comment.
18545 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
18546 (grok_op_properties): Use DECL_CONV_FN_P instead of
18547 IDENTIFIER_TYPENAME_P.
18548 * dump.c (dequeue_and_dump): Dump the language linkage of
18550 * error.c (language_to_string): Give it external linkage.
18551 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
18552 (implicitly_declare_fn): Set DECL_LANGUAGE.
18553 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
18554 IDENTIFIER_TYPENAME_P.
18555 (tsubst_decl): Likewise.
18556 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
18557 * semantics.c (finish_member_declaration): Don't mark members of
18558 classes declared in an extern "C" region as extern "C".
18560 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18562 * decl2.c (qualified_lookup_using_namespace): Look through
18565 * decl.c (push_using_decl): Return the old decl on namespace level.
18567 2000-05-21 Mark Mitchell <mark@codesourcery.com>
18569 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
18570 (VTT_NAME_PREFIX): New macro.
18571 (CTOR_VTBL_NAME_PREFIX): Likewise.
18572 (get_ctor_vtbl_name): New function.
18573 * class.c (get_vtable_name): Simplify.
18574 (get_vtt_name): New function.
18575 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
18576 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
18577 when a virtual base becomes primary.
18578 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
18580 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
18581 additional parameters.
18582 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
18583 (initialize_array): New function.
18584 (build_vtt): Likewise.
18585 (build_vtt_inits): Likewise.
18586 (dfs_build_vtt_inits): Likewise.
18587 (dfs_fixup_binfo_vtbls): Likewise.
18588 (build_ctor_vtbl_group): Likewise.
18589 (initialize_vtable): Use initialize_array.
18590 (accumulate_vtbl_inits): Reimplement to handle construction
18592 (dfs_accumulate_vtbl_inits): Likewise.
18593 (bulid_vtbl_initializer): Adjust parameter name.
18594 * method.c (build_typename_overload): Remove #if 0'd code.
18595 (get_ctor_vtbl_name): New function.
18596 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
18597 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
18599 * cp-tree.h (struct lang_type): Remove search_slot.
18600 (CLASSTYPE_SEARCH_SLOT): Remove.
18601 (emit_base_init): Change prototype.
18602 (initialize_vtbl_ptrs): Likewise.
18603 (expand_indirect_vtbls_init): Likewise.
18604 (clear_search_slots): Remove.
18605 * decl.c (lang_mark_tree): Don't mark search_slot.
18606 * init.c (initialize_vtbl_ptrs): Simplify.
18607 (emit_base_init): Likewise.
18608 * search.c (struct vbase_info): Document decl_ptr.
18609 (convert_pointer_to_single_level): Remove.
18610 (dfs_find_vbases): Remove.
18611 (dfs_init_base_pointers): Simplify.
18612 (dfs_clear_vbase_slots): Remove.
18613 (dfs_vtable_path_unmark): New function.
18614 (init_vbase_pointers): Simplify.
18615 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
18616 (expand_indirect_vtbls_init): Simplify. Don't call
18617 mark_all_temps_used.
18618 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
18619 initialize_vtbl_ptrs.
18621 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
18623 * except.c: Add static prototypes.
18625 2000-05-20 H.J. Lu <hjl@gnu.org>
18627 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
18629 2000-05-19 Mark Mitchell <mark@codesourcery.com>
18631 Don't create a separate copy of virtual bases for the
18632 CLASSTYPE_VBASECLASSES list.
18633 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
18634 (BINFO_FOR_VBASE): Remove.
18635 (CANONICAL_BINFO): Adjust.
18636 (binfo_for_vbase): New function.
18637 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
18638 instead of BINFO_FOR_VBASE.
18639 (build_vbase_pointer): Likewise.
18640 (build_secondary_vtable): Likewise.
18641 (dfs_mark_primary_bases): Likewise.
18642 (mark_primary_bases): Likewise.
18643 (layout_nonempty_base_or_field): Likewise.
18644 (dfs_set_offset_for_shared_vbases): Likewise.
18645 (dfs_set_offset_for_unshared_vbases): Likewise.
18646 (layout_virtual_bases): Likewise. Adjust for changes to the
18647 CLASSTYPE_VBASECLASSES list.
18648 (dump_class_hierarchy_r): Use binfo_for_vbase
18649 instead of BINFO_FOR_VBASE.
18650 (dump_class_hierarchy): Likewise.
18651 (finish_vtbls): Likewise.
18652 (build_vtbl_initializer): Adjust for changes to the
18653 CLASSTYPE_VBASECLASSES list.
18654 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
18655 * decl.c (finish_destructor_body): Adjust for changes to the
18656 CLASSTYPE_VBASECLASSES list.
18657 * init.c (sort_base_init): Use binfo_for_vbase.
18658 (construct_virtual_bases): Adjust for changes to the
18659 CLASSTYPE_VBASECLASSES list.
18660 (expand_member_init): Use binfo_for_vbase.
18661 (build_vbase_delete): Adjust for changes to the
18662 CLASSTYPE_VBASECLASSES list.
18663 * method.c (do_build_copy_constructor): Likewise.
18664 * rtti.c (get_base_offset): Use binfo_for_vbase.
18665 (expand_class_desc): Remove #if 0'd code.
18666 * search.c (struct vbase_info): Remove vbase_types.
18667 (get_base_distance): Use binfo_for_vbase.
18668 (lookup_field_queue_p): Use CANONICAL_BINFO.
18669 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
18670 (get_pure_virtuals): Adjust for changes to the
18671 CLASSTYPE_VBASECLASSES list.
18672 (dfs_find_vbases): Use binfo_for_vbase.
18673 (dfs_init_vbase_pointers): Likewise.
18674 (init_vbase_pointers): Don't initialize vi.vbase_types.
18675 (virtual_context): Use binfo_for_vbase.
18676 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
18677 CLASSTYPE_VBASECLASSES list.
18678 (expand_indirect_vtbls_init): Simplify.
18679 (dfs_get_vbase_types): Don't replicate virtual bases.
18680 (find_vbase_instance): Use binfo_for_vbase.
18681 (binfo_for_vbase): New function.
18682 * typeck.c (get_delta_difference): Use binfo_for_vbase.
18684 2000-05-17 Mark Mitchell <mark@codesourcery.com>
18686 * decl2.c (finish_anon_union): Generalize error messages to handle
18687 anonymous structures.
18688 * init.c (perform_member_init): Remove `name' parameter.
18689 (build_field_list): New function.
18690 (sort_member_init): Handle anonymous union initialization order
18691 correctly. Check for multiple initializations of the same union.
18692 (emit_base_init): Don't look up fields by name here.
18693 (expand_member_init): Record the result of name lookup for future
18695 * typeck.c (build_component_ref): Fix formatting.
18697 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
18699 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
18700 * typeck.c (build_x_compound_expr): Replace warn_unused with
18703 * decl2.c (lang_decode_option): Update -Wall unused flags by
18704 calling set_Wunused.
18706 2000-05-16 Mark Mitchell <mark@codesourcery.com>
18708 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
18709 * init.c (dfs_vtable_path_unmark): Remove.
18710 * search.c (marked_new_vtable_p): Likewise.
18711 (unmarked_new_vtable_p): Likewise.
18712 (dfs_search_slot_nonempty_p): Likewise.
18713 (dfs_mark): Likewise.
18714 (dfs_vtable_path_unmark): Likewise.
18715 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
18716 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
18717 (dfs_init_vbase_pointers): Remove special-case new ABI code.
18718 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
18719 (init_vbase_pointers): Simplify.
18720 (expand_indirect_vtbls_init): Likewise.
18722 * class.c (copy_virtuals): New function.
18723 (build_primary_table): Use it.
18724 (build_secondary_vtable): Likewise.
18725 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
18726 indicate that no vcall offset is required.
18727 (add_virtual_function): Likewise.
18728 (modify_all_vtables): Likewise.
18729 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
18730 (dfs_accumulate_vtbl_inits): Likewise.
18731 (build_vtbl_initializer): Make changes to handle construction
18733 (dfs_build_vcall_offset_vtbl_entries): Likewise.
18734 (build_rtti_vtbl_entries): Likewise.
18735 (build_vtable_entries): Handle a NULL vcall_index.
18737 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
18739 * decl2.c (lang_decode_option): Fix thinko.
18741 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
18743 * except.c (check_handlers): New fn.
18744 * cp-tree.h: Declare it.
18745 * semantics.c (finish_handler_sequence): Call it.
18746 (finish_function_handler_sequence): Likewise.
18747 (finish_handler_parms): Set TREE_TYPE on the handler.
18748 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
18749 * search.c (get_base_distance_recursive): If protect>1, ignore
18751 (get_base_distance): Don't reduce watch_access.
18753 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
18755 * lex.c: #include diagnostic.h.
18756 (lang_init_options): Set default prefixing rules.
18758 * lang-options.h: Add -fdiagnostics-show-location=.
18760 * decl2.c: #include diagnostic.h.
18761 (lang_decode_option): Handle -fdiagnostics-show-location=.
18763 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
18765 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
18766 * vec.cc: Revert my 2000-05-07 change.
18768 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
18770 * class.c (check_field_decls): Complain about non-static data
18771 members with same name as class in class with constructor.
18773 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
18775 * decl.c (grokdeclarator): Allow non-static data members with
18776 same name as class.
18778 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
18780 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
18781 and pending_inline.filename. Update prototypes.
18782 * decl.c (define_label): Constify filename parameter.
18783 * decl2.c (warn_if_unknown_interface): Constify local char *.
18784 * input.c Constify input_source.filename. Don't declare
18785 input_filename or lineno. Constify filename parameter to feed_input.
18786 * lex.c (init_parse): Constify parameter and return value.
18787 (cp_pragma_interface, cp_pragma_implementation): Constify
18789 (reinit_parse_for_method, reinit_parse_for_block,
18790 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
18791 Constify local char *.
18792 * pt.c: Don't declare lineno or input_filename.
18793 (print_template_context, tsubst_friend_function, tsubst_decl,
18794 tsubst, instantiate_decl): Constify local char *.
18795 * semantics.c (expand_body): Constify local char *.
18796 * tree.c (build_srcloc): Constify filename parameter.
18797 * typeck.c (c_expand_asm_operands): Constify filename
18800 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
18802 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
18803 offsetof expansion.
18805 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
18807 * inc/cxxabi.h: Fix typos in comment.
18808 (__base_class_info::__offset): Use a static_cast.
18810 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
18812 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
18813 of std::size_t and std::ptrdiff_t respectively.
18814 * tinfo.cc: Likewise.
18815 * vec.cc: Likewise.
18817 2000-05-06 Richard Henderson <rth@cygnus.com>
18819 * typeck.c (build_c_cast): Don't warn integer->pointer size
18820 mismatch for constants.
18822 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
18824 * rtti.c (ptmd_initializer): Set non-public, if class is
18827 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
18828 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18829 __cxa_vec_delete): Likewise.
18830 * tinfo.cc (__dynamic_cast): Likewise.
18831 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18832 __cxa_vec_delete): Likewise.
18834 2000-05-04 Mark Mitchell <mark@codesourcery.com>
18836 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
18837 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
18838 (lang_decl_flags): Add vcall_offset.
18839 (THUNK_VCALL_OFFSET): Use it.
18840 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
18841 * method.c (make_thunk): Create the lang_decl here, not in
18843 (emit_thunk): Make generic thunks into ordinary functions once
18844 they have been fed to expand_body.
18845 * semantics.c (expand_body): Set current_function_is_thunk here.
18847 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18849 * class.c (update_vtable_entry_for_fn): Prototype.
18851 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
18854 * search.c (dfs_build_inheritance_graph_order): Prototype.
18856 2000-05-04 Mark Mitchell <mark@codesourcery.com>
18858 * cp-tree.h (special_function_kind): Add various kinds of
18860 (special_function_p): New function.
18861 * class.c (overrides): Don't let one kind of destructor override
18863 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
18864 whether or not to instantiate a template.
18865 * tree.c (special_function_p): Define.
18867 2000-05-03 Mark Mitchell <mark@codesourcery.com>
18869 * cp-tree.def (THUNK_DECL): Remove.
18870 * cp-tree.h (DECL_THUNK_P): New macro.
18871 (DECL_NON_THUNK_FUNCTION_P): Likewise.
18872 (DECL_EXTERN_C_FUNCTION_P): Likewise.
18873 (SET_DECL_THUNK_P): Likewise.
18874 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
18875 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
18876 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
18877 * decl.c (decls_match): Use DECL_EXTERN_C_P.
18878 (duplicate_decls): Likewise.
18879 (pushdecl): Likewise. Adjust thunk handling.
18880 (grokfndecl): Use DECL_EXTERN_C_P.
18881 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
18882 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
18883 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
18884 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
18885 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
18886 DECL_NO_STATIC_CHAIN.
18887 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
18888 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
18889 * search.c (covariant_return_p): Remove THUNK_DECL handling.
18892 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
18894 * tree.c (walk_tree): Set lineno.
18896 2000-05-01 Mark Mitchell <mark@codesourcery.com>
18898 * exception.cc: Update license notice.
18899 * new.cc: Likewise.
18900 * new1.cc: Likewise.
18901 * new2.cc: Likewise.
18902 * tinfo.cc: Likewise.
18903 * tinfo2.cc: Likewise.
18904 * vec.cc: Likewise.
18905 * inc/cxxabi.h: Likewise.
18906 * inc/exception: Likewise.
18907 * inc/new: Likewise.
18908 * inc/new.h: Likewise.
18909 * inc/typeinfo: Likewise.
18911 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
18913 * tree.c (build_target_expr_with_type): If we already have a
18914 TARGET_EXPR, just return it.
18916 * optimize.c (initialize_inlined_parameters): Don't generate an
18917 EXPR_STMT if we can just use DECL_INITIAL.
18918 * decl.c (emit_local_var): Only make the initialization a
18919 full-expression if stmts_are_full_exprs_p.
18921 2000-05-01 Mark Mitchell <mark@codesourcery.com>
18923 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
18925 * call.c (standard_conversion): Use it.
18926 (direct_reference_binding): Likewise.
18927 (build_over_call): Likewise.
18928 (is_properly_derived_from): Likewise.
18929 (compare_ics): Likewise.
18930 * class.c (resolves_to_fixed_type_p): Likewise.
18931 * optimize.c (declare_return_variable): Likewise.
18932 * pt.c (is_specialization_of): Likewise.
18934 * typeck.c (comp_target_parms): Likeiwse.
18935 (build_static_cast): Likewise.
18936 (build_reinterpret_cast): Likewise.
18937 (build_const_cast): Likewise.
18938 (comp_ptr_ttypes_real): Likewise.
18939 (comp_ptr_ttypes_const): Likewise.
18940 * typeck2.c (process_init_constructor): Likewise.
18942 2000-04-30 Scott Snyder <snyder@fnal.gov>
18944 * decl.c (finish_destructor_body): Use the base destructor when
18945 destroying virtual bases.
18947 2000-04-30 Mark Mitchell <mark@codesourcery.com>
18949 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
18951 * optimize.c (struct inline_data): Add target_exprs field.
18952 (declare_return_variable): When a function returns an aggregate,
18953 use the variable declared in the TARGET_EXPR as the remapped
18955 (expand_call_inline): Update the pending target_exprs stack.
18956 (optimize_function): Initialize the stack.
18958 * decl2.c (finish_file): Fix typo in comment.
18960 * method.c (emit_thunk): Don't try to return a `void' value.
18962 * optimize.c (initialize_inlined_parameters): If the parameter is
18963 addressable, we need to make a new VAR_DECL, even if the
18964 initializer is constant.
18966 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
18968 * decl.c (grok_op_properties): Add an extra check of argtypes.
18970 2000-04-27 Mark Mitchell <mark@codesourcery.com>
18972 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
18974 (initialize_inlined_parameters): Try to avoid creating new
18977 2000-04-27 Alex Samuel <samuel@codesourcery.com>
18979 * lex.c (my_get_run_time): Remove.
18980 (init_filename_times): Use get_run_time instead of my_get_run_time.
18981 (check_newline): Likewise.
18982 (dump_time_statistics): Likewise.
18983 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
18984 of computing elapsed time explicitly.
18986 2000-04-26 Mark Mitchell <mark@codesourcery.com>
18988 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
18989 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
18990 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
18991 before calling decl_constant_value.
18992 * class.c (check_bitfield_decl): Likewise.
18993 * cvt.c (ocp_convert): Likewise.
18994 (convert): Likewise.
18995 * decl.c (compute_array_index_type): Likewise.
18996 (build_enumerator): Likewise.
18997 * decl2.c (check_cp_case_value): Likewise.
18998 * pt.c (convert_nontype_argument): Likewise.
18999 (tsubst): Likewise.
19000 * typeck.c (decay_conversion): Likewise.
19001 (build_compound_expr): Likewise.
19002 (build_reinterpret_cast): Likewise.
19003 (build_c_cast): Likewise.
19004 (convert_for_assignment): Likewise.
19006 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
19008 * decl.c (finish_function): Don't play games with DECL_INLINE.
19010 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
19012 * ir.texi: Correct typo.
19014 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19016 * decl.c (grokdeclarator): Reject VLAs as members.
19018 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
19020 * call.c (standard_conversion): Accept conversion between
19023 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
19025 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
19027 * decl2.c (finish_file): Remove double setup for accounting
19030 2000-04-24 Robert Lipe <robertlipe@usa.net>
19032 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
19034 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
19036 * new.cc (set_new_handler): Needs to be in std::.
19038 2000-04-23 Mark Mitchell <mark@codesourcery.com>
19040 * cp-tree.h (lang_decl): Remove pretty_function_p.
19041 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
19042 language-specific node.
19043 * decl.c (cp_make_fname_decl): Use build_decl, not
19044 build_lang_decl, to build the variables.
19045 (grokvardecl): Don't call build_lang_decl for local variables in
19047 (grokdeclarator): Don't call build_lang_decl for local type
19048 declarations in templates.
19049 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
19050 zero'd memory, rather than calling memset.
19051 * pt.c: Include hashtab.h.
19052 (local_specializations): New variable.
19053 (retrieve_local_specialization): Use it.
19054 (register_local_specialization): Likewise.
19055 (tsubst_decl): Don't assume local variables have
19056 DECL_LANG_SPECIFIC.
19057 (instantiate_decl): Set up local_specializations.
19058 * Makefile.in (HTAB_H): New variable.
19060 2000-04-23 Richard Henderson <rth@cygnus.com>
19062 * typeck.c (c_expand_asm_operands): Restore the original
19063 contents of the output list.
19065 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
19067 * ir.texi: Document complex number representation.
19069 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
19071 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
19072 (target_incomplete_p): New function.
19073 (tinfo_base_init): Create comdat NTBS name variable.
19074 (ptr_initializer): Add non_public parameter. Calculate it.
19075 (ptmd_initializer): Likewise.
19076 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
19077 (create_real_tinfo_var): Add non_public parameter. Use it.
19078 Push proxy into global namespace.
19079 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
19081 * inc/typeinfo (type_info::before, type_info::operator==):
19082 Compare __name addresses.
19084 * tinfo2.cc: Remove new-abi builtins comment.
19086 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
19088 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
19090 * call.c (joust): Exit early if we get the same function, too.
19092 * decl2.c (key_method): Return NULL_TREE for template classes.
19093 (import_export_class): Don't need to check for template classes.
19095 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
19097 * lex.c: Remove references to cccp.c.
19099 2000-04-18 Mark Mitchell <mark@codesourcery.com>
19101 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
19102 volatile_memfunc. Add destructor_attr. Adjust dummy.
19103 (DECL_DESTRUCTOR_P): Use destructor_attr.
19104 (DECL_CONST_MEMFUNC_P): Reimplement.
19105 (DECL_VOLATILE_MEMFUNC_P): Remove.
19106 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
19107 (overrides): Use DECL_DESTRUCTOR_P.
19108 (check_for_override): Likewise.
19109 * decl.c (start_function): Likewise.
19110 * decl2.c (grokfclassfn): Likewise.
19111 (check_classfn): Likewise.
19112 (grok_function_init): Likewise.
19114 2000-04-17 Mark Mitchell <mark@codesourcery.com>
19116 * decl2.c (grokfield): Issue error on illegal data member
19119 2000-04-17 Mark P Mitchell <mark@codesourcery.com>
19121 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
19123 2000-04-16 Mark Mitchell <mark@codesourcery.com>
19125 * class.c (build_vtable_entry): Don't build thunks for type-info
19128 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
19130 * decl.c (decls_match): Allow a redeclaration of a builtin to
19131 specify args while the builtin did not.
19133 2000-04-15 Mark Mitchell <mark@codesourcery.com>
19135 * cp-tree.def (THUNK_DECL): Add to documentation.
19136 * cp-tree.h (flag_huge_objects): Declare.
19137 * class.c (modify_vtable_entry): Tidy.
19138 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
19139 Calculate delta appropriately for the new ABI.
19140 (dfs_modify_vtables): Use it.
19141 (modify_all_vtables): Fix thinko in code to add overriding copies
19142 of functions to primary vtables.
19143 (build_clone): Fix typo in comment.
19144 (clone_function_decl): Correct order of destructors in vtable.
19145 (build_vbase_offset_vtbl_entries): Adjust comment.
19146 (dfs_vcall_offset_queue_p): Remove.
19147 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
19148 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
19149 (build_vtable_entry): Correct check for pure virtual functions.
19150 Don't declare flag_huge_objects.
19151 * decl.c (flag_huge_objects): Remove declaration.
19152 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
19153 Use int_size_in_bytes.
19154 (emit_thunk): Handle vcall offset thunks.
19156 2000-04-15 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19158 * decl2.c (parse_time, varconst_time): Delete declarations.
19159 (finish_file): Delete LINENO declaration.
19160 START_TIME and THIS_TIME now long.
19162 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
19164 * class.c (build_base_field): Reformat comment.
19166 * inc/cxxabi.h (stddef.h): Comment inclusion.
19167 (__base_class_info::__offset): Comment shift.
19169 2000-04-12 Mark Mitchell <mark@codesourcery.com>
19171 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
19172 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
19173 (cp_push_exception_identifier): New macro.
19174 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
19175 (DECL_BASE_DESTRUCTOR_P): Likewise.
19176 (DECL_DELETING_DESTRUCTOR_P): Likewise.
19177 (get_vtbl_decl_for_binfo): Fix formatting.
19178 (in_charge_arg_for_name): New macro.
19179 (maybe_build_cleanup_and_delete): Remove declaration.
19180 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
19181 (in_charge_arg_for_name): New function.
19182 (build_new_method_call): Use it. Handle cloned destructors.
19183 (build_clone): Don't make the base constructor virtual.
19184 Automatically defer generated functions.
19185 (clone_function_decl): Handle destructors, too.
19186 (clone_constructors_and_destructors): Likewise.
19187 (create_vtable_ptr): Don't create a vtable entry for a cloned
19189 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
19190 (initialize_predefined_identifiers): Update appropriately.
19191 (finish_destructor_body): Simplify.
19192 (maybe_build_cleanup_and_delete): Remove.
19193 * except.c (expand_throw): Handle new-ABI destructors.
19194 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
19195 (build_dtor_call): New function.
19196 (build_delete): Use it. Simplify.
19197 * optimize.c (maybe_clone_body): Handle destructors.
19198 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
19200 * exception.cc (cleanup_fn): New typedef.
19201 (CALL_CLEANUP): New macro.
19202 (cp_eh_info): Use them.
19203 (__cp_push_exception): Likewise.
19204 (__cp_pop_exception): Likewise.
19206 2000-04-11 Mark Mitchell <mark@codesourcery.com>
19208 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
19209 (complete_dtor_identifier): New macro.
19210 (CLASSTYPE_FIRST_CONVERSION): Remove.
19211 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
19212 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
19213 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
19214 (CLASSTYPE_CONSTRUCTORS): Likewise.
19215 (CLASSTYPE_DESTRUCTORS): Likewise.
19216 (lang_decl): Add cloned_function.
19217 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
19218 (DECL_BASE_CONSTRUCTOR_P): Likewise.
19219 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
19220 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
19221 (DECL_CLONED_FUNCTION_P): Likewise.
19222 (DECL_CLONED_FUNCTION): Likewise.
19223 (clone_function_decl): Declare.
19224 (maybe_clone_body): Likewise.
19225 * call.c (build_user_type_conversion_1): Call complete object
19226 constructors in the new ABI.
19227 (build_new_method_call): Don't add in-charge parameters under the
19229 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
19230 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
19231 CLASSTYPE_DESTRUCTOR_SLOT.
19232 (build_clone): New function.
19233 (clone_function_decl): Likewise.
19234 (clone_constructors_and_destructors): Likewise.
19235 (check_bases_and_members): Use it.
19236 * decl.c (iniitialize_predefined_identifiers): Initialize
19237 complete_dtor_identifier.
19238 (finish_function): Don't add extra code to a clone.
19239 (lang_mark_tree): Mark cloned_function.
19240 * decl2.c (mark_used): Don't bother trying to instantiate things
19242 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
19243 * method.c (set_mangled_name_for_decl): Don't treat clones as
19245 (synthesize_method): Sythesize cloned functions, not the clones.
19246 * optimize.c (inline_data): Update comment on ret_label.
19247 (remap_block): Don't assume DECL_INITIAL exists.
19248 (copy_body_r): Allow ret_label to be NULL.
19249 (maybe_clone_body): Define.
19250 * pt.c (tsubst_decl): Handle clones.
19251 (instantiate_clone): New function.
19252 (instantiate_template): Use it.
19253 (set_mangled_name_for_template_decl): Don't treat clones as
19255 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
19256 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
19257 * semantics.c (expand_body): Clone function bodies as necessary.
19259 * optimize.c (remap_decl): Avoid sharing structure for arrays
19260 whose size is only known at run-time.
19261 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
19263 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
19264 to has_in_charge_parm_p.
19265 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
19266 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
19267 (DECL_COPY_CONSTRUCTOR_P): New macro.
19268 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
19269 (build_user_type_conversion_1): Likewise.
19270 (convert_like_real): Likewise.
19271 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
19272 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
19273 (copy_args_p): Likewise.
19274 (grok_ctor_properties): Likewise.
19275 (start_function): Likewise.
19276 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
19277 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
19278 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
19279 * method.c (do_build_copy_constructor): Use
19280 DECL_HAS_IN_CHARGE_PARM_P.
19281 (synthesize_method): Likewise.
19282 * pt.c (instantiate_template): Remove goto.
19283 * tree.c (build_cplus_method_type): Remove mention of obstacks in
19286 * cp-tre.h (finish_function): Change prototype.
19287 * decl.c (end_cleanup_fn): Adjust caller.
19288 (finish_function): Take only one parameter.
19289 * decl2.c (finish_objects): Adjust caller.
19290 (finish_static_storage_duration_function): Likewise.
19291 * method.c (emit_thunk): Likewise.
19292 * parse.y: Likewise.
19293 * parse.c: Regenerated.
19294 * pt.c (instantiate_decl): Likewise.
19295 * rtti.c (synthesize_tinfo_fn): Likewise.
19296 * semantics.c (expand_body): Likewise.
19298 * cp-tree.h (copy_decl): New function.
19299 * class.c (finish_struct_1): Use it.
19300 * lex.c (copy_decl): Define it.
19301 * pt.c (tsubst_decl): Likewise.
19302 * tree.c (copy_template_template_parm): Likewise.
19304 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
19305 has_nonpublic_assign_ref.
19306 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
19307 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
19308 * class.c (finish_struct_methods): Don't set
19309 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
19310 (interface_only): Don't declare.
19311 (interface_unknown): Likewise.
19313 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19315 * tree.h (HAVE_TEMPLATES): Remove definition.
19316 * lang-options.h (-fthis-is-variable): Remove documentation.
19318 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
19320 * class.c (instantiate_type): Handle object-relative template-id.
19322 * semantics.c (finish_expr_stmt): Call convert_to_void here.
19323 * decl.c (cplus_expand_expr_stmt): Not here.
19325 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
19326 Initialize exprtype earlier.
19328 * parse.y (fn.def1): Check for defining types in return types.
19330 * decl.c (check_tag_decl): Notice extra fundamental types.
19331 Diagnose empty decls in classes, too.
19333 * decl.c (grokdeclarator): Don't override an anonymous name if no
19334 declarator was given.
19336 * cvt.c (convert_to_void): Call resolve_offset_ref.
19338 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
19340 * decl2.c (decl_namespace): Handle getting a type.
19342 * typeck.c (build_c_cast): Re-enable warning for cast between
19343 pointer and integer of different size.
19345 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
19347 * inc/cxxabi.h (__pointer_type_info): Add restrict and
19349 (__pointer_type_info::__pointer_catch): New virtual function.
19350 (__pointer_to_member_type_info): Derive from
19351 __pointer_type_info. Adjust.
19352 (__pointer_to_member_type_info::__do_catch): Remove.
19353 (__pointer_to_member_type_info::__is_pointer_p): Declare.
19354 (__pointer_to_member_type_info::__pointer_catch): Declare.
19355 * rtti.c (qualifier_flags): Add restrict flag.
19356 (ptmd_initializer): Reorder members.
19357 (create_tinfo_types): Expand comments. Reorder
19358 ptmd_desc_type_node members.
19359 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
19361 (__pointer_type_info::__do_catch): Move specific code into
19362 __pointer_catch. Call it.
19363 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
19364 specific catch checking. Fix void conversion check.
19365 (__pointer_to_member_type_info::__do_catch): Remove.
19366 (__pointer_to_member_type_info::__pointer_catch): Implement.
19368 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19370 * lex.c (init_parse): Remove traces of classof and headof.
19371 * decl2.c (flag_operator_names): Default to 1.
19372 (lang_decode_option): Do not set it for -ansi.
19374 2000-04-09 Mark Mitchell <mark@codesourcery.com>
19376 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
19377 (DECL_MAIN_VARIANT): Remove.
19378 * decl.c (duplicate_decls): Don't set it.
19379 (start_function): Likewise.
19380 (lang_mark_tree): Don't mark it.
19381 * decl2.c (defer_fn): Don't use it.
19382 * lex.c (retrofit_lang_decl): Don't set it.
19383 * pt.c (tsubst_decl): Likewise.
19384 * ptree.c (print_lang_decl): Don't print it.
19385 * typeck.c (mark_addressable): Don't use it.
19387 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
19389 * vec.cc: Include <new> and <exception>.
19390 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
19391 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
19393 (__cxa_vec_delete): Catch dtor exceptions.
19395 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
19397 Prepend __ to implementation defined names.
19398 * inc/typeinfo (type_info): Rename _name to __name.
19399 (type_info::type_info): Rename parameter.
19400 (type_info::operator==, type_info::operator!=,
19401 type_info::before): Likewise.
19402 (type_info::is_pointer_p, type_info::is_function_p,
19403 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
19406 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
19407 (__pointer_type_info::__pointer_type_info): Likewise.
19408 (__pointer_type_info::is_pointer_p,
19409 __pointer_type_info::do_catch): Prepend __. Rename parameters.
19410 (__array_type_info::__array_type_info): Rename parameters.
19411 (__function_type_info::__function_type_info): Likewise.
19412 (__function_type_info::is_function_p): Prepend __.
19413 (__enum_type_info::__enum_type_info): Rename parameters.
19414 (__pointer_to_member_type_info::__pointer_to_member_type_info):
19416 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
19418 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
19419 (__class_type_info::__class_type_info): Rename parameters.
19420 (__class_type_info::sub_kind): Prepend __. Adjust member names.
19421 (__class_type_info::upcast_result,
19422 __class_type_info::dyncast_result): Prepend __. Move definition
19424 (__class_type_info::do_upcast, __class_type_info::do_catch,
19425 __class_type_info::find_public_src,
19426 __class_type_info::do_dyncast,
19427 __class_type_info::do_find_public_src): Prepend __. Rename
19429 (__si_class_type_info::__si_class_type_info): Rename parameters.
19430 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
19431 __si_class_type_info::do_find_public_src): Prepent __. Rename
19433 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
19434 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
19435 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
19437 (__dynamic_cast): Rename parameters.
19438 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
19439 type_info::do_catch, type_info::do_upcast): Prepend __.
19440 (contained_p, public_p, virtual_p, contained_public_p,
19441 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
19442 (__class_type_info::do_catch,
19443 __class_type_info::do_upcast): Prepend __. Adjust.
19444 (__class_type_info::__upcast_result,
19445 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
19447 (__class_type_info::find_public_src): Prepend __. Adjust.
19448 (__class_type_info::do_find_public_src,
19449 __si_class_type_info::do_find_public_src,
19450 __vmi_class_type_info::do_find_public_src): Likewise.
19451 (__class_type_info::do_dyncast,
19452 __si_class_type_info::do_dyncast,
19453 __vmi_class_type_info::do_dyncast): Likewise.
19454 (__class_type_info::do_upcast,
19455 __si_class_type_info::do_upcast,
19456 __vmi_class_type_info::do_upcast): Likewise.
19457 (__dynamic_cast): Adjust.
19458 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
19459 (__function_type_info::is_function_p): Likewise.
19460 (__pointer_type_info::do_catch): Likewise. Adjust.
19461 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
19462 (__throw_type_match_rtti_2): Adjust.
19463 (__is_pointer): Adjust.
19465 2000-04-08 Mark Mitchell <mark@codesourcery.com>
19467 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
19468 (complete_ctor_identifier): New macro.
19469 (special_function_kind): Add sfk_copy_constructor and
19470 sfk_assignment_operator.
19471 (LOOKUP_HAS_IN_CHARGE): Remove.
19472 (cons_up_default_function): Rename to ...
19473 (implicitly_declare_fn): ... this.
19474 * call.c (build_new_method_call): Add in-charge parameters for
19476 * class.c (add_implicitly_declared_members): Change parameter name
19477 from cant_have_assignment to cant_have_const_assignment.
19478 Replace calls to cons_up_default_function to implicitly_declare_fn.
19479 * cvt.c (ocp_convert): Use complete_ctor_identifier.
19480 * decl.c (initialize_predefined_identifiers): Initialize it.
19481 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
19482 complex expression.
19483 * init.c (expand_default_init): Don't calculate the in-charge
19485 (build_new_1): Likewise.
19486 * lex.c (cons_up_default_function): Move to method.c.
19487 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
19488 (implicitly_declare_fn): New function.
19489 * typeck.c (build_static_cast): Use complete_ctor_identifier.
19490 (build_modify_expr): Likewise.
19491 * typeck2.c (build_functional_cast): Likewise.
19493 Under the new ABI, constructors don't return `this'.
19494 * cp-tree.h (warn_reorder): Declare.
19495 (special_function_kind): New enum.
19496 (global_base_init_list): Remove declaration.
19497 (emit_base_init): Don't return a value.
19498 (check_base_init): Don't declare.
19499 (is_aggr_typedef): Likewise.
19500 * decl.c (check_special_function_return_type): New function.
19501 (return_types): Remove.
19502 (grokdeclarator): Use check_special_function_return_type.
19503 (start_function): Don't initialize ctor_label under the new ABI.
19504 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
19505 * init.c (begin_init_stmts): Move to top of file.
19506 (finish_init_stmts): Likewise.
19507 (warn_reorder): Don't declare.
19508 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
19510 (check_base_init): Remove.
19511 (is_aggr_typedef): Likewise.
19512 (build_new_1): Don't use the return value of a constructor.
19513 * semantics.c (setup_vtbl_ptr): Don't use the return value
19515 * typeck.c (check_return_expr): Don't magically convert return
19516 statements into `return this' in constructors under the new ABI.
19518 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
19519 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
19520 (base_ctor_identifier): New macro.
19521 (base_dtor_identifier): Likewise.
19522 (deleting_dtor_identifier): Likewise.
19523 * decl.c: Don't include obstack.h.
19524 (obstack_chunk_alloc): Don't define.
19525 (obstack_chunk_free): Likewise.
19526 (struct predefined_identifier): New type.
19527 (initialize_predefined_identifiers): New function.
19528 (init_decl_processing): Use it.
19529 (debug_temp_inits): Remove.
19530 (start_method): Don't call preserve_data.
19531 (hack_incomplete_structures): Update comment.
19532 * init.c (init_init_processing): Don't initialize
19534 (build_offset_rf): Remove dead code.
19535 (build_delete): Use CLASSTYPE_N_BASECLASSES.
19536 * search.c (init_search_processing): Don't initialize
19539 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19541 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
19542 some sign_compare warnings.
19544 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
19546 Rename abi::__vmi_class_type_info members.
19547 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
19548 base_list, detail_masks members to vmi_flags, vmi_base_count,
19549 vmi_bases and vmi_flags_masks respectively.
19550 (__vmi_class_type_info::vmi_flags_masks): Rename
19551 details_unknown_mask to flags_unknown_mask.
19552 * tinfo.cc (__class_type_info::do_upcast): Adjust.
19553 (__vmi_class_type_info::do_find_public_src): Adjust.
19554 (__vmi_class_type_info::do_dyncast): Adjust.
19555 (__vmi_class_type_info::do_upcast): Adjust.
19557 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
19559 * tinfo.cc (convert_to_base): New function.
19560 (get_vbase_offset): Remove. Move into convert_to_base.
19561 (__vmi_class_type_info::do_find_public_src): Adjust.
19562 (__vmi_class_type_info::do_dyncast): Adjust.
19563 (__vmi_class_type_info::do_upcast): Adjust.
19565 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
19567 * tinfo.cc (operator=): Use __builtin_strcmp.
19568 * tinfo2.cc (before): Likewise.
19570 2000-04-06 Mark Mitchell <mark@codesourcery.com>
19572 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
19573 (DECL_SAVED_INLINE): Rename to ...
19574 (DECL_DEFERRED_FN): ... this.
19575 (in_function_p): Remove declaration.
19576 (mark_inline_for_output): Rename to ...
19577 (defer_fn): ... this.
19578 * decl.c (finish_function): Adjust call to mark_inline_for_output.
19579 (in_function_p): Remove definition.
19580 * decl2.c (saved_inlines): Rename to ...
19581 (deferred_fns): ... this.
19582 (saved_inlines_used): Rename to ...
19583 (deferred_fns_used): ... this.
19584 (mark_inline_for_output): Rename to ...
19585 (defer_fn): ... this.
19586 (finish_file): Adjust accordingly.
19587 (init_decl2): Likewise.
19588 * lex.c (cons_up_default_function): Likewise.
19589 * pt.c (mark_decl_instantiated): Likewise.
19590 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
19592 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
19593 * semantics.c (expand_body): Defer more functions.
19595 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
19597 * vec.cc: New file.
19598 * Make-lang.in (CXX_LIB2FUNCS): Add it.
19600 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
19601 __cxa_vec_delete): Declare.
19603 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
19605 * rtti.c (dfs_class_hint_mark): New static function.
19606 (dfs_class_hint_unmark): New static function.
19607 (class_hint_flags): Use them.
19609 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
19611 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
19613 2000-04-05 Mark Mitchell <mark@codesourcery.com>
19615 * cp-tree.h (instantiate_decl): Change prototype.
19616 * decl2.c (mark_used): Adjust call.
19617 * optimize.c (inlinable_function_p): Adjust handling of templates.
19618 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
19619 (do_type_instantiation): Likewise.
19620 (instantiate_decl): Defer more templates.
19621 (instantiate_pending_templates): Adjust logic to handle inline
19624 * Makefile.in (GGC_H): New variable. Use it throughout in place
19627 * call.c: Don't include obstack.h. Include ggc.h.
19628 (obstack_chunk_alloc): Don't define.
19629 (obstack_chunk_free): Likewise.
19630 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
19631 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
19632 (pop_switch): Free it.
19634 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
19636 * dump.c (dequeue_and_dump): Don't try to print the bit_position
19637 if we don't have a DECL_FIELD_OFFSET.
19639 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
19641 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
19642 special_function_p.
19644 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19646 * cfns.gperf (hash, libc_name_p): Prototype.
19648 * rtti.c (build_dynamic_cast_1): Constification.
19650 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
19652 * semantics.c (deferred_type_access_control): Prototype.
19654 2000-04-04 Mark Mitchell <mark@codesourcery.com>
19656 Correct many new ABI issues regarding vbase and vcall offset
19658 * cp-tree.h (BINFO_VTABLE): Document.
19659 (struct lang_type): Tweak formatting.
19660 (BINFO_PRIMARY_BINFO): Add to documentation.
19661 (CLASSTYPE_VSIZE): Fix typo in comment.
19662 (CLASSTYPE_VBASECLASSES): Update documentation.
19663 (BINFO_VBASE_MARKED): Remove.
19664 (SET_BINFO_VBASE_MARKED): Likewise.
19665 (CLEAR_BINFO_VBASE_MARKED): Likewise.
19666 (BINFO_FIELDS_MARKED): Remove.
19667 (SET_BINFO_FIELDS_MARKED): Likewise.
19668 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
19669 (enum access_kind): New enumeration.
19670 (num_extra_vtbl_entries): Remove declaration.
19671 (size_extra_vtbl_entries): Likewise.
19672 (get_vtbl_decl_for_binfo): New function.
19673 (dfs_vbase_unmark): Remove declaration.
19674 (mark_primary_bases): Likewise.
19675 * class.c (SAME_FN): Remove.
19676 (struct vcall_offset_data_s): Move definition.
19677 (build_vbase_pointer): Use `build', not `build_binary_op', to
19678 access the vbase pointer under the new ABI.
19679 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
19680 (build_primary_vtable): Likewise.
19681 (dfs_mark_primary_bases): Move here from search.c.
19682 (mark_primary_bases): Likewise.
19683 (determine_primary_bases): Under the new ABI, don't make a base
19684 class a primary base just because we don't yet have any virtual
19686 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
19687 (num_vfun_entries): Remove.
19688 (dfs_count_virtuals): Likewise.
19689 (num_extra_vtbl_entries): Likewise.
19690 (size_extra_vtbl_entries): Likewise.
19691 (layout_virtual_bases): Iterate in inheritance graph order under
19693 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
19694 indicate that a vfield is present.
19695 (init_class_processing): Initialize access_public_node, etc., from
19697 (get_vtbl_decl_for_binfo): New function.
19698 (dump_class_hierarchy_r): Likewise.
19699 (dump_class_hierarchy): Use it.
19700 (finish_vtbls): Build the vtbls in inheritance graph order.
19701 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
19702 (initialize_vtable): Use get_vtbl_decl_for_binfo.
19703 (accumulate_vtbl_inits): Add comments explaining why a pre-order
19705 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
19706 where the vptr points, even for primary vtables.
19707 (build_vtbl_initializer): Adjust handling of vbase and vcall
19709 (build_vcall_and_vbase_vtable_entries): New function.
19710 (dfs_build_vbase_offset_vtbl_entries): Remove.
19711 (build_vbase_offset_vtbl_entries): Reimplement.
19712 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
19713 were already handled in a primary base class vtable.
19714 (build_vcall_offset_vtbl_entries): Adjust.
19715 (build_rtti_vtbl_entries): Adjust.
19716 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
19717 * init.c (expand_virtual_init): Simplify.
19718 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
19719 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
19720 * search.c (BINFO_ACCESS): New macro.
19721 (SET_BINFO_ACCESS): Likewise.
19722 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
19723 (access_in_type): Likewise.
19724 (dfs_accessible_p): Likewise.
19725 (protected_accessible_p): Likewise.
19726 (lookup_fnfields_1): Adjust documentation.
19727 (dfs_mark_primary_bases): Move to class.c
19728 (mark_primary_bases): Likewise.
19729 (dfs_vbase_unmark): Remove.
19730 (virtual_context): Use BINFO_FOR_VBASE.
19731 (dfs_get_vbase_types): Simplify.
19732 (dfs_build_inheritance_graph_order): New function.
19733 (get_vbase_types): Use it.
19734 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
19736 * tinfo.cc (get_vbase_offset): New function.
19737 (__vmi_class_type_info::do_find_public_src): Use it.
19738 (__vmi_class_type_info::do_dyncast): Likewise.
19739 (__vmi_class_type_info::do_upcast): Likewise.
19741 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
19743 * lang-specs.h: Pass -fno-show-column to the preprocessor.
19745 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
19747 * rtti.c (class_hint_flags): Rename flags.
19748 (class_initializer): Remove flags.
19749 (synthesize_tinfo_var): Combine offset and flags. Add flags
19750 for __vmi_class_type_info.
19751 (create_tinfo_types): Remove flags from __class_type_info and
19752 __si_class_type_info. Merge flags and offset from
19753 base_class_type_info.
19754 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
19755 (__base_class_info::is_virtual_p): Adjust.
19756 (__base_class_info::is_public_p): Adjust.
19757 (__base_class_info::offset): New accessor.
19758 (__class_type_info::details): Remove member.
19759 (__class_type_info::__class_type_info): Lose details.
19760 (__class_type_info::detail_masks): Remove.
19761 (__si_class_type_info::__si_class_type_info): Lose details.
19762 (__vmi_class_type_info::details): New member.
19763 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
19764 (__vmi_class_type_info::detail_masks): New member.
19765 * tinfo.cc (__class_type_info::do_upcast): Initialize result
19766 with unknown_details_mask.
19767 (__vmi_class_type_info::do_find_public_src): Adjust
19768 (__vmi_class_type_info::do_dyncast): Adjust.
19769 (__vmi_class_type_info::do_upcast): Set result details, if
19771 (__dynamic_cast): Temporarily #if out optimization.
19773 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
19775 * rtti.c (get_tinfo_decl): Mark used.
19776 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
19777 mark as dealt with, if we output it.
19779 2000-03-28 Mark Mitchell <mark@codesourcery.com>
19781 * class.c: Reorganize to put virtual function table initialization
19782 machinery at the end of the file.
19784 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
19786 * class.c (finish_struct): Use bitsize_zero_node.
19787 * pt.c (instantiate_class_template): Likewise.
19789 2000-03-28 Mark Mitchell <mark@codesourcery.com>
19791 Put RTTI entries at negative offsets in new ABI.
19792 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
19793 vbase offset at index -3, not -1.
19794 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
19795 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
19796 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
19797 (build_rtti_vtbl_entries): New function.
19798 (set_rtti_entry): Remove.
19799 (build_primary_vtable): Don't use it.
19800 (build_secondary_vtable): Likewise.
19801 (start_vtable): Remove.
19802 (first_vfun_index): New function.
19803 (set_vindex): Likewise.
19804 (add_virtual_function): Don't call start_vtable. Do call
19806 (set_primary_base): Rename parameter.
19807 (determine_primary_base): Likewise.
19808 (num_vfun_entries): Don't use skip_rtti_stuff.
19809 (num_extra_vtbl_entries): Include RTTI information.
19810 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
19811 (skip_rtti_stuff): Remove.
19812 (dfs_modify_vtables): Don't use it.
19813 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
19814 (layout_nonempty_base_or_field): Update size handling.
19815 (create_vtable_ptr): Tweak.
19816 (layout_class_type): Adjust parameter names.
19817 (finish_struct_1): Simplify.
19818 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
19819 (skip_rtti_stuff): Remove.
19820 (first_vfun_index): New function.
19821 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19822 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
19823 (marked_vtable_pathp): Declare.
19824 (unmarked_vtable_pathp): Likewise.
19825 * error.c (dump_expr): Use first_vfun_index to calculate vtable
19827 * rtti.c (build_headof): Look for RTTI at negative offsets.
19828 (get_tinfo_decl_dynamic): Likewise.
19829 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
19831 (create_pseudo_type_info): Do it here instead. Adjust so that
19832 vptr points at first virtual function.
19833 * search.c (marked_vtable_pathp): Make it global.
19834 (unmarked_vtable_pathp): Likewise.
19835 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19836 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
19837 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
19838 (get_pure_virtuals): Likewise.
19839 (expand_upcast_fixups): Likewise.
19840 * tree.c (debug_binfo): Likewise.
19841 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
19844 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19846 * class.c (check_field_decl): Fix typo.
19847 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
19848 (check_methods): Likewise.
19849 (check_field_decls): Likewise.
19850 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
19851 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
19852 Use DECL_RESULT_FLD, not DECL_RESULT.
19853 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
19854 * lex.c (identifier_type): Likewise.
19855 * pt.c (determine_specialization, lookup_template_class): Likewise.
19856 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
19857 (resolve_overloaded_unification, more_specialized): Likewise.
19858 * semantics.c (finish_member_declaration): Likewise.
19859 * typeck.c (build_x_function_call): Likewise.
19861 2000-03-26 Mark Mitchell <mark@codesourcery.com>
19863 * class.c (layout_empty_base): Handle empty bases with non-byte
19865 (build_base_field): Likewise.
19866 (layout_virtual_bases): Likewise.
19868 * class.c (finish_struct_1): Fix typo in this change:
19870 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19872 2000-03-25 Mark Mitchell <mark@codesourcery.com>
19874 * decl.c (grokdeclarator): Count partial specializations when
19875 keeping track of how many template classes have been seen.
19877 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
19879 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19881 * class.c (build_vbase_pointer_fields): layout_field now place_field.
19882 (get_vfield_offset): Use byte_position.
19883 (set_rtti_entry): Set OFFSET to ssizetype zero.
19884 (get_binfo_offset_as_int): Deleted.
19885 (dfs_record_base_offsets): Use tree_low_cst.
19886 (dfs_search_base_offsets): Likewise.
19887 (layout_nonempty_base_or_field): Reflect changes in RLI format
19888 and call byte_position.
19889 (layout_empty_base): Convert offset to ssizetype.
19890 (build_base_field): use rli_size_unit_so_far.
19891 (dfs_propagate_binfo_offsets): Do computation in proper type.
19892 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
19893 (layout_class_type): Reflect changes in RLI names and fields.
19894 (finish_struct_1): Set DECL_FIELD_OFFSET.
19895 * dump.c (dequeue_and_dump): Call bit_position.
19896 * expr.c (cplus_expand_constant): Use byte_position.
19897 * rtti.c (expand_class_desc): Use bitsize_one_node.
19898 * typeck.c (build_component_addr): Use byte_position and don't
19899 special case for zero offset.
19901 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
19903 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
19905 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
19907 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
19910 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
19912 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
19914 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
19915 make_typename_type, check_initializer, cp_finish_decl,
19916 xref_tag): Likewise.
19917 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
19918 decl_namespace, arg_assoc_template_arg, arg_assoc,
19919 validate_nonmember_using_decl, do_class_using_decl): Likewise.
19920 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
19921 args_to_string): Likewise.
19922 * friend.c (is_friend): Likewise.
19923 * lex.c (note_got_semicolon, note_list_got_semicolon,
19924 is_global): Likewise.
19925 * method.c (build_overload_nested_name, build_overload_value,
19926 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
19927 * parse.y (typename_sub, typename_sub1): Likewise.
19928 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
19929 process_partial_specialization, convert_template_argument,
19930 template_args_equal, add_pending_template, lookup_template_class,
19931 for_each_template_parm_r, maybe_fold_nontype_arg,
19932 tsubst, instantiate_template, type_unification_real, unify,
19933 instantiate_pending_templates, set_mangled_name_for_template_decl):
19935 * repo.c (repo_get_id, repo_template_used): Likewise.
19936 * search.c (lookup_field_1): Likewise.
19937 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
19938 * xref.c (classname): Likewise.
19940 2000-03-22 Mark Mitchell <mark@codesourcery.com>
19942 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
19943 (CANONICAL_BINFO): New macro.
19944 (BINFO_NEW_VTABLE_MARKED): Use it.
19945 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
19946 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
19947 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
19949 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19950 (build_secondary_vtable): Likewise.
19951 (dfs_finish_vtbls): Likewise.
19952 (dfs_accumulate_vtbl_inits): Likewise.
19953 (accumulate_vtbl_inits): New function.
19954 (finish_vtbls): Make sure that virtual bases come after
19955 non-virtual bases in the vtable group.
19956 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
19957 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19958 * search.c (struct vbase_info): Move definition.
19959 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19960 (unmarked_new_vtable_p): Likewise.
19961 (dfs_mark_vtable_path): Remove.
19962 (dfs_mark_new_vtable): Remove.
19963 (dfs_unmark_new_vtable): Likewise.
19964 (dfs_clear_search_slot): Likewise.
19965 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19966 (dfs_clear_vbase_slots): Likewise.
19967 (init_vbase_pointers): LIkewise.
19969 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
19971 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
19972 SIZETYPE to a non-SIZETYPE.
19974 2000-03-21 Mark Mitchell <mark@codesourcery.com>
19976 * class.c (layout_virtual_bases): Adjust names in conditionally
19979 * class.c (record_base_offsets): New function.
19980 (layout_conflict_p): Likewise.
19981 (layout_nonempty_base_or_field): Use it.
19982 (layout_empty_base): New function.
19983 (build_base_field): Use it.
19984 (build_base_fields): Update comment.
19985 (layout_virtual_bases): Fold in a little code form
19986 layout_basetypes. Use layout_empty_base.
19987 (layout_basetypes): Remove.
19988 (end_of_class): New function.
19989 (layout_class_type): Use it. Adjust.
19991 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
19992 (fntype_p): Remove.
19993 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
19995 (dfs_skip_nonprimary_vbases_markedp): Likewise.
19996 * typeck.c (fntype_p): Remove.
19998 * cp-tree.h (TI_SPEC_INFO): Remove.
19999 (CLASSTYPE_TI_SPEC_INFO): Likewise.
20000 * pt.c (process_partial_specialization): Likewise.
20002 * class.c (build_base_field): Fix thinko in computation of binfo
20005 * tree.c (mark_local_for_remap_p): Mark variables declared in
20006 TARGET_EXPRs as well.
20008 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
20010 * typeck.c (require_complete_type, complete_type,
20011 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
20012 build_array_ref, convert_arguments, pointer_diff,
20013 build_x_unary_op, build_unary_op, build_c_cast,
20014 build_modify_expr): Use COMPLETE_TYPE_P etc.
20015 * call.c (is_complete, convert_like_real,
20016 build_new_method_call): Likewise.
20017 * class.c (build_vbase_pointer_fields, check_bases,
20018 build_base_field, finish_struct_1, pushclass): Likewise.
20019 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
20020 * decl.c (maybe_process_template_type_declaration, pushtag,
20021 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
20022 layout_var_decl, check_initializer, cp_finish_decl,
20023 grokdeclarator, require_complete_types_for_parms,
20024 grok_op_properties, xref_tag, xref_basetypes,
20025 check_function_type): Likewise.
20026 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
20027 * friend.c (do_friend): Likewise.
20028 * init.c (build_offset_ref): Likewise.
20029 * parse.y (structsp): Likewise.
20030 * pt.c (maybe_process_partial_specialization,
20031 tsubst_friend_function, instantiate_class_template, tsubst,
20032 do_type_instantiation, instantiate_pending_templates): Likewise.
20033 * repo.c (repo_get_id): Likewise.
20034 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
20035 synthesize_tinfo_var, emit_support_tinfos): Likewise.
20036 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
20037 * semantics.c (begin_class_definition): Likewise.
20038 * tree.c (build_cplus_method_type): Likewise.
20039 * typeck2.c (digest_init, build_functional_cast,
20040 add_exception_specifier): Likewise.
20041 * parse.h, parse.c: Regenerated.
20043 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
20045 * inc/cxxabi.h: New header file. Define new-abi entry points.
20046 (__pointer_type_info::target): Rename member to ...
20047 (__pointer_type_info::type): ... here.
20048 (__base_class_info::type): Rename member to ...
20049 (__base_class_info::base): ... here.
20050 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
20051 * cp-tree.h (CPTI_ABI): New global tree enumeration.
20052 (abi_node): New global tree node.
20053 * decl.c (abi_node): Document.
20054 (init_decl_processing): Initialize abi_node.
20055 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
20056 (get_vmi_pseudo_type_info): Likewise.
20057 (create_tinfo_types): Likewise.
20058 (emit_support_tinfos): Likewise.
20059 * tinfo.h (cxxabi.h): Include for new-abi.
20060 Move rtti class definitions to new header file.
20061 * tinfo.cc (abi): Use the namespace.
20062 (std): Move new abi rtti classes from here ...
20063 (__cxxabiv1): ... to here.
20064 * tinfo2.cc (cxxabi.h): Include for new-abi.
20065 Move rtti class definitions to new header file.
20066 (std): Move new abi rtti classes from here ...
20067 (__cxxabiv1): ... to here.
20068 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
20071 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
20072 Jason Merrill <jason@casey.cygnus.com>
20074 * method.c (build_overload_int): Use host_integerp.
20076 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
20078 * init.c (build_offset_ref): Handle the case of a templated member
20081 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20083 * except.c (expand_exception_blocks): Clear catch_clauses_last.
20085 2000-03-18 Mark Mitchell <mark@codesourcery.com>
20087 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
20088 * class.c (check_bitfield_decl): Turn illegal bitfields into
20090 (dfs_propagate_binfo_offsets): Adjust for new size_binop
20092 (dfs_offset_for_unshared_vbases): Likewise.
20093 * cvt.c (cp_convert_to_pointer): Convert NULL to a
20094 pointer-to-member correctly under the new ABI.
20095 * expr.c (cplus_expand_constant): Don't use cp_convert when
20096 turning an offset into a pointer-to-member.
20097 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
20098 when dereferencing them under the new ABI.
20099 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
20100 of pointers-to-members under the new ABI.
20102 * class.c (check_bitfield_decl): Remove restriction on really long
20104 (layout_class_type): Implement new ABI handling of bitfields
20105 longer than their types.
20107 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20109 * parse.y (extdefs): Call ggc_collect.
20110 * parse.c: Regenerated.
20112 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
20114 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
20115 (note_name_declared_in_class): Use OVL_CURRENT to get at a
20116 potential overload.
20118 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20120 * class.c (build_vbase_path): Use integer_zerop.
20121 (build_vtable_entry): Use tree_low_cst.
20122 (get_vfield_offset): Use bit_position.
20123 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
20125 (check_bitfield_decl): Set DECL_SIZE using convert.
20126 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
20127 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
20129 (finish_struct_1): Use bit_position.
20130 (dump_class_hierarchy): Use tree_low_cst.
20131 * cp-tree.h (min_precision): Add declaration.
20132 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
20133 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
20134 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
20135 * expr.c (cplus_expand_constant): Use bit_position.
20136 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
20137 * rtti.c (get_base_offset): Use bit_position.
20138 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
20139 host_integerp, and tree_low_cst.
20140 (pointer_int_sum): Use integer_zerop.
20141 (build_component_addr): Use bit_position.
20143 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
20145 * typeck.c (require_complete_type): Don't assume size_zero_node.
20146 (complete_type_or_else): Likewise.
20148 2000-03-16 Steven Grady <grady@digitaldeck.com>
20149 Jason Merrill <jason@casey.cygnus.com>
20151 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
20153 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
20155 * decl2.c (grokfield): Bail out if type is error_mark_node.
20157 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
20159 * tinfo2.cc (__ptr_to_member_data): Rename to ...
20160 (__pointer_to_member_data): ... here. Adjust.
20161 * rtti.c (create_tinfo_types): Adjust.
20163 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
20165 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
20166 * decl.c (ref_desc_type_node): Undocument.
20167 * rtti.c (ptr_ref_initializer): Rename to ...
20168 (ptr_initializer): ... here. Adjust comments.
20169 (ptmd_initializer): Fix comment thinko.
20170 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
20171 (create_tinfo_types): Remove ref_desc_type_node init.
20172 * tinfo2.cc (__reference_type_info): Remove.
20174 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
20176 * decl.c (cp_finish_decl): Remove obsolete comment.
20178 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
20180 2000-03-14 Mark Mitchell <mark@codesourcery.com>
20182 * cp-tree.h: Tweak documentation.
20183 * class.c (build_vbase_pointer_fields): Layout the fields, too.
20184 (avoid_overlap): Remove.
20185 (get_binfo_offset_as_int): New function.
20186 (dfs_serach_base_offsets): Likewise.
20187 (layout_nonempty_base_or_field): Likewise.
20188 (build_base_field): Layout fields here. Avoid placing two objects
20189 of the same type at the same address, under the new ABI.
20190 (build_base_fields): Adjust accordingly.
20191 (create_vtable_ptr): Return the new field, but don't attach it to
20193 (remove_base_field): Remove.
20194 (remove_base_fields): Remove.
20195 (layout_basetypes): Adjust accordingly.
20196 (layout_class_type): Call layout_field for each field, rather than
20197 just making a wholesale call to layout_type.
20199 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
20201 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
20203 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
20205 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
20207 * except.c (dtor_nothrow): New fn.
20208 (do_pop_exception): Use it. Take type parm.
20209 (push_eh_cleanup): Take type parm.
20210 (expand_start_catch_block): Pass it.
20211 (build_eh_type_type_ref): Accept null type.
20213 2000-03-12 Mark Mitchell <mark@codesourcery.com>
20215 * cp-tree.h (revert_static_member_fn): Change prototype.
20216 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
20217 (grok_op_properties): Likewise.
20218 (start_function): Likewise.
20219 (revert_static_member_fn): Simplify.
20220 * pt.c (check_explicit_specialization): Adjust call to
20221 revert_static_member_fn.
20223 2000-03-11 Mark Mitchell <mark@codesourcery.com>
20225 * cp-tree.h (scope_kind): New type.
20226 (tmpl_spec_kind): Likewise.
20227 (declare_pseudo_global_level): Remove.
20228 (pseudo_global_level_p): Rename to template_parm_scope_p.
20229 (pushlevel): Remove declaration.
20230 (begin_scope): New function.
20231 (finish_scope): Likewise.
20232 (current_tmpl_spec_kind): Likewise.
20233 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
20234 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
20235 Add template_spec_p.
20236 (toplevel_bindings_p): Adjust.
20237 (declare_pseudo_global_level): Remove.
20238 (pseudo_global_level_p): Rename to template_parm_scope_p.
20239 (current_tmpl_spec_kind): New function.
20240 (begin_scope): Likewise.
20241 (finish_scope): Likewise.
20242 (maybe_push_to_top_level): Adjust.
20243 (maybe_process_template_type_declaration): Likewise.
20244 (pushtag): Likewise.
20245 (pushdecl_nonclass_level): Likewise.
20246 (lookup_tag): Likewise.
20247 (grokfndecl): Handle member template specializations. Share
20248 constructor and non-constructor code.
20249 * decl2.c (check_classfn): Handle member template specializations.
20250 * pt.c (begin_template_parm_list): Use begin_scope.
20251 (begin_specialization): Likewise.
20252 (end_specialization): Likewise.
20253 (check_explicit_specialization): Use current_tmpl_spec_kind.
20254 Handle member template specializations.
20255 (end_template_decl): Use finish_scope. Remove call to
20257 (push_template_decl_real): Remove bogus error message.
20258 (tsubst_decl): Fix typo in code contained in comment.
20259 (instantiate_template): Handle member template specializations.
20260 (most_general_template): Likewise.
20262 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
20264 * lex.c (whitespace_cr): Compress consecutive calls to warning().
20265 (do_identifier): Ditto for error().
20267 * pt.c (convert_nontype_argument): Ditto for cp_error().
20268 (convert_template_argument): Ditto for cp_pedwarn().
20270 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
20272 * exception.cc (__check_null_eh_spec): New fn.
20273 * except.c (expand_end_eh_spec): Call it if the spec is throw().
20275 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
20277 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
20278 * except.c (expand_end_eh_spec): Add the return type.
20279 * rtti.c (throw_bad_cast): Add the parmtypes.
20280 (throw_bad_typeid): Likewise.
20282 * semantics.c (expand_stmt): Only leave out rtl for unused
20283 artificials, and set DECL_IGNORED_P on them as well.
20284 * decl.c (wrapup_globals_for_namespace): Likewise.
20286 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
20288 * decl.c (maybe_commonize_var): Skip all artificial decls.
20289 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
20291 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
20293 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
20294 * cp-tree.h: Declare flag_enforce_eh_specs.
20295 * decl.c (store_parm_decls, finish_function): Check it.
20297 C library functions don't throw.
20298 * Makefile.in (cfns.h): New target.
20299 (except.o): Depend on it.
20300 * Make-lang.in (cc1plus): Depend on cfns.gperf.
20301 * cfns.gperf: New file.
20302 * cfns.h: Generated.
20303 * except.c: Include it.
20304 (nothrow_libfn_p): New fn.
20305 * decl.c (grokfndecl): Use it.
20306 * cp-tree.h: Declare it.
20308 * decl.c (push_overloaded_decl_1, auto_function,
20309 define_function): Lose.
20310 (build_library_fn_1): New static fn.
20311 (builtin_function): Use it.
20312 (get_atexit_node): Use build_library_fn_ptr.
20313 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
20314 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
20315 push_void_library_fn, push_throw_library_fn): New fns.
20316 * cp-tree.h: Declare them.
20317 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
20318 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
20319 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
20320 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
20321 * rtti.c (build_runtime_decl): Lose.
20322 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
20323 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
20324 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
20326 * call.c (build_call): Remove result_type parm.
20327 Call mark_used on unused artificial fns.
20328 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
20330 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
20332 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
20334 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
20335 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
20336 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
20337 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
20338 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
20339 expand_generic_desc): Likewise.
20341 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20343 * exception.cc (__cp_pop_exception): Cleanup the original object.
20345 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20347 * decl.c (grok_op_properties): Merge conversion to void warning
20348 with other silly op warnings.
20350 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
20352 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
20353 array CONSTRUCTOR elements. Don't use expr_tree_cons.
20355 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20357 * decl.c (cp_make_fname_decl): New function.
20358 (wrapup_globals_for_namespace): Don't emit unused static vars.
20359 (init_decl_processing): Remove comment about use of
20360 array_domain_type. Set make_fname_decl.
20361 (cp_finish_decl): Remove __FUNCTION__ nadgering.
20362 * semantics.c (begin_compound_stmt): Remove
20363 current_function_name_declared flagging.
20364 (expand_stmt): Don't emit unused local statics.
20365 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
20368 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20370 * typeck.c (convert_for_assignment): Don't look at array
20372 * call.c (convert_like_real): Likewise.
20374 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
20376 Add initial support for '\uNNNN' specifier.
20377 * lex.c (read_ucs): New fn.
20378 (readescape, skip_white_space): Call it.
20379 (is_extended_char, is_extended_char_1): New fns.
20380 (utf8_extend_token): New fn, #if 0'd out.
20381 (real_yylex): Treat extended chars like letters.
20383 * search.c (note_debug_info_needed): Walk the bases even if we
20384 weren't deferring the type itself.
20386 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20388 * decl2.c (finish_objects): Constify a char*.
20390 * method.c (emit_thunk): Likewise.
20392 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
20394 * typeck.c (dubious_conversion_warnings): Look through
20397 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20399 * class.c (dfs_modify_vtables): I is now unsigned.
20400 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
20401 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
20402 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
20403 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
20404 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
20405 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
20406 Call integer_all_onesp.
20407 * typeck2.c (process_init_constructor): Use compare_tree_int.
20409 * lang-specs.h (as): Don't call if -syntax-only.
20411 2000-03-06 Mark Mitchell <mark@codesourcery.com>
20413 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
20414 RTL_EXPR_HAS_NO_SCOPE after all.
20416 2000-03-05 Mark Mitchell <mark@codesourcery.com>
20418 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
20419 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
20420 RTL_EXPR_HAS_NO_SCOPE.
20422 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
20425 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
20427 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
20429 * call.c (convert_like): Macrofy.
20430 (convert_like_with_context): New macro.
20431 (convert_like_real): Renamed from convert_like. Add calling
20432 context parameters, for diagnostics. Add recursive flag. Call
20433 dubious_conversion_warnings for outer conversion.
20434 (build_user_type_conversion): Use convert_like_with_context.
20435 (build_over_call): Likewise. Don't warn about dubious
20436 conversions here. Adjust convert_default_arg calls.
20437 (convert_default_arg): Add context parameters for diagnostics.
20438 Pass through to convert_like_with_context.
20439 * cp-tree.h (convert_default_arg): Add context parameters.
20440 (dubious_conversion_warnings): Prototype new function.
20441 * typeck.c (convert_arguments): Adjust convert_default_arg call.
20442 (dubious_conversion_warnings): New function, broken
20443 out of convert_for_assignment.
20444 (convert_for_assignment): Adjust.
20446 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
20448 * decl2.c (key_method): Break out from...
20449 (import_export_vtable, import_export_class): ...here.
20451 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
20452 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
20454 * search.c (note_debug_info_needed, dfs_debug_mark,
20455 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
20456 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
20458 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
20460 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
20463 2000-03-02 Mark Mitchell <mark@codesourcery.com>
20465 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
20466 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
20467 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
20468 (lang_type): Split gets_new into has_new and has_array_new.
20469 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20470 (TYPE_GETS_NEW): Split into ...
20471 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
20472 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
20473 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
20474 (build_op_new_call): Don't declare.
20475 (build_new_1): Likewise.
20476 * call.c (build_op_new_call): Remove.
20477 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20478 instead of TYPE_NEEDS_DESTRUCTOR.
20479 (finish_struct_bits): Likewise.
20480 (add_implicitly_declared_members): Likewise.
20481 (check_field_decl): Likewise.
20482 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
20483 correctly under the new ABI.
20484 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20485 instead of TYPE_NEEDS_DESTRUCTOR.
20486 (initialize_local_var): Likewise.
20487 (destroy_local_var): Likewise.
20488 (cp_finish_decl): Likewise.
20489 (register_dtor_fn): Likewise.
20490 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
20491 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
20492 TYPE_VEC_DELETE_TAKES_SIZE here.
20493 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
20494 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
20495 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20496 (finish_destructor_body): Likewise.
20497 (maybe_build_cleanup_1): Likewise.
20498 * decl2.c (do_static_destruction): Likewise.
20499 * init.c (build_new_1): Make it static.
20500 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20501 (expand_cleanup_for_base): Likewise.
20502 (get_cookie_size): New function.
20503 (build_new_1): Handle array-new cookies correctly under the new
20505 (build_vec_delete_1): Likewise.
20506 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20507 (build_delete): Likewise.
20508 (build_vec_delete): Handle array-new cookies correctly under the new
20510 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20511 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
20512 TYPE_HAS_ARRAY_NEW_OPERATOR.
20513 * ptree.c (print_lang_type): Check them.
20514 * search.c (context_for_name_lookup): Fix typo in comment.
20515 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20516 * tree.c (break_out_cleanups): Likewise.
20517 (build_cplus_array_test_1): Likewise.
20518 (cp_build_qualified_type_real): Likewise.
20519 * typeck.c (complete_type): Likewise.
20521 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
20522 the command-line, not the end.
20524 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
20526 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
20528 2000-03-02 Tom Tromey <tromey@cygnus.com>
20530 * cp-tree.h (build_java_class_ref): Declare.
20531 * init.c (build_java_class_ref): No longer static.
20532 * except.c (expand_throw): Generate a Java-style `throw' if the
20533 thrown object is a "Java" object.
20534 (initialize_handler_parm): Generate a Java-style lookup of
20535 exception info if the caught object is a "Java" object.
20536 (catch_language, catch_language_init): New globals.
20537 (decl_is_java_type): New function.
20538 (expand_start_catch_block): Don't call push_eh_info() or
20539 push_eh_cleanup() when handling a Java-style "catch". Pass Java
20540 class reference to build_catch_block.
20542 2000-03-02 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20544 * typeck.c (comptypes): Treat sizetype like its language equivalent.
20546 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
20548 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
20549 to merge reference/pointer code and fix incorrect warnings.
20551 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
20553 * search.c (protected_accessible_p): Use context_for_name_lookup.
20555 * init.c (construct_virtual_bases): Fix thinko.
20556 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
20558 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
20560 * decl.c (current_function_decl): Move to toplev.c.
20562 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
20564 * pt.c (fn_type_unification): Unify return type, whenever
20566 (get_bindings_real): Only pass return type when necessary.
20567 Remove explicit return type check.
20568 * class.c (resolve_address_of_overloaded_function): Pass desired
20569 return type to fn_type_unification.
20571 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20573 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
20575 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
20577 * rtti.c (expand_class_desc): Likewise.
20578 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
20579 (THUNK_VCALL_OFFSET): Likewise.
20580 (THUNK_DELTA): Reflect changes in ../tree.h.
20582 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
20584 * search.c (protected_accessible_p): Also allow the access if
20585 the member is public in DERIVED. Lose TYPE parm.
20586 (friend_accessible_p): Lose TYPE parm.
20587 (accessible_p): Adjust.
20589 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20591 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
20592 on things that are not sizes; ssize_binop deleted.
20593 Call size_diffop when appropriate.
20594 (dfs_build_vcall_offset_vtbl_entries): Likewise.
20595 (build_primary_vtable, build_secondary_vtable): Likewise.
20596 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
20597 Variable I is HOST_WIDE_INT.
20598 (get_vfield_offset): Pass proper types to size_binop.
20599 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
20600 (finish_struct_1): Likewise.
20601 (skip_rtti_stuff): Arg N is now pointer to signed.
20602 (layout_class_type): Use size_zero_node.
20603 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
20604 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
20605 * decl.c (complete_arry_type): Pass proper types to size_binop.
20606 (xref_basetypes): BINFO_OFFSET is sizetype.
20607 * error.c (dump_expr): Don't use size_binop non-sizes.
20608 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
20609 * init.c (construct_virtual_bases): Fix type error.
20610 (build_vec_delete_1): Pass proper type to size_binop and don't
20612 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
20613 * rtti.c (get_base_offset): Pass proper type to size_binop.
20614 * search.c (dfs_find_vbases): Fix type error.
20615 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
20616 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
20617 * tree.c (debug_binfo): Variable N is signed.
20618 Use HOST_WIDE_INT_PRINT_DEC.
20619 * typeck.c (comptypes): sizetype is same as equivalent integer type.
20620 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
20621 size_one_node and size_zero_node.
20622 (c_alignof): Use size_one_node.
20623 (build_component_addr): Pass proper types to size_binop.
20624 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
20626 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
20628 Implement class scope using-declarations for functions.
20629 * class.c (handle_using_decl): Call add_method for used functions.
20630 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
20631 (add_method): Used functions are hidden by local functions.
20632 (check_bases_and_members): Handle using-decls before finalizing
20633 CLASSTYPE_METHOD_VEC.
20634 * call.c (add_function_candidate): Add ctype parm; if nonzero,
20635 override the type of 'this' accordingly.
20636 (add_template_candidate, add_template_candidate_real): Add ctype parm.
20637 (convert_class_to_reference, build_user_type_conversion_1,
20638 build_new_function_call, build_object_call, build_new_op,
20639 build_new_method_call): Pass ctype parm.
20641 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
20643 * call.c (convert_class_to_reference, build_user_type_conversion_1,
20644 build_new_function_call, build_object_call, build_new_op,
20645 build_new_method_call, build_op_delete_call): Don't get basetype_path
20647 * typeck.c (build_component_ref): Likewise.
20648 * init.c (build_offset_ref): Likewise.
20649 (resolve_offset_ref): Don't call enforce_access.
20650 Call build_scoped_ref.
20651 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
20652 would cause an error or if -pedantic.
20653 * class.c (alter_access): Lose binfo parm.
20655 2000-02-26 Mark Mitchell <mark@codesourcery.com>
20657 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
20660 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
20662 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
20663 pseudo_type_info creation into the std namespace
20665 2000-02-26 Mark Mitchell <mark@codesourcery.com>
20667 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
20668 (import_export_class): Remove declaration.
20669 * decl2.c (import_export_class): Make it static.
20670 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
20671 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
20672 EXPR_WITH_FILE_LOCATION.
20673 * lex.c (check_newline): Tweak filename/lineno setting.
20674 * semantics.c (begin_while_stmt): Fix typo in comment.
20676 2000-02-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20678 * lang-options.h (-fmessage-length=): Add missing option.
20680 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
20682 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
20684 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
20686 2000-02-25 Jim Wilson <wilson@cygnus.com>
20688 * optimize.c (expand_call_inline): Emit the return label before
20689 evaluating the return value.
20691 2000-02-24 Mark Mitchell <mark@codesourcery.com>
20693 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
20694 than duplicating functionality here.
20695 * optimize.c: Include input.h.
20696 (expand_call_inline): Use push_srcloc and pop_srcloc.
20697 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
20698 * parse.c: Regenerated.
20699 * Makefile.in (lex.o): Depend on input.h.
20700 (optimize.o): Likewise.
20702 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
20704 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
20705 function type, rather than ICE.
20707 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
20709 * decl.c (grokdeclarator): Call decl_type_access_control.
20710 * parse.y (parse_end_decl): Don't call decl_type_access_control if
20713 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
20715 * decl.c (decls_match): Remove obsolete static member nadgering.
20717 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20719 * decl.c (grokdeclarator): Change ANSI to ISO.
20720 * lex.c (consume_string, readescape, do_identifier): Likewise.
20721 (parse_float, real_yylex): Likewise.
20722 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
20723 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
20724 new_type_id, maybe_label_decls, simple_stmt,
20725 for.init.statement): Likewise.
20726 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
20727 * semantics.c (finish_named_return_value): Likewise.
20728 * parse.c: Regenerate.
20730 2000-02-21 Mark Mitchell <mark@codesourcery.com>
20732 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
20733 (CPTI_CLASS_STAR_TYPE): Remove.
20734 (vtable_index_type): Likewise.
20735 (class_star_type_node): Remove.
20736 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
20737 (build_binary_op_nodefault): Remove.
20738 * call.c (build_new_op): Use build_binary_op instead of
20739 build_binary_op_nodefault.
20740 * decl.c (init_decl_processing): Remove class_star_type_node
20741 initialization. Make delta_type_node ptrdiff_type_node under the
20742 new ABI. Initialize vtable_index_type.
20743 (build_ptrmemfunc_type): Build different structures for the new
20745 (build_enumerator): Use build_binary_op instead of
20746 build_binary_op_nodefault.
20747 * method.c (build_overload_value): Mangle pointers-to-members
20748 appropriately under the new ABI.
20749 * typeck.c (build_array_ref): Use build_binary_op instead of
20750 build_binary_op_nodefault.
20751 (get_member_function_from_ptrfunc): Adjust for the new ABI.
20752 (build_binary_op_nodefault): Rename to ...
20753 (build_binary_op): ... this. Remove old version. Adjust for
20754 pointer-to-member comparisons under the new ABI.
20755 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
20756 (build_ptrmemfunc): Adjust for the new ABI.
20757 (expand_ptrmemfunc_cst): Likewise.
20758 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
20759 (pfn_from_ptrmemfunc): Adjust for the new ABI.
20761 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
20763 * call.c (build_object_call): Compress consecutive calls to
20765 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
20766 (build_op_delete_call): Adjust message formatting.
20768 * class.c (check_bases): Compress consecutive calls to
20770 (finish_struct_anon): Say 'ISO C++'.
20772 * decl.c (start_decl): Same here.
20773 (grok_reference_init): Likewise.
20774 (grokfndecl): Correct message formatting.
20775 (grokfndecl): Improve diagnostic.
20776 (check_static_variable_definition): Likewise. Say 'ISO C++'
20777 (compute_array_index_type): Say 'ISO C++'
20778 (create_array_type_for_decl): Compress consecutive calls to
20780 (grokdeclarator): Say 'ISO C++'
20781 (grok_op_properties): Likewise.
20783 * decl2.c (delete_sanity): Clairify diagnostic.
20784 (check_member_template): Same here.
20785 (grok_function_init): Use consistent terminology.
20787 * expr.c (do_case): Say 'ISO C++'
20789 * friend.c (do_friend): Compress consecutive calls to warning.
20791 2000-02-20 Mark Mitchell <mark@codesourcery.com>
20793 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
20794 * class.c (build_secondary_vtable): Reorganize. Don't create a
20795 new vtable under the new ABI.
20796 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
20797 computing the size.
20798 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
20799 the initializing elements.
20800 (initialize_vtable): New function.
20801 (dfs_finish_vtbls): Use it.
20802 (dfs_accumulate_vtbl_inits): New function.
20803 (finish_vtbls): Merge primary and secondary vtables under the new
20805 (finish_struct_1): Remove redundant call to layout_vtable_decl.
20806 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
20809 * class.c (build_vtable): New function, split out from ...
20810 (get_vtable_decl): ... here, and ...
20811 (build_secondary_vtable): ... here.
20813 * pt.c (tsubst_decl): Fix formatting.
20815 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20817 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
20818 (avoid_overlap, build_base_field): Likewise.
20819 (build_base_field, build_base_fields, is_empty_class):
20820 Test DECL_SIZE with integer_zero.
20821 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
20822 * cp-tree.h (struct lang_type): New field size_unit.
20823 (CLASSTYPE_SIZE_UNIT): New macro.
20824 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
20825 (cp_finish_decl): Delete -Wlarger-than processing.
20826 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
20827 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
20828 * tree.c (make_binfo): binfo vector is one entry longer.
20829 (walk_tree): Walk DECL_SIZE_UNIT.
20831 2000-02-19 Mark Mitchell <mark@codesourcery.com>
20833 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
20835 (build_vtable_entry): Don't assume all vtable entries are
20837 (build_vtbl_initializer): Adjust accordingly.
20838 (get_vtable_decl): Fix formatting.
20840 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
20842 * semantics.c (deferred_type_access_control): Walk the entire
20844 (save_type_access_control): Rename from
20845 initial_deferred_type_access_control. Just remember the value.
20846 (decl_type_access_control): New fn.
20847 (begin_function_definition): Use deferred_type_access_control, after
20848 we've started the function. Set type_lookups to error_mark_node.
20849 * parse.y (frob_specs, fn.def1): Adjust.
20850 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
20851 (parse_end_decl, parse_bitfield0, parse_method): New fns.
20852 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
20853 (after_type_component_declarator0): Likewise.
20854 (after_type_component_declarator): Likewise.
20855 (notype_component_declarator): Likewise.
20856 * cp-tree.h: Adjust.
20858 * decl.c (redeclaration_error_message): Allow redeclaration of
20859 namespace-scope decls.
20861 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
20863 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
20865 2000-02-17 Mark Mitchell <mark@codesourcery.com>
20867 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
20868 * decl2.c (grokclassfn): Likewise.
20870 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
20872 * decl2.c (lang_decode_option): Don't set default message length
20874 * lex.c (lang_init_options): Set it here.
20876 2000-02-16 Mark Mitchell <mark@codesourcery.com>
20878 Make DECL_CONTEXT mean the class in which a member function was
20879 declared, even for a virtual function.
20880 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
20881 (DECL_FRIEND_CONTEXT): New macro.
20882 (DECL_REAL_CONTEXT): Remove.
20883 (SET_DECL_FRIEND_CONTEXT): Likewise.
20884 (DECL_VIRTUAL_CONTEXT): Adjust.
20885 (DECL_CLASS_SCOPE_P): Use TYPE_P.
20886 (add_friends): Remove.
20887 (hack_decl_function_context): Likewise.
20888 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
20890 (build_over_call): Fix indentation. Use DECL_CONTEXT
20891 instead of DECL_CLASS_CONTEXT.
20892 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
20893 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
20894 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20895 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
20896 (build_base_field): Likewise.
20897 (finish_struct_1): Likewise.
20898 (build_self_reference): Likewise.
20899 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
20901 (pushtag): Use decl_function_context, not
20902 hack_decl_function_context.
20903 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20904 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
20905 (pushdecl): Remove bogus code.
20906 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
20907 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20908 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20909 Use decl_function_context, nothack_decl_function_context.
20910 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
20911 (grokdeclarator): Likewise. Use decl_function_context, not
20912 hack_decl_function_context.
20913 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
20914 (start_function): Use DECL_FRIEND_CONTEXT, not
20915 DECL_CLASS_CONTEXT. Use decl_function_context, not
20916 hack_decl_function_context.
20917 (finish_function): Use decl_function_context, not
20918 hack_decl_function_context.
20919 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
20920 DECL_CLASS_CONTEXT.
20921 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
20922 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
20923 (grokfield): Likewise.
20924 (finish_builtin_type): Likewise.
20925 (finish_vtable_vardec): Use decl_function_context, not
20926 hack_decl_function_context.
20927 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20928 (start_static_initialization_or_destruction): Likewise.
20929 (finish_static_initialization_or_destruction): Likewise.
20930 (mark_used): Adjust logic for deciding when to synthesize methods.
20931 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
20933 * error.c (dump_function_decl): Use DECL_CONTEXT, not
20934 DECL_CLASS_CONTEXT.
20935 * friend.c (is_friend): Likewise.
20936 (add_friends): Remove.
20937 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
20938 * lex.c (begin_definition_of_inclass_inline): Use
20939 decl_function_context, not hack_decl_function_context.
20940 (process_next_inline): Likewise.
20941 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20942 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
20943 DECL_CLASSS_CONTEXT.
20944 (hack_identifier): Likewise.
20945 (synthesize_method): Use decl_function_context, not
20946 hack_decl_function_context.
20947 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
20949 (is_member_template): Use decl_function_context, not
20950 hack_decl_function_context. Use DECL_CONTEXT, not
20951 DECL_CLASS_CONTEXT.
20952 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
20953 DECL_CLASS_CONTEXT.
20954 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
20956 (push_template_decl_real): Likewise.
20957 (instantiate_class_template): Don't call add_friends.
20958 (tsubst_default_argument): Use DECL_CONTEXT, not
20960 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
20961 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20962 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
20963 DECL_CLASS_CONTEXT.
20964 * repo.c (repo_inline_used): Likewise.
20965 * search.c (current_scope): Adjust for new _CONTEXT macros.
20966 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
20968 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20969 (lookup_fnfields_here):Likewise.
20970 (check_final_overrider): Likewise.
20971 (init_vbase_pointers): Likewise.
20972 (virtual_context): Likewise.
20973 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
20974 (expand_body): Use decl_function_context, not
20975 hack_decl_function_context.
20976 * tree.c (hack_decl_function_context): Remove.
20977 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
20978 DECL_CLASS_CONTEXT.
20979 * typeck2.c (error_not_base_type): Likewise.
20981 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
20983 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
20985 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20987 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
20989 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
20991 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
20993 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
20995 * decl2.c (lang_decode_option): Enable automatic line wrapping.
20997 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
20999 * parse.y (frob_specs): Split out...
21000 (parse_decl): From here.
21001 (fn.def2): Call initial_deferred_type_access_control.
21002 (after_type_component_declarator0): Call frob_specs.
21003 (notype_component_declarator0): Likewise.
21004 * search.c (friend_accessible_p): Nested classes are friends of their
21007 2000-02-10 Mark Mitchell <mark@codesourcery.com>
21009 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
21010 used to create an implicit temporary.
21012 * class.c (dfs_modify_vtables): Tweak calculation of functions to
21015 2000-02-08 Nathan Sidwell <nathan@acm.org>
21017 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
21018 strip array element qualifiers too.
21020 2000-02-07 Mark Mitchell <mark@codesourcery.com>
21022 * decl.c (store_parm_decls): Don't build cleanups for parameters
21023 while processing_template_decl.
21025 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
21027 * cp-tree.h (struct saved_scope): Add incomplete field.
21028 (namespace_scope_incomplete): New macro.
21029 * decl.c (pushdecl): Use it.
21030 (hack_incomplete_structures): Use it. See through artificial
21032 (mark_saved_scope): Mark it.
21034 Implement access control for nested types.
21035 * search.c (type_access_control): New fn.
21036 (accessible_p): Now we do perform access control for types.
21037 * semantics.c (deferred_type_access_control): New fn.
21038 (initial_deferred_type_access_control): New fn.
21039 (begin_function_definition): Call it. Add lookups parm.
21040 * decl.c (struct binding_level): Add this_class field.
21041 (pushlevel_class): Set it.
21042 (mark_binding_level): Mark it.
21043 (lookup_name_real): Use it. Call type_access_control.
21044 (mark_saved_scope): Mark lookups field.
21045 * cp-tree.h (flagged_type_tree): Add lookups field.
21046 (struct saved_scope): Add lookups field.
21047 (type_lookups): New macro.
21048 * parse.y (declmods): Now <ftype>.
21049 (parse_decl): Add lookups parm. Call
21050 initial_deferred_type_access_control.
21051 (lang_extdef): Clear type_lookups.
21052 (typed_declspecs, declmods, typespec): Set lookups field.
21053 (initdcl): Call deferred_type_access_control.
21054 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
21055 component_decl_1, named_parm): Adjust.
21056 * friend.c (is_friend): Nested classes are friends of their
21059 * class.c (currently_open_derived_class): New fn.
21060 * method.c (hack_identifier): Use it.
21062 * lex.c (do_identifier): Remove obsolete code.
21064 * parse.y (typed_typespecs): Propagate new_type_flag properly.
21066 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
21068 * tinfo.h: Remove apostrophes from C++ comment (xgettext
21069 thinks this file is plain C).
21071 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21073 * Makefile.in (call.o): Depend on $(EXPR_H).
21075 * call.c: Include "expr.h".
21077 * class.c (dump_class_hierarchy): Add prototype.
21079 * search.c (dfs_get_pure_virtuals): Likewise.
21081 2000-02-1 Ulrich Drepper <drepper@redhat.com>
21083 * parse.y (simple_stmt): Allow :: token in asm parameter list.
21084 * parse.c: Rebuilt.
21086 2000-01-31 Jim Wilson <wilson@cygnus.com>
21088 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
21089 Store it in DECL_FCONTEXT.
21090 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
21092 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
21094 * tinfo.h (old abi): #include "tconfig.h".
21095 * tinfo.cc (convert_to_base): Move into old abi section.
21097 2000-01-31 Mark Mitchell <mark@codesourcery.com>
21099 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
21100 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
21101 (BINFO_PRIMARY_BINFO): New macro.
21102 (BF_DELTA): Rename to ...
21103 (BV_DELTA): ... this.
21104 (BF_VCALL_INDEX): Rename to ...
21105 (BV_VCALL_INDEX): ... this.
21106 (BF_FN): Rename to ...
21108 * class.c (build_vbase_path): Adjust for changes to reverse_path.
21109 (set_rtti_entry): Rename BF_ macros to BV_ variants.
21110 (modify_vtable_entry): Simplify.
21111 (add_virtual_function): Rename BF_ macros to BV_ variants.
21112 (build_vtable_initializer): Likewise.
21113 (get_class_offset_1): Remove.
21114 (dfs_get_class_offset): Likewise.
21115 (get_class_offset): Likewise.
21116 (dfs_find_final_overrider): New function.
21117 (find_final_overrider): Likewise.
21118 (modify_one_vtable): Remove.
21119 (dfs_find_base): New function.
21120 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
21121 find_final_overrider.
21122 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
21124 (dfs_fixup_vtable_deltas): Remove.
21125 (override_one_vtable): Remove.
21126 (merge_overrides): Likewise.
21127 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
21128 unreal chilren of virtual bases.
21129 (finish_struct_1): Don't use merge_overrides. Don't use
21130 dfs_fixup_vtable_deltas.
21131 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
21134 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
21135 Jason Merrill <jason@yorick.cygnus.com>
21137 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
21139 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
21141 * exception.cc (__throw_bad_typeid): Add missing std::.
21143 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21145 * cp-tree.h (make_thunk): PROTO -> PARAMS.
21147 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
21149 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
21151 Runtime support for new-abi rtti.
21152 * inc/typeinfo (type_info::operator!=): Define in class.
21153 (type_info::before, type_info::name, type_info::operator==,
21154 type_info::operator!=): Define new ABI implementations.
21155 (type_info::is_pointer_p, type_info::is_function_p): Declare
21156 new virtual functions.
21157 (type_info::do_catch, type_info::do_upcast): Likewise.
21159 * tinfo.h (__base_class_info): Define new class.
21160 (__class_type_info): Likewise.
21161 (__si_class_type_info): Likewise.
21162 (__vmi_class_type_info): Likewise.
21163 (__dynamic_cast): Prototype.
21165 * tinfo.cc: Conditionalize old and new rtti mechanisms.
21166 (type_info::is_pointer_p): Define new function.
21167 (type_info::is_function_p): Likewise.
21168 (type_info::do_catch): Likewise.
21169 (type_info::do_upcast): Likewise.
21170 (vtable_prefix): New structure for vtable access.
21171 (adjust_pointer): Define new template function.
21172 (contained_p, public_p, virtual_p, contained_public_p,
21173 contained_nonpublic_p, contained_nonvirtual_p): Define new
21175 (nonvirtual_base_type): New local variable.
21176 (__class_type_info::~__class_type_info): Define.
21177 (__si_class_type_info::~__si_class_type_info): Likewise.
21178 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
21179 (__class_type_info::do_catch): Define new function.
21180 (__class_type_info::do_upcast): Likewise.
21181 (__class_type_info::find_public_src): Likewise.
21182 (__class_type_info::do_find_public_src): Likewise.
21183 (__si_class_type_info::do_find_public_src): Likewise.
21184 (__vmi_class_type_info::do_find_public_src): Likewise.
21185 (__class_type_info::do_dyncast): Likewise.
21186 (__si_class_type_info::do_dyncast): Likewise.
21187 (__vmi_class_type_info::do_dyncast): Likewise.
21188 (__class_type_info::do_upcast): Likewise.
21189 (__si_class_type_info::do_upcast): Likewise.
21190 (__vmi_class_type_info::do_upcast): Likewise.
21191 (__dynamic_cast): Likewise.
21193 * tinfo2.cc (__fundamental_type_info): Define new class.
21194 (__pointer_type_info): Likewise.
21195 (__reference_type_info): Likewise.
21196 (__array_type_info): Likewise.
21197 (__function_type_info): Likewise.
21198 (__enum_type_info): Likewise.
21199 (__ptr_to_member_type_info): Likewise.
21200 (__fundamental_type_info::~__fundamental_type_info): Define.
21201 (__pointer_type_info::~__pointer_type_info): Likewise.
21202 (__reference_type_info::~__reference_type_info): Likewise.
21203 (__array_type_info::~__array_type_info): Likewise.
21204 (__function_type_info::~__function_type_info): Likewise.
21205 (__enum_type_info::~__enum_type_info): Likewise.
21206 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
21207 (__pointer_type_info::do_catch): Define new function.
21208 (__ptr_to_member_type_info::do_catch): Define new function.
21210 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
21211 (__is_pointer): Likewise.
21213 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
21215 2000-01-30 Mark Mitchell <mark@codesourcery.com>
21217 * cp/class.c (build_vtable): Rename to build_primary_vtable.
21218 (prepare_fresh_vtable): Rename to build_secondary_vtable.
21219 (make_new_vtable): New function.
21220 (modify_vtable_entry): Handle generation of new vtables correctly.
21221 (modify_one_vtable): Remove unused parameter.
21222 (dfs_fixup_vtable_deltas): Likewise.
21223 (override_one_vtable): Use build_secondary_vtable.
21224 (finish_struct_1): Use build_primary_vtable and
21225 build_secondary_vtable.
21227 2000-01-28 Ulrich Drepper <drepper@redhat.com>
21229 * cp/decl.c: Adjust variable names, comments, help strings.
21231 2000-01-29 Nathan Sidwell <nathan@acm.org>
21233 * new2.cc (operator delete[]): Use operator delete, don't assume
21236 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
21238 * class.c (build_vtbl_initializer): Add argument to
21239 build_vtable_entry call.
21241 2000-01-27 Mark Mitchell <mark@codesourcery.com>
21243 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
21244 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
21245 (BF_DELTA): New macro.
21246 (BF_VCALL_INDEX): Likewise.
21248 (THUNK_VCALL_OFFSET): Likewise.
21249 (make_thunk): Change prototype.
21250 * class.c (build_vtable_entry): Integrate
21251 build_vtable_entry_for_fn. Handle vcall indices.
21252 (build_vtable_entry_for_fn): Remove.
21253 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
21254 BF_VCALL_INDEX, BF_FN.
21255 (modify_vtable_entry): Integrate common code from
21256 modify_one_vtable and dfs_fixup_vtable_deltas.
21257 (add_virtual_function): Set BF_VCALL_INDEX.
21258 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
21260 (modify_one_vtable): Simplify.
21261 (dfs_fixup_vtable_deltas): Likewise.
21262 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
21263 * method.c (make_thunk): Handle vcall indices.
21265 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
21267 Compiler side new abi rtti (not enabled).
21268 * cp-tree.h (new_abi_rtti_p): New macro.
21269 (emit_support_tinfos): Prototype new function.
21270 (tinfo_decl_p): Likewise.
21271 (emit_tinfo_decl): Likwise.
21272 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
21274 (doing_runtime): New local static.
21275 (init_rtti_processing): Add new-abi initializer.
21276 (get_tinfo_decl): Add new-abi logic.
21277 (tinfo_from_decl): Likewise.
21278 (build_dynamic_cast_1): Likewise.
21279 (qualifier_flags): New static function.
21280 (tinfo_base_init): Likewise.
21281 (generic_initializer): Likewise.
21282 (ptr_ref_initializer): Likewise.
21283 (ptmd_initializer): Likewise.
21284 (class_hint_flags): Likewise.
21285 (class_initializer): Likewise.
21286 (synthesize_tinfo_var): Likewise.
21287 (create_real_tinfo_var): Likewise.
21288 (create_pseudo_type_info): Likewise.
21289 (get_vmi_pseudo_type_info): Likewise.
21290 (create_tinfo_types): Likewise.
21291 (emit_support_tinfos): New global function.
21292 (tinfo_decl_p): New global predicate.
21293 (emit_tinfo_decl): New global function.
21294 * class.c (set_rtti_entry): Generalize for old and new rtti.
21295 (build_vtbl_initializer): Likewise.
21296 * decl2.c (finish_file): Likewise.
21298 2000-01-27 Jim Wilson <wilson@cygnus.com>
21300 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
21301 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
21303 2000-01-27 Mike Stump <mrs@wrs.com>
21305 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
21308 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
21310 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
21312 2000-01-26 J"orn Rennecke <amylaar@cygnus.co.uk>
21314 * optimize.c (calls_setjmp_r): Supply new argument
21315 to special_function_p.
21317 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21319 * call.c: PROTO -> PARAMS.
21320 * class.c: Likewise.
21321 * cp-tree.h: Likewise.
21323 * decl.c: Likewise.
21324 * decl.h: Likewise.
21325 * decl2.c: Likewise.
21326 * dump.c: Likewise.
21327 * errfn.c: Likewise.
21328 * error.c: Likewise.
21329 * except.c: Likewise.
21330 * expr.c: Likewise.
21331 * init.c: Likewise.
21332 * input.c: Likewise.
21335 * method.c: Likewise.
21336 * optimize.c: Likewise.
21337 * parse.y: Likewise.
21339 * repo.c: Likewise.
21340 * rtti.c: Likewise.
21341 * search.c: Likewise.
21342 * semantics.c: Likewise.
21343 * spew.c: Likewise.
21344 * tree.c: Likewise.
21345 * typeck.c: Likewise.
21346 * typeck2.c: Likewise.
21347 * xref.c: Likewise.
21349 2000-01-25 Richard Henderson <rth@cygnus.com>
21351 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
21353 2000-01-25 Mark Mitchell <mark@codesourcery.com>
21355 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
21356 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
21357 (struct vcall_offset_data_s): New type.
21358 (dfs_vcall_offset_queue_p): New function.
21359 (dfs_build_vcall_offset_vtbl_entries): Likewise.
21360 (build_vcall_offset_vtbl_entries): Likewise.
21361 (layout_vtable_decl): Likewise.
21362 (num_vfun_entries): Likewise.
21363 (num_extra_vtbl_entries): Add the entries for vcall offsets.
21364 (build_vtbl_initializer): Likewise.
21365 (dfs_finish_vtabls): Use layout_vtable_decl.
21366 (modify_one_vtables): Always duplicate vtables under the new ABI.
21367 (finish_struct_1): Use layout_vtable_decl.
21369 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21371 * decl.c (member_function_or_else): Change third arg from a format
21372 specifier to an `enum overload_flags'. Callers changed.
21374 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
21376 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
21377 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
21378 build_const_cast, get_delta_difference, check_return_expr): Avoid
21379 ANSI string concatenation usage.
21381 2000-01-24 Mark Mitchell <mark@codesourcery.com>
21383 * class.c (layout_class_type): Put the fields required to make a
21384 class non-empty at the end, not the beginning, of the TYPE_FIELDs
21387 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
21389 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
21392 * decl2.c (mark_used): Do instantiate inlines that have been
21393 explicitly instantiated.
21395 2000-01-24 Richard Henderson <rth@cygnus.com>
21397 * call.c (build_over_call): Use expand_tree_builtin.
21398 * typeck.c (build_function_call_real): Likewise.
21399 (build_binary_op_nodefault): Handle unordered compares.
21401 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
21403 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
21404 cp_tree_index values.
21405 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
21406 New global node #defines for them.
21407 * rtti.c (call_void_fn): Replace with ...
21408 (build_runtime_decl): ... new static function.
21409 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
21410 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
21411 (build_dynamic_cast_1): Always produce correctly typed result.
21412 Explicitly produce type_info addresses. Use dynamic_cast_node.
21413 * exception.cc (__throw_bad_cast): Return `void *'.
21414 (__throw_bad_typeid): Return `const type_info &'.
21416 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
21418 * cp-tree.h (get_vtable_decl): Prototype new function.
21419 * class.c (get_vtable_decl): New function. Broken out from ...
21420 (build_vtable): ... here. Use it.
21421 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
21422 by get_vtable_decl.
21424 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
21426 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
21427 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
21428 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
21429 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
21430 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
21431 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
21432 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
21433 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
21434 (CPTI_TINFO_VAR_ID): New enumeration.
21435 (__tp_desc_type_node, __access_mode_type_node,
21436 __bltn_desc_type_node, __user_desc_type_node,
21437 __class_desc_type_node, __ptr_desc_type_node,
21438 __attr_desc_type_node, __func_desc_type_node,
21439 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
21440 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
21441 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
21442 enum_desc_type_node, class_desc_type_node,
21443 si_class_desc_type_node, vmi_class_desc_type_node,
21444 ptmd_desc_type_node, base_desc_type_node): New #defines.
21445 (tinfo_fn_id, tinfo_fn_type): Rename to ...
21446 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
21447 (tinfo_var_id): New enumeration.
21448 (DECL_TINFO_FN_P): Augment comment.
21449 * decl.c (cp_global_trees): Adjust documentation.
21450 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
21451 tinfo_decl_type and tinfo_var_id.
21452 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
21453 (build_typeid): Remove unused variable.
21454 (get_tinfo_var): Use tinfo_var_id.
21455 (tinfo_name): New static function.
21456 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
21457 (tinfo_from_decl): Likewise.
21458 (get_base_offset): New static function, broken out of
21460 (expand_si_desc): Use tinfo_name.
21461 (expand_class_desc): Likewise. Lose local static variable.
21462 Use base_desc_type_node. Use get_base_offset.
21463 (expand_ptr_desc): Use tinfo_name.
21464 (expand_attr_desc): Likewise.
21465 (expand_generic_desc): Likewise.
21467 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
21468 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
21470 2000-01-23 Mark Mitchell <mark@codesourcery.com>
21472 * cp-tree.h (__eprintf): Remove declaration.
21473 * tree.c (__eprintf): Remove definition.
21475 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
21476 Mark Mitchell <mark@codesourcery.com>
21478 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
21479 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
21481 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
21483 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
21485 2000-01-23 Mark Mitchell <mark@codesourcery.com>
21487 * cp-tree.h (register_dtor_fn): New function.
21488 * decl.c (destroy_local_static): Rename to ...
21489 (register_dtor_fn): ... this. Give it external linkage.
21490 (expand_static_init): Use it.
21491 * decl2.c (do_static_initialization): Likewise, if using
21493 (do_static_destruction): Check that __cxa_atexit is not in use.
21494 (finish_file): Don't call do_static_destruction if using
21497 * typeck.c (convert_arguments): Restore two-message error
21500 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
21502 Remap dynamic cast hint values to be consistent across ABIs.
21503 * search.c (dynamic_cast_base_recurse): Remap generated value.
21504 (get_dynamic_cast_base_type): Adjust documentation.
21505 * tinfo.h (__user_type_info::dyncast): Likewise.
21506 (__user_type_info::find_public_subobj): Remap BOFF meaning.
21507 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
21508 (__class_type_info::do_dyncast): Likewise.
21509 (__class_type_info::do_find_public_subobj): Likewise.
21510 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
21512 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
21514 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
21516 * typeck2.c (incomplete_type_error): Restore previous
21517 cp_error and cp_error_at call sequence.
21519 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
21521 * class.c (dump_class_hierarchy): Make format agree with argument;
21522 cast pointer to unsigned long and print with %lx.
21524 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
21526 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
21528 * typeck.c (composite_pointer_type, common_type,
21529 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
21530 build_function_call_real, convert_arguments,
21531 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
21532 build_unary_op, mark_addressable, build_compound_expr,
21533 build_static_cast, build_reinterpret_cast, build_const_cast,
21534 build_c_cast, build_modify_expr, get_delta_difference,
21535 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
21536 'ISO C++'. Fusion consecutive calls to diagnostic message routines
21538 * typeck2.c (readonly_error, abstract_virtuals_error,
21539 process_init_constructor, check_for_new_type): Likewise.
21541 2000-01-19 Mark Mitchell <mark@codesourcery.com>
21543 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
21546 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
21548 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
21549 (build_x_typeid): Likewise.
21550 (get_tinfo_fn): Likewise.
21551 (get_tinfo_fn_unused): Rename to ...
21552 (get_tinfo_decl): ... here.
21553 * rtti.c (build_headof): Replace logic error with assertion.
21554 (get_tinfo_fn_dynamic): Rename to ...
21555 (get_tinfo_decl_dynamic): ... here. Make static. Use
21556 complete_type_or_else.
21557 (build_x_typeid): Move into ...
21558 (build_typeid): ... here. Adjust call to
21559 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
21560 throw_bad_typeid expression.
21561 (get_tinfo_fn_unused): Rename to ...
21562 (get_tinfo_decl): ... here. Adjust comment.
21563 (get_tinfo_fn): Delete.
21564 (tinfo_from_decl): New static function.
21565 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
21566 (get_typeid): Use complete_type_or_else.
21567 (build_dynamic_cast_1): Adjust calls to
21568 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
21569 * parse.y (primary): Adjust call to build_typeid.
21570 * except.c (build_eh_type_type_ref): Adjust call to
21571 get_tinfo_decl. Mark as used.
21572 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
21573 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
21574 * parse.c: Regenerated.
21576 2000-01-17 Mark Mitchell <mark@codesourcery.com>
21578 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
21579 calling convention.
21580 (resolves_to_fixed_type_p): Document calling convention.
21581 * rtti.c (build_x_typeid): Initialize NONNULL.
21583 * cp-tree.h (build_shared_int_cst): New function.
21584 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
21585 * class.c (modify_vtable_entry): Likewise.
21586 (add_virtual_function): Split out code to generated shared
21587 INTEGER_CSTs to build_share_int_cst.
21588 (modify_all_vtables): Handle all the overridden functions here.
21589 Add overridden functions from non-primary virtual bases to the
21591 (finish_struct_1): Adjust call to modify_all_vtables. Add
21592 overridden functions from non-primary bases to the vtable.
21593 * tree.c (build_shared_int_cst): New function.
21595 * cp-tree.h (scratchalloc): Remove.
21596 (build_scratch_list): Likewise.
21597 * call.c (convert_class_to_reference): Replace build_scratch_list
21598 and build_expr_list with build_tree_list.
21599 (add_candidate): Replace scratchalloc with expralloc. Note memory
21601 (build_user_type_conversion_1): Replace build_scratch_list
21602 and build_expr_list with build_tree_list.
21603 (build_new_op): Likewise.
21604 (build_op_delete_call): Likewise.
21605 (convert_like): Likewise.
21606 * cvt.c (ocp_convert): Likewise.
21607 * decl.c (start_decl): Likewise.
21608 (start_function): Likewise.
21609 (finish_destructor_body): Likewise.
21610 (maybe_build_cleanup_1): Likewise.
21611 * decl2.c (reparse_decl_as_expr): Likewise.
21612 * init.c (perform_member_init): Likewise.
21613 (expand_cleanup_for_base): Likewise.
21614 (build_builtin_delete_call): Likewise.
21615 (build_new_1): Likewise.
21616 (build_delete): Likewise.
21617 * method.c (do_build_assign_ref): Likewise.
21618 * parse.y (already_scoped_stmt): Likewise.
21619 (nontrivial_exprlist): Likewise.
21620 (net_initializer): Likewise.
21621 (initlist): Likewise.
21622 * parse.c: Regenerated.
21623 * rtti.c (build_x_typeid): Likewise.
21624 (build_dynamic_cast_1): Likewise.
21625 * typeck.c (build_x_compound_expr): Likewise.
21626 (build_static_cast): Likewise.
21627 (build_modify_expr): Likewise.
21629 * cp-tree.h (DECL_VINDEX): Add documentation.
21630 * class.c (build_vtable_entry): Likewise.
21631 (start_vtable): Add comment.
21632 (add_virtual_function): Replace pending_hard_virtuals with
21633 overridden_virtuals and pending_virtuals with new_virtuals.
21634 Replace redundant assignments with assertions.
21635 (check_for_override): Add comment.
21636 (check_bases_and_members): Replace pending_hard_virtuals with
21637 overridden_virtuals and pending_virtuals with new_virtuals.
21638 (create_vtbl_ptr): Likewise.
21639 (layout_class_type): Likewise.
21640 (finish_struct_1): Likewise. Add comments.
21642 2000-01-16 Mark Mitchell <mark@codesourcery.com>
21644 * class.c (finish_struct_1): Replace redundant code with
21647 * cp-tree.h (flag_new_abi): Move.
21648 (flag_use_cxa_atexit): Likewise.
21649 (flag_honor_std): Likewise.
21650 (flag_rtti): Likewise.
21651 (vbase_offsets_in_vtable_p): Define.
21652 (vptrs_present_everywhere_p): Likewise.
21653 (TYPE_CONTAINS_VPTR_P): Likewise.
21654 (dfs_walk_real): Declare.
21655 * class.c (build_vbase_pointer_fields): Check
21656 vbase_offsets_in_vtable_p.
21657 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
21659 (build_vbase_offset_vtbl_entries): Simplify.
21660 (build_vbase_offset_vtbl_entries): Adjust.
21661 (build_vbase_pointer): Add ability to look up vbase offsets in
21663 (start_vtable): New function.
21664 (add_virtual_function): Use it.
21665 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
21666 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
21667 (build_vtbl_initializer): Take the type of the complete object as
21668 input. Use it to correctly calculate vbase offsets.
21669 (dfs_finish_vtbls): Pass the complete type to
21670 build_vtbl_initializer.
21671 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
21672 (create_vtable_ptr): Create a vtable even if there are no
21673 new virtual functions, under the new ABI.
21674 (finish_struct_1): Likewise.
21675 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
21676 * decl.c (exapnd_static_init): Remove call to
21677 preserve_initializer.
21678 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
21680 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
21681 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
21682 (construct_virtual_bases): Don't initialize virtual base pointers
21684 (build_aggr_init): Clean up comment.
21685 (expand_aggr_init_1): Likewise.
21686 * rtti.c (expand_class_desc): Store the virtual function table
21687 index where the vbase offset lives in the offset field.
21688 * search.c (dfs_walk_real): Make it global.
21689 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
21690 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
21692 * tinfo.h (USItype): Make it signed under the new ABI.
21693 * tinfo.cc (convert_to_base): New function. Encapsulate base
21694 conversion logic here.
21695 (__class_type_info::do_upcast): Use it.
21696 (__class_type_info::do_dyncast): Likewise.
21697 (__class_type_info::do_find_public_subobj): Likewise.
21699 * init.c (construct_virtual_bases): Don't look up the addresses of
21700 virtual bases at run-time.
21702 * class.c (build_vbase_pointer): Relocate.
21703 (build_vbase_pointer_fields): Likewise.
21704 (dfs_build_vbase_offset_vtbl_entries): Likewise.
21705 (build_vbase_offset_vtbl_entries): Likewise.
21707 * decl.c (init_decl_processing): Complain if -fnew-abi
21708 -fno-vtable-thunks is used.
21710 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
21713 2000-01-15 Mark Mitchell <mark@codesourcery.com>
21715 * cp-tree.h (num_extra_vtbl_entries): New function.
21716 (size_extra_vtbl_entries): Likewise.
21717 (dfs_vtable_path_unmark): Likewise.
21718 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
21719 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
21720 * class.c (num_extra_vtbl_entries): New function.
21721 (size_extra_vtbl_entries): Likewise.
21722 (dfs_build_vbase_offset_vtbl_entries): New function.
21723 (build_vbase_offset_vtbl_entries): Likewise.
21724 (build_vtbl_initializer): Use it.
21725 (finish_struct_1): Adjust vtable sizes (using
21726 num_extra_vtbl_entries).
21727 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
21728 THUNK_DECL is non-NULL before expanding it.
21729 * init.c (expand_virtual_init): Adjust the vtable pointer by
21730 size_extra_vtbl_entries before storing it.
21731 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
21732 Handle TREE_LIST parameters here, not in the dfs_* functions.
21733 (dfs_unmarked_real_bases_queue_p): Adjust.
21734 (dfs_marked_real_bases_queue_p): Likewise.
21735 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
21736 (dfs_vtable_path_marked_real_bases_queue_p): New function.
21737 (dfs_vtable_path_unmark): Likewise.
21739 2000-01-14 Mark Mitchell <mark@codesourcery.com>
21741 * optimize.c (copy_body_r): Clear the operand three of a
21742 TARGET_EXPR when copying it.
21744 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
21746 * method.c (build_decl_overload_real): Check whether we are in ::
21747 before returning __builtin_new/delete.
21749 2000-01-13 Mark Mitchell <mark@codesourcery.com>
21751 * pt.c (tsubst_friend_function): Improve comment.
21752 (instantiate_decl): Avoid crashing when a "nested" function is
21753 instantiated from the top level.
21755 * dump.c (dqeueue_and_dump): Dump
21756 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
21758 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21760 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
21762 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
21764 * g++spec.c (lang_specific_driver): Add -fnew-abi if
21765 ENABLE_NEW_GXX_ABI defined.
21766 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
21767 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
21768 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
21770 2000-01-12 Mark Mitchell <mark@codesourcery.com>
21772 * decl.c (start_cleanup_fn): Call pushdecl.
21774 * call.c (convert_class_to_reference): Fix typos.
21775 (build_conditional_expr): Handle errors gracefully.
21776 * class.c (push_nested_class): Likewise.
21777 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
21778 (DECL_THIS_EXTERN): Use it.
21779 (DECL_THIS_STATIC): Likewise.
21780 * cvt.c (convert_to_void): Handle errors gracefully.
21781 (build_expr_type_conversion): Likewise.
21782 * decl.c (maybe_push_decl): Likewise.
21783 (start_decl_1): Likewise.
21784 (require_complete_types_for_parms): Likewise.
21785 * parse.y (structsp): Likewise.
21786 (base_class): Likewise.
21787 * parse.c: Regenerated.
21788 * pt.c (finish_member_template_decl): Likewise.
21789 * typeck.c (decay_conversion): Likewise.
21791 * cp-tree.h (dfs_skip_vbases): New function.
21792 (find_vbase_instance): Likewise.
21793 * class.c (determine_primary_base): Allow a nearly empty base to
21794 serve as a primary base class under the new ABI.
21795 (get_class_offset_1): Rename to ...
21796 (dfs_get_class_offset): ... this. Simplify. Don't issue error
21798 (get_class_offset): Use it. Issue error messages here.
21799 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
21800 find the right copies of virtual bases.
21801 (fixup_vtable_deltas1): Rename to ...
21802 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
21803 bases as primary bases.
21804 (fixup_vtable_deltas): Remove.
21805 (override_one_vtable): Handle virtual bases as primary bases.
21806 (merge_overrides): Likewise.
21807 (finish_struct_1): Likewise.
21808 (dump_class_hierarchy): Dump primary-ness of bases as well.
21809 * search.c (mark_primary_bases): Use a pre-order traversal to
21810 handle primary virtual bases.
21811 (dfs_skip_vbases): New fiunction.
21812 (expand_upcast_fixups): Adjust to handle primary virtual bases.
21813 (fixup_virtual_upcast_offsets): Likewise.
21814 (fixup_all_virtual_upcast_offsets): Likewise.
21815 (dfs_find_vbase_instances): New function.
21816 (find_vbase_instance): Likewise.
21818 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
21820 * lex.c (DIR_SEPARATOR): Delete macro.
21822 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
21824 * decl2.c (lang_decode_option): Handle automatic line wrapping
21827 2000-01-11 Mark Mitchell <mark@codesourcery.com>
21829 * friend.c (do_friend): Don't resolve scopes when processing
21830 template declarations, even if the qualifying scope doesn't
21831 involve template parameters.
21833 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
21835 * class.c (dfs_modify_vtables_queue_p): Remove.
21836 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
21837 and dfs_marked_real_bases_queue_p instead of
21838 dfs_modify_vtables_queue_p.
21840 * class.c (build_vbase_path): Simplify.
21841 (dfs_propagate_binfo_offsets): New function.
21842 (propagate_binfo_offsets): Use it.
21843 (remove_base_field): Simplify.
21844 (dfs_set_offset_for_vbases): Remove.
21845 (dfs_set_offset_for_shared_vbases): New function.
21846 (dfs_set_offset_for_unshared_vbases): Likewise.
21847 (layout_virtual_bases): Use them.
21848 (layout_basetypes): Don't call propagate_binfo_offsets.
21849 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
21852 * class.c (build_base_field): New function, split out from ...
21853 (build_base_fields): ... here. Use it. Allocate primary bases
21854 first, under the new ABI.
21855 (get_vtable_entry): Remove.
21856 (remove_base_field): New function, split out from ...
21857 (remove_base_fields): ... here. Adjust since primary bases come
21858 first under the new ABI.
21860 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
21861 (initialize_vtbl_ptrs): New function.
21862 (expand_indirect_vtbls_init): Change prototype.
21863 (convert_pointer_to_vbase): Declare.
21864 * init.c (expand_direct_vtbls_init): Remove.
21865 (dfs_initialize_vtbl_ptrs): New function.
21866 (initialize_vtbl_ptrs): Likewise.
21867 (emit_base_init): Use initialize_vtbl_ptrs.
21868 * search.c (convert_pointer_to_vbase): Make it global.
21869 (expand_indirect_vtbls_init): Remove vtable initialization code.
21870 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
21872 * class.c (dfs_finish_vtbls): New function.
21873 (finish_vtbls): Use it.
21874 (dump_class_hierarchy): New function.
21876 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
21877 (BINFO_VBASE_PRIMARY_P): New macro.
21878 (BINFO_VIRTUALS): Add to documentation.
21879 (SET_BINFO_PRIMARY_MARKED_P): Remove.
21880 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21881 (dfs_mark_primary_bases_queue_p): Likewise.
21882 (dfs_unmarked_real_bases_queue_p): New function.
21883 (dfs_marked_real_bases_queue_p): Likewise.
21884 * search.c (dfs_mark_primary_bases): Adjust.
21885 (mark_primary_bases): Likewise.
21886 (get_shared_vbase_if_not_primary): New function.
21887 (dfs_unmarked_real_bases_queue_p): Likewise.
21888 (dfs_marked_real_bases_queue_p): Likewise.
21889 (dfs_get_pure_virtuals): Simplify.
21890 (get_pure_virtuals): Likewise.
21892 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21894 * lex.c: Include tm_p.h.
21896 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
21898 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
21900 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
21902 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
21903 * pt.c (instantiate_decl): Defer comdat templates that might not be
21906 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
21907 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
21908 (finish_file): Likewise.
21910 * decl2.c (import_export_class): Undo 12/14 change.
21912 * error.c (dump_decl): operator new, not operatornew.
21914 * class.c (field_decl_cmp): A nontype is "greater" than a type.
21915 * search.c (lookup_field_1): Look for the last field with the
21918 2000-01-05 Nathan Sidwell <nathan@acm.org>
21920 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
21923 2000-01-05 Nathan Sidwell <nathan@acm.org>
21925 * typeck.c (build_static_cast): Don't strip target qualifiers
21926 when casting from a class.
21928 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21930 * class.c (warn_hidden): Initialize variable `fndecl'.
21932 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
21934 * decl.c (flag_isoc9x): New variable to be able to use code in
21935 c-common.c. For now always zero.
21937 2000-01-03 Mark Mitchell <mark@codesourcery.com>
21939 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
21940 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
21941 or unshare_base_binfos for virtual bases here.
21942 * search.c (dfs_get_vbase_types): Do it here.
21943 (get_vbase_types): Adjust.
21945 2000-01-02 Mark Mitchell <mark@codesourcery.com>
21947 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
21948 (BINFO_PRIMARY_MARKED_P): Use flag 5.
21949 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
21950 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21951 (unmark_primary_bases): Remove declaration.
21952 (unmarkedp): Declare.
21953 (dfs_vbase_unmark): Likewise.
21954 * class.c (determine_primary_base): Return immediately if there
21955 are no base classes. Call mark_primary_bases here.
21956 (modify_all_direct_vtables): Remove.
21957 (modify_all_indirect_vtables): Remove.
21958 (dfs_modify_vtables_queue_p): New function.
21959 (dfs_modify_vtables): New function.
21960 (modify_all_vtables): Use them.
21961 (build_base_fields): Build FIELD_DECLs for primary virtual base
21963 (create_vtable_ptr): Don't call determine_primary_base here.
21964 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
21965 (dfs_set_offset_for_vbases): ... this.
21966 (layout_virtual_bases): Use it.
21967 (layout_class_type): Call determine_primary_base here.
21968 * search.c (unmarkedp): Make it global.
21969 (shared_marked_p): Simplify.
21970 (shared_unmarked_p): Likewise.
21971 (dfs_primary_bases_queue_p): Remove.
21972 (dfs_unmark_primary_bases): Likewise.
21973 (unmark_primary_bases): Likewise.
21974 (mark_primary_bases): Simplify.
21975 (get_pure_virtuals): Don't call mark_primary_bases here.
21976 (dfs_vbase_unmark): New function.
21977 (get_vbase_types): Simplify.
21979 * class.c (struct base_info): Remove.
21980 (determine_primary_base): Take has_virtual_p rather than a
21981 base_info as input. Don't calculate max_has_virtual.
21982 (finish_struct_bits): Remove max_has_virtual argument.
21983 (create_vtable_ptr): Remove max_has_virtual_p argument.
21984 (layout_virtual_bases): Remove max argument.
21985 (layout_basetypes): Likewise.
21986 (layout_class_type): Remove max_has_virtual_p argument.
21987 (finish_struct_1): Remove max_has_virtual.
21989 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
21990 (layout_basetypes): Remove.
21991 * class.c (propagate_binfo_offsets): Moved here from tree.c.
21992 Update to handle primary virtual bases.
21993 (remove_base_fields): New function, split out from
21995 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
21996 (layout_virtual_bases): New function, split out from
21997 layout_basetypes. Update to handle primary virtual bases.
21998 (layout_basetypes): Moved here from tree.c. Use
21999 remove_base_fields and layout_virtual_bases.
22000 * search.c (dfs_mark_primary_bases_queue_p): New function.
22001 (mark_primary_bases): Use it.
22002 * tree.c (CEIL): Remove.
22003 (propagate_binfo_offsets): Remove.
22004 (layout_basetypes): Remove.
22006 2000-01-01 Mark Mitchell <mark@codesourcery.com>
22008 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
22009 (BINFO_PRIMARY_MARKED_P): New macro.
22010 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
22011 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22012 (mark_primary_bases): New function.
22013 (unmark_primary_bases): Likewise.
22014 * search.c (get_abstract_virtuals_1): Remove.
22015 (dfs_mark_primary_bases): New function.
22016 (mark_primary_bases): Likewise.
22017 (dfs_unmark_primary_bases): Likewise.
22018 (unmark_primary_bases): Likewise.
22019 (dfs_get_pure_virtuals): Likewise.
22021 2000-01-01 Mark Mitchell <mark@codesourcery.com>
22023 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
22024 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
22025 (modify_one_vtable): Adjust.
22026 (fixup_vtable_deltas1): Likewise.
22027 (override_one_vtable): Likewise.
22028 * search.c (get_abstract_virtuals_1): Likewise.
22029 (get_pure_virtuals): Likewise.
22030 (expand_upcast_fixups): Likewise.
22031 * tree.c (debug_binfo): Likewise.
22033 * class.c (build_vtable): Don't return a value. Don't rebuild
22034 vtables for bases that have already been handled.
22035 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
22036 already been handled.
22037 (modify_one_vtable): Adjust accordingly.
22038 (fixup_vtable_deltas1): Likewise.
22039 (finish_struct_1): Likewise.
22041 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
22043 * call.c (build_new_method_call): Also check destructors.