1 2003-05-01 Mark Mitchell <mark@codesourcery.com>
3 * decl2.c (comdat_linkage): Don't externalize explicit
6 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9 * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
12 2003-05-01 Steven Bosscher <steven@gcc.gnu.org>
14 * cp-tree.h (struct lang_id2): Remove. Move fields from here...
15 (struct lang_identifier): ... to here.
16 (LANG_ID_FIELD): Remove.
17 (SET_LANG_ID): Remove.
18 (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
19 (SET_IDENTIFIER_LABEL_VALUE): Likewise.
20 (IDENTIFIER_IMPLICIT_DECL): Likewise.
21 (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
22 (IDENTIFIER_ERROR_LOCUS): Likewise.
23 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
25 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
28 * pt.c (convert_template_argument): Correct diagnostic.
30 2003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
33 * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
35 2003-04-30 Garbiel Dos Reis <gcc@integrable-solutions.net>
37 * decl.c (check_previous_goto_1): Adjust prototype.
38 (check_previous_goto): Adjust use.
39 (check_switch_goto): Likewise.
41 (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
42 (struct named_label_use_list): Use location_t datatype.
44 2003-04-29 Mark Mitchell <mark@codesourcery.com>
47 * pt.c (mark_decl_instantiated): Defer all explicit instantiations
48 that have not yet been written out.
50 2003-04-29 Mark Mitchell <mark@codesourcery.com>
53 * class.c (layout_class_type): Mark overlong bitfields as having
54 the maximum size permitted by their type, after layout.
57 * error.c (dump_expr): Correctly handling of NEW_EXPR.4
59 2003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
61 * call.c (build_operator_new_call): Fix typo.
62 * lang-options.h: Likewise.
64 2003-04-29 Mark Mitchell <mark@codesourcery.com>
67 * cp-tree.h (lookup_field_1): Declare it.
68 * search.c (lookup_field_1): Make it public.
69 * decl.c (reshape_init): Handle designated initializers.
71 * decl.c (maybe_commonize_var): Further tweak support for systems
74 2003-04-27 Mark Mitchell <mark@codesourcery.com>
76 * decl.c (maybe_commonize_var): Fix thinko in last patch.
78 2003-04-27 Mark Mitchell <mark@codesourcery.com>
81 * method.c (use_thunk): Decrement immediate_size_expand.
84 * cp-tree.h (DECL_VAR_MARKED_P): New macro.
85 (DECL_MAYBE_TEMPLATE): Remove.
86 * class.c (fixed_type_or_null): Avoid infinite recursion.
88 * decl.c (maybe_commonize_var): Make the code match the comments.
89 * pt.c (instantiate_decl): Move call to import_export_decl.
91 2003-04-26 Mark Mitchell <mark@codesourcery.com>
93 * decl2.c (finish_file): Fix merge botch.
95 2003-04-25 Mark Mitchell <mark@codesourcery.com>
97 * decl2.c (finish_file): Don't call import_export_decl for
98 functions that are not defined.
99 (handle_class_head): Robustify.
100 * pt.c (instantiate_decl): Do not call cp_finish_decl for
101 variables that are not defined.
103 2003-04-24 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
105 * call.c (print_z_candidates): Fix off by one error.
107 2003-04-24 Nathan Sidwell <nathan@codesourcery.com>
110 * call.c (joust): Don't warn about conversion ops that are exact
111 or cv-conversions. Rearrange to avoid multiple type comparisons.
113 2003-04-23 Mark Mitchell <mark@codesourcery.com>
116 * call.c (build_cxx_call): Robustify.
118 2003-04-23 Neil Booth <neil@daikokuya.co.uk>
120 * Make-lang.in (lex.o): Remove mbchar.h.
121 * lex.c (MULTIBYTE_CHARS): Lose.
122 * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
125 2003-04-23 Mark Mitchell <mark@codesourcery.com>
128 * cp-tree.h (duplicate_tag_error): Remove.
129 * class.c (duplicate_tag_error): Remove.
130 * semantics.c (begin_class_definition): Return immediately for a
131 duplicate class definition.
134 * decl.c (grokdeclarator): Correct logic for "mutable" errors.
136 2003-04-22 Mark Mitchell <mark@codesourcery.com>
139 * search.c (lookup_fnfields_1): Handle empty slots in the method
143 * decl.c (check_elaborated_type_specifier): New function, split
145 (xref_tag): ... here. Use the new function in more places.
147 * rtti.c (throw_bad_typeid): Use build_cxx_call.
149 2003-04-21 Mark Mitchell <mark@codesourcery.com>
151 * call.c (build_over_call): Use build_cxx_call.
152 (build_cxx_call): New method, split out of build_over_call.
153 * cp-tree.h (language_function): Add can_throw.
154 (build_cxx_call): Declare it.
155 * decl.c (finish_function): If a function does not contain any
156 calls to functions that can throw an exception, indicate that
158 * decl2.c (mark_used): Do not defer the instantiation of
159 functions, if the current function does not throw.
160 * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
161 * pt.c (instantiate_decl): Make sure import_export_decl is called
162 before emitting things.
163 * rtti.c (throw_bad_cast): Use build_cxx_call.
164 (build_dynamic_cast_1): Likewise.
165 * typeck.c (build_function_call): Likewise.
167 2003-04-21 Nathan Sidwell <nathan@codesourcery.com>
170 * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
171 expressions. Reverts my 2002-08-08 patch.
173 * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
176 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
178 * cp/decl2.c (start_static_storage_duration_function): Take count
179 arg, don't check if it wraps round.
180 (generate_ctor_or_dtor_function): Add locus arg, use it.
181 (generate_ctor_and_dtor_functions_for_priority): Data arg is a
183 (finish_file): Set line numbers to past EOF for synthesized
186 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
189 * search.c (lookup_field_1): Final scan goes backwards for
190 types, forwards for non-types.
192 2003-04-17 Roger Sayle <roger@eyesopen.com>
195 * decl.c (duplicate_decls): Preserve "const", "noreturn" and
196 "nothrow" function attributes.
198 2003-04-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
201 * pt.c (type_dependent_expression_p): Handle array new.
203 2003-04-15 Mark Mitchell <mark@codesourcery.com>
206 * parser.c (cp_parser_primary_expression): Reorganize logic for
207 dealing with name lookup failures.
209 2003-04-15 Jason Merrill <jason@redhat.com>
211 * decl2.c (mark_used): Don't instantiate anything if
214 2003-04-14 Ziemowit Laski <zlaski@apple.com>
216 * tree.c (build_cplus_array_type_1): Do not call
217 uses_template_parms() on a NULL index_type.
219 2003-04-13 Roger Sayle <roger@eyesopen.com>
221 * decl.c (duplicate_decls): Preserve pure and malloc attributes.
223 2003-04-12 Mark Mitchell <mark@codesourcery.com>
226 * init.c (build_new_1): Reorganize.
228 2003-04-12 Zack Weinberg <zack@codesourcery.com>
230 * class.c (initialize_array)
231 * decl.c (reshape_init)
232 * decl2.c (build_expr_from_tree)
233 * init.c (build_zero_init)
234 * pt.c (tsubst_copy, tsubst_copy_and_build)
235 * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
236 (ptm_initializer, class_initializer, get_pseudo_ti_init)
237 * semantics.c (finish_compound_literal)
238 * typeck.c (build_ptrmemfunc1)
239 * typeck2.c (store_init_value, process_init_constructor)
240 (build_functional_cast): Use build_constructor.
242 2003-04-12 Zack Weinberg <zack@codesourcery.com>
244 * call.c (print_z_candidates): Use gcc_gettext_width, not
245 strlen, to determine how much padding to use.
247 2003-04-10 Zack Weinberg <zack@codesourcery.com>
249 * decl.c: Update all calls to shadow_warning.
251 2003-04-10 Mark Mitchell <mark@codesourcery.com>
253 * class.c (layout_class_type): Correct handling for overlong
254 bit-fields whose width is the same as an integer type.
256 2003-04-06 Zack Weinberg <zack@codesourcery.com>
258 * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
259 * cp-lang.c (cp_tree_size): New function.
260 (LANG_HOOKS_TREE_SIZE): Override.
262 * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
263 tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
264 (union lang_tree_node): Remove common and srcloc members.
265 (build_srcloc_here): Don't prototype.
266 * decl.c (cp_tree_node_structure): Kill SRCLOC case.
267 * pt.c (pending_templates): Correct comment.
268 * tree.c (build_srcloc, build_srcloc_here): Kill.
270 2003-04-06 Zack Weinberg <zack@codesourcery.com>
272 * call.c: Include intl.h.
273 (print_z_candidate): Always use inform; get rid of errfn
274 argument. Reorganize so that all the strings get picked up
275 by xgettext. Note obligation of caller to pass first argument
277 (print_z_candidates): Update to match. Indent second and
278 successive candidates by strlen() of translated message.
279 (joust): Restructure ambiguous-conversion pedwarn so that
280 translators see a complete sentence. Update calls to
283 * Make-lang.in (cp/call.o): Update dependencies.
285 2003-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
287 * decl.c (set_current_binding_level): Delete, revert last change.
288 (current_binding_level): Modify to allow it as as lvalue.
290 2003-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
292 * name-lookup.c (find_binding): Pass appropriate pointer type to
293 POP_TIMEVAR_AND_RETURN.
295 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
297 * Make-lang.in (cp-warn): Add $(STRICT_WARN).
298 * cp-tree.h: Don't insist on having GNUC.
300 2003-04-03 Jason Merrill <jason@redhat.com>
302 * cvt.c (ocp_convert): Only abort if we try to convert an object
303 of TREE_ADDRESSABLE type.
305 * class.c (build_vtable): Set DECL_ALIGN here.
306 (get_vtable_decl): Not here.
307 (layout_vtable_decl): Or here.
308 (create_vtable_ptr): Or here.
309 (layout_class_type): Or here.
310 (check_bitfield_decl): Don't mess with field alignment.
312 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
314 * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
315 DEF_ASSN_OPERATOR): Delete spurious semi-colon.
316 * rtti.c (dfs_class_hint_mark): Likewise.
318 * decl.c (push_local_name, push_class_level_binding,
319 maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
320 functions returning void.
321 * decl2.c (add_using_namespace): Likewise.
323 * decl.c (print_binding_level, print_other_binding_stack,
324 print_binding_stack): Cast argument of %p specifier to void*.
325 * ptree.c (cxx_print_decl): Likewise.
327 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
328 VAR_FUNCTION_OR_PARM_DECL_CHECK,
329 VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
330 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
331 LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
333 * decl.c (set_current_binding_level): New macro. Use throughout
334 when setting the current binding level.
336 * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
338 * method.c (mangling_flags): Likewise.
340 * cp-tree.h (lang_type_header): Add __extension__ and use
341 CHAR_BITFIELD for members.
343 2003-04-02 Geoffrey Keating <geoffk@apple.com>
346 * mangle.c: Include gt-cp-mangle.h.
347 (subst_identifiers): Mark with GTY.
348 * config-lang.in (gtfiles): Add cp/mangle.c.
349 * Make-lang.in: (gt-cp-mangle.h): New rule.
350 (cp/mangle.o): Depends on gt-cp-mangle.h.
352 2003-04-01 Andrew Pinski <pinskia@physics.uc.edu>
354 * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
355 after \$(srcdir)/cp/name-lookup.h.
356 * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
357 of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file.
358 * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
359 (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
361 2003-03-31 Jason Merrill <jason@redhat.com>
364 * class.c (check_field_decl): Don't set DECL_ALIGN.
366 2003-03-30 Mark Mitchell <mark@codesourcery.com>
369 * decl.c (grokdeclarator): Tidy, slightly.
370 * search.c (lookup_field_1): Add want_type parameter.
371 (lookup_field_r): Adjust call to lookup_field_1.
373 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
375 * Make-lang.in (cp/name-lookup.o): Add more dependencies.
377 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
379 * cp-tree.h (binding_for_name: Move to name-lookup.h Adjust
381 (cxx_scope_find_binding_for_name): Likewise.
382 * decl.c (find_binding: Move to name-lookup.c.
383 (binding_for_name): Likewise.
384 (cxx_scope_find_binding_for_name): Likewise.
385 (BINDING_LEVEL): Remove.
386 (push_binding): Tidy.
387 (push_class_binding): Likewise.
388 (pop_binding): Likewise.
389 (poplevel): Likewise.
390 (poplevel_class): Likewise.
391 (set_identifier_type_value_with_scope): Likewise.
392 (push_overloaded_decl): Likewise.
393 (lookup_tag): Likewise.
394 (unqualified_namespace_lookup): Likewise.
395 (lookup_name_current_level): Likewise.
396 (maybe_inject_for_scope_var): Likewise.
397 (namespace_binding): Move to name-lookup.c.
398 (set_namespace_binding): Likewise.
399 * decl2.c (lookup_using_namespace): Tidy.
400 (qualified_lookup_using_namespace): Likewise.
401 (do_toplevel_using_decl): Likewise.
402 * name-lookup.c: Include "timevar.h"
403 * name-lookup.h (cxx_scope): Declare.
404 (struct cxx_binding): Lose member "has_level". Adjust "scope"
406 (BINDING_SCOPE): Adjust definition.
407 (BINDING_HAS_LEVEL_P): Remove.
409 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
411 * name-lookup.c: New file.
412 * name-lookup.h: Likewise..
413 * decl.c (push_binding): Adjust use cxx_binding_make.
414 (free_bindings): Move to name-lookup.c
415 (pop_binding): Use cxx_binding_free.
416 (binding_for_name): Tidy.
417 * cp-tree.h: Include "name-lookup.h"
418 (cxx_binding_make): Move to name-lookup.h
419 (cxx_binding_clear): Likewise.
420 (struct cxx_binding): Likewise.
421 (LOCAL_BINDING_P): Likewise.
422 (INHERITED_VALUE_BINDING_P): Likewise.
423 (BINDING_SCOPE): Likewise.
424 (BINDING_HAS_LEVEL_P): Likewise.
425 (BINDING_VALUE): Likewise.
426 (BINDING_TYPE): Likewise.
427 * config-lang.in (gtfiles): Add cp/name-lookup.h
428 * Make-lang.in (cp/name-lookup.o): New rule.
429 (CXX_OBJS): Add cp/name-lookup.o
430 (CXX_TREE_H): Add cp/name-lookup.h
432 2003-03-28 Jason Merrill <jason@redhat.com>
435 * cvt.c (force_rvalue): New fn.
436 * call.c (build_conditional_expr): Use it.
437 * cp-tree.h: Declare it.
439 2003-03-28 Mike Stump <mrs@apple.com>
441 * error.c (dump_expr): Add 0x to printed hex numbers to make
442 output match source code better.
444 2003-03-28 Mark Mitchell <mark@codesourcery.com>
447 * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
450 * decl2.c (generate_ctor_or_dtor_function): Tolerate a
451 non-existant ssdf_decls array.
452 (finish_file): Call generator_ctor_or_dtor_function when there are
453 static constructors or destructors and no other static
456 2003-03-28 Nathan Sidwell <nathan@codesourcery.com>
459 * decl2.c (finish_file): Don't warn about explicitly instantiated
462 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
465 * pt.c (lookup_template_class): Only check instantiated args if
466 they do not contain template parameters.
468 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
471 * parser.c (cp_parser_function_definition): Set
472 DECL_INITIALIZED_IN_CLASS for members.
473 * pt.c (instantiate_decl): Only reduce the template args for
474 friends that are not defined in class.
476 2003-03-25 Jason Merrill <jason@redhat.com>
478 * call.c (print_z_candidate): Change name of first arg to msgid.
479 (joust): Add comment for translators.
481 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
483 PR c++/9898, PR c++/383, DR 322
484 * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
485 through reference types on both PARM and ARG.
487 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
490 * error.c (dump_expr) <BASELINK>: Use dump_expr.
491 * pt.c (maybe_fold_nontype_args): New function.
492 (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
493 <TEMPLATE_ID_EXPR>: Break out folding code, call it.
494 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
495 maybe_fold_nontype_args.
497 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
500 * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
502 2003-03-23 Mark Mitchell <mark@codesourcery.com>
505 * typeck.c (cxx_mark_addressable): Adjust call to
506 gen_mem_addressof or put_var_into_stack.
508 2003-03-22 Nathan Sidwell <nathan@codesourcery.com>
510 PR c++/9978, c++/9708
511 * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
512 * call.c (add_template_candidate_real): Adjust
513 instantiate_template call.
514 * class.c (resolve_address_of_overloaded_function): Likewise.
515 * decl.c (build_enumerator): Set TREE_CONSTANT.
516 * pt.c (check_instantiated_args): New.
517 (push_inline_template_parms_recursive): Set TREE_CONSTANT,
519 (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
520 (reduce_template_parm_level): Likewise.
521 (process_template_parm): Likewise.
522 (check_explicit_specialization): Adjust instantiate_template call.
523 (convert_template_argument): Don't check non-type argument here.
524 (lookup_template_class): Check them here.
525 (tsubst_friend_function): Adjust instantiate_template call.
526 (instantiate_template): Add tsubst_flags parameter, use it. Check
529 2003-03-21 Zack Weinberg <zack@codesourcery.com>
531 * decl.c: Update calls to shadow_warning.
533 2003-03-21 Nathan Sidwell <nathan@codesourcery.com>
536 * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
537 (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
539 2003-03-20 Mark Mitchell <mark@codesourcery.com>
541 * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
543 * cp/pt.c (instantiate_class_template): Fix formatting.
545 2003-03-14 Matt Austern <austern@apple.com>
547 * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
548 (unemitted_tinfo_decl_p): Remove.
549 (emit_tinfo_decl): Change declaration to remove unused parameter.
550 * decl2.c (finish_file): Change tinfo emission to loop through
551 unemitted_tinfo_decls array instead of looping through all decls.
552 * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
553 unused second parameter.
554 (init_rtti_processing): initialize unemitted_tinfo_decls varray.
555 (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
556 (emit_tinfo_decl): remove unused second parameter, add assertion
557 that decl hasn't already been emitted.
559 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
561 * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
562 type from 'int' to 'bool'. Replace 0 and 1 with true and false in
565 2003-03-19 Jason Merrill <jason@redhat.com>
567 PR c++/8316, c++/9315, c++/10136
568 * call.c (print_z_candidate): Split out from...
569 (print_z_candidiates): ...here.
572 2003-03-17 Roger Sayle <roger@eyesopen.com>
575 * decl.c (duplicate_decls): Use the new type when prototyping
576 anticipated decls, even when the types match. This defines the
577 exception list for the built-in function.
579 2003-03-17 Jason Merrill <jason@redhat.com>
582 * typeck.c (build_class_member_access_expr): Compare
585 2003-03-17 Mark Mitchell <mark@codesourcery.com>
588 * parser.c (cp_parser_declarator_id): Clear parser->scope.
590 2003-03-16 Jason Merrill <jason@redhat.com>
593 * decl.c (finish_function): Only allow the NRVO to use variables
594 declared at function scope.
596 2003-03-17 Andreas Jaeger <aj@suse.de>
598 * Make-lang.in (cp/TAGS): Remove.
600 2003-03-16 Nathan Sidwell <nathan@codesourcery.com>
603 * cp-tree.h (struct language_function): Add in_base_initializer.
604 (in_base_initializer): define it.
605 (expand_member_init): Remove INIT param.
606 * init.c (expand_member_init): Remove INIT param, return the member.
607 (emit_mem_initializers): Set in_base_initializer.
608 * class.c (build_base_path): Check in_base_initializer.
609 * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
610 * pt.c (tsubst_initializer_list): Likewise.
612 2003-03-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
614 * decl.c (binding_for_name): Fix initialization thinko.
616 2003-03-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
618 Compile-time improvement: 2/n.
619 * cp-tree.h (struct cxx_binding): New datatype;
620 (struct lang_identifier): Use it.
621 (LOCAL_BINDING_P): Adjust definition.
622 (INHERITED_VALUE_BINDING_P): Likewise.
623 (BINDING_SCOPE): Likewise.
624 (BINDING_HAS_LEVEL_P): Likewise.
625 (BINDING_VALUE): Likewise.
626 (BINDING_TYPE): Likewise.
627 (IDENTIFIER_VALUE): Likewise.
628 (struct tree_binding): Remove.
629 (TS_CP_BINDING): Likewise.
630 ((union lang_tree_node): Remove field "binding".
631 (cxx_binding_clear): New macro.
632 (binding_for_name): Adjust return type.
633 (qualified_lookup_using_namespace): Adjust prototype.
634 (lookup_using_namespace): Adjust prototype.
635 (cxx_scope_find_binding_for_name): Declare.
636 * cp-tree.def: Remove CPLUS_BINDING definition.
637 * decl.c (push_binding): Adjust local variable type.
638 (add_binding): Likewise.
639 (push_class_binding): Likewise.
640 (pop_binding): Likewise.
641 (poplevel): Likewise.
642 (poplevel_class): Likewise.
643 (free_bindings): Adjust type.
644 (find_binding): Adjust return type, add a third parameter. Remove
645 non-useful assertion now that we use static typing.
646 (cxx_scope_find_binding_for_name): New function.
647 (binding_for_name): Use it. Adjust local variable type. Simplify.
648 (namespace_binding): Simplify.
649 (set_namespace_binding): Likewise.
650 (set_identifier_type_value_with_scope): Adjust local variable type.
651 (lookup_tag): Don't type-abuse of local variable 'old'.
652 (lookup_namespace_name): Likewise. Allocate binding on stack.
653 (select_decl): Adjust prototype.
654 (unqualified_namespace_lookup): Allocate binding on stack.
655 Don't type-abuse of local variable 'val'.
656 (lookup_name_real): Likewise.
657 (maybe_inject_for_scope_var): Adjust local variable type.
658 (cp_tree_node_structure): Remove CPLUS_BINDING case label.
659 (namespace_binding): Adjust logic, simplify.
660 (BINDING_LEVEL): Adjust definition.
661 (push_class_level_binding): Adjust local variable type.
662 (struct cxx_saved_binding): Adjust field 'binding' type.
663 * decl2.c (ambiguous_decl): Adjust prototype.
664 (lookup_using_namespace): Adjust local variable type.
665 (qualified_lookup_using_namespace): Catch type error and correct
666 ensueing logic error.
667 (do_nonmember_using_decl): Adjust local variable type. Allocate
668 temporary cxx_binding on stack.
669 (do_toplevel_using_decl): Adjust local variable type.
670 * ptree.c (cxx_print_cxx_binding): New function.
671 (cxx_print_identifier): Use it.
672 (cxx_print_xnode): Delete CPLUS_BINDING case label.
674 2003-03-15 Roger Sayle <roger@eyesopen.com>
676 * tree.c (count_functions): Fix whitespace.
678 2003-03-15 Neil Booth <neil@daikokuya.co.uk>
680 * Make-lang.in: Update.
682 2003-03-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
685 * pt.c (maybe_process_partial_specialization): Handle
686 member class template when enclosing class template is
687 explicit specialized.
688 (most_general_template): Stop looking when DECL is already
691 2003-03-13 Jason Merrill <jason@redhat.com>
694 * search.c (lookup_conversions): Call complete_type here.
695 * call.c (implicit_conversion): Not here.
697 2003-03-13 Mark Mitchell <mark@codesourcery.com>
699 * decl2.c (do_nonmember_using_decl): Correct handling of
700 simultaneous type/non-type bindings.
702 * call.c (initialize_reference): Remove bogus assertion.
703 * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
705 2003-03-12 Andrew Lewycky <andrew@mxc.ca>
708 * expr.c (cxx_expand_expr): Return const0_rtx for throw
711 2003-03-11 Mark Mitchell <mark@codesourcery.com>
714 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
715 to merge old and new declarations.
717 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
720 * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
721 (cp/g++.1): Build it from scratch in the build tree.
722 (c++.install-man): Depend on it. Install it from the build tree.
723 (c++.mostlyclean): Clean it.
725 2003-03-11 Mark Mitchell <mark@codesourcery.com>
728 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
729 to merge old and new declarations.
732 * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
734 2003-03-11 Jason Merrill <jason@redhat.com>
737 * search.c (lookup_member): Fix handling of functions in a class
740 2003-03-11 Mark Mitchell <mark@codesourcery.com>
743 * call.c (convert_class_to_reference): Adjust usage of
745 (any_viable): Remove.
746 (splice_viable): Combine with any_viable.
747 (print_z_candidates): Avoid printing duplicates.
748 (build_user_type_conversion_1): Adjust usage of splice_viable.
749 (build_new_function_call): Likewise.
750 (build_operator_new_call): Likewise.
751 (build_object_call): Likewise.
752 (build_conditional_expr): Likewise.
753 (build_new_op): Likewise.
754 (build_new_method_call): Likewise.
755 (joust): Remove spurious comment.
756 * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
757 * decl2.c (arg_assoc_class): Simplify.
758 * friend.c (add_friend): Likewise.
760 2003-03-11 Jason Merrill <jason@redhat.com>
763 * decl2.c (check_classfn): A member template only matches a
766 2003-03-11 Neil Booth <neil@daikokuya.co.uk>
768 * Make-lang.in (CXX_C_OBJS): Update.
769 * lang-specs.h: Don't define __GNUG__ here.
771 2003-03-10 Mark Mitchell <mark@codesourcery.com>
773 * call.c (perform_overload_resolution): New function.
774 (build_new_function_call): Use it.
775 (build_operator_new_call): Likewise.
776 (add_candidates): Add explicit_targs and template_only parameters.
777 (build_new_op): Adjust accordingly.
778 * cp-tree.h (build_operator_new_call): New function.
779 (build_function_call_real): Remove.
780 (build_function_call_maybe): Likewise.
781 * init.c (build_new_1): Use build_operator_new_call.
782 * typeck.c (build_function_call_real): Rename to ...
783 (build_function_call): ... this.
785 2003-03-10 Devang Patel <dpatel@apple.com>
788 * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
790 2003-03-10 Jason Merrill <jason@redhat.com>
793 * decl.c (push_using_directive): Push before recursing.
795 PR c++/9868, c++/9524
796 * call.c (resolve_scoped_fn_name): Handle the case of a function
799 * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
800 argument in the pointer-to-member case.
802 2003-03-09 Mark Mitchell <mark@codesourcery.com>
805 * cp-lang.c (cxx_get_alias_set): Use alias set zero for
806 pointers to member functions.
809 * decl.c (build_ptrmemfunc_type): Do not allow default arugments
810 in pointer-to-member-function types.
812 2003-03-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
814 * expr.c (cplus_expand_constant): Use C90 prototype style.
815 (cxx_expand_expr): Likewise.
817 2003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
820 * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
823 2003-03-08 Geoffrey Keating <geoffk@apple.com>
825 * lang-specs.h (c++-header): Change .pch to .gch.
827 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
829 * cp-tree.h (cxx_init): Update prototype.
830 * lex.c (cxx_init): Similarly.
832 2003-03-08 Mark Mitchell <mark@codesourcery.com>
835 * cp-tree.h (begin_mem_initializers): Remove.
836 * parser.c (cp_parser_mem_initializer_list): Inline it here.
837 Do not call finish_mem_initializers if not in a constructor.
838 (cp_parser_class_head): Fix typo in error message.
839 * semantics.c (begin_mem_initializers): Remove.
840 * testsuite/g++.dg/parser/constructor1.C: New test.
843 * call.c (add_function_candidate): Skip builtin fuctions that have
844 not yet been declared.
847 * init.c (build_new_1): Correct logic for determining whether or
848 not to use an array cookie.
851 * parser.c (cp_parser_postfix_expression): Call
852 finish_non_static_data_member, even when processing_template_decl.
855 * cp-tree.h (is_ancestor): New function.
856 (handle_class_head): Change prototype.
857 * decl2.c (is_namespace_ancestor): Rename to ...
858 (namespace_anecestor): ... this.
859 (set_decl_namespace): Adjust accordingly.
860 (handle_class_head): Remove unncessary parameters.
861 * parser.c (cp_parser_class_head): Check that
862 nested-name-specifiers are used appropriately.
864 2003-03-07 Mark Mitchell <mark@codesourcery.com>
866 * call.c (reference_binding): Remove REF_IS_VAR parameter.
867 (implicit_conversion): Adjust call to reference_binding.
868 (make_temporary_var_for_ref_to_type): Add TYPE parameter.
869 (initialize_reference): Adjust handling for references bound to
871 * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
873 (real_non_cast_lvalue_p): New method.
874 * cvt.c (build_up_reference): Adjust use of
875 make_temporary_var_for_ref_to_temp.
876 * tree.c (real_non_cast_lvalue_p): New method.
878 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
880 * except.c (init_exception_processing): Use C90 prototype style.
881 (cp_protect_cleanup_actions): Likewise.
882 (prepare_eh_type): Likewise.
883 (build_eh_type_type): Likewise.
884 (build_exc_ptr): Likewise.
885 (do_begin_catch): Likewise.
886 (dtor_nothrow): Likewise.
887 (do_end_catch): Likewise.
888 (push_eh_cleanup): Likewise.
889 (decl_is_java_type): Likewise.
890 (choose_personality_routine): Likewise.
891 (initialize_handler_parm): Likewise.
892 (expand_start_catch_block): Likewise.
893 (expand_end_catch_block): Likewise.
894 (begin_eh_spec_block): Likewise.
895 (finish_eh_spec_block): Likewise.
896 (do_allocate_exception): Likewise.
897 (do_free_exception): Likewise.
898 (wrap_cleanups_r): Likewise.
899 (stabilize_throw_expr): Likewise.
900 (build_throw): Likewise.
901 (complete_ptr_ref_or_void_ptr_p): Likewise.
902 (is_admissible_throw_operand): Likewise.
903 (nothrow_libfn_p): Likewise.
904 (can_convert_eh): Likewise.
905 (check_handlers_1): Likewise.
906 (check_handlers): Likewise.
908 2003-03-06 Mark Mitchell <mark@codesourcery.com>
910 * call.c (merge_conversion_sequences): New function.
911 (build_conv): Set ICS_USER_FLAG for USER_CONVs.
912 (convert_class_to_reference): Correct handling of second
913 standard conversion sequence in a user-defined conversion
915 (build_user_type_conversion_1): Use merge_conversion_sequences.
916 * cp-tree.def: Add comments for CONV nodes.
917 * rtti.c (get_tinfo_decl): Use build_address/build_nop.
919 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
921 * error.c (init_error): Use C90 prototype style.
922 (dump_scope): Likewise.
923 (dump_qualifiers): Likewise.
924 (dump_template_argument): Likewise.
925 (dump_template_argument_list): Likewise.
926 (dump_template_parameter): Likewise.
927 (dump_template_bindings): Likewise.
928 (dump_type): Likewise.
929 (dump_typename): Likewise.
930 (class_key_or_enum): Likewise.
931 (dump_aggr_type): Likewise.
932 (dump_type_prefix): Likewise.
933 (dump_type_suffix): Likewise.
934 (dump_global_iord): Likewise.
935 (dump_simple_decl): Likewise.
936 (dump_decl): Likewise.
937 (dump_template_decl): Likewise.
938 (dump_function_decl): Likewise.
939 (dump_parameters): Likewise.
940 (dump_exception_spec): Likewise.
941 (dump_function_name): Likewise.
942 (dump_template_parms): Likewise.
943 (dump_char): Likewise.
944 (dump_expr_list): Likewise.
945 (dump_expr): Likewise.
946 (dump_binary_op): Likewise.
947 (dump_unary_op): Likewise.
948 (type_as_string): Likewise.
949 (expr_as_string): Likewise.
950 (decl_as_string): Likewise.
951 (context_as_string): Likewise.
952 (lang_decl_name): Likewise.
953 (cp_file_of): Likewise.
954 (cp_line_of): Likewise.
955 (decl_to_string): Likewise.
956 (expr_to_string): Likewise.
957 (fndecl_to_string): Likewise.
958 (code_to_string): Likewise.
959 (language_to_string): Likewise.
960 (parm_to_string): Likewise.
961 (op_to_string): Likewise.
962 (type_to_string): Likewise.
963 (assop_to_string): Likewise.
964 (args_to_string): Likewise.
965 (cv_to_string): Likewise.
966 (cxx_print_error_function): Likewise.
967 (cp_diagnostic_starter): Likewise.
968 (cp_diagnostic_finalizer): Likewise.
969 (cp_print_error_function): Likewise.
970 (function_category): Likewise.
971 (print_instantiation_full_context): Likewise.
972 (print_instantiation_partial_context): Likewise.
973 (maybe_print_instantiation_context): Likewise.
974 (print_instantiation_context): Likewise.
975 (cp_printer): Likewise.
976 (print_integer): Likewise.
977 (print_non_consecutive_character): Likewise.
978 (locate_error): Likewise.
980 2003-03-06 Mark Mitchell <mark@codesourcery.com>
983 * call.c (reference_binding): Add ref_is_var parameter.
984 (implicit_conversion): Adjust call to reference_binding.
985 (initialize_reference): Likewise.
988 * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
992 * class.c (get_basefndecls): Use lookup_fnfields_1.
994 2003-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
997 * parser.c (cp_parser_type_parameter): Remove redundant `expect'
999 (cp_parser_single_declaration): Likewise.
1001 2003-03-05 Jason Merrill <jason@redhat.com>
1004 * call.c (build_conditional_expr): Use convert rather than an
1007 2003-03-02 Matt Austern <austern@apple.com>
1009 * decl.c (cp_binding_level): Add static_decls varray member.
1010 (add_decl_to_level): Add static/inline namespace scope
1011 declarations to static_decls array.
1012 (wrapup_global_for_namespace): Pass static_decls only, instead of
1013 all decls, to wrapup_global_declarations/check_global_declarations.
1014 (push_namespace): Initialize static_decls for ordinary namespaces.
1015 (cxx_init_decl_processing): Initialize static_decls for global
1018 2003-03-05 Mark Mitchell <mark@codesourcery.com>
1020 * class.c (end_of_class): Correct thinko.
1022 2003-03-04 Nathanael Nerode <neroden@gcc.gnu.org>
1024 * config-lang.in: Replace ${libstdcxx_version} by its value.
1026 2003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1028 * cp-tree.h (cxx_saved_binding): Declare.
1029 (struct saved_scope): Adjust type of field 'old_binding'.
1030 * decl.c (cxx_saved_binding_make): New macro.
1031 (struct cxx_saved_binding): Define.
1032 (store_bindings): Adjust prototype. Use cxx_saved_binding to save
1034 (maybe_push_to_top_level): Adjust local variable type.
1035 (pop_from_top_level): Likewise.
1037 2003-03-04 Tom Tromey <tromey@redhat.com>
1039 * Make-lang.in (c++.tags): New target.
1041 2003-03-04 Neil Booth <neil@daikokuya.co.uk>
1043 * Make-lang.in: Update.
1045 2003-03-03 Jason Merrill <jason@redhat.com>
1047 * decl.c (finish_enum): Do set the type in a template. Simplify.
1048 * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
1050 2003-03-03 Mark Mitchell <mark@codesourcery.com>
1053 * call.c (convert_class_to_reference): Correct conversion
1055 (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
1056 (implicit_conversion): Adjust call to reference_binding.
1057 (add_candidate): Change type of candidates parameter.
1058 (add_function_candidate): Likewise.
1059 (add_conv_candidate): Likewise.
1060 (build_builtin_candidate): Likewise.
1061 (add_builtin_candidate): Likewise.
1062 (add_builtin_candidates): Likewise.
1063 (add_template_candidate_real): Likewise.
1064 (add_template_candidate): Likewise.
1065 (add_template_conv_candidate): Likewise.
1066 (build_user_type_conversion_1): Adjust accordingly.
1067 (build_object_call): Likewise.
1068 (build_conditional_expr): Likewise.
1069 (add_candidates): Likewise.
1070 (build_new_op): Likewise.
1071 (convert_like_real): Use USER_CONV_CAND. Use build_nop.
1072 (build_new_method_call): Adjust calls to add_function_candidate.
1073 (make_temporary_var_for_ref_to_temp): New function.
1074 (initialize_reference): Add decl parameter.
1075 * class.c (build_rtti_vtbl_entries): Use build_address and
1077 * cp-tree.h (initialize_reference): Change prototype.
1078 (make_temporary_var_for_ref_to_temp): New function.
1079 (build_type_conversion): Change prototype.
1080 (build_address): New function.
1081 (build_nop): Likewise.
1082 * cvt.c (cp_convert_to_pointer): Adjust call to
1083 build_type_conversion. Avoid indicating redundant NOP_EXPRs.
1085 (convert_to_pointer_force): Use build_nop.
1086 (build_up_reference): Use make_temporary_var_for_ref_to_temp.
1087 (convert_to_reference): Adjust call to build_type_conversion.
1088 (ocp_convert): Likewise.
1089 (build_type_conversion): Remove for_sure parameter.
1090 * decl.c (grok_reference_init): Use initialize_reference.
1091 * typeck.c (build_address): New function.
1092 (build_nop): Likewise.
1093 (build_unary_op): Use them.
1094 (build_ptrmemfunc): Tidy slightly.
1095 (convert_for_initialization): Adjust call to
1096 initialize_reference.
1097 * typeck2.c (store_init_value): Remove #if 0'd code.
1099 2003-03-03 Jason Merrill <jason@redhat.com>
1101 * decl.c (start_function): Clear DECL_NUM_STMTS.
1103 * class.c (get_vtable_decl): Use vtbl_type_node.
1104 (build_primary_vtable): Check for it.
1106 2003-03-02 Aldy Hernandez <aldyh@redhat.com>
1108 * decl.c (check_initializer): Check for vector_opaque_p.
1110 2003-03-02 Ashif Harji <asharji@uwaterloo.ca>
1112 * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
1113 invoke an external cpp during compilation.
1115 2003-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
1117 * decl.c (duplicate_decls): Convert use of warning_with_decl() to
1119 (start_decl): Likewise.
1120 (start_function): Likewise.
1122 2003-03-01 Neil Booth <neil@daikokuya.co.uk>
1124 * Make-lang.in (CXX_C_OBJS): Update.
1126 2003-02-28 Mark Mitchell <mark@codesourcery.com>
1129 * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
1132 2003-02-28 Aldy Hernandez <aldyh@redhat.com>
1134 * parser.c (cp_parser_init_declarator): Revert opaque
1135 vector_opaque_p change.
1136 Do not include target.h.
1138 2003-02-28 Mark Mitchell <mark@codesourcery.com>
1141 * cp-tree.h (build_zero_init): Add parameter.
1142 * decl.c (cp_finish_decl): Adjust call.
1143 * init.c (build_zero_init): Add nelts parameter. Adjust recursive
1145 (build_default_init): Add nelts parameter. Adjust calls to
1147 (build_new_1): Adjust call to build_default_init.
1148 * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
1150 2003-02-26 Devang Patel <dpatel@apple.com>
1152 * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
1153 required. Postpone enum setting for template decls.
1154 (build_enumerator): Delay copying value node until finish_enum
1155 (). Remove #if 0'ed code.
1156 * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
1157 (tsubst_copy): Add check for enum type.
1159 2003-02-25 Mark Mitchell <mark@codesourcery.com>
1162 * decl2.c (prune_vars_needing_no_initialization): Do not throw
1163 away initializations for DECL_EXTERNAL VAR_DECLs.
1164 (finish_file): Adjust accordingly.
1165 * pt.c (instantiate_decl): Do not defer VAR_DECLs.
1167 2003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
1169 * decl.c (add_binding): Time TV_NAME_LOOKUP.
1170 (push_class_binding): Likewise.
1171 (set_namespace_binding): Likewise.
1173 2003-02-24 Mark Mitchell <mark@codesourcery.com>
1176 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
1177 specializations back to the main template.
1178 * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
1179 * pt.c (resolve_typename_type): Likewise.
1181 2003-02-24 Jeffrey D. Oldham <oldham@codesourcery.com>
1184 * pt.c (tsubst_copy_and_build): For a templated function inside a
1185 scope, process template arguments.
1187 2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1190 * typeck2.c (abstract_virtuals_error): Don't check when
1191 TYPE is still template parameter dependent.
1193 2003-02-23 Mark Mitchell <mark@codesourcery.com>
1196 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
1197 * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
1198 * pt.c (instantiate_class_template): Don't try to instantiate
1200 (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
1202 2003-02-21 Mark Mitchell <mark@codesourcery.com>
1205 * decl.c (grokdeclarator): Do not allow parameters with variably
1208 2003-02-21 Nathan Sidwell <nathan@codesourcery.com>
1210 * search.c (grow_bfs_bases): Remove. Fold into ...
1211 (bfs_walk): ... here, fix fencepost error. Fix merge lossage
1214 2003-02-20 Mark Mitchell <mark@codesourcery.com>
1217 * mangle.c (mangle_conv_op_name_for_type): Issue an error message
1218 when the G++ 3.2 ABI prevents correct compilation.
1220 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
1222 Change base class access representation. Share virtual base
1224 * cp/call.c (build_special_member_call): Remove binfo_for_vbase
1226 * cp/class.c (build_base_path): Likewise.
1227 (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
1228 (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
1229 (make_new_vtable): Adjust.
1230 (force_canonical_binfo_r): Delete.
1231 (force_canonical_binfo): Delete.
1232 (mark_primary_virtual_base): Delete.
1233 (dfs_unshared_virtual_bases): Delete.
1234 (mark_primary_bases): Adjust.
1235 (maybe_warn_about_overly_private_class): Adjust.
1236 (dfs_base_derived_from): Delete.
1237 (base_derived_from): Follow the inheritance chain.
1238 (struct find_final_overrider_data): Add vpath member.
1239 (dfs_find_final_overrider): Adjust.
1240 (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
1241 (find_final_overrider): Adjust.
1242 (update_vtable_entry_for_fn): Adjust.
1243 (modify_all_vtables): Adjust.
1244 (walk_subobject_offsets): Adjust.
1245 (layout_nonempty_base_or_field): Adjust.
1246 (layout_empty_base): Remove last parameter. Adjust.
1247 (build_base_field): Adjust.
1248 (build_base_fields): Adjust.
1249 (propagate_binfo_offsets): Remove last parameter. Adjust.
1250 (dfs_set_offset_for_unshared_vbases): Delete.
1251 (layout_virtual_bases): Adjust.
1252 (finish_struct_1): Adjust.
1253 (init_class_processing): Don't init access nodes.
1254 (dfs_get_primary_binfo): Delete.
1255 (get_primary_binfo): Adjust.
1256 (dump_class_hierarchy_r): Remove most derived arg, add IGO
1258 (dump_class_hierarchy): Adjust.
1259 (finish_vtbls): Adjust.
1260 (get_original_base): Delete.
1261 (build_vtt_inits): Adjust.
1262 (dfs_build_secondary_vptr_vtt_inits): Adjust.
1263 (dfs_ctor_vtable_bases_queue_p): Adjust.
1264 (build_ctor_vtbl_group): Adjust.
1265 (dfs_accumulate_vtbl_inits): Adjust.
1266 (build_vtbl_initializer): Adjust.
1267 (build_vbase_offset_vtbl_entries): Adjust.
1268 (add_vcall_offset_vtbl_entries_1): Adjust.
1269 * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
1270 (access_*_node): Remove.
1271 (CANONICAL_BINFO): Delete.
1272 (BINFO_UNSHARED_MARKED): Remove.
1273 (BINFO_MARKED): Set LANG_FLAG_0 directly.
1274 (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
1275 (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
1276 (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
1278 (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
1279 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
1280 (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
1282 (BINFO_DEPENDENT_BASE_P): New.
1283 (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
1285 (markedp, unmarkedp): Adjust.
1286 (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
1287 dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
1288 find_vbase_instance, binfo_for_vbase): Delete.
1289 (copied_binfo, original_binfo): Declare.
1290 (finish_base_specifier): Add virtual_p arg.
1291 (unshare_base_binfos): Delete.
1292 (copy_base_binfos): Declare.
1293 (reverse_path): Delete.
1294 * cp/decl.c (xref_basetypes): Access and virtuality passed
1295 differently. Don't copy direct base binfos here. Call
1297 * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
1298 (initialize_vtbl_ptrs): Adjust.
1299 (expand_member_init): Adjust.
1300 * cp/parser.c (cp_parser_base_specifier): Adjust.
1301 * cp/pt.c (instantiate_class_template): Adjust.
1302 (get_template_base_recursive): Adjust.
1303 * cp/rtti.c (get_pseudo_ti_init): Adjust.
1304 (get_pseudo_ti_desc): Adjust.
1305 * cp/tree.c (unshare_base_binfos): Rename to ...
1306 (copy_base_binfos): ... here, reimplement.
1307 (make_binfo): Set BINFO_DEPENDENT_BASE_P.
1308 (reverse_path): Remove.
1309 * cp/typeck.c (get_delta_difference): Adjust error messages.
1310 * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
1311 * cp/search.c (lookup_base_r): Adjust.
1312 (dynamic_cast_base_recurse): Adjust.
1313 (canonical_binfo): Remove.
1314 (dfs_canonical_queue): Remove.
1315 (dfs_assert_unmarked_p): Remove.
1316 (assert_canonical_unmarked): Remove.
1317 (shared_marked_p, shared_unmarked_p): Remove.
1318 (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
1319 (dfs_access_in_type): Adjust.
1320 (access_in_type): Adjust.
1321 (dfs_accessible_queue_p): Adjust.
1322 (dfs_accessible_p): Adjust.
1323 (is_subobject_of_p_1, is_subobject_of_p): Remove.
1324 (struct lookup_field_info): Remove from_dep_base_p field.
1325 (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
1326 (lookup_field_r): Remove dependent base code.
1327 (lookup_member): Likewise.
1328 (dfs_walk, dfs_walk_real): Add access arg to queue fn.
1329 (dfs_unmarked_real_bases_queue_p): Remove.
1330 (dfs_marked_real_bases_queue_p): Remove.
1331 (dfs_skip_vbases): Remove.
1332 (dfs_get_pure_virtuals): Adjust.
1333 (markedp, unmarkedp): Adjust.
1334 (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
1335 (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
1336 (dfs_unmark): Adjust.
1337 (dfs_get_vbase_types):Remove.
1338 (dfs_build_inheritance_graph_order): Remove.
1339 (get_vbase_types): Remove
1340 (dfs_find_vbase_instance): Remove.
1341 (find_vbase_instance): Remove.
1342 (dfs_debug_unmarkedp): Adjust.
1343 (dependent_base_p): Remove.
1344 (dfs_push_type_decls): Adjust.
1345 (dfs_push_decls): Adjust.
1346 (dfs_no_overlap_yet): Adjust.
1347 (copied_binfo): New function.
1348 (original_binfo): New function.
1349 (binfo_for_vbase): Remove.
1351 2003-02-18 Zack Weinberg <zack@codesourcery.com>
1353 * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
1354 (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
1357 2003-02-18 Mark Mitchell <mark@codesourcery.com>
1360 * class.c (layout_class_type): In the 3.2 ABI, take into account
1361 trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
1363 2003-02-18 Matt Austern <austern@apple.com>
1365 * cp/cp-lang.c: Change lang hooks so that final_write_globals does
1367 * cp/decl.c (wrapup_globals_for_namespace): Remove special
1368 handling of global namespace.
1370 2003-02-18 Geoffrey Keating <geoffk@apple.com>
1372 * cp-tree.h (rid_to_yy): Delete.
1373 (C_RID_YYCODE): Delete.
1374 (finish_file): Delete redundant declaration.
1376 2003-02-18 Jason Merrill <jason@redhat.com>
1379 * decl.c (reshape_init): Don't mess with initializer labels.
1382 * parser.c (cp_parser_postfix_expression): Set idk properly for
1383 object->scope::member.
1385 2003-02-18 Ben Elliston <bje@redhat.com>
1388 * decl.c (duplicate_decls): Fix typo in comment.
1390 2003-02-17 Michael Elizabeth Chastain <mec@shout.net>
1393 * class.c (build_base_field): Mark fields for base classes with
1396 2003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1399 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
1400 CONSTRUCTOR_ELTS only once.
1402 2003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1405 * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
1406 (dump_type_suffix): Likewise.
1408 2003-02-14 Nathan Sidwell <nathan@codesourcery.com>
1410 * search.c: ANSIfy function declarations and definitions.
1411 * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
1412 * call.c (build_method_call, resolve_scoped_fn_name,
1413 build_java_interface_fn_ref): Adjust lookup_field, lookup_member
1415 * class.c (handle_using_decl): Likewise.
1416 * decl.c (make_typename_type, make_unmound_class_template,
1417 start_decl, compute_array_index_type): Likewise.
1418 * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
1419 * init.c (expand_member_init, build_member_call): Likewise.
1420 * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
1421 resolve_typename_type): Likewise.
1422 * typeck.c (lookup_destructor, finish_class_member_access_exprm
1423 build_prememfunc_access_expr): Likewise.
1425 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
1427 * decl2.c: Include "timevar.h".
1428 (namespace_ancestor): Time name lookup.
1429 (add_using_namespace): Likewise.
1430 (lookup_using_namespace): Likewise.
1431 (qualified_lookup_using_namespace): Likewise.
1432 (decl_namespace): Likewise.
1433 (lookup_arg_dependent): Likewise.
1434 * lex.c (do_identifier): Likewise.
1435 (do_scoped_id): Likewise.
1436 * pt.c (lookup_template_class): Likewise.
1438 2003-02-14 Andrew Pinski <pinskia@physics.uc.edu>
1440 * decl.c: (define_label): Fix warning for return 0 instead of NULL.
1442 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
1444 * decl.c: Include "timevar.h".
1445 (poplevel): Time name lookup.
1446 (find_binding): Likewise.
1447 (push_namespace): Likewise.
1448 (pop_nested_namespace): Likewise.
1449 (store_bindings): Likewise.
1450 (maybe_push_to_top_level): Likewise.
1451 (pop_from_top_level): Likewise.
1452 (push_local_name): Likewise.
1453 (pushtag): Likewise.
1454 (pushdecl): Likewise.
1455 (pushdecl_with_scope): Likewise.
1456 (pushdecl_namespace_level): Likewise.
1457 (pushdecl_top_level): Likewise.
1458 (pushdecl_class_level): Likewise.
1459 (push_class_level_binding): Likewise.
1460 (push_using_decl): Likewise.
1461 (push_using_directive): Likewise.
1462 (push_overloaded_decl): Likewise.
1463 (lookup_label): Likewise.
1464 (define_label): Likewise.
1465 (lookup_tag): Likewise.
1466 (lookup_tag_reverse): Likewise.
1467 (lookup_namespace_name): Likewise.
1468 (select_decl): Likewise.
1469 (unqualified_namespace_lookup): Likewise.
1470 (lookup_name_real): Likewise.
1471 (lookup_name_current_level): Likewise.
1472 (lookup_type_current_level): Likewise.
1473 (maybe_inject_for_scope_var): Likewise.
1474 (xref_tag): Likewise.
1476 * Make-lang.in (cp/decl.o): Add dependency on timevar.h
1478 2003-02-12 Phil Edwards <pme@gcc.gnu.org>
1480 * decl.c (build_enumerator): Remove unneeded test.
1482 2003-02-09 Dan Nicolaescu <dann@ics.uci.edu>
1484 * cp-tree.h (struct lang_type_header): Make all fields unsigned
1487 2003-02-03 Mark Mitchell <mark@codesourcery.com>
1490 * call.c (z_candidate): Add args.
1491 (convert_class_to_reference): Set it.
1492 (implicit_conversion): Tidy.
1493 (add_candidate): Add args parameter.
1494 (add_function_candidate): Adjust call to add_candidate.
1495 (add_conv_candidate): Likewise.
1496 (build_builtin_candidate): Likewise.
1497 (build_user_type_conversion_1): Eliminate wasteful tree_cons
1499 (build_new_function_call): Likewise.
1500 (build_object_call): Likewise.
1501 (add_candidates): New function.
1502 (build_new_op): Use it.
1503 (covert_like_real): Adjust call to build_over_call.
1504 (build_over_call): Remove args parameter.
1505 * operators.def: Add <?= and >?=.
1507 2003-02-01 Richard Sandiford <rsandifo@redhat.com>
1509 * typeck.c (build_indirect_ref): Don't check flag_volatile.
1511 2003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1514 * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
1516 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
1518 * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
1519 BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
1520 (BINFO_LANG_ELTS): New #define.
1521 * tree.c (make_binfo): Use BINFO_LANG_ELTS.
1523 2003-01-30 Geoffrey Keating <geoffk@apple.com>
1525 * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
1527 2003-01-30 Mark Mitchell <mark@codesourcery.com>
1529 * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
1531 * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
1532 rather than TYPE_LANG_FLAG_0.
1533 (TYPE_BUILT_IN): Remove.
1534 (TYPE_DEPENDENT_P): New macro.
1535 (TYPE_DEPENDENT_P_VALID): Likewise.
1536 (lang_type_class): Add fields_readonly.
1537 * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
1538 * pt.c (dependent_type_p_r): New function, split out from ...
1539 (dependent_type_p): ... here. Memoize results.
1540 * search.c (dependent_base_p): Use dependent_type_p, not
1541 uses_template_parms.
1542 * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
1545 2003-01-29 Mark Mitchell <mark@codesourcery.com>
1547 * call.c (build_field_call): Use build_new_op, not build_opfncall.
1548 (prep_operand): New function.
1549 (build_new_op): Use it. Remove dead code.
1550 * class.c (pushclass): Change "modify" parameter type from int to
1552 (currently_open_class): Use same_type_p, not pointer equality.
1553 (push_nested_class): Adjust calls to pushclass, remove modify
1555 * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
1556 (pushclass): Change prototype.
1557 (push_nested_class): Likewise.
1558 (grokoptypename): Remove.
1559 (build_opfncall): Remove.
1560 (value_dependent_expression_p): Declare.
1561 (resolve_typename_type): Likewise.
1562 (resolve_typename_type_in_current_instantiation): Likewise.
1563 (enter_scope_of): Remove.
1565 (tsubst_expr): Likewise.
1566 (tsubst_copy): Likewise.
1567 (tsubst_copy_and_build): Likewise.
1568 * decl.c (warn_about_implicit_typename_lookup): Remove.
1569 (finish_case_label): Return error_mark_node for erroneous labels.
1570 (start_decl): Adjust calls to push_nested_class.
1571 (grokfndecl): Call push_scope/pop_scope around call to
1573 (grokdeclarator): Do not call tsubst.
1574 (start_function): Adjust calls to push_nested_class.
1575 * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
1576 (check_classfn): Use push_scope/pop_scope around type comparisions.
1577 (grokoptypename): Remove.
1578 (push_sscope): Adjust call to push_nested_class.
1579 * error.c (dump_type): Show cv-qualification of typename types.
1580 * init.c (build_member_call): Use build_new_op, not
1582 * method.c (build_opfncall): Remove.
1583 * parser.c (cp_parser): Add allow_non_constant_expression_p and
1584 non_constant_expression_p.
1585 (cp_parser_constant_expression): Adjust prototype.
1586 (cp_parser_resolve_typename_type): Remove.
1587 (cp_parser_non_constant_expression): New function.
1588 (cp_parser_non_constant_id_expression): Likewise.
1589 (cp_parser_new): Set allow_non_constant_expression_p and
1590 non_constant_expression_p.
1591 (cp_parser_primary_expression): Reject `this' and `va_arg' in
1592 constant-expressions. Note that dependent names aren't really
1594 (cp_parser_postfix_expression): Reject conversions to non-integral
1595 types in constant-expressions. Neither are increments or
1597 (cp_parser_unary_expression): Reject increments and decrements in
1598 constant-expressions.
1599 (cp_parser_direct_new_declarator): Adjust call to
1600 cp_parser_constant_expression.
1601 (cp_parser_cast_expression): Reject conversions to non-integral
1602 types in constant-expressions.
1603 (cp_parser_assignment_expression): Rejects assignments in
1604 constant-expressions.
1605 (cp_parser_expression): Reject commas in constant-expressions.
1606 (cp_parser_labeled_statement): Adjust call to
1607 cp_parser_constant_expression.
1608 (cp_parser_direct_declarator): Simplify array bounds, even in
1609 templates, when they are non-dependent. Use
1610 resolve_typename_type, not cp_parser_resolve_typename_type.
1611 (cp_parser_class_head): Use resolve_typename_type, not
1612 cp_parser_resolve_typename_type.
1613 (cp_parser_member_declaration): Adjust call to
1614 cp_parser_constant_expression.
1615 (cp_parser_constant_initializer): Likewise.
1616 (cp_parser_constructor_declarator): Use resolve_typename_type, not
1617 cp_parser_resolve_typename_type.
1618 (cp_parser_late_parsing_default_args): Adjust call to
1620 * pt.c (tsubst): Give it internal linkage.
1621 (tsubst_expr): Likewise.
1622 (tsubst_copy): Likewise.
1623 (tsubst_copy_and_build): Likewise.
1624 (push_access_scope_real): Likewise.
1625 (tsubst_friend_class): Likewise.
1626 (instantiate_class_template): Adjust call to pushclass.
1627 (value_dependent_expression_p): Give it external linkage.
1629 (resolve_typename_type): New function.
1630 * semantics.c (finish_call_expr): Use build_new_op, not
1632 (begin_constructor_declarator): Remove.
1633 (begin_class_definition): Adjust call to pushclass.
1634 (enter_scope_of): Remove.
1635 * typeck.c (comptypes): Resolve typename types as appropriate.
1636 (build_x_indirect_ref): Use build_new_op, not build_opfncall.
1637 (build_x_compound_expr): Likewise.
1638 (build_modify_expr): Likewise.
1639 (build_x_modify_expr): Likewise.
1640 * typeck2.c (build_x_arrow): Likewise.
1642 2003-01-29 Fariborz Jahanian <fjahanian@apple.com>
1644 * pt.c (last_pending_template) Declare GTY().
1646 2003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1649 * parser.c (cp_parser_elaborated_type_specifier): Convert
1650 TEMPLATE_DECL to TYPE_DECL only when processing template friends.
1651 (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
1653 2003-01-28 Nathan Sidwell <nathan@codesourcery.com>
1656 * pt.c (unify): Don't unify '*T' with 'U C::*'.
1659 * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
1660 inside a declarator.
1662 2003-01-27 Nathan Sidwell <nathan@codesourcery.com>
1664 * class.c (update_vtable_entry_for_fn): Add index parameter.
1665 Generate vcall thunk for covariant overriding from a virtual
1667 (dfs_modify_vtables): Adjust.
1669 2003-01-25 Nathan Sidwell <nathan@codesourcery.com>
1672 * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
1674 (cp_parser_base_specifier): Look for and consume a
1675 TEMPLATE keyword. Replace switch with array index.
1678 * semantics.c (finish_non_static_data_member): Remember the
1679 field's type even in a template.
1682 * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
1686 * parser.c (cp_parser_cast_expression): Be more tentative.
1688 2003-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1690 * cp-tree.h (flagged_type_tree_s): Remove.
1691 (check_for_new_type): Likewise.
1692 * typeck2.c (check_for_new_type): Likewise.
1694 2003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
1696 * dump.c: ANSIfy function declarations and definitions.
1698 * cp-tree.h, decl.h: Get rid of PARAMS. Again.
1700 2003-01-22 Mark Mitchell <mark@codesourcery.com>
1703 * init.c (build_new): Set the type of the new-expression, even
1704 when processing_templte_decl.
1707 * parser.c (cp_parser_primary_expression): Improve error message
1708 for templates used in an expression context.
1711 * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
1712 parse when encountering "typedef".
1714 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
1716 * class.c, parser.c: ANSIfy function definitions and declarations.
1718 2003-01-22 Mark Mitchell <mark@codesourcery.com>
1721 * error.c (dump_decl): For an OVERLOAD, just print the name of the
1722 function; it doesn't make sense to try to print its type.
1723 * semantics.c (finish_typeof): Issue errors about invalid uses.
1726 * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
1728 (cp_parser_expression_statement): Use it.
1729 (cp_parser_explicit_instantiation): Likewise.
1730 * pt.c (do_decl_instantiation): Improve error handling logic.
1732 2003-01-22 Mark Mitchell <mark@codesourcery.com>
1735 * parser.c (cp_parser_using_declaration): Issue error messages
1736 about name resolution failures here.
1739 * class.c (currently_open_derived_class): Use dependent_type_p.
1740 * cp-tree.h (dependent_type_p): New function.
1741 (dependent_template_arg_p): Likewise.
1742 (dependent_template_p): Likewise.
1743 (type_dependent_expression_p): Likewise.
1744 * parser.c (cp_parser_dependent_type_p): Remove.
1745 (cp_parser_value_dependent_type_p): Likewise.
1746 (cp_parser_type_dependent_expression_p): Likewise.
1747 (cp_parser_dependent_template_arg_p): Likewise.
1748 (cp_parser_dependent_template_id_p): Likewise.
1749 (cp_parser_dependent_template_p): Likewise.
1750 (cp_parser_diagnose_invalid_type_name): Replace
1751 cp_parser_dependent_type_p with dependent_type_p, etc.
1752 (cp_parser_primary_expresion): Likewise.
1753 (cp_parser_nested_name_specifier_opt): Likewise.
1754 (cp_parser_postfix_expression): Likewise.
1755 (cp_parser_unary_expression): Likewise.
1756 (cp_parser_template_name): Likewise.
1757 (cp_parser_class_name): Likewise.
1758 (cp_parser_lookup_name): Likewise.
1759 * pt.c (dependent_type_p): New function.
1760 (value_dependent_expression_p): Likewise.
1761 (type_dependent_expression_p): Likewise.
1762 (dependent_template_arg_p): Likewise.
1763 (dependent_template_id_p): Likewise.
1764 (dependent_template_p): Likewise.
1768 * parser.c (cp_parser_simple_declaration): Return quickly when
1769 encountering errors.
1771 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1773 Make-lang.in (cp/decl.o-warn): Add -Wno-error.
1775 2003-01-17 Jason Merrill <jason@redhat.com>
1777 PR c++/9167, c++/9358
1778 * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
1780 2003-01-17 Jason Merrill <jason@redhat.com>
1783 * call.c (build_conditional_expr): Always do lvalue-rvalue
1786 2003-01-17 Mark Mitchell <mark@codesourcery.com>
1789 * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
1790 * cp-tree.h (BASELINK_BINFO): Adjust.
1791 (BASELINK_FUNCTIONS): Likewise.
1792 (BASELINK_ACCESS_BINFO): Likewise.
1793 (tree_baselink): New structure.
1794 (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
1795 (lang_tree_node): Add baselink.
1796 * decl.c (cp_tree_node_structure): Add BASELINK case.
1797 * search.c (build_baselink): Adjust.
1798 * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P
1799 test from TREE_LIST case.
1802 * parser.c (cp_parser_constructor_declarator_p): Do not assume
1803 that a constructor cannot be declared outside of its own class.
1805 * parser.c (cp_parser_resolve_typename_type): If the scope cannot
1806 be resolved, neither can the qualified name.
1808 * rtti.c (get_pseudo_ti_desc): Fix thinko.
1810 2003-01-16 Jason Merrill <jason@redhat.com>
1813 * init.c (build_vec_init): Re-add maxindex parm.
1814 (perform_member_init, build_aggr_init): Pass it.
1815 (build_new_1): Pass it. Use an incomplete array type for full_type.
1816 * typeck.c (build_modify_expr): Pass it.
1817 * cp-tree.h: Adjust.
1819 2003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
1821 * cp-tree.h (tsubst_copy_and_build): New declaration.
1822 * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
1823 (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment.
1824 (tsubst_copy_and_build): New function.
1826 2003-01-16 Mark Mitchell <mark@codesourcery.com>
1828 * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
1829 (PARTIAL_INSTANTIATION_P): Remove.
1830 (IMPLICIT_TYPENAME_P): Likewise.
1831 (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
1832 (build_typename_type): Remove declaration.
1833 (parmlist_is_exprlist): Likewise.
1834 * decl.c (build_typename_type): Make it static, remove third
1836 (push_class_binding): Don't do implicit typename stuff.
1837 (make_typename_type): Likewise.
1838 (lookup_name_real): Likewise.
1839 (grokdeclarator): Don't try to convert declarations into
1840 initializations. Don't do implicit typename stuff.
1841 (parmlist_is_exprlist): Remove.
1842 (xref_basetypes): Simplify.
1843 * decl2.c (grokfield): Don't try to convert declarations into
1845 (build_anon_union_vars): Do this while processing templates, too.
1846 (finish_anon_union): Likewise.
1847 * error.c (dump_type): Remove implicit typename handling.
1848 * parser.c (cp_parser_diagnose_invalid_type_name): New method.
1849 (cp_parser_primary_expression): Correct handling of names not
1850 found by unqualified name lookup in templates.
1851 (cp_parser_nested_name_specifier_opt): Avoid checking dependency
1852 of types when possible.
1853 (cp_parser_simple_declaration): Complain intelligently about some
1854 invalid declarations.
1855 (cp_parser_member_declaration): Likewise.
1856 (cp_parser_constructor_declarator_p): Don't check when we're in a
1858 * pt.c (instantiate_class_template): Remove
1859 PARTIAL_INSTANTIATION_P gunk.
1860 * search.c (lookup_field_r): Don't build implicit typenames.
1861 (marked_pushdecls_p): Don't enter dependent base types.
1862 (unmarked_pushdecls_p): Likewise.
1863 * semantics.c (begin_class_definition): Remove implicit typename
1866 2003-01-16 Nathan Sidwell <nathan@codesourcery.com>
1869 * parser.c (cp_parser_direct_declarator): If accepting either
1870 abstract or named, the name must be an unqualified-id.
1872 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1874 * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
1876 2003-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1878 * decl2.c (check_classfn): Fix uninitialized warning.
1879 (build_anon_union_vars): Likewise.
1880 * pt.c (tsubst_copy): Likewise.
1882 2003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
1884 Further conform g++'s __vmi_class_type_info to the C++ ABI
1886 * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
1888 (class_hint_flags): Likewise.
1890 2003-01-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1892 * config-lang.in: Add semantics.c to gtfiles.
1893 * cp-tree.h (flagged_type_tree_s): Remove lookups field.
1894 (saved_scope): Likewise.
1895 (type_lookups): Remove.
1896 (deferred_access): New structure.
1897 (type_access_control): Remove.
1898 (save_type_access_control): Likewise.
1899 (reset_type_access_control): Likewise.
1900 (decl_type_access_control): Likewise.
1901 (push_deferring_access_checks): Declare.
1902 (resume_deferring_access_checks): Likewise.
1903 (stop_deferring_access_checks): Likewise.
1904 (pop_deferring_access_checks): Likewise.
1905 (get_deferred_access_checks): Likewise.
1906 (pop_to_parent_deferring_access_checks): Likewise.
1907 (perform_deferred_access_checks): Likewise.
1908 (perform_or_defer_access_check): Likewise.
1909 * decl.c (make_typename_type): Use perform_or_defer_access_check.
1910 (make_unbound_class_template): Likewise.
1911 (grokdeclarator): Don't call decl_type_access_control.
1912 * parser.c (cp_parser_context): Remove deferred_access_checks
1913 and deferring_access_checks_p fields.
1914 (cp_parser_context_new): Adjust.
1915 (cp_parser): Remove access_checks_lists.
1916 (cp_parser_defer_access_check): Remove.
1917 (cp_parser_start_deferring_access_checks): Remove.
1918 (cp_parser_stop_deferring_access_checks): Remove.
1919 (cp_parser_perform_deferred_access_checks): Remove.
1920 (cp_parser_nested_name_specifier_opt): Use new deferred access
1922 (cp_parser_simple_declaration): Likewise.
1923 (cp_parser_template_id): Likewise.
1924 (cp_parser_function_definition): Likewise.
1925 (cp_parser_class_specifier): Likewise.
1926 (cp_parser_lookup_name): Likewise.
1927 (cp_parser_single_declaration): Likewise.
1928 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
1929 (cp_parser_parse_tentatively): Likewise.
1930 (cp_parser_parse_definitely): Likewise.
1931 (yyparse): Likewise.
1932 (cp_parser_init_declarator): Remove access_checks parameter.
1933 Use new deferred access functions.
1934 (cp_parser_function_definition_from_specifiers_and_declarator):
1936 (cp_parser_class_head): Remove deferring_access_checks_p and
1937 saved_access_checks parameters. Use new deferred access functions.
1938 (cp_parser_member_specification_opt): Don't call
1939 reset_type_access_control.
1940 * search.c (type_access_control): Remove.
1941 * semantics.c: Include "gt-cp-semantics.h".
1942 (deferred_type_access_control): Remove.
1943 (deferred_access_stack): New variable.
1944 (deferred_access_free_list): Likewise.
1945 (push_deferring_access_checks): New function.
1946 (resume_deferring_access_checks): Likewise.
1947 (stop_deferring_access_checks): Likewise.
1948 (pop_deferring_access_checks): Likewise.
1949 (get_deferred_access_checks): Likewise.
1950 (pop_to_parent_deferring_access_checks): Likewise.
1951 (perform_deferred_access_checks): New function, adapted from
1952 cp_parser_perform_deferred_access_checks.
1953 (perform_or_defer_access_check): New function, adapted from
1954 cp_parser_defer_access_check.
1955 (current_type_lookups): Remove.
1956 (deferred_type_access_control): Likewise.
1957 (decl_type_access_control): Likewise.
1958 (save_type_access_control): Likewise.
1959 (reset_type_access_control): Likewise.
1960 (begin_function_definition): Adjust.
1961 (begin_class_definiton): Likewise.
1963 2003-01-13 Jason Merrill <jason@redhat.com>
1966 * class.c (build_base_path): Take the address before calling save_expr.
1968 * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
1969 all the ambiguous conversions are bad.
1971 * class.c (maybe_warn_about_overly_private_class): Don't stop
1972 searching when we find a nonprivate method.
1974 * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
1976 2003-01-12 Mark Mitchell <mark@codesourcery.com>
1978 * cp-tree.h (get_arglist_len_in_bytes): Remove.
1981 * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
1982 typeame types more robustly.
1984 2003-01-11 Phil Edwards <pme@gcc.gnu.org>
1986 * parser.c: Fix comment typos.
1988 2003-01-10 Mark Mitchell <mark@codesourcery.com>
1991 * parser.c (cp_parser_scope_through_which_access_occurs): Handle
1992 an object_type which is not a class type.
1994 2003-01-10 Geoffrey Keating <geoffk@apple.com>
1996 * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
1997 (cp_parser_late_parsing_default_args): Likewise.
1999 2003-01-10 Nathanael Nerode <neroden@gcc.gnu.org>
2001 * cfns.gperf: ANSIfy function declarations.
2002 * cfns.h: Regenerate.
2003 * cp-tree.h: ANSIfy function declarations.
2005 2003-01-10 Mark Mitchell <mark@codesourcery.com>
2007 * cp-tree.h (reparse_absdcl_as_expr): Remove.
2008 (reparse_absdcl_as_casts): Likewise.
2009 (reparse_decl_as_expr): Likewise.
2010 (finish_decl_parsing): Likewise.
2011 * decl2.c (reparse_absdcl_as_expr): Remove.
2012 (reparse_absdcl_as_casts): Likewise.
2013 (repase_decl_as_expr): Likewise.
2014 (finish_decl_parsing): Likewise.
2019 * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
2021 (cp_parser_nested_name_specifier_opt): Correct the
2022 check_dependency_p false.
2023 (cp_parser_postfix_expression): Fix formatting.
2024 (cp_parser_decl_specifier_seq): Avoid looking for constructor
2025 declarators when possible.
2026 (cp_parser_template_id): Avoid performing name-lookup when
2028 (cp_parser_class_head): Do not count specializations when counting
2029 levels of templates.
2030 (cp_parser_constructor_declarator_p): Return immediately if
2031 there's no chance that the tokens form a constructor declarator.
2032 * rtti.c (throw_bad_typeid): Add comment. Do not return an
2033 expression with reference type.
2034 (get_tinfo_decl_dynamic): Do not return an expression with
2036 (build_typeid): Add comment. Do not return an expression with
2038 * typeck.c (build_class_member_access_expr): Improve handling of
2039 conditionals and comma-expressions as objects.
2041 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
2043 * cfns.gperf: ANSIfy function declarations.
2044 * cfns.h: Regenerate.
2045 * cp-tree.h: ANSIfy function declarations.
2046 * parser.c: ANSIfy function declarations & definitions.
2048 * decl.c (bad_specifiers): Fix parameter order error I introduced.
2050 2003-01-09 Geoffrey Keating <geoffk@apple.com>
2052 Merge from pch-branch:
2054 2003-01-09 Geoffrey Keating <geoffk@apple.com>
2056 Merge to tag pch-merge-20030102:
2058 * semantics.c (finish_translation_unit): Don't call finish_file.
2059 * parser.c: Don't include ggc.h.
2060 (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
2061 read first token here. Don't allow PCH files after the first
2063 (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
2064 (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
2065 (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
2066 (cp_parser_late_parsing_for_member): Don't duplicate call to
2067 cp_lexer_set_source_position_from_token.
2068 (cp_parser_late_parsing_default_args): Likewise.
2069 (yyparse): Call finish_file after clearing the_parser.
2071 2002-12-11 Geoffrey Keating <geoffk@apple.com>
2073 * Make-lang.in: Remove $(GGC_H) from all dependencies.
2074 (CXX_TREE_H): Add $(GGC_H).
2075 * class.c: Don't include ggc.h.
2076 (field_decl_cmp): Make parameters be 'const void *' to match qsort.
2077 (method_name_cmp): Likewise.
2078 (resort_data): New variable.
2079 (resort_field_decl_cmp): New.
2080 (resort_method_name_cmp): New.
2081 (resort_sorted_fields): New.
2082 (resort_type_method_vec): New.
2083 (finish_struct_methods): Delete cast.
2084 (finish_struct_1): Delete cast.
2085 * cp-tree.h: Include ggc.h.
2086 (struct lang_type_class): Add reorder attribute to field `methods'.
2087 (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
2088 (resort_sorted_fields): New prototype.
2089 (resort_type_method_vec): New prototype.
2090 * call.c: Don't include ggc.h.
2092 * decl2.c: Likewise.
2095 * method.c: Likewise.
2096 * optimize.c: Likewise.
2097 * parse.y: Likewise.
2100 * search.c: Likewise.
2101 * semantics.c: Likewise.
2105 * lang-specs.h: Remove comment.
2107 2002-12-03 Geoffrey Keating <geoffk@apple.com>
2109 * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
2110 (operator_name_info): Mark to be saved for PCH, specify size.
2111 (assignment_operator_name_info): Likewise.
2113 2002-11-19 Geoffrey Keating <geoffk@apple.com>
2115 * decl.c (anon_cnt): Mark to be saved for PCH.
2117 2002-10-25 Geoffrey Keating <geoffk@apple.com>
2119 * lex.c (init_reswords): Delete now-untrue comment.
2120 Allocate ridpointers using GGC.
2122 2002-10-04 Geoffrey Keating <geoffk@apple.com>
2124 * cp-tree.h (union lang_decl_u2): Add tags to all fields.
2126 * g++spec.c (lang_specific_driver): Don't include standard
2127 libraries in `added'.
2129 2002-08-27 Geoffrey Keating <geoffk@redhat.com>
2131 * decl2.c (finish_file): Call c_common_write_pch.
2132 * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
2134 2002-08-17 Geoffrey Keating <geoffk@redhat.com>
2136 * g++spec.c (lang_specific_driver): Treat .h files as C++ header
2137 files when using g++.
2138 * lang-specs.h: Handle compiling C++ header files.
2140 2003-01-09 Jakub Jelinek <jakub@redhat.com>
2142 * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
2144 2003-01-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2146 * pt.c (push_access_scope_real): Call push_to_top_level for
2147 function in namespace scope.
2148 (pop_access_scope): Call pop_from_top_level for function in
2151 2003-01-09 Jakub Jelinek <jakub@redhat.com>
2153 * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
2155 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
2157 * Make-lang.in (c++.install-common, c++.install-man,
2158 c++.uninstall): Prepend $(DESTDIR) to destination paths in
2159 all (un)installation commands.
2160 (c++.install-common): Rewrite $(LN) commands to support
2161 DESTDIR with "ln" as well as with "ln -s".
2163 2003-01-08 Jason Merrill <jason@redhat.com>
2165 * parser.c (cp_parser_primary_expression): See through explicitly
2166 scoped ALIAS_DECLs, too.
2168 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
2170 * decl.c: Remove some #if 0 code.
2172 * decl.c: ANSIfy function declarations.
2174 2003-01-07 Mark Mitchell <mark@codesourcery.com>
2176 * parser.c (cp_parser_asm_definition): Correct handling of omitted
2179 2003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2182 * decl.c (make_typename_type): Check access only when tf_error.
2183 (make_unbound_class_template): Likewise.
2184 * pt.c (saved_access_scope): New variable.
2185 (push_access_scope_real): New function.
2186 (push_access_scope): Likewise.
2187 (pop_access_scope): Likewise.
2188 (tsubst_default_argument): Use them.
2189 (instantiate_template): Likewise.
2190 (regenerate_decl_from_template): Likewise.
2191 (instantiate_decl): Likewise.
2192 (get_mostly_instantiated_function_type): Likewise.
2194 2003-01-07 Nathanael Nerode <neroden@gcc.gnu.org>
2196 * tree.c: Delete bogus #if 0 code.
2198 2003-01-07 Andreas Schwab <schwab@suse.de>
2200 * class.c (layout_class_type): Don't use
2201 PCC_BITFIELD_TYPE_MATTERS if not defined.
2203 2003-01-06 Mark Mitchell <mark@codesourcery.com>
2206 * decl2.c (build_cleanup): Mark the object as used.
2208 * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
2209 (hash_local_specialization): New function.
2210 (register_local_specialization): Revert 2003-01-05 change.
2211 (instantiate_decl): Use hash_local_specialization when creating
2212 the local_specializations table.
2214 * decl2.c (mark_used): Do not synthesize thunks.
2216 * class.c (layout_class_type): Correct handling of unnamed
2217 bitfields wider than their types.
2220 * parser.c (cp_parser): Remove default_arg_types. Update
2221 documentation for unparsed_functions_queues.
2222 (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
2224 (cp_parser_new): Don't set parser->default_arg_types.
2225 (cp_parser_function_definition): Adjust usage of
2226 unparsed_funtions_queues.
2227 (cp_parser_class_specifier): Don't mess with
2228 parser->default_arg_types. Handle default argument processing in
2229 a separate phase from function body processing.
2230 (cp_parser_template_declaration_after_export): Adjust usage of
2231 unparsed_functions_queues.
2232 (cp_parser_late_parsing_for_member): Do not handle default
2235 2003-01-06 Nathan Sidwell <nathan@codesourcery.com>
2238 * parser.c (cp_parser_declarator_kind): New enum.
2239 (cp_parser_declarator): Adjust.
2240 (cp_parser_direct_declarator): Adjust. Allow for either named or
2241 abstract declarator. Prefer abstract, if possible. Allow
2242 parenthesized function name.
2243 (cp_parser_condition): Adjust cp_parser_declarator call.
2244 (cp_parser_explicit_instantiation): Likewise.
2245 (cp_parser_init_declarator): Likewise.
2246 (cp_parser_type_id): Likewise.
2247 (cp_parser_function_definition): Likewise.
2248 (cp_parser_member_declaration): Likewise.
2249 (cp_parser_parameter_declaration): Use cp_parser_declarator to do
2250 the tentative parsing.
2251 (cp_parser_exception_declaration): Likewise.
2253 2003-01-05 Mark Mitchell <mark@codesourcery.com>
2255 * parser.c (cp_parser_template_parameter): Adjust call to
2256 cp_parser_parameter_declaration.
2257 (cp_parser_parameter_declaration_list): Likewise.
2258 (cp_parser_parameter_declaration): Replace
2259 greater_than_is_operator_p with template_parm_p parameter. Do not
2260 cache tokens for template default arguments.
2262 * pt.c (retrieve_local_specialization): Use htab_find, not
2263 htab_find_with_hash.
2264 (register_local_specialization): Use htab_find_slot, not
2265 htab_find_slot_with_hash.
2266 (instantiate_decl): Pass a hash function to htab_create.
2268 2003-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2270 * parser.c (cp_parser_binary_expression,
2271 cp_parser_multiplicative_expression,
2272 cp_parser_additive_expression, cp_parser_shift_expression,
2273 cp_parser_relational_expression, cp_parser_equality_expression,
2274 cp_parser_and_expression, cp_parser_exclusive_or_expression,
2275 cp_parser_inclusive_or_expression,
2276 cp_parser_logical_and_expression, cp_parser_logical_or_expression,
2277 cp_parser_binary_expression): Const-ify.
2279 2003-01-04 Mark Mitchell <mark@codesourcery.com>
2281 * method.c (use_thunk): Disable access control while building the
2284 2003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
2286 * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
2289 2003-01-03 Matt Austern <austern@apple.com>
2291 * cp-tree.h (struct lang_type_class): add field for key method
2292 (cp_global_trees): rename dynamic_classes to keyed_classes
2293 (key_method): add definition
2294 * class.c (finish_struct_1): compute class's key method, and add
2295 the class to keyed_classes list if there is no key method.
2296 * decl.c (finish_function): add class to keyed_classes list if we
2297 see a definition of the class's key method.
2298 * pt.c (instantiate_class_template): add template specialization
2299 of a dynamic class to keyed_classes list.
2300 * decl2.c (key_method): remove
2301 (finish_file): iterate only through keyed_classes list when
2302 deciding whether to emit vtables, remove class from its list after
2305 2003-01-02 Jason Merrill <jason@redhat.com>
2307 * call.c (build_conditional_expr): Stabilize lvalues properly.
2308 * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
2309 * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
2310 Don't allow CALL_EXPR or VA_ARG_EXPR, either.
2312 * call.c (convert_like_real): Call decl_constant_value for an
2313 IDENTITY_CONV even if there are no more conversions.
2315 * cvt.c (build_up_reference): Don't push unnamed temps.
2317 * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
2319 * dump.c (cp_dump_tree): Don't try to dump class-specific fields
2320 for a backend struct.
2322 * except.c (wrap_cleanups_r, build_throw): Make
2323 MUST_NOT_THROW_EXPRs void.
2324 * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
2326 * init.c (build_vec_delete_1): Pre-evaluate the base address.
2328 * init.c (get_temp_regvar): Simplify logic.
2330 * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
2331 our replacement is a decl.
2333 * decl.c (cp_make_fname_decl): Push the decls inside the
2336 2003-01-03 Nathan Sidwell <nathan@codesourcery.com>
2339 * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
2342 2003-01-03 Graham Stott <graham.stott@btinternet.com>
2344 * parser.c (struct cp_parser): Add access_checks_lists field
2345 (cp_parser_simple_declaration): Use.
2346 (cp_parser_init_declarator): Likewise.
2348 2003-01-02 Mark Mitchell <mark@codesourcery.com>
2350 * parser.c (cp_parser_declaration): Accept the __extension__
2351 keyword before the declaration.
2354 * parser.c (cp_parser_parameter_declaration): Allow attributes to
2355 appear after the declarator.
2357 * call.c (build_new_method_call): Fix typo in message format
2360 2003-01-02 Mark Mitchell <mark@codesourcery.com>
2362 * parser.c (cp_lexer_next_token_is): Declare it inline.
2363 (cp_lexer_set_source_position_from_token): Likewise.
2364 (cp_lexer_debugging_p): Likewise.
2365 (cp_parser_parsing_tentatively): Likewise.
2366 (cp_parser_nested_name_specifier_opt): Reduce the number of calls
2367 to the cp_lexer_peek_token.
2369 * parser.c (cp_parser_sizeof_operand): Do not evaluate the
2372 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
2374 * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
2375 cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
2376 cp/repo.c: Fix copyright years.
2378 2003-01-01 Neil Booth <neil@daikokuya.co.uk>
2380 * lex.c: Remove superfluous include of cpplib.h.
2381 (CONSTRAINT): Define without conditions.
2382 (init_cp_pragma): Use c_register_pragma.
2384 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
2386 * .cvsignore: Remove.
2388 2002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl>
2390 * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
2391 except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
2392 lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
2393 pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
2394 typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
2396 * lex.h: parse.y is dead, so don't mention it. Also replace the
2397 copyright header with the default GNU copyright header.
2399 2002-12-31 Mark Mitchell <mark@codesourcery.com>
2401 * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
2402 (lookup_name_namespace_only): Likewise.
2403 (begin_only_namespace_names): Likewise.
2404 (end_only_namespace_names): Likewise.
2405 * decl.c (only_namespace_names): Remove.
2406 (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
2407 (lookup_name_real): Do not check only_namespace_names.
2408 (lookup_name_namespace_only): Remove.
2409 (begin_only_namespace_names): Likewise.
2410 (end_only_namespace_names): Likewise.
2411 * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
2412 nested-name-specifiers more gracefully.
2413 (cp_parser_class_or_namespace_name): Avoid looking up namespace
2414 names when they cannot possibly appear.
2415 (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
2416 (cp_parser_elaborated_type_specifier): Likewise.
2417 (cp_parser_namespace_name): Only look for namespace names.
2418 (cp_parser_lookup_name): Add is_namespace parameter.
2419 (cp_parser_lookup_name_simple): Adjust call to
2420 cp_parser_lookup_name.
2422 * parser.c (cp_parser_dependent_type_p): Fix thinko.
2424 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
2426 * .cvsignore: Update.
2428 2002-12-31 Nathan Sidwell <nathan@codesourcery.com>
2430 * class.c (modify_vtable_entry): Remove unused variable.
2431 (get_vcall_index): Always expect a non-thunk.
2432 (update_vtable_entry_for_fn): Combine covariant adjustments, when
2433 overriding a thunk. Pass get_vcall_index a non-thunk.
2435 * decl2.c (finish_file): Mark undefined inlines as extern.
2437 2002-12-31 Mark Mitchell <mark@codesourcery.com>
2439 * cp-tree.def (RETURN_INIT): Remove.
2440 * cp-tree.h (DECL_IN_MEMORY_P): Remove.
2441 (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
2442 (note_level_for_for): Remove.
2443 (note_level_for_try): Likewise.
2444 (note_level_for_catch): Likewise.
2445 (finish_named_return_value): Likewise.
2446 (do_pushlevel): Change prototype.
2447 (pending_lang_change): Remove.
2448 * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
2450 (note_level_for_for): Remove.
2451 (note_level_for_try): Likewise.
2452 (note_level_for_catch): Likewise.
2453 (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
2454 * parser.c (cp_parser_context_free_list): Make it "deletable".
2455 (cp_parser_template_argument): Remove misleading comment.
2456 * pt.c (tsubst_expr): Remove RETURN_INIT code.
2457 * semantics.c (genrtl_named_return_value): Remove.
2458 (do_pushlevel): Take a scope kind as an argument.
2459 (begin_if_stmt): Adjust.
2460 (begin_while_stmt): Likewise.
2461 (begin_for_stmt): Likewise.
2462 (finish_for_init_stmt): Likewise.
2463 (begin_switch_stmt): Likewise.
2464 (begin_handler): Likewise.
2465 (begin_compound_stmt): Likewise.
2466 (finish_named_return_value): Remove.
2467 (cp_expand_stmt): Remove RETURN_INIT case.
2468 * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
2470 2002-12-31 Mark Mitchell <mark@codesourcery.com>
2473 * parser.c (cp_parser_direct_declarator): Handle erroneous
2474 parenthesized declarators correctly.
2476 2002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2478 * cp-tree.h (pending_lang_change): Declare.
2480 2002-12-30 Mark Mitchell <mark@codesourcery.com>
2482 * parser.c (cp_parser_context_free_list): New variable.
2483 (cp_parser_context_new): Use it.
2484 (cp_parser_error): Check return code from
2485 cp_parser_simulate_error.
2486 (cp_parser_simulate_error): Return a value.
2487 (cp_parser_id_expression): Optimize common case.
2488 (cp_parser_class_name): Likewise.
2489 (cp_parser_class_specifier): Adjust call to
2490 cp_parser_late_parsing_default_args.
2491 (cp_parser_lookup_name): Optimize common case.
2492 (cp_parser_late_parsing_for_member): Adjust call to
2493 cp_parser_late_parsing_default_args.
2494 (cp_parser_late_parsing_default_args): Add scope parameter.
2495 (cp_parser_require): Avoid creating the error message unless it's
2497 (cp_parser_parse_definitely): Place free'd contexts on the free
2500 * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
2502 2002-12-30 David Edelsohn <edelsohn@gnu.org>
2504 * parser.c (cp_parser_parameter_declaration_clause): Treat system
2505 header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
2507 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
2509 * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
2512 2002-12-30 Mark Mitchell <mark@codesourcery.com>
2516 * Make-lang.in (gt-cp-spew.h): Remove.
2517 * cp-tree.h (do_pending_lang_change): Remove.
2518 (do_identifier): Change prototype.
2519 (finish_id_expr): Remove.
2520 * decl.c (lookup_name_real): Remove yylex variable.
2521 * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
2522 * lex.c (init_cpp_parse): Remove.
2523 (reduce_cmp): Likewise.
2524 (token_cmp): Likewise.
2526 (lastiddecl): Likewise.
2527 (token_count): Likewise.
2528 (reduce_count): Likewise.
2530 (print_parse_statistics): Likewise.
2531 (do_pending_lang_change): Likewise.
2532 (do_identifier): Remove parsing parameter.
2533 * lex.h (lastiddecl): Remove.
2534 (looking_for_typename): Remove.
2535 (looking_for_template): Likewise.
2536 (pending_lang_change): Likewise.
2538 * semantics.c (finish_id_expr): Remove.
2540 * decl.c (grokdeclarator): Diagnost "extern thread" and "static
2543 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
2545 * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
2546 end, not the C front end.
2548 2002-12-30 Nathan Sidwell <nathan@codesourcery.com>
2550 * cp-tree.h (THUNK_TARGET): New macro.
2551 (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
2552 (finish_thunk): Remove offset parms.
2553 * class.c (find_final_overrider): Look through thunks.
2554 (get_vcall_index): Use THUNK_TARGET.
2555 (update_vtable_entry_for_fn): Look through thunks. Set covariant
2556 fixed offset here. Adjust finish_thunk call.
2557 (build_vtbl_initializer): Adjust finish_thunk calls.
2558 * mangle.c (mangle_call_offset): Remove superfluous if.
2559 (mangle_thunk): Adjust.
2560 * method.c (make_thunk): Adjust.
2561 (finish_thunk): Adjust.
2562 (thunk_adjust): Remove assert.
2563 (use_thunk): Use THUNK_TARGET
2564 * dump1.c (cp_dump_tree): Adjust thunk dumping.
2567 * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
2568 * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
2570 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
2572 Remove traditional C constructs 4/n.
2573 * decl2.c (grok_method_quals, warn_if_unknown_interface,
2574 grok_x_components, cp_build_parm_decl, build_artificial_parm,
2575 maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
2576 delete_sanity, check_member_template, check_java_method,
2577 check_classfn, finish_static_data_member_decl, grokfield,
2578 grokbitfield, grokoptypename, grok_function_init,
2579 cplus_decl_attributes, constructor_name, defer_fn,
2580 build_anon_union_vars, finish_anon_union, coerce_new_type,
2581 coerce_delete_type, comdat_linkage, maybe_make_one_only,
2582 key_method, import_export_vtable, import_export_class,
2583 output_vtable_inherit, import_export_decl, import_export_tinfo,
2584 build_cleanup, get_guard, get_guard_bits, get_guard_cond,
2585 set_guard, start_objects, finish_objects,
2586 start_static_storage_duration_function,
2587 finish_static_storage_duration_function, get_priority_info,
2588 start_static_initialization_or_destruction,
2589 finish_static_initialization_or_destruction,
2590 do_static_initialization, do_static_destruction,
2591 prune_vars_needing_no_initialization, write_out_vars,
2592 reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
2593 add_using_namespace, merge_functions, ambiguous_decl,
2594 lookup_using_namespace, lookup_using_namespace,
2595 qualified_lookup_using_namespace, set_decl_namespace,
2596 decl_namespace, current_decl_namespace, push_decl_namespace,
2597 pop_decl_namespace, push_scope, pop_scope, add_function,
2598 arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
2599 lookup_arg_dependent, do_namespace_alias,
2600 validate_nonmember_using_decl, do_nonmember_using_decl,
2601 do_toplevel_using_decl, do_local_using_decl,
2602 do_class_using_decl, do_using_directive, check_default_args,
2603 mark_used, handle_class_head): Use C90 prototypings. Use booleans.
2604 * parser.c (cp_parser_class_head): Use booleanss.
2605 * decl.c (walk_globals, walk_vtables): Likewise.
2606 * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
2607 walk_globals): Change return type from 'int' to 'bool'.
2608 * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
2609 throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
2610 build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
2611 get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
2612 qualifier_flags, tinfo_base_init, generic_initializer,
2613 ptr_initializer, dfs_class_hint_mark, ptm_initializer,
2614 dfs_class_hint_unmark, class_hint_flags, class_initializer,
2615 typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
2616 get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
2617 unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
2618 * repo.c (repo_compile_flags, repo_template_declared,
2619 repo_template_defined, repo_class_defined, repo_get_id,
2620 repo_template_used, repo_vtable_used, repo_inline_used,
2621 repo_tinfo_used, repo_template_instantiated, extract_string,
2622 open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
2623 finish_repo): Likewise.
2624 * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
2625 cxx_print_xnode): Likewise..
2626 * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
2627 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
2628 * cxxfilt.c (demangle_it, print_demangler_list, usage,
2629 standard_symbol_characters, hp_symbol_characters, main, fatal):
2631 (strip_underscore): Change type from 'int' to 'bool'.
2632 (main): Use boolean constants.
2634 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
2636 Remove traditional C constructs 3/n.
2637 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
2638 build_up_reference, warn_ref_binding, convert_to_reference,
2639 convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
2640 convert_to_void, convert, convert_force, build_type_conversion,
2641 build_expr_type_conversion, type_promotes_to,
2642 perform_qualification_conversions): Use C90 prototyping style.
2643 * decl2.c (grok_array_decl): Use boolean constant.
2644 (delete_sanity): Likewise.
2645 * typeck.c (build_unary_op): Likewise.
2646 * semantics.c (finish_switch_cond): Likewise.
2647 * parser.c (cp_parser_direct_new_declarator): Likewise.
2648 * init.c (build_new): Likewise.
2650 2002-12-27 Mark Mitchell <mark@codesourcery.com>
2652 * Make-lang.in (po-generated): Remove parse.c.
2653 (CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
2654 ($(srcdir)/cp/parse.h): Remove target.
2655 ($(srcdir)/cp/parse.c): Likewise.
2656 (gt-cp-parse.h): Likewise.
2657 (gt-cp-parser.h): New target.
2658 (c++.distclean): Do not remove parse.output.
2659 (c++.maintainer-clean): Do not remove parse.c or parse.h.
2660 (cp/spew.o): Remove target.
2661 (cp/lex.o): Adjust dependencies.
2662 (cp/pt.o): Likewise.
2663 (cp/parse.o): Likewise.
2664 (cp/TAGS): Do not mention parse.c.
2665 (cp/parser.o): New target.
2666 * NEWS: Mention the new parser.
2667 * call.c (build_scoped_method_call): Simplify.
2668 (build_method_call): Likewise.
2669 (build_new_function_call): Adjust calls to add_function_candidate
2670 and add_template_candidate.
2671 (build_new_op): Improve handling of erroroneous operands.
2672 (convert_default_arg): Remove circular argument processing.
2673 (name_as_c_string): New function.
2674 (build_new_method_call): Use it.
2675 (perform_implicit_conversion): Use error_operand_p.
2676 * class.c (finish_struct_anon): Use constructor_name_p.
2677 (check_field_decls): Likewise.
2678 (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
2679 (resolve_address_of_overloaded_function): Likewise.
2680 (instantiate_type): Tweak pointer-to-member handling.
2681 (get_primary_binfo): Remove incorrect assertion.
2682 * config-lang.in (gtfiles): Add parser.c, remove parse.c.
2683 * cp-tree.h (DEFARG_TOKENS): New macro.
2684 (default_arg): New structure.
2685 (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
2686 (lang_tree_node): Add default_arg.
2687 (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
2688 (type_info_ref_type): New macro.
2689 (saved_scope): Make processing_explicit_instantiation a boolean.
2690 (check_access): New field.
2691 (unparsed_text): Remove.
2692 (language_function): Remove unparsed_inlines.
2693 (error_operand_p): New macro.
2694 (lang_decl): Adjust pending_inline_info.
2695 (DEFARG_POINTER): Remove.
2696 (tag_types): Add typenames.
2697 (lookup_ualified_name): Declare.
2698 (lookup_name_real): Likewise.
2699 (shadow_tag): Adjust prototype.
2700 (get_scope_of_declarator): Declare it.
2701 (process_next_inline): Remove it.
2702 (check_for_missing_semicolon): Likewise.
2703 (maybe_get_template_decl_from_type_decl): Declare it.
2704 (finish_label_stmt): Adjust prototype.
2705 (finish_non_static_data_meber): Declare it.
2706 (finish_pseudo_destructor_call_expr): Rename to ...
2707 (finish_pseudo_destructor_expr): ... this.
2708 (finish_compound_literal): Declare it.
2709 (begin_inline_definitions): Remove it.
2710 (init_spew): Remove.
2711 (peekyylex): Likewise.
2712 (arbitrate_lookup): Likewise.
2713 (frob_opname): Likewise.
2714 (maybe_snarf_defarg): Likewise.
2715 (add_defarg_fn): Likewise.
2716 (do_pending_defargs): Likewise.
2717 (done_pending_defargs): Likewise.
2718 (unprocessed_defarg_fn): Likewise.
2719 (replace_defarg): Likewise.
2720 (end_input): Likewise.
2721 (get_overloaded_fn): Likewise.
2722 * cvt.c (convert_to_reference): Improve error handling.
2723 * decl.c (lookup_name_real): Do not declare it static.
2724 (maybe_push_to_top_level): Set check_access.
2725 (identifier_type_value): Adjust call to lookup_name_real.
2726 (lookup_qualified_name): New method.
2727 (lookup_name_real): Remove special-case parsing code.
2728 (lookup_name-nonclass): Adjust call to lookup_name_real.
2729 (lookup_name_namespace_only): Likewise.
2730 (lookup_name): Likewise.
2731 (check_tag_decl): Return the type declared.
2732 (shadow_tag): Likewise.
2733 (register_dtor_fn): Tweak check_access.
2734 (grokfndecl): Use constructor_name_p.
2735 (get_scope_of_declarator): New function.
2736 (grokdeclarator): Obscure tweaks for slightly different declarator
2738 (start_method): Return error_mark_node to indicate failure.
2739 (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
2740 * decl2.c (constructor_name_full): Simplify.
2741 (constructor_name): Use it.
2742 (build_expr_from_tree): Adjust for changes to do new parser.
2743 (push_scope): Improve robustness.
2744 (validate_nonmember_using_decl): Process declarations, not names.
2745 (do_class_using_decl): Likewise.
2746 (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
2748 * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
2749 * expr.c (cxx_expand_expr): Handle BASELINKs.
2750 * init.c (member_init_ok_or_else): Issue more errors.
2751 (build_offset_ref): Tweak handling of FUNCTION_DECLs.
2752 * lex.c: Do not include parse.h.
2753 (yypring): Do not declare.
2755 (make_reference_declarator): Remove error-generating code.
2756 (rid_to_yy): Remove.
2757 (cxx_init): Do not call init_spew.
2759 (check_for_missing_semicolon): Remove.
2760 * lex.h (got_scope): Remove.
2761 (got_object): Remove.
2762 * method.c (hack_identifier): Use finish_non_static_data_member.
2763 (implicitly_declare_fn): Adjust use of constructor_name.
2764 * parser.c: New file.
2765 * pt.c (parse.h): Do not include it.
2766 (maybe_get_template_decl_from_template): Do not declare it.
2767 (finish_member_template_decl): Tweak.
2768 (begin_explicit_instantiation): Adjust for
2769 processing_explicit_instantiation being boolean.
2770 (end_explicit_instantiation): Likewise.
2771 (maybe_process_partial_specialization): Tighten specialization
2773 (retrieve_local_specialization): Adjust ue of hash table.
2774 (eq_local_specializations): New function.
2775 (register_local_specialization): Likewise.
2776 (push_template_decl_real): Remove unnecessary test.
2777 (maybe_get_template_decl_from_type_decl): Don't make it static.
2778 (for_each_template_parm_r): Handle TYPEOF_TYPE.
2779 (tsubst_copy): Use retrieive_local_specialization to handle
2780 PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
2781 Handle COMPONENT_REFs with pseudo-destructor-expressions.
2782 Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
2783 (tsubst_expr): Pass decls, not names, to do_local_using_decl.
2784 (unify): Tweak handling of CONST_DECLs.
2785 (regenerate_decl_from_template): Use push_nested_class.
2786 (template_for_substitution): New funciton.
2787 (instantiate_decl): Use it. Register parameters as local
2789 * rtti.c (init_rtti_processing): Set type_info_ref_type.
2790 (build_typeid): Use it.
2791 (get_typeid): Likeise.
2792 * search.c (accessible_p): Use check_access, not
2793 flag_access_control.
2794 (adjust_result_of_qualified_name_lookup): Pay attention to the
2796 * semantics.c (finish_asm_stmt): Adjust error handling.
2797 (finish_label_stmt): Return the statement.
2798 (finish_non_static_data_member): New function.
2799 (finish_class_expr): Handle BASELINKs.
2800 (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
2801 (finish_object_call_expr): Simplify handling during templates.
2802 (finish_pseudo_destructor_call_expr): Rename to ...
2803 (finish_pseudo_dtor_expr): ... this.
2804 (finish_compound_literal): New function.
2805 (begin_inline_definitions): Remove.
2806 (finish_sizeof): Remove special template handling.
2807 * spew.c: Do not include parse.h.
2808 * tree.c (get_overloaded_fn): Remove.
2809 * typeck.c (build_class_member_access_expr): Handle
2810 PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
2811 (lookup_destructor): New function.
2812 (finish_class_member_access_expr): Use it.
2813 (convert_arguments): Simplify.
2814 (build_unary_op): Handle BASELINKs.
2816 2002-12-26 Nathan Sidwell <nathan@codesourcery.com>
2819 * decl2.c (mark_used): Defer inline functions.
2820 (finish_file): Merge deferred_fns loops. Check all used
2821 inline functions have a definition.
2822 * method.c (make_thunk): Thunks are not inline.
2824 PR c++/5116, c++/764
2825 * call.c (build_new_op): Make sure template class operands are
2828 2002-12-24 Nathan Sidwell <nathan@codesourcery.com>
2831 * cp-tree.h (resolve_scoped_fn_name): Prototype.
2832 * call.c (resolve_scoped_fn_name): New function. Deal with
2833 more template expansion. Broken out of ...
2834 * parse.y (parse_finish_call_expr): ... here. Call it.
2835 * decl2.c (build_expr_from_tree, CALL_EXPR): Use
2836 resolve_scoped_fn_name and build_call_from_tree.
2839 * decl.c (duplicate_decls): Templates may be disambiguated by
2843 * decl2.c (check_classfn): Use lookup_fnfield_1. List all
2844 conversion operators on failure.
2846 2002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2848 Remove traditional C constructs 2/n.
2849 * call.c (tourney, build_field_call, equal_functions, joust,
2850 compare_ics, build_over_call, build_java_interface_fn_ref,
2851 convert_like_real, op_error, build_object_call, resolve_args,
2852 build_vfield_ref, check_dtor_name, build_scoped_method_call,
2853 build_addr_func, build_call, build_method_call, null_ptr_cst_p,
2854 sufficient_parms_p, build_conv, non_reference, strip_top_quals,
2855 standard_conversion, reference_related_p,
2856 reference_compatible_p, convert_class_to_reference,
2857 direct_reference_binding, reference_binding,
2858 ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
2859 add_template_conv_candidate, any_viable, any_strictly_viable,
2860 build_this, splice_viable, print_z_candidates,
2861 build_user_type_conversion, build_new_function_call,
2862 conditional_conversion, build_conditional_expr, build_new_op,
2863 build_op_delete_call, enforce_access, call_builtin_trap,
2864 convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
2865 convert_default_arg, type_passed_as, convert_for_arg_passing,
2866 in_charge_arg_for_name, is_properly_derived_from,
2867 maybe_handle_implicit_object, maybe_handle_ref_bind,
2868 source_type, add_warning, can_convert, can_convert_arg,
2869 perform_implicit_conversion, can_convert_arg_bad,
2870 initialize_reference, add_conv_candidate,
2871 add_template_candidate_real, add_template_candidate): Ansify.
2873 2002-12-22 Nathan Sidwell <nathan@codesourcery.com>
2876 * cp-tree.h (grokoptypename): Add SCOPE parameter.
2877 * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
2878 if in a template scope.
2879 * parse.y (unoperator): Return the scope.
2880 (operator_name): Adjust grokoptypename call.
2882 2002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2884 * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
2885 * decl.c (make_unbound_class_template): Adjust. Check for tf_error.
2886 * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
2888 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
2890 * ChangeLog: Fix a typo.
2891 * class.c: Fix comment typos.
2892 * cp-tree.h: Likewise.
2894 2002-12-18 Jason Merrill <jason@redhat.com>
2896 Handle anonymous unions at the tree level.
2897 C++ ABI change: Mangle anonymous unions using the name of their
2898 first named field (by depth-first search). Should not cause
2899 binary compatibility problems, though, as the compiler previously
2900 didn't emit anything for affected unions.
2901 * cp-tree.def (ALIAS_DECL): New tree code.
2902 * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
2903 first field, not the largest.
2904 (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
2905 push the decl, and write it out at namespace scope.
2906 * decl.c (lookup_name_real): See through an ALIAS_DECL.
2907 (pushdecl): Add namespace bindings for ALIAS_DECLs.
2908 * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
2909 of a decl which doesn't have one.
2910 * typeck.c (build_class_member_access_expr): Don't recurse if
2911 we already have the type we want.
2913 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2916 * friend.c (make_friend_class): Allow partial specialization
2917 when declaration is not a template friend.
2919 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2922 * pt.c (lookup_template_class): Copy TREE_PRIVATE and
2923 TREE_PROTECTED to created decl nodes.
2925 2002-12-18 Mark Mitchell <mark@codesourcery.com>
2927 * class.c (build_base_field): Do not set DECL_PACKED on the
2930 2002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
2932 * cp-tree.h (struct tree_srcloc): Use location_t.
2933 (SOURCE_LOCUS): New.
2934 (SRCLOC_FILE, SRCLOC_LINE): Adjust.
2936 2002-12-17 Jason Merrill <jason@redhat.com>
2938 * decl.c (finish_function): Also complain about no return in
2940 * semantics.c (finish_return_stmt): Also call check_return_expr in
2942 * typeck.c (check_return_expr): In a template, just remember that we
2945 2002-12-16 Jason Merrill <jason@redhat.com>
2947 * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
2950 * semantics.c (do_pushlevel): Call pushlevel after adding the
2952 (do_poplevel): Call poplevel before adding the SCOPE_STMT.
2953 * parse.y (function_body): Go back to using compstmt.
2954 * decl.c (pushdecl): Skip another level to get to the parms level.
2956 * call.c (build_new_method_call): Use is_dummy_object to determine
2957 whether or not to evaluate the object parameter to a static member
2960 2002-12-14 Jason Merrill <jason@redhat.com>
2962 * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
2963 return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
2964 * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
2965 don't bother with an AGGR_INIT_EXPR.
2966 (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
2967 just generate a new decl normally. Take return slot parm.
2968 * cp-tree.h: Adjust prototype.
2970 2002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
2973 * cvt.c (convert_to_pointer_force): Don't try comparing against
2976 2002-12-13 Geoffrey Keating <geoffk@apple.com>
2978 * cp-tree.h: Have the multiple-include guards around
2981 2002-12-10 David Edelsohn <edelsohn@gnu.org>
2983 * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
2985 (snarf_method): Same.
2986 (snarf_defarg): Same.
2988 2002-12-10 Mark Mitchell <mark@codesourcery.com>
2991 * pt.c (tsubst_copy): Handle destructor names more correctly.
2993 2002-12-10 Matt Austern <austern@apple.com>
2995 * cp-tree.h: get rid of needs_virtual_reinit bit.
2997 2002-12-09 Mark Mitchell <mark@codesourcery.com>
2999 * NEWS: Document removal of in-class initialization extension for
3000 static data members of non-arithmetic, non-enumeration type.
3001 * decl.c (check_static_variable_definition): Do not allow that
3003 * decl2.c (grokfield): Do not call digest_init when processing
3006 2002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3008 * error.c (dump_expr): Fix format specifier warning.
3010 2002-12-04 Geoffrey Keating <geoffk@apple.com>
3012 * class.c (finish_struct_1): Correct comment.
3013 * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
3015 2002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3018 * error.c (dump_expr): Don't ever try to dump a non-existent
3021 2002-12-03 Nathan Sidwell <nathan@codesourcery.com>
3023 Implement covariant returns.
3024 * cp-tree.h (IS_AGGR_TYPE_2): Remove.
3025 (struct lang_decl_flags): Add this_thunk_p flag.
3026 Rename vcall_offset to virtual_offset.
3027 (struct lang_decl): Rename delta to fixed_offset.
3028 (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
3029 (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
3030 (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
3031 (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
3032 (make_thunk): Add this_adjusting arg.
3033 (finish_thunk): Declare.
3034 (mangle_thunk): Add this_adjusting arg.
3035 * class.c (get_vcall_index): Use base function for lookup.
3036 (update_vtable_entry_for_fn): Generate covariant thunk.
3037 (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
3038 (build_vtbl_initializer): Use base function for lookup.
3039 Finish covariant thunk here. Adjust thunk generation.
3040 * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
3041 Adjust thunk dumping.
3042 * mangle.c (mangle_call_offset): New function.
3043 (mangle_thunk): Adjust for covariant thunks.
3044 * method.c (make_thunk): Adjust. Do not set name here.
3045 (finish_thunk): New function. Set name here.
3046 (use_thunk): Generate covariant thunks too.
3047 (thunk_adjust): New function.
3048 * search.c (covariant_return_p): Remove. Fold into ...
3049 (check_final_overrider): ... here. Simplify.
3050 * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
3052 2002-12-03 Jason Merrill <jason@redhat.com>
3055 * call.c (build_over_call): Check specifically for TARGET_EXPR
3058 PR c++/8461, c++/8625
3059 * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
3060 (cp_convert_parm_for_inlining): Remove.
3061 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
3063 * cp-tree.h (ADDR_IS_INVISIREF): Remove.
3064 * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
3066 * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
3067 an ambiguous conversion.
3069 2002-12-03 Mark Mitchell <mark@codesourcery.com>
3072 * decl.c (reshape_init): Handle erroneous initializers.
3074 2002-12-02 Mark Mitchell <mark@codesourcery.com>
3077 * spew.c (remove_last_token): Make sure that last_chunk is set
3081 * error.c (dump_expr): Handle character constants with
3084 2002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3087 * decl.c (grokdeclarator): Require class-key for all friend class.
3088 Output the correct type and context in the error message.
3090 2002-12-01 Mark Mitchell <mark@codesourcery.com>
3093 * pt.c (unify): Use variably_modified_type_p to test validity of
3094 template argument types.
3097 * cp-tree.h (lang_type_class): Add typeinfo_var.
3098 (CLASSTYPE_TYPEINFO_VAR): New macro.
3099 * rtti.c (get_tinfo_decl): Use it.
3102 * init.c (expand_member_init): Always get the main variant of a
3105 2002-12-01 Mark Mitchell <mark@codesourcery.com>
3109 * decl.c (cxx_init_decl_processing): Use size_type_node, not
3111 * decl2.c (coerce_new_type): Likewise.
3112 * except.c (do_allocate_exception): Likewise.
3114 2002-11-30 Zack Weinberg <zack@codesourcery.com>
3116 * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
3117 dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
3118 lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
3119 repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
3120 typeck2.c: Include coretypes.h and tm.h.
3121 * Make-lang.in: Update dependencies.
3123 2002-11-30 Mark Mitchell <mark@codesourcery.com>
3126 * decl.c (layout_var_decl): Deal gracefully with erroneous types.
3127 (check_initializer): Validate the type of the initialized
3128 variable, even if the initializer is absent.
3129 * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
3132 * typeck.c (convert_for_assignment): Do not use
3133 decl_constant_value on the operand.
3136 * pt.c (instantiate_decl): Handle template friends defined outside
3137 of the class correctly.
3139 2002-11-29 Joe Buck <jbuck@synopsys.com>
3141 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
3144 2002-11-29 Mark Mitchell <mark@codesourcery.com>
3146 * class.c (walk_subobject_offsets): Recur on binfos as well as on
3148 (layout_nonempty_base_or_field): Pass it a binfo when processing a
3150 (layout_empty_base): Likewise.
3151 (build_base_field): Likewise.
3153 2002-11-27 Mark Mitchell <mark@codesourcery.com>
3155 * class.c (build_base_field): Make sure we get the canonical base
3156 when descending through primary bases.
3158 2002-11-26 Geoffrey Keating <geoffk@apple.com>
3160 * decl.c (check_initializer): Don't error on initialisation of
3161 a scalar with a brace-enclosed expression.
3163 2002-11-26 Nathan Sidwell <nathan@codesourcery.com>
3165 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
3166 (template_parms_equal): Remove prototype.
3167 * typeck.c (buuld_indirect_ref): Reformat.
3169 2002-11-25 Jason Merrill <jason@redhat.com>
3171 * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
3174 2002-11-25 Mark Mitchell <mark@codesourcery.com>
3176 * tree.c (cp_build_qualified_type_real): Correct handling of
3178 * class.c (walk_subobject_offsets): Fix thinko.
3179 (build_base_field): Record offsets of empty bases in primary
3181 (layout_class_type): Record offsets of empty bases in fields.
3183 * search.c (is_subobject_of_p_1): Fix thinko.
3184 (lookup_field_queue_p): Likewise.
3186 2002-11-24 Mark Mitchell <mark@codesourcery.com>
3188 * class.c (layout_class_type): Reuse tail padding when laying out
3191 2002-11-22 Mark Mitchell <mark@codesourcery.com>
3193 * rtti.c (qualifier_flags): Fix thinko.
3195 2002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3197 Remove traditional C constructs 1/n.
3198 * cp-tree.h (init_method, set_mangled_name_for_decl,
3199 build_opfncall, hack_identifier, make_thunk, use_thunk,
3200 synthesize_method, implicitly_declare_fn,
3201 skip_artificial_parms_for, optimize_function, calls_setjmp_p,
3202 maybe_clone_body): Remove use of PARAMS.
3204 * method.c (do_build_assign_ref, do_build_copy_constructor,
3205 synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
3207 (synthesize_method): Use 'bool' type and constants instead of
3209 (locate_copy): Likewise.
3210 (implicitly_declare_fn): Likewise.
3212 * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
3213 Remove old-style declaration.
3214 (maybe_clone_body): Use 'bool' type and constants.
3216 2002-11-21 Glen Nakamura <glen@imodulo.com>
3219 * typeck.c (get_member_function_from_ptrfunc): Make sure that a
3220 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
3221 of the branches of a COND_EXPR.
3223 2002-11-19 Mark Mitchell <mark@codesourcery.com>
3225 * pt.c (for_each_template_parm): Free allocated memory.
3226 * search.c (is_subobject_of_p_1): New function.
3227 (is_subobject_of_p): Avoid walking virtual bases multiple times.
3229 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
3231 * g++spec.c (lang_specific_spec_functions): New.
3233 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
3235 * ChangeLog: Follow spelling conventions.
3236 * class.c: Likewise.
3237 * decl2.c: Likewise.
3239 2002-11-14 Zack Weinberg <zack@codesourcery.com>
3241 * search.c (dfs_push_decls): Do not try to reorder elements
3242 3..n of method_vec if method_vec has only two elements.
3243 Reverse order of two tests to avoid accessing unallocated
3246 2002-11-14 Mark Mitchell <mark@codesourcery.com>
3248 * class.c (dfs_find_final_overrider): Adjust so that the most
3249 derived object is a binfo, rather than a class type.
3250 (find_final_overrider): Likewise.
3251 (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
3252 (add_vcall_offset): Likewise.
3254 2002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3257 * pt.c (instantiate_template): Push class scope for member
3259 (get_mostly_instantiated_function_type): Likewise. Don't call
3260 tsubst on context. Remove CONTEXTP and TPARMSP parameters.
3261 * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
3262 * mangle.c (write_encoding, write_unqualified_name): Adjust.
3264 2002-11-07 Mark Mitchell <mark@codesourcery.com>
3266 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
3267 vcall offfsets. Split out ...
3268 (add_vcall_offset): ... new function.
3271 * pt.c (for_each_template_parm): Add htab parameter.
3272 (process_partial_specialization): Adjust call.
3273 (push_template_decl_real): Likewise.
3274 (pair_fn_data): Add visited.
3275 (for_each_template_parm_r): Avoid walking duplicates more than
3277 (uses_template_parms): Adjust call to for_each_template_parm.
3279 2002-11-07 Mark Mitchell <mark@codesourcery.com>
3281 * class.c (add_implicitly_declared_members): Put implicitly
3282 declared functions at the end of TYPE_METHODs when -fabi-version
3285 2002-11-05 Geoffrey Keating <geoffk@apple.com>
3287 * decl2.c (finish_file): Correct spelling.
3289 2002-11-03 Mark Mitchell <mark@codesourcery.com>
3291 * call.c (build_special_member_call): Do not try to lookup VTTs by
3293 * class.c (vtbl_init_data): Add generate_vcall_entries.
3294 (get_vtable_decl): Do not look up virtual tables by name.
3295 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
3296 (set_primary_base): Do not set CLASSTYPE_RTTI.
3297 (determine_primary_base): Likewise.
3298 (get_matching_virtual): Remove.
3299 (get_vcall_index): New function.
3300 (update_vtable_entry_for_fn): Do not try to use virtual thunks
3301 when they are not required. Assign vcall indices at this point.
3302 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
3303 Do update dynamic_classes.
3304 (build_vtt): Do not add VTTs to the symbol table.
3305 (build_ctor_vtbl_group): Likewise.
3306 (build_vtbl_initializer): Simplify handling of vcall indices.
3307 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
3308 for the most derived class.
3309 (add_vcall_offset_vtbl_entries_1): But do not actually add them to
3311 * cp-tree.h (dynamic_classes): New macro.
3312 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
3313 (CLASSTYPE_RTTI): Remove.
3314 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
3315 (CLASSTYPE_VCALL_INDICES): New macro.
3316 (CLASSTYPE_VTABLES): Likewise.
3317 (BV_USE_VCALL_INDEX_P): Remove.
3318 (build_vtable_path): Remove.
3319 * decl2.c (finish_vtable_vardecl): Remove.
3320 (key_method): Remove #if 0'd code.
3321 (finish_vtable_vardecl): Rename to ...
3322 (maybe_emit_vtables): ... this.
3323 (finish_file): Use it.
3324 * search.c (look_for_overrides_here): Update comment.
3326 2002-11-01 Zack Weinberg <zack@codesourcery.com>
3329 * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
3331 2002-10-30 Jason Merrill <jason@redhat.com>
3334 * cp-tree.h (ADDR_IS_INVISIREF): New macro.
3335 * call.c (convert_for_arg_passing): Set it.
3336 * except.c (stabilize_throw_expr): Recurse for such an arg.
3338 2002-10-31 Mark Mitchell <mark@codesourcery.com>
3340 * cp-tree.h (lang_decl_flags): Remove init_priority.
3341 (lang_decl): Add delta.
3342 (GLOBAL_INIT_PRIORITY): Remove.
3343 (THUNK_DELTA): Revise definition.
3344 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
3345 * dump.c (cp_dump_tree): Don't dump it.
3347 2002-10-30 Mark Mitchell <mark@codesourcery.com>
3350 * typeck2.c (process_init_constructor): Call complete_array_type.
3353 * decl.c (make_typename_type): Issue errors about invalid results.
3355 2002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3357 Core issue 287, PR c++/7639
3358 * cp-tree.h (lang_type_class): Add decl_list field.
3359 (CLASSTYPE_DECL_LIST): New macro.
3360 (maybe_add_class_template_decl_list): Add declaration.
3361 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
3362 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
3363 (maybe_add_class_template_decl_list): New function.
3364 (add_implicitly_declared_members): Use it.
3365 * decl.c (maybe_process_template_type_declaration): Likewise.
3366 (pushtag): Likewise.
3367 * friend.c (add_friend): Likewise.
3368 (make_friend_class): Likewise.
3369 * semantics.c (finish_member_declaration): Likewise.
3370 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
3371 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
3372 to process members and friends in the order of declaration.
3374 2002-10-29 Mark Mitchell <mark@codesourcery.com>
3377 * decl.c (finish_destructor_body): Create the label to jump to
3378 when returning from a destructor here.
3379 (finish_function_body): Rather than here.
3381 2002-10-25 Zack Weinberg <zack@codesourcery.com>
3384 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
3385 SCOPE_REF is not null before dereferencing it.
3387 2002-10-25 Mark Mitchell <mark@codesourcery.com>
3389 * call.c (build_over_call): Use DECL_CONTEXT, not
3390 DECL_VIRTUAL_CONTEXT.
3391 * class.c (modify_vtable_entry): Don't mess with
3392 DECL_VIRTUAL_CONTEXT.
3393 (set_vindex): Remove.
3394 (set_primary_base): Remove vfuns_p parameter.
3395 (determine_primary_base): Likewise.
3396 (modify_all_vtables): Likewise.
3397 (layout_class_type): Likewise. Adjust calls to other functions
3399 (finish_struct_1): Adjust calls to modified functions. Set
3401 * cp-tree.h (lang_type_class): Remove vsize.
3402 (CLASSTYPE_VSIZE): Remove.
3403 (lang_decl): Remove thunks.
3404 (DECL_THUNKS): Adjust.
3405 (DECL_VIRTUAL_CONTEXT): Remove.
3406 (duplicate_decls): Don't copy it.
3407 * pt.c (build_template_decl): Don't set it.
3408 (tsubst_decl): Likewise.
3409 * typeck.c (expand_ptrmemfunc_cst): Don't use it.
3411 * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
3412 (build_vtable_entry): Remove.
3413 * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
3414 (lang_decl): Add thunks.
3415 (DECL_THUNKS): New macro.
3416 * decl.c (duplicate_decls): Copy it.
3417 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
3418 * semantics.c (emit_associated_thunks): Simplify.
3420 2002-10-24 David Edelsohn <edelsohn@gnu.org>
3423 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
3424 lang_type structure exists before accessing field.
3425 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
3426 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
3427 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
3428 * class.c (check_field_decls): Use new macros.
3429 * typeck2.c (process_init_constructor): Remove redundant check for
3430 existence of lang_type structure.
3432 2002-10-24 Mark Mitchell <mark@codesourcery.com>
3434 * class.c (end_of_base): New method.
3435 (end_of_class): Use it. Check indirect virtual bases.
3437 * class.c (check_field_decls): Fix typo.
3439 2002-10-23 Mark Mitchell <mark@codesourcery.com>
3442 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
3446 * spew.c (next_token): Do not return an endless stream of
3447 END_OF_SAVED_INPUT tokens.
3448 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
3449 the cached token stream.
3450 (snarf_defarg): Likewise.
3452 2002-10-23 Zack Weinberg <zack@codesourcery.com>
3454 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
3455 variably_modified_type_p.
3456 * cp-tree.h: Remove prototype of variably_modified_type_p.
3457 * tree.c (variably_modified_type_p): Remove; now implemented
3458 in language-independent code.
3460 2002-10-22 Mark Mitchell <mark@codesourcery.com>
3463 * spew.c (snarf_parenthesized_expression): New function.
3464 (snarf_block): Use it.
3466 2002-10-22 Richard Henderson <rth@redhat.com>
3468 * method.c (use_thunk): Always compute vcall_value; assert that
3469 it is not zero. Use can_output_mi_thunk; use output_mi_thunk
3470 for vcall thunks as well.
3472 2002-10-21 Mark Mitchell <mark@codesourcery.com>
3474 * class.c (empty_base_at_nonzero_offset_p): New function.
3475 (layout_nonempty_base_or_field): Do not check for conflicts when
3476 laying out a virtual base using the GCC 3.2 ABI.
3477 (build_base_field): Correct checking for presence of empty classes
3478 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
3480 * class.c (include_empty_classes): Use normalize_rli.
3481 (layout_class_type): Likewise.
3483 * decl.c (reshape_init): Tweak handling of character arrays.
3486 * cp-tree.h (lang_type_class): Add contains_empty_class_p.
3487 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
3488 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
3489 (check_field_decls): Likewise.
3490 (layout_class_type): Likewise.
3491 (finish_struct_1): Initialize it.
3492 (walk_subobject_offsets): Use it to prune searches.
3494 2002-10-20 Mark Mitchell <mark@codesourcery.com>
3496 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
3497 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
3498 TARGET_ASM_OUTPUT_MI_THUNK in comments.
3500 2002-10-18 Zack Weinberg <zack@codesourcery.com>
3502 * decl.c (start_decl): Point users of the old initialized-
3503 typedef extension at __typeof__.
3505 2002-10-18 Mark Mitchell <mark@codesourcery.com>
3507 * Make-lang.in (method.o): Depend on TARGET_H.
3508 * method.c (target.h): Include it.
3509 (use_thunk): Use target hooks. Use vcall thunks, if available.
3511 2002-10-18 Mark Mitchell <mark@codesourcery.com>
3513 * class.c (base_derived_from): Make sure return value is a bool.
3515 2002-10-18 Mark Mitchell <mark@codesourcery.com>
3517 * class.c (find_final_overrider_data_s): Remove overriding_fn and
3519 (dfs_base_derived_from): New function.
3520 (base_derived_from): Likewise.
3521 (dfs_find_final_overrider): Use base_derived_from.
3522 (find_final_overrider): Adjust.
3524 2002-10-18 Jason Merrill <jason@redhat.com>
3527 * semantics.c (finish_for_cond, finish_while_cond): Don't mess
3528 with condition decls in a template.
3530 2002-10-17 Nathan Sidwell <nathan@codesourcery.com>
3532 * class.c (add_method): Compare template parms too.
3534 2002-10-17 Mark Mitchell <mark@codesourcery.com>
3537 * class.c (handle_using_decl): Allow the declaration used to be
3538 from an ambiguous base.
3540 * pt.c (convert_template_argument): Revert this change:
3541 2002-10-16 Mark Mitchell <mark@codesourcery.com>
3542 * pt.c (convert_template_argument): Do not fold non-type
3543 template rguments when inside a template.
3545 * init.c (expand_default_init): Handle brace-enclosed initializers
3548 2002-10-16 Mark Mitchell <mark@codesourcery.com>
3550 * mangle.c (write_expression): Correct handling of enumeration
3552 (write_template_arg): Likewise.
3553 * pt.c (convert_template_argument): Do not fold non-type template
3554 arguments when inside a template.
3557 * cvt.c (convert_to_reference): Allow references as the incoming
3560 2002-10-16 Mark Mitchell <mark@codesourcery.com>
3563 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
3564 build_qualified_type.
3566 2002-10-15 Richard Henderson <rth@redhat.com>
3568 * error.c (dump_expr): Use real_to_decimal directly, and with
3571 2002-10-15 Mark Mitchell <mark@codesourcery.com>
3573 * decl.c (reshape_init): Fix typo.
3575 * cp-tree.h (operator_name_info_t): Add arity.
3576 * lex.c (init_operators): Initialize it.
3577 * mangle.c (write_conversion_operator_name): New function.
3578 (write_unqualified_name): Use it.
3579 (write_template_args): Accept template arguments as a TREE_LIST.
3580 (write_expression): Adjust handling of qualified names to match
3583 2002-10-15 Jason Merrill <jason@redhat.com>
3585 * call.c (call_builtin_trap): New fn.
3586 (convert_arg_to_ellipsis): Use it. Downgrade error to warning.
3587 (build_call): Don't set current_function_returns_abnormally outside
3590 2002-10-14 Mark Mitchell <mark@codesourcery.com>
3592 * class.c (check_field_decls): Remove empty_p parameter. Instead,
3593 clear CLASSTYPE_EMPTY_P.
3594 (build_base_field): Likewise.
3595 (build_base_fields): Likewise.
3596 (check_bases_and_members): Likewise.
3597 (create_vtbl_ptr): Likewise.
3598 (layout_class_type): Likewise. Ensure that empty classes have
3599 size zero when used as base classes in the 3.2 ABI.
3600 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
3601 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
3603 (is_empty_class): Correct definition when using post-3.2 ABI.
3604 * cp-tree.h (lang_type_class): Add empty_p.
3605 (CLASSTYPE_EMPTY_P): New macro.
3607 2002-10-12 Nathan Sidwell <nathan@codesourcery.com>
3609 * init.c (build_delete): Do not apply save_expr for arrays.
3610 (build_vec_delete): Likewise.
3612 2002-10-14 Mark Mitchell <mark@codesourcery.com>
3614 * decl.c (layout_var_decl): Call layout_decl even for variables
3615 whose type is an array with unspecified bounds.
3618 * lex.c (do_identifier): Add another option for the parsing
3620 * parse.y (do_id): Use it.
3622 2002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
3624 PRs C++/6803, C++/7721 and C++/7803
3625 * decl.c (grokdeclarator): Gracefully handle template-name as
3628 2002-10-11 Jason Molenda <jmolenda@apple.com>
3630 * init.c (build_field_list): Provide uses_unions_p with a default
3633 2002-10-11 Mark Mitchell <mark@codesourcery.com>
3636 * cp-tree.h (variably_modified_type_p): New function.
3637 (grokdeclarator) Tighten check for variably modified types as
3639 * pt.c (convert_template_argument): Do not allow variably modified
3640 types as template arguments.
3641 * tree.c (variably_modified_type_p): New function.
3643 * NEWS: Document removal of "new X = ..." extension.
3644 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
3645 brace-enclosed initializers.
3646 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
3647 (initialize_local_var): Remove declaration.
3648 (expand_static_init): Likewise.
3649 * decl.c (next_initializable_field): New function.
3650 (reshape_init): Likewise.
3651 (check_initializer): Use them. Build dynamic initializer for
3652 aggregates here too.
3653 (initialize_local_var): Simplify, and incorporate cleanup
3654 insertion code as well.
3655 (destroy_local_var): Remove.
3656 (cp_finish_decl): Tidy.
3657 (expand_static_init): Fold checks for whether or not a variable
3658 needs initialization into this function. Simplify.
3659 * decl2.c (do_static_initialization): Simplify.
3660 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
3661 be done for us automatically.
3662 (expand_default_init): Handle brace-enclosed initializers
3664 (expand_aggr_init_1): Remove RTL-generation code.
3665 (build_vec_init): Remove "new X = ..." support.
3666 * parse.y (new_initializer): Likewise.
3667 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
3668 brace-enclosed initializer.
3669 (create_pseudo_type_info): Likewise.
3670 * typeck2.c (store_init_value): Don't try to handle digest_init
3671 being called more than once.
3672 (digest_init): Tidy handling of brace-enclosed initializers.
3674 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3676 * decl.c (typename_hash): Use htab_hash_pointer.
3678 2002-10-10 Jim Wilson <wilson@redhat.com>
3680 * decl.c (duplicate_decls): Don't call decl_attributes.
3682 2002-10-09 Zack Weinberg <zack@codesourcery.com>
3685 * decl.c (start_decl): Unconditionally issue error for
3686 'typedef foo = bar'.
3687 (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
3688 (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
3690 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3692 * decl2.c (prune_vtable_vardecl): Delete unused function.
3694 2002-10-03 Mark Mitchell <mark@codesourcery.com>
3697 * decl2.c (finish_anon_union): Do not expand anonymous unions when
3698 procesing template functions.
3699 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
3700 type. Call layout_decl.
3701 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
3703 2002-10-07 Richard Henderson <rth@redhat.com>
3705 * decl2.c, pt.c: Revert c++/7754 fix.
3707 2002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3710 * error.c (dump_expr) [REAL_CST]: Output in decimal format.
3712 2002-10-03 Mark Mitchell <mark@codesourcery.com>
3715 * pt.c (for_each_template_parm_r): Handle BASELINKs.
3718 * decl2.c (finish_anon_union): Do not expand anonymous unions when
3719 procesing template functions.
3720 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
3721 type. Call layout_decl.
3722 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
3724 2002-10-03 Mark Mitchell <mark@codesourcery.com>
3727 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
3728 template parameters.
3729 (globals): Add entity and need_abi_warning.
3730 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
3731 CLASSTYPE_TEMPLATE_INFO.
3732 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
3734 (write_prefix): Handle typename types correctly.
3735 (write_template_prefix): Handle template template parameters
3737 (start_mangling): Add entity parameter.
3738 (finish_mangling): Warn about names whose mangling will change.
3739 (mangle_decl_string): Adjust.
3740 (mangle_type_string): Likewise.
3741 (mangle_special_for_type): Likewise.
3742 (mangle_ctor_vtbl_for_type): Likewise.
3743 (mangle_thunk): Likewise.
3744 (mangle_guard_variable): Likewise.
3745 (mangle_ref_init_variable): Likewise.
3747 2002-10-02 Mark Mitchell <mark@codesourcery.com>
3750 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
3751 * cp-tree.h (emit_base_init): Rename to ....
3752 (emit_mem_initializers): ... this.
3753 (expand_member_init): Change prototype.
3754 * init.c (perform_member_init): Compute explicit, rather than
3755 requiring it as a parameter.
3756 (sort_member_init): Rename to ...
3757 (sort_mem_initializers): ... this. Process bases and data members
3759 (sort_base_init): Remove.
3760 (emit_base_init): Rename to ...
3761 (emit_mem_initializers): ... this.
3762 (expand_aggr_vbase_init_1): Remove.
3763 (construct_virtual_bases): Rename to ...
3764 (construct_virtual_base): ... this.
3765 (expand_member_init): Rework handling of base initializers.
3766 * method.c (do_build_copy_constructor): Use
3767 finish_mem_initializers.
3768 * parse.y (member_init): Adjust calls to expand_member_init.
3769 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
3770 (tsubst_initializer_list): Use expand_member_init.
3771 * semantics.c (finish_mem_intiailizers): Simplify.
3773 2002-10-02 Matt Austern <austern@apple.com>
3774 * decl.c (walk_vtables_r): Fixed typo that caused result to
3775 never get a nonzero value.
3777 2002-10-02 Roger Sayle <roger@eyesopen.com>
3779 PR optimization/6627
3780 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
3781 from here, and move it to tree.h.
3782 * decl.c (cxx_init_decl_processing): If storing the vbit
3783 in function pointers, ensure that force_align_functions_log
3786 2002-10-02 Matt Austern <austern@apple.com>
3788 * class.c (check_field_decls): Changed warning about const member
3789 variables so that it doesn't get issued for a class aggregate.
3791 2002-10-01 Mark Mitchell <mark@codesourcery.com>
3793 * decl.c (cp_finish_decl): Make sure array types are laid out,
3794 even if the array bounds are unknown.
3796 2002-10-01 Steve Ellcey <sje@cup.hp.com>
3798 * class.c (build_vtbl_initializer): Change build_c_cast
3801 2002-10-01 Mark Mitchell <mark@codesourcery.com>
3803 * decl.c (cp_finish_decl): Make sure array types are laid out,
3804 even if the array bounds are unknown.
3806 * decl.c (cp_finish_decl): Correct check for dynamic
3807 initialization of thread-local storage.
3809 2002-09-30 Nathan Sidwell <nathan@codesourcery.com>
3811 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
3814 2002-09-30 Steve Ellcey <sje@cup.hp.com>
3816 * class.c (build_vtbl_initializer): Add cast.
3817 (add_vcall_offset_vtbl_entries_1):
3818 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
3820 2002-09-30 Mark Mitchell <mark@codesourcery.com>
3822 * class.c (walk_subobject_offsets): Correct the calculation of
3823 offsets for virtual bases. Correct the counting of array
3825 (layout_nonempty_base_or_field): Simplify. Correct the
3826 calculation of offsets to be propagated through the binfo
3828 (build_base_field): Avoid creating a FIELD_DECL for empty bases.
3829 Add the FIELD_DECL to TYPE_FIELDS.
3830 (build_base_fields): Adjust accordingly.
3831 (layout_virtual_bases): Use build_base_field.
3832 (end_of_class): Return a tree, not an integer.
3833 (warn_about_ambiguous_direct_bases): Rename to ...
3834 (warn_about_ambiguous_bases): ... this.
3835 (include_empty_classes): New function.
3836 (layout_class_type): Create an alternative version of the type to
3837 be used when as a base class type. Do not call
3838 finish_record_layout until we are done laying out the class.
3839 * cp-tree.h (lang_type_class): Remove size, size_unit. Add
3841 (CLASSTYPE_SIZE): Reimplement.
3842 (CLASSTYPE_SIZE_UNIT): Likewise.
3843 (CLASSTYPE_ALIGN): Likweise.
3844 (CLASSTYPE_USER_ALIGN): Likewise.
3845 (CLASSTYPE_AS_BASE): New macro.
3846 (DECL_INITIALIZED_P): Likewise.
3847 (extract_init): Remove prototype.
3848 (build_forced_zero_init): Rename to ...
3849 (build_zero_init): ... this.
3850 (force_store_init_value): Remove.
3851 * decl.c (obscure_complex_init): Remove.
3852 (duplicate_decls): Copy DECL_INITIALIZED_P.
3853 (check_initializer): Do not leave junk in DECL_INITIAL.
3854 (cp_finish_decl): Handle zero-initialization of entities with
3855 static storage duration.
3856 * expr.c (extract_init): Remove.
3857 * init.c (build_forced_zero_init): Remove.
3858 (build_zero_init): New function.
3859 (build_default_init): Use it.
3860 (build_field_list): Skip FIELD_DECLs for base subobjects.
3861 (push_base_cleanups): Likewise.
3862 * method.c (do_build_assign_ref): Likewise.
3863 (synthesize_exception_spec): Likewise.
3864 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
3865 (regenerate_decl_from_template): To not set DECL_INITIAL for a
3866 static data member whose initialization took place in its class.
3867 (instantiate_decl): Do not pass an initializer to cp_finish_decl
3869 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
3870 (dfs_unuse_fields): Likewise.
3871 * tree.c (pod_type_p): Handle error_mark_node.
3872 (zero_init_p): Likewise.
3873 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
3875 * typeck2.c (store_init_value): Remove #if 0'd code.
3876 (force_store_init_value): Remove.
3877 (process_init_constructor): Use build_zero_init.
3879 2002-09-29 Nathan Sidwell <nathan@codesourcery.com>
3882 * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
3884 2002-09-29 Kazu Hirata <kazu@cs.umass.edu>
3886 * cp-tree.h: Fix comment typos.
3890 2002-09-25 Mark Mitchell <mark@codesourcery.com>
3892 * cp/class.c (contains_empty_class_p): New method.
3893 (walk_subobject_offsets): Correct computation of field offset.
3894 (layout_empty_base): Correct placement of emtpy base classes.
3895 (layout_class_type): Warn about ABI changes.
3897 2002-09-23 Mark Mitchell <mark@codesourcery.com>
3899 * cp/class.c (layout_virtual_bases): Do not round the size of the
3900 type to a multiple of the alignment before laying out virtual bases.
3901 (layout_class_type): Correct handling of bit-fields that are wider
3902 than their type inside unions. Round the size of the type to a
3903 even number of bytes when computing the size without virtual
3905 * cp/cp-tree.h (abi_version_at_least): New macro.
3907 2002-09-21 Kazu Hirata <kazu@cs.umass.edu>
3909 * ChangeLog: Follow spelling conventions.
3910 * ChangeLog.2: Likewise.
3912 * class.c: Likewise.
3913 * cp-tree.h: Likewise.
3916 * decl2.c: Likewise.
3917 * except.c: Likewise.
3918 * friend.c: Likewise.
3919 * g++spec.c: Likewise.
3922 * mangle.c: Likewise.
3923 * method.c: Likewise.
3924 * operators.def: Likewise.
3925 * optimize.c: Likewise.
3928 * search.c: Likewise.
3929 * semantics.c: Likewise.
3932 * typeck.c: Likewise.
3934 2002-09-18 Devang Patel <dpatel@apple.com>
3936 * cp/cp-tree.h: New prototype for walk_vtabls().
3937 * cp/decl.c (walk_vtables_r): New function.
3938 (struct cp_binding_level): Add new members, namespaces,
3939 names_size and vtables.
3940 (add_decl_to_level): Add decl in namespaces or vtables
3941 chain, if conditions match.
3942 (walk_vtables): New function.
3943 (walk_namespaces_r): Travers separate namespace chain
3944 for namespace decls.
3945 (wrapup_globals_for_namespace): Use names_size instead
3947 * cp/decl2.c (finish_file): Use walk_vtables() instead of
3948 walk_globals() to walk vtable decls.
3950 2002-09-18 Nathan Sidwell <nathan@codesourcery.com>
3952 * decl.c (grokdeclarator): Use assert, not internal_error. Don't
3953 ICE with invalid pointers & references.
3955 2002-09-17 Zack Weinberg <zack@codesourcery.com>
3957 * Make-lang.in: Remove all references to the demangler.
3958 * cxxfilt.c: Moved to binutils.
3960 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
3963 * pt.c (tsubst_decl): Remove assert.
3965 Remove DR 295 implementation.
3966 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
3967 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
3968 about ignoring volatile qualifiers.
3970 * search.c (lookup_member): Correct documentation.
3972 2002-09-16 Geoffrey Keating <geoffk@apple.com>
3974 * cp-tree.h (union lang_tree_node): Add chain_next option.
3976 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
3978 * parse.y (parse_finish_call_expr): Check lookup_member result.
3981 * semantic.c (finish_asm_stmt): Fix operand/output_operands
3983 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
3985 2002-09-15 Nathan Sidwell <nathan@codesourcery.com>
3988 * call.c (build_over_call): Convert this pointer for fns found by
3991 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
3993 * ChangeLog: Follow spelling conventions.
3994 * ChangeLog.1: Likewise.
3996 2002-09-14 Nathan Sidwell <nathan@codesourcery.com>
3999 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
4001 2002-09-14 Kazu Hirata <kazu@cs.umass.edu>
4003 * error.c: Fix comment formatting.
4004 * except.c: Likewise.
4006 * friend.c: Likewise.
4007 * g++spec.c: Likewise.
4010 * mangle.c: Likewise.
4011 * method.c: Likewise.
4012 * optimize.c: Likewise.
4015 * search.c: Likewise.
4016 * semantics.c: Likewise.
4019 * typeck.c: Likewise.
4020 * typeck2.c: Likewise.
4022 2002-09-13 Matt Austern <austern@apple.com>
4025 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
4026 * cp/call.c: Change call-by-const-reference mechanism to use
4027 non_cast_lvalue_p when deciding whether the create a temporary.
4028 We need a temporary when passing, e.g. (long) x by const ref.
4030 2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
4032 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
4034 2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
4036 * decl.c: Fix comment formatting.
4037 * decl2.c: Likewise.
4039 2002-09-12 Kazu Hirata <kazu@cs.umass.edu>
4041 * call.c: Fix comment formatting.
4042 * class.c: Likewise.
4043 * cp-lang.c: Likewise.
4044 * cp-tree.h: Likewise.
4047 2002-09-11 Zack Weinberg <zack@codesourcery.com>
4049 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
4050 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
4051 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
4052 minor adjustments (use version_string, eliminate yet another
4053 duplicate of xmalloc)
4055 2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4057 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
4059 2002-09-05 Jason Merrill <jason@redhat.com>
4061 * typeck2.c (add_exception_specifier): Only pedwarn for an
4063 (require_complete_eh_spec_types): New fn.
4064 (cxx_incomplete_type_diagnostic): Also support pedwarning.
4065 * typeck.c (complete_type_or_diagnostic): Likewise.
4066 * call.c (build_call): Call require_complete_eh_spec_types.
4067 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
4068 on an incomplete type.
4070 2002-09-04 Jakub Jelinek <jakub@redhat.com>
4072 * decl.c (start_cleanup_fn): Clear interface_only before
4073 start_function, restore it afterwards.
4075 2002-09-02 Nathan Sidwell <nathan@codesourcery.com>
4077 * cp-tree.h (finish_builtin_type): Remove.
4078 * decl2.c (finish_builtin_type): Move to common code.
4079 * decl.c (build_ptrmemfunc_type): Adjust.
4080 * rtti.c (create_pseudo_type_info): Adjust.
4081 (create_tinfo_types): Adjust.
4083 2002-08-31 Jason Merrill <jason@redhat.com>
4085 * cp-lang.c (cp_expr_size): Allow initialization from a
4088 2002-08-30 Richard Henderson <rth@redhat.com>
4091 * tree.c: Include target.h.
4092 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
4094 * Makefile.in (tree.o): Update.
4096 2002-08-27 Mark Mitchell <mark@codesourcery.com>
4098 * class.c (layout_virtual_bases): Warn about bugs in G++ that
4099 result in incorrect object layouts.
4100 (layout_class_type): Likewise.
4102 2002-08-24 Matt Austern <austern@apple.com>
4104 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
4106 (real_lvalue_p): Update caller.
4108 (non_cast_lvalue_or_else): New.
4109 * tree.h: Declare it.
4110 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
4112 2002-08-22 Mark Mitchell <mark@codesourcery.com>
4114 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
4115 and COND_EXPR specially; fix error message output.
4117 2002-08-22 Jason Merrill <jason@redhat.com>
4119 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
4120 * semantics.c (nullify_returns_r): Likewise.
4122 2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
4125 * typeck.c (finish_class_member_access_expr): Diagnose cases where
4126 name lookup finds nothing.
4128 2002-08-15 Jason Merrill <jason@redhat.com>
4130 * semantics.c (finish_then_clause): Remove redundant assignment.
4131 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
4132 extra binding level outside the if/switch statement.
4133 (finish_while_cond, finish_for_cond): Rewrite complex condition
4136 2002-08-15 Alexandre Oliva <aoliva@redhat.com>
4138 * parse.y (sizeof, alignof, typeof): New non-terminals to
4139 increment skip_evaluation. Replace terminals with them and
4140 decrement skip_evaluation at the end of rules using them.
4141 * decl2.c (mark_used): Don't assemble_external if
4142 skipping evaluation.
4144 2002-08-15 Gabriel Dos Reis <gdr@nerim.net>
4147 * parse.y (parse_finish_call_expr): Handle incomplete
4148 type used to name a scope.
4150 2002-08-15 Nathan Sidwell <nathan@codesourcery.com>
4153 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
4154 regression caused by my 2002-08-08 patch.
4156 2002-08-13 Mark Mitchell <mark@codesourcery.com>
4158 * decl.c (pushdecl_class_level): Honor requests to bind names to
4161 2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4163 * decl2.c (build_call_from_tree): Fix uninitialized variable.
4164 * parse.y (parse_finish_call_expr): Likewise.
4165 * repo.c (old_args, old_dir, old_main): Const-ify.
4167 2002-08-11 Gabriel Dos Reis <gdr@nerim.net>
4169 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
4170 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
4171 * optimize.c (maybe_clone_body): Likewise.
4172 * pt.c (tsubst_enum): Likewise.
4173 (lookup_template_class): Likewise.
4174 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
4176 2002-08-10 Neil Booth <neil@daikokuya.co.uk>
4178 * lang-specs.h: Remove -ansi.
4180 2002-08-10 Nathan Sidwell <nathan@codesourcery.com>
4182 * tree.c (maybe_dummy_object): Replace // with /* */
4184 2002-08-09 Mark Mitchell <mark@codesourcery.com>
4186 * call.c (standard_conversion): Use build_ptrmem_type.
4187 * cp-tree.h (build_ptrmem_type): New function.
4188 (adjust_result_of_qualified_name_lookup): Likewise.
4189 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
4190 static data members.
4191 (build_ptrmem_type): New function.
4192 (grokdeclarator): Do not use build_offset_type when encountering a
4194 * parse.y (parse_finish_call_expr): Use
4195 adjust_result_of_qualified_name_lookup.
4196 * search.c (adjust_result_of_qualified_name_lookup): New function.
4197 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
4198 accessing OFFSET_TYPEs directly.
4200 2002-08-08 Mike Stump <mrs@apple.com>
4202 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
4203 (type_decays_to): Likewise.
4204 * class.c (find_final_overrider): Likewise.
4205 (maybe_note_name_used_in_class): Likewise.
4206 * decl.c (current_tmpl_spec_kind): Likewise.
4207 (add_binding): Likewise.
4208 (push_class_binding): Likewise.
4209 (duplicate_decls): Likewise.
4210 (layout_var_decl): Likewise.
4211 (grokfndecl): Likewise.
4212 (grokdeclarator): Likewise.
4213 (check_default_argument): Likewise.
4214 * decl2.c (handle_class_head): Likewise.
4215 * error.c (dump_template_decl): Likewise.
4216 * init.c (build_offset_ref): Likewise.
4217 * pt.c (check_specialization_scope): Likewise.
4218 (determine_specialization): Likewise.
4219 (check_explicit_specialization): Likewise.
4220 (maybe_check_template_type): Likewise.
4221 (process_partial_specialization): Likewise.
4222 (check_default_tmpl_args): Likewise.
4223 (push_template_decl_real): Likewise.
4224 (convert_template_argument): Likewise.
4225 (try_class_unification): Likewise.
4226 (get_bindings_real): Likewise.
4227 (do_decl_instantiation): Likewise.
4228 * semantics.c (begin_function_definition): Likewise.
4229 (finish_member_declaration): Likewise.
4230 (check_multiple_declarators): Likewise.
4231 * typeck.c (comp_array_types): Likewise.
4232 (comptypes): Likewise.
4233 (expr_sizeof): Likewise.
4234 (build_binary_op): Likewise.
4235 (dubious_conversion_warnings): Likewise.
4236 (check_return_expr): Likewise.
4238 2002-08-08 Mark Mitchell <mark@codesourcery.com>
4240 * typeck.c (build_class_member_access_expr): Do not return
4241 error_mark_node when no error has occurred.
4243 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
4245 * typeck.c (build_component_addr): Remove.
4246 (build_unary_op): Just check it's not a bitfield, and then build
4249 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
4251 * class.c (convert_to_base): Correct check for error_mark_node.
4252 (create_vtable_ptr): Remove unused VFUNS_P parm.
4254 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
4256 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
4258 2002-08-07 Mark Mitchell <mark@codesourcery.com>
4260 Rework build_component_ref.
4261 * call.c (build_vfield_ref): Do not go through build_component_ref.
4262 (build_field_call): Use build_class_member_access_expr.
4263 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
4264 (build_object_call): Likewise.
4265 * class.c (convert_to_base): New function.
4266 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
4267 (instantiate_type): Handle BASELINKs.
4268 * cp-tree.def (BASELINK): New tree code.
4269 * cp-tree.h (BASELINK_P): Reimplement.
4270 (SET_BASELINK_P): Remove.
4271 (BASELINK_BINFO): Reimplement.
4272 (BASELINK_FUNCTIONS): Likewise.
4273 (BASELINK_ACCESS_BINFO): Likewise.
4274 (BASELINK_OPTYPE): Likewise.
4275 (convert_to_base): New function.
4277 (build_object_ref): Remove.
4278 (build_component_ref_1): Likewise.
4279 (build_component_ref): Likewise.
4280 (build_x_component_ref): Likewise.
4281 (build_class_member_access_expr): New function.
4282 (finish_class_member_access_expr): Likewise.
4283 (build_ptrmemfunc_access_expr): Likewise.
4284 * decl.c (grokdeclarator): Handle BASELINKs.
4285 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
4286 finish_class_member_access_expr.
4287 (arg_assoc): Handle BASELINKs.
4288 (do_class_using_decl): Likewise.
4289 * error.c (dump_decl): Likewise.
4290 (dump_expr): Use build_ptrmemfunc_access_expr.
4291 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
4293 (build_throw): Use BASELINK_FUNCTIONS.
4294 * init.c (perform_member_init): Use
4295 build_class_member_access_expr.
4296 (build_offset_ref): Handle BASELINKs. Use
4297 build_class_member_access_expr.
4298 * method.c (hack_identifier): Likewise.
4299 * parse.y (do_id): Use BASELINK, not TREE_LIST.
4300 (primary): Remove uses of build_object_ref.
4301 * pt.c (lookup_template_function): Handle BASELINKs.
4302 (resolve_overloaded_unification): Likewise.
4303 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
4304 (lookup_field): Use BASELINK, not TREE_LIST.
4305 (lookup_fnfiels): Likewise.
4306 (setup_class_bindings): Likewise.
4307 * semantics.c (finish_object_call_expr): Do not use
4308 build_method_call when we already know what function is being
4310 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
4311 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
4313 (name_p): New function.
4314 * typeck.c (build_object_ref): Remove.
4315 (build_component_ref_1): Likewise.
4316 (build_x_component_ref): Likewise.
4317 (build_class_member_access_expr): New function.
4318 (finish_class_member_access_expr): Likewise.
4319 (build_ptrmemfunc_access_expr): Likewise.
4320 (get_member_function_from_ptrfunc): Use
4321 build_ptrmemfunc_access_expr.
4322 (build_binary_op): Likewise.
4323 (build_unary_op): Likewise.
4324 (build_ptrmemfunc): Likewise.
4325 (pfn_from_ptrmemfunc): Likewise.
4326 * typeck2.c (build_m_component_ref): Adjust comment.
4328 2002-08-07 Neil Booth <neil@daikokuya.co.uk>
4330 * Make-lang.in (CXX_C_OBJS): Update.
4331 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
4332 * cp-tree.h (cxx_decode_option): Remove.
4333 * decl2.c (compare_options, lang_f_options, unsupported_options,
4334 cxx_decode_option): Remove.
4336 2002-08-06 Gabriel Dos Reis <gdr@nerim.net>
4338 * typeck.c (build_x_unary_op): Handle pointer-to-member.
4340 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
4342 * class.c: Don't include obstack.h.
4344 * decl2.c: Delete bogus comment.
4345 * error.c: Don't include obstack.h.
4346 * except.c: Likewise.
4347 (dump_type): Correct comment.
4348 * method.c: Don't include obstack.h.
4351 2002-08-04 Gabriel Dos Reis <gdr@nerim.net>
4354 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
4355 expressions to pointer-to-data-member of pointer-to-member-functions.
4357 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
4359 * cvt.c (ocp_convert): Delete obsolete code.
4360 * parse.y (permanent_obstack): Delete declaration.
4361 * pt.c (permanent_obstack): Delete declaration.
4362 * repo.c (permanent_obstack): Delete declaration.
4363 (open_repo_file): Use xmalloc instead of permanent_obstack.
4364 (init_repo): Use xstrdup instead of permanent_obstack.
4366 2002-08-04 Nathan Sidwell <nathan@codesourcery.com>
4368 * cp-tree.h (VF_DERIVED_VALUE): Remove.
4369 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
4371 2002-08-03 Nathan Sidwell <nathan@codesourcery.com>
4374 C++ ABI change - vfunc ordering.
4375 * class.c (add_virtual_function): Remove.
4376 (dfs_modify_all_vtables): Take list of all declared
4377 virtuals. Assign all that are not in primary base.
4378 (check_for_override): Adjust comments.
4379 (create_vtable_ptr): Take single list of virtuals. Build chain
4380 of declared virtuals here.
4381 (layout_class_type): Take single list of virtuals. Adjust.
4382 (finish_struct_1): Keep virtuals on single list. Adjust.
4384 2002-08-02 Mark Mitchell <mark@codesourcery.com>
4386 * init.c (build_member_call): Use build_new_method_call, not
4389 2002-08-02 Krister Walfridsson <cato@df.lth.se>
4391 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
4393 2002-08-02 Mark Mitchell <mark@codesourcery.com>
4395 * call.c (build_method_call): Issue a more helpful error message
4396 about ambiguous method names.
4398 2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
4400 * tree.c (build_shared_int_cst): Make cache file scope, and
4403 2002-08-02 Jason Merrill <jason@redhat.com>
4405 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
4406 (cp_expr_size): New fn.
4407 * call.c (build_over_call): Lose empty class hackery.
4408 (convert_arg_to_ellipsis): Promote non-POD warning to error.
4409 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
4411 * semantics.c (expand_body): Do tree optimization in the function
4414 2002-08-01 Neil Booth <neil@daikokuya.co.uk>
4416 * cp-tree.h: Move all warning and flag declarations to c-common.h.
4417 * decl.c: Move all warning and flag variables to c-common.c.
4418 * decl2.c: Move all warning and flag variables to c-common.c.
4419 * lex.c (flag_digraphs): Remove.
4420 (warn_traditional): Now in c-common.c.
4422 2002-07-31 Mark Mitchell <mark@codesourcery.com>
4424 * call.c (build_field_call): Do not look up the field by name.
4425 (build_method_call): Simplify.
4426 (struct z_candidate): Add access_path and conversion_path. Remove
4428 (convert_class_to_reference): Adjust use of
4429 add_function_candidate.
4430 (add_candidate): Add conversion_path argument.
4431 (add_function_candidate): Use it.
4432 (add_conv_dndidate): Likewise.
4433 (build_builtin_candidate): Likewise.
4434 (add_template_candidate_real): Add conversion_path argument.
4435 (add_template_conv_candidate): Likewise.
4436 (add_template_candidate): Likewise.
4437 (build_user_type_conversion_1): Use it.
4438 (build_new_function_call): Remove name lookup code. Adjust use of
4439 add_template_candidate and add_function_candidate.
4440 (build_new_op): Likewise.
4441 (convert_like_real): Use build_special_member_call.
4442 (build_over_call): Use cand->conversion_path.
4443 (build_special_member_call): New method.
4444 (build_new_method_call): Remove name lookup code.
4445 * cp-tree.def (OFFSET_REF): Update documentation.
4446 (TEMPLATE_ID_EXPR): Likewise.
4447 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
4448 (BASELINK_OPTYPE): Likewise.
4449 (build_new_method_call): Adjust prototype.
4450 (build_special_member_call): New method.
4451 (build_baselink): New method.
4452 (build_offset_ref_call_from_tree): Likewise.
4453 (build_call_from_tree): Likewise.
4454 (finish_qualified_call_expr): Remove.
4455 (finish_call_expr): Adjust prototype.
4456 (build_x_function_call): Remove.
4457 * cvt.c (ocp_convert): Use build_special_member_call.
4458 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
4459 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
4461 (build_offset_ref_call_from_tree): New function.
4462 (build_call_from_tree): Likewise.
4463 * init.c (expand_cleanup): Use build_special_member_call.
4464 (expand_default_init): Likewise.
4465 (build_member_call): Use finish_call_expr.
4466 (build_new_1): Use build_special_member_call.
4467 (push_base_cleanups): Likewise.
4468 * method.c (do_build_assign_ref): Likewise.
4469 * parse.y (template_id): Do not pass a COMPONENT_REF to
4470 lookup_template_function.
4471 (primary): Use parse_finish_call_epxr, not finish_call_expr.
4472 (parse_finish_call_expr): New function.
4473 * pt.c (lookup_template_function): Add assertions.
4474 * search.c (lookup_base): Allow T to be a binfo.
4475 (build_baselink): New function.
4476 (lookup_member): Use it.
4477 * semantics.c (finish_call_expr): Do not do name lookup.
4478 (finish_object_call_expr): Remove #if 0'd code.
4479 (finish_qualified_call_expr): Remove.
4480 * typeck.c (build_x_function_call): Remove.
4481 (build_static_case): Use build_special_member_call.
4482 * typeck2.c (build_functional_cast): Likewise.
4484 2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
4486 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
4488 2002-07-30 Gabriel Dos Reis <gdr@nerim.net>
4490 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
4492 2002-07-30 Nathan Sidwell <nathan@codesourcery.com>
4494 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
4497 2002-07-29 Alan Modra <amodra@bigpond.net.au>
4499 * cp-tree.h: Comment typo fix.
4501 2002-07-29 Richard Earnshaw <rearnsha@arm.com>
4503 * spew.c (space_for_token): Allocate zeroed memory for a new token
4506 2002-07-27 Roger Sayle <roger@eyesopen.com>
4508 * decl.c (builtin_function_1): No need to explicitly mark
4509 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
4511 2002-07-27 Roger Sayle <roger@eyesopen.com>
4513 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
4515 2002-07-26 Jason Merrill <jason@redhat.com>
4517 * call.c (build_over_call): Likewise.
4518 (cp_convert_parm_for_inlining): New fn.
4519 (convert_for_arg_passing): New fn.
4520 (convert_default_arg, build_over_call): Use it.
4521 (type_passed_as): New fn.
4522 * pt.c (tsubst_decl): Use it.
4523 * decl2.c (cp_build_parm_decl): New fn.
4524 (build_artificial_parm): Use it.
4525 (start_static_storage_duration_function): Likewise.
4526 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
4527 (grokparms): Don't mess with DECL_ARG_TYPE.
4528 * typeck.c (convert_arguments): Use convert_for_arg_passing.
4529 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
4531 * cp-tree.h: Declare new fns.
4533 2002-07-26 Neil Booth <neil@daikokuya.co.uk>
4535 * cp-tree.h (flag_operator_names): Remove.
4536 * decl2.c (flag_operator_names): Remove.
4537 (lang_f_options): Remove operator-names.
4538 * lex.c (D_OPNAME): Remove.
4539 (reswords): Remove operator names.
4540 (rid_to_yy): Remove operator names.
4541 (init_reswords): No need to handle D_OPNAME.
4542 * spew.c (read_process_identifier): There are no operator
4545 2002-07-26 Jason Merrill <jason@redhat.com>
4547 * dump.c (cp_dump_tree): Call c_dump_tree.
4548 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
4550 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
4552 * error.c (print_whitespace): Remove.
4553 * g++spec.c (LIBUNWIND): Move.
4554 * mangle.c (mangled_position, write_signed_number): Remove.
4556 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
4558 * decl2.c (cxx_decode_option): Similarly.
4560 2002-07-25 Gabriel Dos Reis <gdr@nerim.net>
4562 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
4563 (cxx_sizeof_or_alignof_type): Take a third argument.
4564 (cxx_sizeof): Adjust definition.
4565 (cxx_alignof): Likewise.
4566 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
4567 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
4569 (c_sizeof_nowarn): Remove definition.
4570 (build_unary_op): Use cxx_sizeof_nowarn.
4572 2002-07-24 Geoffrey Keating <geoffk@redhat.com>
4574 * tree.c (cp_build_qualified_type_real): When copying
4575 pointer-to-method types, unshare the record that holds
4576 the cached pointer-to-member-function type.
4578 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
4580 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
4582 2002-07-23 Gabriel Dos Reis <gdr@nerim.net>
4585 * typeck.c (cxx_sizeof_or_alignof_type): New function.
4586 (c_sizeof): Remove definition.
4587 (expr_sizeof): Use cxx_sizeof.
4588 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
4589 * decl.c (finish_destructor_body): Use cxx_sizeof.
4590 * semantics.c (finish_alignof): Likewise.
4591 (finish_alignof): Use cxx_alignof.
4592 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
4593 (cxx_sizeof_or_alignof_type): Declare.
4594 (my_friendly_assert): Move to ../c-common.h.
4596 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
4598 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
4600 2002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4602 PR c++/7347, c++/7348
4603 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
4604 * decl.c (make_typename_type): Use it.
4605 (make_unbound_class_template): Likewise.
4606 (lookup_name_real): Don't call type_access_control if scope is
4607 template parameter dependent.
4608 * parse.y (template_arg): Call make_unbound_class_template with
4610 (nest_name_specifier): Call make_typename_type with tf_parsing set.
4611 (typename_sub0): Likewise.
4612 (typename_sub1): Likewise.
4613 (instantiate_decl): Push class scope.
4614 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
4615 for both static variable and member function template.
4616 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
4618 * search.c (type_access_control): Do type access for TEMPLATE_DECL
4621 2002-07-20 Roger Sayle <roger@eyesopen.com>
4623 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
4624 test by using positive_option. Make whitespace consistent.
4626 2002-07-20 Gabriel Dos Reis <gdr@nerim.net>
4628 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
4629 members with 'locus'. Adjust use throughout.
4630 (struct feed): Likewise.
4631 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
4633 (snarf_defarg): Use error(), not error_with_file_and_line().
4635 2002-07-19 Chris Demetriou <cgd@broadcom.com>
4637 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
4638 cpp_options is included.
4640 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4642 PR c++/2862, c++/2863
4643 * pt.c (determine_specialization): Compare the length of
4644 TYPE_ARG_TYPES. Tidy.
4646 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4649 * decl.c (duplicate_decls): Don't propagate inlining parameters from
4650 olddecl to newdecl when newdecl is a specialization of the
4651 instantiation olddecl.
4653 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4655 PR c++/4802, c++/5387
4656 * decl.c (make_typename_type): Use enforce_access.
4658 2002-07-17 Scott Snyder <snyder@fnal.gov>
4661 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
4663 2002-07-12 Mark Mitchell <mark@codesourcery.com>
4665 * class.c (add_method): Correct handling of conversion operators.
4667 2002-07-11 Mark Mitchell <mark@codesourcery.com>
4670 * class.c (add_method): Simplify.
4672 2002-07-11 Jason Merrill <jason@redhat.com>
4675 * tree.c (cp_copy_res_decl_for_inlining): Also copy
4678 2002-07-10 Graham Stott <graham.stott@btinternet.com>
4680 * pt.c (template_parm_this_level_p, push_template_decl_real):
4681 Pass depth as int pointer.
4683 2002-07-11 Tim Josling <tej@melbpc.org.au>
4685 Remove front end hard coding from gengtype.c.
4687 * config-lang.in (gtfiles): Add files needed for this front end.
4689 2002-07-10 Mark Mitchell <mark@codesourcery.com>
4691 * cp-tree.h (unqualified_name_lookup_error): Declare it.
4692 (begin_function_definition): Adjust prototype.
4693 * lex.c (unqualified_name_lookup_error): New function, split out
4695 (do_identifier): ... here.
4696 * parse.y (parse_begin_function_definition): New function.
4698 * semantics.c (begin_function_definition): Accept decl-specifiers
4699 and attributes as separate parameters.
4701 2002-07-10 Jason Merrill <jason@redhat.com>
4704 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
4705 modifying the old one.
4707 2002-07-09 Mark Mitchell <mark@codesourcery.com>
4709 * cp-tree.h (constructor_name_p): Declare it.
4710 (check_template_template_default_arg): Likewise.
4711 * class.c (handle_using_decl): Use constructor_name_p.
4712 * decl.c (grokdeclarator): Likewise.
4713 * decl2.c (constructor_name_p): Define it.
4714 * init.c (build_member_call): Use constructor_name_p.
4715 * parse.y (template_parm): Use check_template_template_default_arg.
4716 * pt.c (check_explicit_specialization): Use constructor_name_p.
4717 * semantics.c (check_template_template_default_arg): New function.
4719 2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4721 * pt.c (can_complete_type_without_circularity): Add static to
4722 function definition.
4724 2002-07-08 Mark Mitchell <mark@codesourcery.com>
4726 * cp-tree.h (have_extern_spec): Declare it
4727 * decl.c (have_extern_spec): Define it.
4728 (start_decl): Eliminate use of used_extern_spec.
4729 (start_function): Likewise.
4730 * parse.y (have_extern_spec): Remove declaration.
4731 (used_extern_spec): Likewise.
4732 (frob_specs): Eliminate use of used_extern_spec.
4733 (.hush_warning): Likewise.
4735 2002-07-07 Mark Mitchell <mark@codesourcery.com>
4737 * Make-lang.in (cp/parse.o): Depend on decl.h.
4738 * cp-tree.h (do_decl_instantiation): Change prototype.
4739 * parse.y: Include decl.h.
4740 (parse_decl_instantiation): New function.
4741 (explicit_instantiation): Use it.
4742 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
4745 2002-07-07 Roger Sayle <roger@eyesopen.com>
4747 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
4748 constructor and destructor tests when passed a TEMPLATE_DECL.
4750 2002-07-05 Jason Merrill <jason@redhat.com>
4752 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
4755 PR optimization/7145
4756 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
4758 2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
4760 Repair damage on weak-impared targets caused by my previous patch.
4761 * cp-tree.h (import_export_tinfo): Add parameter.
4762 * decl2.c (import_export_tinfo): Add parameter, post adjust
4764 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
4765 import_export_tinfo.
4767 2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4770 * init.c (build_aggr_init): Remove qualifiers of init before calling
4772 (build_vec_init): Flatten multi-dimensional array during cleanup.
4773 (build_vec_delete_1): Abort if the type of each element is array.
4775 2002-07-03 Graham Stott <graham.stott@btinternet.com>
4777 * pt.c (instantiate_class_template): Fix typo.
4779 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4781 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
4782 by CVS conflict in my last patch.
4784 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4787 * pt.c (can_complete_type_without_circularity): New function.
4788 (instantiate_class_template): Use it.
4789 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
4790 message due to incomplete fields.
4792 2002-07-01 Mark Mitchell <mark@codesourcery.com>
4795 * mangle.c (write_expression): Add mangling for sizeof when
4797 * operators.def: Remove stale comment.
4799 2002-06-30 Nathan Sidwell <nathan@codesourcery.com>
4801 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
4802 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
4803 (tinfo_decl_type): Replace with ...
4804 (type_info_ptr_type): ... this.
4805 (import_export_tinfo): Declare.
4806 (tinfo_decl_p): Rename to ...
4807 (unemitted_tinfo_decl_p): ... this.
4808 * decl2.c (import_export_decl): Break out tinfo handling into ...
4809 (import_export_tinfo): ... here. New function.
4810 (finish_file): Adjust.
4811 * rtti.c (TINFO_REAL_NAME): New macro.
4812 (init_rtti_processing): Create the tinfo types.
4813 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
4814 (get_tinfo_decl): Adjust.
4815 (get_tinfo_ptr): New function.
4816 (get_type_id): Use it.
4817 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
4818 (ptr_initializer): Use get_tinfo_ptr.
4819 (ptm_initializer): Likewise.
4820 (synthesize_tinfo_var): Break into ...
4821 (get_pseudo_ti_init): ... this. Just create the initializer.
4822 (get_pseudo_ti_desc): .. and this.
4823 (create_real_tinfo_var): Remove.
4824 (create_pseudo_type_info): Don't create the vtable decl here.
4825 (get_vmi_pseudo_type_info): Remove.
4826 (create_tinfo_types): Adjust.
4827 (tinfo_decl_p): Rename to ...
4828 (unemitted_tinfo_decl_p): ... here. Adjust.
4829 (emit_tinfo_decl): Adjust. Create the initializer.
4831 2002-06-27 Mark Mitchell <mark@codesourcery.com>
4834 * pt.c (tsubst_friend_class): Substitute into the context of the
4835 friend before using it.
4837 2002-06-26 Mark Mitchell <mark@codesourcery.com>
4839 * cp-tree.h (xref_tag): Change prototype.
4840 (handle_class_head): Likewise.
4841 (build_x_component_ref): Likewise.
4842 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
4843 (xref_tag): Take attributes as a separate parameter.
4844 (xref_tag_from_type): Adjust call to xref_tag.
4845 * decl2.c (build_expr_from_tree): Adjust call to
4846 build_x_component_ref.
4847 (handle_class_head): Take attributes as a separate parameter.
4848 * parse.y (parse_xref_tag): New function.
4849 (parse_handle_class_head): Likewise.
4850 (primary): Use parse_xref_tag.
4851 (class_head_decl): Use parse_handle_class_head.
4852 (class_head_defn): Likewise.
4853 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
4854 (build_dynamic_cast_1): Likewise.
4855 (create_pseudo_type_info): Likewise.
4856 (emit_support_tinfos): Likewise.
4857 * typeck.c (build_object_ref): Adjust call to
4858 build_x_component_ref.
4859 (build_x_component_ref): Remove protect parameter.
4861 2002-06-25 Mark Mitchell <mark@codesourcery.com>
4863 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
4864 * class.c (handle_using_decl): Likewise.
4865 (instantiate_type): Likewise.
4866 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
4867 (xref_basetypes): Change prototype.
4868 (begin_mem_initializers): New function.
4869 (get_overloaded_fn): Likewise.
4870 * decl.c (xref_basetypes): Simplify.
4871 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
4872 * init.c (build_offset_ref): Likewise.
4873 * parse.y (base_init): Use begin_mem_initializers().
4874 (structsp): Adjust call to xref_basetypes.
4875 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
4876 (instantiate_class_template): Adjust call to xref_basetypes.
4877 * semantics.c (begin_mem_initializers): New function.
4878 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
4879 (really_overlaoded_fn): Likewise.
4880 (get_overloaded_fn): New function.'
4881 (get_first_fn): USe BASELINK_FUNCTIONS.
4883 2002-06-24 Mark Mitchell <mark@codesourcery.com>
4885 * cp-tree.h (SCALAR_TYPE_P): New macro.
4886 (check_for_out_of_scope_variable): New function.
4887 (at_class_scope_p): Likewise.
4888 (finish_fname): Likewise.
4889 * class.c (finish_struct): Use at_function_scope_p.
4890 * decl.c (check_for_out_of_scope_variable): New function, split
4891 out from do_identifier.
4892 (finish_enum): Use at_function_scope_p.
4893 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
4894 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
4895 (primary): Use at_function_scope_p.
4896 * search.c (at_class_scope_p): New function.
4897 * semantics.c (finish_fname): Likewise.
4898 (check_multiple_declarators): Use at_function_scope_p.
4900 2002-06-23 Mark Mitchell <mark@codesourcery.com>
4902 * parse.y (parse_scoped_id): New function.
4904 * cp-tree.h (do_scoped_id): Adjust declaration.
4905 * lex.c (do_scoped_id): Remove call to yylex.
4906 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
4907 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
4908 expanding it inline.
4910 2002-06-23 Matt Thomas <matt@3am-software.com>
4912 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
4915 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4917 * mangle.c (integer_type_codes): Const-ify.
4919 2002-06-20 Richard Henderson <rth@redhat.com>
4922 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
4923 Call put_var_into_stack.
4925 2002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4927 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
4928 array size calculation.
4930 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4933 * pt.c (tsubst_expr): Handle FILE_STMT.
4935 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4938 * pt.c (lookup_template_class): Don't build complete argument of
4939 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
4942 2002-06-19 Akim Demaille <akim@epita.fr>
4944 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
4946 * spew.c, lex.c: Adjust.
4947 * parse.y (explicit_instantiation): Add empty action to override
4948 the default $$ = $1 where it introduces a type clash.
4950 2002-06-14 Jason Merrill <jason@redhat.com>
4952 * semantics.c (begin_for_stmt): Push the 'for' scope before
4953 adding the FOR_STMT.
4956 * class.c (build_base_field): Set DECL_PACKED.
4957 (layout_class_type): Don't use tail padding of PODs.
4958 * mangle.c (write_unqualified_name): Fix template conversion op
4961 2002-06-16 Richard Henderson <rth@redhat.com>
4964 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
4965 after template instantiation.
4967 2002-06-16 Richard Henderson <rth@redhat.com>
4969 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
4971 2002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
4973 * cp-tree.h (compiler_error): Remove declaration.
4974 * lex.c (compiler_error): Remove definition.
4976 2002-06-14 Steve Ellcey <sje@cup.hp.com>
4978 * g++spec.c (LIBUNWIND): New.
4979 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
4981 2002-06-13 Jessica Han <jessica@cup.hp.com>
4983 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
4984 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
4985 (build_vbase_offset_vtbl_entries): Likewise.
4986 * rtti.c (build_headof): Likewise.
4987 (get_tinfo_decl_dynamic): Likewise.
4988 (create_pseudo_type_info): Likewise.
4990 2002-06-12 Stan Shebs <shebs@apple.com>
4992 * mpw-config.in: Remove file, no longer used.
4993 * mpw-make.sed: Ditto.
4995 2002-06-07 Zack Weinberg <zack@codesourcery.com>
4997 * decl2.c: Update call to cpp_handle_option.
4999 2002-06-07 H.J. Lu (hjl@gnu.org)
5001 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
5003 2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
5005 * error.c (cp_error_at): Fix typo.
5007 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
5009 * error.c (cp_diagnostic_starter): Adjust call.
5010 (maybe_print_instantiation_context): Change prototype to take a
5011 'diagnostic_info *'.
5012 (print_instantiation_full_context): Likewise.
5013 (print_instantiation_partial_context): Likewise.
5014 (cp_diagnostic_starter): Likewise.
5015 (cp_diagnostic_finalizer): Likewise.
5016 (cp_print_error_function): Likewise.
5017 (cp_printer): Take a secondary parameter as a 'text_info *'.
5018 Remove output_state savings. Adjust calls.
5020 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
5022 * pt.c (inline_parm_levels): Mark for GC.
5024 * mangle.c (start_mangling): Allocate G.substitutions here...
5025 (init_mangle): ... rather than here.
5026 (finish_mangling): Clear the varray pointer when done with it.
5027 * spew.c (yylexstring): Don't use VARRAY_FREE.
5028 * search.c (bfs_walk): Don't use VARRAY_FREE.
5029 * decl2.c (pending_statics): Use gengtype to mark.
5030 (deferred_fns): Likewise.
5031 (ssdf_decls): Likewise.
5032 (init_decl2): Delete.
5033 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
5034 (cxx_init_decl_processing): Don't call init_decl2.
5035 (cxx_pop_function_context): Don't use VARRAY_FREE.
5036 * cp-tree.h (struct saved_scope): No need for special marking
5038 (struct language_function): Likewise.
5039 (local_classes): Use gengtype to mark.
5040 (init_decl2): Delete prototype.
5041 * class.c (init_class_processing): Don't use
5042 ggc_add_tree_varray_root.
5043 (build_vtbl_initializer): Don't use VARRAY_FREE.
5045 * decl.c (typename_compare): Don't use same_type_p.
5047 * decl.c: Include hashtab.h instead of hash.h.
5048 (typename_hash): Update to use htab_h.
5049 (typename_compare): Likewise.
5050 (typename_htab): Use gengtype to mark.
5051 (build_typename_type): Update to use htab_h.
5052 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
5054 * Make-lang.in (gt-cp-tree.h): New rule.
5055 (cp/tree.o): Depend on gt-cp-tree.h.
5056 * config-lang.in (gtfiles): Add cp/tree.c.
5057 * tree.c: Include gt-cp-tree.h.
5058 (list_hash_table): Use gengtype to mark.
5059 (init_tree): Use gengtype to mark trees.
5061 * Make-lang.in (cp/decl.o): Add debug.h dependency.
5062 * call.c (struct z_candidate): Use gengtype.
5063 (USER_CONV_CAND): Use WRAPPER_ZC.
5064 (convert_class_to_reference): Use build_zc_wrapper.
5065 (build_type_conversion_1): Likewise.
5066 (build_over_call): Use WRAPPER_ZC.
5067 (add_warning): Use build_zc_wrapper.
5068 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
5069 * cp-tree.h (struct lang_identifier): Use gengtype.
5070 (struct template_parm_index_s): Likewise.
5071 (struct ptrmem_cst): Likewise.
5072 (struct tree_binding): Likewise.
5073 (struct tree_overload): Likewise.
5074 (struct tree_srcloc): Likewise.
5075 (struct tree_wrapper): Likewise. Also modify to have a pointer
5076 to struct z_candidate rather than void.
5077 (enum cp_tree_node_structure_enum): New.
5078 (union lang_tree_node): New.
5079 (cxx_mark_tree): Delete prototype.
5080 (cp_tree_node_structure): New prototype.
5081 (build_ptr_wrapper): Delete prototype.
5082 (build_int_wrapper): Delete prototype.
5083 (build_zc_wrapper): New prototype.
5084 * decl.c: Include debug.h
5085 (cxx_mark_tree): Delete.
5086 (cp_tree_node_structure): New.
5087 * tree.c (build_ptr_wrapper): Delete.
5088 (build_int_wrapper): Delete.
5089 (build_zc_wrapper): New.
5091 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
5092 Correct typo. Patch from k_fukui@highway.ne.jp.
5094 * semantics.c (current_stmt_tree): Update for change to
5095 struct language_function.
5096 (finish_mem_initializers): Likewise.
5097 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
5098 * cp-tree.h (struct language_function): Rename from
5099 cp_language_function. Change all uses.
5100 (cp_function_chain): Don't need to cast.
5102 * class.c (duplicate_tag_error): Reset discriminator.
5103 (check_bases_and_members): Update for data structure changes.
5104 * cp-tree.h (struct lang_id2): Use gengtype.
5105 (flagged_type_tree): Likewise.
5106 (SET_LANG_ID): Use GGC on struct lang_id2.
5107 (struct cp_language_function): Use gengtype. Remove field
5108 'x_vcalls_possible_p'.
5109 (current_vcalls_possible_p): Delete.
5110 (struct lang_type_header): New.
5111 (struct lang_type_class): Rename from struct lang_type. Include
5112 struct lang_type_header.
5113 (struct lang_type_ptrmem): New.
5114 (struct lang_type): New.
5115 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
5116 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
5117 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
5118 (struct lang_decl_flags): Use gengtype. Add discriminators.
5119 (struct lang_decl): Use gengtype. Add and use discriminators.
5120 Update the macros that reference moved fields.
5121 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
5122 (SET_DECL_THUNK_P): Set discriminator too.
5123 (clear_inline_text_obstack): Delete prototype.
5124 (finish_inline_definitions): Delete prototype.
5125 (mark_pending_inlines): Delete prototype.
5126 (lang_check_failed): New prototype.
5127 * decl.c (struct named_label_use_list): Use gengtype.
5128 (struct named_label_list): Likewise.
5129 (mark_binding_level): Delete.
5130 (mark_named_label_lists): Delete.
5131 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
5132 (cxx_init_decl_processing): Use generated marker routine.
5133 (begin_destructor_body): Delete dead set to
5134 current_vcalls_possible_p.
5135 (mark_lang_function): Delete.
5136 (mark_cp_function_context): Delete.
5137 (lang_mark_tree): Use generated marker routines.
5138 * decl2.c (start_objects): Set discriminator when setting
5139 GLOBAL_INIT_PRIORITY.
5140 * lex.c (retrofit_lang_decl): Set discriminators.
5141 (copy_lang_type): Update for changes to lang_type structure.
5142 (cp_make_lang_type): Set discriminator.
5143 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
5144 * search.c: Include ggc.h.
5145 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
5146 (finish_inline_definitions): Delete.
5147 * spew.c (struct token): Use gengtype.
5148 (struct token_chunk): New.
5149 (struct unparsed_text): Use gengtype. Store tokens in chunks.
5150 (struct feed): Use gengtype.
5151 (feed_obstack): Delete.
5152 (feed): Mark as GC root.
5153 (pending_inlines): Mark as GC root.
5154 (pending_inlines_tail): Likewise.
5155 (processing_these_inlines): Likewise.
5156 (token_obstack): Make static.
5157 (first_token): Likewise.
5158 (init_spew): Don't initialize deleted things; use gengtype for roots.
5159 (clear_inline_text_obstack): Delete.
5160 (feed_input): Use GC for struct feed. Update for changes to
5161 struct unparsed_text.
5162 (mark_pending_inlines): Delete.
5163 (next_token): Rename from add_token. Change all callers. Update
5164 for changes to struct unparsed_text.
5165 (space_for_token): New.
5166 (remove_last_token): New.
5167 (alloc_unparsed_text): New.
5168 (snarf_block): Take an unparsed_text. Update for changes to struct
5170 (snarf_method): Update for changes to struct unparsed_text.
5171 (snarf_defarg): Update for changes to struct unparsed_text.
5172 * tree.c (lang_check_failed): New.
5174 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
5175 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
5176 (cp/spew.o): Add dependency on gt-<filename>.h.
5177 (cp/decl2.o): Add dependency on gt-<filename>.h.
5178 (cp/call.o): Add dependency on gt-<filename>.h.
5179 (cp/pt.o): Add dependency on gt-<filename>.h.
5180 (cp/repo.o): Add dependency on gt-<filename>.h.
5181 (cp/parse.o): Add dependency on gt-<filename>.h.
5182 * call.c: Use gengtype for roots.
5183 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
5184 decl2.c parse.y pt.c repo.c spew.c.
5185 * cp-tree.h: Use gengtype for roots.
5186 (struct saved_scope): Use GGC, gengtype.
5187 (cp_parse_init): Delete prototype.
5188 (init_pt): Delete prototype.
5189 * decl.c: Use gengtype for roots.
5190 (mark_saved_scope): Delete.
5191 (cxx_init_decl_processing): Don't call deleted initilisation
5193 (signed_size_zero_node): Delete, unused.
5194 * decl.h: Use gengtype for roots.
5195 * decl2.c: Use gengtype for roots.
5196 * lex.h: Use gengtype for roots.
5197 * parse.y: Use gengtype for roots.
5198 (cp_parse_init): Delete.
5199 * pt.c: Use gengtype for roots.
5201 * repo.c: Use gengtype for roots.
5202 * spew.c: Use gengtype for roots.
5204 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
5205 (cp/decl.o): Add dependency on gtype-cp.h.
5206 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
5207 Include gtype-cp.h. Allow for filename changes.
5209 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
5210 (cp/decl.o): Add cp/gt-decl.h dependency.
5211 * config-lang.in (gtfiles): New.
5212 * tree.h: Rename struct binding_level to struct cp_binding_level.
5213 * decl.c: Rename struct binding_level to struct cp_binding_level.
5214 Include cp/gt-decl.h.
5215 (struct cp_binding_level): Use gengtype.
5216 (make_binding_level): Use GGC on struct cp_binding_level.
5217 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
5218 (cxx_init_decl_processing): Mark free_binding_level as
5221 * decl.c (mark_cp_function_context): Update calling sequence.
5223 * decl.c (start_function): Don't free 'struct
5224 cp_language_function'.
5225 (pop_cp_function_context): Likewise.
5226 (save_function_data): Allocate it using GC.
5227 * semantics.c (genrtl_start_function): Don't free 'struct
5228 cp_language_function'.
5230 2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
5232 * lang-specs.h: Use cpp_debug_options.
5234 2002-05-28 Zack Weinberg <zack@codesourcery.com>
5236 * mangle.c, tree.c: Include real.h.
5237 * Make-lang.in: Update dependency lists.
5239 2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
5241 * lex.c: Don't include c-lex.h.
5242 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
5244 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
5246 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
5248 2002-05-22 Richard Henderson <rth@redhat.com>
5250 * decl.c (obscure_complex_init): Check for VAR_DECL
5251 before using DECL_THREAD_LOCAL.
5253 2002-05-22 Richard Henderson <rth@redhat.com>
5255 * decl.c (check_tag_decl): Handle RID_THREAD.
5256 (obscure_complex_init): Reject run-time init of tls.
5257 (grokvardecl, grokdeclarator): Handle RID_THREAD.
5258 * lex.c (reswords): Add __thread.
5259 (rid_to_yy): Map RID_THREAD to SCSPEC.
5261 2002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
5263 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
5264 * cp-tree.h (cxx_post_options): Kill.
5265 * cp-lex.c (cxx_post_options): Kill.
5267 2002-05-21 Richard Henderson <rth@redhat.com>
5269 * lex.c (rid_to_yy): Add RID_THREAD.
5271 2002-05-21 Alexandre Oliva <aoliva@redhat.com>
5273 * init.c (build_vec_init): Test for trivial copy-assignment when
5274 copy-assigning arrays.
5276 2002-05-20 Andreas Jaeger <aj@suse.de>
5278 * init.c (build_default_init): Remove unused variable.
5280 2002-05-20 Alexandre Oliva <aoliva@redhat.com>
5282 * call.c (any_strictly_viable): New.
5283 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
5285 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5287 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
5289 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5292 * pt.c (do_decl_instantiation): Don't complain explicit
5293 instantiation after explicit specialization.
5294 (do_type_instantiation): Likewise.
5296 2002-05-19 Alexandre Oliva <aoliva@redhat.com>
5298 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
5300 (complete_type_or_else): ... this. Redefined as macro.
5301 (cxx_incomplete_type_diagnostic): Declare.
5302 (cxx_incomplete_type_error): Define as macro.
5303 * init.c (build_delete): Warn about incomplete types other than
5304 void, and use the built-in operator delete for them.
5305 * typeck.c (complete_type_or_diagnostic): Renamed from
5306 complete_type_or_else. Added warn_only argument, passed to...
5307 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
5308 warnings or errors depending on new warn_only argument. Renamed
5310 (cxx_incomplete_type_error): ... this. New implementation in
5311 terms of cxx_incomplete_type_diagnostic.
5313 2002-05-18 Jason Merrill <jason@redhat.com>
5316 * decl2.c (import_export_decl): If we clear
5317 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
5319 2002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5322 * pt.c (verify_class_unification): Don't check if PARM is template
5323 parameter dependent. Simplify.
5324 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
5325 parameter dependent expression.
5327 2002-05-14 Jason Merrill <jason@redhat.com>
5329 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
5331 (synthesize_tinfo_var): Take the public decl.
5332 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
5333 (emit_tinfo_decl): Adjust. Call import_export_decl.
5334 * decl2.c (import_export_decl): Simplify tinfo decl handling.
5336 2002-05-14 Alexandre Oliva <aoliva@redhat.com>
5338 * cp-tree.h (struct lang_type): Added non_zero_init.
5339 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
5340 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
5341 * class.c (check_field_decls): Test non_zero_init.
5342 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
5343 zero-to-NULL conversions.
5344 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
5345 type that needs zero-initialization without zeros.
5346 (check_initializer_decl): Compute zero-initializer for types
5347 that require a non-trivial one.
5348 * init.c (build_forced_zero_init): New function.
5349 (build_default_init): Use it.
5350 * tree.c (zero_init_p): New function.
5351 * typeck2.c (force_store_init_value): New function.
5352 (process_init_constructor): Create non-trivial zero-initializers
5353 for array members and class fields.
5355 2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
5357 * lang-specs.h: Remove redundant -lang-c++.
5359 2002-05-13 Jason Merrill <jason@redhat.com>
5361 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
5362 (fixed_type_or_null): See through reference vars.
5363 (build_base_path): Vtable contents are constant.
5364 * typeck.c (get_member_function_from_ptrfunc): Likewise.
5366 2002-05-12 Jason Merrill <jason@redhat.com>
5368 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
5371 2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
5373 * cp-tree.h (flag_ansi): Remove.
5374 * decl2.c (flag_ansi): Remove.
5375 (cxx_decode_option): Set flag_iso and flag_undef.
5377 2002-05-09 Jason Merrill <jason@redhat.com>
5379 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
5380 Use subtraction rather than a bitmask to get the index.
5381 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
5383 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
5385 2002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
5387 * Make-lang.in (decl2.o): Update.
5388 * cp-tree.h (warn_multichar): Remove.
5389 * decl2.c: Include c-common.h.
5390 (warn_multichar): Remove.
5392 2002-05-03 Jason Merrill <jason@redhat.com>
5394 * tree.c (build_cplus_array_type): Only const and volatile get
5397 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
5399 2002-04-30 Mark Mitchell <mark@codesourcery.com>
5401 ABI change, returning simple classes from functions.
5402 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
5403 TYPE_HAS_TRIVIAL_INIT_REF is false or
5404 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
5406 2002-04-30 Jason Merrill <jason@redhat.com>
5409 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
5410 anonymous class with a typedef if there are attributes.
5412 2002-04-29 Paul Eggert <eggert@twinsun.com>
5414 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
5416 2002-04-29 Jakub Jelinek <jakub@redhat.com>
5419 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
5422 2002-04-29 Mark Mitchell <mark@codesourcery.com>
5425 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
5426 enter that scope before name lookup.
5429 * method.c (do_build_copy_constructor): Avoid building
5430 cv-qualified reference types.
5432 2002-04-29 Nathan Sidwell <nathan@codesourcery.com>
5435 * decl.c (grok_op_properties): Assignment ops don't have to return
5436 by value. operator% should.
5438 2002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
5441 * decl.c (duplicate_decls): Call merge_weak.
5443 2002-04-26 Richard Henderson <rth@redhat.com>
5445 * parse.y (malloced_yyss, malloced_yyvs): New.
5446 (yyoverflow): Re-add. Set them.
5447 (free_parser_stacks): New.
5449 2002-04-26 Mark Mitchell <mark@codesourcery.com>
5452 * method.c (do_build_assign_ref): Pass a derivation to
5453 build_method_call when calling base class assignment operators.
5455 2002-04-26 Richard Henderson <rth@redhat.com>
5457 * parse.y (yyoverflow): Revert.
5459 2002-04-26 Richard Henderson <rth@redhat.com>
5462 * parse.y (string): Remove. Update all uses to use STRING
5463 instead, and not call combine_strings.
5464 * rtti.c (tinfo_name): Use fix_string_type.
5465 * semantics.c (finish_asm_stmt): Don't call combine_strings.
5466 * spew.c (yylexstring): New.
5467 (read_token): Use it.
5469 2002-04-25 Richard Henderson <rth@redhat.com>
5472 * parse.y (yyoverflow): New.
5474 2002-04-25 Jason Merrill <jason@redhat.com>
5477 * search.c (check_final_overrider): No longer static.
5478 * class.c (update_vtable_entry_for_fn): Call it.
5479 * cp-tree.h: Adjust.
5481 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
5483 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
5484 * cp-tree.h (cxx_set_yydebug): Die.
5485 * lex.c (YYDEBUG): Get from c-lex.h.
5486 (cxx_set_yydebug): Remove.
5487 * parse.y: Include c-lex.h.
5488 (YYDEBUG): Get from c-lex.h.
5490 2002-04-24 Mark Mitchell <mark@codesourcery.com>
5493 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
5496 2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
5498 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
5499 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
5501 * cp-tree.h (cp_attribute_table): Rename.
5502 * decl.c (lang_attribute_table): Remove declaration.
5503 (cxx_init_decl_processing): Don't set it.
5504 * tree.c (cp_attribute_table): Rename.
5506 2002-04-24 Jason Merrill <jason@redhat.com>
5509 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
5510 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
5511 The pedwarn for array assignment is now unconditional.
5512 * tree.c (build_cplus_array_type_1): Still process simple array types
5513 normally in templates.
5516 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
5519 2002-04-23 Jakub Jelinek <jakub@redhat.com>
5521 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
5522 node with attributes.
5524 2002-2-23 David O'Brien <obrien@FreeBSD.org>
5526 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
5527 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
5529 2002-04-23 Mark Mitchell <mark@codesourcery.com>
5532 * pt.c (tsubst_friend_class): Handle templates with explicit
5536 * typeck.c (merge_types): Remember the cv-qualification of pointer
5537 types when merging them.
5539 2002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
5541 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
5542 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
5543 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
5544 cxx_mark_function_context): New.
5545 * decl.c (push_cp_function_context, pop_cp_function_context,
5546 mark_cp_function_context): Rename for consistency.
5547 (cxx_init_decl_processing): Don't set old hooks.
5549 2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
5551 * call.c (convert_type_from_ellipsis): Rename, update.
5552 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
5553 * cp-tree.h (convert_type_from_ellipsis): Rename.
5554 * decl.c (cxx_init_decl_processing): Don't set hook.
5556 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
5558 * call.c (build_new_method_call): Update.
5559 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
5560 * cp-tree.h (cxx_incomplete_type_error): New.
5561 * decl.c (grokdeclarator, grokparms): Update.
5562 * decl2.c (check_classfn): Update.
5563 * pt.c (tsubst): Update.
5564 * typeck.c (complete_type_or_else, expr_sizeof,
5565 decay_conversion): Update.
5566 * typeck2.c (incomplete_type_error): Rename.
5567 (add_exception_specifier): Update.
5569 2002-04-18 Jason Merrill <jason@redhat.com>
5572 * search.c (setup_class_bindings): A class template qualifies as a
5575 2002-04-17 Jakub Jelinek <jakub@redhat.com>
5578 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
5581 2002-04-16 Mark Mitchell <mark@codesourcery.com>
5583 * init.c (begin_init_stmts): Remove commented out code.
5584 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
5585 * semantics.c (begin_gobal_stmt_expr): Adjust call to
5586 expand_start_stmt_expr.
5588 2002-04-15 Mark Mitchell <mark@codesourcery.com>
5590 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
5591 dso_handle itself, to __cxa_atexit.
5593 2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
5595 * error.c (cxx_print_error_function): Adjust call to macros.
5597 2002-04-14 Jakub Jelinek <jakub@redhat.com>
5599 * class.c (layout_virtual_bases): Do all dsize computation on trees.
5601 2002-04-14 Jason Merrill <jason@redhat.com>
5603 * typeck.c (get_member_function_from_ptrfunc): Don't do
5604 gratuitious division and multiplication on
5605 ptrmemfunc_vbit_in_delta targets.
5607 2002-04-12 Mark Mitchell <mark@codesourcery.com>
5610 * semantics.c (finish_expr_stmt): Remember the type of the
5611 expression before any conversions are performed.
5613 2002-04-12 Mark Mitchell <mark@codesourcery.com>
5616 * call.c (add_template_candidate_real): Do not treat member
5617 templates as copy constructors.
5619 2002-04-12 Mark Mitchell <mark@codesourcery.com>
5621 * decl.c (duplicate_decls): Do not copy the RTL for a variable
5622 declaration if the old variable had an incomplete type and the new
5624 (complete_vars): Do not call layout_decl for completed variables.
5626 2002-04-12 Richard Sandiford <rsandifo@redhat.com>
5628 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
5629 with an explicit one.
5630 (follow_tag_typedef): New.
5631 (lookup_tag): Use it to extract the tag of an explicit typedef.
5632 (xref_tag): Likewise.
5634 2002-04-11 Andrew Haley <aph@redhat.com>
5636 * typeck.c (type_after_usual_arithmetic_conversions):
5637 If two types have the same variant, return immediately.
5638 When two floating-point operands are the same precision:
5639 convert to float if one of the operands is float;
5640 if neither operand is one of the standard types, return the type
5641 of the first operand.
5643 2002-04-10 Nathan Sidwell <nathan@codesourcery.com>
5646 * decl.c (make_typename_type): Remove implicit typenameness.
5648 2002-04-09 Jason Merrill <jason@redhat.com>
5650 PR optimization/6189
5651 * semantics.c (genrtl_start_function): Don't free
5652 DECL_SAVED_FUNCTION_DATA for inline functions.
5654 * init.c (build_member_call): For now, don't convert to
5655 intermediate base if it would cause an error.
5657 2002-04-08 Paolo Carlini <pcarlini@unitus.it>
5659 * parse.y (namespace_qualifier, maybe_identifier,
5660 begin_explicit_instantiation, end_explicit_instantiation,
5661 apparent_template_type, .finish_template_type,
5662 do_id, maybe_init, defarg_again, component_decl_1):
5663 Add ending ';', in accordance with POSIX.
5665 2002-04-06 Mark Mitchell <mark@codesourcery.com>
5668 * class.c (layout_class_type): Remember incomplete static
5670 (finish_struct_1): Call complete_vars, not
5671 hack_incomplete_structures.
5672 * cp-tree.h (hack_incomplete_structures): Rename to ...
5673 (complete_vars): ... this.
5674 (struct saved_scope): Remove incomplete.
5675 (namespace_scope_incomplete): Remove.
5676 * decl.c (struct binding_level): Remove incomplete.
5677 (incomplete_vars): New variable.
5678 (mark_binding_level): Don't mark incomplete.
5679 (print_binding_level): Don't print it.
5680 (mark_saved_scope): Don't mark incomplete.
5681 (pushdecl): Use maybe_register_incopmlete_var.
5682 (cxx_init_decl_processing): Register incomplete_vars for GC.
5683 (start_decl_1): Clarify error message.
5684 (hack_incomplete_vars): Remove.
5685 (maybe_register_incomplete_var): New function.
5686 (complete_vars): Likewise.
5688 2002-04-06 Jason Merrill <jason@redhat.com>
5691 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
5692 set before checking it.
5695 * init.c (build_member_call): Use build_scoped_ref.
5696 (resolve_offset_ref): Likewise.
5697 * call.c (build_scoped_method_call): Likewise.
5698 * tree.c (maybe_dummy_object): Kludge around current_class_type being
5700 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
5701 * cp-tree.h: Adjust.
5703 * init.c (push_base_cleanups): Just use build_scoped_method_call.
5706 * method.c (implicitly_declare_fn): Pass unqualified type to
5707 synthesize_exception_spec.
5709 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
5711 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
5712 * cvt.c: Update comment.
5713 * init.c (expand_cleanup_for_base): Update.
5714 * semantics.c (finish_parenthesized_expr): Update.
5715 * typeck.c (cp_truthvalue_conversion): Update.
5717 2002-04-04 Jason Merrill <jason@redhat.com>
5719 * semantics.c (finish_eh_cleanup): New fn.
5720 * cp-tree.h: Add prototype.
5721 * init.c (perform_member_init, expand_cleanup_for_base): Use
5723 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
5724 * cp-tree.h: Remove references.
5725 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
5726 * dump.c (cp_dump_tree): Likewise.
5727 * pt.c (tsubst_expr): Likewise.
5728 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
5729 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
5730 * tree.c (cp_statement_code_p): Likewise.
5732 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
5735 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
5739 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
5741 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
5743 2002-04-03 Richard Henderson <rth@redhat.com>
5745 * cp-lang.c (cxx_warn_unused_global_decl): New.
5746 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
5748 2002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
5750 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
5751 * tree.c (init_tree): Don't set hook.
5753 2002-04-03 Roger Sayle <roger@eyesopen.com>
5756 * decl.c (duplicate_decls): Don't mess with assembler names when
5757 redeclaring builtin functions as static.
5759 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
5761 * call.c (build_addr_func): Update.
5762 * class.c (resolve_address_of_overloaded_function): Update.
5763 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
5764 * cp-tree.h (cxx_mark_addressable): New.
5765 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
5766 * decl2.c (build_cleanup): Update.
5767 * except.c (build_throw): Update.
5768 * init.c (resolve_offset_ref): Update.
5769 * pt.c (convert_nontype_argument): Update.
5770 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
5771 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
5772 unary_complex_lvalue): Update.
5773 (mark_addressable): Rename.
5775 2002-04-01 Roger Sayle <roger@eyesopen.com>
5778 * decl.c (duplicate_decls): Overwrite the RTL when (and only
5779 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
5780 but follow the SET_DECL_RTL idiom used elsewhere in the function.
5782 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
5784 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
5785 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
5786 * decl.c (grokdeclarator): Update.
5787 * mangle.c (write_integer_cst): Update.
5788 * typeck.c (build_binary_op): Update.
5790 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
5792 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
5793 * lex.c (cxx_init): Don't set hook.
5795 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
5797 * Make-lang.in (error.o): Update.
5798 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
5799 * cp-tree.h (struct diagnostic_context): Predeclare.
5800 (cxx_print_error_function): New.
5801 * error.c: Include langhooks-def.h.
5802 (lang_print_error_function): Rename. Update.
5803 (init_error): Don't set hook.
5805 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
5807 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
5809 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
5810 * decl.c (finish_enum): Similarly.
5811 * error.c (dump_type): Similarly.
5812 * lex.c (cxx_init): Similarly.
5813 * mangle.c (write_builtin_type): Similarly.
5814 * typeck.c (comptypes): Similarly.
5816 2002-03-28 Roger Sayle <roger@eyesopen.com>
5819 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
5820 in the g++ front-end.
5821 (duplicate_decl): Allow redefinition of anticipated built-ins.
5822 Fix inlining problem by over-writing the old DECL_RTL.
5823 (lookup_namespace_name): Fail to find an identifier in the
5824 specified namespace if its still anticipated.
5825 (builtin_function_1): New function split out from builtin_function
5826 to create a builtin in the current namespace with given context.
5827 (builtin_function): Call builtin_function_1 to define the
5828 appropriate builtins in both the std and global namespaces.
5829 (select_decl): Don't test for anticipated decls here.
5830 (unqualified_namespace_lookup): Instead ignore them whilst
5831 searching through scopes and namespaces.
5832 * decl2.c (do_nonmember_using_decl): If a using declaration
5833 specifies an anticipated built-in function, mark it as no longer
5834 anticipated in that scope.
5835 (ambiguous_decl): Avoid resolving to an anticipated decl.
5836 * lex.c (do_scoped_id): Fail to find an identifier in the global
5837 namespace if its still anticipated.
5839 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
5841 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
5842 * cp-tree.h (cp_make_lang_type): Rename.
5843 * lex.c (cp_make_lang_type): Rename.
5844 (make_aggr_type): Update.
5845 * tree.c (init_tree): Don't set make_lang_type_fn.
5847 2002-03-29 Jakub Jelinek <jakub@redhat.com>
5850 * class.c (finish_struct_1): Update static field's DECL_MODE even
5851 if its type is a variant of t.
5853 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
5855 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
5856 * cp-tree.h (cxx_insert_default_attributes): New.
5857 * decl.c (insert_default_attributes): Rename.
5859 2002-03-27 Mark Mitchell <mark@codesourcery.com>
5862 * call.c (build_op_delete_call): Allow for the fact the placement
5863 may be a COMPOUND_EXPR.
5865 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
5867 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
5868 * cp-tree.h (init_cplus_expand): Remove.
5869 (cxx_expand_expr): New.
5870 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
5872 (init_cplus_expand): Remove.
5873 * lex.c (cxx_init): Don't call init_cplus_expand.
5875 2002-03-26 Mark Mitchell <mark@codesourcery.com>
5878 * init.c (build_new_1): Allow for the fact the result of
5879 build_function_call may be a COMPOUND_EXPR.
5881 2002-03-26 Nathan Sidwell <nathan@codesourcery.com>
5884 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
5885 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
5886 (dfs_skip_nonprimary_vbases_markedp): Remove.
5887 * search.c (get_shared_vbase_if_not_primary): Remove.
5888 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
5889 (dfs_skip_nonprimary_vbases_markedp): Remove.
5890 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
5891 (dfs_marked_real_bases_queue_p): Likewise.
5893 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
5895 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
5896 * cp-tree.h (cxx_mark_tree): New.
5897 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
5899 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
5901 * cp-tree.h (cxx_maybe_build_cleanup): New.
5902 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
5903 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
5904 * tree.c (build_target_expr): Update.
5905 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
5907 2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
5909 * decl2.c (cxx_decode_option): Handle -E.
5910 * lang-specs.h (default_compilers): Preprocess with cc1plus.
5911 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
5913 2002-03-23 Jakub Jelinek <jakub@redhat.com>
5916 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
5918 2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
5920 * error.c (dump_type): Be careful about implicit typenames.
5922 2002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
5925 * semantics.c (finish_base_specifier): Handle erronous base
5928 2002-03-22 Zack Weinberg <zack@codesourcery.com>
5930 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
5933 2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
5935 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
5936 an index into the vtable_entry array regardless of
5937 TARGET_PTRMEMFUNC_VBIT_LOCATION.
5939 2002-03-21 Aldy Hernandez <aldyh@redhat.com>
5941 * tree.c (cp_cannot_inline_tree_fn): Same.
5943 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
5945 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
5946 insert_block, getdecls, global_bindings_p): New.
5948 2002-03-20 Nathan Sidwell <nathan@codesourcery.com>
5951 * mangle.c (struct globals) Add internal_mangling_p member.
5952 (write_template_param): Do internal mangling, if needed.
5953 (mangle_conv_op_name_for_type): Request internal mangling.
5955 2002-03-20 Jason Merrill <jason@redhat.com>
5958 * init.c (build_delete): Check access for a member op delete here.
5959 * decl2.c (delete_sanity): Not here.
5961 2002-03-19 Jason Merrill <jason@redhat.com>
5964 * class.c (get_vfield_name): Use the constructor_name.
5966 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
5968 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
5969 * cp-tree.h (lang_printable_name): Rename.
5970 * error.c (lang_decl_name): Use new hook.
5971 * lex.c (cxx_init): Remove old hook.
5972 * pt.c (tsubst_decl): Use new hook.
5973 * tree.c (lang_printable_name): Rename.
5975 2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
5978 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
5979 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
5980 only after recording the declaration.
5982 2002-03-18 Jason Merrill <jason@redhat.com>
5985 * init.c (resolve_offset_ref): Hand off to build_component_ref.
5987 PR c++/4222, c++/5995
5988 * call.c (build_over_call): Fix empty class logic.
5991 * cp-tree.h (struct saved_scope): Add last_parms field.
5992 * decl.c (maybe_push_to_top_level): Save last_function_parms.
5993 (pop_from_top_level): Restore it.
5996 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
6000 * pt.c (tsubst_friend_function): Use decl_namespace_context.
6002 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
6003 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
6004 type with a nontrivial destructor.
6006 2002-03-17 Jason Merrill <jason@redhat.com>
6009 * class.c (build_base_path): Virtual base layout is fixed in
6012 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
6014 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
6015 * parse.y (yyparse): Remove macro.
6017 2002-03-17 Jason Merrill <jason@redhat.com>
6020 * init.c (build_new_1): Pass the right pointer to op delete.
6022 2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
6025 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
6026 conversion operators go.
6027 (struct lang_decl_flags): Add template_conv_p and unused
6029 (DECL_TEMPLATE_CONV_FN_P): New macro.
6030 * call.c (build_user_type_conversion_1): Don't check second type
6031 conversion of overload set first.
6032 * class.c (add_method): Make sure templated conversion operators
6033 all end up on slot 2.
6034 * lex.c (do_identifier): A conversion operator token might be
6035 satisfied by a templated conversion operator.
6036 * pt.c (check_explicit_specialization): Use
6037 CLASSTYPE_FIRST_CONVERSION_SLOT.
6038 (template_parm_this_level_p): New function.
6039 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
6040 * search.c (lookup_fnfields_1): Template conversions will be on
6042 * typeck.c (build_component_ref): Preserve the type of an
6043 conversion operator name on the overload type.
6044 (build_x_function_call): Retrieve the conversion operator name.
6046 2002-03-15 Richard Henderson <rth@redhat.com>
6048 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
6050 2002-03-15 Mark Mitchell <mark@codesourcery.com>
6052 * cp-tree.h (CLEANUP_DECL): Remove.
6053 (CLEANUP_EXPR): Likewise.
6054 * decl.c (destroy_local_var): Simplify.
6055 (maybe_build_cleanup): Tidy.
6056 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
6057 * semantics.c (cp_expand_stmt): Likewise.
6058 * cp/tree.c (cp_statement_code_p): Likewise.
6060 2002-03-15 Jason Merrill <jason@redhat.com>
6063 * decl.c (duplicate_decls): Use merge_types instead of common_type.
6064 * typeck.c (common_type): Just hand off to
6065 type_after_usual_arithmetic_conversions and
6066 composite_pointer_type.
6067 (merge_types): New fn.
6068 (commonparms): Use it instead of common_type.
6069 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
6070 (composite_pointer_type): Also handle attributes.
6071 * cp-tree.h: Declare merge_types.
6073 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
6075 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
6077 2002-03-14 Richard Henderson <rth@redhat.com>
6079 * decl.c: Include c-pragma.h.
6080 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
6081 * Make-lang.in: Update dependencies.
6083 2002-03-14 Jakub Jelinek <jakub@redhat.com>
6086 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
6087 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
6089 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
6091 * mangle.c (write_builtin_type): Handle 128-bit integers even if
6092 they are not a standard integer type.
6094 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
6096 * cp-tree.h (init_init_processing): Remove declaration.
6097 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
6098 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
6100 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6102 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
6104 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
6106 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
6107 cplus_tree_code_name): Delete.
6108 (cxx_init): Don't call add_c_tree_codes, instead set
6109 lang_unsafe_for_reeval. Don't try to copy into the various
6112 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
6115 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
6116 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
6119 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
6121 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
6122 DR209 is now not a defect.
6123 * cp-tree.h (skip_type_access_control): Remove.
6124 * decl.c (grokdeclarator): Do type access control for friend
6126 * semantics.c (decl_type_access_control): Don't reset
6127 current_type_lookups.
6128 (save_type_access_control): Always save the lookups.
6129 (skip_type_access_control): Remove.
6130 (finish_class_definition): Don't change type_lookups.
6132 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
6134 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
6136 * typeck.c (build_static_cast): Compare non-qualified types
6137 with pointer to member conversions.
6139 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
6140 Daniel Berlin <dan@dberlin.org>
6142 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
6143 (cxx_get_alias_set): Use it.
6145 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6147 * cp-tree.h (stabilize_expr): Prototype.
6149 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
6151 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
6152 conditional return void.
6154 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
6156 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
6157 * cp-tree.h (cxx_unsave): New.
6158 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
6159 (init_tree): Update.
6161 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6163 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
6164 explicit sizeof/sizeof.
6165 * decl2.c (cxx_decode_option): Likewise.
6166 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
6168 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
6171 * decl.c (lookup_tag): Only reject enum/class mismatch, not
6172 class/union mismatch.
6173 * parse.y (check_class_key): New function.
6174 (structsp): Call it.
6176 2002-03-01 Michael Matz <matz@suse.de>
6178 * typeck.c (cp_pointer_int_sum): Complete inner type which is
6179 used later by size_in_bytes().
6181 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
6183 * cp-tree.h: Require __GNUC__ to be #defined.
6184 (build_init): Add missing prototype.
6186 2002-03-01 Jason Merrill <jason@redhat.com>
6188 * except.c: Don't include decl.h or obstack.h. Do include
6190 (build_throw): Destroy temporaries from the thrown
6191 expression before calling __cxa_throw. Construct a thrown
6192 temporary directly into the exception object.
6193 (stabilize_throw_expr): New function.
6194 (wrap_cleanups_r): New function.
6195 * tree.c (stabilize_expr): New function.
6196 * init.c (build_init): New function.
6197 * Make-lang.in (cp/except.o): Adjust .h deps.
6199 2002-02-28 Jason Merrill <jason@redhat.com>
6201 * search.c (lookup_base_r): Don't clear is_non_public just because
6202 we found a friendly scope.
6204 * decl.c (finish_function): Only warn about missing return
6205 statement with -Wreturn-type.
6207 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
6209 * class.c (build_clone): Update.
6210 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
6211 * cp-tree.h (cxx_dup_lang_specific_decl): New.
6212 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
6213 (copy_decl): Update.
6214 * method.c (make_thunk): Update.
6216 2002-02-27 Zack Weinberg <zack@codesourcery.com>
6218 * decl2.c: Delete traditional-mode-related code copied from
6219 the C front end but not used, or used only to permit the
6222 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
6225 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
6228 2002-02-22 Jakub Jelinek <jakub@redhat.com>
6231 * semantics.c (finish_switch_cond): Don't call get_unwidened
6234 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
6237 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
6239 (make_typename_type): Use tsubst_flags_t.
6240 * decl.c (make_typename_type): Adjust. Return non-artificial
6241 TYPE_DECLs, if required.
6242 (grokdeclarator): Simplify CVR qualification handling. Allow bad
6243 qualifiers on typedef types.
6244 * decl2.c (handle_class_head): Adjust make_typename_type call.
6245 * parse.y (nested_name_specifier): Likewise.
6246 (typename_sub0): Likewise.
6247 (typename_sub1): Likewise.
6248 * pt.c (convert_template_argument): Adjust make_typename_type
6250 (tsubst): Adjust cp_build_qualified_type_real calls.
6251 (check_cv_quals_for_unify): Cope with allowing bad qualifications
6252 on template type parms.
6253 (instantiate_decl): Recheck substitutions to give warnings on bad
6255 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
6257 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
6259 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
6261 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
6262 unless DECL_ALWAYS_INLINE.
6264 2002-02-20 Jakub Jelinek <jakub@redhat.com>
6266 * typeck.c (cp_pointer_int_sum): Renamed from
6267 pointer_int_sum, call pointer_int_sum.
6269 2002-02-20 Jakub Jelinek <jakub@redhat.com>
6271 * decl.c (duplicate_decls): Return 0 if issued error about
6274 2002-02-19 Jason Merrill <jason@redhat.com>
6276 ABI change: Mangle `void (A::*)() const' as
6277 M1AKFvvE, not MK1AFvvE.
6278 * mangle.c (write_function_type): Write cv-quals for member
6280 (write_pointer_to_member_type): Not here.
6282 2002-02-18 Jason Merrill <jason@redhat.com>
6284 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
6285 (do_decl_instantiation): Likewise.
6287 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
6290 * decl.c (duplicate_decls): Make warning unconditional
6291 if duplicate default argument declarations are present.
6293 2002-02-17 Jakub Jelinek <jakub@redhat.com>
6295 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
6298 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
6300 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
6301 remove incorrect comment. Move #if 0'd code to common path. Use
6302 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
6304 2002-02-13 Jason Merrill <jason@redhat.com>
6306 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
6307 (finish_function): Don't warn if current_function_returns_null.
6309 * typeck2.c (digest_init): Do handle values of vector type.
6311 * typeck2.c (digest_init, process_init_constructor): Treat vectors
6314 2002-02-11 Jason Merrill <jason@redhat.com>
6316 * parse.y (reserved_declspecs): Don't handle attributes.
6317 (reserved_typespecquals): Handle them here.
6318 * Make-lang.in (parse.c): Adjust expected conflicts.
6320 2002-02-08 Jakub Jelinek <jakub@redhat.com>
6322 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
6323 instead of compstmt.
6324 (compstmt_or_stmtexpr): Renamed from compstmt.
6325 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
6327 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
6329 Rename instantiate_type_flags to tsubst_flags_t & expand use.
6330 * cp-tree.h (instantiate_type_flags): Rename to ...
6331 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
6332 add tf_warning flag.
6333 (instantiate_type): Adjust prototype.
6334 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
6335 do_type_instantiation, cp_build_qualified_type_real): Likewise.
6336 cp_build_qualified_type: Adjust.
6337 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
6339 * call.c (standard_conversion): Rename itf_* to tf_*.
6340 (reference_binding): Likewise.
6341 (convert_like_real): Likewise.
6342 * cvt.c (cp_convert_to_pointer): Likewise.
6343 (convert_to_reference): Likewise.
6344 * decl.c (lookup_namespace_name): Use tf_* flags.
6345 (make_typename_type): Likewise.
6346 (grokdeclarator): Likewise.
6347 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
6348 (coerce_template_template_parms, convert_template_argument,
6349 coerce_template_parms, maybe_get_template_decl_from_type_decl,
6350 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
6351 instantiate_class_template, tsubst_template_arg_vector,
6352 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
6353 tsubst_decl, tsubst_arg_types, tsubst_function_type,
6354 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
6355 instantiate_template, fn_type_unification,
6356 resolve_overloaded_unification, verify_class_unification,
6357 unify, get_bindings_real, do_type_instantiation,
6358 regenerate_decl_from_template, instantiate_decl,
6359 tsubst_initializer_list, tsubst_enum,
6360 get_mostly_instantiated_function_type,
6361 invalid_nontype_parm_type_p): Likewise.
6362 * tree.c (cp_build_qualified_type_real): Likewise.
6363 * typeck.c (build_binary_op): Rename itf_* to tf_*.
6364 (build_ptrmemfunc): Likewise.
6365 (convert_for_assignment): Likewise.
6367 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
6370 * decl.c (grokdeclarator): Allow friend declarations from
6372 * decl2.c (handle_class_head): Don't push into template parm contexts.
6373 * pt.c (push_template_decl_real): Template parm contexts are never
6376 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
6378 * class.c: Include target.h.
6379 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
6380 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
6382 * Make-lang.in: Adjust deps.
6384 2002-02-05 Jason Merrill <jason@redhat.com>
6386 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
6388 2002-02-04 Jakub Jelinek <jakub@redhat.com>
6390 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
6391 (finish_switch_cond): Set SWITCH_TYPE.
6393 2002-02-04 Richard Henderson <rth@redhat.com>
6395 * method.c (use_thunk): Always initialize the block tree. Reindent.
6396 * semantics.c (expand_body): Emit thunks after function, not before.
6398 2002-02-04 Jason Merrill <jason@redhat.com>
6400 * decl.c (start_function): Call cplus_decl_attributes immediately
6401 after grokdeclarator.
6403 * decl.c (start_function): Combine DECL_RESULT handling code.
6405 2002-02-03 Jason Merrill <jason@redhat.com>
6408 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
6409 (cp/xref.o): Remove dependencies.
6410 * class.c (finish_struct_1, check_methods): Don't call xref fns.
6411 (finish_struct_1): Likewise.
6412 * friend.c (make_friend_class): Likewise.
6413 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
6414 * spew.c (read_process_identifier): Likewise.
6416 2002-02-01 Jason Merrill <jason@redhat.com>
6419 * decl.c (finish_function): Warn about a non-void function with
6420 no return statement and no abnormal exit.
6421 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
6422 (current_function_returns_abnormally): New macro.
6423 * call.c (build_call): Set it.
6425 * typeck.c (build_component_ref): Always complain about offsetof
6426 constructs on non-PODs. Only make it an error for members of
6429 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
6430 (dump_function_decl): Always dump parms.
6432 * decl2.c (finish_static_data_member_decl): Complain about a local
6433 class with a static data member.
6436 * search.c (lookup_field_1): Don't xref a static data member
6437 just because we looked it up.
6439 2002-01-31 Jason Merrill <jason@redhat.com>
6441 * Make-lang.in (parse.c): Handle .output file.
6444 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
6446 * semantics.c (finish_class_definition): Adjust.
6448 Allow attributes in parms and casts.
6449 * parse.y (named_parm): Don't strip attrs.
6450 (declmods): Remove 'attributes' production.
6451 (nonempty_cv_qualifiers): Accept attributes.
6452 (ATTRIBUTE): Give precedence.
6453 * decl.c (groktypename): Handle attributes.
6454 (grokparms): Likewise.
6456 2002-01-29 Jakub Jelinek <jakub@redhat.com>
6458 * decl2.c (cxx_decode_option): Pass 0 as last argument to
6460 * lang-specs.h: Use cpp_unique_options instead of cpp_options
6461 when used together with cc1_options.
6463 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
6466 * typeck2.c (digest_init): Make sure non-array core type is
6468 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
6469 constructor, rather than build a new one.
6470 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
6471 PURPOSE of constructor elts.
6473 2002-01-23 Zack Weinberg <zack@codesourcery.com>
6475 * Make-lang.in (parse.c): Adjust expected number of
6476 shift-reduce conflicts.
6477 (decl.o): Depend on diagnostic.h.
6478 * decl.c: Include diagnostic.h.
6479 (grokdeclarator): Check for null pointer.
6480 (finish_function): Don't abort when
6481 current_binding_level->parm_flag != 1, if errors have
6482 occurred; throw away the statement tree and extra binding
6483 levels, and continue.
6484 * lex.c (note_list_got_semicolon): Check for null pointer.
6485 * method.c (hack_identifier): Just return error_mark_node if
6486 value is error_mark_node.
6487 * parse.y (primary: TYPEID(type_id)): No need to use
6488 TYPE_MAIN_VARIANT here.
6489 (handler_seq): Accept an empty list of catch clauses and
6490 generate a fake handler block to avoid later crashes.
6491 (ansi_raise_identifier): Accept the error token too.
6492 * semantics.c (begin_class_definition,
6493 finish_class_definition): Check for error_mark_node.
6495 2002-01-23 Zack Weinberg <zack@codesourcery.com>
6497 * typeck2.c (friendly_abort): Delete definition.
6498 * cp-tree.h (friendly_abort): Don't prototype.
6499 (my_friendly_assert): Use fancy_abort.
6501 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
6503 * cp-tree.h (my_friendly_abort): Remove.
6505 2002-01-23 Jakub Jelinek <jakub@redhat.com>
6507 * spew.c (pending_inlines, pending_inlines_tail,
6508 processing_these_inlines): Make static.
6509 (mark_pending_inlines): Remove static.
6510 (begin_parsing_inclass_inline): If in function, save pi
6511 for GC to cp_function_chain->unparsed_inlines instead.
6512 (process_next_inline): Likewise.
6513 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
6514 (mark_pending_inlines): Add prototype.
6515 * decl.c (spew_debug): Remove unused extern.
6516 (mark_lang_function): Call mark_pending_inlines.
6518 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
6520 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
6521 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
6522 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
6523 Change my_fancy_abort() to abort().
6525 2002-01-23 Jason Merrill <jason@redhat.com>
6528 * class.c (fixed_type_or_null): Fix thinko.
6531 * init.c (resolve_offset_ref): Use build_indirect_ref.
6533 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
6535 2002-01-22 Jason Merrill <jason@redhat.com>
6537 * parse.y (function_body): Suppress the block for the outermost
6539 * decl.c (pushdecl): Don't try to skip it.
6540 (begin_function_body): Keep the block we create, not the next one.
6541 * init.c (emit_base_init): Don't mess with keep_next_level.
6543 * class.c (build_base_path): Tweak formatting.
6545 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
6547 Fix regression introduced with patch for c++/775
6548 * parse.y (class_head_defn): Check for template specializations
6549 with a different class-key.
6551 2002-01-17 Jason Merrill <jason@redhat.com>
6553 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
6554 (begin_function_body): Call them and keep_next_level.
6555 * init.c (emit_base_init): Call keep_next_level.
6556 * semantics.c (setup_vtbl_ptr): Lose.
6557 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
6558 (vtbls_set_up_p): Lose.
6559 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
6560 * method.c (do_build_copy_constructor): Likewise.
6561 (synthesize_method): Call finish_mem_initializers.
6562 * parse.y (nodecls): Likewise.
6564 * error.c (dump_type_suffix): Print the exception specs before
6566 (dump_function_decl): Here, too.
6568 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
6570 2002-01-10 Ira Ruben <ira@apple.com>
6573 * decl.c (start_method): Handle attrlist.
6575 2002-01-10 Jakub Jelinek <jakub@redhat.com>
6577 * decl2.c (max_tinst_depth): Increase default limit to 500.
6579 2002-01-10 Graham Stott <grahams@redhat.com>
6581 * spew.c (YYCHAR): Uppercase macro parameter and add
6584 (NAME): Uppercase macro parameter.
6586 2002-01-09 Graham Stott <grahams@redhat.com>
6588 * decl.h (grokdeclarator): Wrap long line.
6590 * semantics.c (FINISH_COND): Uppercase macro paramaters and
6593 2002-01-08 Graham Stott <grahams@redhat.com>
6595 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
6596 (PALLOC): Uppercase macro parameter and whitespace.
6597 (SALLOC): Uppercase macro parameter.
6598 (SFREE): Uppercase macros parameter, add parenthese and
6600 (STREQL): Uppercase macro parameter and whitespace.
6607 * call.c (convert_like): Add parenthesis and wrap.
6608 (convert_like_with_context): Likewise.
6609 (ICS_RANK): Whitespace.
6610 (NEED_TEMPORARY_P): Remove parenthesis.
6612 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
6614 (VTT_MARKED_BINFO_P): Likewise.
6616 * decl.c (BINDING_LEVEL): Add parenthesis.
6617 (DEF_OPERATOR): Likewise.
6619 * mangle.c (MANGLE_TRACE): Add parenthesis.
6620 (MANGLE_TRACE_TREE): Likewise.
6621 (write_signed_number): Likewise.
6622 (write_unsigned_number): Likewise.
6624 * pt.c (ccat): Uppercase macro parameter.
6627 * search.c (SET_BINFO_ACCESS): Add parenthesis.
6629 2002-01-07 Jason Merrill <jason@redhat.com>
6631 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
6635 * method.c (make_thunk): If !flag_weak, give the thunk the
6637 (use_thunk): Here, too.
6639 2002-01-07 Graham Stott <grahams@redhat.com>
6641 * error.c: Update copyright date.
6642 (print_scope_operator): Add parenthesis.
6643 (print_left_paren): Likewise.
6644 (print_right_paren): Likewise.
6645 (print_left_bracket): Likewise.
6646 (print_right_bracket): Likewise.
6647 (print_template_argument_list_start): Likewise.
6648 (print_template_argument_list_end): Likewise.
6649 (print_non_consecutive_character): Likewise.
6650 (print_tree_identifier): Likewise.
6651 (print_identifier): Likewise.
6652 (NEXT_CODE): Uppercase macro parameter.
6653 (ident_fndecl): Delete unused.
6654 (GLOBAL_THING): Likewise.
6656 2002-01-06 Graham Stott <grahams@redhat.com>
6658 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
6659 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
6660 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
6661 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
6662 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
6663 (C_IS_RESERVED_WORD): Uppercase macro parameter.
6664 (C_RID_YYCODE) Likewise.
6665 (ptrmem_cst): Use rtx.
6666 (LOCAL_BINDING_P): Add whitespace.
6667 (INHERITED_VALUE_BINDING_P): Likewise.
6668 (BINDING_SCOPE): Wrap long line.
6669 (BINDING_HAS_LEVEL_P): Remove parenthesis.
6670 (BINDING_VALUE): Wrap long line.
6671 (BINDING_TYPE): Whitespace.
6672 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
6673 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
6674 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
6675 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
6676 (same_type_p): Uppercase macro parameters.
6677 (same_type_ignoring_top_level_qualifiers_p): Likewise.
6678 (OVL_FUNCTION): Wrap long line.
6679 (OVL_CHAIN): Whitespace.
6680 (OVL_CURRENT): Add parenthesis and whitespace.
6681 (OVL_NEXT): Whitespace.
6682 (OVL_USED): Likewise.
6683 (IDENTIFIER_TYPE_VALUE): Likewise.
6684 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
6685 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
6686 (LANG_ID_FIELD): Whitespace.
6687 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
6688 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
6689 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
6690 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
6691 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
6692 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
6693 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
6694 (IDENTIFIER_VIRTUAL_P): Likewise.
6695 (IDENTIFIER_OPNAME_P): Likewise.
6696 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
6697 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
6698 (C_SET_EXP_ORIGINAL_CODE): Likewise.
6699 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
6700 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
6701 (IS_AGGR_TYPE): Uppercase macro parameter.
6702 (CLASS_TYPE_P): Likewise.
6703 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
6704 (IS_AGGR_TYPE_2): Whitespace.
6705 (TAGGED_TYPE_P): Uppercase macro parameter.
6706 (TYPE_BUILT_IN): Whitespace.
6707 (TYPE_FOR_JAVA): Likewise.
6708 (FUNCTION_ARG_CHAIN): Remove parenthesis.
6709 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
6710 (FUNCTION_FIRST_USER_PARAM): Likewise.
6711 (PROMOTES_TO_AGGR_TYPE): Whitespace.
6712 (DERIVED_FROM_P): Add parenthesis and wrap.
6713 (UNIQUELY_DERIVED_FROM_P): Likewise.
6714 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
6715 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
6716 (CLASSTYPE_USE_TEMPLATE): Whitespace.
6717 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
6718 (TYPE_GETS_DELETE): Add parenthesis.
6719 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
6720 (TYPE_HAS_ASSIGN_REF): Likewise,
6721 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
6722 (TYPE_HAS_INIT_REF): Likewise.
6723 (TYPE_HAS_CONST_INIT_REF): Likewise.
6724 (TYPE_BEING_DEFINED): Likewise.
6725 (TYPE_LANG_SPECIFIC): Likewise.
6726 (CLASSTYPE_RTTI): Likewise.
6727 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
6728 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
6729 (TYPE_OVERLOADS_ARROW): Likewise.
6730 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
6731 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
6732 (CLASSTYPE_METHOD_VEC): Likewise.
6733 (CLASSTYPE_MARKED_N): Likewise.
6734 (CLASSTYPE_MARKED): Likewise.
6735 (CLASSTYPE_MARKED2): Likewise.
6736 (CLASSTYPE_MARKED3): Likewise.
6737 (CLASSTYPE_MARKED4): Likewise.
6738 (CLASSTYPE_MARKED5): Likewise.
6739 (CLASSTYPE_MARKED6): Likewise.
6740 (SET_CLASSTYPE_MARKED): Whitespace.
6741 (CLEAR_CLASSTYPE_MARKED): Likewise.
6742 (SET_CLASSTYPE_MARKED2): Likewise.
6743 (CLEAR_CLASSTYPE_MARKED2): Likewise.
6744 (SET_CLASSTYPE_MARKED3): Likewise.
6745 (CLEAR_CLASSTYPE_MARKED3): Likewise.
6746 (SET_CLASSTYPE_MARKED4): Likewise.
6747 (CLEAR_CLASSTYPE_MARKED4): Likewise.
6748 (SET_CLASSTYPE_MARKED5): Likewise.
6749 (CLEAR_CLASSTYPE_MARKED5): Likewise.
6750 (SET_CLASSTYPE_MARKED6): Likewise.
6751 (CLEAR_CLASSTYPE_MARKED6): Likewise.
6752 (CLASSTYPE_TAGS): Likewise.
6753 (CLASSTYPE_VSIZE): Likewise.
6754 (CLASSTYPE_VBASECLASSES): Likewise.
6755 (CANONICAL_BINFO): Add parenthesis.
6756 (CLASSTYPE_SIZE(NODE): Likewise.
6757 (CLASSTYPE_SIZE_UNIT): Likewise.
6758 (CLASSTYPE_ALIGN(NODE): Likewise.
6759 (CLASSTYPE_USER_ALIGN): Likewise.
6760 (TYPE_JAVA_INTERFACE): Likewise.
6761 (CLASSTYPE_PURE_VIRTUALS): Likewise.
6762 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
6763 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
6764 (CLASSTYPE_HAS_MUTABLE): Likewise.
6765 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
6766 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
6767 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
6768 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
6769 (CLASSTYPE_INTERFACE_ONLY): Likewise.
6770 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
6771 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
6772 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
6773 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
6774 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
6775 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
6776 (BINFO_UNSHARED_MARKED): Whitespace.
6777 (BINFO_MARKED): Whitespace and wrap.
6778 (SET_BINFO_MARKED): Likewise.
6779 (CLEAR_BINFO_MARKED): Likewise.
6780 (BINFO_VTABLE_PATH_MARKED): Likewise.
6781 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
6782 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
6783 (BINFO_SUBVTT_INDEX): Remove parenthesis.
6784 (BINFO_VPTR_INDEX): Likewise.
6785 (BINFO_PRIMARY_BASE_OF): Likewise,
6786 (CLASSTYPE_VFIELDS): Whitespace.
6787 (VF_DERIVED_VALUE): Wrap long line.
6788 (NAMESPACE_LEVEL): Whitespace.
6789 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
6790 (DEFARG_POINTER): Whitespace.
6791 (DECL_NEEDED_P): Remove parenthesis.
6792 (DECL_LANGUAGE): Whitespace.
6793 (SET_DECL_LANGUAGE): Add parenthesis.
6794 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
6795 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
6796 (DECL_IN_AGGR_P): Whitespace.
6797 (DECL_FRIEND_P): Likewise.
6798 (DECL_BEFRIENDING_CLASSES): Likewise.
6799 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
6800 (DECL_NONCONVERTING_P): Whitespace.
6801 (DECL_PURE_VIRTUAL_P): Likewise.
6802 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
6803 (DECL_PENDING_INLINE_INFO): Whitespace.
6804 (DECL_SORTED_FIELDS): Likewise.
6805 (DECL_DEFERRED_FN): Likewise.
6806 (DECL_TEMPLATE_INFO): Likewise.
6807 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
6808 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
6809 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
6810 (TMPL_ARGS_LEVEL): Likewise.
6811 (SET_TMPL_ARGS_LEVEL): Likewise.
6812 (INNERMOST_TEMPLATE_PARMS): Whitespace.
6813 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
6814 (INTEGRAL_CODE_P(CODE): Add parenthesis.
6815 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
6816 (TYPE_HAS_CONSTRUCTOR): Whitespace.
6817 (TREE_HAS_CONSTRUCTOR): Likewise.
6818 (TYPE_HAS_DESTRUCTOR): Likewise.
6819 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
6820 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
6821 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
6822 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
6823 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
6824 (TYPE_PTRMEMFUNC_P): Likewise.
6825 (TYPE_PTRMEMFUNC_FLAG): Likewise.
6826 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
6827 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
6828 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
6829 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
6830 (DECL_ACCESS): Whitespace.
6831 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
6832 (DECL_GLOBAL_DTOR_P): Likewise.
6833 (GLOBAL_INIT_PRIORITY): Likewise.
6834 (DECL_TEMPLATE_PARMS): Likewise.
6835 (DECL_TEMPLATE_RESULT): Likewise.
6836 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
6837 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
6838 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
6839 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
6840 (PRIMARY_TEMPLATE_P): Add parenthesis.
6841 (DECL_USE_TEMPLATE): Whitespace.
6842 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
6843 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
6844 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
6845 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
6846 (CALL_DECLARATOR_PARMS): Remove parenthesis.
6847 (CALL_DECLARATOR_QUALS): Likewise.
6848 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
6849 (TEMP_NAME_P): Wrap.
6850 (VFIELD_NAME_P): Likewise.
6851 (B_SET): Uppercase macro parameters and add parenthesis.
6854 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
6855 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
6856 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
6857 (same_or_base_type_p): Likewise.
6858 (cp_deprecated): Likewise.
6860 2002-01-05 Richard Henderson <rth@redhat.com>
6862 * semantics.c (expand_body): Revert last change.
6864 2002-01-04 Jason Merrill <jason@redhat.com>
6867 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
6870 * class.c (build_vtbl_initializer): Check for a lost primary
6871 before calculating the vtable entry to throw away.
6873 2002-01-02 Jason Merrill <jason@redhat.com>
6875 * semantics.c (expand_body): Call outlining_inline_function when
6876 emitting an inline function out of line.
6878 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
6880 PR c++/5116, c++/764 reversion
6881 * call.c (build_new_op): Revert the instantiations. They are
6884 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
6887 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
6889 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
6892 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
6893 (tsubst, case POINTER_TYPE): Handle pmfs here.
6894 (tsubst, case OFFSET_TYPE): Check it is not an offset to
6895 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
6897 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
6900 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
6901 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
6902 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
6904 (tsubst_template_parms): Break up loop statements.
6905 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
6906 parm PARM_DECLs don't get promoted.
6908 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
6911 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
6912 (build_x_function_call): Cope with a COMPONENT_REF containing a
6915 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
6918 * pt.c (convert_template_argument): Be more careful determining
6919 when RECORD_TYPE templates are or are not templates.
6921 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
6924 * cp-tree.h (handle_class_head): Adjust prototype.
6925 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
6926 parameters. Use for all class heads.
6927 * parse.y (named_class_head_sans_basetype, named_class_head,
6928 named_complex_class_head_sans_basetype,
6929 named_class_head_sans_basetype_defn,
6930 unnamed_class_head): Remove.
6931 (class_head, class_head_apparent_template): Recognize class heads
6932 (class_head_decl, class_head_defn): New reductions. Process class
6934 (structsp): Adjust class definition and class declaration
6936 (maybe_base_class_list): Give diagnostic on empty list.
6938 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
6941 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
6942 single non-static member.
6943 (unary_complex_lvalue): If it cannot be a pointer to member, don't
6944 make it so. Check it is not pointer to reference.
6946 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
6949 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
6950 are processing a template decl.
6952 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
6954 PR c++/5116, c++/764
6955 * call.c (build_new_op): Make sure template class operands are
6956 instantiated. Simplify arglist construction.
6958 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
6960 * call.c (build_user_type_conversion_1): Use my_friendly_assert
6961 rather than if ... abort.
6962 * cvt.c (convert_to_reference): Likewise.
6963 * semantics.c (setup_vtbl_ptr): Likewise.
6964 * pt.c (lookup_template_class): Comment typo.
6966 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
6969 * pt.c (push_template_decl_real): Make sure DECL has
6972 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
6975 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
6976 for non-reference fields.
6977 * typeck.c (require_complete_type): Use resolve_offset_ref).
6979 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
6982 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
6984 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
6987 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
6988 up. Don't stabilize_references when initializing a reference.
6990 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6992 * decl2.c (lang_f_options): Const-ify.
6994 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
6996 * config-lang.in (diff_excludes): Remove.
6998 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
7001 * typeck.c (build_function_call_real): Use original function
7002 expression for errors.
7004 2001-12-18 Jason Merrill <jason@redhat.com>
7007 * class.c (add_method): Do compare 'this' quals when trying to match a
7008 used function. Don't defer to another used function.
7010 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
7012 * pt.c (instantiate_clone): Remove, fold into ...
7013 (instantiate_template): ... here. Simplify by removing mutual
7015 * typeck2.c (build_m_component_ref): Don't cv qualify the function
7016 pointed to by a pointer to function.
7017 * class.c (delete_duplicate_fields_1): Typo.
7019 2001-12-18 Jason Merrill <jason@redhat.com>
7021 C++ ABI change: destroy value arguments in caller.
7022 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
7023 create an extra binding level for the parameters.
7024 * decl.c (store_parm_decls): Don't do parameter cleanups.
7026 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
7028 * call.c (build_new_method_call): Use '%#V'.
7029 * error.c (cv_to_string): Use V parameter to determine padding.
7031 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
7033 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
7034 spellings in messages.
7036 2001-12-17 Zack Weinberg <zack@codesourcery.com>
7038 * cp-tree.h: Delete #defines for cp_error, cp_warning,
7039 cp_pedwarn, and cp_compiler_error.
7040 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
7041 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
7042 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
7043 typeck2.c: Change calls to the above macros to use their
7044 language-independent equivalents: error, warning, pedwarn, and
7045 internal_error respectively.
7047 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
7049 * decl2.c (finish_file): Remove back_end_hook.
7051 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
7053 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
7054 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
7055 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
7057 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
7059 * lang-options.h: Use American spelling in messages.
7061 2001-12-13 Jason Merrill <jason@redhat.com>
7063 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
7065 Use cleanups to run base and member destructors.
7066 * init.c (push_base_cleanups): New function, split out from...
7067 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
7068 * decl.c (finish_destructor_body): Move vbase destruction code to
7070 (begin_function_body, finish_function_body): New fns.
7071 (finish_function): Move [cd]tor handling and call_poplevel to
7072 finish_function_body.
7073 (pushdecl): Skip the new level.
7074 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
7075 (setup_vtbl_ptr): Call push_base_cleanups.
7076 * method.c (synthesize_method): Call {begin,end}_function_body.
7077 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
7078 * cp-tree.h: Declare new fns.
7079 * parse.y (function_body, .begin_function_body): New nonterminals.
7080 (fndef, pending_inline, function_try_block): Use function_body.
7081 (ctor_initializer_opt, function_try_block): No longer has a value.
7082 (base_init): Remove .set_base_init token.
7083 (.set_base_init, compstmt_or_error): Remove.
7084 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
7086 * optimize.c (maybe_clone_body): Fix parameter updating.
7088 2001-12-12 Jason Merrill <jason@redhat.com>
7090 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
7091 * semantics.c (genrtl_start_function): Don't pass
7092 parms_have_cleanups or push an extra binding level.
7093 (genrtl_finish_function): Lose cleanup_label cruft.
7095 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
7096 (ctor_label): Remove.
7097 * semantics.c (finish_return_stmt): Lose ctor_label support.
7098 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
7099 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
7102 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
7104 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
7106 * decl.c (finish_function): Check VMS_TARGET, not VMS.
7108 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
7109 (end_cleanup_fn): And poplevel.
7111 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
7112 if we're in a template.
7114 2001-12-12 Jakub Jelinek <jakub@redhat.com>
7116 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
7117 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
7118 THIS_NAME_P): Delete.
7119 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
7120 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
7121 with internal naming scheme.
7122 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
7124 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
7126 * decl.c (grokdeclarator): Deprecated implicit typename use.
7128 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
7131 * parse.y (frob_specs): Indicate it is a language linkage which
7132 contained the extern.
7133 * decl.c (grokdeclarator): Allow extern language linkage with
7136 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
7139 * decl.c (add_binding): Don't reject duplicate typedefs involving
7140 template parameters.
7142 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
7144 * parse.y, semantics.c: Similarly.
7146 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
7149 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
7150 (copy_args_p): Rename to ...
7151 (copy_fn_p): ... here.
7152 (grok_special_member_properties): New function.
7153 (grok_op_properties): Lose VIRTUALP parameter.
7154 (copy_assignment_arg_p): Remove.
7155 * call.c (build_over_call): Use copy_fn_p.
7156 * decl.c (grokfndecl): Reformat. Adjust call to
7158 (copy_args_p): Rename to ...
7159 (copy_fn_p): ... here. Reject template functions. Check for pass
7161 (grok_special_member_properties): Remember special functions.
7162 (grok_ctor_properties): Don't remember them here, just check.
7163 (grok_op_properties): Likewise.
7164 (start_method): Call grok_special_member_properties.
7165 * decl2.c (grokfield): Likewise.
7166 (copy_assignment_arg_p): Remove.
7167 (grok_function_init): Don't remember abstract assignment here.
7168 * pt.c (instantiate_class_template): Call
7169 grok_special_member_properties.
7170 (tsubst_decl): Adjust grok_op_properties call.
7172 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
7174 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
7175 RID_TYPES_COMPATIBLE_P.
7177 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
7179 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
7180 call to build_aggr_init.
7181 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
7183 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
7185 * parse.y: Replace uses of the string non-terminal with STRING.
7186 Don't perform string concatentaion here.
7187 (string): Remove non-terminal.
7188 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
7190 2001-12-05 Jason Merrill <jason@redhat.com>
7192 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
7193 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
7194 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
7195 * pt.c (push_tinst_level): No longer static.
7196 * cp-tree.h: Declare them.
7198 * init.c (resolve_offset_ref): Don't check access for the base
7199 conversion to access a FIELD_DECL.
7201 * cp-tree.h (TYPE_REFFN_P): New macro.
7202 * decl.c (bad_specifiers): Check it, too.
7204 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
7205 on the __*_type_info type if we haven't seen a definition.
7207 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
7209 * decl.c: Include c-common.h.
7210 (shadow_warning): Move to c-common.c.
7212 2001-12-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7214 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
7216 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
7218 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
7220 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
7223 * init.c (sort_base_init): Allow binfos to be directly specified.
7224 * method.c (do_build_copy_constructor): Explicitly convert to the
7226 (do_build_assign_ref): Likewise.
7228 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
7230 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
7231 declaration and initialization.
7233 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
7235 * typeck2.c: Remove leading capital from diagnostic messages, as
7236 per GNU coding standards.
7238 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
7241 * decl.c (xref_basetypes): Handle attributes between
7244 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
7247 * parse.y (named_complex_class_head_sans_basetype): Add new
7249 * Make-lang.in (parse.c): Adjust expected conflict count.
7251 2001-12-03 Jason Merrill <jason@redhat.com>
7253 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
7254 immediate binfos for our virtual bases.
7256 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
7258 * call.c (build_java_interface_fn_ref): Similarly.
7259 * except.c (is_admissible_throw_operand): Similarly.
7260 * init.c (build_java_class_ref): Similarly.
7261 * xref.c (open_xref_file): Similarly.
7263 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
7265 * class.c (finish_struct): Remove trailing periods from messages.
7266 * decl.c (check_tag_decl): Similarly.
7267 * lex.c (cxx_set_yydebug): Similarly.
7268 * typeck2.c (friendly_abort): Similarly.
7270 2001-11-29 Mark Mitchell <mark@codesourcery.com>
7273 * cp-tree.h (ovl_member): Remove.
7274 * decl2.c (merge_functions): Handle extern "C" functions
7276 * tree.c (ovl_member): Remove.
7278 2001-11-29 Mark Mitchell <mark@codesourcery.com>
7281 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
7282 FUNCTION_DECL, as input.
7283 (mark_overriders): Remove.
7284 (warn_hidden): Rework for the new ABI.
7286 2001-11-29 Mark Mitchell <mark@codesourcery.com>
7289 * call.c (convert_like_real): Do not build additional temporaries
7290 for rvalues of class type.
7292 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
7294 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
7295 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
7296 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
7297 (DERIVED_FROM_P): Likewise.
7298 (enum base_access): Renumber, add ba_quiet bit mask.
7299 (get_binfo): Remove.
7300 (get_base_distance): Remove.
7301 (binfo_value): Remove.
7302 (ACCESSIBLY_DERIVED_FROM_P): Remove.
7303 * call.c (standard_conversion): Use lookup_base.
7304 * class.c (strictly_overrides): Likewise.
7305 (layout_virtual_bases): Likewise.
7306 (warn_about_ambiguous_direct_bases): Likewise.
7307 (is_base_of_enclosing_class): Likewise.
7308 (add_vcall_offset_vtbl_entries_1): Likewise.
7309 * cvt.c (build_up_reference): Adjust comment.
7310 * init.c (build_member_call): Reformat.
7311 * search.c (get_binfo): Remove.
7312 (get_base_distance_recursive): Remove.
7313 (get_base_distance): Remove.
7314 (lookup_base_r): Tweak.
7315 (lookup_base): Add ba_quiet control. Complete the types here.
7316 (covariant_return_p): Use lookup_base.
7317 * tree.c (binfo_value): Remove.
7318 (maybe_dummy_object): Use lookup_base.
7319 * typeck.c (build_static_cast): Use lookup_base.
7320 (get_delta_difference): Likewise.
7321 * typeck2.c (binfo_or_else): Use lookup_base.
7322 (build_scoped_ref): Add back error_mark_check.
7323 (build_m_component_ref): Use lookup_base.
7325 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
7327 * Make-lang.in (c++.generated-manpages): New dummy target.
7329 2001-11-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7331 * Make-lang.in (cp-lang.o): Depends on c-common.h.
7332 * cp-lang.c (c-common.h): Include.
7333 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
7334 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
7335 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
7337 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
7339 * decl2.c (c_language): Move to c-common.c.
7340 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
7344 2001-11-26 Jason Merrill <jason@redhat.com>
7346 * call.c (joust): Remove COND_EXPR hack.
7348 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
7350 * search.c (lookup_base_r): Declare bk in variable declaration
7353 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
7356 * class.c (build_vbase_pointer): Remove.
7357 (build_vbase_path): Remove.
7358 (build_base_path): New function.
7359 * cp-tree.h (base_access, base_kind): New enumerations.
7360 (build_base_path): Declare.
7361 (convert_pointer_to_real): Remove.
7362 (convert_pointer_to): Remove.
7363 (lookup_base): Declare.
7364 (convert_pointer_to_vbase): Remove.
7365 * call.c (build_scoped_method_call): Use lookup_base &
7366 build_base_path instead of convert_pointer_to_real,
7367 get_base_distance & get_binfo.
7368 (build_over_call): Likewise.
7369 * cvt.c (cp_convert_to_pointer): Likewise.
7370 (convert_to_pointer_force): Likewise.
7371 (build_up_reference): Likewise.
7372 (convert_pointer_to_real): Remove.
7373 (convert_pointer_to): Remove.
7374 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
7375 instead of convert_pointer_to_vbase & build_vbase_path.
7376 (emit_base_init): Use build_base_path instead of
7377 convert_pointer_to_real.
7378 (expand_virtual_init): Lose unrequired conversions.
7379 (resolve_offset_ref): Use lookup_base and build_base_path
7380 instead of convert_pointer_to.
7381 * rtti.c (build_dynamic_cast_1): Use lookup_base &
7382 build_base_path instead of get_base_distance & build_vbase_path.
7383 * search.c (get_vbase_1): Remove.
7384 (get_vbase): Remove.
7385 (convert_pointer_to_vbase): Remove.
7386 (lookup_base_r): New function.
7387 (lookup_base): New function.
7388 * typeck.c (require_complete_type): Use lookup_base &
7389 build_base_path instead of convert_pointer_to.
7390 (build_component_ref): Likewise.
7391 (build_x_function_call): Likewise.
7392 (get_member_function_from_ptrfunc): Likewise.
7393 (build_component_addr): Likewise.
7394 * typeck2.c (build_scoped_ref): Likewise.
7396 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7398 * cp-tree.h (CP_TYPE_QUALS): Removed.
7399 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
7400 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
7401 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
7402 * dump.c (cp_dump_tree): Use void* dump_info argument to match
7403 lang-hooks prototype.
7404 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
7405 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
7406 CP_TYPE_QUALS changed to cp_type_quals.
7407 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
7408 (CXX_C_OBJS): Remove c-dump.o.
7410 2001-11-21 Mark Mitchell <mark@codesourcery.com>
7413 * pt.c (lookup_template_class): Ensure that all specializations
7414 are registered on the list corresponding to the most general
7417 2001-11-20 Mark Mitchell <mark@codesourcery.com>
7419 * call.c (non_reference): Add documentation.
7420 (convert_class_to_reference): Do not strip reference types
7421 from conversion operators.
7422 (maybe_handle_ref_bind): Simplify.
7423 (compare_ics): Correct handling of references.
7425 2001-11-19 John Wilkinson <johnw@research.att.com>
7427 * dump.c (dump_op): New function.
7428 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
7429 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
7430 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
7432 2001-11-19 Mark Mitchell <mark@codesourcery.com>
7435 * semantics.c (finish_sizeof): Make sure that expression created
7436 while processing a template do not have a type.
7437 (finish_alignof): Likewise.
7438 * typeck.c (c_sizeof): Likewise.
7439 (expr_sizeof): Likewise.
7441 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
7443 * lex.c (cxx_finish): Call c_common_finish.
7444 (finish_parse): Remove.
7446 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7448 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
7449 when displaying error message about missing array bounds.
7451 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7453 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
7455 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
7457 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
7459 * cp-tree.h (print_class_statistics): Restore.
7461 2001-11-15 Jason Merrill <jason@redhat.com>
7463 * method.c (use_thunk): Don't emit debugging information for thunks.
7465 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
7466 * decl.c (make_typename_type): Handle getting a class template.
7467 * search.c (lookup_field_r): A class template is good enough for
7470 * call.c (convert_like_real): Only use cp_convert for the bad part.
7471 (standard_conversion): Also allow bad int->enum.
7472 * typeck.c (ptr_reasonably_similar): Also allow functions to
7473 interconvert. Pointers to same-size integers are reasonably
7476 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
7479 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
7482 * init.c (sort_base_init): Remove unreachable code.
7483 (expand_member_init): Adjust comment to reflect reality. Simplify
7484 and remove unreachable code.
7486 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
7488 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
7489 (cxx_init): Update prototype.
7490 * decl.c (init_decl_processing): Rename. Move null node init
7491 to its creation time.
7492 * lex.c (cxx_init_options): Update.
7493 (cxx_init): Combine with old init_parse; also call
7494 cxx_init_decl_processing.
7496 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
7498 * decl.c (check_initializer): Try to complete the type of an
7499 array element before checking whether it's complete. Don't
7500 complain about arrays with complete element types but an
7502 (cp_finish_decl): Build the hierarchical constructor before
7503 calling maybe_deduce_size_from_array_init.
7505 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
7507 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
7509 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
7512 * parse.y (already_scoped_stmt): Remove.
7513 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
7515 2001-11-12 H.J. Lu <hjl@gnu.org>
7517 * cvt.c (ocp_convert): Don't warn the address of a weak
7518 function is always `true'.
7520 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
7522 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
7523 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
7524 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
7525 * cp-tree.h (print_class_statistics): Remove.
7526 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
7527 cxx_print_identifier, cxx_set_yydebug): New.
7528 * lex.c (set_yydebug): Rename c_set_yydebug.
7529 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
7530 lang_print_xnode): Rename.
7531 * tree.c (print_lang_statistics): Rename.
7533 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7535 * class.c (dump_array): Fix format specifier warning.
7537 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
7539 * cp-lang.c (LANG_HOOKS_NAME): Override.
7540 (struct lang_hooks): Constify.
7541 * lex.c (cxx_init_options): Update.
7542 (lang_identify): Remove.
7543 * parse.y (language_string): Remove.
7545 2001-11-08 Andreas Franck <afranck@gmx.de>
7547 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
7548 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
7549 suggested by autoconf.
7550 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
7551 (c++.install-common): Use the transformed target alias names.
7553 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
7555 * Make-lang.in: Update.
7556 * cp-lang.c: Include langhooks-def.h.
7558 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7560 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
7562 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7564 * lex.c (copy_lang_type): Add static prototype.
7566 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7568 * pt.c (unify): Handle SCOPE_REF.
7570 2001-11-01 Jakub Jelinek <jakub@redhat.com>
7572 * tree.c (cp_copy_res_decl_for_inlining): Adjust
7573 DECL_ABSTRACT_ORIGIN for the return variable.
7575 2001-10-31 Zack Weinberg <zack@codesourcery.com>
7577 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
7579 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
7581 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
7582 semantics.c, spew.c: Fix spelling errors.
7584 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7586 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
7588 2001-10-25 Zack Weinberg <zack@codesourcery.com>
7590 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
7593 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7595 * cp-lang.c (cxx_get_alias_set): New function.
7596 Point LANG_HOOKS_GET_ALIAS_SET to it.
7598 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7600 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
7601 * cp-tree.h (make_unbound_class_template): Prototype new function.
7602 * decl.c (make_unbound_class_template): New function.
7603 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
7604 * error.c (dump_type): Likewise.
7605 * mangle.c (write_type): Likewise.
7606 * parse.y (template_parm): Likewise.
7607 (template_argument): Use make_unbound_class_template.
7608 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
7610 (tsubst_copy): Likewise.
7612 * tree.c (walk_tree): Likewise.
7613 * typeck.c (comptypes): Likewise.
7615 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7617 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
7618 extra calls into fewer ones.
7620 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
7622 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
7623 Warn when merging inline with attribute noinline.
7624 (start_decl, start_function): Warn if inline and attribute
7625 noinline appear in the same declaration.
7627 2001-10-16 H.J. Lu <hjl@gnu.org>
7629 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
7630 for tree checking disabled.
7632 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
7634 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
7635 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
7637 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
7639 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
7640 (unify): Only handle MINUS_EXPR specially if the above flag is set
7641 and the subtracted constant is 1. Clear the flag on recursive calls.
7642 Set it when unifying the maximum value in an INTEGER_TYPE's range.
7644 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
7646 * decl.c (bad_specifiers): Don't allow exception specifications
7649 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
7651 * cp/lex.c (init_cp_pragma): Similarly.
7653 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7655 * pt.c (lookup_template_class): Build complete template arguments
7656 for BOUND_TEMPLATE_TEMPLATE_PARM.
7658 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7660 * cp-tree.h (TYPE_BINFO): Update comment.
7661 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
7662 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
7663 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
7664 (copy_type): Prototype new function.
7665 * lex.c (copy_lang_decl): Gather tree node statistics.
7666 (copy_lang_type): New function.
7667 (copy_type): Likewise.
7668 (cp_make_lang_type): Create lang_type for
7669 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
7670 and BOUND_TEMPLATE_TEMPLATE_PARM.
7671 * pt.c (tsubst): Use copy_type instead of copy_node.
7672 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
7674 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7676 * pt.c (determine_specialization): Ignore functions without
7679 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
7682 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
7684 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
7686 * typeck2.c (store_init_value): Don't re-digest a bracketed
7689 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
7692 2001-10-11 Richard Henderson <rth@redhat.com>
7694 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
7695 of an asm statement.
7696 (build_vtbl_ref_1): Split out from build_vtbl_ref.
7697 (build_vfn_ref): Use it to handle vtable descriptors before
7698 calling build_vtable_entry_ref.
7699 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
7701 2001-10-10 Richard Henderson <rth@redhat.com>
7703 * parse.y (asm_operand): Allow named operands.
7704 * semantics.c (finish_asm_stmt): Tweek for changed location
7705 of the operand constraint.
7707 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
7709 * call.c (standard_conversion): Add bad conversion between
7710 integers and pointers.
7711 (convert_like_real): Don't use convert_for_initialization for bad
7712 conversions; complain here and use cp_convert.
7713 (build_over_call): Don't handle bad conversions specially.
7714 (perform_implicit_conversion): Allow bad conversions.
7715 (can_convert_arg_bad): New fn.
7716 * cp-tree.h: Declare it.
7717 * typeck.c (convert_for_assignment): Use it.
7718 (ptr_reasonably_similar): Any target type is similar to void.
7720 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
7722 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
7723 (cp/cp-lang.o): New rule.
7724 * cp-tree.h: Declare hooks.
7725 * tree.c: Make hooks non-static.
7726 (init_tree): Don't initialize hooks here.
7727 * lex.c: Likewise. Move definition of lang_hooks to...
7728 * cp-lang.c: ... new file.
7730 2001-10-08 Richard Henderson <rth@redhat.com>
7732 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
7733 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
7735 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7737 * class.c (build_vtable_entry_ref): Const-ify.
7738 * decl.c (predefined_identifier,
7739 initialize_predefined_identifiers): Likewise.
7740 * init.c (build_new_1): Likewise.
7741 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
7744 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
7746 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
7747 (INSNS_PER_STMT): Likewise.
7748 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
7749 (copy_body, initialize_inlined_parameters): Likewise.
7750 (declare_return_variable, inlinable_function_p): Likewise.
7751 (expand_call_inline, expand_calls_inline): Likewise.
7752 (optimize_inline_calls, clone_body): Likewise.
7753 * tree.c (walk_tree): Moved to ../tree-inline.c.
7754 (walk_tree_without_duplicates): Likewise.
7755 (copy_tree_r, remap_save_expr): Likewise.
7757 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
7759 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
7760 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
7761 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
7762 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
7763 (flag_inline_trees): Moved declaration to ../tree-inline.h.
7764 (walk_tree): Moved declaration to ../tree-inline.h.
7765 (walk_tree_without_duplicates, copy_tree_r): Likewise.
7766 (remap_save_expr): Likewise.
7767 * decl.c: Include tree-inline.h.
7768 (lang_mark_tree): Don't mark inlined_fns.
7769 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
7770 * optimize.c: Include tree-inline.h.
7771 (optimize_inline_calls): Move declaration to ../tree.h, as
7773 (remap_decl): Use language-independent constructs and hooks.
7774 (remap_block, copy_body_r, declare_return_variable): Likewise.
7775 (inlinable_function_p): Likewise. Don't test for
7776 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
7777 no longer language-specific.
7778 (optimize_inline_calls): Likewise. Make it non-static. Moved
7779 call of dump_function to...
7780 (optimize_function): Here...
7781 (clone_body): New function, extracted from...
7782 (maybe_clone_body): ... here. Build decl_map locally and pass
7783 it on to clone_body.
7784 * pt.c, semantics.c: Include tree-inline.h.
7786 (cp_walk_subtrees): New language-specific hook for tree inlining.
7787 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
7788 cp_is_overload_p, cp_auto_var_in_fn_p,
7789 cp_copy_res_decl_for_inlining): Likewise.
7790 (walk_tree): Move language-specific constructs into...
7791 (cp_walk_subtrees): this new function.
7792 (copy_tree_r): Use language-independent constructs and hooks.
7793 (init_tree): Initialize tree inlining hooks.
7794 (remap_save_expr): Adjust prototype so that the declaration
7795 does not require the definition of splay_tree.
7797 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
7799 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
7800 to build the declaration instead of the declaration itself.
7802 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
7804 * decl2.c (cxx_decode_option): Add 'else'.
7806 * spew.c (end_input): No longer static.
7807 * cp-tree.h: Declare it.
7808 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
7810 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
7812 * call.c (build_over_call), typeck.c (build_function_call_real):
7813 Pass type attributes to check_function_format rather than name or
7814 assembler name. Don't require there to be a name or assembler
7815 name to check formats.
7817 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
7819 * decl.c (init_decl_processing): Don't call
7820 init_function_format_info. Initialize lang_attribute_table
7822 (builtin_function): Call decl_attributes.
7823 (insert_default_attributes): New.
7825 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
7827 * decl.c (grokdeclarator): Copy array typedef handling from C
7830 * decl.c (grokdeclarator): Copy too-large array handling from C
7833 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
7835 * config-lang.in (target_libs): Added target-gperf, so that we
7836 don't try to build it if C++ is disabled.
7838 2001-09-23 Zack Weinberg <zack@codesourcery.com>
7840 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
7841 (cp/errfn.o): Delete rule.
7842 (cp/error.o): Depend on flags.h.
7843 * errfn.c: Delete file.
7844 * cp-tree.h: Declare warn_deprecated. Remove definitions of
7845 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
7846 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
7847 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
7848 internal_error respectively. Make cp_deprecated into a macro.
7849 Don't define cp_printer typedef or declare cp_printers.
7850 * error.c: Include flags.h.
7851 Delete: struct tree_formatting_info, print_function_argument_list,
7852 print_declaration, print_expression, print_function_declaration,
7853 print_function_parameter, print_type_id, print_cv_qualifier_seq,
7854 print_type_specifier_seq, print_simple_type_specifier,
7855 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
7856 print_parameter_declaration_clause, print_exception_specification,
7857 print_nested_name_specifier, and definition of cp_printers.
7858 (locate_error): New function.
7859 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
7860 rewritten in terms of locate_error and diagnostic.c.
7861 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
7862 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
7863 (init_error): Adjust to match.
7865 2001-09-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7867 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
7869 2001-09-21 Richard Henderson <rth@redhat.com>
7871 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
7872 (build_vtbl_initializer): Likewise.
7873 (build_vfn_ref): New.
7874 * cp-tree.h: Declare it.
7875 * call.c (build_over_call): Use it.
7876 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
7877 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
7879 2001-09-21 J"orn Rennecke <amylaar@redhat.com>
7881 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
7883 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
7885 Table-driven attributes.
7886 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
7887 * decl2.c (cplus_decl_attributes): Only take one attributes
7889 * cp-tree.c (cplus_decl_attributes): Update prototype.
7890 * class.c (finish_struct), decl.c (start_decl, start_function),
7891 decl2.c (grokfield), friend.c (do_friend), parse.y
7892 (parse_bitfield): Update calls to cplus_decl_attributes.
7893 * decl.c (grokdeclarator): Take a pointer to a single ordinary
7895 * decl.h (grokdeclarator): Update prototype.
7896 * decl2.c (grokfield): Take a single ordinary attribute list.
7897 * friend.c (do_friend): Likewise.
7898 * decl.c (shadow_tag, groktypename, start_decl,
7899 start_handler_parms, grokdeclarator, grokparms, start_function,
7900 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
7901 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
7902 (process_template_parm, do_decl_instantiation): Pass single
7903 ordinary attribute lists around.
7904 * decl.c (grokdeclarator): Correct handling of nested attributes.
7906 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
7907 * decl.c (grokdeclarator): Embedded attrs bind to the right,
7910 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
7911 (cp_attribute_table): Declare.
7912 * decl.c (valid_lang_attribute): Don't define.
7913 (lang_attribute_table): Define.
7914 (init_decl_processing): Initialize lang_attribute_table instead of
7915 valid_lang_attribute.
7916 * tree.c (cp_valid_lang_attribute): Remove.
7917 (handle_java_interface_attribute, handle_com_interface_attribute,
7918 handle_init_priority_attribute): New functions.
7919 (cp_attribute_table): New array.
7920 * decl2.c (import_export_class): Don't use
7921 targetm.valid_type_attribute.
7923 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
7925 * Make-lang.in (cp/error.o): Depend on real.h
7926 * error.c: #include "real.h"
7928 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7930 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
7931 xmalloc/strcpy/strcat.
7933 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7935 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
7937 * pt.c (tsubst_decl): Likewise.
7939 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7941 * decl2.c (lang_f_options): Const-ification.
7942 * lex.c (cplus_tree_code_name): Likewise.
7943 * spew.c (yyerror): Likewise.
7945 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
7948 * class.c (force_canonical_binfo_r): Check & move an indirect
7950 (force_canonical_binfo): Check that it's not already
7952 (mark_primary_virtual_base): Remove BINFO parameter.
7953 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
7955 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
7957 Remove TYPE_NONCOPIED_PARTS.
7958 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
7959 CLASSTYPE_PURE_VIRTUALS.
7960 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
7961 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
7962 (layout_class_type): Don't call fixup_inline_methods here ...
7963 (finish_struct_1): ... call it here.
7965 2001-09-04 Mark Mitchell <mark@codesourcery.com>
7967 * decl.c (duplicate_decls): Remove code deadling with
7969 * decl2.c (finish_file): Likewise.
7970 * pt.c (instantiate_decl): Likewise.
7971 * semantics.c (expand_body): Don't defer local functions if
7972 they wouldn't be deferred for some other reason. Don't
7973 generate RTL for functions that will not be emitted.
7974 (genrtl_start_function): Remove code deadling with
7976 (genrtl_finish_function): Likewise.
7978 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
7981 * call.c (build_over_call): Do not optimize any empty base
7984 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7986 * error.c (dump_template_decl): Output template parameters
7987 together with their specifiers.
7988 Output `class' prefix for template template parameter.
7989 (dump_decl): Fix formatting.
7991 2001-08-30 Kurt Garloff <garloff@suse.de>
7993 * optimize.c (inlinable_function_p): Allow only smaller single
7994 functions. Halve inline limit after reaching recursive limit.
7996 2001-08-30 Joern Rennecke <amylaar@redhat.com>
7997 Jason Merrill <jason_merrill@redhat.com>
7999 * class.c (build_vtable_entry_ref): Subtract in char*, not
8002 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
8004 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
8005 (build_cplus_array_type): Use cp_build_qualified_type, not
8006 TYPE_MAIN_VARIANT, to get an unqualified version.
8008 * decl2.c (grok_alignof): Lose.
8009 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
8010 * typeck.c (c_alignof): Lose.
8011 * semantics.c (finish_sizeof, finish_alignof): New.
8012 * parse.y: Use them.
8013 * cp-tree.h: Declare them.
8015 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
8017 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
8018 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
8019 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
8021 2001-08-19 Jakub Jelinek <jakub@redhat.com>
8023 * typeck2.c (add_exception_specifier): Only require complete type if
8024 not in processing template declaration.
8026 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8028 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
8029 GNU_xref_start_scope and GNU_xref_end_scope.
8031 * tree.c (TYPE_HASH): Moved to ../tree.h.
8033 2001-08-16 Mark Mitchell <mark@codesourcery.com>
8035 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
8038 2001-08-14 Richard Henderson <rth@redhat.com>
8040 * class.c, cp-tree.h (build_vfn_ref): Remove.
8041 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
8043 2001-08-13 Mark Mitchell <mark@codesourcery.com>
8045 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
8046 empty class assignment as having side-effects to avoid
8049 2001-08-13 Zack Weinberg <zackw@panix.com>
8051 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
8052 * except.c: Include libfuncs.h.
8054 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
8056 * decl.c (grokdeclarator): Clarify diagnostic message.
8058 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8060 * decl2.c (do_nonmember_using_decl): Replace using directive
8061 with using declaration in the error message.
8063 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8065 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
8066 criterion to avoid rebuilding expression tree instead of
8067 processing_template_decl.
8069 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
8071 Support named return value optimization for inlines, too.
8072 * decl.c (finish_function): Nullify returns here.
8073 * semantics.c (genrtl_start_function): Not here.
8074 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
8075 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
8076 Also nullify the CLEANUP_STMT for the nrv.
8077 * cp-tree.h: Declare it.
8078 * optimize.c (declare_return_variable): Replace the nrv with the
8080 * typeck.c (check_return_expr): Be more flexible on alignment check.
8081 Ignore cv-quals when checking for a matching type.
8083 2001-08-09 Richard Henderson <rth@redhat.com>
8085 * decl2.c (finish_objects): Use target hooks instead of
8086 assemble_constructor and assemble_destructor.
8088 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
8090 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
8092 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
8095 Stop using TYPE_NONCOPIED_PARTS.
8096 * call.c (build_over_call): Be careful when copy constructing
8097 or assigning to an empty class.
8098 * class.c (check_bases_and_members): It has a
8099 COMPLEX_ASSIGN_REF if it has a vptr.
8100 (layout_class_type): Don't add empty class padding to
8101 TYPE_NONCOPIED_PARTS.
8102 (finish_struct_1): Don't add the VFIELD either.
8103 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
8106 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
8108 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
8110 2001-08-06 Richard Henderson <rth@redhat.com>
8112 * decl2.c (finish_objects): Pass a symbol_ref and priority to
8113 assemble_{constructor,destructor}. Remove priority handling.
8115 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
8117 Don't allow template-id in using-declaration.
8118 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
8119 (do_class_using_decl): Likewise.
8121 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
8123 * cp/spew.c (read_token): No need to pop buffers.
8125 2001-08-02 Stan Shebs <shebs@apple.com>
8127 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
8128 (fnaddr_from_vtable_entry): Remove decl.
8129 * method.c (use_thunk): Update comment.
8131 2001-08-01 Andrew Cagney <ac131313@redhat.com>
8133 * repo.c (get_base_filename): Change return value to const char
8136 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
8140 * cp-tree.h (flag_honor_std): Remove.
8141 (CPTI_FAKE_STD): Remove.
8142 (std_node): Remove comment about it being NULL.
8143 (fake_std_node): Remove.
8144 * decl.c (in_fake_std): Remove.
8145 (walk_namespaces_r): Remove fake_std_node check.
8146 (push_namespace): Remove in_fake_std code.
8147 (pop_namespace): Likewise.
8148 (lookup_name_real): Remove fake_std_node check.
8149 (init_decl_processing): Always create std_node. Always add
8151 (builtin_function): Always put non '_' fns in std.
8152 * decl2.c (flag_honor_std): Remove.
8153 (lang_f_options): Remove honor-std.
8154 (unsupported_options): Add honor-std.
8155 (set_decl_namespace): Remove fake_std_node check.
8156 (validate_nonmember_using_decl): Likewise.
8157 (do_using_directive): Likewise.
8158 (handle_class_head): Likewise.
8159 * dump.c (cp_dump_tree): Likewise.
8160 * except.c (init_exception_processing): Adjust.
8161 * init.c (build_member_call): Remove fake_std_node check.
8162 (build_offset_ref): Likewise.
8163 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
8164 * rtti.c (init_rtti_processing): Adjust.
8166 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
8168 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
8169 operand while calling cp_tree_equal.
8171 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
8173 The 3.0 ABI no longer has vbase pointer fields.
8174 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
8175 FORMAT_VBASE_NAME): Remove.
8176 * method.c (do_build_copy_constructor): Adjust.
8177 (do_build_assign_ref): Adjust.
8178 * search.c (lookup_field_r): Adjust.
8179 * typeck.c (build_component_ref): Adjust.
8181 The 3.0 ABI always has a vtable pointer at the start of every
8183 * rtti.c (build_headof_sub): Remove.
8184 (build_headof): Adjust.
8185 (get_tinfo_decl_dynamic): No need to check flag_rtti
8187 (create_real_tinfo_var): Explain why we need a hidden name.
8189 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
8192 * class.c (update_vtable_entry_for_fn): The fixed adjustment
8193 of a virtual thunk should be from declaring base.
8195 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
8197 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
8198 the shared virtual base, so preserving inheritance graph order.
8200 2001-07-30 Andreas Jaeger <aj@suse.de>
8202 * decl2.c: Remove unused var global_temp_name_counter.
8204 2001-07-28 Richard Henderson <rth@redhat.com>
8206 * method.c (pending_inlines): Remove.
8208 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
8210 * class.c (mark_primary_virtual_base): Don't adjust base
8212 (dfs_unshared_virtual_bases): Adjust them here.
8213 (mark_primary_bases): Explain why we adjust at the end.
8215 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
8217 * class.c (finish_struct_1): When copying the primary base's
8218 VFIELD, make sure we find it is at offset zero.
8220 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8222 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
8223 tsubst_expr for default template arguments.
8225 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
8228 * spew.c (yylex): Only copy the token's lineno, if it is
8231 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
8234 * call.c (resolve_args): Simplify, call
8235 convert_from_reference.
8236 (build_new_op): Resolve and convert from reference ARG1
8237 earlier. Adjust ARG2 & ARG3 resolve and conversion.
8239 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
8241 * decl.c (last_function_parm_tags): Remove.
8242 (current_function_parm_tags): Remove.
8243 (init_decl_processing): Adjust.
8244 (start_function): Adjust.
8245 (store_parm_decls): Adjust.
8248 * decl.c (grokdeclarator): Detect when a function typedef is
8249 declaring a function, and create last_function_parms correctly.
8251 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
8253 * call.c (joust): Only prefer a non-builtin candidate to a builtin
8254 one if they have the same signature.
8256 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
8257 it rather than toplevel_bindings_p. Give it a mangled name if static.
8258 (convert_to_reference): Adjust.
8259 * decl2.c (get_temp_name): Lose.
8260 * mangle.c (mangle_ref_init_variable): New fn.
8261 (mangle_guard_variable): Strip the ref-init header.
8262 * cp-tree.h: Adjust.
8263 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
8265 (grok_reference_init): Always use DECL_INITIAL.
8267 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
8270 * call.c (build_conditional_expr): Recheck args after
8272 * cp-tree.h (build_conditional_expr): Move to correct file.
8273 * typeck.c (decay_conversion): Diagnose any unknown types
8275 (build_binary_op): Don't do initial decay or default
8276 conversions on overloaded functions.
8277 (build_static_cast): Don't do a decay conversion here.
8279 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
8282 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
8283 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
8285 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
8287 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
8288 (create_vtbl_ptr): ... here.
8290 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
8292 * class.c (build_vbase_offset_vbtl_entries): Look for
8293 non-primary base of which we are a sub vtable.
8295 2001-07-24 Phil Edwards <pme@sources.redhat.com>
8297 * semantics.c (finish_this_expr): Remove unused code.
8299 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
8301 Simplify rtti, now we've only one ABI.
8302 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
8304 (tinfo_decl_id, tinfo_var_id): Remove.
8305 (get_typeid_1): Remove.
8307 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
8308 (typeid_ok_p): New function.
8309 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
8310 (get_tinfo_decl): Remove old abi documentation.
8311 (tinfo_from_decl): Remove.
8312 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
8313 (get_typeid_1): Remove.
8314 (get_base_offset): Remove.
8315 (synthesize_tinfo_var): Absorb get_base_offset.
8316 (create_real_tinfo_var): Don't use tinfo_decl_id.
8318 2001-07-23 Graham Stott <grahams@redhat.com>
8320 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
8321 variable has_two_argument_delete_p.
8323 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
8325 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
8326 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
8327 (CPTI_INDEX_IDENTIFIER): Remove.
8328 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
8329 (delta2_identifier): Remove.
8330 (index_identifier): Remove.
8331 (pfn_or_delta2_identifier): Remove.
8332 (flag_vtable_thunks): Remove.
8333 (VTABLE_DELTA2_NAME): Remove.
8334 (VTABLE_INDEX_NAME): Remove.
8335 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
8336 (vfunc_ptr_type_node): Adjust.
8337 (VTABLE_NAME_PREFIX): Adjust.
8338 (build_vfn_ref): Lose first parameter.
8339 (fixup_all_virtual_upcast_offsets): Remove.
8340 * decl.c (initialize_predefined_identifiers): Remove
8341 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
8342 (init_decl_processing): Remove no-vtable-thunk code.
8343 * decl2.c (flag_vtable_thunks): Remove.
8344 (mark_vtable_entries): Remove no-vtable-thunk code.
8345 * error.c (dump_decl): Remove no-vtable-thunk code.
8346 (dump_expr): Adjust ptr to member function code.
8347 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
8349 * rtti.c (build_headof): Remove no-vtable-thunk code.
8350 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
8351 * search.c (get_base_distance): Remove expand_upcast_fixups case.
8352 (virtual_context) Remove.
8353 (expand_upcast_fixups): Remove.
8354 (fixup_virtual_upcast_offsets): Remove.
8355 (fixup_all_virtual_upcast_offsets): Remove.
8356 * typeck.c (get_member_function_from_ptrfunc): Remove
8357 no-vtable-thunk code.
8358 * call.c (build_over_call): Adjust call to build_vfn_ref.
8359 * class.c (build_vfn_ref): Lose first parameter. Remove
8360 no-vtable-thunk code.
8361 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
8362 (build_vtable_entry): Remove no-vtable-thunk code.
8364 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
8366 Remove old-abi remnants. Remove comments about old abi
8367 behavior. Remove references to 'new-abi' in comments.
8368 * cp-tree.h: Adjust comments.
8369 (vbase_offsets_in_vtable_p): Delete.
8370 (vcall_offsets_in_vtable_p): Delete.
8371 (vptrs_present_everywhere_p): Delete.
8372 (all_overridden_vfuns_in_vtables_p): Delete.
8373 (merge_primary_and_secondary_vtables_p): Delete.
8374 (TYPE_CONTAINS_VPTR_P): Adjust.
8375 (VTT_NAME_PREFIX): Remove.
8376 (CTOR_VTBL_NAME_PREFIX): Remove.
8377 (init_vbase_pointers): Remove.
8378 * class.c: Adjust coments.
8379 (build_vbase_pointer_fields): Delete.
8380 (build_vbase_pointer): Remove old-abi code.
8381 (build_secondary_vtable): Likewise.
8382 (modify_all_vtables): Likewise.
8383 (create_vtable_ptr): Likewise.
8384 (layout_class_type): Likewise.
8385 (finish_struct_1): Likewise.
8386 (finish_vtbls): Likewise.
8387 (dfs_finish_vtbls): Delete.
8388 (build_vbase_offset_vtbl_entries): Remove old-abi code.
8389 * cvt.c: Adjust comments.
8390 * decl.c: Adjust comments.
8391 * decl2.c: Adjust comments.
8392 * init.c: Adjust comments.
8393 (construct_virtual_bases): Remove old-abi code.
8394 * lang-specs.h: Remove -fno-new-abi.
8395 * mangle.c: Adjust comments.
8396 * rtti.c: Adjust comments.
8397 (get_base_offset): Remove old-abi-code.
8398 * search.c: Adjust comments.
8399 (dfs_init_vbase_pointers): Remove.
8400 (dfs_vtable_path_unmark): Remove.
8401 (init_vbase_pointers): Remove.
8402 * semantics.c: Adjust comments.
8403 (emit_associated_thunks): Remove old-abi code.
8404 * typeck.c: Adjust comments.
8406 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
8408 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
8411 2001-07-19 Mark Mitchell <mark@codesourcery.com>
8413 * class.c (finish_struct_anon): Forbid nested classes.
8415 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
8417 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
8418 * optimize.c: Include debug.h.
8419 (maybe_clone_body): Use debug hook.
8420 * semantics.c: Include debug.h.
8421 (expand_body): Use debug hook.
8423 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
8425 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
8427 2001-07-18 Mark Mitchell <mark@codesourcery.com>
8429 * class.c (type_requires_array_cookie): New function.
8430 (check_methods): Don't try to figure out whether the type needs a
8432 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
8433 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
8434 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
8435 * pt.c (instantiate_class_template): Don't set
8436 TYPE_VEC_DELETE_TAKES_SIZE.
8437 * NEWS: Document ABI changes from GCC 3.0.
8439 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
8440 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
8442 * NEWS (Changes in GCC 3.0): Fix typo.
8444 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
8446 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
8447 which attributes are to be attached, and a flags argument. Update
8448 call to decl_attributes.
8449 (grokfield): Update call to decl_attributes.
8450 * class.c (finish_struct): Update call to cplus_decl_attributes.
8451 * cp-tree.h (cplus_decl_attributes): Update prototype.
8452 * decl.c (start_decl, grokdeclarator, start_function): Update
8453 calls to decl_attributes and cplus_decl_attributes.
8454 * friend.c (do_friend): Update call to cplus_decl_attributes.
8455 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
8457 2001-07-12 Mark Mitchell <mark@codesourcery.com>
8459 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
8460 for `register' variables with an asm-specification.
8462 2001-07-11 Mark Mitchell <mark@codesourcery.com>
8464 * semantics.c (finish_asm_stmt): Mark the output operands
8465 to an asm addressable, if necessary.
8467 2001-07-11 Ben Elliston <bje@redhat.com>
8469 * Revert this change -- there is a subtle bug.
8472 * decl.c (finish_enum): New "attributes" argument; pass it to
8473 cplus_decl_attributes. Use a narrower type if the enum is packed.
8474 * cp-tree.h (finish_enum): Adjust prototype.
8475 * parse.y (enum_head): New non-terminal.
8476 (structsp): Use it. Enums now may be preceded or followed by
8477 optional attributes -- pass their chained tree to finish_enum().
8478 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
8480 2001-07-10 Mark Mitchell <mark@codesourcery.com>
8482 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
8485 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
8487 * semantics.c (cp_expand_stmt): Fix for null
8488 current_function_return_value.
8490 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
8492 * call.c (build_op_delete_call): Initialize fn.
8493 (convert_like_real): Delete conditional.
8494 (joust): Initialize *w and *l.
8495 * class.c: Add prototype for binfo_ctor_vtable.
8496 (get_primary_binfo): Initialize result.
8497 * init.c (build_java_class_ref): Initialize name.
8499 2001-07-09 Erik Rozendaal <dlr@acm.org>
8501 * typeck.c (unary_complex_lvalue): Do not duplicate the
8502 argument to modify, pre-, or post-increment when used as an
8503 lvalue and when the argument has side-effects.
8505 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
8507 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
8508 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
8509 cplus_decl_attributes even if attrs is NULL.
8510 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
8512 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
8514 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
8515 calls to decl_attributes.
8517 2001-07-06 Ira Ruben <ira@apple.com>
8519 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
8520 be DECL_TEMPLATE_RESULT.
8522 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8524 * cp-tree.h (copy_template_template_parm): Rename to ...
8525 (bind_template_template_parm): ... here.
8526 * tree.c (copy_template_template_parm): Rename to ...
8527 (bind_template_template_parm): ... here. Remove the case when
8528 NEWARGS is NULL_TREE.
8529 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
8530 BOUND_TEMPLATE_TEMPLATE_PARM.
8531 * pt.c (lookup_template_class): Adjust.
8533 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
8535 * cvt.c (convert_lvalue): New fn.
8536 * cp-tree.h: Declare it.
8537 * method.c (do_build_assign_ref): Use it.
8538 (do_build_copy_constructor): Convert parm to base types
8539 before calling base constructors.
8541 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
8542 DECL_USER_ALIGN. Check flag_elide_constructors instead of
8544 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
8546 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
8548 * optimize.c (optimize_inline_calls): New function, broken out
8550 (optimize_function): ... here. Call it. Don't inline if it is
8552 (dump_function): Print name of dump flag causing this dump.
8553 * semantics.c (expand_body): Move thunk inline check to
8556 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
8558 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
8559 (comptypes): Use target.comp_type_attributes.
8561 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
8563 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
8565 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
8567 * error.c (lang_print_error_function): Add a `diagnostic_context *'
8570 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
8572 * decl2.c (import_export_class): Update.
8574 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
8576 * error.c (init_error): Adjust settings.
8578 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
8580 * error.c (init_error): Adjust settings.
8582 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
8584 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
8585 return pointers to data members by reference rather than by value.
8587 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
8589 Implement the Named Return Value optimization.
8590 * cp-tree.h (struct cp_language_function): Add x_return_value.
8591 (current_function_return_value): Now a macro.
8592 * decl.c: Don't define it.
8593 (define_label, finish_case_label): Don't clear it.
8594 (init_decl_processing): Don't register it with GC.
8595 * semantics.c (genrtl_finish_function): Don't check it for
8596 no_return_label. Copy the RTL from the return value to
8597 current_function_return_value and walk, calling...
8598 (nullify_returns_r): ...this new fn.
8599 * typeck.c (check_return_expr): Set current_function_return_value.
8601 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
8603 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
8604 sharing a ctor vtable with. Merge code for cases 1 and 2.
8605 (binfo_ctor_vtable): New fn.
8606 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
8608 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
8610 * class.c (dfs_find_final_overrider): Fix logic.
8612 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
8613 virtual thunk instead of non-virtual.
8614 (get_matching_virtual): Uncomment.
8616 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
8617 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
8620 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
8622 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
8623 we've not emerged from the hierarchy of RTTI_BINFO on reaching
8626 2001-06-13 Mark Mitchell <mark@codesourcery.com>
8628 * NEWS: Update release number.
8630 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
8632 PR c++/3130, c++/3131, c++/3132
8633 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
8634 * class.c (force_canonical_binfo_r): Move
8635 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
8636 virtual bases unless they're primary and what they're primary
8638 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
8639 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
8640 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
8642 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
8643 (layout_nonempty_base_or_field): Add most derived type
8645 (layout_empty_base): Likewise.
8646 (build_base_field): Likewise.
8647 (build_base_fields): Likewise.
8648 (propagate_binfo_offsets): Add most derived type
8649 parameter. Skip non canonical virtual bases too.
8650 (dfs_set_offset_for_unshared_vbases): Don't skip primary
8651 bases. Do skip canonical bases.
8652 (layout_virtual_bases): Adjust.
8653 (layout_class_type): Adjust.
8654 (dfs_get_primary_binfo): Build list of virtual primary base
8656 (get_primary_binfo): Check that the shared virtual primary
8657 base candidate was found first.
8658 (accumulate_vtbl_inits): Don't do anything for non-vptr
8659 containing binfos. For case 1 primary virtual bases, keep
8660 checking that we've not emerged from the hierarchy of RTTI_BINFO.
8662 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
8665 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
8666 hierarchy looking for primary bases for a ctor
8667 vtable. Recursively call oneself, if we meet our primary via
8668 this route and haven't met it yet via inheritance graph order.
8670 2001-06-11 Mark Mitchell <mark@codesourcery.com>
8672 * lang-options.h: Emit documentation for -fno-honor-std, not
8675 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
8677 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
8678 Don't clobber delta.
8679 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
8681 2001-06-10 Mark Mitchell <mark@codesourcery.com>
8682 Gabriel Dos Reis <gdr@codesourcery.com>
8684 * Make-lang.in (cp/call.o): Depend on diagnostic.h
8685 (cp/typeck.o): Depend on diagnostic.h
8686 (cp/typeck2.o): Depend on diagnostic.h
8687 (cp/repo.o): Depend on dignostic.h
8688 * typeck.c: #include diagnostic.h
8689 (convert_for_initialization): Remove extern declaration for
8690 warningcount and errorcount.
8692 * call.c: #include diagnostic.h
8693 (convert_like_real): Remove extern declaration for warnincount and
8696 * repo.c: #include diagnostic.h
8697 * typeck2.c: #include diagnostic.h
8699 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
8701 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
8704 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
8707 * friend.c (do_friend): Use push_decl_namespace for classes at
8710 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
8711 Jason Merrill <jason_merrill@redhat.com>
8714 * class.c (build_secondary_vtable): Use assert, rather than an error
8716 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
8717 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
8718 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
8719 Don't set BINFO_VTABLE for a primary virtual base.
8721 2001-06-07 Mark Mitchell <mark@codesourcery.com>
8723 * decl.c (duplicate_decls): Update source position information
8724 when a template function is defined.
8726 2001-06-07 Phil Edwards <pme@sources.redhat.com>
8728 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
8730 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
8733 * decl.c (pushtag): Don't push into a complete type's scope.
8735 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
8737 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
8738 (struct lang_decl_flags): Lose generate_with_vtable_p.
8739 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
8740 * class.c (copy_virtuals): Adjust.
8741 * decl2.c (mark_vtable_entries): Adjust.
8742 * method.c (make_thunk, build_vtable_entry): Adjust.
8743 * class.c (update_vtable_entry_for_fn): Only look as far as the
8744 first defining class.
8745 (build_vtbl_initializer): Put nothing in the slot for a function only
8746 defined in a lost primary virtual base.
8747 (add_vcall_offset_vtbl_entries_1): Use the same code for
8748 the lost primary case and the normal case.
8749 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
8750 (get_vfield_offset, get_derived_offset): Lose.
8751 (dfs_find_final_overrider): Use look_for_overrides_here.
8752 (get_matching_virtual): New fn.
8753 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
8755 * search.c (look_for_overrides_here): Split out from...
8756 (look_for_overrides_r): Here.
8758 * class.c (find_final_overrider): Return error_mark_node on error.
8760 * decl2.c (key_method): #if 0 accidental change.
8762 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
8764 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
8765 (build_over_call): Likewise.
8766 * decl.c (grokparms): Likewise.
8767 * pt.c (tsubst_decl): Likewise.
8768 * typeck.c (convert_arguments): Likewise.
8770 2001-06-05 Mark Mitchell <mark@codesourcery.com>
8772 * semantics.c (begin_class_definition): Robustify.
8774 * pt.c (instantiate_decl): Tell the repository code about the
8775 clones, not the cloned functions.
8776 * repo.c (repo_template_used): Explicitly instantiate the cloned
8777 function, not the clones.
8779 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
8781 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
8782 ICS_BAD_FLAG on created conversion.
8783 (compare_ics): Break out rank.
8785 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
8787 * decl.c (xref_tag): Remove extraneous %s on dependent name
8790 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
8792 * class.c (layout_vtable_decl): Fix off by one error on
8794 (build_vtt): Likewise.
8795 (build_ctor_vtbl_group): Likewise.
8797 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
8799 * class.c (maybe_indent_hierarchy): New function.
8800 (dump_class_hierarchy_r): Add flags. Dump extra binfo
8801 information, if enabled. Use maybe_indent_hierarchy. Adjust
8803 (dump_class_hierarchy): Adjust prototype. Adjust output format.
8804 (dump_array, dump_vtable, dump_vtt): New functions.
8805 (finish_struct_1): Adjust hierarchy dumping.
8806 (initialize_vtable): Call dump_vtable.
8807 (build_vtt): Call dump_vtt.
8808 (build_ctor_vtbl_group): Call dump_vtable.
8809 * decl2.c (flag_dump_class_layout): Remove.
8810 (cxx_decode_option): Remove dump translation unit
8811 and dump class hierarchy check. Call dump_switch_p.
8812 (finish_file): Adjust dumping.
8813 (dump.c): Only dump base classes if not TDF_SLIM.
8814 Only dump namespace members if not TDF_SLIM.
8815 * optimize.c (dump_function): New function.
8816 (optimize_function): Call dump_function.
8817 * semantics.c (expand_body): Use dump_enabled_p.
8819 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
8822 Part missed from first commit
8823 * decl2.c (finish_anon_union): Copy context.
8825 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
8828 * optimize.c (remap_decl): Remap anonymous aggregate members too.
8830 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
8833 * semantics.c (expand_body): Don't optimize thunks.
8835 2001-05-25 Sam TH <sam@uchicago.edu>
8837 * cp-tree.h lex.h: Fix header include guards.
8839 2001-05-25 Mark Mitchell <mark@codesourcery.com>
8841 * decl.c (init_decl_processing): Tweak.
8843 2001-05-24 Mark Mitchell <mark@codesourcery.com>
8845 * decl.c (duplicate_decls): Tidy.
8846 (init_decl_processing): Always set flag_no_builtin.
8848 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
8851 * decl2.c (do_local_using_decl): Push the decls, even in a
8854 2001-05-22 Mark Mitchell <mark@codesourcery.com>
8856 * optimize.c (initialize_inlined_parameters): Don't set
8857 TREE_READONLY for a VAR_DECL taking the place of an inlined
8860 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
8862 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
8863 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
8866 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
8868 * parse.y: Refer to compound literals as such, not as
8869 constructor-expressions.
8871 2001-05-21 Mark Mitchell <mark@codesourcery.com>
8873 * call.c (build_op_delete_call): Ignore exception-specifications
8874 when looking for matching delete operators.
8875 * init.c (build_new_1): Compute whether or not the allocation
8876 function used is a placement allocation function or not, and
8877 communicate this information to build_op_delete_call.
8879 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
8881 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
8882 (build_vtbl_ref): Adjust.
8883 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
8884 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
8886 (unsupported_options): Correspondingly.
8888 * decl2.c (maybe_make_one_only): Check flag_weak, not
8889 supports_one_only().
8891 * cp-tree.def (START_CATCH_STMT): Lose.
8892 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
8893 * tree.c (cp_statement_code_p): Don't case it.
8894 * semantics.c (cp_expand_stmt): Likewise.
8895 * cp-tree.h (START_CATCH_TYPE): Lose.
8896 (HANDLER_TYPE): New.
8897 * except.c (expand_start_catch_block): Don't start any blocks.
8899 (expand_end_catch_block): Don't end any blocks.
8900 * parse.y (handler): Don't pass anything from finish_handler_parms
8902 * pt.c (tsubst_expr): Likewise.
8903 * semantics.c (begin_handler): Call note_level_for_catch here.
8904 (finish_handler_parms): Don't return anything.
8905 (genrtl_catch_block, begin_catch_block): Lose.
8906 (genrtl_handler): Call expand_start_catch here.
8908 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
8910 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
8911 (get_vtable_decl, build_vtt): Not here.
8913 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
8916 * optimize.c (update_cloned_parm): Copy addressability and other
8919 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8921 * pt.c (determine_specialization): Ignore artificial functions.
8923 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
8925 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
8926 (C_RID_CODE): Remove.
8927 * lex.c (cxx_init_options): Call set_identifier_size. Update.
8928 (init_parse): Don't do it here.
8930 2001-05-18 Diego Novillo <dnovillo@redhat.com>
8932 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
8933 function declaration to avoid stripping the symbol's attributes.
8935 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
8937 * decl.c (pushdecl): Adjust error string.
8938 (xref_tag): Adjust friend class injection warning. Remove the
8939 inherited name from the class shadowed scope.
8941 2001-05-17 Mark Mitchell <mark@codesourcery.com>
8943 * except.c (cp_protect_cleanup_actions): New function.
8944 (init_exception_processing): Don't set protect_cleanup_actions
8945 here. Do set lang_protect_cleanup_actions.
8947 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
8949 * spew.c (read_token): Call yyerror on all unexpected tokens.
8951 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
8953 * init.c (member_init_ok_or_else): Take a tree rather than
8955 (expand_member_init): Adjust.
8957 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
8959 * decl.c (duplicate_decls): Suppress warning about duplicate
8960 decls if the first decl is a friend.
8962 2001-05-12 Zack Weinberg <zackw@stanford.edu>
8964 * except.c (choose_personality_routine): Export. Add
8965 explanatory comment. Take an enum languages, not a boolean.
8966 (initialize_handler_parm): Adjust to match.
8967 * cp-tree.h: Prototype choose_personality_routine.
8968 * lex.c (handle_pragma_java_exceptions): New function.
8969 (init_cp_pragma): Register #pragma GCC java_exceptions.
8971 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
8973 * method.c (build_mangled_C99_name): Remove unused prototype.
8975 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
8977 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
8978 * typeck.c (get_member_function_from_ptrfunc,
8979 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
8980 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
8982 Reverted Geoff Keating's 2001-05-03's patch.
8984 2001-05-11 Ira Ruben <ira@apple.com>
8986 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
8988 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
8990 * cp-tree.h (finish_label_expr, lookup_label): Delete.
8991 * parse.y: Update for '&&'; don't issue warning here.
8992 * semantics.c (finish_label_expr): Delete.
8994 2001-05-07 Mark Mitchell <mark@codesourcery.com>
8996 * splay-tree.h (splay_tree_max): New function.
8997 (splay_tree_min): Likewise.
8999 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
9001 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
9002 (pfn_vflag_identifier): Define.
9003 Update comment about layout of pointer functions.
9004 (build_ptrmemfunc1): Update prototype.
9005 (expand_ptrmemfunc_cst): Update prototype.
9006 * decl.c (initialize_predefined_identifiers): Initialize
9007 pfn_vflag_identifier.
9008 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
9009 an extra field to the type.
9010 * expr.c (cplus_expand_constant): Pass 'flag' between
9011 expand_ptrmemfunc_cst and build_ptrmemfunc1.
9012 * typeck.c (get_member_function_from_ptrfunc): When
9013 FUNCTION_BOUNDARY < 16, look at additional field to determine
9014 if a pointer-to-member is a real pointer or a vtable offset.
9015 (build_ptrmemfunc1): Add new parameter to contain extra field.
9016 (build_ptrmemfunc): Pass the extra field around.
9017 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
9018 (pfn_from_ptrmemfunc): Ignore the extra field.
9020 2001-05-03 Mark Mitchell <mark@codesourcery.com>
9022 * cp-tree.h (flag_inline_trees): Update documentation.
9023 * decl.c (init_decl_processing): Adjust handling of
9024 flag_inline_functions and flag_inline_trees to support -O3.
9025 (grokfndecl): Set DECL_INLINE on all functions if that's what
9027 (save_function_data): Clear DECL_INLINE in
9028 current_function_cannot_inline is non-NULL.
9029 * decl2.c (flag_inline_trees): Update documentation.
9031 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
9033 * dump.c (cp_dump_tree, USING_STMT case): New case.
9034 * tree.c (cp_statement_code_p): Add USING_STMT.
9035 * decl2.c (do_using_directive): Add the using directive statement.
9037 * tree.c (walk_tree): Reformat an if block.
9039 2001-05-02 Mark Mitchell <mark@codesourcery.com>
9041 * decl.c (compute_array_index_type): Don't try to do anything with
9042 the indices when processing a template.
9044 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9046 * call.c: NULL_PTR -> NULL.
9047 * class.c: Likewise.
9050 * decl2.c: Likewise.
9051 * except.c: Likewise.
9054 * search.c: Likewise.
9056 * typeck.c: Likewise.
9057 * typeck2.c: Likewise.
9059 2001-05-02 Mark Mitchell <mark@codesourcery.com>
9061 * decl2.c (do_using_directive): Revert previous patch.
9063 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
9065 * cp-tree.def (USING_STMT): New statement node.
9066 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
9067 * decl2.c (do_using_directive): Add USING_STMT to statement
9068 tree. Don't emit errors when processing template decl.
9069 * pt.c (tsubst_expr, USING_STMT case): New case.
9070 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
9072 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
9074 * call.c (build_new_op): Convert args from reference here.
9075 (build_conditional_expr): Don't convert here.
9077 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
9079 * spew.c (last_token_id): New static variable.
9080 (read_token): Set it here.
9081 (yyerror): Use it here.
9083 2001-04-30 Richard Henderson <rth@redhat.com>
9085 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
9088 2001-04-30 Mark Mitchell <mark@codesourcery.com>
9090 * gxxint.texi: Remove.
9091 * Make-lang.in: Remove all traces of gxxint.texi.
9093 2001-04-30 Mark P Mitchell <mark@codesourcery.com>
9095 * decl2.c (start_static_initialization_or_destruction): Correct
9096 logic to handle the -fno-use-cxa-atexit case.
9098 2001-04-30 Mark Mitchell <mark@codesourcery.com>
9100 * optimize.c (update_cloned_parm): New function.
9101 (maybe_clone_body): Use it. Update the `this' parameter too.
9103 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
9105 * decl2.c (unsupported_options): Add new-abi.
9106 * lang-options.h: Remove no longer supported options.
9108 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
9110 * except.c (can_convert_eh): Don't check template parms,
9113 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
9115 * optimize.c (maybe_clone_body): Copy parameter names and locations.
9117 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
9119 * cp-tree.h (adjust_clone_args): Prototype new function.
9120 * class.c (adjust_clone_args): New function.
9121 * decl.c (start_function): Call it for in charge ctors.
9123 2001-04-26 Mark Mitchell <mark@codesourcery.com>
9125 * method.c (use_thunk): Make sure that thunks really are emitted
9128 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
9130 * mangle.c (write_chars): New macro.
9131 (hwint_to_ascii): New function
9132 (write_number): Use it.
9133 (write_integer_cst): Deal with really big numbers.
9135 2001-04-25 Mark Mitchell <mark@codesourcery.com>
9137 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
9140 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
9142 * decl.c (grokdeclarator): Set context of namespace scope
9145 2001-04-24 Zack Weinberg <zackw@stanford.edu>
9147 * cp/optimize.c: Include hashtab.h.
9148 (struct inline_data): Add tree_pruner.
9149 (expand_call_inline, expand_calls_inline): Use it when calling
9151 (optimize_function): Initialize and free tree_pruner.
9153 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
9155 Lazy __FUNCTION__ generation.
9156 * cp-tree.def (FUNCTION_NAME): Remove.
9157 * cp-tree.h (function_name_declared_p): Remove.
9158 (cp_fname_init): Prototype.
9159 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
9160 don't call declare_function_name. Call start_fname_decls.
9161 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
9162 clobber the line number.
9163 (cp_fname_init): New function.
9164 (start_function): Call start_fname_decls.
9165 (finish_function): Call finish_fname_decls.
9166 * lex.c (reswords): Add slots for __FUNCTION__ et al.
9167 (rid_to_yy): Add mappings for __FUNCTION__ et al.
9168 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
9169 * parse.y (VAR_FUNC_NAME): New token.
9170 (primary): Add VAR_FUNC_NAME.
9171 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
9173 (tsubst, FUNCTION_NAME case): Remove.
9174 (tsubst_copy, FUNCTION_NAME case): Remove.
9175 (tsubst_expr, DECL_STMT case): Be careful with a
9176 DECL_PRETTY_FUNCTION_P.
9177 (instantiate_decl): Remove function_name_declared_p.
9178 * semantics.c (begin_compound_statement): Don't call
9179 declare_function_name here.
9180 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
9181 (finish_translation_unit): Call finish_fname_decls.
9182 (expand_body): Remove function_name_declared_p.
9183 * typeck2.c (digest_init): Allow any ERROR_MARK.
9185 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
9187 * pt.c (tsubst_decl): Use VOID_TYPE_P.
9188 * semantics.c: Fix some typos.
9190 2001-04-23 Phil Edwards <pme@sources.redhat.com>
9192 * cp/decl2.c (flag_honor_std): Always initialize to 1.
9194 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9196 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
9198 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
9200 * except.c (build_throw): Wrap the initialization of the exception
9201 object in a MUST_NOT_THROW_EXPR.
9202 (do_free_exception): #if 0.
9204 2001-04-20 Mark Mitchell <mark@codesourcery.com>
9206 * cp-tree.h (finish_enum): Change prototype.
9207 * decl.c (finish_enum): Reorganize.
9208 * parse.y (structsp): Adjust calls to finish_enum.
9210 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
9212 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
9215 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
9217 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
9218 (layout_empty_base): Return at end flag.
9219 (build_base_field): Likewise.
9220 (build_base_fields): Likewise.
9221 (layout_virtual_bases): Don't add 1 to eoc value.
9222 (end_of_class): Use full size for empty bases.
9223 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
9224 empty bases. Don't add 1 to eoc value. Only add trailing padding
9225 if we're an empty class with no empty bases.
9226 (dump_class_hierarchy): Dump size and alignment.
9228 2001-04-20 Jakub Jelinek <jakub@redhat.com>
9230 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
9233 2001-04-20 Jakub Jelinek <jakub@redhat.com>
9235 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
9236 is found, look first if name does not match the structure name.
9238 2001-04-19 Mark Mitchell <mark@codesourcery.com>
9240 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
9242 (SET_DECL_LANGUAGE): New macro.
9243 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
9244 (pushdecl): Likewise.
9245 (build_library_fn_1): Likewise.
9246 (build_cp_library_fn): Likewise.
9247 (grokfndecl): Likewise.
9248 (grokvardecl): Mark `extern "C"' variables as having C linkage.
9249 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
9250 * lex.c (retrofit_lang_decl): Likewise.
9251 * mangle.c (mangle_decl_string): Don't mangle the names of
9252 variables declared with C language linkage.
9253 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
9255 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
9257 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
9258 flag_access_control from uninitialized storage.
9260 2001-04-15 Mark Mitchell <mark@codesourcery.com>
9262 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
9263 * mangle.c (write_pointer_to_member_type): Fix mangling of
9264 pointers to cv-qualified member function types.
9266 * init.c (build_delete): Create a SAVE_EXPR for the address if
9267 we're going to use it more than once.
9269 2001-04-13 Mark Mitchell <mark@codesourcery.com>
9271 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
9272 (expand_ptremfunc_cst): Change prototype.
9273 (delta2_from_ptrmemfunc): Remove.
9274 * expr.c (cplus_expand_constant): Adjust call to
9275 expand_ptrmemfunc_cst.
9276 * typeck.c (build_ptrmemfunc1): Simplify.
9277 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
9278 results in a constant.
9279 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
9280 (delta2_from_ptrmemfunc): Remove.
9281 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
9283 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
9285 * cp-tree.h (decl_namespace_list): New macro.
9286 (struct saved_scope): Add decl_ns_list.
9287 * decl.c (mark_saved_scope): Mark it.
9288 * decl2.c: Lose static decl_namespace_list.
9289 (init_decl2): Don't save it.
9291 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9293 * cp-tree.h (warn_return_type, yylex): Delete redundant
9296 * decl.c (current_class_depth, global_namespace): Likewise.
9298 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
9300 * repo.c (flag_use_repository): Likewise.
9302 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9304 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
9305 set_block, pushdecl, getdecls, gettags, init_decl_processing,
9306 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
9307 lvalue_or_else, print_lang_statistics, comp_target_types,
9308 unsigned_type, signed_type, signed_or_unsigned_type,
9309 build_function_call, mark_addressable, incomplete_type_error):
9310 Delete redundant declarations.
9312 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
9314 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
9315 (TYPE_ANONYMOUS_P): New macro.
9316 (TAGGED_TYPE_P): New macro.
9317 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
9318 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
9319 * tree.c (no_linkage_helper): Likewise.
9320 * semantics.c (begin_class_definition): Likewise.
9321 * pt.c (convert_template_argument): Likewise.
9322 * lex.c (check_for_missing_semicolon): Likewise.
9324 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
9326 * class.c (dfs_unshared_virtual_bases): New function.
9327 (mark_primary_bases): Call it.
9328 (check_bases): Ignore virtual bases when determining
9331 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
9333 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
9335 2001-04-11 Mark Mitchell <mark@codesourcery.com>
9337 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
9338 cloned function to the clone.
9340 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9342 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
9344 * semantics.c: Include expr.h.
9346 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
9348 * method.c (implicitly_declare_fn): Commonize code for copy ctor
9349 and assignment op. Set TREE_USED for parameter.
9351 2001-04-10 Mark Mitchell <mark@codesourcery.com>
9353 * class.c (find_final_overrider_data): Add `candidates'.
9354 (dfs_find_final_overrider): Don't issue error messages
9356 (find_final_overrider): Issue error messages here.
9357 (build_base_field): Don't warn about amgibuous direct bases here.
9358 (warn_about_ambiguous_direct_bases): New function.
9359 (layout_class_type): Use it.
9361 2001-04-10 Richard Henderson <rth@redhat.com>
9363 * typeck.c (build_array_ref): Push the array reference inside
9364 COMPOUND_EXPR and COND_EXPR.
9366 2001-04-05 Mark Mitchell <mark@codesourcery.com>
9368 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
9369 * decl.c (duplicate_decls): Adjust accordingly.
9370 (maybe_commonize_var): Likewise.
9371 (grokfndecl): Likewise.
9372 (start_function): Likewise.
9373 (start_method): Likewise.
9374 * decl2.c (key_method): Likewise.
9375 (import_export_decl): Likewise.
9376 * method.c (implicitly_declare_fn): Likewise.
9377 * optimize.c (maybe_clone_body): Likewise.
9379 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
9381 * lang-specs.h: Add __DEPRECATED.
9383 2001-04-05 J"orn Rennecke <amylaar@redhat.com>
9385 * search.c (get_dynamic_cast_base_type): When building a new
9386 constant, set its type to ssizetype.
9388 2001-04-04 Jakub Jelinek <jakub@redhat.com>
9390 * optimize.c (expand_call_inline): Only add newly inlined statements
9393 2001-04-03 Mark Mitchell <mark@codesourcery.com>
9395 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
9396 (OPERATOR_FORMAT): Likewise.
9397 (OPERATOR_TYPENAME_FORMAT): Likewise.
9398 * operators.def: Remove old name-mangling information.
9399 * decl.c (grok_op_properties): Adjust accordingly.
9400 * lex.c (init_operators): Likewise.
9401 * rtti.c (get_tinfo_decl): Issue error messages about types that
9404 2001-04-03 Mark Mitchell <mark@codesourcery.com>
9406 * decl2.c (import_export_decl): Don't call import_export_class
9407 when processing an inline member function.
9408 * semantics.c (expand_body): Call import_export_decl before
9409 emitting inline functions.
9411 2001-03-28 Richard Henderson <rth@redhat.com>
9413 IA-64 ABI Exception Handling:
9414 * cp-tree.def (EH_SPEC_BLOCK): New.
9415 (MUST_NOT_THROW_EXPR): New.
9416 * cp-tree.h: Update changed function declarations.
9417 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
9418 (CPTI_CALL_UNEXPECTED): New.
9419 (struct cp_language_function): Rename x_eh_spec_try_block
9421 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
9422 * decl.c (current_binding_level): If no current function
9423 bindings, revert to scope_chain.
9424 (initialize_predefined_identifiers): Remove __cp_push_exception.
9425 (store_parm_decls): Use begin_eh_spec_block.
9426 (finish_function): Use finish_eh_spec_block.
9427 (mark_lang_function): Update for name changes.
9428 * decl2.c (finish_file): No mark_all_runtime_matches.
9429 * dump.c (cp_dump_tree): Handle new tree codes.
9430 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
9431 * except.c (catch_language_init, catch_language): Remove.
9432 (init_exception_processing): Don't set language code.
9433 Initialize call_unexpected_node, protect_cleanup_actions,
9434 eh_personality_libfunc, lang_eh_runtime_type.
9435 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
9436 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
9437 (prepare_eh_type): Split out type canonicalizations ...
9438 (build_eh_type_type): ... from here.
9439 (build_eh_type_type_ref): Remove.
9440 (mark_all_runtime_matches): Remove.
9441 (build_exc_ptr): New.
9442 (do_begin_catch, do_end_catch): New.
9443 (do_pop_exception): Remove.
9444 (build_terminate_handler): Remove.
9445 (choose_personality_routine): Split out language choice from ...
9446 (initialize_handler_parm): ... here.
9447 Use MUST_NOT_THROW_EXPR.
9448 (expand_start_catch_block): Use do_begin_catch. Simplify Java
9449 exception object handling.
9450 (expand_start_eh_spec, expand_end_eh_spec): Remove.
9451 (expand_exception_blocks, alloc_eh_object): Remove.
9452 (begin_eh_spec_block, finish_eh_spec_block): New.
9453 (do_allocate_exception, do_free_exception): New.
9454 (expand_throw): Merge into ...
9455 (build_throw): ... here. Update for abi.
9456 * expr.c (cplus_expand_expr): No expand_internal_throw.
9457 Handle MUST_NOT_THROW_EXPR.
9458 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
9459 * semantics.c (*) Update for except.h name changes.
9460 (genrtl_try_block): No protect_with_terminate.
9461 (genrtl_eh_spec_block): New.
9462 (genrtl_handler): Don't emit the goto here.
9463 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
9464 (genrtl_finish_function): Don't expand_exception_blocks.
9465 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
9467 2001-03-28 Richard Henderson <rth@redhat.com>
9469 * decl.c (struct named_label_list): Rename eh_region to
9470 in_try_scope, add in_catch_scope.
9471 (struct binding_level): Rename eh_region to is_try_scope,
9473 (note_level_for_try): Rename from note_level_for_eh.
9474 (note_level_for_catch): New.
9475 (poplevel): Copy both is_try_scope and is_catch_scope to
9476 the named_label_list struct.
9477 (check_previous_goto_1): Don't check for catch block via
9478 DECL_ARTIFICIAL; use in_try_scope instead.
9479 (check_goto): Likewise.
9480 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
9481 * except.c (expand_start_catch_block): Call note_level_for_catch.
9482 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
9484 2001-03-27 Richard Henderson <rth@redhat.com>
9486 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
9487 exceptions_via_longjmp.
9489 2001-03-27 Phil Edwards <pme@sources.redhat.com>
9491 * pt.c (check_default_tmpl_args): Make error messages clearer.
9493 2001-03-26 Phil Edwards <pme@sources.redhat.com>
9495 * error.c: Also undefine 'A' macro used for cp_printers definition.
9497 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9499 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
9501 2001-03-26 Mike Yang <yang@research.att.com>
9502 Mark Mitchell <mark@codesourcery.com>
9504 * dump.c (dump_access): New function.
9505 (cp_dump_tree): Use it. Dump basetype information for class
9508 2001-03-26 Mark Mitchell <mark@codesourcery.com>
9510 * Makefile.in (optimize.o): Depend on params.h.
9511 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
9512 (init_decl_processing): Set flag_no_inline when doing
9514 * optimize.c: Include params.h.
9515 (struct inline_data): Improve documentation of FNS. Add
9516 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
9517 (INSNS_PER_STMT): New macro.
9518 (remap_block): Use CLONING_P.
9519 (inlinable_function_p): Don't inline big functions.
9520 (expand_call_inline): Keep track of how much inlining we've done.
9521 (optimize_function): Set FIRST_INLINED_FN.
9522 (maybe_clone_body): Set CLONING_P.
9523 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
9525 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
9526 rest_of_compilation. Clear DECL_RTL for local variables
9528 (clear_decl_rtl): New function.
9530 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
9533 * cp-tree.h (skip_type_access_control,
9534 reset_type_access_control): Prototype.
9535 * decl.c (grokdeclarator): Access of friends is not checked.
9536 * parse.y (component_decl_list): Reset type access control.
9537 * semantics.c (decl_type_access_control): Clear
9538 current_type_lookups.
9539 (save_type_access_control): Don't save if not deferring.
9540 (skip_type_access_control, reset_type_access_control): New
9542 (begin_class_definition): Do type access control for basetypes.
9543 Start deferred access control.
9544 (finish_class_definition): Resume immediate access control if
9545 this is a local class.
9547 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9549 * class.c (add_method): Use memcpy/memmove, not bcopy.
9551 * decl.c (duplicate_decls): Likewise.
9553 2001-03-23 Jakub Jelinek <jakub@redhat.com>
9555 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
9558 2001-03-23 Jakub Jelinek <jakub@redhat.com>
9560 * decl.c (local_names): Define.
9561 (push_local_name): New.
9562 (grok_reference_init): Return init if initializing static reference
9563 variable with non-constant instead of emitting it.
9564 Move expand_static_init call to cp_finish_decl.
9565 (layout_var_decl): Call push_local_name.
9566 (maybe_commonize_var): Allow inlining functions even if they have
9567 static local variables, use comdat_linkage for them if flag_weak.
9568 (check_initializer): Call obscure_complex_init if
9569 grok_reference_init returned nonzero.
9570 (save_function_data): Clear x_local_names.
9571 (pop_cp_function_context): Free x_local_names.
9572 (mark_inlined_fns): Remove.
9573 (mark_lang_function): Mark x_local_names.
9574 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
9575 Mark inlined_fns as tree, remove call to mark_inlined_fns.
9576 * class.c (alter_access): Ensure DECL_ACCESS is never set if
9577 DECL_DISCRIMINATOR_P.
9578 * cp-tree.h (cp_language_function): Add x_local_names.
9579 (lang_decl_flags): Add discriminator into u2.
9580 (lang_decl_inlined_fns): Remove.
9581 (lang_decl): inlined_fns is now a TREE_VEC.
9582 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
9583 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
9584 TREE_VEC, not a custom structure.
9585 (optimize_function): Likewise.
9586 * mangle.c (discriminator_for_local_entity): Discriminate among
9587 VAR_DECL local entities.
9588 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
9591 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
9593 Add support for Java interface method calls.
9594 * cp-tree.h (struct lang_type): Add java_interface flag.
9595 (TYPE_JAVA_INTERFACE): New macro.
9596 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
9597 by setting TYPE_JAVA_INTERFACE.
9598 * call.c (java_iface_lookup_fn): New static.
9599 (build_over_call): If calling a method declared in a
9600 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
9601 expression which resolves the function address.
9602 (build_java_interface_fn_ref): New function.
9604 2001-03-22 Richard Henderson <rth@redhat.com>
9606 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
9607 * except.c: Don't include it.
9609 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
9610 based on an idea from Joe Buck <jbuck@synopsys.com>
9612 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
9614 (data_def, component_decl): Add reductions to bad_decl.
9616 2001-03-22 Jakub Jelinek <jakub@redhat.com>
9618 * method.c (do_build_assign_ref): Don't use build_modify_expr for
9619 anonymous aggregates, since they don't have assignment operator
9621 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
9622 assignment operators for anonymous structure fields.
9624 2001-03-21 Jason Merrill <jason@redhat.com>
9626 * pt.c (instantiate_decl): Abort if we see a member constant
9627 instantiation that doesn't already have its initializer.
9628 Downgrade explicit instantiation without definition to pedwarn.
9630 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
9631 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
9632 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
9634 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
9635 (pending_vtables): Remove.
9636 * decl2.c (pending_vtables): Remove.
9637 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
9638 CLASSTYPE_VTABLE_NEEDS_WRITING.
9639 (import_export_class): Likewise.
9640 (init_decl2): Don't mark pending_vtables.
9641 * lex.c (handle_pragma_vtable): Just sorry.
9642 * pt.c (instantiate_class_template): Don't mess with
9643 CLASSTYPE_VTABLE_NEEDS_WRITING.
9644 (mark_class_instantiated): Likewise.
9645 * ptree.c (print_lang_type): Don't print it.
9646 * semantics.c (begin_class_definition): Don't set it.
9648 * pt.c (template_tail): Replace with last_pending_template.
9649 (maybe_templates, maybe_template_tail): Remove.
9650 (add_pending_template): Adjust.
9651 (instantiate_pending_templates): Adjust.
9653 * cp-tree.h (struct saved_scope): Remove lang_stack field.
9654 (current_lang_stack): Remove.
9655 * decl.c (maybe_push_to_top_level): Don't initialize it.
9656 (duplicate_decls): Use current_lang_depth.
9657 (xref_basetypes): Likewise.
9658 * class.c (current_lang_depth): New fn.
9659 (push_lang_context): Use more varray functionality.
9660 (pop_lang_context): Likewise.
9662 * error.c (GLOBAL_THING): Always use '__'.
9664 2001-03-21 Mark Mitchell <mark@codesourcery.com>
9666 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
9668 * mangle.c (mangle_decl_string): Mangle the names of overloaded
9669 operators, even when they have `extern "C"' linkage.
9671 2001-03-19 Mark Mitchell <mark@codesourcery.com>
9673 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
9674 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
9675 where it's not necessary.
9676 (add_method): Remove optimization involving comparison of
9677 DECL_ASSEMBLER_NAME.
9678 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
9679 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
9680 where it's not necessary.
9681 (check_methods): Likewise.
9682 (build_clone): Likewise.
9683 (built_vtt): Likewise.
9684 * cp-tree.h (DECL_NEEDED_P): Likewise.
9685 * decl.c (pushtag): Likewise.
9686 (duplicate_decls): Likewise.
9687 (pushdecl): Likewise.
9688 (builtin_function): Likewise.
9689 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
9690 (build_cp_library_fn): Likewise.
9691 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
9692 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
9693 where it's not necessary.
9694 (make_rtl_for_nonlocal_decl): Likewise.
9695 (cp_finish_decl): Likewise.
9696 (grokfndecl): Likewise.
9697 (grokvardecl): Likewise.
9698 (grokdeclarator): Likewise.
9699 (start_function): Likewise.
9700 (cp_missing_return_ok_p): Likewise.
9701 * decl2.c (grokclassfn): Likewise.
9702 (check_classfn): Likewise.
9703 (finish_static_data_member_decl): Likewise.
9704 (grokfield): Likewise.
9705 * error.c (GLOBAL_IORD_P): Remove.
9706 (dump_global_iord): Improve output.
9707 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
9708 * except.c (nothrow_libfn_p): Summarily reject any function not in
9710 * init.c (build_java_class_ref): Don't explicitly set
9711 DECL_ASSEMBLER_NAME after calling mangle_decl.
9712 * mangle.c (mangle_decl_string): Handle extern "C" functions.
9713 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
9714 * method.c (set_mangled_name_for_decl): Don't explicitly set
9715 DECL_ASSEMBLER_NAME after calling mangle_decl.
9716 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
9717 IDENTIFIER_GLOBAL_VALUE for the thunk.
9718 * pt.c (set_mangled_name_for_template_decl): Remove.
9719 (check_explicit_specialization): Don't use it.
9720 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
9721 (tsubst_friend_function): Likewise.
9722 (tsubst_decl): Likewise.
9723 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
9724 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
9725 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
9726 where it's not necessary.
9727 (tinfo_base_init): Likewise.
9728 (create_real_tinfo_var): Likewise.
9729 * search.c (looup_field_1): Likewise.
9730 * semantics.c (finish_named_return_value): Likewise.
9731 * tree.c (init_tree): Set lang_set_decl_assembler_name.
9733 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
9735 Correct semantics restrictions checking in throw-expression.
9736 * except.c (is_admissible_throw_operand): New function.
9737 (build_throw): Use it.
9739 2001-03-14 Mark Mitchell <mark@codesourcery.com>
9741 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
9744 2001-03-14 Mark Mitchell <mark@codesourcery.com>
9746 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
9747 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
9748 * decl.c (duplicate_decls): Likewise.
9749 (builtin_function): Likewise.
9750 (build_library_fn): Likewise.
9751 (build_cp_library_fn): Likewise.
9752 (check_initializer): Likewise.
9753 (cp_finish_decl): Likewise.
9754 * decl2.c (grokfield): Likewise.
9755 (grok_function_init): Remove #if 0'd code.
9756 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
9757 * friend.c (do_friend): Likewise.
9758 * init.c (get_temp_regvar): Likewise.
9759 * method.c (make_thunk): Likewise.
9760 * pt.c (tsubst_friend_function): Likewise.
9761 (tsubst_decl): Likewise.
9762 (regenerate_decl_from_template): Likewise.
9763 * semantics.c (genrtl_named_return_value): Likewise.
9764 (expand_body): Likewise.
9765 (genrtl_finish_function): Likewise.
9766 * tree.c (cp_tree_equal): Likewise.
9768 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
9770 * call.c (convert_like_real): Add extra semantics to INNER
9771 parameter. Don't convert to temporary if a user conversion
9772 gives us an lvalue that we're about to bind to a reference.
9773 Set INNER to indicate pending reference binding on recursive
9776 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
9778 * cp/lex.c: Delete duplicate pending_lang_change.
9780 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
9782 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
9784 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
9785 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
9787 2001-03-09 Zack Weinberg <zackw@stanford.edu>
9789 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
9791 2001-03-08 Stan Shebs <shebs@apple.com>
9793 * cp-tree.h (set_identifier_local_value): Remove unused decl.
9795 2001-03-06 Zack Weinberg <zackw@stanford.edu>
9797 * spew.c: Remove references to CPP_OSTRING.
9799 2001-03-06 Andrew Haley <aph@redhat.com>
9801 * typeck.c (convert_arguments): Check that we have an fndecl.
9803 2001-03-05 Andrew Haley <aph@redhat.com>
9805 * typeck.c (convert_arguments): Don't do ellipsis conversion for
9806 __built_in_constant_p.
9808 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
9810 * typeck.c (build_static_cast): Allow enum to enum conversions
9813 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
9815 * class.c (check_field_decls): Pointers to member do not a
9816 non-pod struct make, as per DR 148.
9818 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
9820 * call.c (joust): cp_pedwarn when using gnu extension concerning
9821 worst conversion sequences.
9823 2001-03-01 Zack Weinberg <zackw@stanford.edu>
9825 * decl.c: Replace all uses of 'boolean' with 'bool'.
9827 2001-03-01 Zack Weinberg <zackw@stanford.edu>
9829 * lang-specs.h: Add zero initializer for cpp_spec field to
9830 all array elements that need one. Don't put an #ifdef inside
9831 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
9834 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
9836 Implement using decls inside template functions.
9837 * decl2.c (validate_nonmember_using_decl): Don't special case
9838 fake_std_node in the global namespace. Don't reject early when
9839 processing a template.
9840 (do_local_using_decl): Add to statement tree. Don't do further
9841 processing when building a template.
9842 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
9844 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
9846 * decl2.c (do_nonmember_using_decl): Don't complain if we find
9847 same function. Do complain about ambiguating extern "C"
9850 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
9852 Remove floating point and complex type template constant parms.
9853 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
9854 COMPLEX_TYPE extensions.
9855 (invalid_nontype_parm_type_p): Likewise.
9857 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
9859 * except.c (call_eh_info): Revert "match_function"'s type.
9861 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
9863 Fix ctor vtable vcall offsets.
9864 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
9865 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
9866 (get_matching_base): Remove.
9867 (get_original_base): New function.
9868 (build_vtbl_initializer): Initialize vid.rtti_binfo.
9869 Use a virtual thunk for a ctor vtable with an index
9870 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
9871 primary base within a constructor vtable. Only set
9872 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
9873 when primary base has been lost.
9874 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
9876 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
9878 * call.c (joust): Ensure more_specialized()'s argument length
9879 parameter has correct value for constructors.
9881 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
9883 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
9885 * decl.c (mark_inlined_fns): Prototype.
9887 2001-02-22 Mark Mitchell <mark@codesourcery.com>
9889 * spew.c (yylex): Correct handling of friends.
9891 2001-02-22 Mark Mitchell <mark@codesourcery.com>
9893 * mangle.c (write_encoding): Pass write_function_type the
9894 FUNCTION_DECL for the function being encoded.
9895 (write_function_type): Pass it along to write_bare_function_type.
9896 (write_bare_function_type): Pass it along to write_method_parms.
9897 (write_method_parms): Don't mangle the compiler-generated
9898 parameters to a constructor or destructor.
9900 2001-02-22 Andreas Jaeger <aj@suse.de>
9902 * optimize.c: Include toplev.h for
9903 note_deferral_of_defined_inline_function prototype.
9905 2001-02-22 Jakub Jelinek <jakub@redhat.com>
9907 * cp-tree.h (struct lang_decl_inlined_fns): New.
9908 (struct lang_decls): Add inlined_fns.
9909 (DECL_INLINED_FNS): New macro.
9910 * optimize.c (struct inline_data): Add inlined_fns.
9911 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
9912 (inlinable_function_p): Likewise, fix typo in comment,
9913 function is not inlinable if it already inlined function currently
9915 (expand_call_inline): Add fn to inlined_fns if necessary.
9916 (optimize_function): Initialize inlined_fns.
9917 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
9918 * decl.c (mark_inlined_fns): New function.
9919 (lang_mark_tree): Call it.
9921 2001-02-21 Jason Merrill <jason@redhat.com>
9923 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
9924 (DECL_UNINLINABLE): Move to middle-end.
9926 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
9927 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
9928 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
9929 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
9930 parms and outer BLOCK. note_deferral_of_defined_inline_function.
9932 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
9935 2001-02-19 Mark Mitchell <mark@codesourcery.com>
9937 * decl2.c (set_decl_namespace): Allow explicit instantiations in
9940 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9942 * optimize.c (expand_call_inline): Don't walk subtrees of type
9945 2001-02-18 Mark Mitchell <mark@codesourcery.com>
9947 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
9950 2001-02-18 Jason Merrill <jason@redhat.com>
9952 Do put the VTT parameter in DECL_ARGUMENTS.
9953 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
9954 (current_vtt_parm): New macro.
9955 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
9956 (DECL_HAS_VTT_PARM_P): New macro.
9957 (DECL_VTT_PARM): Remove.
9958 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
9959 * decl.c (duplicate_decls): Only copy the operator code if
9961 (start_function): Set current_vtt_parm.
9962 (lang_mark_tree): Don't mark vtt_parm.
9963 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
9964 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
9965 * class.c (build_clone): Maybe remove the VTT parm.
9966 * optimize.c (maybe_clone_body): Set up the VTT parm.
9967 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
9968 * call.c (build_over_call): Just allow the VTT arg.
9969 * method.c (make_thunk): Don't set DECL_VTT_PARM.
9970 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
9971 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
9972 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
9973 * error.c (dump_function_decl): Likewise.
9974 * call.c (build_user_type_conversion_1, convert_like_real): Abort
9975 if we try to call a constructor with in-charge or VTT parms.
9976 * method.c (skip_artificial_parms_for): New fn.
9977 * call.c (add_function_candidate, build_over_call): Call it.
9978 * call.c (build_new_method_call): Use current_vtt_parm.
9979 * init.c (expand_virtual_init): Likewise.
9980 * class.c (same_signature_p): No longer static.
9981 * cp-tree.h: Declare it.
9982 * search.c (look_for_overrides_r): Use it.
9984 2001-02-17 Mark Mitchell <mark@codesourcery.com>
9986 * cp-tree.h (new_abi_rtti_p): Remove.
9987 (name_mangling_version): Likewise.
9988 (flag_do_squangling): Likewise.
9989 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
9990 * decl.c (grokfndecl): Likewise.
9991 * decl2.c (name_mangling_version): Remove.
9992 (flag_do_squangling): Likewise.
9993 (lang_f_options): Remove `squangle'.
9994 (unsupported_options): Add `squangle'.
9995 (cxx_decode_option): Issue a warning about uses of
9996 -fname-mangling-version.
9997 (finish_file): Remove old ABI support.
9998 * pt.c (check_explicit_specialization): Likewise.
9999 (tsubst_decl): Likewise.
10000 * rtti.c (init_rtti_processing): Likewise.
10001 (build_headof): Likewise.
10002 (get_tinfo_decl_dynamic): Likewise.
10003 (tinfo_from_decl): Likewise.
10004 (build_dynamic_cast_1): Likewise.
10005 (synthesize_tinfo_var): Likewise.
10006 * init.c (build_new): Allow enumeration types for the array-bounds
10007 in a direct-new-declarator.
10009 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
10011 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
10012 TREE_PROTECTED from the template being specialized.
10014 2001-02-17 Jason Merrill <jason@redhat.com>
10016 * decl2.c (build_artificial_parm): Set TREE_READONLY.
10018 * decl.c (bad_specifiers): Allow throw specs on things with
10019 pointer-to-function or -member-function type.
10020 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
10023 2001-02-17 Mark Mitchell <mark@codesourcery.com>
10025 * call.c (check_dtor_name): Handle template names correctly.
10027 2001-02-16 Jason Merrill <jason@redhat.com>
10029 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
10030 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
10031 * optimize.c (maybe_clone_body): Don't substitute it.
10032 * call.c (build_new_method_call): Check in_chrg instead.
10033 * init.c (expand_virtual_init): Likewise.
10035 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
10037 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
10038 class-type introduces at least a type-name.
10040 2001-02-16 Jakub Jelinek <jakub@redhat.com>
10042 * call.c (convert_like_real): Create a temporary for non-lvalue.
10044 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
10046 * cp-tree.h: Fix typos in comments.
10048 2001-02-16 Jason Merrill <jason@redhat.com>
10050 * optimize.c (remap_block): If we're compiling a clone, pass the
10051 new block to insert_block.
10053 2001-02-16 Mark Mitchell <mark@codesourcery.com>
10055 * semantics.c (finish_asm_stmt): Robustify.
10057 2001-02-15 Mark Mitchell <mark@codesourcery.com>
10059 * pt.c (push_template_decl_real): Don't remangle the name of a
10062 2001-02-15 Jim Meyering <meyering@lucent.com>
10064 * Make-lang.in (c++.install-common): Depend on installdirs.
10065 (c++.install-info): Likewise.
10066 (c++.install-man): Likewise.
10068 2001-02-15 Mark Mitchell <mark@codesourcery.com>
10070 * typeck2.c (build_m_component_ref): Robustify.
10072 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
10074 * friend.c (do_friend): Don't take the nested [template] class
10075 into account when deciding whether to warn about the friend
10076 function not referring to a template function.
10078 2001-02-14 Jakub Jelinek <jakub@redhat.com>
10080 * typeck.c (build_unary_op): Clarify error message.
10082 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
10084 * parse.y (component_constructor_declarator): allow optional
10085 parentheses around constructor class name.
10087 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
10089 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
10091 * init.c (emit_base_init): Remove incorrect comment about
10093 * method.c (make_thunk): Fix comment alignment.
10095 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
10097 Kill remnants of this is variable.
10098 * cp-tree.h (flag_this_is_variable): Remove.
10099 * decl2.c (flag_this_is_variable): Remove.
10100 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
10101 (build_vbase_path): The path is non-static, even in a cdtor.
10102 (resolves_to_fixed_type_p): Add additional return value.
10103 * search.c (init_vbase_pointers): Adjust.
10104 * tree.c (lvalue_p_1): Adjust.
10105 * typeck.c (mark_addressable): Adjust.
10107 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
10109 * pt.c (unify): Don't check cv quals of array types.
10111 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
10113 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
10114 check whether we already have the type.
10116 2001-02-13 Mark Mitchell <mark@codesourcery.com>
10118 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
10119 * call.c (build_op_delete_call): Simplify to remove duplicate
10121 * class.c (clone_function_decl): Don't build the deleting variant
10122 of a non-virtual destructor.
10123 * decl.c (finish_destructor_body): Don't call delete if this is a
10124 non-virtual destructor.
10125 * init.c (build_delete): Explicitly call `operator delete' when
10126 deleting an object with a non-virtual destructor.
10128 2001-02-13 Jason Merrill <jason@redhat.com>
10130 * lang-specs.h: Add more __EXCEPTIONS.
10132 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
10134 * typeck2.c (process_init_constructor): Check
10135 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
10137 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
10139 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
10140 Remove spurious information in comment. Allow further
10141 adjustments of REFERENCE_TYPE args.
10143 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
10145 * errfn.c (cp_deprecated): Tweak diagnostic text.
10146 * parse.y (new_initializer): Deprecate initializer lists
10149 2001-02-12 Mark Mitchell <mark@codesourcery.com>
10151 Remove old ABI support.
10153 2001-02-11 Mark Mitchell <mark@codesourcery.com>
10155 * decl2.c (flag_vtable_thunks): Always set it to 1.
10156 (flag_new_abi): Likewise.
10157 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
10159 * Makefile.in (g++spec.o): Fix typo.
10161 2001-02-09 Jason Merrill <jason@redhat.com>
10163 * lang-specs.h: Restore definition of __EXCEPTIONS.
10165 2001-02-08 Jason Merrill <jason@redhat.com>
10167 * search.c (shared_member_p): New function.
10168 (lookup_field_r): Use it.
10169 * cp-tree.h (SHARED_MEMBER_P): Remove.
10171 * method.c (process_overload_item): Handle template-dependent array
10173 * pt.c (type_unification_real): If we end up with undeduced nontype
10176 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
10179 * typeck2.c (friendly_abort): Don't say anything if we have
10180 earlier errors or sorries.
10182 * decl.c (check_tag_decl): Notice attempts to redefine bool and
10183 wchar_t. Ignore if in_system_header.
10185 * decl.c (maybe_push_cleanup_level): New fn...
10186 (start_decl_1): ...split out from here.
10187 * cvt.c (build_up_reference): Use it.
10188 * cp-tree.h: Declare it.
10190 2001-02-07 Mark Mitchell <mark@codesourcery.com>
10192 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
10195 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
10197 * pt.c (lookup_template_class): Make sure it's a primary
10198 template or template_template_parm when called from the parser.
10199 (instantiate_template_class): Add assertion.
10201 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
10203 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
10204 from error_mark_node.
10206 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
10208 Fix specification and implementation bugs in V3 ABI
10209 construction vtables.
10210 * cp-tree.h (flag_dump_class_layout): New flag.
10211 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
10212 (BINFO_LOST_PRIMARY_P): New flag.
10213 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
10214 (BINFO_PRIMARY_MARKED_P): Rename to ...
10215 (BINFO_PRIMARY_P): ... here.
10216 (binfo_via_virtual): New prototype.
10217 * decl2.c (flag_dump_class_layout): New flag.
10218 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
10219 use `=' as a file name separator.
10220 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
10222 (build_vtbl_address): If this is a virtual primary base, then
10223 get the vtbl of what it is ultimately primary for.
10224 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
10225 for BINFO_PRIMARY_P.
10226 (dfs_skip_nonprimary_vbases_markedp): Likewise.
10227 (get_shared_vbase_if_not_primary): Likewise.
10228 (dfs_get_pure_virtuals): Likewise.
10229 (expand_upcast_fixups): Likewise.
10230 (fixup_virtual_upcast_offsets): Likewise.
10231 (dfs_find_vbase_instance): Likewise.
10232 (find_vbase_instance): Likewise.
10233 (binfo_from_vbase): Adjust comment to reflect reality.
10234 (binfo_via_virtual): New function.
10235 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
10236 for binfo walking during VTT construction.
10237 (dfs_mark_primary_bases): Remove.
10238 (force_canonical_binfo_r): New function.
10239 (force_canonical_binfo): New function.
10240 (mark_primary_virtual_base): New function.
10241 (mark_primary_bases): Walk in inheritance graph order, use
10242 mark_primary_virtual_base.
10243 (determine_primary_base): Use some more intermediate variables.
10244 (dfs_find_final_overrider): Don't check for overriding along a
10246 (dfs_modify_vtables): Walk into primary virtual bases too.
10247 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
10248 (build_base_fields): Likewise.
10249 (dfs_set_offset_for_unshared_vbases): Likewise.
10250 (layout_virtual_bases): Likewise.
10251 (end_of_class): Likewise.
10252 (finish_struct_1): Call dump_class_hierarchy, if requested.
10253 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
10254 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
10255 (dump_class_hierarchy): Add file parameter. Append to file, if
10257 (finish_vtbls): Adjust accumulate_vtbl_inits call.
10258 Use canonical base for virtual bases.
10259 (build_vtt): Add more comments. Adjust build_vtt_inits call.
10260 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
10261 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
10262 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
10264 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
10265 from DATA. We want virtual primary bases and all bases via virtual.
10266 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
10267 virtual base when not a construction vtable.
10268 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
10269 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
10270 Use canonical bases when processing virtual bases.
10271 (accumulate_vtbl_inits): We're interested in any base via a
10273 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
10274 within a construction vtable, determine what is being overridden.
10275 (build_vtbl_initializer): Add more comments
10276 (add_vcall_offset_vtbl_entries_1): Adjust comment.
10277 (build_rtti_vtbl_entries): Check if the base has lost its
10280 2001-02-05 Mark Mitchell <mark@codesourcery.com>
10282 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
10284 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10286 * decl.c (pushdecl): Call abort instead of fatal.
10287 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
10288 * init.c (build_new_1): Likewise.
10289 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
10290 * decl.c (build_typename_type): hash_table_init now returns void.
10291 decl.c (init_decl_processing): Make an error non-fatal.
10293 2001-02-04 Mark Mitchell <mark@codesourcery.com>
10295 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
10297 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
10298 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
10299 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10300 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
10301 * decl.c (maybe_commonize_var): Use the new name-mangling where
10303 * decl2.c (comdat_linkage): Enhance comments. Make all
10304 compiler-generated things static, if COMDAT is not available.
10305 (get_tinfo_decl): Do not make typeinfo objects that belong in the
10307 (tinfo_base_init): Use the correct mangled name for typeinfo
10308 strings, and push them into the global scope.
10309 (typeinfo_in_lib_p): New function.
10310 (synthesize_tinfo_var): Use it.
10311 (create_real_tinfo_var): Likewise.
10313 2001-02-03 Jakub Jelinek <jakub@redhat.com>
10315 * decl.c (push_class_binding): Use context_for_name_lookup instead
10316 of CP_DECL_CONTEXT.
10317 * search.c (context_for_name_lookup): Remove static. Check for NULL
10318 context in the loop.
10319 * cp-tree.h (context_for_name_lookup): Add prototype.
10321 2001-02-02 Jakub Jelinek <jakub@redhat.com>
10323 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
10324 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
10326 * call.c (convert_class_to_reference, build_user_type_conversion_1,
10327 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
10329 2001-02-02 Mark Mitchell <mark@codesourcery.com>
10331 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
10332 of macros used when compiling g++spec.c.
10333 * g++spec.c (lang_specific_driver): Link with the shared
10336 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
10338 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
10339 make_reference_declarator, make_call_declarator), method.c
10340 (implicitly_declare_fn), parse.y (namespace_using_decl,
10341 notype_unqualified_id, expr_or_declarator, new_type_id,
10342 after_type_declarator, direct_after_type_declarator,
10343 notype_declarator, complex_notype_declarator,
10344 complex_direct_notype_declarator, qualified_id,
10345 notype_qualified_id, overqualified_id, direct_new_declarator,
10346 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
10347 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
10348 instead of build_parse_node.
10350 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10352 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
10353 (minus_one_node): Moved to top level gcc directory. Renamed
10354 to integer_minus_one_node.
10356 * init.c (init_init_processing): Don't set minus_one_node.
10357 (build_vec_init): Use integer_minus_one_node.
10359 * rtti.c (get_tinfo_decl_dynamic): Likewise.
10361 2001-01-28 Jakub Jelinek <jakub@redhat.com>
10363 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
10364 identical and they would be replaced with constant, remove
10365 MODIFY_EXPR from the tree.
10367 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10369 * Make-lang.in: Remove all dependencies on defaults.h.
10370 * call.c: Don't include defaults.h.
10371 * decl.c: Likewise.
10372 * decl2.c: Likewise.
10373 * except.c: Likewise.
10375 * rtti.c: Likewise.
10376 * tree.c: Likewise.
10377 * typeck.c: Likewise.
10379 2001-01-25 Jakub Jelinek <jakub@redhat.com>
10381 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
10382 operators even in "C" linkage.
10383 * method.c (set_mangled_name_for_decl): Likewise.
10384 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
10385 overloaded operators in "C" linkage.
10387 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
10389 * pt.c (tsubst_decl): Remove IN_DECL parameter.
10390 (tsubst_arg_types): Check parameter is not void.
10391 (tsubst): Adjust tsubst_decl call.
10393 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
10395 * call.c (add_builtin_candidate): Quote std properly, from
10398 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10400 * pt.c (check_explicit_specialization): Clone constructors and
10403 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
10405 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
10406 indicates anything special about template depth. Make sure we
10407 only count the user visible template classes.
10409 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
10411 * call.c (build_conv): Typo in comment.
10412 (add_builtin_candidate): Add more explanation.
10413 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
10414 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
10415 when we have enumeral types.
10416 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
10417 candidates for relops and eqops.
10418 (joust): Simplify control flow. Allow a non-template user
10419 function to hide a builtin.
10421 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
10423 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
10424 (more_specialized): Add deduction parameter.
10425 * call.c (joust): Adjust more_specialized call.
10426 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
10427 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
10428 (get_bindings_order): Remove.
10429 (get_bindings_real): Add DEDUCE parameter.
10430 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
10431 REFERENCE_TYPE jig for DEDUCE_ORDER.
10432 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
10433 maybe_adjust_types_for_deduction.
10434 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
10436 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
10437 (check_cv_quals_for_unify): Use new unify qualifier flags.
10438 (unify): Clear new unify qualifier flags.
10439 (get_bindings_real): Add DEDUCE parameter.
10440 (get_bindings): Adjust call to get_bindings_real.
10441 (get_bindings_overload): Likewise.
10442 (most_specialized_instantiation): Adjust call to
10445 2001-01-19 Jason Merrill <jason@redhat.com>
10447 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
10449 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
10452 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
10454 * decl2.c (arg_assoc_class): Fix double iteration logic.
10456 2001-01-19 Jason Merrill <jason@redhat.com>
10458 * init.c (build_delete): Always call convert_force to strip cv-quals.
10460 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
10461 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
10462 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
10464 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
10466 * search.c (get_vbase_1): Count only virtual bases.
10468 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
10470 * class.c (duplicate_tag_error): Robustify flag clearing.
10472 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
10474 * cp-tree.h (lookup_template_class): Add complain parm.
10475 * decl.c (lookup_namespace_name): Adjust call to
10476 lookup_template_class.
10477 (make_typename_type): Likewise.
10478 * semantics.c (finish_template_type): Likewise.
10479 * pt.c (lookup_template_class): Add complain parm. Adjust.
10480 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
10481 (tsubst): Likewise.
10483 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
10485 * pt.c (copy_default_args_to_explicit_spec): Preserve
10486 object's CV quals. Reorganize.
10488 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
10490 * typeck.c (build_modify_expr): Say `initialization' for
10492 * init.c (build_default_init): Convert to enumeral type, if
10495 2001-01-18 Jakub Jelinek <jakub@redhat.com>
10497 * parse.y (nomods_initdcl0): Properly set things up for
10500 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
10502 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
10503 (type_unification_real): Set it.
10506 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
10508 * decl.c (finish_destructor_body): Convert to vbase pointer here.
10510 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
10512 * semantics.c (begin_class_definition): Check we're not inside a
10513 template parm list.
10515 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
10517 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
10520 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10522 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
10523 * call.c (build_over_call): Add comment.
10525 2001-01-16 Daniel Berlin <dberlin@redhat.com>
10527 * cvt.c (ocp_convert): Handle vector type conversion
10528 * typeck2.c (digest_init): Handle vector type initializations
10530 2001-01-16 Phil Edwards <pme@sources.redhat.com>
10532 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
10535 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
10537 * pt.c (check_nontype_parm): Rename to ...
10538 (invalid_nontype_parm_type_p): ... here.
10539 (process_template_parm): Adjust.
10540 (convert_template_argument): Adjust.
10542 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
10544 * pt.c (check_nontype_parm): New function.
10545 (process_template_parm): Use it.
10546 (convert_template_argument): Use it.
10547 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
10550 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
10552 * tree.c: Add defaults.h
10553 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
10554 * Make-lang.in (cp/tree.o): Add defaults.h.
10556 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
10558 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
10560 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
10562 * g++.1: Change to be ".so man1/gcc.1".
10564 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
10566 * Make-lang.in (c++.info, c++.install-info): Build and install g++
10568 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
10569 ($(srcdir)/cp/g++int.info): New target.
10570 * gxxint.texi: Add info directory entry. Use @@ in email address.
10571 * .cvsignore: Update.
10573 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
10575 * typeck.c (build_c_cast): Do template processing earlier.
10576 Always pedwarn on array casts.
10578 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
10580 * friend.c (make_friend_class): Make sure a templated class is
10581 actually a template.
10583 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
10585 * decl2.c (get_guard): Set linkage from guarded decl.
10587 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
10589 * call.c (convert_default_arg): Check for unprocessed
10591 * cp-tree.h (replace_defarg): Move to spew.c.
10592 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
10593 spew.c, which is where they really are.
10594 (done_pending_defargs): Declare.
10595 (unprocessed_defarg_fn): Declare.
10596 * decl.c (replace_defarg): Move to spew.c
10597 * parse.y (structsp): Call done_pending_defargs.
10598 * spew.c (defarg_fns): Rearrange list structure.
10599 (defarg_fnsdone): New static variable.
10600 (defarg_depfns): New static variable.
10601 (init_spew): Adjust.
10602 (add_defarg_fn): Store the type in TREE_TYPE.
10603 (do_pending_defargs): Detect and deal with ordering constraints
10605 (done_pending_defargs): New function.
10606 (unprocessed_defarg_fn): New function.
10607 (replace_defarg): Moved from decl.c. Robustify. Don't save
10608 if circularity detected.
10610 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
10612 * pt.c (unify): Check array has a domain, before checking
10613 whether it is variable sized.
10615 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
10617 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
10618 parameters with pointers to arrays of unknown bound.
10620 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
10622 * parse.y (template_parm_header, template_spec_header): New
10623 reductions. Split out from ...
10624 (template_header): ... here. Use them.
10625 (template_template_parm): Use template_parm_header.
10626 * semantics.c (finish_template_template_parm): Add assert.
10628 2001-01-10 Mark Mitchell <mark@codesourcery.com>
10630 * mangle.c (write_builtin_type): Fix thinko.
10632 * pt.c (copy_default_args_to_explicit_spec_1): New function.
10633 (copy_default_args_to_explicit_spec): Likewise.
10634 (check_explicit_specialization): Use it.
10636 * class.c (finish_struct_1): Remove last argument in call to
10637 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
10638 * decl.c (builtin_function): Likewise.
10639 (build_cp_library_fn): Likewise.
10640 (check_initializer): Likewise.
10641 (make_rtl_for_nonlocal_decl): Likewise.
10642 (cp_finish_decl): Likewise.
10643 (start_function): Likewise.
10644 * decl2.c (finish_anon_union): Likewise.
10645 * friend.c (do_friend): Likewise.
10646 * init.c (build_java_class_ref): Likewise.
10647 * method.c (make_thunk): Likewise.
10648 * pt.c (tsubst_friend_function): Likewise.
10649 * semantics.c (expand_body): Likewise.
10651 2001-01-10 Mark Mitchell <mark@codesourcery.com>
10653 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
10654 looking at DECL_CLONED_FUNCTION for non-functions.
10656 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
10658 * error.c (dump_template_parameter): Use parm to determine how
10659 to print default value.
10661 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
10663 * class.c (duplicate_tag_error): Clear more flags.
10665 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
10667 * call.c (build_new_method_call): Use binfo_for_vbase.
10669 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
10671 * cp-tree.h (flag_cond_mismatch): Don't declare.
10672 * decl2.c (flag_cond_mismatch): Don't define.
10673 (lang_f_options): Remove cond-mismatch.
10674 (unsupported_options): Add cond-mismatch.
10676 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
10678 * class.c (handle_using_decl): Reject using of constructor name
10679 of sourcing class. Allow injecting of a method with same name as
10680 nested class. Fixup error messages.
10682 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
10684 * decl2.c (lang_decode_option): Handle -Wformat=2.
10686 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
10688 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
10689 initialized_in_class.
10690 (DECL_DEFINED_IN_CLASS_P): Rename to ...
10691 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
10692 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
10693 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
10694 * pt.c (check_default_tmpl_args): Adjust for
10695 DECL_INITIALIZED_IN_CLASS_P.
10696 (instantiate_class_template): Likewise.
10697 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
10699 * class.c (finish_struct): Constify saved_filename.
10701 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
10703 * class.c (duplicate_tag_error): Adjust diagnostic.
10704 (finish_struct): Locally set location to start of struct.
10705 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
10707 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
10709 * decl.c (struct binding_level): Adjust class_shadowed comments
10710 to reflect reality.
10711 (push_class_level_binding): Adjust comments to reflect reality.
10712 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
10713 Don't set TREE_VALUE on the class_shadowed list.
10715 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
10717 * decl2.c (acceptable_java_type): Allow references too.
10718 * init.c (build_java_class_ref): When using the new ABI, search
10719 `class$' and have it mangled with `mangle_decl.'
10720 * mangle.c (write_java_integer_type_codes): New function.
10721 (write_builtin_type): Detect and mangle Java integer and real
10724 2001-01-07 Mark Mitchell <mark@codesourcery.com>
10726 * decl2.c (grokfield): Don't accept `asm' specifiers for
10727 non-static data members.
10729 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10731 * expr.c (cplus_expand_expr): Don't reset `target'.
10733 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
10735 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
10737 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
10739 * parse.y (template_datadef): Check for error_mark_node.
10741 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
10743 * cp-tree.def (DEFAULT_ARG): Make `x' class.
10745 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
10747 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
10748 (record_builtin_type): Make non-static.
10749 (flag_short_double): Don't declare.
10750 (init_decl_processing): Remove the creation of many tree nodes now
10751 in c_common_nodes_and_builtins.
10752 (build_void_list_node): New function.
10753 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
10754 * cp-tree.h (flag_short_wchar): Don't declare.
10756 2001-01-04 Mark Mitchell <mark@codesourcery.com>
10758 * call.c (build_conv): Don't use build1 for USER_CONV.
10759 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
10761 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
10763 * lex.c (lang_init): Call c_common_lang_init.
10765 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
10767 * search.c (lookup_fnfields_here): Remove.
10768 (look_for_overrides_r): Use lookup_fnfields_1.
10769 Ignore functions from using declarations.
10771 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
10773 Implement exceptions specifiers for implicit member functions.
10774 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
10775 * method.c (synthesize_exception_spec): New function.
10776 (locate_dtor, locate_ctor, locate_copy): New functions.
10777 (implicitly_declare_fn): Generate the exception spec too.
10778 * search.c (check_final_overrider): Check artificial functions
10780 * typeck2.c (merge_exception_specifiers): New function.
10782 2001-01-03 Jason Merrill <jason@redhat.com>
10784 * init.c (build_default_init): New fn.
10785 (perform_member_init): Split out from here.
10786 (build_new_1): Use it. Simplify initialization logic.
10787 (build_vec_init): Take an array, rather than a pointer and maxindex.
10788 Speed up simple initializations. Don't clean up if we're assigning.
10789 * cp-tree.h: Adjust.
10790 * decl2.c (do_static_initialization): Remove TREE_VEC case.
10791 * parse.y (new_initializer): Return void_zero_node for ().
10792 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
10793 * typeck2.c (digest_init): Only complain about user-written
10796 2000-12-22 Mike Stump <mrs@wrs.com>
10798 * decl2.c: (max_tinst_depth): Increase to 50.
10800 2001-01-02 Mark Mitchell <mark@codesourcery.com>
10802 * class.c (invalidate_class_lookup_cache): Zero the
10803 previous_class_values.
10804 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
10806 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
10807 * decl.c (free_bindings): New variable.
10808 (push_binding): Don't create a new binding if we have one on the
10810 (pop_binding): Put old bindings on the free list.
10811 (init_decl_processing): Use size_int, not build_int_2.
10812 Register free_bindings as a GC root.
10813 (cp_make_fname_decl): Use size_int, not build_int_2.
10814 (push_inline_template_parms_recursive): Likewise.
10815 (end_template_parm_list): Likewise.
10816 (for_each_template_parm): Do not use walk_tree_without_duplicates.
10817 (tsubst_template_parms): Use size_int, not build_int_2.
10818 (tsubst): Likewise.
10819 * rtti.c (get_vmi_pseudo_type_info): Likewise.
10821 2001-01-02 Richard Henderson <rth@redhat.com>
10823 * parse.y (asm): Set ASM_INPUT_P.
10825 2001-01-02 Jason Merrill <jason@redhat.com>
10827 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
10830 * typeck.c (cp_truthvalue_conversion): New fn.
10831 * cvt.c (ocp_convert): Use it.
10833 * cp-tree.h: Lose c-common.c decls.
10835 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
10836 * cvt.c (convert_to_void): Use type_unknown_p.
10838 * typeck.c (strip_all_pointer_quals): Also strip quals from
10839 pointer-to-member types.
10841 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
10844 * call.c (build_new_method_call): Do evaluate the object parameter
10845 when accessing a static member.
10846 * typeck.c (build_component_ref): Likewise.
10848 2001-01-02 Andreas Jaeger <aj@suse.de>
10850 * decl.c (cp_missing_noreturn_ok_p): New.
10851 (init_decl_processing): Set lang_missing_noreturn_ok_p.
10853 2000-12-29 Jakub Jelinek <jakub@redhat.com>
10855 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
10857 2000-12-29 Mark Mitchell <mark@codesourcery.com>
10859 * class.c (pushclass): Remove #if 0'd code.
10860 * cp-tree.h (overload_template_name): Remove.
10861 * decl.c (store_bindings): Simplify.
10862 (pop_from_top_level): Likewise.
10863 * pt.c (overload_template_name): Remove.
10864 (instantiate_decl): Don't call push_to_top_level if it's not
10867 2000-12-28 Mark Mitchell <mark@codesourcery.com>
10869 * pt.c (register_local_specialization): Don't return a value.
10870 (lookup_template_class): Use move-to-front heuristic when looking
10871 up template instantiations.
10872 (instantiate_decl): Only push_to_top_level when we're actually
10873 going to instantiate the template.
10875 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
10877 * search.c (binfo_for_vtable): Return least derived class, not
10878 most. Handle secondary vtables.
10880 2000-12-22 Jason Merrill <jason@redhat.com>
10882 * pt.c (more_specialized): Don't optimize len==0.
10883 (fn_type_unification): If we're adding the return type, increase len.
10885 * typeck.c (build_binary_op): Fix pmf comparison logic.
10887 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
10888 DECL_STATIC_FUNCTION_P.
10890 * semantics.c (genrtl_finish_function): Don't try to jump to
10891 return_label unless it exists.
10893 In partial ordering for a call, ignore parms for which we don't have
10895 * call.c (joust): Pass len to more_specialized.
10896 (add_template_candidate_real): Strip 'this', pass len.
10897 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
10898 (get_bindings_order): New fn. Pass len down.
10899 (get_bindings_real): Strip 'this', pass len.
10900 (fn_type_unification): Likewise.
10901 (type_unification_real): Succeed after checking 'len' args.
10902 (most_specialized_instantiation): Lose explicit_args parm.
10903 * class.c (resolve_address_of_overloaded_function): Strip 'this',
10906 2000-12-21 Jason Merrill <jason@redhat.com>
10908 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
10909 DECL_TEMPLATE_RESULT.
10911 * search.c (lookup_field_r): Call lookup_fnfields_1, not
10912 lookup_fnfields_here.
10914 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
10916 * call.c (build_object_call): Also allow conversions that return
10917 reference to pointer to function.
10918 (add_conv_candidate): Handle totype being ref to ptr to fn.
10919 (build_field_call): Also allow members of type reference to function.
10920 Lose support for calling pointer to METHOD_TYPE fields.
10922 * error.c (dump_expr): Handle *_CAST_EXPR.
10924 * typeck2.c (build_scoped_ref): Always convert to the naming class.
10926 * tree.c (break_out_cleanups): Lose.
10927 * cp-tree.h: Remove prototype.
10928 * typeck.c (build_component_ref): Don't break_out_cleanups.
10929 (build_compound_expr): Likewise.
10930 * semantics.c (finish_expr_stmt): Likewise.
10932 2000-12-20 Richard Henderson <rth@redhat.com>
10934 * cp-tree.h: Update declarations.
10935 * decl.c (finish_case_label): Return the new stmt node.
10936 * semantics.c (finish_goto_stmt): Likewise.
10937 (finish_expr_stmt, finish_return_stmt): Likewise.
10938 (finish_break_stmt, finish_continue_stmt): Likewise.
10939 (finish_asm_stmt): Likewise.
10940 * parse.y (already_scoped_stmt): Set STMT_LINENO.
10941 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
10942 (simple_if, simple_stmt): Return the new stmt node.
10943 (save_lineno): New.
10945 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
10947 * cp-tree.h: Don't declare warn_long_long.
10949 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10951 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
10954 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10956 * pt.c (unify): Handle when both ARG and PARM are
10957 BOUND_TEMPLATE_TEMPLATE_PARM.
10959 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10961 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
10962 DECL_TEMPLATE_PARM_P.
10964 2000-12-15 Jason Merrill <jason@redhat.com>
10966 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
10968 * init.c (build_new_1): Don't strip quals from type.
10970 * decl.c (pushdecl): Don't check for linkage on a non-decl.
10972 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
10974 * call.c (build_new_function_call): Lose space before paren in
10976 (build_new_method_call): Likewise.
10978 * typeck2.c (build_m_component_ref): Propagate quals from datum.
10980 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10982 * pt.c (check_explicit_specialization): Propagate default
10983 function arguments to explicit specializations.
10985 2000-12-13 DJ Delorie <dj@redhat.com>
10987 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
10990 2000-12-08 Jason Merrill <jason@redhat.com>
10992 * error.c (dump_function_name): Don't let the user see __comp_ctor.
10994 Clean up copy-initialization in overloading code.
10995 * call.c (build_user_type_conversion_1): Die if we are asked to
10996 convert to the same or a base type.
10997 (implicit_conversion): Avoid doing so. Lose reference binding code.
10998 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
10999 direct-initialization. Also do direct-init part of copy-init.
11000 (build_user_type_conversion): Don't provide context to convert_like.
11001 * cvt.c (ocp_convert): build_user_type_conversion will now provide
11002 the constructor call for copy-init.
11004 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
11005 instantiation of a member template.
11006 (do_decl_instantiation): Not here.
11008 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
11010 * class.c (check_field_decls): Don't special case anonymous
11011 fields in error messages.
11012 (note_name_declared_in_class): Use %D on diagnostic.
11014 * tree.c (pod_type_p): Use strip_array_types.
11015 (cp_valid_lang_attribute): Likewise.
11016 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
11017 multiple evaluations.
11018 (cp_has_mutable_p): Use strip_array_types.
11020 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
11022 * cp-tree.h (sufficient_parms_p): Declare new function.
11023 * call.c (sufficient_parms_p): New function, broken out of ...
11024 (add_function_candidate): ... here. Use it.
11025 (add_conv_candidate): Use it.
11026 * decl.c (grok_ctor_properties): Use it.
11028 2000-12-07 Jakub Jelinek <jakub@redhat.com>
11030 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
11032 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
11034 * decl2.c (lang_decode_option): Handle -Wformat-security.
11036 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11038 * pt.c (verify_class_unification): New function.
11039 (get_class_bindings): Use it.
11040 (try_class_unification): Tidy.
11041 (unify): Handle when argument of a template-id is not
11042 template parameter dependent.
11043 (template_args_equal): Handle when TREE_CODE's do not match.
11045 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
11047 * lang-specs.h (c++): When invoking the stand-alone preprocessor
11048 for -save-temps, pass all relevant -Defines to it, and then don't
11049 pass them to cc1plus.
11051 2000-12-05 Will Cohen <wcohen@redhat.com>
11053 * decl.c (finish_case_label): Cleared
11054 more_cleanups_ok in surrounding function scopes.
11055 (define_label): Likewise.
11057 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
11059 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
11060 (get_matching_virtual): Remove.
11061 (look_for_overrides): Declare new function.
11062 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
11064 * class.c (check_for_override): Move base class iteration code
11065 to look_for_overrides.
11066 * search.c (next_baselink): Remove.
11067 (get_virtuals_named_this): Remove.
11068 (get_virtual_destructor): Remove.
11069 (tree_has_any_destructors_p): Remove.
11070 (struct gvnt_info): Remove.
11071 (check_final_overrider): Remove `virtual' from error messages.
11072 (get_matching_virtuals): Remove. Move functionality to ...
11073 (look_for_overrides): ... here, and ...
11074 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
11077 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
11079 * typeck.c (get_delta_difference): If via a virtual base,
11081 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
11084 2000-12-04 Richard Henderson <rth@redhat.com>
11086 * error.c (dump_tree): Use output_add_string not OB_PUTS.
11088 2000-12-04 Jason Merrill <jason@redhat.com>
11090 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
11091 (write_builtin_type): Pass intSI_type_node and the like through
11093 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
11094 Pass intSI_type_node and the like through type_for_mode.
11095 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
11096 * pt.c (tsubst, unify): Likewise.
11097 * tree.c (walk_tree): Likewise.
11098 * error.c (dump_type): Likewise.
11099 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
11101 * Make-lang.in: Tweak top comment for emacs.
11102 (cp/TAGS): Restore.
11104 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
11106 * class.c (clone_function_decl): Robustify.
11108 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
11110 * decl.c (store_bindings): Only search in the non modified
11111 old_bindings for duplicates.
11113 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
11115 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
11116 TYPE_POLYMORPHIC_P.
11118 * typeck.c (build_static_cast): Remove unused variable.
11120 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11122 * pt.c: Fix typo in comment.
11124 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
11126 * decl2.c (warn_format): Remove definition.
11127 (lang_decode_option): Handle -Wformat-nonliteral,
11128 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
11130 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
11132 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
11133 (init_decl_processing): Don't create string_type_node,
11134 const_string_type_node, wint_type_node, intmax_type_node,
11135 uintmax_type_node, default_function_type, ptrdiff_type_node and
11136 unsigned_ptrdiff_type_node. Adjust position of call to
11137 c_common_nodes_and_builtins.
11138 (identifier_global_value): New function.
11140 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
11142 * call.c (standard_conversion): Reject pointer to member
11143 conversions from ambiguous, inaccessible or virtual bases.
11144 * typeck.c (build_static_cast): Don't check pointers to members
11147 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
11149 * method.c (do_build_copy_constructor): Preserve cv
11150 qualifications when accessing source object members.
11151 (do_build_assign_ref): Likewise. Remove separate diagnostics for
11154 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
11156 * method.c (do_build_assign_ref): Construct appropriately
11157 CV-qualified base reference. Don't allow const casts in base
11160 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
11162 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
11163 incomplete return type.
11165 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
11167 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
11168 * semantics.c (finish_base_specifier): Accept a _TYPE not a
11171 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
11173 * spew.c (yyerror): Cope if yylval.ttype is NULL.
11175 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
11177 * decl.c (grokdeclarator): Diagnose undefined template contexts.
11179 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
11181 * decl.c (grokdeclarator): Do type access control on friend
11184 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
11186 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
11187 bison parser ickiness.
11188 * pt.c (tsubst_friend_function): Enter namespace scope when
11189 tsubsting the function name.
11190 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
11192 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
11194 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
11195 * cvt.c (cp_convert_to_pointer): Add force parameter.
11196 Allow conversions via virtual base if forced.
11197 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
11198 (ocp_convert): Likewise.
11199 * search.c (binfo_from_vbase): Return the virtual base's binfo.
11200 * typeck.c (get_delta_difference): Adjust handling of virtual
11203 2000-11-26 Mark Mitchell <mark@codesourcery.com>
11205 * tree.c (struct list_hash): Remove.
11206 (list_hash_table): Make it be an htab.
11207 (struct list_proxy): New type.
11208 (list_hash_eq): New function.
11209 (list_hash_pieces): Renamed from ...
11210 (list_hash): ... this.
11211 (list_hash_lookup): Remove.
11212 (list_hash_add): Remove.
11213 (hash_tree_cons): Use the generic hashtable.
11214 (mark_list_hash): Remove.
11215 (init_tree): Create the hashtable.
11217 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
11219 * method.c (build_mangled_C9x_name): Rename to
11220 build_mangled_C99_name. Change C9X references in comments to
11223 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
11225 * parse.y (unary_expr): Move VA_ARG from here ...
11226 (primary): ... to here.
11228 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
11230 * semantics.c (finish_id_expr): If type is error_mark, return
11233 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
11235 * pt.c (lookup_template_class): Simplify loop exit constructs.
11236 Cope when there is no partial instantiation of a template
11239 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
11241 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
11243 2000-11-22 Mark Mitchell <mark@codesourcery.com>
11245 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
11248 * pt.c (do_decl_instantiate): Explicitly clone constructors and
11249 destructors that haven't already been cloned.
11251 2000-11-20 Richard Henderson <rth@redhat.com>
11253 * parse.y (yyparse_1): Rename the parser entry point.
11255 2000-11-20 Alex Samuel <samuel@codesourcery.com>
11257 * mangle.c (write_name): Use <unscoped-name> for names directly in
11259 (write_unscoped_name): Accept names directly in function scope.
11261 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
11263 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
11264 * parse.y (extdef): Add EXPORT reduction.
11265 * spew.c (yylex): Don't skip export here.
11267 2000-11-19 Mark Mitchell <mark@codesourcery.com>
11269 * decl.c (init_decl_processing): Correct name of pure virtual
11270 function under the new ABI.
11271 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
11272 (throw_bad_typeid): Likewise for bad typeid function.
11274 2000-11-18 Mark Mitchell <mark@codesourcery.com>
11276 * decl.c (grokparms): Don't even function types of `void' type,
11278 * mangle.c (write_type): Don't crash when confronted with the
11281 * decl.c (grokparms): Don't create parameters of `void' type.
11283 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
11285 * lex.c (mark_impl_file_chain): Delete.
11286 (init_parse): Remove call to ggc_add_string_root. No need to
11287 ggc_strdup a string constant. Do not add impl_file_chain to GC
11289 (handle_pragma_implementation): No need to ggc_strdup main_filename.
11291 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
11293 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
11295 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
11297 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
11298 * decl.c (grokdeclarator): Don't reject void parms here.
11299 (require_complete_types_for_parms): Simplify, use
11300 complete_type_or_else.
11301 (grokparms): Remove bitrot. Remove funcdef parm.
11302 Deal with ellipsis parm lists here.
11303 * semantics.c (finish_parmlist): Don't append void_list_node
11304 here. Set PARMLIST_ELLIPSIS_P.
11306 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
11308 * typeck2.c (incomplete_type_error): Reorganize to avoid
11309 excessive diagnostics.
11311 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
11313 * lex.c (struct impl_files, internal_filename): Constify a char *.
11315 2000-11-16 Mark Mitchell <mark@codesourcery.com>
11317 * mangle.c (write_special_name_constructor): Don't generate
11318 assembler junk when confronted with an old-style constructor.
11319 (write_special_name_destructor): Likewise.
11320 (mangle_decl_string): Do it here instead.
11322 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
11324 * call.c (op_error): Make error messages clearer.
11326 2000-11-15 Mark Mitchell <mark@codesourcery.com>
11328 * decl.c (wrapup_globals_for_namespace): Don't mark things
11329 TREE_ASM_WRITTEN when they're not.
11331 2000-11-15 Jason Merrill <jason@redhat.com>
11333 * typeck2.c (friendly_abort): Uncount the error before handing
11334 off to fancy_abort.
11336 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
11338 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
11340 2000-11-14 Mark Mitchell <mark@codesourcery.com>
11342 * class.c (build_vtbl_initializer): Fix typo in comment.
11343 * typeck.c (expr_sizeof): Don't crash on errors.
11345 2000-11-14 Jim Wilson <wilson@redhat.com>
11347 * lang-specs.h: Add %2 after %(cc1_options).
11349 2000-11-14 Richard Henderson <rth@redhat.com>
11351 * typeck.c (c_sizeof): Be strict about casting result value
11352 back to c_size_type_node.
11353 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
11355 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
11357 * typeck.c (build_unary_op): Use boolean_increment from
11358 c-common.c, moving the relevant code there.
11360 2000-11-11 Jason Merrill <jason@redhat.com>
11362 * typeck.c (mark_addressable): Don't call put_var_into_stack.
11364 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
11367 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11369 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
11370 * lex.c (copy_lang_decl): Likewise.
11372 2000-11-09 Mark Mitchell <mark@codesourcery.com>
11374 * dump.c (cp_dump_tree): Don't dump function bodies here.
11376 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
11377 (dump.o): Update dependency list.
11378 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
11379 (flag_dump_translation_unit): Likewise.
11380 (CP_TYPE_QUALS): Adjust definition.
11381 (DECL_C_BIT_FIELD): Remove.
11382 (SET_DECL_C_BIT_FIELD): Likewise.
11383 (CLEAR_DECL_C_BIT_FIELD): Likewise.
11384 (add_maybe_template): Likewise.
11385 (strip_array_types): Likewise.
11386 (dump_node_to_file): Likewise.
11387 (cp_dump_tree): New function.
11388 * decl.c (init_decl_processing): Set lang_dump_tree.
11389 * decl2.c (flag_dump_translation_unit): Remove.
11390 * dump.c: Move most of it to ../c-dump.c.
11391 (cp_dump_tree): New function.
11392 * pt.c (add_maybe_template): Remove.
11393 * typeck.c (strip_array_types): Likewise.
11395 2000-11-07 Eric Christopher <echristo@redhat.com>
11397 * decl.c (init_decl_processing): Change definition of
11398 __wchar_t to wchar_t. Remove artificial declaration of
11400 * lex.c: Change instances of __wchar_t to wchar_t.
11402 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
11404 * lex.c (do_identifier): Don't lookup_name for operators.
11405 * parse.y (operator): Save looking_for_typename.
11406 (unoperator): Restore it.
11407 * spew.c (frob_opname): Use nth_token for lookahead.
11409 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
11411 * decl.c (grok_op_properties): Always use coerce_new_type and
11412 coerce_delete_type.
11413 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
11414 exception specification. Tidy up.
11415 (coerce_delete_type): Preserve exception specification. Tidy up.
11417 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
11419 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
11420 (push_binding_level), error.c (cp_tree_printer), pt.c
11421 (process_partial_specialization, tsubst_template_arg_vector),
11422 search.c (lookup_member): Use memset () instead of bzero ().
11424 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
11426 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
11428 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
11430 * Make-lang.in (c++.distdir): Remove.
11432 2000-11-04 Mark Mitchell <mark@codesourcery.com>
11434 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
11435 declarations from different namespaces to be combined.
11437 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
11439 * decl.c: Include tm_p.h.
11441 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
11443 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
11445 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
11447 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
11448 (build_overload_value), repo.c (open_repo_file), xref.c
11449 (open_xref_file): Use strchr () and strrchr () instead of index ()
11452 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
11454 * call.c (build_over_call): Call fold on the CALL_EXPR.
11456 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
11458 * error.c (dump_template_decl): Separate template hearders with
11461 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
11463 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
11464 TS_* flags with corresponding TFF_*. Adjust prototypes of
11465 functions (which used to take a tree_string_flags) to take an int.
11467 * cp-tree.h (enum tree_string_flags): Remove
11468 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
11469 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
11470 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
11471 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
11472 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
11473 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
11474 (type_as_string, decl_as_string, expr_as_string,
11475 context_as_string): Adjust prototype.
11477 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
11478 instead of TS_PLAIN.
11480 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
11481 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
11484 2000-10-30 Mark Mitchell <mark@codesourcery.com>
11486 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
11487 (linkage_kind): New enumeration.
11488 (decl_linkage): New function.
11489 * decl2.c (comdat_linkage): Extend comment.
11490 * error.c (dump_function_decl): Print the arguments used to
11491 instantiate a template, even when not printing the type of the
11493 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
11494 not TREE_PUBLIC, to test for external linkage.
11495 * tree.c (decl_linkage): New function.
11497 2000-10-28 Mark Mitchell <mark@codesourcery.com>
11499 * pt.c (instantiate_decl): Always instantiate static data members
11500 initialized in-class.
11502 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
11504 * Make-lang.in: Move all build rules here from Makefile.in,
11505 adapt to new context. Wrap all rules that change the current
11506 directory in parentheses. Expunge all references to $(P).
11507 When one command depends on another and they're run all at
11508 once, use && to separate them, not ;. Add OUTPUT_OPTION to
11509 all object-file generation rules. Delete obsolete variables.
11511 * Makefile.in: Delete.
11512 * config-lang.in: Delete outputs= line.
11514 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
11516 * error.c (dump_function_decl): Print no space between
11517 `ptr-operator' the `type-specifier' of the return type.
11518 (dump_type_prefix): Make sure we put space at the appropriate
11521 2000-10-23 Jason Merrill <jason@redhat.com>
11523 * call.c (equal_functions): Also call decls_match for extern "C" fns.
11525 2000-10-22 Jason Merrill <jason@redhat.com>
11527 * call.c (build_conditional_expr): Use ocp_convert to force
11530 2000-10-22 Mark Mitchell <mark@codesourcery.com>
11532 * call.c (standard_conversion): Use RVALUE_CONVs for all
11533 expressions that satisfy lvalue_p, not just those that satisfy
11536 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
11538 * typeck.c (c_sizeof): Return an expression of `size_t' type,
11539 not one with TYPE_IS_SIZETYPE set.
11540 (dubious_conversion_warnings): Remove special-case code.
11542 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
11544 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
11545 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
11546 (dump_type_prefix): Print vector-of-int as 'int vector'.
11547 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
11548 * tree.c (walk_tree): Handle VECTOR_TYPE.
11550 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
11552 2000-10-21 Jason Merrill <jason@redhat.com>
11554 * parse.y (operator): Set got_object from got_scope.
11555 Set looking_for_typename.
11556 * decl.c (lookup_name_real): Clear val after setting from_obj.
11557 Reorganize diagnostic.
11559 2000-10-20 Jason Merrill <jason@redhat.com>
11561 * tree.c (walk_tree): Don't walk into default args.
11563 * error.c (dump_expr): Use host_integerp.
11565 2000-10-20 David Edelsohn <edelsohn@gnu.org>
11567 * typeck2.c (abstract_virtuals_error): Use "because" instead of
11568 "since" in error message.
11570 2000-10-20 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11572 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
11574 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
11576 * decl.c (revert_static_member_fn): Fixed typo.
11578 2000-10-19 Mark Mitchell <mark@codesourcery.com>
11580 * class.c (subobject_offset_fn): New type.
11581 (dfs_record_base_offsets): Remove.
11582 (record_base_offsets): Likewise.
11583 (dfs_search_base_offsets): Likewise.
11584 (record_subobject_offset): New function.
11585 (check_subobject_offset): Likewise.
11586 (walk_subobject_offsets): Likewise.
11587 (record_subobject_offsets): Likewise.
11588 (layout_conflict_p): Reimplement.
11589 (layout_nonempty_base_or_field): Correct handling of type
11590 conflicts during layout.
11591 (layout_empty_base): Likewise.
11592 (build_base_field): Adjust to handle new representation of empty
11594 (build_base_fields): Likewise.
11595 (layout_virtual_bases): Likewise.
11596 (splay_tree_compare_integer_csts): New function.
11597 (layout_class_type): Use a splay_tree, rather than a varray, to
11598 represent the offsets of empty bases.
11600 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
11601 * decl.c (select_decl): Don't return declarations that are
11604 2000-10-18 Mark Mitchell <mark@codesourcery.com>
11606 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
11607 (fake_std_node): New macro.
11608 * decl.c (in_std): Rename to ...
11609 (in_fake_std): ... this.
11610 (flag_no_builtin): Remove.
11611 (flag_no_nonansi_builtin): Likewise.
11612 (walk_namespaces_r): Use fake_std_node.
11613 (push_namespace): Use std_identifier.
11614 (pop_namespace): Use in_fake_std.
11615 (lookup_name_real): Use fake_std_node.
11616 (init_decl_processing): When -fhonor-std, create the `std'
11617 namespace. Don't create a dummy fake_std_node in that case.
11618 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
11619 (builtin_function): Put builtins whose names don't begin
11620 with `_' in the std namespace.
11621 * decl2.c (flag_no_builtin): Remove.
11622 (flag_no_nonansi_builtin): Likewise.
11623 (set_decl_namespace): Use fake_std_node.
11624 (validate_nonmember_using_decl): Likewise.
11625 (do_using_directive): Likewise.
11626 (handle_class_head): Likewise.
11627 * dump.c (dequeue_and_dump): Likewise.
11628 * except.c (init_exception_processing): Use std_identifier.
11629 * init.c (build_member_call): Use fake_std_node.
11630 * rtti.c (init_rtti_processing): Use std_identifier.
11632 2000-10-17 Mark Mitchell <mark@codesourcery.com>
11634 * cp-tree.h (back_end_hook): Remove declaration.
11635 * decl2.c (back_end_hook): Remove definition.
11637 * dump.c (dequeue_and_dump): Dump TREE_USED.
11639 2000-10-17 Brad Lucier <lucier@math.purdue.edu>
11641 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
11643 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
11645 * decl.c (WINT_TYPE): Define.
11646 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
11647 c_size_type_node, signed_size_type_node and wint_type_node.
11649 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
11651 * decl2.c (warn_missing_format_attribute): New variable.
11652 (lang_decode_option): Decode -Wmissing-format-attribute.
11654 2000-10-16 Mark Mitchell <mark@codesourcery.com>
11656 * typeck.c (qualify_type): Remove.
11657 (composite_pointer_type): Fix handling of conversions to `cv void*'.
11659 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11661 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
11663 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11665 * Makefile.in (parse.c, parse.h): Create atomically.
11667 2000-10-12 Mark Mitchell <mark@codesourcery.com>
11669 * class.c (current_obstack): Remove.
11670 * decl.c (ggc_p): Remove.
11671 (start_decl): Don't use decl_tree_cons.
11672 (grokdeclarator): Don't use build_decl_list.
11673 (start_function): Don't use decl_tree_cons.
11674 (finish_function): Don't mess with obstacks.
11675 * decl2.c (grok_x_components): Don't use build_decl_list.
11676 * lex.c (make_call_declarator): Don't call decl_tree_cons.
11677 (implicitly_declare_fn): Don't call build_decl_list.
11678 * parse.y (frob_specs): Don't call build_decl_list or
11680 (expr_or_declarator_intern): Don't call decl_tree_cons.
11681 (primary): Don't call build_decl_list.
11682 (fcast_or_absdcl): Likewise.
11683 (typed_declspecs): Don't call decl_tree_cons.
11684 (reserved_declspecs): Don't call build_decl_list.
11685 (declmods): Likewise.
11686 (reserved_typespecquals): Likewise.
11688 (new_type_id): Likewise.
11689 (cv_qualifiers): Likewise.
11690 (after_type_declarator_intern): Likewise.
11691 (notype_declarator_intern): Likewise.
11692 (absdcl_intern): Likewise.
11693 (named_parm): Likewise.
11694 * pt.c (most_specialized_class): Likewise.
11695 * repo.c (temporary_obstack): Make it a structure, not a pointer.
11696 (init_repo): Initialize it.
11697 * search.c (current_obstack): Remove.
11698 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
11700 2000-10-09 Richard Henderson <rth@cygnus.com>
11702 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
11703 (c++ language support bits for libgcc): Remove.
11704 (c++.clean): Remove cplib2.txt cleanup.
11705 * config-lang.in (headers, lib2funcs): Remove.
11707 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
11708 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
11709 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
11710 * inc/new.h, inc/typeinfo: Remove files.
11712 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
11714 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
11716 (init_decl_processing): Initialize intmax_type_node and
11719 2000-10-06 Richard Henderson <rth@cygnus.com>
11721 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
11722 (original_result_rtx): Remove.
11723 * decl.c (save_function_data): Don't clear x_result_rtx.
11724 (mark_lang_function): Don't mark it either.
11725 * expr.c (fixup_result_decl): Remove.
11726 * semantics.c (genrtl_named_return_value): Frob the return decl
11727 before calling emit_local_var.
11728 (genrtl_finish_function): Don't call fixup_result_decl.
11729 Always emit the jump to return_label.
11731 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
11733 * pt.c (lookup_template_class): Set current access for enum.
11734 (tsubst_enum): Set file & line for enum decl.
11736 * spew.c (yylex): Remove unused variable.
11738 2000-10-05 Richard Henderson <rth@cygnus.com>
11740 * semantics.c (genrtl_finish_function): Don't init or check
11741 can_reach_end; remove noreturn and return value checks.
11743 2000-10-05 Tom Tromey <tromey@cygnus.com>
11745 * init.c (build_java_class_ref): Use `build_static_name' with a
11746 suffix, not a prefix, to build the class object's name.
11748 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
11750 * cp-tree.h (access_kind): Fix comment typo.
11751 * decl2.c (grokfield): Fix diagnostic typo.
11752 * semantics.c (finish_template_type): Fix comment typo.
11753 (finish_qualified_object_call_expr): Likewise.
11755 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
11757 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
11760 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
11762 * spew.c (frob_id): New static function.
11763 (frob_opname): Use it.
11766 2000-10-01 Mark Mitchell <mark@codesourcery.com>
11768 * decl.c (lang_mark_false_label_stack): Remove.
11769 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
11771 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
11773 * gxxint.texi: Use @email for formatting email addresses.
11775 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
11777 * error.c: Remove direct obstack manipulation. Replace with
11778 output_buffer-based formatting. Adjust calls to removed macros.
11779 (obstack_chunk_alloc, obstack_chunk_free): Remove.
11780 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
11781 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
11783 2000-09-24 Mark Mitchell <mark@codesourcery.com>
11785 * ir.texi: Move to ../c-tree.texi.
11787 2000-09-20 Jason Merrill <jason@redhat.com>
11789 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
11791 2000-09-21 Andreas Jaeger <aj@suse.de>
11793 * errfn.c: Move declaration of cp_printer and cp_printers to ...
11794 * cp-tree.h: ... here.
11796 * error.c: Remove declaration of cp_printer.
11798 2000-09-20 Mark Mitchell <mark@codesourcery.com>
11800 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
11802 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
11804 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
11807 2000-09-18 Mark Mitchell <mark@codesourcery.com>
11809 * decl.c (start_function): Robustify.
11811 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11813 * cp-tree.h (check_function_format): Accept a `status' parameter.
11815 * call.c, typeck.c: Updates calls to `check_function_format'.
11817 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
11819 * decl2.c (handle_class_head): Always push some scope even
11822 2000-09-16 Mark Mitchell <mark@codesourcery.com>
11824 * cp-tree.h (struct cp_language_function): Remove
11825 x_scope_stmt_stack and name_declared.
11826 (current_scope_stmt_stack): Remove.
11827 (function_name_declared_p): New macro.
11828 (struct lang_decl_flags): Use c_lang_decl as a base class.
11830 (struct lang_decl): Replace saved_tree with context.
11831 (DECL_FRIEND_CONTEXT): Adjust accordingly.
11832 (SET_DECL_FRIEND_CONTEXT): Likewise.
11833 (DECL_VIRTUAL_CONTEXT): Likewise.
11834 (DECL_SAVED_TREE): Remove.
11835 (C_DECLARED_LABEL_FLAG): Likewise.
11836 (cplus_expand_expr_stmt): Don't declare.
11837 (add_decl_stmt): Likewise.
11838 (add_scope_stmt): Likewise.
11839 * decl.c (mark_stmt_tree): Remove.
11840 (case_compare): Likewise.
11841 (finish_case_label): Use c_add_case_label.
11842 (init_decl_processing): Set more language-specific hooks.
11843 (build_enumerator): Fix typo in comment.
11844 (cplus_expand_expr_stmt): Remove.
11845 (mark_lang_function): Use mark_c_language_function.
11846 (lang_mark_tree): Use c_mark_lang_decl.
11847 * decl2.c: Change order of inclusion.
11848 * except.c: Likewise.
11849 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
11850 back on c_expand_expr.
11851 * friend.c: Include expr.h.
11852 * init.c: Change order of inclusion.
11853 * Makefile.in: Update dependencies.
11854 * lex.h (free_lang_decl_chain): Remove.
11855 * optimize.c (maybe_clone_body): Use function_name_declared_p.
11856 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
11858 (instantiate_decl): Use function_name_declared_p.
11859 * semantics.c (lang_expand_expr_stmt): Remove.
11860 (set_current_function_name_declared): Likewise.
11861 (current_function_name_declared): Likewise.
11862 (begin_compound_stmt): Use function_name_declared_p.
11863 (add_decl_stmt): Remove.
11864 (setup_vtbl_ptr): Use function_name_declared_p.
11865 (add_scope_stmt): Remove.
11866 (current_scope_stmt_stack): New function.
11867 (cp_expand_stmt): Don't handle SCOPE_STMTs.
11868 (expand_body): Use function_name_declared_p.
11869 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
11870 * typeck.c: Change order of includes.
11871 (convert_sequence): Remove.
11873 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
11875 * lex.c (reswords): Add _Complex.
11877 2000-09-14 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11879 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
11881 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
11883 * init.c (begin_init_stmts): Don't use // comments.
11885 2000-09-12 Jason Merrill <jason@redhat.com>
11887 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
11888 all non-extern arrays.
11890 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
11891 typenames, too. Downgrade complaint to pedwarn.
11892 (xref_tag): Warn about surprising behavior of 'friend struct T'.
11893 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
11894 'class This::Inherited'.
11896 2000-09-12 Mark Mitchell <mark@codesourcery.com>
11898 * decl.c (finish_case_label): Given the LABEL_DECL a
11901 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
11903 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
11904 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
11905 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
11906 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
11907 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
11909 (sorry_for_unsupported_tree, print_scope_operator,
11910 print_left_paren, print_right_paren, print_left_bracket,
11911 print_right_bracket, print_whitespace): Likewise.
11912 (aggr_variety): Rename to class_key_or_enum.
11913 (print_type): Rename to print_type_id.
11914 (print_type_specifier_seq, print_simple_type_specifier,
11915 print_elaborated_type_specifier,
11916 print_rest_of_abstract_declarator,
11917 print_parameter_declaration_clause, print_exception_specification,
11918 print_nested_name_specifier, print_template_id,
11919 typedef_original_name, print_template_argument_list_start,
11920 print_template_argument_list_end): New functions.
11922 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
11924 * ir.texi: Add more documentation.
11926 2000-09-11 Mark Mitchell <mark@codesourcery.com>
11928 * cp-tree.h (struct saved_scope): Remove x_function_parms.
11929 (current_function_parms): Don't define.
11930 (struct cp_language_function): Remove parms_stored.
11931 (current_function_just_assigned_this): Don't define.
11932 (current_function_parms_stored): Likewise.
11933 (static_ctors): Declare.
11934 (static_dtors): Likewise.
11935 (SF_EXPAND): Don't define.
11936 (expand_start_early_try_stmts): Remove declaration.
11937 (store_parm_decls): Likewise.
11938 * decl.c (static_ctors): Don't declare.
11939 (static_dtors): Likewise.
11940 (struct binding_level): Remove this_block.
11941 (poplevel): Remove dead code.
11942 (set_block): Likewise.
11943 (mark_binding_level): Don't mark this_block.
11944 (mark_saved_scope): Don't mark x_function_parms.
11945 (init_decl_processing): Don't add current_function_parms as a GC
11947 (check_function_type): Change prototype.
11948 (start_function): Remove RTL-generation code.
11949 (expand_start_early_try_stmts): Remove.
11950 (store_parm_decls): Give it internal linkage. Remove
11951 RTL-generation code.
11952 (finish_function): Remove RTL-generation code.
11953 * decl2.c (static_ctors): Fix formatting.
11954 (static_dtors): Likewise.
11955 * method.c (use_thunk): Don't call store_parm_decls.
11956 (synthesize_method): Likewise.
11957 * optimize.c (maybe_clone_body): Likewise.
11958 * parse.y (fn.def2): Likewise.
11959 (.set_base_init): Likewise.
11960 (nodecls): Likewise.
11961 * pt.c (instantiate_decl): Likewise.
11962 * rtti.c (synthesize_tinfo_fn): Likewise.
11963 * semantics.c (genrtl_try_block): Simplify.
11964 (expand_body): Use genrtl_start_function and
11965 genrtl_finish_function.
11966 (genrtl_start_function): New function.
11967 (genrtl_finish_function): Likewise.
11969 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
11971 * error.c (cp_tree_printer, case 'P'): Append break.
11973 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
11975 * cp-tree.h (frob_opname): Declare.
11976 * parse.y (saved_scopes): New static variable.
11977 (cp_parse_init): Adjust.
11978 (do_id): If lastiddecl is NULL, do do_identifier.
11979 (operator): Save scope information.
11980 (unoperator): New reduction. Restore scope information.
11981 (operator_name): Append unoperator. Call frob_opname.
11982 * spew.c (frob_opname): Define.
11984 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
11986 * decl.c, rtti.c: Include defaults.h if not already included.
11987 Don't define the *_TYPE_SIZE macros.
11989 2000-09-09 Mark Mitchell <mark@codesourcery.com>
11991 * cp-tree.h (push_switch): Change prototype.
11992 (check_cp_case_value): Remove declaration.
11993 (decl_constant_value): Likewise.
11994 * decl.c (struct cp_switch): Add switch_stmt and cases.
11995 (case_compare): New function.
11996 (push_switch): Set switch_stmt. Initialize cases.
11997 (pop_switch): Clean up cases.
11998 (define_case_label): Rename to ...
11999 (finish_case_label): ... this. Do semantic analysis for case
12001 (start_function): Correct comment.
12002 * decl2.c (check_cp_case_value): Remove.
12003 * expr.c (do_case): Remove.
12004 * pt.c (tsubst_expr): Adjust call to finish_case_label.
12005 * semantics.c (genrtl_do_poplevel): Remove declaration.
12006 (RECHAIN_STMTS): Remove.
12007 (finish_break_stmt): Use build_break_stmt.
12008 (finish_continue_stmt): Use build_continue_stmt.
12009 (finish_switch_cond): Adjust condition here, rater than in
12010 c_expand_start_case.
12011 (finish_case_label): Remove.
12012 * typeck.c (c_expand_return): Remove.
12013 (c_expand_start_case): Likewise.
12015 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
12017 * ir.texi: Document type nodes.
12019 2000-09-06 Mark Mitchell <mark@codesourcery.com>
12021 * cp-tree.h (init_cp_semantics): Declare.
12022 (genrtl_try_block): Don't declare.
12023 (genrtl_handler): Likewise.
12024 (genrtl_catch_block): Likewise.
12025 (genrtl_ctor_stmt): Likewise.
12026 (genrtl_subobject): Likewise.
12027 (genrtl_do_poplevel): Likewise.
12028 (genrtl_named_return_value): Likewise.
12029 * lex.c (init_parse): Call init_cp_semantics.
12030 * semantics.c (genrtl_try_block): Give it internal linkage.
12031 (genrtl_handler): Likewise.
12032 (genrtl_catch_block): Likewise.
12033 (genrtl_ctor_stmt): Likewise.
12034 (genrtl_subobject): Likewise.
12035 (genrtl_do_poplevel): Likewise.
12036 (genrtl_named_return_value): Likewise.
12037 (lang_expand_stmt): Rename to ...
12038 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
12039 (init_cp_semantics): Define.
12041 * decl.c (initialize_local_var): Remove RTL-generating code.
12042 * semantics.c (genrtl_try_block): Fix formatting.
12044 Move statement-tree facilities from C++ to C front-end.
12045 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
12046 (void_zero_node): Remove.
12047 (stmt_tree): Likewise.
12048 (scope_chain): Adjust.
12049 (language_function): Rename to cp_language_function.
12050 (cp_function_chain): Adjust.
12051 (current_stmt_tree): Remove.
12052 (last_tree): Likewise.
12053 (last_expr_type): Likewise.
12054 (struct lang_decl): Adjust.
12055 (STMT_IS_FULL_EXPR_P): Remove.
12056 (add_tree): Remove.
12057 (begin_stmt_tree): Likewise.
12058 (finish_stmt_tree): Likewise.
12059 (walk_tree_fn): Likewise.
12060 (walk_stmt_tree): Likewise.
12061 * class.c (finish_struct): Replace use of add_tree with add_stmt.
12062 * decl.c (mark_stmt_tree): Adjust type.
12063 (init_decl_processing): Don't build void_zero_node.
12064 (initialize_local_var): Adjust usage of current_stmt_tree.
12065 (finish_enum): Use add_stmt, not add_tree.
12066 (save_function_data): Adjust use of language_function.
12067 (finish_constructor_body): Use add_stmt, not add_tree.
12068 (finish_destructor_body): Likewise.
12069 (push_cp_function_context): Adjust use of language_function.
12070 (pop_cp_function_context): Likewise.
12071 (mark_lang_function): Likewise.
12072 (mark_cp_function_context): Likewise.
12073 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
12074 (build_vec_init): Likewise.
12075 * semantics.c (SET_LAST_STMT): Remove.
12076 (RECHAIN_STMTS): Don't use it.
12077 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
12078 (current_stmt_tree): Define.
12079 (add_tree): Remove.
12080 (finish_goto_stmt): Use add_stmt, not add_tree.
12081 (finish_expr_stmt): Likewise.
12082 (begin_if_stmt): Likewise.
12083 (finish_then_clause): Likewise.
12084 (begin_while_stmt): Likewise.
12085 (begin_do_stmt): Likewise.
12086 (finish_return_stmt): Likewise.
12087 (begin_for_stmt): Likewise.
12088 (finish_break_stmt): Likewise.
12089 (finish_continue_stmt): Likewise.
12090 (begin_switch_stmt): Likewise.
12091 (finish_case_label): Likewise.
12092 (begin_try_block): Likewise.
12093 (begin_function_try_block): Likewise.
12094 (begin_handler): Likewise.
12095 (begin_catch_block): Likewise.
12096 (begin_compound_stmt): Likewise.
12097 (begin_asm_stmt): Likewise.
12098 (finish_asm_stmt): Likewise.
12099 (finish_label_stmt): Likewise.
12100 (add_decl_stmt): Likewise.
12101 (finish_subobject): Likewise.
12102 (finish_decl_cleanup): Likewise.
12103 (finish_named_return_value): Likewise.
12104 (setup_vtbl_ptr): Likewise.
12105 (add_scope_stmt): Likewise.
12106 (finish_stmt_expr): Likewise.
12107 (prune_unused_decls): Remove.
12108 (begin_stmt_tree): Likewise.
12109 (finish_stmt_tree): Likewise.
12110 (prep_stmt): Adjust use of current_stmt_tree.
12111 (lang_expand_stmt): Likewise.
12112 * tree.c (statement_code_p): Remove.
12113 (cp_statement_code_p): New function.
12114 (walk_stmt_tree): Remove.
12115 (init_tree): Set lang_statement_code_p.
12117 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
12119 Integrated preprocessor.
12121 * Make-lang.in, Makefile.in: Remove all references to input.c,
12122 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
12123 * gxx.gperf, hash.h, input.c: Delete.
12124 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
12125 initialized properly.
12127 * class.c (fixup_pending_inline): Take a tree, not a
12128 struct pending_inline *. All callers changed.
12129 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
12130 RID_PROTECTED entries in ridpointers[] array here.
12131 * decl.c (duplicate_decls): Do not refer to struct
12133 (record_builtin_type, init_decl_processing): Use RID_MAX not
12135 (grokdeclarator): Use C_IS_RESERVED_WORD.
12136 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
12138 (grok_x_components): Do not inspect pending_inlines chain.
12140 * cp-tree.h (struct lang_identifier): Add rid_code entry.
12141 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
12142 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
12143 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
12144 TIME_IDENTIFIER_FILEINFO): Kill.
12146 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
12147 single 32-bit word.
12148 * parse.y: Call do_pending_inlines unconditionally.
12149 reinit_parse_for_method is now snarf_method. fn.defpen is no
12150 longer necessary. Remove unnecessary <itype> annotation on
12151 SCOPE. Do not refer to end_of_file or struct pending_inline.
12152 * semantics.c (begin_inline_definitions): Call
12153 do_pending_inlines unconditionally.
12155 * lex.c: Remove all code now shared with C front end.
12156 Initialize cpplib properly if USE_CPPLIB. Put reserved words
12157 into the get_identifier table. Rewrite pragma handling to
12158 work with the registry. Move code to save tokens for later
12159 processing to spew.c.
12161 * spew.c: Rewrite everything in terms of token streams instead
12162 of text. Move routines here from lex.c / input.c as
12163 appropriate. GC-mark trees hanging off the pending inlines
12166 2000-09-06 Mark Mitchell <mark@codesourcery.com>
12168 * NEWS: Mention that the named return value extension has been
12170 * cp-tree.h (original_result_rtx): Define.
12171 (TREE_REFERENCE_EXPR): Remove.
12172 (DECL_VPARENT): Likewise.
12173 (pushdecl_nonclass_level): Likewise.
12174 (store_return_init): Likewise.
12175 (reinit_lang_specific): Likewise.
12176 (genrtl_named_return_value): Change prototype.
12177 * decl.c (original_result_rtx): Remove.
12178 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
12179 Do not generate RTL for local variables here.
12180 (store_return_init): Remove.
12181 * semantics.c (genrtl_named_return_value): Simplify. Fold in
12183 (finish_named_return_value): Adjust accordingly. Warn that this
12184 extension is deprecated.
12185 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
12187 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
12189 * pt.c (type_unification_real): Replace switch with if.
12190 (unify): Tsubst non-type parms before comparing.
12192 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
12194 * error.c (dump_typename): New function, broken out of ...
12195 (dump_type): ... here. Use it.
12196 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
12198 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
12200 * init.c (build_offset_ref): Deal with namespace scoped
12203 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
12205 * class.c (resolve_address_of_overloaded_function): Add
12206 explanation message.
12207 * decl.c (define_case_label): Reformat explanation.
12208 * decl2.c (finish_static_data_member_decl): Likewise.
12209 (grokfield): Likewise.
12210 * friend.c (do_friend): Likewise.
12212 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
12214 * tree.c (walk_tree): Expose tail recursion.
12215 (walk_stmt_tree): New function.
12216 * cp-tree.h: Prototype walk_stmt_tree.
12217 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
12218 the BLOCKs directly. If a BLOCK has no variables after
12219 pruning, discard it.
12220 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
12221 restore the line number.
12223 2000-09-05 Mark Mitchell <mark@codesourcery.com>
12225 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
12226 (pt.o): Remove dependency on HTAB_H.
12227 * cp-tree.h: Include hashtab.h.
12228 (walk_tree): Change prototype.
12229 (walk_tree_without_duplicates): New function.
12230 * decl.c (check_default_argument): Use it.
12231 * optimize.c (remap_decl): Adjust calls to walk_tree.
12232 (copy_body): Likewise.
12233 (expand_calls_inline): Likewise.
12234 (calls_setjmp_p): Use walk_tree_without_duplicates.
12235 * pt.c: Don't include hashtab.h.
12236 (for_each_template_parm): Use walk_tree_without_duplicates.
12237 * semantics.c (finish-stmt_tree): Likewise.
12238 (expand_body): Likewise.
12239 * tree.c (walk_tree): Add additional parameter.
12240 (walk_tree_without_duplicates): New function.
12241 (count_trees): Use it.
12242 (verify_stmt_tree): Adjust call to walk_tree.
12243 (find_tree): Use walk_tree_without_duplicates.
12244 (no_linkage_check): Likewise.
12245 (break_out_target_exprs): Adjust call to walk_tree.
12246 (cp_unsave): Likewise.
12248 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12250 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
12251 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
12252 * cp-tree.h (TYPE_BINFO): Adjust comment.
12253 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
12254 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
12255 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
12256 (TYPE_TEMPLATE_INFO): Likewise.
12257 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
12258 * class.c (push_nested_class): Likewise.
12259 * decl.c (lookup_name_real): Likewise.
12260 (grokdeclarator): Likewise.
12261 (grok_op_properties): Likewise.
12262 (xref_tag): Likewise.
12263 (xref_basetypes): Likewise.
12264 * decl2.c (constructor_name_full): Likewise.
12265 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
12266 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
12267 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
12268 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12269 (dump_type_suffix): Likewise.
12270 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
12272 (get_aggr_from_typedef): Likewise.
12273 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
12274 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12275 (write_template_parm): Likewise.
12276 (write_template_template_parm): Check tree code instead of
12277 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12278 * method.c (build_overload_nested_name): Add
12279 BOUND_TEMPLATE_TEMPLATE_PARM.
12280 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
12281 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12282 * pt.c (convert_template_argument): Check tree code instead of
12283 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12284 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
12285 (for_each_template_parm): Adjust comment.
12286 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
12287 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12288 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
12289 template_args_equal to compare template template parameter cases.
12290 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12291 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
12293 * tree.c (copy_template_template_parm): Decide whether to create
12294 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
12295 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12296 (copy_tree_r): Likewise.
12297 * typeck.c (comptypes): Likewise. Check tree code instead of
12298 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12300 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
12302 * decl.c (finish_function): Move the code for handling functions
12303 marked with the constructor and destructor attributes inside the
12306 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
12308 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
12310 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
12312 * pt.c (lookup_template_class): Remove abort.
12313 * tree.c (get_type_decl): Allow error_mark_node.
12315 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
12317 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
12320 2000-09-03 Mark Mitchell <mark@codesourcery.com>
12322 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
12325 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
12327 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
12328 union tag mismatch error reporting.
12330 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
12332 * call.c (build_scoped_method_call): Check it is not a namespace.
12334 2000-08-30 Jason Merrill <jason@redhat.com>
12336 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
12338 * tree.c (bot_manip): Check TREE_CONSTANT rather than
12339 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
12340 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
12342 * decl.c (start_function): Always call make_function_rtl.
12344 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
12346 * semantics.c (prune_unused_decls): New function.
12347 (finish_stmt_tree): Call it via walk_tree.
12349 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
12351 * class.c (build_secondary_vtable): Constify a char *.
12352 * decl.c (init_decl_processing): Initialize function_id_node,
12353 pretty_function_id_node, and func_id_node.
12354 * input.c (struct input_source): Constify 'str'.
12355 (feed_input): Constify first argument.
12356 * mangle.c (write_identifier): Constify argument.
12357 * pt.c (mangle_class_name_for_template): Constify argument.
12359 2000-08-29 Mark Mitchell <mark@codesourcery.com>
12361 * typeck.c (mark_addressable): Remove code that pokes around in
12364 2000-08-28 Jason Merrill <jason@redhat.com>
12366 * lex.c (file_name_nondirectory): Move to toplev.c.
12368 * cp-tree.h (LOCAL_CLASS_P): New macro.
12369 * class.c (finish_struct_1): Use it.
12371 2000-08-27 Alex Samuel <samuel@codesourcery.com>
12373 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
12374 (write_encoding): Pass another argument to write_name.
12375 (write_name): Add ignore_local_scope parameter. Fix handling of
12377 (write_nested_name): Use write_unqualified_name.
12378 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
12379 (write_template_prefix): Use write_unqualified_name.
12380 (write_component): Remove.
12381 (write_local_name): Add parameter. Use direct local entity to
12382 discriminator calculation.
12383 (write_class_enum_type): Pass another argument to write_name.
12384 (write_template_template_arg): Likewise.
12385 (make_guard_variable): Likewise.
12387 2000-08-27 Jason Merrill <jason@redhat.com>
12389 * decl.c (pushdecl): Matching decls for local externs are found in
12390 the current level. Propagate linkage information from previous
12393 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
12395 * ir.texi (Expressions): Fix typo.
12397 2000-08-25 Greg McGary <greg@mcgary.org>
12399 * tree.c (init_tree): Use ARRAY_SIZE.
12401 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
12403 * error.c (cp_tree_printer): Rework.
12405 2000-08-25 Mark Mitchell <mark@codesourcery.com>
12407 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
12409 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
12410 (cp-demangle.o): Remove target.
12411 (dyn-string.o): Likewise.
12413 * decl.c (grokfndecl): Require that `main' return an `int'.
12414 * mangle.c (write_encoding): Don't mangle return types for
12415 conversion functions.
12417 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
12419 * error.c (tree_formatting_info): New data type.
12420 (tree_being_formatted): New macro.
12421 (tree_formatting_flags): Likewise.
12422 (put_whitespace): Likewise.
12423 (print_tree_identifier): Likewise.
12424 (print_identifier): Likewise.
12425 (cp_tree_printer, print_function_argument_list, print_declaration,
12426 print_expression, print_function_declaration,
12427 print_function_parameter, print_type, print_cv_qualifier): New
12429 (init_error): Initialize lang_printer.
12431 2000-08-24 Jason Merrill <jason@redhat.com>
12433 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
12434 adjustment necessary.
12436 2000-08-24 Greg McGary <greg@mcgary.org>
12438 * cp-tree.h (MAIN_NAME_P): Remove macro.
12440 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
12442 * error.c (print_instantiation_context): Don't forget to flush the
12445 2000-08-23 Jason Merrill <jason@redhat.com>
12447 * typeck.c (build_ptrmemfunc): Save the input pmf.
12449 * method.c (process_modifiers): Use same_type_p.
12451 2000-08-23 Mark Mitchell <mark@codesourcery.com>
12453 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
12454 * mangle.c (write_function_type): Change prototype.
12455 (write_encoding): Don't mangle return types for
12456 constructors or destructors.
12457 (write_type): Adjust call to write_function_type.
12458 * pt.c (instantiate_template): Instantiate alternate entry points
12459 when instantiating the main function.
12461 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
12463 * error.c (cp_print_error_function): Don't use embedded '\n' in
12466 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
12468 * decl.c (init_decl_processing): Remove bogus initialization.
12469 * error.c (lang_print_error_function): Restore here.
12470 (init_error): Initialize print_error_function.
12472 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12474 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
12476 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
12478 * Makefile.in (error.o): Depends on diagnostic.h
12480 * cp-tree.h (problematic_instantiation_changed,
12481 record_last_problematic_instantiation, current_instantiation,
12482 print_instantiation_context): Declare.
12483 (maybe_print_template_context): Remove.
12485 * decl.c (init_decl_processing): Set print_error_function to NULL.
12486 (lang_print_error_function): Remove, since we're using a new
12489 * error.c: #include diagnostic.h
12490 (function_category): New function.
12491 (cp_diagnostic_starter): Likewise.
12492 (cp_diagnostic_finalizer): Likewise.
12493 (cp_print_error_function): Likewise.
12494 (maybe_print_instantiation_context): Likewise.
12495 (print_instantiation_full_context): Likewise.
12496 (print_instantiation_partial_context): Likewise.
12497 (print_instantiation_context): Define.
12498 (init_error): Initialize diagnostic pager and finalizer.
12500 * pt.c (problematic_instantiation_changed): Define.
12501 (record_last_problematic_instantiation): Likewise.
12502 (current_instantiation): Likewise.
12503 (maybe_print_template_context): Remove.
12504 (print_template_context): Likewise.
12505 (current_tinst_level): Make static to reflect Brendan Kehoe's
12506 change of 1995-04-13.
12507 (push_tinst_level): Call print_instantiation_context.
12509 2000-08-21 Nix <nix@esperi.demon.co.uk>
12511 * lang-specs.h: Do not process -o or run the assembler if
12514 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
12516 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
12518 * decl2.c (lang_decode_option): Disable gettext attributes for
12521 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
12523 * lex.c (lang_init_options): Default diagnostic message maximum
12524 length to 80, when line-wrapping.
12526 2000-08-20 Mark Mitchell <mark@codesourcery.com>
12528 * class.c (build_vtbl_initializer): Clear the entire
12529 vtbl_init_data. Start keeping track of the functions for which we
12530 have created vcall offsets here.
12531 (dfs_build_vcall_offset_vtbl_entries): Remove.
12532 (build_vcall_offset_vtbl_entries): Reimplement.
12533 (add_vcall_offset_vtbl_entries_r): New function.
12534 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
12535 computing when vcall offsets are necessary.
12537 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
12539 * decl.c (member_function_or_else): Use cp_error ... %T.
12540 (grokdeclarator): Likewise.
12541 (start_method): Likewise.
12542 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
12544 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
12546 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
12549 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
12551 * cp-tree.h (PTRMEM_OK_P): New macro.
12552 (itf_ptrmem_ok): New enumeration value.
12553 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
12554 argument. Diagnose implicit pointer to member.
12555 (instantiate_type): Don't diagnose implicit pointer to member
12556 here. Pass itf_ptrmem_ok if ok. Adjust calls to
12557 resolve_address_of_overloaded_function.
12558 * init.c (build_offset_ref): Set PTRMEM_OK_P.
12559 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
12560 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
12561 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
12562 (build_unary_op): Deal with single non-static member in
12565 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
12567 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
12569 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
12571 * cp-tree.h (enum_name_string): Remove prototype.
12572 (report_case_error): Remove prototype.
12573 * cp/typeck2.c (enum_name_string): Remove.
12574 (report_case_error): Remove.
12575 * error.c (dump_expr): Deal with enum values directly.
12576 Correctly negate integer constant.
12578 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
12580 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
12581 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
12582 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
12583 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
12584 (__cxa_vec_new): Use __cxa_vec_new2.
12585 (__cxa_vec_delete): Use __cxa_vec_delete2.
12587 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
12589 * vec.cc (__cxa_vec_new): Set "C" linkage.
12590 (__cxa_vec_ctor): Likewise.
12591 (__cxa_vec_cctor): Likewise.
12592 (__cxa_vec_dtor): Likewise.
12593 (__cxa_vec_delete): Likewise.
12594 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
12595 (__cxa_vec_ctor): Likewise.
12596 (__cxa_vec_cctor): Likewise.
12597 (__cxa_vec_dtor): Likewise.
12598 (__cxa_vec_delete): Likewise.
12600 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
12602 * class.c (instantiate_type): Reinstate local variable
12603 deleted in previous change.
12605 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
12608 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
12610 * cp-tree.h (instantiate_type_flags): New enumeration.
12611 (instantiate_type): Change parameter.
12612 * class.c (instantiate_type): Adjust prototype. Adjust.
12613 * call.c (standard_conversion): Adjust instantiate_type call.
12614 (reference_binding): Likewise.
12615 (build_op_delete_call): Likewise.
12616 (convert_like_real): Likewise.
12617 * cvt.c (cp_convert_to_pointer): Likewise.
12618 (convert_to_reference): Likewise.
12619 * pt.c (convert_nontype_argument): Likewise.
12620 * typeck.c (build_binary_op): Likewise.
12621 (build_ptrmemfunc): Likewise.
12622 (convert_for_assignment): Likewise.
12624 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
12626 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
12627 (current_aggr): Define.
12628 * decl.c (grokdeclarator): Make sure a friend class is an
12629 elaborated type specifier.
12630 * parse.y (current_aggr): Remove static definition.
12631 (cp_parse_init): Adjust.
12632 (structsp): Clear and restore current_aggr.
12633 (component_decl_list): Clear current_aggr.
12635 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
12636 aggregate tag on the typename's context.
12638 * pt.c (tsubst_friend_class): Return error_mark_node, if
12639 parms becomes NULL.
12640 (instantiate_class_template): Ignore error_mark_node friend types.
12642 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
12644 * cvt.c (warn_ref_binding): New static function, broken out of ...
12645 (convert_to_reference): ... here. Use it.
12647 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
12649 * parse.y (template_arg): Add rule for template qualified with
12652 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12654 * decl2.c (add_function): Reorganize.
12655 (arg_assoc): Do not consider function template decls.
12657 2000-08-11 Jason Merrill <jason@redhat.com>
12659 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
12662 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
12664 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
12665 (lookup_nested_tag): Likewise.
12667 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
12670 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
12672 * parse.y (named_complex_class_head_sans_basetype): Remove
12675 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
12677 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
12678 explicit TEMPLATE_ID_EXPR args.
12679 (build_expr_from_tree, case CALL_EXPR): Likewise.
12681 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
12683 * decl.c (check_tag_decl): Diagnose typename's which don't
12686 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
12688 * init.c (build_aggr_init): Reject bogus array initializers
12691 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
12693 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
12695 * cp/tinfo.cc (__dynamic_cast): Likewise.
12696 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
12698 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
12700 * cvt.c (convert_to_pointer_force): Fix error message when
12701 attempting to cast from ambiguous base.
12703 2000-08-08 Jason Merrill <jason@redhat.com>
12705 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
12706 (tsubst_template_arg_vector): Likewise.
12708 * decl2.c (build_anon_union_vars): Choose the largest field; don't
12709 assume that one will be as large as the union.
12711 2000-08-07 Kazu Hirata <kazu@hxi.com>
12713 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
12714 * decl.c (pop_labels): Likewise.
12716 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
12718 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
12720 (__pointer_to_member_type_info): Likewise.
12721 (__base_class_info): Likewise.
12722 (__class_type_info): Likewise.
12723 (__si_class_type_info): Likewise.
12724 (__vmi_class_type_info): Likewise.
12725 * tinfo.cc (__si_class_type_info::__do_find_public_src):
12726 Changed member names to match specifications.
12727 (__vmi_class_type_info::__do_find_public_src): Likewise.
12728 (__si_class_type_info::__do_dyncast): Likewise.
12729 (__vmi_class_type_info::__do_dyncast): Likewise.
12730 (__si_class_type_info::__do_upcast): Likewise.
12731 (__vmi_class_type_info::__do_upcast): Likewise.
12732 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
12733 (__pbase_type_info::__pointer_catch): Likewise.
12734 (__pointer_type_info::__pointer_catch): Likewise.
12735 (__pointer_to_member_type_info::__pointer_catch): Likewise.
12737 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
12739 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
12740 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
12741 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
12743 2000-08-04 Mark Mitchell <mark@codesourcery.com>
12745 * cp-tree.h (add_method): Change prototype.
12746 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
12747 Don't double the size of the method vector in the error case.
12748 (handle_using_decl): Adjust call to add_method.
12749 (add_implicitly_declared_members): Likewise.
12750 (clone_function_decl): Likewise.
12751 * decl2.c (check_classfn): Likewise.
12752 * semantics.c (finish_member_declaration): Likewise.
12754 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
12756 * decl.c (flag_isoc94): New variable.
12758 2000-08-02 Jason Merrill <jason@redhat.com>
12760 * pt.c (do_type_instantiation): Add complain parm; don't complain
12761 if called recursively.
12762 * cp-tree.h, parse.y: Adjust.
12764 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
12766 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
12767 -Wno-strict-prototypes.
12769 * g++spec.c: Adjust type of second argument to
12770 lang_specific_driver, and update code as necessary.
12772 * cp-tree.h: Don't prototype min_precision here.
12773 (my_friendly_assert): Cast expression to void.
12774 * semantics.c (do_poplevel): Initialize scope_stmts.
12776 2000-08-02 Mark Mitchell <mark@codesourcery.com>
12778 * cp-tree.h (DECL_NEEDED_P): Tweak.
12780 2000-07-28 Jason Merrill <jason@redhat.com>
12782 * lang-specs.h: Use %i in rule for .ii files.
12784 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
12786 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
12788 2000-07-30 Mark Mitchell <mark@codesourcery.com>
12790 Allow indirect primary bases.
12791 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
12793 (CLASSTYPE_VFIELD_PARENT): Remove.
12794 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
12795 (BINFO_PRIMARY_BINFO): Remove.
12796 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
12797 (BINFO_VBASE_PRIMARY_P): Likewise.
12798 (BINFO_PRIMARY_BASE_OF): New macro.
12799 (BINFO_INDIRECT_PRIMARY_P): Likewise.
12800 (get_primary_binfo): New function.
12801 * decl.c (lang_mark_tree): Make lang_type::primary_base.
12802 * class.c (vcall_offset_data_s): Rename to ...
12803 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
12804 and add ctor_vtbl_p.
12805 (get_derived_offset): Use get_primary_binfo.
12806 (dfs_mark_primary_bases): Adjust handling of virtual primary
12808 (mark_primary_bases): Likewise.
12809 (set_primary_base): Take a binfo, not an integer, as a
12810 representation of the primary base.
12811 (indirect_primary_base_p): Remove.
12812 (determine_primary_base): Adjust for indirect primary bases.
12813 (dfs_find_final_overrider): Fix typo in coment.
12814 (update_vtable_entry_for_fn): Use get_primary_binfo.
12815 (layout_nonempty_base_or_field): Tweak.
12816 (build_base_fields): Adjust for new primary base semantics.
12817 (dfs_propagate_binfo_offsets): Remove.
12818 (propagate_binfo_offsets): Rewrite.
12819 (dfs_set_offset_for_shared_vbases): Remove.
12820 (layout_virtual_bases): Don't use it.
12821 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
12823 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
12824 CLASSTYPE_VFIELD_PARENT.
12825 (dfs_get_primary_binfo): New function.
12826 (get_primary_binfo): Likewise.
12827 (dump_class_hierarchy_r): Tweak printing of primary bases.
12828 (build_vtbl_initializer): Fix typo in comments. Use
12830 (build_vcall_and_vbase_vtbl_entries): Likewise.
12831 (build_vbaes_offset_vtbl_entries): Likewise.
12832 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
12833 BV_VCALL_INDEX to handle indirect primary bases.
12834 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
12835 (build_rtti_vtbl_entries): Likewise.
12836 * search.c (get_shared_vbase_if_not_primary): Tweak.
12837 (find_vbase_instance): Likewise.
12838 (binfo_for_vtable): Simplify.
12839 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
12840 (make_binfo): Make it have 11 entries.
12842 2000-07-30 Alex Samuel <samuel@codesourcery.com>
12844 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
12845 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
12846 ascertaining primaryness.
12847 (G): Remove template_args.
12848 (decl_is_template_id): New function.
12849 (write_encoding): Use decl_is_template_id.
12850 (write_name): Likewise. Handle type_decls. Get main variant of
12852 (write_nested_name): Likewise.
12853 (write_prefix): Likewise.
12854 (write_template_prefix): Likewise.
12855 (write_special_name_constructor): Remove defunct production from
12857 (write_bare_function_type): Remove comment about absent parameter.
12858 (write_template_template_arg): Add missing grammar production to
12861 2000-07-27 Jason Merrill <jason@redhat.com>
12863 * decl.c (duplicate_decls): If common_type produces a non-typedef
12864 type for a typedef, just use the old type.
12866 2000-07-27 Mark Mitchell <mark@codesourcery.com>
12868 * cp-tree.h (function_depth): Declare.
12869 (verify_stmt_tree): Likewise.
12870 (find_tree): Likewise.
12871 * decl.c (function_depth): Give it external linkage.
12872 * optimize.c (optimize_function): Increment and decrement it.
12873 * tree.c (verify_stmt_tree_r): New function.
12874 (verify_stmt_tree): Likewise.
12875 (find_tree_r): Likewise.
12876 (find_tree): Likewise.
12878 2000-07-27 Jason Merrill <jason@redhat.com>
12880 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
12882 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
12884 2000-07-26 Mark Mitchell <mark@codesourcery.com>
12886 * decl.c (start_cleanup_fn): Mark the function as `inline'.
12887 * decl2.c (get_guard): Call cp_finish_decl, not
12888 rest_of_decl_compilation, for local guards.
12889 * lex.c (do_identifier): Remove unused variable.
12891 2000-07-26 Marc Espie <espie@cvs.openbsd.org>
12893 * parse.y: Add missing ';'.
12895 2000-07-26 Mark Mitchell <mark@codesourcery.com>
12897 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
12900 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
12902 Kill strict_prototype. Backwards compatibility only for
12903 non NO_IMPLICIT_EXTERN_C systems.
12904 * cp-tree.h (flag_strict_prototype): Remove.
12905 (strict_prototype): Remove.
12906 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
12907 * decl.c (maybe_push_to_top_level): Adjust.
12908 (pop_from_top_level): Adjust.
12909 (decls_match): Only allow sloppy parm matching for ancient
12911 (init_decl_processing): Adjust.
12912 (grokdeclarator): Adjust.
12913 * decl2.c (flag_strict_prototype): Remove.
12914 (strict_prototype): Remove.
12915 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
12916 (lang_f_options): Remove "strict-prototype".
12917 (unsupported-options): Add "strict-prototype".
12918 * lex.c (do_identifier): Adjust.
12919 (do_scoped_id): Adjust.
12920 * parse.y (empty_parms): Adjust.
12921 * class.c (push_lang_context): Adjust.
12922 (pop_lang_context): Adjust.
12923 * typeck.c (comp_target_parms): Adjust.
12925 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
12927 * decl.c (poplevel): Deal with anonymous variables at for scope.
12928 (maybe_inject_for_scope_var): Likewise.
12930 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
12932 * decl.c: Remove all signal handling code, now done in toplev.c.
12934 2000-07-23 Mark Mitchell <mark@codesourcery.com>
12936 * decl.c (make_rtl_for_nonlocal_decl): Rework.
12938 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
12941 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
12943 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
12944 Define my_friendly_assert and my_friendly_abort as macros
12945 which may call friendly_abort. Prototype friendly abort, not
12946 my_friendly_abort or my_friendly_assert.
12947 * decl.c (signal_catch): Report the signal caught in the error
12948 message. Call fatal directly.
12949 * typeck2.c (ack, my_friendly_assert): Delete.
12950 (my_friendly_abort): Rename to friendly_abort. Expect file,
12951 line, and function parameters. Report the abort code, then
12952 call fancy_abort. Do not mask an abort if errors have
12955 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
12957 * typeck.c (comp_target_parms): Remove obsolete parameter.
12958 (comp_target_types): Adjust.
12960 2000-07-17 Jason Merrill <jason@redhat.com>
12962 * typeck.c (mark_addressable): Never set TREE_USED.
12963 * call.c (build_call): Don't abort on calls to library functions
12964 that have been declared normally.
12966 * typeck.c (build_binary_op): Fix grammar in warning.
12968 * exception.cc (__eh_free): Fix prototype.
12970 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
12972 * decl.c (pushdecl): Handle seeing an OVERLOAD in
12973 IDENTIFIER_NAMESPACE_VALUE.
12975 2000-07-16 Mark Mitchell <mark@codesourcery.com>
12977 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
12978 * method.c (use_thunk): Correct handling of vcall offsets.
12980 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
12982 * .cvsignore: parse.h and parse.c have no cp- prefix.
12984 2000-07-13 Mark Mitchell <mark@codesourcery.com>
12986 * .cvsignore: New file.
12988 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
12990 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
12992 2000-07-12 Mark Mitchell <mark@codesourcery.com>
12994 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
12996 * parse.h: Likewise.
12998 2000-07-11 Mark Mitchell <mark@codesourcery.com>
13000 * class.c (layout_class_type): Add pointers to virtual bases after
13001 base classes under the old ABI.
13003 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
13005 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
13006 (finish_continue_stmt): Likewise.
13007 (begin_for_stmt): Remove call to note_level_for_for.
13008 (finish_goto_stmt): Change call from build_min_nt
13010 (finish_expr_stmt): Likewise.
13011 (begin_if_stmt): Likewise.
13012 (begin_while_stmt): Likewise.
13013 (finish_while_stmt): Likewise.
13014 (finish_return_stmt): Likewise.
13015 (begin_for_stmt): Likewise.
13016 (finish_for_stmt): Likewise.
13017 (finish_break_stmt): Likewise.
13018 (begin_switch_stmt): Likewise.
13019 (finish_case_label): Likewise.
13020 (genrtl_try_block): Likewise.
13021 (begin_try_block): Likewise.
13022 (begin_handler): Likewise.
13023 (begin_compound_stmt): Likewise.
13024 (finish_asm_stmt): Likewise.
13025 (finish_label_stmt): Likewise.
13026 (add_decl_stmt): Likewise.
13027 (finish_subobject): Likewise.
13028 (finish_decl_cleanup): Likewise.
13029 (finish_named_return_value): Likewise.
13030 (setup_vtbl_ptr): Likewise.
13031 (add_scope_stmt): Likewise.
13032 * decl.c (finish_constructor_body): Likewise.
13033 (finish_destructor_body): Likewise.
13034 * optimize.c (copy_body_r): Likewise.
13035 (initialize_inlined_parameters): Likewise.
13036 (declare_return_variable): Likewise.
13037 (expand_call_inline): Likewise.
13039 2000-07-10 Jakub Jelinek <jakub@redhat.com>
13041 * semantics.c (expand_body): Sync interface information
13042 at the end of function body expansion.
13044 2000-07-09 Jason Merrill <jason@redhat.com>
13046 * init.c (build_new_1): Bail early if the call to new fails.
13048 * decl.c (compute_array_index_type): Check specifically for
13049 an INTEGER_CST, not just TREE_CONSTANT.
13051 * decl.c (duplicate_decls): Don't call duplicate_decls on
13052 the DECL_TEMPLATE_RESULT.
13053 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
13056 * error.c (dump_template_bindings): Don't crash if we had an
13057 invalid argument list.
13059 * typeck.c (c_expand_start_case): Do narrowing here.
13060 * semantics.c (finish_switch_cond): Not here.
13062 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
13064 * parse.y (asm_clobbers): Do string concatenation.
13066 2000-07-09 Mark Mitchell <mark@codesourcery.com>
13068 * decl.c (pushtag): Don't put local classes in template functions
13069 on the local_classes list.
13071 2000-07-04 Scott Snyder <snyder@fnal.gov>
13073 * decl2.c (get_guard): Add missing return for old ABI local
13076 2000-07-09 Mark Mitchell <mark@codesourcery.com>
13078 * cp-tree.h (char_type_p): New function.
13079 * decl.c (init_decl_processing): Don't initialize
13080 signed_wchar_type_node or unsigned_wchar_type_node.
13081 (complete_array_type): Handle brace-enclosed string-constants.
13082 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
13083 * tree.c (char_type_p): New function.
13084 * typeck2.c (digest_init): Use char_type_p.
13086 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
13088 * pt.c (tsubst): Don't layout type, if it's error_mark.
13090 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
13092 * pt.c (instantiate_pending_templates): Reset template level.
13094 2000-07-05 Jason Merrill <jason@redhat.com>
13096 * call.c (joust): Don't complain about `operator char *()' beating
13097 `operator const char *() const'.
13099 2000-07-04 scott snyder <snyder@fnal.gov>
13100 Jason Merrill <jason@redhat.com>
13102 * repo.c (repo_get_id): Handle the case where a class with virtual
13103 bases has a null TYPE_BINFO_VTABLE.
13105 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
13106 Jason Merrill <jason@redhat.com>
13108 * parse.y (member_init): Just pass in the type.
13109 * init.c (expand_member_init): Handle getting a type.
13111 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
13112 Jason Merrill <jason@redhat.com>
13114 * decl.c (finish_function): Warn if a function has no return
13116 Suggested by Andrew Koenig.
13117 * typeck.c (check_return_expr): Do set current_function_returns_value
13118 if we got an error_mark_node.
13120 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
13122 * decl2.c (push_decl_namespace): Push the original namespace.
13124 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
13126 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
13127 * semantics.c (begin_class_definition): Clear it.
13129 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
13131 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
13132 (genrtl_expr_stmt): Likewise.
13133 (genrtl_decl_stmt): Likewise.
13134 (genrtl_if_stmt): Likewise.
13135 (genrtl_while_stmt): Likewise.
13136 (genrtl_do_stmt): Likewise.
13137 (genrtl_return_stmt): Likewise.
13138 (genrtl_for_stmt): Likewise.
13139 (genrtl_break_stmt): Likewise.
13140 (genrtl_continue_stmt): Likewise.
13141 (genrtl_scope_stmt): Likewise.
13142 (genrtl_switch_stmt): Likewise.
13143 (genrtl_case_label): Likewise.
13144 (genrtl_begin_compound_stmt): Likewise.
13145 (genrtl_finish_compound_stmt): Likewise.
13146 (genrtl_compound_stmt): Likewise.
13147 (genrtl_asm_stmt): Likewise.
13149 * init.c (begin_init_stmts): Remove call to
13150 genrtl_begin_compound_stmt.
13151 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
13153 * semantics.c (lang_expand_stmt): Changed call to
13154 genrtl_compound_stmt to ignore return value.
13156 2000-07-02 Mark Mitchell <mark@codesourcery.com>
13158 * mangle.c (canonicalize_for_substitution): Return the canonical
13161 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
13163 * typeck.c (commonparms): Remove obstack manipulations.
13165 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
13167 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
13169 * Makefile.in (OBJS): Added ../c-semantics.o.
13170 (OBJDEPS): Likewise.
13172 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
13174 (struct stmt_tree): Added comment.
13175 (current_function_name_declared): Removed.
13176 (stmts_are_full_exprs_p): Likewise.
13177 (genrtl_do_pushlevel): Likewise.
13178 (genrtl_clear_out_block): Likewise.
13179 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
13180 (DECL_ANON_UNION_ELEMS): Likewise.
13181 (emit_local_var): Likewise.
13182 (make_rtl_for_local_static): Likewise.
13183 (do_case): Likewise.
13184 (expand_stmt): Likewise.
13185 (genrtl_decl_cleanup): Likewise.
13186 (c_expand_asm_operands): Likewise.
13187 (c_expand_return): Likewise.
13188 (c_expand_start_case): Likewise.
13190 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
13191 (emit_local_var): Likewise.
13192 (initialize_local_var): Change reference to
13193 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
13194 Change reference to stmts_are_full_exprs_p to
13195 current_stmt_tree->stmts_are_full_exprs_p.
13196 (push_cp_function_context): Likewise.
13198 * expect.c (expand_throw): Change reference to
13199 stmts_are_full_exprs_p.
13201 * init.c (build_aggr_init): Change reference to
13202 stmts_are_full_exprs_p.
13203 (build_vec_init): Likewise.
13205 * optimize.c (maybe_clone_body): Change reference to
13206 current_function_name_declared to
13207 cp_function_chain->name_declared.
13209 * pt.c (instantiate_decl): Change reference to
13210 current_function_name_declared to
13211 cp_function_chain->name_declared.
13213 * semantics.c (expand_cond): Moved declaration to c-common.h.
13214 (genrtl_do_pushlevel): Moved to c-semantics.c.
13215 (genrtl_clear_out_block): Likewise.
13216 (genrtl_goto_stmt): Likewise.
13217 (genrtl_expr_stmt): Likewise.
13218 (genrtl_decl_stmt): Likewise.
13219 (gerntl_if_stmt): Likewise.
13220 (genrtl_while_stmt): Likewise.
13221 (genrtl_do_stmt): Likewise.
13222 (genrtl_return_stmt): Likewise.
13223 (genrtl_for_stmt): Likewise.
13224 (genrtl_break_stmt): Likewise.
13225 (genrtl_continue_stmt): Likewise.
13226 (genrtl_scope_stmt): Likewise.
13227 (genrtl_switch_stmt): Likewise.
13228 (genrtl_case_label): Likewise.
13229 (genrtl_begin_compound_stmt): Likewise.
13230 (genrtl_finish_compound_stmt): Likewise.
13231 (genrtl_compound_stmt): Likewise.
13232 (genrtl_asm_stmt): Likewise.
13233 (genrtl_decl_cleanup): Likewise.
13234 (expand_cond): Likewise.
13235 (expand_stmt): Renamed to ...
13236 (lang_expand_stmt): ... this.
13237 (lang_expand_expr_stmt): Initialize.
13238 (set_current_function_name_declared): Likewise.
13239 (stmts_are_full_exprs_p): Likewise.
13240 (current_function_name_declared): Likewise.
13241 (anon_aggr_type_p): Likewise.
13242 (do_poplevel): Change reference to
13243 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
13244 Change reference to stmts_are_full_exprs_p to
13245 current_stmt_tree->stmts_are_full_exprs_p.
13246 (add_tree): Likewise.
13247 (finish_expr_stmt): Likewise.
13248 (prep_stmt): Likewise.
13249 (lang_expand_stmt): Likewise.
13250 (begin_compound_stmt): Change reference to
13251 current_function_name_declared to
13252 cp_function_chain->name_declared and call to
13253 current_function_name_declared().
13254 (setup_vtbl_ptr): Likewise.
13255 (genrtl_do_poplevel): Removed.
13257 2000-06-30 Jason Merrill <jason@redhat.com>
13259 * init.c (init_init_processing): Go back to aligning like
13260 double_type_node for old ABI.
13261 (get_cookie_size): Make cookie larger if we get a type that needs
13263 (build_vec_delete): Call it.
13265 * typeck.c (qualify_type_recursive): New fn.
13266 (composite_pointer_type): Use it.
13267 (build_binary_op): Use composite_pointer_type.
13269 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
13270 Jason Merrill <jason@redhat.com>
13272 * typeck.c (check_return_expr): Don't complain about returning
13273 NULL from operator new if -fcheck-new.
13274 * cp-tree.h: Declare flag_check_new here.
13275 * init.c: Not here.
13277 2000-06-28 Alex Samuel <samuel@codesourcery.com>
13279 * mangle.c (find_substitution): Use same_type_p.
13280 (write_encoding): Don't check for substitutions.
13282 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
13284 * parse.y (expr_no_comma_rangle): New non-terminal.
13285 (template_parm): Use it for default parameter case.
13286 (template_arg): Use it.
13287 (expr_no_commas): Remove commented out undefined extensions.
13288 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
13289 * parse.h, parse.c: Rebuilt.
13291 2000-06-30 Mark Mitchell <mark@codesourcery.com>
13293 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
13294 (finish_asm_stmt): Do it here, instead.
13296 * cp-tree.h (ridpointers): Don't declare.
13297 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
13298 (record_builtin_java_type): Likewise.
13299 (init_decl_processing): Likewise.
13300 * lex.c: Move inclusion of lex.h.
13301 (ridpointers): Don't define.
13302 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
13304 * lex.h (enum rid): Rename to ...
13305 (enum cp_rid): ... this.
13306 (ridpointers): Don't declare.
13307 * parse.y: Move inclusion of lex.h.
13308 * parse.c: Regenerated.
13309 * spew.c: Move inclusion of lex.h.
13311 * cp-tree.h (struct language_function): Remove temp_name_counter.
13312 (temp_name_counter): Remove.
13313 (get_temp_name): Change prototype.
13314 (get_guard): New function.
13315 (get_guard_cond): Likewise.
13316 (set_guard): Likewise.
13317 * cvt.c (build_up_reference): Adjust call to get_temp_name.
13318 * decl.c (expand_static_init): Use get_guard and friends to
13319 implement guard variables.
13320 * decl2.c (get_temp_name): Assume that the variables created are
13322 (get_sentry): Rename to ...
13323 (get_guard): ... this. Implement new ABI guard variables.
13324 (get_guard_bits): New function.
13325 (get_guard_cond): Likewise.
13326 (set_guard): Likewise.
13327 (start_static_initialization_or_destruction): Use them.
13328 (do_static_initialization): Replace sentry with guard throughout.
13329 (do_static_destruction): Likewise.
13330 * init.c (create_temporary_var): Add comment.
13332 2000-06-28 Alex Samuel <samuel@codesourcery.com>
13334 * mangle.c (find_substitution): Use same_type_p.
13335 (write_encoding): Don't check for substitutions.
13337 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
13339 * parse.y (expr_no_comma_rangle): New non-terminal.
13340 (template_parm): Use it for default parameter case.
13341 (template_arg): Use it.
13342 (expr_no_commas): Remove commented out undefined extensions.
13343 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
13344 * parse.h, parse.c: Rebuilt.
13346 2000-06-29 Mark Mitchell <mark@codesourcery.com>
13348 * cp-tree.h (flag_const_strings): Remove.
13349 (warn_parentheses): Likewise.
13350 (warn_format): Likewise.
13351 (common_type): Likewise.
13352 (default_conversion): Likewise.
13353 (build_binary_op): Likewise.
13354 (cp_build_binary_op): New macro.
13355 * call.c (build_new_op): Use cp_build_binary_op instead of
13357 * class.c (build_vtable_entry_ref): Likewise.
13358 * decl.c (expand_static_init): Likewise.
13359 (compute_array_index_type): Likewise.
13360 (build_enumerator): Likewise.
13361 * decl2.c (delete_sanity): Likewise.
13362 (start_static_initialization_or_destruction): Likewise.
13363 * error.c (dump_type_suffix): Likewise.
13364 * init.c (resolve_offset_ref): Likewise.
13365 (build_new): Likewise.
13366 (build_new_1): Likewise.
13367 (build_vec_delete_1): Likewise.
13368 (build_vec_init): Likewise.
13369 (build_delete): Likewise.
13370 * rtti.c (synthesize_tinfo_fn): Likewise.
13371 (synthesize_tinfo_var): Likewise.
13372 * search.c (expand_upcast_fixups): Likewise.
13373 (fixup_all_virtual_upcast_offsets): Likewise.
13374 * typeck.c (build_array_ref): Likewise.
13375 (get_member_function_from_ptrfunc): Likewise.
13376 (build_binary_op): Add parameter.
13377 (pointer_int_sum): Use cp_build_binary_op.
13378 (pointer_diff): Likewise.
13379 (build_modify_expr): Likewise.
13380 (get_delta_difference): Likewise.
13381 (build_ptrmemfunc): Likewise.
13383 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
13385 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
13386 * decl.c (create_implicit_typedef): Adjust.
13387 * decl2.c (build_artificial_parm): Adjust.
13388 * method.c (implicitly_declare_fn): Adjust.
13389 * pt.c (push_inline_template_parms_recursive): Adjust.
13390 (process_template_parm): Adjust.
13391 (overloaded_template_name): Adjust.
13392 * semantics.c (finish_template_template_parm): Adjust.
13394 2000-06-28 Mark Mitchell <mark@codesourcery.com>
13396 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
13397 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
13398 where to emit thunks.
13399 (build_vtt): Adjust call to build_vtt_inits.
13400 (build_vtt_inits): Add parameter to indicate whether or not
13401 sub-VTTs for virtual bases should be included. Adjust handling of
13402 construction vtables.
13403 (get_matching_base): New function.
13404 (dfs_build_vtt_inits): Rename to ...
13405 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
13406 construction vtables.
13407 (dfs_fixup_binfo_vtbls): Likewise.
13408 (build_ctor_vtbl_groups): Build construction vtables for virtual
13410 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
13411 to build construction vtbls.
13412 (dfs_accumulate_vtbl_inits): Adjust handling of
13413 construction vtables.
13415 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
13418 2000-06-27 Mark Mitchell <mark@codesourcery.com>
13420 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
13422 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
13424 * search.c (hides): Remove.
13425 (is_subobject_of_p): Add most_derived parameter. Use
13427 (lookup_field_queue_p): Adjust.
13428 (lookup_field_r): Adjust.
13430 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
13432 * decl2.c (handle_class_head): Bash typedefs to the type's main
13435 2000-06-25 Mark Mitchell <mark@codesourcery.com>
13437 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
13438 (begin_global_stmt_expr): ... this.
13439 (genrtl_finish_stmt_expr): Rename to ...
13440 (finish_global_stmt_expr): ... this.
13441 * init.c (begin_init_stmts): Adjust calls.
13442 (finish_init_stmts): Likewise.
13443 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
13444 (begin_global_stmt_expr): ... this.
13445 (genrtl_finish_stmt_expr): Rename to ...
13446 (finish_global_stmt_expr): ... this.
13448 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13450 * search.c (lookup_member): Fix typo in comment.
13452 2000-06-24 Jason Merrill <jason@redhat.com>
13454 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
13455 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
13457 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
13459 * parse.y (complex_direct_notype_declarator): Support global_scope.
13460 * Makefile.in: Adjust conflict count.
13462 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13464 * parse.y (template_arg): Convert TEMPLATE_DECL
13465 that is a template template parameter to
13466 TEMPLATE_TEMPLATE_PARM here.
13468 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
13469 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
13470 (copy_template_template_parm): Adjust prototype.
13471 * decl.c (grokdeclarator): Remove dead code.
13472 * pt.c (process_template_parm): Tidy.
13473 (lookup_template_class): Construct nodes in
13474 copy_template_template_parm.
13475 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
13476 lookup_template_class. Use TYPE_TI_TEMPLATE.
13477 * tree.c (copy_template_template_parm): Add NEWARGS
13479 (mapcar): Adjust call to copy_template_template_parm.
13480 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
13481 * method.c (build_template_template_parm_names): Change error
13482 code to avoid compilation warning.
13484 * gxxint.texi: Document template template parameter
13487 2000-06-21 Alex Samuel <samuel@codesourcery.com>
13489 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
13490 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
13491 (cp-demangle.o): New rule.
13492 (dyn-string.o): Likewise.
13493 * inc/cxxabi.h (__cxa_demangle): New declaration.
13495 2000-06-22 Mark Mitchell <mark@codesourcery.com>
13497 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
13498 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
13499 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
13500 a tree, not an int.
13501 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
13502 (make_thunk): Change prototype.
13503 (emit_thunk): Rename to use_thunk.
13504 (mangle_thunk): Change prototype.
13505 * class.c (get_derived_offset): Simplify.
13506 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
13507 BV_GENERATE_THUNK_WITH_VTABLE_P.
13508 (build_primary_vtable): Simplify.
13509 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
13510 (dfs_find_base): Remove.
13511 (update_vtable_entry_for_fn): Correct bug in finding the base
13512 where a virtual function was first declared. Figure out whether
13513 or not to emit a vcall-thunk with the vtables in which it appears.
13514 Correct logic for deciding whether to use an ordinary thunk, or a
13516 (finish_struct_1): Remove unnecssary code.
13517 (build_vtbl_initializer): Use ssize_int for the running counter of
13519 (build_vtbl_initializer): Only use vcall thunks where necessary.
13520 Mark thunks as needing to be emitted with their vtables, or not.
13521 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
13522 indices. Use size_binop.
13523 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
13524 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
13526 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
13527 (build_vtable_entry): Mark thunks as needing to be emitted with
13528 their vtables, or not.
13529 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
13530 * decl2.c (mark_vtable_entries): Use use_thunk instead of
13532 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
13534 * error.c (dump_expr): Use BV_FN.
13535 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
13537 * method.c (make_thunk): Likewise.
13538 (emit_thunk): Rename to use_thunk. Allow callers to decide
13539 whether or not to actually emit the thunk. Adjust for changes in
13540 representation of vcall offsets.
13541 * search.c (dfs_get_pure_virtuals): Use BV_FN.
13542 * semantics.c (emit_associated_thunks): New function.
13543 (expand_body): Use it.
13544 * ir.texi: Adjust decriptions of thunks.
13546 2000-06-22 Jason Merrill <jason@redhat.com>
13548 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
13549 (tsubst_friend_function): Copy it here.
13551 * decl.c (grok_op_properties): Fix typo.
13553 * decl2.c (delete_sanity): Clarify warning, avoid failure on
13556 * pt.c (check_explicit_specialization): Clarify error.
13558 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
13559 an old OVERLOAD when we're declaring a non-function.
13560 (pushdecl, destroy_local_var): Check for error_mark_node.
13561 (warn_extern_redeclared_static): Also bail early if
13562 we're a CONST_DECL.
13563 (push_overloaded_decl): Ignore an old error_mark_node.
13565 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
13567 * call.c (build_x_va_arg): Check if in a template decl.
13568 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
13570 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13572 * class.c (push_lang_context): TYPE_NAME gets you to the Java
13574 * decl.c (check_goto): Computed gotos assumed OK.
13576 2000-06-20 Jason Merrill <jason@redhat.com>
13578 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
13579 for which we don't need to look for instantiations.
13581 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
13583 * parse.y (program): Always call finish_translation_unit.
13584 * parse.c, parse.h: Rebuilt.
13586 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
13588 * method.c: Don't include hard-reg-set.h.
13590 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
13592 * rtti.c (get_base_offset): Cope when vbase field is in a base.
13594 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
13596 * call.c (build_conditional_expr): Use VOID_TYPE_P.
13597 * cvt.c (cp_convert_to_pointer): Likewise.
13598 (convert_to_void): Likewise.
13599 * error.c (dump_expr): Likewise.
13600 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
13601 * init.c (build_delete): Likewise.
13602 * method.c (emit_thunk): Likewise.
13603 * optmize.c (declare_return_variable): Likewise.
13604 * rtti.c (get_tinfo_decl_dynamic): Likewise.
13605 (get_typeid): Likewise.
13606 (build_dynamic_cast_1): Likewise.
13607 * typeck.c (composite_pointer_type): Likewise.
13608 (common_type): Likewise.
13609 (build_indirect_ref): Likewise.
13610 (build_binary_op): Likewise.
13611 (build_x_compound_expr): Likewise.
13612 (check_return_expr): Likewise.
13613 * typeck2.c (add_exception_specifier): Likewise.
13615 * mangle.c (write_method_parms): Use direct comparison for end
13618 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
13620 * cp-tree.h (genrtl_try_block): Declare function.
13621 (genrtl_handler): Likewise.
13622 (genrtl_catch_block): Likewise.
13623 (genrtl_ctor_stmt): Likewise.
13624 (genrtl_subobject): Likewise.
13625 (genrtl_decl_cleanup): Likewise.
13626 (genrtl_do_poplevel): Likewise.
13627 (genrtl_do_pushlevel): Likewise.
13628 (genrtl_clear_out_block): Likewise.
13629 (genrtl_goto_stmt): Likewise.
13630 (genrtl_expr_stmt): Likewise.
13631 (genrtl_decl_stmt): Likewise.
13632 (genrtl_if_stmt): Likewise.
13633 (genrtl_while_stmt): Likewise.
13634 (genrtl_do_stmt): Likewise.
13635 (genrtl_return_stmt): Likewise.
13636 (genrtl_for_stmt): Likewise.
13637 (genrtl_break_stmt): Likewise.
13638 (genrtl_continue_stmt): Likewise.
13639 (genrtl_scope_stmt): Likewise.
13640 (genrtl_switch_stmt): Likewise.
13641 (genrtl_case_label): Likewise.
13642 (genrtl_begin_compound_stmt): Likewise.
13643 (genrtl_finish_compound_stmt): Likewise.
13644 (genrtl_compound_stmt): Likewise.
13645 (genrtl_asm_stmt): Likewise.
13646 (genrtl_named_return_value): Likewise.
13647 (genrtl_begin_stmt_expr): Likewise.
13648 (genrtl_finish_stmt_expr): Likewise.
13649 (finish_for_stmt): Removed first argument.
13650 (finish_switch_stmt): Likewise.
13652 * semantics.c (genrtl_try_block): Define function.
13653 (genrtl_handler): Likewise.
13654 (genrtl_catch_block): Likewise.
13655 (genrtl_ctor_stmt): Likewise.
13656 (genrtl_subobject): Likewise.
13657 (genrtl_decl_cleanup): Likewise.
13658 (genrtl_do_poplevel): Likewise.
13659 (genrtl_do_pushlevel): Likewise.
13660 (genrtl_clear_out_block): Likewise.
13661 (genrtl_goto_stmt): Likewise.
13662 (genrtl_expr_stmt): Likewise.
13663 (genrtl_decl_stmt): Likewise.
13664 (genrtl_if_stmt): Likewise.
13665 (genrtl_while_stmt): Likewise.
13666 (genrtl_do_stmt): Likewise.
13667 (genrtl_return_stmt): Likewise.
13668 (genrtl_for_stmt): Likewise.
13669 (genrtl_break_stmt): Likewise.
13670 (genrtl_continue_stmt): Likewise.
13671 (genrtl_scope_stmt): Likewise.
13672 (genrtl_switch_stmt): Likewise.
13673 (genrtl_case_label): Likewise.
13674 (genrtl_begin_compound_stmt): Likewise.
13675 (genrtl_finish_compound_stmt): Likewise.
13676 (genrtl_compound_stmt): Likewise.
13677 (genrtl_asm_stmt): Likewise.
13678 (genrtl_named_return_value): Likewise.
13679 (genrtl_begin_stmt_expr): Likewise.
13680 (genrtl_finish_stmt_expr): Likewise.
13681 (finish_for_stmt): Removed first argument and generate rtl
13683 (finish_switch_stmt): Likewise.
13684 (do_poplevel): Removed generate rtl specific code.
13685 (do_pushlevel): Likewise.
13686 (add_tree): Likewise.
13687 (finish_goto_stmt): Likewise.
13688 (finish_expr_stmt): Likewise.
13689 (begin_if_stmt): Likewise.
13690 (finish_if_stmt_cond): Likewise.
13691 (finish_then_clause): Likewise.
13692 (begin_else_clause): Likewise.
13693 (finish_else_clause): Likewise.
13694 (finish_if_stmt): Likewise.
13695 (clear_out_block): Likewise.
13696 (begin_while_stmt): Likewise.
13697 (finish_while_stmt_cond): Likewise.
13698 (finish_while_stmt): Likewise.
13699 (begin_do_stmt): Likewise.
13700 (finish_do_body): Likewise.
13701 (finish_do_stmt): Likewise.
13702 (finish_return_stmt): Likewise.
13703 (begin_for_stmt): Likewise.
13704 (finish_for_init_stmt): Likewise.
13705 (finish_for_cond): Likewise.
13706 (finish_for_expr): Likewise.
13707 (finish_break_stmt): Likewise.
13708 (finish_continue_stmt): Likewise.
13709 (begin_switch_stmt): Likewise.
13710 (finish_switch_cond): Likewise.
13711 (finish_case_label): Likewise.
13712 (begin_try_block): Likewise.
13713 (begin_function_try_block): Likewise.
13714 (finish_try_block): Likewise.
13715 (finish_cleanup_try_block): Likewise.
13716 (finish_cleanup): Likewise.
13717 (finish_function_try_block): Likewise.
13718 (finish_handler_sequence): Likewise.
13719 (finish_function_handler_sequence): Likewise.
13720 (begin_handler): Likewise.
13721 (finish_handler_parms): Likewise.
13722 (begin_catch_block): Likewise.
13723 (finish_handler): Likewise.
13724 (begin_compound_stmt): Likewise.
13725 (finish_compound_stmt): Likewise.
13726 (finish_asm_stmt): Likewise.
13727 (finish_label_stmt): Likewise.
13728 (finish_label_decl): Likewise.
13729 (finish_subobject): Likewise.
13730 (finish_decl_cleanup): Likewise.
13731 (finish_named_return_value): Likewise.
13732 (begin_stmt_expr): Likewise.
13733 (finish_stmt_expr): Likewise.
13735 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
13736 to call genrtl_expr_stmt when appropriate.
13738 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
13739 begin_compound_expr to call genrtl_begin_stmt_expr and
13740 genrtl_begin_compound_expr when appropriate.
13741 (finish_init_stmts): Changed calls to finish_compound_expr and
13742 finish_stmt_expr to call genrtl_finish_compound_expr and
13743 genrtl_finish_stmt_expr when appropriate.
13744 (expand_default_init): Changed call to finish_expr_stmt to call
13745 genrtl_expr_stmt when appropriate.
13746 (build_vec_init): Likewise.
13748 * parse.y (simple_stmt): Removed first argument from call to
13749 finish_for_stmt. Removed first argument from call to
13750 finish_switch_stmt.
13752 * parse.c: Regenerated.
13754 * pt.c (tsubst_expr): Removed first argument from call to
13755 finish_for_stmt. Removed first argument from call to
13756 finish_switch_stmt.
13758 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
13760 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
13761 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
13763 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
13764 (cplus_tree_code_length[]): Likewise.
13765 (cplus_tree_code_name[]): Likewise.
13766 (init_parse): Added call to add_c_tree_codes. Changed
13767 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
13769 2000-06-16 Mark Mitchell <mark@codesourcery.com>
13771 * cp-tree.h (finish_mem_initializers): Declare.
13772 (count_trees): Likewise.
13773 * parse.y (base_init): Use finish_mem_initializers.
13774 * semantics.c (finish_mem_initializers): New function.
13776 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
13777 the number of trees.
13779 (count_trees): Don't use it.
13781 2000-06-15 Jason Merrill <jason@redhat.com>
13783 * tree.c (count_trees): New debugging function.
13785 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
13786 * init.c (build_member_call): Pull out the name of a DECL.
13788 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
13789 * semantics.c (expand_body): Push to TV_INTEGRATION here.
13790 * optimize.c (optimize_function): Not here.
13791 * pt.c (instantiate_decl): Push to TV_PARSE.
13793 2000-06-15 Mark Mitchell <mark@codesourcery.com>
13795 * cp-tree.h (struct language_function): Remove x_base_init_list
13796 and x_member_init_list.
13797 (current_base_init_list): Remove.
13798 (current_member_init_list): Likewise.
13799 (setup_vtbl_ptr): Change prototype.
13800 (emit_base_init): Likewise.
13801 (expand_member_init): Likewise.
13802 (reinit_parse_for_function): Remove.
13803 * decl.c (save_function_data): Don't clear x_base_init_list and
13804 x_member_init_list.
13805 (mark_language_function): Don't mark them.
13806 * init.c (perform_member_init): Tweak comment.
13807 (sort_member_init): Take the list of initializers as an argument.
13808 (sort_base_init): Likewise.
13809 (emit_base_init): Likewise.
13810 (expand_member_init): Return the initializer. Don't use global
13812 * lex.c (reinit_parse_for_function): Remove.
13813 * method.c (build_template_parm_names): Correct substitution.
13814 (do_build_copy_constructor): Don't use current_member_init_list
13815 and current_base_init_list.
13816 (synthesize_method): Likewise.
13817 * parse.y (base_init): Split mem-initializers into
13818 base-initializers and field-initializers.
13819 (member_init_list): Build up the list here.
13820 (member_init): Return the initializer.
13821 (fn.depfn): Don't use reinit_parse_for_function.
13822 * parse.c: Regenerated.
13823 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
13825 (tsubst_expr): Don't use current_member_init_list
13826 and current_base_init_list.
13827 (tsubst_expr_values): Rename to ...
13828 (tsubst_initializer_list): ... this. Use convert_from_reference.
13829 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
13830 and current_base_init_list.
13831 (begin_function_definition): Don't call reinit_parse_for_function.
13833 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
13835 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
13838 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
13840 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
13842 * cp-tree.h (IF_COND): Move to c-common.h.
13843 (THEN_CLAUSE): Likewise.
13844 (ELSE_CLAUSE): Likewise.
13845 (WHILE_COND): Likewise.
13846 (WHILE_BODY): Likewise.
13847 (DO_COND): Likewise.
13848 (DO_BODY): Likewise.
13849 (RETURN_EXPR): Likewise.
13850 (EXPR_STMT_EXPR): Likewise.
13851 (FOR_INIT_STMT): Likewise.
13852 (FOR_COND): Likewise.
13853 (FOR_EXPR): Likewise.
13854 (FOR_BODY): Likewise.
13855 (SWITCH_COND): Likewise.
13856 (SWITCH_BODY): Likewise.
13857 (CASE_LOW): Likewise.
13858 (CASE_HIGH): Likewise.
13859 (GOTO_DESTINATION): Likewise.
13860 (COMPOUND_BODY): Likewise.
13861 (ASM_CV_QUAL): Likewise.
13862 (ASM_STRING): Likewise.
13863 (ASM_OUTPUTS): Likewise.
13864 (ASM_INPUTS): Likewise.
13865 (ASM_CLOBBERS): Likewise.
13866 (DECL_STMT_DECL): Likewise.
13867 (STMT_EXPR_STMT): Likewise.
13868 (LABEL_STMT_LABEL): Likewise.
13869 (SCOPE_BEGIN_P): Likewise.
13870 (SCOPE_END_P): Likewise.
13871 (SCOPE_STMT_BLOCK): Likewise.
13872 (SCOPE_NULLIFIED_P): Likewise.
13873 (SCOPE_NO_CLEANUPS_P): Likewise.
13874 (SCOPE_PARTIAL_P): Likewise.
13875 (ASM_VOLATILE_P): Likewise.
13876 (STMT_LINENO): Likewise.
13877 (STMT_LINENO_FOR_FN_P): Likewise.
13879 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
13880 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
13881 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
13882 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
13883 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
13885 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
13887 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
13888 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
13890 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
13891 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
13892 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
13894 2000-06-14 Mark Mitchell <mark@codesourcery.com>
13896 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
13897 * class.c (dfs_find_final_overrider): Set it appropriately.
13898 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
13899 avoid unneeded secondary vptrs.
13901 2000-06-13 Jakub Jelinek <jakub@redhat.com>
13903 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
13904 (check_bitfield_decl, check_field_decl): Likewise.
13905 (build_vtbl_or_vbase_field, build_base_field): Likewise.
13906 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
13907 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
13908 (xfer_tag, finish_enum): Likewise.
13909 * decl2.c (finish_builtin_type): Likewise.
13910 * init.c (init_init_processing): Likewise.
13911 * pt.c (instantiate_class_template): Likewise.
13912 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
13913 * cp-tree.h (struct lang_type): Add user_align member.
13914 (CLASSTYPE_USER_ALIGN): Define.
13916 2000-06-13 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
13918 * Make-lang.in (c++.install-common): Install g++-cross in
13919 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
13920 $(target_alias)-g++ and $(target_alias)-c++.
13922 2000-06-12 Mark Mitchell <mark@codesourcery.com>
13924 * class.c (vcall_offset_data_s): Add last_init and fns.
13925 (overrides): Rename to same_signature_p.
13926 (dfs_find_final_overrider): Adjust accordingly.
13927 (mark_overriders): Likewise.
13928 (warn_hidden): Likewise.
13929 (build_vtbl_initializer): Reorganize machinery for building things
13930 at negative offsets.
13931 (build_vcall_and_vbase_vtbl_entries): Likewise.
13932 (build_vbase_offset_vtbl_entries): Likewise.
13933 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
13934 offset entries. Do not create two entries for functions with the
13936 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
13937 (build_rtti_vtbl_entries): Reorganize machinery for building things
13938 at negative offsets.
13940 * optimize.c (expand_call_inline): Don't recurse into the code
13941 used to initialize the parameters more than once.
13943 2000-06-11 Mark Mitchell <mark@codesourcery.com>
13945 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
13946 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
13947 (find_substitution): Only use the `Sa' substitution for
13948 std::allocator, not instantiations of it.
13949 (write_template_prefix): Move comment. Only use a TREE_LIST to
13950 represent substitutions for a member template.
13951 (write_array_type): Mangle array dimensions correctly.
13952 * optimize.c (maybe_clone_body): Copy more information from the
13954 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
13955 on the regenerated declaration.
13957 2000-06-11 Chip Salzenberg <chip@valinux.com>
13958 Mark Mitchell <mark@codesourcery.com>
13960 * class.c (build_vtable): Clarify comment.
13961 (build_ctor_vtbl_group): Pass the most derived type to
13964 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13966 * decl2.c (compare_options): Don't needlessly cast away const-ness.
13968 2000-06-10 Mark Mitchell <mark@codesourcery.com>
13970 * decl.c (add_binding): Handle duplicate declarations of external
13973 2000-06-09 Chip Salzenberg <chip@valinux.com>
13974 Mark Mitchell <mark@codesourcery.com>
13976 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
13978 (write_signed_number): New macro.
13979 (write_unsigned_number): Likewise.
13980 (write_source_name): Use them.
13981 (write_number): Handle signed and unsigned values.
13982 (write_integer_cst): Use tree_int_cst_sgn, and use
13983 write_unsigned_number or write_signed_number as appropriate.
13984 (write_discriminator): Use write_unsigned_number or
13985 write_signed_number as appropriate.
13986 (write_template_arg_literal): Likewise.
13987 (write_array_type): Use tree_low_cst.
13988 (write_template_parm): Use write_unsigned_number or
13989 write_signed_number as appropriate.
13990 (write_substitution): Adjust call to write_number.
13991 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
13992 (write_expression): Handle non-type template arguments of
13993 reference type correctly.
13994 (mangle_thunk): Use write_signed_number.
13996 2000-06-09 Chip Salzenberg <chip@valinux.com>
13998 * mangle.c (find_substition): Don't mangle objects with typename
13999 substitutions (e.g. "cin" as "Si").
14001 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
14003 * call.c (add_candidate): Use ggc_alloc_cleared.
14004 * decl.c (lookup_label): Likewise.
14005 * lex.c (retrofit_lang_decl): Likewise.
14007 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
14009 * semantics.c (expand_body): Push to TV_EXPAND.
14010 * optimize.c (optimize_function): Push to TV_INTEGRATION.
14011 * decl.c (start_function): Always call announce_function.
14013 * tinfo2.cc: Just declare abort.
14015 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
14017 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
14018 whenever @ is a symbolic name.
14020 2000-06-08 Jakub Jelinek <jakub@redhat.com>
14022 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
14024 2000-06-07 Mark Mitchell <mark@codesourcery.com>
14026 * decl.c (pushdecl): Look up functions by DECL_NAME, not
14027 DECL_ASSEMBLER_NAME.
14029 2000-06-06 Mark Mitchell <mark@codesourcery.com>
14031 * decl2.c (c_language): Define.
14033 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
14035 * lex.c (lang_init_options): Tweak.
14037 * decl2.c: Remove #inclusion of diagnostic.h
14038 (lang_decode_option): Move diagnostic formatting options to
14041 * lang-options.h: Remove documentation for diagnostic options.
14043 * Makefile.in (lex.o): Depends upon diagnostic.h
14045 2000-06-06 Mark Mitchell <mark@codesourcery.com>
14047 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
14048 the same DECL_RESULT, it's not a redefinition.
14049 * pt.c (tsubst_decl): Remove code to handle illegal
14052 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
14054 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
14056 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
14058 * search.c (maybe_suppress_debug_info): Don't check
14059 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
14061 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
14064 Remember instantiation context in deferred instantiations.
14065 * cp-tree.h (struct tinst_level): Remove.
14066 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
14067 * pt.c (current_tinst_level): Now a tree.
14068 (print_template_context, push_tinst_level, pop_tinst_level,
14069 tinst_for_decl): Adjust.
14070 (reopen_tinst_level): New fn.
14071 (init_pt): Register current_tinst_level as a root.
14072 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
14073 of the pending templates list.
14074 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
14075 * lex.c (extract_interface_info): Adjust.
14076 * decl2.c (warn_if_unknown_interface): Adjust.
14078 2000-06-05 Mark Mitchell <mark@codesourcery.com>
14080 * class.c (indirect_primary_base_p): New function.
14081 (determine_primary_base): Use it.
14083 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
14085 Update new-abi dynamic cast algorithm.
14086 * tinfo.cc (__class_type_info::__dyncast_result): Add
14087 whole_details. Adjust constructor.
14088 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
14089 Avoid unnecessary searching.
14090 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
14092 2000-06-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14094 * decl.c (init_decl_processing): Don't call record_component_aliases.
14095 * tree.c (build_cplus_array_type_1): Likewise.
14097 2000-06-04 Mark Mitchell <mark@codesourcery.com>
14099 * ir.texi: Correct typo.
14100 * mangle.c (write_expression): Handle non-type template arguments
14101 with reference type.
14102 * method.c (build_overload_value): Likewise.
14103 * pt.c (convert_nontype_argument): Explicitly represent conversion
14104 to a reference with an ADDR_EXPR.
14105 (unify): Always unify arguments in left-to-right order.
14107 2000-06-03 Alex Samuel <samuel@codesourcery.com>
14108 Mark Mitchell <mark@codesourcery.com>
14110 * Make-lang.in (CXX_SRCS): Add mangle.c.
14111 * Makefile.in (CXX_OBJS): Add mangle.o.
14112 (mangle.o): New rule.
14114 * class.c (local_classes): New variable.
14115 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
14116 (get_vtt_name): Use mangle_vtt_name for new ABI.
14117 (init_class_processing): Initialize local_classes.
14118 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
14119 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
14120 (std_identifier): New macro.
14121 (DECL_VOLATILE_MEMFUNC_P): New macro.
14122 (DECL_NAMESPACE_STD_P): Likewise.
14123 (local_classes): Declare.
14124 (get_mostly_instantiated_function_type): Declare.
14125 (init_mangle): Declare.
14126 (mangle_decl): Likewise.
14127 (mangle_type_string): Likewise.
14128 (mangle_type): Likewise.
14129 (mangle_typeinfo_for_type): Likewise.
14130 (mangle_typeinfo_string_for_type): Likewise.
14131 (mangle_vtbl_for_type): Likewise.
14132 (mangle_vtt_for_type): Likewise.
14133 (mangle_ctor_vtbl_for_type): Likewise.
14134 (mangle_thunk): Likewise.
14135 (mangle_conv_op_name_for_type): Likewise.
14136 (mangle_guard_variable): Likewise.
14137 * decl.c (pushtag): Keep track of local classes.
14138 (initialize_predefined_identifiers): Initialize std_identifier.
14139 (init_decl_processing): Use std_identifier.
14140 (start_decl): Don't treat instantiations as specializations.
14141 (grokdeclarator): Likewise.
14142 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
14143 name for fully-instantiated templates.
14144 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
14145 destructors with the new ABI.
14146 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
14147 (grokfield): Use mangle_type for new ABI.
14148 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
14149 (get_sentry): Use mangle_guard_variable for new ABI.
14150 (start_static_initialization_or_destruction): Likewise.
14151 * expr.c (extract_aggr_init): Remove.
14152 (extract_scalar_init): Likewise.
14153 (extract_init): Remove #if 0'd code.
14154 * mangle.c: New function.
14155 * method.c (build_mangled_name): Assert not flag_new_abi.
14156 (build_static_name): Likewise.
14157 (build_decl_overload_real): Likewise.
14158 (build_typename_overload): Likewise.
14159 (build_overload_with_type): Likewise.
14160 (build_overload_name): Likewise.
14161 (get_ctor_vtbl_name): Likewise.
14162 (start_squangling): Likewise.
14163 (get_id_2): Likewise.
14164 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
14165 (init_method): Call init_mangle for new ABI.
14166 (make_thunk): Call mangle_thunk for new ABI.
14167 * operators.def: Correct new ABI manglings for the `%' operator.
14169 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
14170 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
14171 (lookup_template_class): Call mangle_decl for new ABI.
14172 (get_mostly_instantiated_function_type): New function.
14173 (set_mangled_name_for_template_decl): Use it.
14174 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
14175 the new ABI. Use mangle_conv_op_name_for_type for instantiated
14176 conversion op names.
14177 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
14178 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
14179 (tinfo_base_init): Likewise. Mangle typeinfo string name with
14180 mangle_typeinfo_string_for_type.
14182 2000-06-03 Mark Mitchell <mark@codesourcery.com>
14184 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
14185 (INNERMOST_TEMPLATE_ARGS): New macro.
14186 (innermost_args): Remove.
14187 (get_innermost_template_args): New function.
14188 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
14189 * error.c (dump_function_decl): Be caution when using
14190 most_general_template.
14191 * method.c (build_template_parm_names): Use
14192 INNERMOST_TEMPLATE_ARGS.
14193 * pt.c (add_to_template_args): Tidy comment
14194 (get_innermost_template_args): New function.
14195 (check_explicit_specialization): Clear DECL_INITIAL for a new
14197 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
14199 (push_template_decl): Always register specializations of the most
14201 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
14202 (coerce_template_parms): Likewise.
14203 (lookup_template_class): Likewise.
14204 (innermost_args): Remove.
14205 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
14206 (tsubst_decl): Handle tricky specializations. Use
14207 get_innermost_template_args.
14208 (instantiate_template): Simplify handling of partial
14210 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
14211 (most_general_template): Reimplement, in a more straightforward
14213 (regenerate_decl_from_template): Tweak formatting. Use
14214 TMPL_ARGS_DEPTH for clarity.
14215 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
14217 * dump.c (dequeue_and_dump): Dump information about thunks.
14219 2000-06-01 Richard Henderson <rth@cygnus.com>
14221 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
14223 2000-06-01 Richard Henderson <rth@cygnus.com>
14225 * decl2.c (unsupported_options): Fix typo, make const.
14226 (lang_decode_option): Fix bsearch argument order.
14228 2000-06-01 Mark Mitchell <mark@codesourcery.com>
14230 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
14233 2000-05-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14235 * cp-tree.h (c_get_alias_set): Deleted.
14236 * Makefile.in (decl.o): Include ../expr.h.
14237 * decl.c (expr.h): Include.
14238 (init_decl_processing): Call record_component_aliases for arrays.
14239 (grokdeclarator): Likewise.
14240 Set TREE_ADDRESSABLE for fields that aren't bitfields.
14241 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
14243 2000-05-31 Mark Mitchell <mark@codesourcery.com>
14245 Remove guiding declaration support.
14246 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
14247 (flag_guiding_decls): Remove.
14248 * call.c (build_user_type_conversion_1): Remove support for
14250 (build_new_function_call): Likewise.
14251 (build_new_op): Likewise.
14252 (build_new_method_call): Likewise.
14253 * decl.c (start_function): Likewise.
14254 * friend.c (is_friend): Likewise.
14255 (do_friend): Likewise.
14256 * decl2.c ((flag_dump_translation_unit): Make it const.
14257 (flag_guiding_decls): Remove.
14258 (unsupported_options): New variable
14259 (compare_options): New function.
14260 (lang_decode_option): Use them.
14262 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
14264 * method.c (mangle_expression): Adjust test for legal expression
14267 * pt.c (instantiate_decl): Save and restore the local
14268 specializations list.
14270 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
14272 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
14274 2000-05-30 Mark Mitchell <mark@codesourcery.com>
14276 * call.c (add_template_candidate_real): Handle member template
14277 constructors for classes with virtual bases.
14278 (build_user_type_conversion_1): Use in_charge_arg_for_name.
14279 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
14281 * ir.texi: Update thunk documentation.
14283 * call.c (joust): Fix handling of overloaded builtin operators.
14285 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
14287 * cp-tree.h (DECL_ANTICIPATED): New macro.
14288 Document new use of DECL_LANG_FLAG_7.
14289 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
14290 in the user namespace.
14291 * lex.c (do_identifier): If the identifier's declaration has
14292 DECL_ANTICIPATED on, it has not yet been declared. But do not
14293 replace it with an ordinary implicit declaration.
14295 * tinfo2.cc: Include stdlib.h.
14297 2000-05-29 Mark Mitchell <mark@codesourcery.com>
14299 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
14300 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
14303 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
14305 * decl2.c (lang_decode_option): Use skip_leading_substring instead
14308 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
14310 * operators.def (<?): Duplicated, should have been...
14313 2000-05-27 Alex Samuel <samuel@codesourcery.com>
14314 Mark Mitchell <mark@codesourcery.com>
14316 * cp-tree.h (ansi_opname): Make it a macro.
14317 (ansi_assopname): Likewise.
14318 (struct lang_decl_flags): Add assignment_operator_p.
14319 (struct lang_decl): Add operator_code.
14320 (DECL_VTT_PARM): Adjust.
14321 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
14322 overloaded operator.
14323 (SET_OVERLOADED_OPERATOR_CODE): New macro.
14324 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
14325 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
14326 (opname_tab): Remove.
14327 (assignop_tab): Likewise.
14328 (operator_name_info_t): New type.
14329 (operator_name_info): New variable.
14330 (assignment_operator_name_info): Likewise.
14331 (build_cp_library_fn): Remove declaration.
14332 (push_cp_library_fn): Likewise.
14333 (operator_name_string): Likewise.
14334 (build_decl_overload): Likewise.
14335 * call.c (print_z_candidates): Simplify.
14336 (build_object_call): Adjust usage of ansi_opname. Use
14337 DECL_OVERLOADED_OPERATOR_P.
14338 (op_error): Adjust operator name lookup.
14339 (build_conditional_expr): Adjust usage of ansi_opname.
14340 (build_new_op): Likewise.
14341 (build_op_delete_call): Likewise.
14342 (build_over_call): Likewise.
14343 (joust): Use DECL_OVERLOADED_OPERATOR_P.
14344 * decl.c (duplicate_decls): Copy operator_code.
14345 (init_decl_processing): Adjust parameters to push_cp_library_fn.
14346 (builtin_function): Adjust parameters to build_library_fn_1.
14347 (build_library_fn_1): Accept an overloaded operator code.
14348 (build_library_fn): Pass ERROR_MARK.
14349 (build_cp_library_fn): Accept an overloaded operator code.
14350 (push_cp_library_fn): Likewise.
14351 (grokfndecl): Tweak.
14352 (grokdeclarator): Simplify code to compute names of overloaded
14353 operators. Adjust use of ansi_opname.
14354 (ambi_op_p): Work on tree_codes, not identifiers.
14355 (unary_op_p): Likewise.
14356 (grok_op_properties): Likewise.
14357 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
14358 (lang_mark_tree): Don't try to mark the operator_code.
14359 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
14360 * error.c (dump_decl): Remove special handling for operator
14362 (dump_function_name): Likewise.
14363 (dump_expr): Adjust name lookup of operators.
14364 (op_to_string): Simplify.
14365 (assop_to_string): Likewise.
14366 * init.c (build_new_1): Adjust use of ansi_opname.
14367 * lex.c (opname_tab): Remove.
14368 (assignop_tab): Likewise.
14369 (ansi_opname): Likewise.
14370 (ansi_assopname): Likewise.
14371 (operator_name_string): Likewise.
14372 (reinit_lang_specific): Likewise.
14373 (operator_name_info): New variable.
14374 (assignment_operator_name_info): Likewise.
14375 (init_operators): New function.
14376 (init_parse): Use it.
14377 (do_identifier): Adjust use of ansi_opname.
14378 * method.c (mangle_expression): Don't use ansi_opname for
14380 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
14381 (build_decl_overload): Remove.
14382 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
14383 (do_build_assign_ref): Adjust use of ansi_opname.
14384 (synthesize_method): Likewise.
14385 (implicitly_declare_fn): Likewise.
14386 * operators.def: New file.
14387 * parse.y (operator): Adjust use of ansi_opname.
14388 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
14389 (set_mangled_name_for_template_decl): Don't play games with
14391 (special_function_p): Adjust use of ansi_opname.
14392 * typeck.c (check_return_expr): Likewise.
14393 * Make-lang.in (cc1plus): Depend on operators.def.
14394 * Makefile.in (lex.o): Likewise.
14395 (decl.o): Likewise.
14397 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
14399 * Make-lang.in (cplib2.ready): Eradicate.
14401 2000-05-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14403 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
14404 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
14405 (built_min, cp_tree_equal): Likewise.
14407 2000-05-26 Mark Mitchell <mark@codesourcery.com>
14409 * class.c (layout_nonempty_base_or_field): Replace
14410 `record_layout_info' with `record_layout_info_s'.
14412 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
14415 * cp-tree.h (struct language_function): x_named_labels is now
14416 a struct named_label_list*.
14417 * decl.c (struct named_label_use_list): Renamed from...
14418 (struct named_label_list): ...this. New struct.
14419 (push_binding_level): Don't set eh_region.
14420 (note_level_for_eh): New fn.
14421 (pop_label): Take label and old value directly.
14422 (pop_labels): Adjust for new named_labels format.
14423 (lookup_label): Likewise.
14424 (poplevel): Note characteristics of a binding level containing a
14425 named label. Mess with named label lists earlier.
14426 (mark_named_label_lists): New fn.
14427 (mark_lang_function): Call it.
14428 (use_label): New fn, split out from...
14429 (make_label_decl): ...here. Don't call it.
14430 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
14431 check_previous_gotos): New fns, split out from...
14432 (define_label): ...here.
14433 (check_switch_goto): New fn.
14434 (define_case_label): Call it.
14435 (check_goto): New fn.
14436 * semantics.c (finish_goto_stmt): Call it and use_label.
14437 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
14438 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
14440 2000-05-26 Mark Mitchell <mark@codesourcery.com>
14442 * class.c (build_vtable_entry_ref): Correct usage of
14443 get_vtbl_decl_for_binfo.
14445 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
14446 * method.c (implicitly_declare_fn): Not here.
14448 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
14450 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
14451 (CPTI_PTMD_DESC_TYPE): ... here.
14452 (ptmd_desc_type_node): Rename to ...
14453 (ptm_desc_type_node): ... here.
14454 * decl.c: Likewise.
14455 * rtti.c (ptmd_initializer): Rename to ...
14456 (ptm_initializer): ... here.
14457 (sythesize_tinfo_var): Adjust. Deal with pointer to member
14459 (create_tinfo_types): Adjust.
14461 2000-05-25 Mark Mitchell <mark@codesourcery.com>
14463 Finish implementation of VTTs.
14464 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
14465 CPTI_VTT_PARM_IDENTIFIER.
14466 (vtt_parm_identifier): New macro.
14467 (vtt_parm_type): Likewise.
14468 (BINFO_SUBVTT_INDEX): Likewise.
14469 (BINFO_VPTR_INDEX): Likewise.
14470 (struct lang_decl): Add vtt_parm.
14471 (DECL_VTT_PARM): New macro.
14472 (DECL_USE_VTT_PARM): Likewise.
14473 (DECL_NEEDS_VTT_PARM_P): Likewise.
14474 (get_vtt_name): Declare.
14475 (build_artificial_parm): Likewise.
14476 (fixup_all_virtual_upcast_offsets): Likewise.
14477 (expand_indirect_vtbls_init): Remove.
14478 * call.c (build_new_method_call): Pass the vtt to subobject
14479 constructors and destructors.
14480 * class.c (get_vtt_name): Give it external linkage.
14481 (build_clone): Handle the magic VTT parameters for clones.
14482 (clone_function_decl): Fix typo in comment.
14483 (build_vtt): Keep track of the indices in the VTTs where various
14484 entities are stored.
14485 (build_vtt_inits): Likewise.
14486 (dfs_build_vtt_inits): Likewise.
14487 (build_ctor_vtbl_group): Tweak type of construction vtables.
14488 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
14489 primary bases, when building construction vtables.
14490 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
14491 (initialize_predefined_identifiers): Add vtt_parm_identifier.
14492 (init_decl_processing): Initialize vtt_parm_type.
14493 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
14494 (lang_mark_tree): Make vtt_parm.
14495 * decl2.c (build_artificial_parm): New function.
14496 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
14497 (grokclassfn): Use build_artificial_parm.
14498 * init.c (initialize_vtbl_ptrs): Call
14499 fixup_all_virtual_upcast_offsets directly.
14500 (perform_member_init): Use the complete subobject destructor for
14502 (build_vtbl_address): New function.
14503 (expand_virtual_init): Handle VTTs.
14504 * optimize (maybe_clone_body): Likewise.
14505 * search.c (fixup_all_virtual_upcast_offsets): Give it external
14507 (expand_indirect_vtbls_init): Remove.
14508 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
14509 * tree.c (make_binfo): Make them bigger.
14511 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
14513 * inc/cxxabi.h (__pbase_type_info): Define, based on
14514 __pointer_type_info.
14515 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
14516 (__pointer_to_member_type_info): Likewise.
14517 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
14518 (__pointer_to_member_type_info::__is_pointer_p): Remove.
14519 (__pointer_type_info::__do_catch): Rename to ...
14520 (__pbase_type_info::__do_catch): ... here. Adjust.
14521 (__pbase_type_info::__pointer_catch): Implement.
14522 (__pointer_type_info::__pointer_catch): Adjust.
14523 (__pointer_to_member_type_info::__pointer_catch): Adjust.
14525 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
14527 * tinfo.h (__user_type_info::contained_virtual_p): New
14529 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
14531 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
14532 diamond shaped hierarchy. Add early out for mixed diamond and
14533 duplicate shaped hierarchy.
14535 2000-05-24 Mark Mitchell <mark@codesourcery.com>
14537 * cp-tree.h (build_delete): Change prototype.
14538 (build_vec_delete): Likewise.
14539 * call.c (build_scoped_method_call): Use special_function_kind
14540 values to indicate the kind of destruction to be done.
14541 (build_method_call): Likewise.
14542 * decl.c (finish_destructor_body): Likewise.
14543 (maybe_build_cleanup_1): Likewise. Rename to ...
14544 (maybe_build_cleanup): ... this.
14545 * decl2.c (delete_sanity): Use special_function_kind
14546 values to indicate the kind of destruction to be done.
14547 (build_cleanup): Likewise.
14548 * init.c (perform_member_init): Likewise.
14549 (build_vec_delete_1): Likewise.
14550 (build_dtor_call): Simplify.
14551 (build_delete): Use special_function_kind
14552 values to indicate the kind of destruction to be done.
14553 (build_vbase_delete): Likewise.
14554 (build_vec_delete): Likewise.
14556 * init.c (sort_member_init): Fix typo in error message generation
14559 2000-05-15 Donald Lindsay <dlindsay@cygnus.com>
14561 * semantics.c (begin_class_definition): make the packed
14562 attribute be sensitive to the "-fpack-struct" command line flag
14564 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
14566 Update new-abi upcast algorithm.
14567 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
14568 prototype and meaning of return value.
14569 (__si_class_type_info::__do_upcast): Likewise.
14570 (__vmi_class_type_info::__do_upcast): Likewise.
14571 * tinfo.cc (__class_type_info::__upcast_result): Replace
14572 whole2dst with part2dst. Adjust ctor.
14573 (__class_type_info::__do_upcast): Adjust call of worker function.
14574 (__class_type_info::__do_upcast): Adjust.
14575 (__si_class_type_info::__do_upcast): Adjust. Use parent's
14577 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
14578 virtual base in diamond hierarchy bug.
14580 2000-05-23 Mark Mitchell <mark@codesourcery.com>
14582 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
14583 and bitfield to tinfo_fn_p.
14584 (DECL_TINFO_FN_P): Adjust.
14585 (SET_DECL_TINFO_FN_P): Likewise.
14586 (DECL_MUTABLE_P): Likewise.
14587 (DECL_C_BIT_FIELD): Likewise.
14588 (SET_DECL_C_BIT_FIELD): Likewise.
14589 (CLEAR_DECL_C_BIT_FIELD): Likewise.
14590 (DECL_UNINLINABLE): Likewise.
14591 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
14592 (handle_using_decl): Remove assertion.
14593 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
14594 to build FIELD_DECLs.
14595 (build_base_field): Likewise.
14596 (layout_class_type): Likewise.
14597 * decl.c (init_decl_processing): Likewise.
14598 (build_ptrmemfunc_type): Likewise.
14599 (grokdeclarator): Likewise.
14600 * decl2.c (grok_x_components): Likewise.
14601 * except.c (call_eh_info): Likewise.
14602 * init.c (init_init_processing): Likewise.
14603 * rtti.c (expand_class_desc): Likewise.
14604 (create_pseudo_type_info): Likewise.
14605 (get_vmi_pseudo_type_info): Likewise.
14606 (create_tinfo_types): Likewise.
14607 * ptree.c (print_lang_decl): Adjust.
14608 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
14609 before checking DECL_MUTABLE_P.
14611 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
14612 parameters for template functions.
14613 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
14614 destructors as well as constructors.
14616 2000-05-22 Mark Mitchell <mark@codesourcery.com>
14618 * class.c (build_ctor_vtbl_group): Set inits.
14619 * optimize.c (maybe_clone_body): Set DECL_INLINE and
14620 DECL_THIS_INLINE appropriately for clones.
14622 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
14623 (DECL_CONV_FN_P): Simplify.
14624 (DECL_OPERATOR): Remove.
14625 (language_to_string): Declare.
14626 * decl.c (duplicate_decls): Fix typo in comment.
14627 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
14628 (grok_op_properties): Use DECL_CONV_FN_P instead of
14629 IDENTIFIER_TYPENAME_P.
14630 * dump.c (dequeue_and_dump): Dump the language linkage of
14632 * error.c (language_to_string): Give it external linkage.
14633 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
14634 (implicitly_declare_fn): Set DECL_LANGUAGE.
14635 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
14636 IDENTIFIER_TYPENAME_P.
14637 (tsubst_decl): Likewise.
14638 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
14639 * semantics.c (finish_member_declaration): Don't mark members of
14640 classes declared in an extern "C" region as extern "C".
14642 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14644 * decl2.c (qualified_lookup_using_namespace): Look through
14647 * decl.c (push_using_decl): Return the old decl on namespace level.
14649 2000-05-21 Mark Mitchell <mark@codesourcery.com>
14651 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
14652 (VTT_NAME_PREFIX): New macro.
14653 (CTOR_VTBL_NAME_PREFIX): Likewise.
14654 (get_ctor_vtbl_name): New function.
14655 * class.c (get_vtable_name): Simplify.
14656 (get_vtt_name): New function.
14657 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
14658 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
14659 when a virtual base becomes primary.
14660 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
14662 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
14663 additional parameters.
14664 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
14665 (initialize_array): New function.
14666 (build_vtt): Likewise.
14667 (build_vtt_inits): Likewise.
14668 (dfs_build_vtt_inits): Likewise.
14669 (dfs_fixup_binfo_vtbls): Likewise.
14670 (build_ctor_vtbl_group): Likewise.
14671 (initialize_vtable): Use initialize_array.
14672 (accumulate_vtbl_inits): Reimplement to handle construction
14674 (dfs_accumulate_vtbl_inits): Likewise.
14675 (bulid_vtbl_initializer): Adjust parameter name.
14676 * method.c (build_typename_overload): Remove #if 0'd code.
14677 (get_ctor_vtbl_name): New function.
14678 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
14679 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
14681 * cp-tree.h (struct lang_type): Remove search_slot.
14682 (CLASSTYPE_SEARCH_SLOT): Remove.
14683 (emit_base_init): Change prototype.
14684 (initialize_vtbl_ptrs): Likewise.
14685 (expand_indirect_vtbls_init): Likewise.
14686 (clear_search_slots): Remove.
14687 * decl.c (lang_mark_tree): Don't mark search_slot.
14688 * init.c (initialize_vtbl_ptrs): Simplify.
14689 (emit_base_init): Likewise.
14690 * search.c (struct vbase_info): Document decl_ptr.
14691 (convert_pointer_to_single_level): Remove.
14692 (dfs_find_vbases): Remove.
14693 (dfs_init_base_pointers): Simplify.
14694 (dfs_clear_vbase_slots): Remove.
14695 (dfs_vtable_path_unmark): New function.
14696 (init_vbase_pointers): Simplify.
14697 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
14698 (expand_indirect_vtbls_init): Simplify. Don't call
14699 mark_all_temps_used.
14700 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
14701 initialize_vtbl_ptrs.
14703 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
14705 * except.c: Add static prototypes.
14707 2000-05-20 H.J. Lu <hjl@gnu.org>
14709 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
14711 2000-05-19 Mark Mitchell <mark@codesourcery.com>
14713 Don't create a separate copy of virtual bases for the
14714 CLASSTYPE_VBASECLASSES list.
14715 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
14716 (BINFO_FOR_VBASE): Remove.
14717 (CANONICAL_BINFO): Adjust.
14718 (binfo_for_vbase): New function.
14719 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
14720 instead of BINFO_FOR_VBASE.
14721 (build_vbase_pointer): Likewise.
14722 (build_secondary_vtable): Likewise.
14723 (dfs_mark_primary_bases): Likewise.
14724 (mark_primary_bases): Likewise.
14725 (layout_nonempty_base_or_field): Likewise.
14726 (dfs_set_offset_for_shared_vbases): Likewise.
14727 (dfs_set_offset_for_unshared_vbases): Likewise.
14728 (layout_virtual_bases): Likewise. Adjust for changes to the
14729 CLASSTYPE_VBASECLASSES list.
14730 (dump_class_hierarchy_r): Use binfo_for_vbase
14731 instead of BINFO_FOR_VBASE.
14732 (dump_class_hierarchy): Likewise.
14733 (finish_vtbls): Likewise.
14734 (build_vtbl_initializer): Adjust for changes to the
14735 CLASSTYPE_VBASECLASSES list.
14736 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
14737 * decl.c (finish_destructor_body): Adjust for changes to the
14738 CLASSTYPE_VBASECLASSES list.
14739 * init.c (sort_base_init): Use binfo_for_vbase.
14740 (construct_virtual_bases): Adjust for changes to the
14741 CLASSTYPE_VBASECLASSES list.
14742 (expand_member_init): Use binfo_for_vbase.
14743 (build_vbase_delete): Adjust for changes to the
14744 CLASSTYPE_VBASECLASSES list.
14745 * method.c (do_build_copy_constructor): Likewise.
14746 * rtti.c (get_base_offset): Use binfo_for_vbase.
14747 (expand_class_desc): Remove #if 0'd code.
14748 * search.c (struct vbase_info): Remove vbase_types.
14749 (get_base_distance): Use binfo_for_vbase.
14750 (lookup_field_queue_p): Use CANONICAL_BINFO.
14751 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
14752 (get_pure_virtuals): Adjust for changes to the
14753 CLASSTYPE_VBASECLASSES list.
14754 (dfs_find_vbases): Use binfo_for_vbase.
14755 (dfs_init_vbase_pointers): Likewise.
14756 (init_vbase_pointers): Don't initialize vi.vbase_types.
14757 (virtual_context): Use binfo_for_vbase.
14758 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
14759 CLASSTYPE_VBASECLASSES list.
14760 (expand_indirect_vtbls_init): Simplify.
14761 (dfs_get_vbase_types): Don't replicate virtual bases.
14762 (find_vbase_instance): Use binfo_for_vbase.
14763 (binfo_for_vbase): New function.
14764 * typeck.c (get_delta_difference): Use binfo_for_vbase.
14766 2000-05-17 Mark Mitchell <mark@codesourcery.com>
14768 * decl2.c (finish_anon_union): Generalize error messages to handle
14769 anonymous structures.
14770 * init.c (perform_member_init): Remove `name' parameter.
14771 (build_field_list): New function.
14772 (sort_member_init): Handle anonymous union initialization order
14773 correctly. Check for multiple initializations of the same union.
14774 (emit_base_init): Don't look up fields by name here.
14775 (expand_member_init): Record the result of name lookup for future
14777 * typeck.c (build_component_ref): Fix formatting.
14779 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
14781 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
14782 * typeck.c (build_x_compound_expr): Replace warn_unused with
14785 * decl2.c (lang_decode_option): Update -Wall unused flags by
14786 calling set_Wunused.
14788 2000-05-16 Mark Mitchell <mark@codesourcery.com>
14790 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
14791 * init.c (dfs_vtable_path_unmark): Remove.
14792 * search.c (marked_new_vtable_p): Likewise.
14793 (unmarked_new_vtable_p): Likewise.
14794 (dfs_search_slot_nonempty_p): Likewise.
14795 (dfs_mark): Likewise.
14796 (dfs_vtable_path_unmark): Likewise.
14797 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
14798 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
14799 (dfs_init_vbase_pointers): Remove special-case new ABI code.
14800 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
14801 (init_vbase_pointers): Simplify.
14802 (expand_indirect_vtbls_init): Likewise.
14804 * class.c (copy_virtuals): New function.
14805 (build_primary_table): Use it.
14806 (build_secondary_vtable): Likewise.
14807 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
14808 indicate that no vcall offset is required.
14809 (add_virtual_function): Likewise.
14810 (modify_all_vtables): Likewise.
14811 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
14812 (dfs_accumulate_vtbl_inits): Likewise.
14813 (build_vtbl_initializer): Make changes to handle construction
14815 (dfs_build_vcall_offset_vtbl_entries): Likewise.
14816 (build_rtti_vtbl_entries): Likewise.
14817 (build_vtable_entries): Handle a NULL vcall_index.
14819 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
14821 * decl2.c (lang_decode_option): Fix thinko.
14823 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
14825 * except.c (check_handlers): New fn.
14826 * cp-tree.h: Declare it.
14827 * semantics.c (finish_handler_sequence): Call it.
14828 (finish_function_handler_sequence): Likewise.
14829 (finish_handler_parms): Set TREE_TYPE on the handler.
14830 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
14831 * search.c (get_base_distance_recursive): If protect>1, ignore
14833 (get_base_distance): Don't reduce watch_access.
14835 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
14837 * lex.c: #include diagnostic.h.
14838 (lang_init_options): Set default prefixing rules.
14840 * lang-options.h: Add -fdiagnostics-show-location=.
14842 * decl2.c: #include diagnostic.h.
14843 (lang_decode_option): Handle -fdiagnostics-show-location=.
14845 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
14847 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
14848 * vec.cc: Revert my 2000-05-07 change.
14850 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
14852 * class.c (check_field_decls): Complain about non-static data
14853 members with same name as class in class with constructor.
14855 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
14857 * decl.c (grokdeclarator): Allow non-static data members with
14858 same name as class.
14860 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
14862 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
14863 and pending_inline.filename. Update prototypes.
14864 * decl.c (define_label): Constify filename parameter.
14865 * decl2.c (warn_if_unknown_interface): Constify local char *.
14866 * input.c Constify input_source.filename. Don't declare
14867 input_filename or lineno. Constify filename parameter to feed_input.
14868 * lex.c (init_parse): Constify parameter and return value.
14869 (cp_pragma_interface, cp_pragma_implementation): Constify
14871 (reinit_parse_for_method, reinit_parse_for_block,
14872 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
14873 Constify local char *.
14874 * pt.c: Don't declare lineno or input_filename.
14875 (print_template_context, tsubst_friend_function, tsubst_decl,
14876 tsubst, instantiate_decl): Constify local char *.
14877 * semantics.c (expand_body): Constify local char *.
14878 * tree.c (build_srcloc): Constify filename parameter.
14879 * typeck.c (c_expand_asm_operands): Constify filename
14882 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
14884 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
14885 offsetof expansion.
14887 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
14889 * inc/cxxabi.h: Fix typos in comment.
14890 (__base_class_info::__offset): Use a static_cast.
14892 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
14894 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
14895 of std::size_t and std::ptrdiff_t respectively.
14896 * tinfo.cc: Likewise.
14897 * vec.cc: Likewise.
14899 2000-05-06 Richard Henderson <rth@cygnus.com>
14901 * typeck.c (build_c_cast): Don't warn integer->pointer size
14902 mismatch for constants.
14904 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
14906 * rtti.c (ptmd_initializer): Set non-public, if class is
14909 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
14910 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
14911 __cxa_vec_delete): Likewise.
14912 * tinfo.cc (__dynamic_cast): Likewise.
14913 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
14914 __cxa_vec_delete): Likewise.
14916 2000-05-04 Mark Mitchell <mark@codesourcery.com>
14918 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
14919 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
14920 (lang_decl_flags): Add vcall_offset.
14921 (THUNK_VCALL_OFFSET): Use it.
14922 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
14923 * method.c (make_thunk): Create the lang_decl here, not in
14925 (emit_thunk): Make generic thunks into ordinary functions once
14926 they have been fed to expand_body.
14927 * semantics.c (expand_body): Set current_function_is_thunk here.
14929 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14931 * class.c (update_vtable_entry_for_fn): Prototype.
14933 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
14936 * search.c (dfs_build_inheritance_graph_order): Prototype.
14938 2000-05-04 Mark Mitchell <mark@codesourcery.com>
14940 * cp-tree.h (special_function_kind): Add various kinds of
14942 (special_function_p): New function.
14943 * class.c (overrides): Don't let one kind of destructor override
14945 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
14946 whether or not to instantiate a template.
14947 * tree.c (special_function_p): Define.
14949 2000-05-03 Mark Mitchell <mark@codesourcery.com>
14951 * cp-tree.def (THUNK_DECL): Remove.
14952 * cp-tree.h (DECL_THUNK_P): New macro.
14953 (DECL_NON_THUNK_FUNCTION_P): Likewise.
14954 (DECL_EXTERN_C_FUNCTION_P): Likewise.
14955 (SET_DECL_THUNK_P): Likewise.
14956 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
14957 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
14958 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
14959 * decl.c (decls_match): Use DECL_EXTERN_C_P.
14960 (duplicate_decls): Likewise.
14961 (pushdecl): Likewise. Adjust thunk handling.
14962 (grokfndecl): Use DECL_EXTERN_C_P.
14963 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
14964 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
14965 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
14966 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
14967 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
14968 DECL_NO_STATIC_CHAIN.
14969 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
14970 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
14971 * search.c (covariant_return_p): Remove THUNK_DECL handling.
14974 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
14976 * tree.c (walk_tree): Set lineno.
14978 2000-05-01 Mark Mitchell <mark@codesourcery.com>
14980 * exception.cc: Update license notice.
14981 * new.cc: Likewise.
14982 * new1.cc: Likewise.
14983 * new2.cc: Likewise.
14984 * tinfo.cc: Likewise.
14985 * tinfo2.cc: Likewise.
14986 * vec.cc: Likewise.
14987 * inc/cxxabi.h: Likewise.
14988 * inc/exception: Likewise.
14989 * inc/new: Likewise.
14990 * inc/new.h: Likewise.
14991 * inc/typeinfo: Likewise.
14993 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
14995 * tree.c (build_target_expr_with_type): If we already have a
14996 TARGET_EXPR, just return it.
14998 * optimize.c (initialize_inlined_parameters): Don't generate an
14999 EXPR_STMT if we can just use DECL_INITIAL.
15000 * decl.c (emit_local_var): Only make the initialization a
15001 full-expression if stmts_are_full_exprs_p.
15003 2000-05-01 Mark Mitchell <mark@codesourcery.com>
15005 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
15007 * call.c (standard_conversion): Use it.
15008 (direct_reference_binding): Likewise.
15009 (build_over_call): Likewise.
15010 (is_properly_derived_from): Likewise.
15011 (compare_ics): Likewise.
15012 * class.c (resolves_to_fixed_type_p): Likewise.
15013 * optimize.c (declare_return_variable): Likewise.
15014 * pt.c (is_specialization_of): Likewise.
15016 * typeck.c (comp_target_parms): Likeiwse.
15017 (build_static_cast): Likewise.
15018 (build_reinterpret_cast): Likewise.
15019 (build_const_cast): Likewise.
15020 (comp_ptr_ttypes_real): Likewise.
15021 (comp_ptr_ttypes_const): Likewise.
15022 * typeck2.c (process_init_constructor): Likewise.
15024 2000-04-30 Scott Snyder <snyder@fnal.gov>
15026 * decl.c (finish_destructor_body): Use the base destructor when
15027 destroying virtual bases.
15029 2000-04-30 Mark Mitchell <mark@codesourcery.com>
15031 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
15033 * optimize.c (struct inline_data): Add target_exprs field.
15034 (declare_return_variable): When a function returns an aggregate,
15035 use the variable declared in the TARGET_EXPR as the remapped
15037 (expand_call_inline): Update the pending target_exprs stack.
15038 (optimize_function): Initialize the stack.
15040 * decl2.c (finish_file): Fix typo in comment.
15042 * method.c (emit_thunk): Don't try to return a `void' value.
15044 * optimize.c (initialize_inlined_parameters): If the parameter is
15045 addressable, we need to make a new VAR_DECL, even if the
15046 initializer is constant.
15048 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
15050 * decl.c (grok_op_properties): Add an extra check of argtypes.
15052 2000-04-27 Mark Mitchell <mark@codesourcery.com>
15054 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
15056 (initialize_inlined_parameters): Try to avoid creating new
15059 2000-04-27 Alex Samuel <samuel@codesourcery.com>
15061 * lex.c (my_get_run_time): Remove.
15062 (init_filename_times): Use get_run_time instead of my_get_run_time.
15063 (check_newline): Likewise.
15064 (dump_time_statistics): Likewise.
15065 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
15066 of computing elapsed time explicitly.
15068 2000-04-26 Mark Mitchell <mark@codesourcery.com>
15070 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
15071 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
15072 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
15073 before calling decl_constant_value.
15074 * class.c (check_bitfield_decl): Likewise.
15075 * cvt.c (ocp_convert): Likewise.
15076 (convert): Likewise.
15077 * decl.c (compute_array_index_type): Likewise.
15078 (build_enumerator): Likewise.
15079 * decl2.c (check_cp_case_value): Likewise.
15080 * pt.c (convert_nontype_argument): Likewise.
15081 (tsubst): Likewise.
15082 * typeck.c (decay_conversion): Likewise.
15083 (build_compound_expr): Likewise.
15084 (build_reinterpret_cast): Likewise.
15085 (build_c_cast): Likewise.
15086 (convert_for_assignment): Likewise.
15088 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
15090 * decl.c (finish_function): Don't play games with DECL_INLINE.
15092 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
15094 * ir.texi: Correct typo.
15096 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
15098 * decl.c (grokdeclarator): Reject VLAs as members.
15100 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
15102 * call.c (standard_conversion): Accept conversion between
15105 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
15107 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
15109 * decl2.c (finish_file): Remove double setup for accounting
15112 2000-04-24 Robert Lipe <robertlipe@usa.net>
15114 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
15116 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
15118 * new.cc (set_new_handler): Needs to be in std::.
15120 2000-04-23 Mark Mitchell <mark@codesourcery.com>
15122 * cp-tree.h (lang_decl): Remove pretty_function_p.
15123 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
15124 language-specific node.
15125 * decl.c (cp_make_fname_decl): Use build_decl, not
15126 build_lang_decl, to build the variables.
15127 (grokvardecl): Don't call build_lang_decl for local variables in
15129 (grokdeclarator): Don't call build_lang_decl for local type
15130 declarations in templates.
15131 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
15132 zero'd memory, rather than calling memset.
15133 * pt.c: Include hashtab.h.
15134 (local_specializations): New variable.
15135 (retrieve_local_specialization): Use it.
15136 (register_local_specialization): Likewise.
15137 (tsubst_decl): Don't assume local variables have
15138 DECL_LANG_SPECIFIC.
15139 (instantiate_decl): Set up local_specializations.
15140 * Makefile.in (HTAB_H): New variable.
15142 2000-04-23 Richard Henderson <rth@cygnus.com>
15144 * typeck.c (c_expand_asm_operands): Restore the original
15145 contents of the output list.
15147 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
15149 * ir.texi: Document complex number representation.
15151 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
15153 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
15154 (target_incomplete_p): New function.
15155 (tinfo_base_init): Create comdat NTBS name variable.
15156 (ptr_initializer): Add non_public parameter. Calculate it.
15157 (ptmd_initializer): Likewise.
15158 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
15159 (create_real_tinfo_var): Add non_public parameter. Use it.
15160 Push proxy into global namespace.
15161 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
15163 * inc/typeinfo (type_info::before, type_info::operator==):
15164 Compare __name addresses.
15166 * tinfo2.cc: Remove new-abi builtins comment.
15168 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
15170 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
15172 * call.c (joust): Exit early if we get the same function, too.
15174 * decl2.c (key_method): Return NULL_TREE for template classes.
15175 (import_export_class): Don't need to check for template classes.
15177 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
15179 * lex.c: Remove references to cccp.c.
15181 2000-04-18 Mark Mitchell <mark@codesourcery.com>
15183 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
15184 volatile_memfunc. Add destructor_attr. Adjust dummy.
15185 (DECL_DESTRUCTOR_P): Use destructor_attr.
15186 (DECL_CONST_MEMFUNC_P): Reimplement.
15187 (DECL_VOLATILE_MEMFUNC_P): Remove.
15188 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
15189 (overrides): Use DECL_DESTRUCTOR_P.
15190 (check_for_override): Likewise.
15191 * decl.c (start_function): Likewise.
15192 * decl2.c (grokfclassfn): Likewise.
15193 (check_classfn): Likewise.
15194 (grok_function_init): Likewise.
15196 2000-04-17 Mark Mitchell <mark@codesourcery.com>
15198 * decl2.c (grokfield): Issue error on illegal data member
15201 2000-04-17 Mark P Mitchell <mark@codesourcery.com>
15203 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
15205 2000-04-16 Mark Mitchell <mark@codesourcery.com>
15207 * class.c (build_vtable_entry): Don't build thunks for type-info
15210 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
15212 * decl.c (decls_match): Allow a redeclaration of a builtin to
15213 specify args while the builtin did not.
15215 2000-04-15 Mark Mitchell <mark@codesourcery.com>
15217 * cp-tree.def (THUNK_DECL): Add to documentation.
15218 * cp-tree.h (flag_huge_objects): Declare.
15219 * class.c (modify_vtable_entry): Tidy.
15220 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
15221 Calculate delta appropriately for the new ABI.
15222 (dfs_modify_vtables): Use it.
15223 (modify_all_vtables): Fix thinko in code to add overriding copies
15224 of functions to primary vtables.
15225 (build_clone): Fix typo in comment.
15226 (clone_function_decl): Correct order of destructors in vtable.
15227 (build_vbase_offset_vtbl_entries): Adjust comment.
15228 (dfs_vcall_offset_queue_p): Remove.
15229 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
15230 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
15231 (build_vtable_entry): Correct check for pure virtual functions.
15232 Don't declare flag_huge_objects.
15233 * decl.c (flag_huge_objects): Remove declaration.
15234 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
15235 Use int_size_in_bytes.
15236 (emit_thunk): Handle vcall offset thunks.
15238 2000-04-15 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15240 * decl2.c (parse_time, varconst_time): Delete declarations.
15241 (finish_file): Delete LINENO declaration.
15242 START_TIME and THIS_TIME now long.
15244 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
15246 * class.c (build_base_field): Reformat comment.
15248 * inc/cxxabi.h (stddef.h): Comment inclusion.
15249 (__base_class_info::__offset): Comment shift.
15251 2000-04-12 Mark Mitchell <mark@codesourcery.com>
15253 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
15254 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
15255 (cp_push_exception_identifier): New macro.
15256 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
15257 (DECL_BASE_DESTRUCTOR_P): Likewise.
15258 (DECL_DELETING_DESTRUCTOR_P): Likewise.
15259 (get_vtbl_decl_for_binfo): Fix formatting.
15260 (in_charge_arg_for_name): New macro.
15261 (maybe_build_cleanup_and_delete): Remove declaration.
15262 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
15263 (in_charge_arg_for_name): New function.
15264 (build_new_method_call): Use it. Handle cloned destructors.
15265 (build_clone): Don't make the base constructor virtual.
15266 Automatically defer generated functions.
15267 (clone_function_decl): Handle destructors, too.
15268 (clone_constructors_and_destructors): Likewise.
15269 (create_vtable_ptr): Don't create a vtable entry for a cloned
15271 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
15272 (initialize_predefined_identifiers): Update appropriately.
15273 (finish_destructor_body): Simplify.
15274 (maybe_build_cleanup_and_delete): Remove.
15275 * except.c (expand_throw): Handle new-ABI destructors.
15276 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
15277 (build_dtor_call): New function.
15278 (build_delete): Use it. Simplify.
15279 * optimize.c (maybe_clone_body): Handle destructors.
15280 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
15282 * exception.cc (cleanup_fn): New typedef.
15283 (CALL_CLEANUP): New macro.
15284 (cp_eh_info): Use them.
15285 (__cp_push_exception): Likewise.
15286 (__cp_pop_exception): Likewise.
15288 2000-04-11 Mark Mitchell <mark@codesourcery.com>
15290 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
15291 (complete_dtor_identifier): New macro.
15292 (CLASSTYPE_FIRST_CONVERSION): Remove.
15293 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
15294 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
15295 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
15296 (CLASSTYPE_CONSTRUCTORS): Likewise.
15297 (CLASSTYPE_DESTRUCTORS): Likewise.
15298 (lang_decl): Add cloned_function.
15299 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
15300 (DECL_BASE_CONSTRUCTOR_P): Likewise.
15301 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
15302 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
15303 (DECL_CLONED_FUNCTION_P): Likewise.
15304 (DECL_CLONED_FUNCTION): Likewise.
15305 (clone_function_decl): Declare.
15306 (maybe_clone_body): Likewise.
15307 * call.c (build_user_type_conversion_1): Call complete object
15308 constructors in the new ABI.
15309 (build_new_method_call): Don't add in-charge parameters under the
15311 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
15312 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
15313 CLASSTYPE_DESTRUCTOR_SLOT.
15314 (build_clone): New function.
15315 (clone_function_decl): Likewise.
15316 (clone_constructors_and_destructors): Likewise.
15317 (check_bases_and_members): Use it.
15318 * decl.c (iniitialize_predefined_identifiers): Initialize
15319 complete_dtor_identifier.
15320 (finish_function): Don't add extra code to a clone.
15321 (lang_mark_tree): Mark cloned_function.
15322 * decl2.c (mark_used): Don't bother trying to instantiate things
15324 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
15325 * method.c (set_mangled_name_for_decl): Don't treat clones as
15327 (synthesize_method): Sythesize cloned functions, not the clones.
15328 * optimize.c (inline_data): Update comment on ret_label.
15329 (remap_block): Don't assume DECL_INITIAL exists.
15330 (copy_body_r): Allow ret_label to be NULL.
15331 (maybe_clone_body): Define.
15332 * pt.c (tsubst_decl): Handle clones.
15333 (instantiate_clone): New function.
15334 (instantiate_template): Use it.
15335 (set_mangled_name_for_template_decl): Don't treat clones as
15337 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
15338 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
15339 * semantics.c (expand_body): Clone function bodies as necessary.
15341 * optimize.c (remap_decl): Avoid sharing structure for arrays
15342 whose size is only known at run-time.
15343 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
15345 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
15346 to has_in_charge_parm_p.
15347 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
15348 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
15349 (DECL_COPY_CONSTRUCTOR_P): New macro.
15350 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
15351 (build_user_type_conversion_1): Likewise.
15352 (convert_like_real): Likewise.
15353 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
15354 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
15355 (copy_args_p): Likewise.
15356 (grok_ctor_properties): Likewise.
15357 (start_function): Likewise.
15358 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
15359 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
15360 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
15361 * method.c (do_build_copy_constructor): Use
15362 DECL_HAS_IN_CHARGE_PARM_P.
15363 (synthesize_method): Likewise.
15364 * pt.c (instantiate_template): Remove goto.
15365 * tree.c (build_cplus_method_type): Remove mention of obstacks in
15368 * cp-tre.h (finish_function): Change prototype.
15369 * decl.c (end_cleanup_fn): Adjust caller.
15370 (finish_function): Take only one parameter.
15371 * decl2.c (finish_objects): Adjust caller.
15372 (finish_static_storage_duration_function): Likewise.
15373 * method.c (emit_thunk): Likewise.
15374 * parse.y: Likewise.
15375 * parse.c: Regenerated.
15376 * pt.c (instantiate_decl): Likewise.
15377 * rtti.c (synthesize_tinfo_fn): Likewise.
15378 * semantics.c (expand_body): Likewise.
15380 * cp-tree.h (copy_decl): New function.
15381 * class.c (finish_struct_1): Use it.
15382 * lex.c (copy_decl): Define it.
15383 * pt.c (tsubst_decl): Likewise.
15384 * tree.c (copy_template_template_parm): Likewise.
15386 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
15387 has_nonpublic_assign_ref.
15388 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
15389 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
15390 * class.c (finish_struct_methods): Don't set
15391 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
15392 (interface_only): Don't declare.
15393 (interface_unknown): Likewise.
15395 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
15397 * tree.h (HAVE_TEMPLATES): Remove definition.
15398 * lang-options.h (-fthis-is-variable): Remove documentation.
15400 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
15402 * class.c (instantiate_type): Handle object-relative template-id.
15404 * semantics.c (finish_expr_stmt): Call convert_to_void here.
15405 * decl.c (cplus_expand_expr_stmt): Not here.
15407 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
15408 Initialize exprtype earlier.
15410 * parse.y (fn.def1): Check for defining types in return types.
15412 * decl.c (check_tag_decl): Notice extra fundamental types.
15413 Diagnose empty decls in classes, too.
15415 * decl.c (grokdeclarator): Don't override an anonymous name if no
15416 declarator was given.
15418 * cvt.c (convert_to_void): Call resolve_offset_ref.
15420 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
15422 * decl2.c (decl_namespace): Handle getting a type.
15424 * typeck.c (build_c_cast): Re-enable warning for cast between
15425 pointer and integer of different size.
15427 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
15429 * inc/cxxabi.h (__pointer_type_info): Add restrict and
15431 (__pointer_type_info::__pointer_catch): New virtual function.
15432 (__pointer_to_member_type_info): Derive from
15433 __pointer_type_info. Adjust.
15434 (__pointer_to_member_type_info::__do_catch): Remove.
15435 (__pointer_to_member_type_info::__is_pointer_p): Declare.
15436 (__pointer_to_member_type_info::__pointer_catch): Declare.
15437 * rtti.c (qualifier_flags): Add restrict flag.
15438 (ptmd_initializer): Reorder members.
15439 (create_tinfo_types): Expand comments. Reorder
15440 ptmd_desc_type_node members.
15441 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
15443 (__pointer_type_info::__do_catch): Move specific code into
15444 __pointer_catch. Call it.
15445 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
15446 specific catch checking. Fix void conversion check.
15447 (__pointer_to_member_type_info::__do_catch): Remove.
15448 (__pointer_to_member_type_info::__pointer_catch): Implement.
15450 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
15452 * lex.c (init_parse): Remove traces of classof and headof.
15453 * decl2.c (flag_operator_names): Default to 1.
15454 (lang_decode_option): Do not set it for -ansi.
15456 2000-04-09 Mark Mitchell <mark@codesourcery.com>
15458 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
15459 (DECL_MAIN_VARIANT): Remove.
15460 * decl.c (duplicate_decls): Don't set it.
15461 (start_function): Likewise.
15462 (lang_mark_tree): Don't mark it.
15463 * decl2.c (defer_fn): Don't use it.
15464 * lex.c (retrofit_lang_decl): Don't set it.
15465 * pt.c (tsubst_decl): Likewise.
15466 * ptree.c (print_lang_decl): Don't print it.
15467 * typeck.c (mark_addressable): Don't use it.
15469 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
15471 * vec.cc: Include <new> and <exception>.
15472 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
15473 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
15475 (__cxa_vec_delete): Catch dtor exceptions.
15477 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
15479 Prepend __ to implementation defined names.
15480 * inc/typeinfo (type_info): Rename _name to __name.
15481 (type_info::type_info): Rename parameter.
15482 (type_info::operator==, type_info::operator!=,
15483 type_info::before): Likewise.
15484 (type_info::is_pointer_p, type_info::is_function_p,
15485 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
15488 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
15489 (__pointer_type_info::__pointer_type_info): Likewise.
15490 (__pointer_type_info::is_pointer_p,
15491 __pointer_type_info::do_catch): Prepend __. Rename parameters.
15492 (__array_type_info::__array_type_info): Rename parameters.
15493 (__function_type_info::__function_type_info): Likewise.
15494 (__function_type_info::is_function_p): Prepend __.
15495 (__enum_type_info::__enum_type_info): Rename parameters.
15496 (__pointer_to_member_type_info::__pointer_to_member_type_info):
15498 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
15500 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
15501 (__class_type_info::__class_type_info): Rename parameters.
15502 (__class_type_info::sub_kind): Prepend __. Adjust member names.
15503 (__class_type_info::upcast_result,
15504 __class_type_info::dyncast_result): Prepend __. Move definition
15506 (__class_type_info::do_upcast, __class_type_info::do_catch,
15507 __class_type_info::find_public_src,
15508 __class_type_info::do_dyncast,
15509 __class_type_info::do_find_public_src): Prepend __. Rename
15511 (__si_class_type_info::__si_class_type_info): Rename parameters.
15512 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
15513 __si_class_type_info::do_find_public_src): Prepent __. Rename
15515 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
15516 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
15517 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
15519 (__dynamic_cast): Rename parameters.
15520 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
15521 type_info::do_catch, type_info::do_upcast): Prepend __.
15522 (contained_p, public_p, virtual_p, contained_public_p,
15523 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
15524 (__class_type_info::do_catch,
15525 __class_type_info::do_upcast): Prepend __. Adjust.
15526 (__class_type_info::__upcast_result,
15527 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
15529 (__class_type_info::find_public_src): Prepend __. Adjust.
15530 (__class_type_info::do_find_public_src,
15531 __si_class_type_info::do_find_public_src,
15532 __vmi_class_type_info::do_find_public_src): Likewise.
15533 (__class_type_info::do_dyncast,
15534 __si_class_type_info::do_dyncast,
15535 __vmi_class_type_info::do_dyncast): Likewise.
15536 (__class_type_info::do_upcast,
15537 __si_class_type_info::do_upcast,
15538 __vmi_class_type_info::do_upcast): Likewise.
15539 (__dynamic_cast): Adjust.
15540 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
15541 (__function_type_info::is_function_p): Likewise.
15542 (__pointer_type_info::do_catch): Likewise. Adjust.
15543 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
15544 (__throw_type_match_rtti_2): Adjust.
15545 (__is_pointer): Adjust.
15547 2000-04-08 Mark Mitchell <mark@codesourcery.com>
15549 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
15550 (complete_ctor_identifier): New macro.
15551 (special_function_kind): Add sfk_copy_constructor and
15552 sfk_assignment_operator.
15553 (LOOKUP_HAS_IN_CHARGE): Remove.
15554 (cons_up_default_function): Rename to ...
15555 (implicitly_declare_fn): ... this.
15556 * call.c (build_new_method_call): Add in-charge parameters for
15558 * class.c (add_implicitly_declared_members): Change parameter name
15559 from cant_have_assignment to cant_have_const_assignment.
15560 Replace calls to cons_up_default_function to implicitly_declare_fn.
15561 * cvt.c (ocp_convert): Use complete_ctor_identifier.
15562 * decl.c (initialize_predefined_identifiers): Initialize it.
15563 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
15564 complex expression.
15565 * init.c (expand_default_init): Don't calculate the in-charge
15567 (build_new_1): Likewise.
15568 * lex.c (cons_up_default_function): Move to method.c.
15569 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
15570 (implicitly_declare_fn): New function.
15571 * typeck.c (build_static_cast): Use complete_ctor_identifier.
15572 (build_modify_expr): Likewise.
15573 * typeck2.c (build_functional_cast): Likewise.
15575 Under the new ABI, constructors don't return `this'.
15576 * cp-tree.h (warn_reorder): Declare.
15577 (special_function_kind): New enum.
15578 (global_base_init_list): Remove declaration.
15579 (emit_base_init): Don't return a value.
15580 (check_base_init): Don't declare.
15581 (is_aggr_typedef): Likewise.
15582 * decl.c (check_special_function_return_type): New function.
15583 (return_types): Remove.
15584 (grokdeclarator): Use check_special_function_return_type.
15585 (start_function): Don't initialize ctor_label under the new ABI.
15586 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
15587 * init.c (begin_init_stmts): Move to top of file.
15588 (finish_init_stmts): Likewise.
15589 (warn_reorder): Don't declare.
15590 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
15592 (check_base_init): Remove.
15593 (is_aggr_typedef): Likewise.
15594 (build_new_1): Don't use the return value of a constructor.
15595 * semantics.c (setup_vtbl_ptr): Don't use the return value
15597 * typeck.c (check_return_expr): Don't magically convert return
15598 statements into `return this' in constructors under the new ABI.
15600 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
15601 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
15602 (base_ctor_identifier): New macro.
15603 (base_dtor_identifier): Likewise.
15604 (deleting_dtor_identifier): Likewise.
15605 * decl.c: Don't include obstack.h.
15606 (obstack_chunk_alloc): Don't define.
15607 (obstack_chunk_free): Likewise.
15608 (struct predefined_identifier): New type.
15609 (initialize_predefined_identifiers): New function.
15610 (init_decl_processing): Use it.
15611 (debug_temp_inits): Remove.
15612 (start_method): Don't call preserve_data.
15613 (hack_incomplete_structures): Update comment.
15614 * init.c (init_init_processing): Don't initialize
15616 (build_offset_rf): Remove dead code.
15617 (build_delete): Use CLASSTYPE_N_BASECLASSES.
15618 * search.c (init_search_processing): Don't initialize
15621 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15623 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
15624 some sign_compare warnings.
15626 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
15628 Rename abi::__vmi_class_type_info members.
15629 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
15630 base_list, detail_masks members to vmi_flags, vmi_base_count,
15631 vmi_bases and vmi_flags_masks respectively.
15632 (__vmi_class_type_info::vmi_flags_masks): Rename
15633 details_unknown_mask to flags_unknown_mask.
15634 * tinfo.cc (__class_type_info::do_upcast): Adjust.
15635 (__vmi_class_type_info::do_find_public_src): Adjust.
15636 (__vmi_class_type_info::do_dyncast): Adjust.
15637 (__vmi_class_type_info::do_upcast): Adjust.
15639 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
15641 * tinfo.cc (convert_to_base): New function.
15642 (get_vbase_offset): Remove. Move into convert_to_base.
15643 (__vmi_class_type_info::do_find_public_src): Adjust.
15644 (__vmi_class_type_info::do_dyncast): Adjust.
15645 (__vmi_class_type_info::do_upcast): Adjust.
15647 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
15649 * tinfo.cc (operator=): Use __builtin_strcmp.
15650 * tinfo2.cc (before): Likewise.
15652 2000-04-06 Mark Mitchell <mark@codesourcery.com>
15654 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
15655 (DECL_SAVED_INLINE): Rename to ...
15656 (DECL_DEFERRED_FN): ... this.
15657 (in_function_p): Remove declaration.
15658 (mark_inline_for_output): Rename to ...
15659 (defer_fn): ... this.
15660 * decl.c (finish_function): Adjust call to mark_inline_for_output.
15661 (in_function_p): Remove definition.
15662 * decl2.c (saved_inlines): Rename to ...
15663 (deferred_fns): ... this.
15664 (saved_inlines_used): Rename to ...
15665 (deferred_fns_used): ... this.
15666 (mark_inline_for_output): Rename to ...
15667 (defer_fn): ... this.
15668 (finish_file): Adjust accordingly.
15669 (init_decl2): Likewise.
15670 * lex.c (cons_up_default_function): Likewise.
15671 * pt.c (mark_decl_instantiated): Likewise.
15672 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
15674 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
15675 * semantics.c (expand_body): Defer more functions.
15677 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
15679 * vec.cc: New file.
15680 * Make-lang.in (CXX_LIB2FUNCS): Add it.
15682 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
15683 __cxa_vec_delete): Declare.
15685 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
15687 * rtti.c (dfs_class_hint_mark): New static function.
15688 (dfs_class_hint_unmark): New static function.
15689 (class_hint_flags): Use them.
15691 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
15693 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
15695 2000-04-05 Mark Mitchell <mark@codesourcery.com>
15697 * cp-tree.h (instantiate_decl): Change prototype.
15698 * decl2.c (mark_used): Adjust call.
15699 * optimize.c (inlinable_function_p): Adjust handling of templates.
15700 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
15701 (do_type_instantiation): Likewise.
15702 (instantiate_decl): Defer more templates.
15703 (instantiate_pending_templates): Adjust logic to handle inline
15706 * Makefile.in (GGC_H): New variable. Use it throughout in place
15709 * call.c: Don't include obstack.h. Include ggc.h.
15710 (obstack_chunk_alloc): Don't define.
15711 (obstack_chunk_free): Likewise.
15712 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
15713 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
15714 (pop_switch): Free it.
15716 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
15718 * dump.c (dequeue_and_dump): Don't try to print the bit_position
15719 if we don't have a DECL_FIELD_OFFSET.
15721 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
15723 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
15724 special_function_p.
15726 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15728 * cfns.gperf (hash, libc_name_p): Prototype.
15730 * rtti.c (build_dynamic_cast_1): Constification.
15732 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
15734 * semantics.c (deferred_type_access_control): Prototype.
15736 2000-04-04 Mark Mitchell <mark@codesourcery.com>
15738 Correct many new ABI issues regarding vbase and vcall offset
15740 * cp-tree.h (BINFO_VTABLE): Document.
15741 (struct lang_type): Tweak formatting.
15742 (BINFO_PRIMARY_BINFO): Add to documentation.
15743 (CLASSTYPE_VSIZE): Fix typo in comment.
15744 (CLASSTYPE_VBASECLASSES): Update documentation.
15745 (BINFO_VBASE_MARKED): Remove.
15746 (SET_BINFO_VBASE_MARKED): Likewise.
15747 (CLEAR_BINFO_VBASE_MARKED): Likewise.
15748 (BINFO_FIELDS_MARKED): Remove.
15749 (SET_BINFO_FIELDS_MARKED): Likewise.
15750 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
15751 (enum access_kind): New enumeration.
15752 (num_extra_vtbl_entries): Remove declaration.
15753 (size_extra_vtbl_entries): Likewise.
15754 (get_vtbl_decl_for_binfo): New function.
15755 (dfs_vbase_unmark): Remove declaration.
15756 (mark_primary_bases): Likewise.
15757 * class.c (SAME_FN): Remove.
15758 (struct vcall_offset_data_s): Move definition.
15759 (build_vbase_pointer): Use `build', not `build_binary_op', to
15760 access the vbase pointer under the new ABI.
15761 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
15762 (build_primary_vtable): Likewise.
15763 (dfs_mark_primary_bases): Move here from search.c.
15764 (mark_primary_bases): Likewise.
15765 (determine_primary_bases): Under the new ABI, don't make a base
15766 class a primary base just because we don't yet have any virtual
15768 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
15769 (num_vfun_entries): Remove.
15770 (dfs_count_virtuals): Likewise.
15771 (num_extra_vtbl_entries): Likewise.
15772 (size_extra_vtbl_entries): Likewise.
15773 (layout_virtual_bases): Iterate in inheritance graph order under
15775 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
15776 indicate that a vfield is present.
15777 (init_class_processing): Initialize access_public_node, etc., from
15779 (get_vtbl_decl_for_binfo): New function.
15780 (dump_class_hierarchy_r): Likewise.
15781 (dump_class_hierarchy): Use it.
15782 (finish_vtbls): Build the vtbls in inheritance graph order.
15783 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
15784 (initialize_vtable): Use get_vtbl_decl_for_binfo.
15785 (accumulate_vtbl_inits): Add comments explaining why a pre-order
15787 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
15788 where the vptr points, even for primary vtables.
15789 (build_vtbl_initializer): Adjust handling of vbase and vcall
15791 (build_vcall_and_vbase_vtable_entries): New function.
15792 (dfs_build_vbase_offset_vtbl_entries): Remove.
15793 (build_vbase_offset_vtbl_entries): Reimplement.
15794 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
15795 were already handled in a primary base class vtable.
15796 (build_vcall_offset_vtbl_entries): Adjust.
15797 (build_rtti_vtbl_entries): Adjust.
15798 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
15799 * init.c (expand_virtual_init): Simplify.
15800 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
15801 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
15802 * search.c (BINFO_ACCESS): New macro.
15803 (SET_BINFO_ACCESS): Likewise.
15804 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
15805 (access_in_type): Likewise.
15806 (dfs_accessible_p): Likewise.
15807 (protected_accessible_p): Likewise.
15808 (lookup_fnfields_1): Adjust documentation.
15809 (dfs_mark_primary_bases): Move to class.c
15810 (mark_primary_bases): Likewise.
15811 (dfs_vbase_unmark): Remove.
15812 (virtual_context): Use BINFO_FOR_VBASE.
15813 (dfs_get_vbase_types): Simplify.
15814 (dfs_build_inheritance_graph_order): New function.
15815 (get_vbase_types): Use it.
15816 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
15818 * tinfo.cc (get_vbase_offset): New function.
15819 (__vmi_class_type_info::do_find_public_src): Use it.
15820 (__vmi_class_type_info::do_dyncast): Likewise.
15821 (__vmi_class_type_info::do_upcast): Likewise.
15823 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
15825 * lang-specs.h: Pass -fno-show-column to the preprocessor.
15827 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
15829 * rtti.c (class_hint_flags): Rename flags.
15830 (class_initializer): Remove flags.
15831 (synthesize_tinfo_var): Combine offset and flags. Add flags
15832 for __vmi_class_type_info.
15833 (create_tinfo_types): Remove flags from __class_type_info and
15834 __si_class_type_info. Merge flags and offset from
15835 base_class_type_info.
15836 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
15837 (__base_class_info::is_virtual_p): Adjust.
15838 (__base_class_info::is_public_p): Adjust.
15839 (__base_class_info::offset): New accessor.
15840 (__class_type_info::details): Remove member.
15841 (__class_type_info::__class_type_info): Lose details.
15842 (__class_type_info::detail_masks): Remove.
15843 (__si_class_type_info::__si_class_type_info): Lose details.
15844 (__vmi_class_type_info::details): New member.
15845 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
15846 (__vmi_class_type_info::detail_masks): New member.
15847 * tinfo.cc (__class_type_info::do_upcast): Initialize result
15848 with unknown_details_mask.
15849 (__vmi_class_type_info::do_find_public_src): Adjust
15850 (__vmi_class_type_info::do_dyncast): Adjust.
15851 (__vmi_class_type_info::do_upcast): Set result details, if
15853 (__dynamic_cast): Temporarily #if out optimization.
15855 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
15857 * rtti.c (get_tinfo_decl): Mark used.
15858 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
15859 mark as dealt with, if we output it.
15861 2000-03-28 Mark Mitchell <mark@codesourcery.com>
15863 * class.c: Reorganize to put virtual function table initialization
15864 machinery at the end of the file.
15866 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
15868 * class.c (finish_struct): Use bitsize_zero_node.
15869 * pt.c (instantiate_class_template): Likewise.
15871 2000-03-28 Mark Mitchell <mark@codesourcery.com>
15873 Put RTTI entries at negative offsets in new ABI.
15874 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
15875 vbase offset at index -3, not -1.
15876 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
15877 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
15878 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
15879 (build_rtti_vtbl_entries): New function.
15880 (set_rtti_entry): Remove.
15881 (build_primary_vtable): Don't use it.
15882 (build_secondary_vtable): Likewise.
15883 (start_vtable): Remove.
15884 (first_vfun_index): New function.
15885 (set_vindex): Likewise.
15886 (add_virtual_function): Don't call start_vtable. Do call
15888 (set_primary_base): Rename parameter.
15889 (determine_primary_base): Likewise.
15890 (num_vfun_entries): Don't use skip_rtti_stuff.
15891 (num_extra_vtbl_entries): Include RTTI information.
15892 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
15893 (skip_rtti_stuff): Remove.
15894 (dfs_modify_vtables): Don't use it.
15895 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
15896 (layout_nonempty_base_or_field): Update size handling.
15897 (create_vtable_ptr): Tweak.
15898 (layout_class_type): Adjust parameter names.
15899 (finish_struct_1): Simplify.
15900 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
15901 (skip_rtti_stuff): Remove.
15902 (first_vfun_index): New function.
15903 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
15904 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
15905 (marked_vtable_pathp): Declare.
15906 (unmarked_vtable_pathp): Likewise.
15907 * error.c (dump_expr): Use first_vfun_index to calculate vtable
15909 * rtti.c (build_headof): Look for RTTI at negative offsets.
15910 (get_tinfo_decl_dynamic): Likewise.
15911 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
15913 (create_pseudo_type_info): Do it here instead. Adjust so that
15914 vptr points at first virtual function.
15915 * search.c (marked_vtable_pathp): Make it global.
15916 (unmarked_vtable_pathp): Likewise.
15917 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
15918 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
15919 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
15920 (get_pure_virtuals): Likewise.
15921 (expand_upcast_fixups): Likewise.
15922 * tree.c (debug_binfo): Likewise.
15923 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
15926 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15928 * class.c (check_field_decl): Fix typo.
15929 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
15930 (check_methods): Likewise.
15931 (check_field_decls): Likewise.
15932 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
15933 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
15934 Use DECL_RESULT_FLD, not DECL_RESULT.
15935 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
15936 * lex.c (identifier_type): Likewise.
15937 * pt.c (determine_specialization, lookup_template_class): Likewise.
15938 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
15939 (resolve_overloaded_unification, more_specialized): Likewise.
15940 * semantics.c (finish_member_declaration): Likewise.
15941 * typeck.c (build_x_function_call): Likewise.
15943 2000-03-26 Mark Mitchell <mark@codesourcery.com>
15945 * class.c (layout_empty_base): Handle empty bases with non-byte
15947 (build_base_field): Likewise.
15948 (layout_virtual_bases): Likewise.
15950 * class.c (finish_struct_1): Fix typo in this change:
15952 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15954 2000-03-25 Mark Mitchell <mark@codesourcery.com>
15956 * decl.c (grokdeclarator): Count partial specializations when
15957 keeping track of how many template classes have been seen.
15959 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
15961 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15963 * class.c (build_vbase_pointer_fields): layout_field now place_field.
15964 (get_vfield_offset): Use byte_position.
15965 (set_rtti_entry): Set OFFSET to ssizetype zero.
15966 (get_binfo_offset_as_int): Deleted.
15967 (dfs_record_base_offsets): Use tree_low_cst.
15968 (dfs_search_base_offsets): Likewise.
15969 (layout_nonempty_base_or_field): Reflect changes in RLI format
15970 and call byte_position.
15971 (layout_empty_base): Convert offset to ssizetype.
15972 (build_base_field): use rli_size_unit_so_far.
15973 (dfs_propagate_binfo_offsets): Do computation in proper type.
15974 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
15975 (layout_class_type): Reflect changes in RLI names and fields.
15976 (finish_struct_1): Set DECL_FIELD_OFFSET.
15977 * dump.c (dequeue_and_dump): Call bit_position.
15978 * expr.c (cplus_expand_constant): Use byte_position.
15979 * rtti.c (expand_class_desc): Use bitsize_one_node.
15980 * typeck.c (build_component_addr): Use byte_position and don't
15981 special case for zero offset.
15983 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
15985 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
15987 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
15989 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
15992 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15994 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
15996 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
15997 make_typename_type, check_initializer, cp_finish_decl,
15998 xref_tag): Likewise.
15999 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
16000 decl_namespace, arg_assoc_template_arg, arg_assoc,
16001 validate_nonmember_using_decl, do_class_using_decl): Likewise.
16002 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
16003 args_to_string): Likewise.
16004 * friend.c (is_friend): Likewise.
16005 * lex.c (note_got_semicolon, note_list_got_semicolon,
16006 is_global): Likewise.
16007 * method.c (build_overload_nested_name, build_overload_value,
16008 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
16009 * parse.y (typename_sub, typename_sub1): Likewise.
16010 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
16011 process_partial_specialization, convert_template_argument,
16012 template_args_equal, add_pending_template, lookup_template_class,
16013 for_each_template_parm_r, maybe_fold_nontype_arg,
16014 tsubst, instantiate_template, type_unification_real, unify,
16015 instantiate_pending_templates, set_mangled_name_for_template_decl):
16017 * repo.c (repo_get_id, repo_template_used): Likewise.
16018 * search.c (lookup_field_1): Likewise.
16019 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
16020 * xref.c (classname): Likewise.
16022 2000-03-22 Mark Mitchell <mark@codesourcery.com>
16024 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
16025 (CANONICAL_BINFO): New macro.
16026 (BINFO_NEW_VTABLE_MARKED): Use it.
16027 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
16028 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
16029 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
16031 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
16032 (build_secondary_vtable): Likewise.
16033 (dfs_finish_vtbls): Likewise.
16034 (dfs_accumulate_vtbl_inits): Likewise.
16035 (accumulate_vtbl_inits): New function.
16036 (finish_vtbls): Make sure that virtual bases come after
16037 non-virtual bases in the vtable group.
16038 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
16039 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
16040 * search.c (struct vbase_info): Move definition.
16041 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
16042 (unmarked_new_vtable_p): Likewise.
16043 (dfs_mark_vtable_path): Remove.
16044 (dfs_mark_new_vtable): Remove.
16045 (dfs_unmark_new_vtable): Likewise.
16046 (dfs_clear_search_slot): Likewise.
16047 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
16048 (dfs_clear_vbase_slots): Likewise.
16049 (init_vbase_pointers): LIkewise.
16051 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
16053 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
16054 SIZETYPE to a non-SIZETYPE.
16056 2000-03-21 Mark Mitchell <mark@codesourcery.com>
16058 * class.c (layout_virtual_bases): Adjust names in conditionally
16061 * class.c (record_base_offsets): New function.
16062 (layout_conflict_p): Likewise.
16063 (layout_nonempty_base_or_field): Use it.
16064 (layout_empty_base): New function.
16065 (build_base_field): Use it.
16066 (build_base_fields): Update comment.
16067 (layout_virtual_bases): Fold in a little code form
16068 layout_basetypes. Use layout_empty_base.
16069 (layout_basetypes): Remove.
16070 (end_of_class): New function.
16071 (layout_class_type): Use it. Adjust.
16073 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
16074 (fntype_p): Remove.
16075 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
16077 (dfs_skip_nonprimary_vbases_markedp): Likewise.
16078 * typeck.c (fntype_p): Remove.
16080 * cp-tree.h (TI_SPEC_INFO): Remove.
16081 (CLASSTYPE_TI_SPEC_INFO): Likewise.
16082 * pt.c (process_partial_specialization): Likewise.
16084 * class.c (build_base_field): Fix thinko in computation of binfo
16087 * tree.c (mark_local_for_remap_p): Mark variables declared in
16088 TARGET_EXPRs as well.
16090 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
16092 * typeck.c (require_complete_type, complete_type,
16093 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
16094 build_array_ref, convert_arguments, pointer_diff,
16095 build_x_unary_op, build_unary_op, build_c_cast,
16096 build_modify_expr): Use COMPLETE_TYPE_P etc.
16097 * call.c (is_complete, convert_like_real,
16098 build_new_method_call): Likewise.
16099 * class.c (build_vbase_pointer_fields, check_bases,
16100 build_base_field, finish_struct_1, pushclass): Likewise.
16101 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
16102 * decl.c (maybe_process_template_type_declaration, pushtag,
16103 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
16104 layout_var_decl, check_initializer, cp_finish_decl,
16105 grokdeclarator, require_complete_types_for_parms,
16106 grok_op_properties, xref_tag, xref_basetypes,
16107 check_function_type): Likewise.
16108 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
16109 * friend.c (do_friend): Likewise.
16110 * init.c (build_offset_ref): Likewise.
16111 * parse.y (structsp): Likewise.
16112 * pt.c (maybe_process_partial_specialization,
16113 tsubst_friend_function, instantiate_class_template, tsubst,
16114 do_type_instantiation, instantiate_pending_templates): Likewise.
16115 * repo.c (repo_get_id): Likewise.
16116 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
16117 synthesize_tinfo_var, emit_support_tinfos): Likewise.
16118 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
16119 * semantics.c (begin_class_definition): Likewise.
16120 * tree.c (build_cplus_method_type): Likewise.
16121 * typeck2.c (digest_init, build_functional_cast,
16122 add_exception_specifier): Likewise.
16123 * parse.h, parse.c: Regenerated.
16125 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
16127 * inc/cxxabi.h: New header file. Define new-abi entry points.
16128 (__pointer_type_info::target): Rename member to ...
16129 (__pointer_type_info::type): ... here.
16130 (__base_class_info::type): Rename member to ...
16131 (__base_class_info::base): ... here.
16132 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
16133 * cp-tree.h (CPTI_ABI): New global tree enumeration.
16134 (abi_node): New global tree node.
16135 * decl.c (abi_node): Document.
16136 (init_decl_processing): Initialize abi_node.
16137 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
16138 (get_vmi_pseudo_type_info): Likewise.
16139 (create_tinfo_types): Likewise.
16140 (emit_support_tinfos): Likewise.
16141 * tinfo.h (cxxabi.h): Include for new-abi.
16142 Move rtti class definitions to new header file.
16143 * tinfo.cc (abi): Use the namespace.
16144 (std): Move new abi rtti classes from here ...
16145 (__cxxabiv1): ... to here.
16146 * tinfo2.cc (cxxabi.h): Include for new-abi.
16147 Move rtti class definitions to new header file.
16148 (std): Move new abi rtti classes from here ...
16149 (__cxxabiv1): ... to here.
16150 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
16153 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
16154 Jason Merrill <jason@casey.cygnus.com>
16156 * method.c (build_overload_int): Use host_integerp.
16158 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16160 * init.c (build_offset_ref): Handle the case of a templated member
16163 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
16165 * except.c (expand_exception_blocks): Clear catch_clauses_last.
16167 2000-03-18 Mark Mitchell <mark@codesourcery.com>
16169 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
16170 * class.c (check_bitfield_decl): Turn illegal bitfields into
16172 (dfs_propagate_binfo_offsets): Adjust for new size_binop
16174 (dfs_offset_for_unshared_vbases): Likewise.
16175 * cvt.c (cp_convert_to_pointer): Convert NULL to a
16176 pointer-to-member correctly under the new ABI.
16177 * expr.c (cplus_expand_constant): Don't use cp_convert when
16178 turning an offset into a pointer-to-member.
16179 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
16180 when dereferencing them under the new ABI.
16181 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
16182 of pointers-to-members under the new ABI.
16184 * class.c (check_bitfield_decl): Remove restriction on really long
16186 (layout_class_type): Implement new ABI handling of bitfields
16187 longer than their types.
16189 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
16191 * parse.y (extdefs): Call ggc_collect.
16192 * parse.c: Regenerated.
16194 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
16196 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
16197 (note_name_declared_in_class): Use OVL_CURRENT to get at a
16198 potential overload.
16200 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16202 * class.c (build_vbase_path): Use integer_zerop.
16203 (build_vtable_entry): Use tree_low_cst.
16204 (get_vfield_offset): Use bit_position.
16205 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
16207 (check_bitfield_decl): Set DECL_SIZE using convert.
16208 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
16209 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
16211 (finish_struct_1): Use bit_position.
16212 (dump_class_hierarchy): Use tree_low_cst.
16213 * cp-tree.h (min_precision): Add declaration.
16214 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
16215 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
16216 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
16217 * expr.c (cplus_expand_constant): Use bit_position.
16218 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
16219 * rtti.c (get_base_offset): Use bit_position.
16220 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
16221 host_integerp, and tree_low_cst.
16222 (pointer_int_sum): Use integer_zerop.
16223 (build_component_addr): Use bit_position.
16225 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
16227 * typeck.c (require_complete_type): Don't assume size_zero_node.
16228 (complete_type_or_else): Likewise.
16230 2000-03-16 Steven Grady <grady@digitaldeck.com>
16231 Jason Merrill <jason@casey.cygnus.com>
16233 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
16235 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
16237 * decl2.c (grokfield): Bail out if type is error_mark_node.
16239 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
16241 * tinfo2.cc (__ptr_to_member_data): Rename to ...
16242 (__pointer_to_member_data): ... here. Adjust.
16243 * rtti.c (create_tinfo_types): Adjust.
16245 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
16247 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
16248 * decl.c (ref_desc_type_node): Undocument.
16249 * rtti.c (ptr_ref_initializer): Rename to ...
16250 (ptr_initializer): ... here. Adjust comments.
16251 (ptmd_initializer): Fix comment thinko.
16252 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
16253 (create_tinfo_types): Remove ref_desc_type_node init.
16254 * tinfo2.cc (__reference_type_info): Remove.
16256 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
16258 * decl.c (cp_finish_decl): Remove obsolete comment.
16260 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
16262 2000-03-14 Mark Mitchell <mark@codesourcery.com>
16264 * cp-tree.h: Tweak documentation.
16265 * class.c (build_vbase_pointer_fields): Layout the fields, too.
16266 (avoid_overlap): Remove.
16267 (get_binfo_offset_as_int): New function.
16268 (dfs_serach_base_offsets): Likewise.
16269 (layout_nonempty_base_or_field): Likewise.
16270 (build_base_field): Layout fields here. Avoid placing two objects
16271 of the same type at the same address, under the new ABI.
16272 (build_base_fields): Adjust accordingly.
16273 (create_vtable_ptr): Return the new field, but don't attach it to
16275 (remove_base_field): Remove.
16276 (remove_base_fields): Remove.
16277 (layout_basetypes): Adjust accordingly.
16278 (layout_class_type): Call layout_field for each field, rather than
16279 just making a wholesale call to layout_type.
16281 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
16283 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
16285 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
16287 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
16289 * except.c (dtor_nothrow): New fn.
16290 (do_pop_exception): Use it. Take type parm.
16291 (push_eh_cleanup): Take type parm.
16292 (expand_start_catch_block): Pass it.
16293 (build_eh_type_type_ref): Accept null type.
16295 2000-03-12 Mark Mitchell <mark@codesourcery.com>
16297 * cp-tree.h (revert_static_member_fn): Change prototype.
16298 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
16299 (grok_op_properties): Likewise.
16300 (start_function): Likewise.
16301 (revert_static_member_fn): Simplify.
16302 * pt.c (check_explicit_specialization): Adjust call to
16303 revert_static_member_fn.
16305 2000-03-11 Mark Mitchell <mark@codesourcery.com>
16307 * cp-tree.h (scope_kind): New type.
16308 (tmpl_spec_kind): Likewise.
16309 (declare_pseudo_global_level): Remove.
16310 (pseudo_global_level_p): Rename to template_parm_scope_p.
16311 (pushlevel): Remove declaration.
16312 (begin_scope): New function.
16313 (finish_scope): Likewise.
16314 (current_tmpl_spec_kind): Likewise.
16315 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
16316 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
16317 Add template_spec_p.
16318 (toplevel_bindings_p): Adjust.
16319 (declare_pseudo_global_level): Remove.
16320 (pseudo_global_level_p): Rename to template_parm_scope_p.
16321 (current_tmpl_spec_kind): New function.
16322 (begin_scope): Likewise.
16323 (finish_scope): Likewise.
16324 (maybe_push_to_top_level): Adjust.
16325 (maybe_process_template_type_declaration): Likewise.
16326 (pushtag): Likewise.
16327 (pushdecl_nonclass_level): Likewise.
16328 (lookup_tag): Likewise.
16329 (grokfndecl): Handle member template specializations. Share
16330 constructor and non-constructor code.
16331 * decl2.c (check_classfn): Handle member template specializations.
16332 * pt.c (begin_template_parm_list): Use begin_scope.
16333 (begin_specialization): Likewise.
16334 (end_specialization): Likewise.
16335 (check_explicit_specialization): Use current_tmpl_spec_kind.
16336 Handle member template specializations.
16337 (end_template_decl): Use finish_scope. Remove call to
16339 (push_template_decl_real): Remove bogus error message.
16340 (tsubst_decl): Fix typo in code contained in comment.
16341 (instantiate_template): Handle member template specializations.
16342 (most_general_template): Likewise.
16344 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
16346 * lex.c (whitespace_cr): Compress consecutive calls to warning().
16347 (do_identifier): Ditto for error().
16349 * pt.c (convert_nontype_argument): Ditto for cp_error().
16350 (convert_template_argument): Ditto for cp_pedwarn().
16352 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
16354 * exception.cc (__check_null_eh_spec): New fn.
16355 * except.c (expand_end_eh_spec): Call it if the spec is throw().
16357 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
16359 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
16360 * except.c (expand_end_eh_spec): Add the return type.
16361 * rtti.c (throw_bad_cast): Add the parmtypes.
16362 (throw_bad_typeid): Likewise.
16364 * semantics.c (expand_stmt): Only leave out rtl for unused
16365 artificials, and set DECL_IGNORED_P on them as well.
16366 * decl.c (wrapup_globals_for_namespace): Likewise.
16368 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
16370 * decl.c (maybe_commonize_var): Skip all artificial decls.
16371 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
16373 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
16375 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
16376 * cp-tree.h: Declare flag_enforce_eh_specs.
16377 * decl.c (store_parm_decls, finish_function): Check it.
16379 C library functions don't throw.
16380 * Makefile.in (cfns.h): New target.
16381 (except.o): Depend on it.
16382 * Make-lang.in (cc1plus): Depend on cfns.gperf.
16383 * cfns.gperf: New file.
16384 * cfns.h: Generated.
16385 * except.c: Include it.
16386 (nothrow_libfn_p): New fn.
16387 * decl.c (grokfndecl): Use it.
16388 * cp-tree.h: Declare it.
16390 * decl.c (push_overloaded_decl_1, auto_function,
16391 define_function): Lose.
16392 (build_library_fn_1): New static fn.
16393 (builtin_function): Use it.
16394 (get_atexit_node): Use build_library_fn_ptr.
16395 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
16396 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
16397 push_void_library_fn, push_throw_library_fn): New fns.
16398 * cp-tree.h: Declare them.
16399 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
16400 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
16401 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
16402 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
16403 * rtti.c (build_runtime_decl): Lose.
16404 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
16405 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
16406 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
16408 * call.c (build_call): Remove result_type parm.
16409 Call mark_used on unused artificial fns.
16410 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
16412 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
16414 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
16416 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
16417 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
16418 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
16419 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
16420 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
16421 expand_generic_desc): Likewise.
16423 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
16425 * exception.cc (__cp_pop_exception): Cleanup the original object.
16427 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
16429 * decl.c (grok_op_properties): Merge conversion to void warning
16430 with other silly op warnings.
16432 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
16434 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
16435 array CONSTRUCTOR elements. Don't use expr_tree_cons.
16437 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
16439 * decl.c (cp_make_fname_decl): New function.
16440 (wrapup_globals_for_namespace): Don't emit unused static vars.
16441 (init_decl_processing): Remove comment about use of
16442 array_domain_type. Set make_fname_decl.
16443 (cp_finish_decl): Remove __FUNCTION__ nadgering.
16444 * semantics.c (begin_compound_stmt): Remove
16445 current_function_name_declared flagging.
16446 (expand_stmt): Don't emit unused local statics.
16447 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
16450 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
16452 * typeck.c (convert_for_assignment): Don't look at array
16454 * call.c (convert_like_real): Likewise.
16456 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
16458 Add initial support for '\uNNNN' specifier.
16459 * lex.c (read_ucs): New fn.
16460 (readescape, skip_white_space): Call it.
16461 (is_extended_char, is_extended_char_1): New fns.
16462 (utf8_extend_token): New fn, #if 0'd out.
16463 (real_yylex): Treat extended chars like letters.
16465 * search.c (note_debug_info_needed): Walk the bases even if we
16466 weren't deferring the type itself.
16468 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16470 * decl2.c (finish_objects): Constify a char*.
16472 * method.c (emit_thunk): Likewise.
16474 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
16476 * typeck.c (dubious_conversion_warnings): Look through
16479 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16481 * class.c (dfs_modify_vtables): I is now unsigned.
16482 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
16483 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
16484 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
16485 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
16486 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
16487 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
16488 Call integer_all_onesp.
16489 * typeck2.c (process_init_constructor): Use compare_tree_int.
16491 * lang-specs.h (as): Don't call if -syntax-only.
16493 2000-03-06 Mark Mitchell <mark@codesourcery.com>
16495 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
16496 RTL_EXPR_HAS_NO_SCOPE after all.
16498 2000-03-05 Mark Mitchell <mark@codesourcery.com>
16500 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
16501 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
16502 RTL_EXPR_HAS_NO_SCOPE.
16504 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
16507 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
16509 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
16511 * call.c (convert_like): Macrofy.
16512 (convert_like_with_context): New macro.
16513 (convert_like_real): Renamed from convert_like. Add calling
16514 context parameters, for diagnostics. Add recursive flag. Call
16515 dubious_conversion_warnings for outer conversion.
16516 (build_user_type_conversion): Use convert_like_with_context.
16517 (build_over_call): Likewise. Don't warn about dubious
16518 conversions here. Adjust convert_default_arg calls.
16519 (convert_default_arg): Add context parameters for diagnostics.
16520 Pass through to convert_like_with_context.
16521 * cp-tree.h (convert_default_arg): Add context parameters.
16522 (dubious_conversion_warnings): Prototype new function.
16523 * typeck.c (convert_arguments): Adjust convert_default_arg call.
16524 (dubious_conversion_warnings): New function, broken
16525 out of convert_for_assignment.
16526 (convert_for_assignment): Adjust.
16528 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
16530 * decl2.c (key_method): Break out from...
16531 (import_export_vtable, import_export_class): ...here.
16533 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
16534 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
16536 * search.c (note_debug_info_needed, dfs_debug_mark,
16537 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
16538 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
16540 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
16542 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
16545 2000-03-02 Mark Mitchell <mark@codesourcery.com>
16547 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
16548 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
16549 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
16550 (lang_type): Split gets_new into has_new and has_array_new.
16551 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16552 (TYPE_GETS_NEW): Split into ...
16553 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
16554 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
16555 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
16556 (build_op_new_call): Don't declare.
16557 (build_new_1): Likewise.
16558 * call.c (build_op_new_call): Remove.
16559 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
16560 instead of TYPE_NEEDS_DESTRUCTOR.
16561 (finish_struct_bits): Likewise.
16562 (add_implicitly_declared_members): Likewise.
16563 (check_field_decl): Likewise.
16564 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
16565 correctly under the new ABI.
16566 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
16567 instead of TYPE_NEEDS_DESTRUCTOR.
16568 (initialize_local_var): Likewise.
16569 (destroy_local_var): Likewise.
16570 (cp_finish_decl): Likewise.
16571 (register_dtor_fn): Likewise.
16572 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
16573 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
16574 TYPE_VEC_DELETE_TAKES_SIZE here.
16575 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
16576 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
16577 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16578 (finish_destructor_body): Likewise.
16579 (maybe_build_cleanup_1): Likewise.
16580 * decl2.c (do_static_destruction): Likewise.
16581 * init.c (build_new_1): Make it static.
16582 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16583 (expand_cleanup_for_base): Likewise.
16584 (get_cookie_size): New function.
16585 (build_new_1): Handle array-new cookies correctly under the new
16587 (build_vec_delete_1): Likewise.
16588 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16589 (build_delete): Likewise.
16590 (build_vec_delete): Handle array-new cookies correctly under the new
16592 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16593 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
16594 TYPE_HAS_ARRAY_NEW_OPERATOR.
16595 * ptree.c (print_lang_type): Check them.
16596 * search.c (context_for_name_lookup): Fix typo in comment.
16597 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16598 * tree.c (break_out_cleanups): Likewise.
16599 (build_cplus_array_test_1): Likewise.
16600 (cp_build_qualified_type_real): Likewise.
16601 * typeck.c (complete_type): Likewise.
16603 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
16604 the command-line, not the end.
16606 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
16608 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
16610 2000-03-02 Tom Tromey <tromey@cygnus.com>
16612 * cp-tree.h (build_java_class_ref): Declare.
16613 * init.c (build_java_class_ref): No longer static.
16614 * except.c (expand_throw): Generate a Java-style `throw' if the
16615 thrown object is a "Java" object.
16616 (initialize_handler_parm): Generate a Java-style lookup of
16617 exception info if the caught object is a "Java" object.
16618 (catch_language, catch_language_init): New globals.
16619 (decl_is_java_type): New function.
16620 (expand_start_catch_block): Don't call push_eh_info() or
16621 push_eh_cleanup() when handling a Java-style "catch". Pass Java
16622 class reference to build_catch_block.
16624 2000-03-02 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16626 * typeck.c (comptypes): Treat sizetype like its language equivalent.
16628 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
16630 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
16631 to merge reference/pointer code and fix incorrect warnings.
16633 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
16635 * search.c (protected_accessible_p): Use context_for_name_lookup.
16637 * init.c (construct_virtual_bases): Fix thinko.
16638 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
16640 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
16642 * decl.c (current_function_decl): Move to toplev.c.
16644 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
16646 * pt.c (fn_type_unification): Unify return type, whenever
16648 (get_bindings_real): Only pass return type when necessary.
16649 Remove explicit return type check.
16650 * class.c (resolve_address_of_overloaded_function): Pass desired
16651 return type to fn_type_unification.
16653 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16655 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
16657 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
16659 * rtti.c (expand_class_desc): Likewise.
16660 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
16661 (THUNK_VCALL_OFFSET): Likewise.
16662 (THUNK_DELTA): Reflect changes in ../tree.h.
16664 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
16666 * search.c (protected_accessible_p): Also allow the access if
16667 the member is public in DERIVED. Lose TYPE parm.
16668 (friend_accessible_p): Lose TYPE parm.
16669 (accessible_p): Adjust.
16671 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16673 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
16674 on things that are not sizes; ssize_binop deleted.
16675 Call size_diffop when appropriate.
16676 (dfs_build_vcall_offset_vtbl_entries): Likewise.
16677 (build_primary_vtable, build_secondary_vtable): Likewise.
16678 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
16679 Variable I is HOST_WIDE_INT.
16680 (get_vfield_offset): Pass proper types to size_binop.
16681 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
16682 (finish_struct_1): Likewise.
16683 (skip_rtti_stuff): Arg N is now pointer to signed.
16684 (layout_class_type): Use size_zero_node.
16685 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
16686 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
16687 * decl.c (complete_arry_type): Pass proper types to size_binop.
16688 (xref_basetypes): BINFO_OFFSET is sizetype.
16689 * error.c (dump_expr): Don't use size_binop non-sizes.
16690 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
16691 * init.c (construct_virtual_bases): Fix type error.
16692 (build_vec_delete_1): Pass proper type to size_binop and don't
16694 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
16695 * rtti.c (get_base_offset): Pass proper type to size_binop.
16696 * search.c (dfs_find_vbases): Fix type error.
16697 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
16698 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
16699 * tree.c (debug_binfo): Variable N is signed.
16700 Use HOST_WIDE_INT_PRINT_DEC.
16701 * typeck.c (comptypes): sizetype is same as equivalent integer type.
16702 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
16703 size_one_node and size_zero_node.
16704 (c_alignof): Use size_one_node.
16705 (build_component_addr): Pass proper types to size_binop.
16706 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
16708 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
16710 Implement class scope using-declarations for functions.
16711 * class.c (handle_using_decl): Call add_method for used functions.
16712 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
16713 (add_method): Used functions are hidden by local functions.
16714 (check_bases_and_members): Handle using-decls before finalizing
16715 CLASSTYPE_METHOD_VEC.
16716 * call.c (add_function_candidate): Add ctype parm; if nonzero,
16717 override the type of 'this' accordingly.
16718 (add_template_candidate, add_template_candidate_real): Add ctype parm.
16719 (convert_class_to_reference, build_user_type_conversion_1,
16720 build_new_function_call, build_object_call, build_new_op,
16721 build_new_method_call): Pass ctype parm.
16723 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
16725 * call.c (convert_class_to_reference, build_user_type_conversion_1,
16726 build_new_function_call, build_object_call, build_new_op,
16727 build_new_method_call, build_op_delete_call): Don't get basetype_path
16729 * typeck.c (build_component_ref): Likewise.
16730 * init.c (build_offset_ref): Likewise.
16731 (resolve_offset_ref): Don't call enforce_access.
16732 Call build_scoped_ref.
16733 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
16734 would cause an error or if -pedantic.
16735 * class.c (alter_access): Lose binfo parm.
16737 2000-02-26 Mark Mitchell <mark@codesourcery.com>
16739 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
16742 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
16744 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
16745 pseudo_type_info creation into the std namespace
16747 2000-02-26 Mark Mitchell <mark@codesourcery.com>
16749 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
16750 (import_export_class): Remove declaration.
16751 * decl2.c (import_export_class): Make it static.
16752 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
16753 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
16754 EXPR_WITH_FILE_LOCATION.
16755 * lex.c (check_newline): Tweak filename/lineno setting.
16756 * semantics.c (begin_while_stmt): Fix typo in comment.
16758 2000-02-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16760 * lang-options.h (-fmessage-length=): Add missing option.
16762 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
16764 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
16766 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
16768 2000-02-25 Jim Wilson <wilson@cygnus.com>
16770 * optimize.c (expand_call_inline): Emit the return label before
16771 evaluating the return value.
16773 2000-02-24 Mark Mitchell <mark@codesourcery.com>
16775 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
16776 than duplicating functionality here.
16777 * optimize.c: Include input.h.
16778 (expand_call_inline): Use push_srcloc and pop_srcloc.
16779 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
16780 * parse.c: Regenerated.
16781 * Makefile.in (lex.o): Depend on input.h.
16782 (optimize.o): Likewise.
16784 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
16786 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
16787 function type, rather than ICE.
16789 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
16791 * decl.c (grokdeclarator): Call decl_type_access_control.
16792 * parse.y (parse_end_decl): Don't call decl_type_access_control if
16795 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
16797 * decl.c (decls_match): Remove obsolete static member nadgering.
16799 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
16801 * decl.c (grokdeclarator): Change ANSI to ISO.
16802 * lex.c (consume_string, readescape, do_identifier): Likewise.
16803 (parse_float, real_yylex): Likewise.
16804 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
16805 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
16806 new_type_id, maybe_label_decls, simple_stmt,
16807 for.init.statement): Likewise.
16808 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
16809 * semantics.c (finish_named_return_value): Likewise.
16810 * parse.c: Regenerate.
16812 2000-02-21 Mark Mitchell <mark@codesourcery.com>
16814 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
16815 (CPTI_CLASS_STAR_TYPE): Remove.
16816 (vtable_index_type): Likewise.
16817 (class_star_type_node): Remove.
16818 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
16819 (build_binary_op_nodefault): Remove.
16820 * call.c (build_new_op): Use build_binary_op instead of
16821 build_binary_op_nodefault.
16822 * decl.c (init_decl_processing): Remove class_star_type_node
16823 initialization. Make delta_type_node ptrdiff_type_node under the
16824 new ABI. Initialize vtable_index_type.
16825 (build_ptrmemfunc_type): Build different structures for the new
16827 (build_enumerator): Use build_binary_op instead of
16828 build_binary_op_nodefault.
16829 * method.c (build_overload_value): Mangle pointers-to-members
16830 appropriately under the new ABI.
16831 * typeck.c (build_array_ref): Use build_binary_op instead of
16832 build_binary_op_nodefault.
16833 (get_member_function_from_ptrfunc): Adjust for the new ABI.
16834 (build_binary_op_nodefault): Rename to ...
16835 (build_binary_op): ... this. Remove old version. Adjust for
16836 pointer-to-member comparisons under the new ABI.
16837 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
16838 (build_ptrmemfunc): Adjust for the new ABI.
16839 (expand_ptrmemfunc_cst): Likewise.
16840 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
16841 (pfn_from_ptrmemfunc): Adjust for the new ABI.
16843 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
16845 * call.c (build_object_call): Compress consecutive calls to
16847 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
16848 (build_op_delete_call): Adjust message formatting.
16850 * class.c (check_bases): Compress consecutive calls to
16852 (finish_struct_anon): Say 'ISO C++'.
16854 * decl.c (start_decl): Same here.
16855 (grok_reference_init): Likewise.
16856 (grokfndecl): Correct message formatting.
16857 (grokfndecl): Improve diagnostic.
16858 (check_static_variable_definition): Likewise. Say 'ISO C++'
16859 (compute_array_index_type): Say 'ISO C++'
16860 (create_array_type_for_decl): Compress consecutive calls to
16862 (grokdeclarator): Say 'ISO C++'
16863 (grok_op_properties): Likewise.
16865 * decl2.c (delete_sanity): Clairify diagnostic.
16866 (check_member_template): Same here.
16867 (grok_function_init): Use consistent terminology.
16869 * expr.c (do_case): Say 'ISO C++'
16871 * friend.c (do_friend): Compress consecutive calls to warning.
16873 2000-02-20 Mark Mitchell <mark@codesourcery.com>
16875 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
16876 * class.c (build_secondary_vtable): Reorganize. Don't create a
16877 new vtable under the new ABI.
16878 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
16879 computing the size.
16880 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
16881 the initializing elements.
16882 (initialize_vtable): New function.
16883 (dfs_finish_vtbls): Use it.
16884 (dfs_accumulate_vtbl_inits): New function.
16885 (finish_vtbls): Merge primary and secondary vtables under the new
16887 (finish_struct_1): Remove redundant call to layout_vtable_decl.
16888 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
16891 * class.c (build_vtable): New function, split out from ...
16892 (get_vtable_decl): ... here, and ...
16893 (build_secondary_vtable): ... here.
16895 * pt.c (tsubst_decl): Fix formatting.
16897 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16899 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
16900 (avoid_overlap, build_base_field): Likewise.
16901 (build_base_field, build_base_fields, is_empty_class):
16902 Test DECL_SIZE with integer_zero.
16903 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
16904 * cp-tree.h (struct lang_type): New field size_unit.
16905 (CLASSTYPE_SIZE_UNIT): New macro.
16906 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
16907 (cp_finish_decl): Delete -Wlarger-than processing.
16908 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
16909 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
16910 * tree.c (make_binfo): binfo vector is one entry longer.
16911 (walk_tree): Walk DECL_SIZE_UNIT.
16913 2000-02-19 Mark Mitchell <mark@codesourcery.com>
16915 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
16917 (build_vtable_entry): Don't assume all vtable entries are
16919 (build_vtbl_initializer): Adjust accordingly.
16920 (get_vtable_decl): Fix formatting.
16922 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
16924 * semantics.c (deferred_type_access_control): Walk the entire
16926 (save_type_access_control): Rename from
16927 initial_deferred_type_access_control. Just remember the value.
16928 (decl_type_access_control): New fn.
16929 (begin_function_definition): Use deferred_type_access_control, after
16930 we've started the function. Set type_lookups to error_mark_node.
16931 * parse.y (frob_specs, fn.def1): Adjust.
16932 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
16933 (parse_end_decl, parse_bitfield0, parse_method): New fns.
16934 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
16935 (after_type_component_declarator0): Likewise.
16936 (after_type_component_declarator): Likewise.
16937 (notype_component_declarator): Likewise.
16938 * cp-tree.h: Adjust.
16940 * decl.c (redeclaration_error_message): Allow redeclaration of
16941 namespace-scope decls.
16943 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
16945 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
16947 2000-02-17 Mark Mitchell <mark@codesourcery.com>
16949 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
16950 * decl2.c (grokclassfn): Likewise.
16952 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
16954 * decl2.c (lang_decode_option): Don't set default message length
16956 * lex.c (lang_init_options): Set it here.
16958 2000-02-16 Mark Mitchell <mark@codesourcery.com>
16960 Make DECL_CONTEXT mean the class in which a member function was
16961 declared, even for a virtual function.
16962 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
16963 (DECL_FRIEND_CONTEXT): New macro.
16964 (DECL_REAL_CONTEXT): Remove.
16965 (SET_DECL_FRIEND_CONTEXT): Likewise.
16966 (DECL_VIRTUAL_CONTEXT): Adjust.
16967 (DECL_CLASS_SCOPE_P): Use TYPE_P.
16968 (add_friends): Remove.
16969 (hack_decl_function_context): Likewise.
16970 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
16972 (build_over_call): Fix indentation. Use DECL_CONTEXT
16973 instead of DECL_CLASS_CONTEXT.
16974 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
16975 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
16976 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16977 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
16978 (build_base_field): Likewise.
16979 (finish_struct_1): Likewise.
16980 (build_self_reference): Likewise.
16981 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
16983 (pushtag): Use decl_function_context, not
16984 hack_decl_function_context.
16985 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
16986 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
16987 (pushdecl): Remove bogus code.
16988 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
16989 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
16990 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16991 Use decl_function_context, nothack_decl_function_context.
16992 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
16993 (grokdeclarator): Likewise. Use decl_function_context, not
16994 hack_decl_function_context.
16995 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
16996 (start_function): Use DECL_FRIEND_CONTEXT, not
16997 DECL_CLASS_CONTEXT. Use decl_function_context, not
16998 hack_decl_function_context.
16999 (finish_function): Use decl_function_context, not
17000 hack_decl_function_context.
17001 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
17002 DECL_CLASS_CONTEXT.
17003 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
17004 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
17005 (grokfield): Likewise.
17006 (finish_builtin_type): Likewise.
17007 (finish_vtable_vardec): Use decl_function_context, not
17008 hack_decl_function_context.
17009 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
17010 (start_static_initialization_or_destruction): Likewise.
17011 (finish_static_initialization_or_destruction): Likewise.
17012 (mark_used): Adjust logic for deciding when to synthesize methods.
17013 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
17015 * error.c (dump_function_decl): Use DECL_CONTEXT, not
17016 DECL_CLASS_CONTEXT.
17017 * friend.c (is_friend): Likewise.
17018 (add_friends): Remove.
17019 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
17020 * lex.c (begin_definition_of_inclass_inline): Use
17021 decl_function_context, not hack_decl_function_context.
17022 (process_next_inline): Likewise.
17023 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
17024 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
17025 DECL_CLASSS_CONTEXT.
17026 (hack_identifier): Likewise.
17027 (synthesize_method): Use decl_function_context, not
17028 hack_decl_function_context.
17029 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
17031 (is_member_template): Use decl_function_context, not
17032 hack_decl_function_context. Use DECL_CONTEXT, not
17033 DECL_CLASS_CONTEXT.
17034 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
17035 DECL_CLASS_CONTEXT.
17036 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
17038 (push_template_decl_real): Likewise.
17039 (instantiate_class_template): Don't call add_friends.
17040 (tsubst_default_argument): Use DECL_CONTEXT, not
17042 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
17043 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
17044 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
17045 DECL_CLASS_CONTEXT.
17046 * repo.c (repo_inline_used): Likewise.
17047 * search.c (current_scope): Adjust for new _CONTEXT macros.
17048 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
17050 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
17051 (lookup_fnfields_here):Likewise.
17052 (check_final_overrider): Likewise.
17053 (init_vbase_pointers): Likewise.
17054 (virtual_context): Likewise.
17055 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
17056 (expand_body): Use decl_function_context, not
17057 hack_decl_function_context.
17058 * tree.c (hack_decl_function_context): Remove.
17059 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
17060 DECL_CLASS_CONTEXT.
17061 * typeck2.c (error_not_base_type): Likewise.
17063 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
17065 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
17067 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17069 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
17071 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
17073 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
17075 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
17077 * decl2.c (lang_decode_option): Enable automatic line wrapping.
17079 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
17081 * parse.y (frob_specs): Split out...
17082 (parse_decl): From here.
17083 (fn.def2): Call initial_deferred_type_access_control.
17084 (after_type_component_declarator0): Call frob_specs.
17085 (notype_component_declarator0): Likewise.
17086 * search.c (friend_accessible_p): Nested classes are friends of their
17089 2000-02-10 Mark Mitchell <mark@codesourcery.com>
17091 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
17092 used to create an implicit temporary.
17094 * class.c (dfs_modify_vtables): Tweak calculation of functions to
17097 2000-02-08 Nathan Sidwell <nathan@acm.org>
17099 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
17100 strip array element qualifiers too.
17102 2000-02-07 Mark Mitchell <mark@codesourcery.com>
17104 * decl.c (store_parm_decls): Don't build cleanups for parameters
17105 while processing_template_decl.
17107 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
17109 * cp-tree.h (struct saved_scope): Add incomplete field.
17110 (namespace_scope_incomplete): New macro.
17111 * decl.c (pushdecl): Use it.
17112 (hack_incomplete_structures): Use it. See through artificial
17114 (mark_saved_scope): Mark it.
17116 Implement access control for nested types.
17117 * search.c (type_access_control): New fn.
17118 (accessible_p): Now we do perform access control for types.
17119 * semantics.c (deferred_type_access_control): New fn.
17120 (initial_deferred_type_access_control): New fn.
17121 (begin_function_definition): Call it. Add lookups parm.
17122 * decl.c (struct binding_level): Add this_class field.
17123 (pushlevel_class): Set it.
17124 (mark_binding_level): Mark it.
17125 (lookup_name_real): Use it. Call type_access_control.
17126 (mark_saved_scope): Mark lookups field.
17127 * cp-tree.h (flagged_type_tree): Add lookups field.
17128 (struct saved_scope): Add lookups field.
17129 (type_lookups): New macro.
17130 * parse.y (declmods): Now <ftype>.
17131 (parse_decl): Add lookups parm. Call
17132 initial_deferred_type_access_control.
17133 (lang_extdef): Clear type_lookups.
17134 (typed_declspecs, declmods, typespec): Set lookups field.
17135 (initdcl): Call deferred_type_access_control.
17136 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
17137 component_decl_1, named_parm): Adjust.
17138 * friend.c (is_friend): Nested classes are friends of their
17141 * class.c (currently_open_derived_class): New fn.
17142 * method.c (hack_identifier): Use it.
17144 * lex.c (do_identifier): Remove obsolete code.
17146 * parse.y (typed_typespecs): Propagate new_type_flag properly.
17148 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
17150 * tinfo.h: Remove apostrophes from C++ comment (xgettext
17151 thinks this file is plain C).
17153 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17155 * Makefile.in (call.o): Depend on $(EXPR_H).
17157 * call.c: Include "expr.h".
17159 * class.c (dump_class_hierarchy): Add prototype.
17161 * search.c (dfs_get_pure_virtuals): Likewise.
17163 2000-02-1 Ulrich Drepper <drepper@redhat.com>
17165 * parse.y (simple_stmt): Allow :: token in asm parameter list.
17166 * parse.c: Rebuilt.
17168 2000-01-31 Jim Wilson <wilson@cygnus.com>
17170 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
17171 Store it in DECL_FCONTEXT.
17172 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
17174 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
17176 * tinfo.h (old abi): #include "tconfig.h".
17177 * tinfo.cc (convert_to_base): Move into old abi section.
17179 2000-01-31 Mark Mitchell <mark@codesourcery.com>
17181 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
17182 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
17183 (BINFO_PRIMARY_BINFO): New macro.
17184 (BF_DELTA): Rename to ...
17185 (BV_DELTA): ... this.
17186 (BF_VCALL_INDEX): Rename to ...
17187 (BV_VCALL_INDEX): ... this.
17188 (BF_FN): Rename to ...
17190 * class.c (build_vbase_path): Adjust for changes to reverse_path.
17191 (set_rtti_entry): Rename BF_ macros to BV_ variants.
17192 (modify_vtable_entry): Simplify.
17193 (add_virtual_function): Rename BF_ macros to BV_ variants.
17194 (build_vtable_initializer): Likewise.
17195 (get_class_offset_1): Remove.
17196 (dfs_get_class_offset): Likewise.
17197 (get_class_offset): Likewise.
17198 (dfs_find_final_overrider): New function.
17199 (find_final_overrider): Likewise.
17200 (modify_one_vtable): Remove.
17201 (dfs_find_base): New function.
17202 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
17203 find_final_overrider.
17204 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
17206 (dfs_fixup_vtable_deltas): Remove.
17207 (override_one_vtable): Remove.
17208 (merge_overrides): Likewise.
17209 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
17210 unreal chilren of virtual bases.
17211 (finish_struct_1): Don't use merge_overrides. Don't use
17212 dfs_fixup_vtable_deltas.
17213 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
17216 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
17217 Jason Merrill <jason@yorick.cygnus.com>
17219 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
17221 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
17223 * exception.cc (__throw_bad_typeid): Add missing std::.
17225 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17227 * cp-tree.h (make_thunk): PROTO -> PARAMS.
17229 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
17231 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
17233 Runtime support for new-abi rtti.
17234 * inc/typeinfo (type_info::operator!=): Define in class.
17235 (type_info::before, type_info::name, type_info::operator==,
17236 type_info::operator!=): Define new ABI implementations.
17237 (type_info::is_pointer_p, type_info::is_function_p): Declare
17238 new virtual functions.
17239 (type_info::do_catch, type_info::do_upcast): Likewise.
17241 * tinfo.h (__base_class_info): Define new class.
17242 (__class_type_info): Likewise.
17243 (__si_class_type_info): Likewise.
17244 (__vmi_class_type_info): Likewise.
17245 (__dynamic_cast): Prototype.
17247 * tinfo.cc: Conditionalize old and new rtti mechanisms.
17248 (type_info::is_pointer_p): Define new function.
17249 (type_info::is_function_p): Likewise.
17250 (type_info::do_catch): Likewise.
17251 (type_info::do_upcast): Likewise.
17252 (vtable_prefix): New structure for vtable access.
17253 (adjust_pointer): Define new template function.
17254 (contained_p, public_p, virtual_p, contained_public_p,
17255 contained_nonpublic_p, contained_nonvirtual_p): Define new
17257 (nonvirtual_base_type): New local variable.
17258 (__class_type_info::~__class_type_info): Define.
17259 (__si_class_type_info::~__si_class_type_info): Likewise.
17260 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
17261 (__class_type_info::do_catch): Define new function.
17262 (__class_type_info::do_upcast): Likewise.
17263 (__class_type_info::find_public_src): Likewise.
17264 (__class_type_info::do_find_public_src): Likewise.
17265 (__si_class_type_info::do_find_public_src): Likewise.
17266 (__vmi_class_type_info::do_find_public_src): Likewise.
17267 (__class_type_info::do_dyncast): Likewise.
17268 (__si_class_type_info::do_dyncast): Likewise.
17269 (__vmi_class_type_info::do_dyncast): Likewise.
17270 (__class_type_info::do_upcast): Likewise.
17271 (__si_class_type_info::do_upcast): Likewise.
17272 (__vmi_class_type_info::do_upcast): Likewise.
17273 (__dynamic_cast): Likewise.
17275 * tinfo2.cc (__fundamental_type_info): Define new class.
17276 (__pointer_type_info): Likewise.
17277 (__reference_type_info): Likewise.
17278 (__array_type_info): Likewise.
17279 (__function_type_info): Likewise.
17280 (__enum_type_info): Likewise.
17281 (__ptr_to_member_type_info): Likewise.
17282 (__fundamental_type_info::~__fundamental_type_info): Define.
17283 (__pointer_type_info::~__pointer_type_info): Likewise.
17284 (__reference_type_info::~__reference_type_info): Likewise.
17285 (__array_type_info::~__array_type_info): Likewise.
17286 (__function_type_info::~__function_type_info): Likewise.
17287 (__enum_type_info::~__enum_type_info): Likewise.
17288 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
17289 (__pointer_type_info::do_catch): Define new function.
17290 (__ptr_to_member_type_info::do_catch): Define new function.
17292 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
17293 (__is_pointer): Likewise.
17295 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
17297 2000-01-30 Mark Mitchell <mark@codesourcery.com>
17299 * cp/class.c (build_vtable): Rename to build_primary_vtable.
17300 (prepare_fresh_vtable): Rename to build_secondary_vtable.
17301 (make_new_vtable): New function.
17302 (modify_vtable_entry): Handle generation of new vtables correctly.
17303 (modify_one_vtable): Remove unused parameter.
17304 (dfs_fixup_vtable_deltas): Likewise.
17305 (override_one_vtable): Use build_secondary_vtable.
17306 (finish_struct_1): Use build_primary_vtable and
17307 build_secondary_vtable.
17309 2000-01-28 Ulrich Drepper <drepper@redhat.com>
17311 * cp/decl.c: Adjust variable names, comments, help strings.
17313 2000-01-29 Nathan Sidwell <nathan@acm.org>
17315 * new2.cc (operator delete[]): Use operator delete, don't assume
17318 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
17320 * class.c (build_vtbl_initializer): Add argument to
17321 build_vtable_entry call.
17323 2000-01-27 Mark Mitchell <mark@codesourcery.com>
17325 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
17326 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
17327 (BF_DELTA): New macro.
17328 (BF_VCALL_INDEX): Likewise.
17330 (THUNK_VCALL_OFFSET): Likewise.
17331 (make_thunk): Change prototype.
17332 * class.c (build_vtable_entry): Integrate
17333 build_vtable_entry_for_fn. Handle vcall indices.
17334 (build_vtable_entry_for_fn): Remove.
17335 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
17336 BF_VCALL_INDEX, BF_FN.
17337 (modify_vtable_entry): Integrate common code from
17338 modify_one_vtable and dfs_fixup_vtable_deltas.
17339 (add_virtual_function): Set BF_VCALL_INDEX.
17340 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
17342 (modify_one_vtable): Simplify.
17343 (dfs_fixup_vtable_deltas): Likewise.
17344 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
17345 * method.c (make_thunk): Handle vcall indices.
17347 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
17349 Compiler side new abi rtti (not enabled).
17350 * cp-tree.h (new_abi_rtti_p): New macro.
17351 (emit_support_tinfos): Prototype new function.
17352 (tinfo_decl_p): Likewise.
17353 (emit_tinfo_decl): Likwise.
17354 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
17356 (doing_runtime): New local static.
17357 (init_rtti_processing): Add new-abi initializer.
17358 (get_tinfo_decl): Add new-abi logic.
17359 (tinfo_from_decl): Likewise.
17360 (build_dynamic_cast_1): Likewise.
17361 (qualifier_flags): New static function.
17362 (tinfo_base_init): Likewise.
17363 (generic_initializer): Likewise.
17364 (ptr_ref_initializer): Likewise.
17365 (ptmd_initializer): Likewise.
17366 (class_hint_flags): Likewise.
17367 (class_initializer): Likewise.
17368 (synthesize_tinfo_var): Likewise.
17369 (create_real_tinfo_var): Likewise.
17370 (create_pseudo_type_info): Likewise.
17371 (get_vmi_pseudo_type_info): Likewise.
17372 (create_tinfo_types): Likewise.
17373 (emit_support_tinfos): New global function.
17374 (tinfo_decl_p): New global predicate.
17375 (emit_tinfo_decl): New global function.
17376 * class.c (set_rtti_entry): Generalize for old and new rtti.
17377 (build_vtbl_initializer): Likewise.
17378 * decl2.c (finish_file): Likewise.
17380 2000-01-27 Jim Wilson <wilson@cygnus.com>
17382 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
17383 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
17385 2000-01-27 Mike Stump <mrs@wrs.com>
17387 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
17390 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
17392 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
17394 2000-01-26 J"orn Rennecke <amylaar@cygnus.co.uk>
17396 * optimize.c (calls_setjmp_r): Supply new argument
17397 to special_function_p.
17399 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17401 * call.c: PROTO -> PARAMS.
17402 * class.c: Likewise.
17403 * cp-tree.h: Likewise.
17405 * decl.c: Likewise.
17406 * decl.h: Likewise.
17407 * decl2.c: Likewise.
17408 * dump.c: Likewise.
17409 * errfn.c: Likewise.
17410 * error.c: Likewise.
17411 * except.c: Likewise.
17412 * expr.c: Likewise.
17413 * init.c: Likewise.
17414 * input.c: Likewise.
17417 * method.c: Likewise.
17418 * optimize.c: Likewise.
17419 * parse.y: Likewise.
17421 * repo.c: Likewise.
17422 * rtti.c: Likewise.
17423 * search.c: Likewise.
17424 * semantics.c: Likewise.
17425 * spew.c: Likewise.
17426 * tree.c: Likewise.
17427 * typeck.c: Likewise.
17428 * typeck2.c: Likewise.
17429 * xref.c: Likewise.
17431 2000-01-25 Richard Henderson <rth@cygnus.com>
17433 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
17435 2000-01-25 Mark Mitchell <mark@codesourcery.com>
17437 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
17438 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
17439 (struct vcall_offset_data_s): New type.
17440 (dfs_vcall_offset_queue_p): New function.
17441 (dfs_build_vcall_offset_vtbl_entries): Likewise.
17442 (build_vcall_offset_vtbl_entries): Likewise.
17443 (layout_vtable_decl): Likewise.
17444 (num_vfun_entries): Likewise.
17445 (num_extra_vtbl_entries): Add the entries for vcall offsets.
17446 (build_vtbl_initializer): Likewise.
17447 (dfs_finish_vtabls): Use layout_vtable_decl.
17448 (modify_one_vtables): Always duplicate vtables under the new ABI.
17449 (finish_struct_1): Use layout_vtable_decl.
17451 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17453 * decl.c (member_function_or_else): Change third arg from a format
17454 specifier to an `enum overload_flags'. Callers changed.
17456 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
17458 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
17459 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
17460 build_const_cast, get_delta_difference, check_return_expr): Avoid
17461 ANSI string concatenation usage.
17463 2000-01-24 Mark Mitchell <mark@codesourcery.com>
17465 * class.c (layout_class_type): Put the fields required to make a
17466 class non-empty at the end, not the beginning, of the TYPE_FIELDs
17469 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
17471 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
17474 * decl2.c (mark_used): Do instantiate inlines that have been
17475 explicitly instantiated.
17477 2000-01-24 Richard Henderson <rth@cygnus.com>
17479 * call.c (build_over_call): Use expand_tree_builtin.
17480 * typeck.c (build_function_call_real): Likewise.
17481 (build_binary_op_nodefault): Handle unordered compares.
17483 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
17485 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
17486 cp_tree_index values.
17487 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
17488 New global node #defines for them.
17489 * rtti.c (call_void_fn): Replace with ...
17490 (build_runtime_decl): ... new static function.
17491 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
17492 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
17493 (build_dynamic_cast_1): Always produce correctly typed result.
17494 Explicitly produce type_info addresses. Use dynamic_cast_node.
17495 * exception.cc (__throw_bad_cast): Return `void *'.
17496 (__throw_bad_typeid): Return `const type_info &'.
17498 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
17500 * cp-tree.h (get_vtable_decl): Prototype new function.
17501 * class.c (get_vtable_decl): New function. Broken out from ...
17502 (build_vtable): ... here. Use it.
17503 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
17504 by get_vtable_decl.
17506 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
17508 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
17509 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
17510 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
17511 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
17512 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
17513 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
17514 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
17515 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
17516 (CPTI_TINFO_VAR_ID): New enumeration.
17517 (__tp_desc_type_node, __access_mode_type_node,
17518 __bltn_desc_type_node, __user_desc_type_node,
17519 __class_desc_type_node, __ptr_desc_type_node,
17520 __attr_desc_type_node, __func_desc_type_node,
17521 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
17522 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
17523 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
17524 enum_desc_type_node, class_desc_type_node,
17525 si_class_desc_type_node, vmi_class_desc_type_node,
17526 ptmd_desc_type_node, base_desc_type_node): New #defines.
17527 (tinfo_fn_id, tinfo_fn_type): Rename to ...
17528 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
17529 (tinfo_var_id): New enumeration.
17530 (DECL_TINFO_FN_P): Augment comment.
17531 * decl.c (cp_global_trees): Adjust documentation.
17532 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
17533 tinfo_decl_type and tinfo_var_id.
17534 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
17535 (build_typeid): Remove unused variable.
17536 (get_tinfo_var): Use tinfo_var_id.
17537 (tinfo_name): New static function.
17538 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
17539 (tinfo_from_decl): Likewise.
17540 (get_base_offset): New static function, broken out of
17542 (expand_si_desc): Use tinfo_name.
17543 (expand_class_desc): Likewise. Lose local static variable.
17544 Use base_desc_type_node. Use get_base_offset.
17545 (expand_ptr_desc): Use tinfo_name.
17546 (expand_attr_desc): Likewise.
17547 (expand_generic_desc): Likewise.
17549 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
17550 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
17552 2000-01-23 Mark Mitchell <mark@codesourcery.com>
17554 * cp-tree.h (__eprintf): Remove declaration.
17555 * tree.c (__eprintf): Remove definition.
17557 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
17558 Mark Mitchell <mark@codesourcery.com>
17560 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
17561 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
17563 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
17565 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
17567 2000-01-23 Mark Mitchell <mark@codesourcery.com>
17569 * cp-tree.h (register_dtor_fn): New function.
17570 * decl.c (destroy_local_static): Rename to ...
17571 (register_dtor_fn): ... this. Give it external linkage.
17572 (expand_static_init): Use it.
17573 * decl2.c (do_static_initialization): Likewise, if using
17575 (do_static_destruction): Check that __cxa_atexit is not in use.
17576 (finish_file): Don't call do_static_destruction if using
17579 * typeck.c (convert_arguments): Restore two-message error
17582 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
17584 Remap dynamic cast hint values to be consistent across ABIs.
17585 * search.c (dynamic_cast_base_recurse): Remap generated value.
17586 (get_dynamic_cast_base_type): Adjust documentation.
17587 * tinfo.h (__user_type_info::dyncast): Likewise.
17588 (__user_type_info::find_public_subobj): Remap BOFF meaning.
17589 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
17590 (__class_type_info::do_dyncast): Likewise.
17591 (__class_type_info::do_find_public_subobj): Likewise.
17592 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
17594 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
17596 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
17598 * typeck2.c (incomplete_type_error): Restore previous
17599 cp_error and cp_error_at call sequence.
17601 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
17603 * class.c (dump_class_hierarchy): Make format agree with argument;
17604 cast pointer to unsigned long and print with %lx.
17606 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
17608 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
17610 * typeck.c (composite_pointer_type, common_type,
17611 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
17612 build_function_call_real, convert_arguments,
17613 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
17614 build_unary_op, mark_addressable, build_compound_expr,
17615 build_static_cast, build_reinterpret_cast, build_const_cast,
17616 build_c_cast, build_modify_expr, get_delta_difference,
17617 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
17618 'ISO C++'. Fusion consecutive calls to diagnostic message routines
17620 * typeck2.c (readonly_error, abstract_virtuals_error,
17621 process_init_constructor, check_for_new_type): Likewise.
17623 2000-01-19 Mark Mitchell <mark@codesourcery.com>
17625 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
17628 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
17630 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
17631 (build_x_typeid): Likewise.
17632 (get_tinfo_fn): Likewise.
17633 (get_tinfo_fn_unused): Rename to ...
17634 (get_tinfo_decl): ... here.
17635 * rtti.c (build_headof): Replace logic error with assertion.
17636 (get_tinfo_fn_dynamic): Rename to ...
17637 (get_tinfo_decl_dynamic): ... here. Make static. Use
17638 complete_type_or_else.
17639 (build_x_typeid): Move into ...
17640 (build_typeid): ... here. Adjust call to
17641 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
17642 throw_bad_typeid expression.
17643 (get_tinfo_fn_unused): Rename to ...
17644 (get_tinfo_decl): ... here. Adjust comment.
17645 (get_tinfo_fn): Delete.
17646 (tinfo_from_decl): New static function.
17647 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
17648 (get_typeid): Use complete_type_or_else.
17649 (build_dynamic_cast_1): Adjust calls to
17650 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
17651 * parse.y (primary): Adjust call to build_typeid.
17652 * except.c (build_eh_type_type_ref): Adjust call to
17653 get_tinfo_decl. Mark as used.
17654 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
17655 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
17656 * parse.c: Regenerated.
17658 2000-01-17 Mark Mitchell <mark@codesourcery.com>
17660 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
17661 calling convention.
17662 (resolves_to_fixed_type_p): Document calling convention.
17663 * rtti.c (build_x_typeid): Initialize NONNULL.
17665 * cp-tree.h (build_shared_int_cst): New function.
17666 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
17667 * class.c (modify_vtable_entry): Likewise.
17668 (add_virtual_function): Split out code to generated shared
17669 INTEGER_CSTs to build_share_int_cst.
17670 (modify_all_vtables): Handle all the overridden functions here.
17671 Add overridden functions from non-primary virtual bases to the
17673 (finish_struct_1): Adjust call to modify_all_vtables. Add
17674 overridden functions from non-primary bases to the vtable.
17675 * tree.c (build_shared_int_cst): New function.
17677 * cp-tree.h (scratchalloc): Remove.
17678 (build_scratch_list): Likewise.
17679 * call.c (convert_class_to_reference): Replace build_scratch_list
17680 and build_expr_list with build_tree_list.
17681 (add_candidate): Replace scratchalloc with expralloc. Note memory
17683 (build_user_type_conversion_1): Replace build_scratch_list
17684 and build_expr_list with build_tree_list.
17685 (build_new_op): Likewise.
17686 (build_op_delete_call): Likewise.
17687 (convert_like): Likewise.
17688 * cvt.c (ocp_convert): Likewise.
17689 * decl.c (start_decl): Likewise.
17690 (start_function): Likewise.
17691 (finish_destructor_body): Likewise.
17692 (maybe_build_cleanup_1): Likewise.
17693 * decl2.c (reparse_decl_as_expr): Likewise.
17694 * init.c (perform_member_init): Likewise.
17695 (expand_cleanup_for_base): Likewise.
17696 (build_builtin_delete_call): Likewise.
17697 (build_new_1): Likewise.
17698 (build_delete): Likewise.
17699 * method.c (do_build_assign_ref): Likewise.
17700 * parse.y (already_scoped_stmt): Likewise.
17701 (nontrivial_exprlist): Likewise.
17702 (net_initializer): Likewise.
17703 (initlist): Likewise.
17704 * parse.c: Regenerated.
17705 * rtti.c (build_x_typeid): Likewise.
17706 (build_dynamic_cast_1): Likewise.
17707 * typeck.c (build_x_compound_expr): Likewise.
17708 (build_static_cast): Likewise.
17709 (build_modify_expr): Likewise.
17711 * cp-tree.h (DECL_VINDEX): Add documentation.
17712 * class.c (build_vtable_entry): Likewise.
17713 (start_vtable): Add comment.
17714 (add_virtual_function): Replace pending_hard_virtuals with
17715 overridden_virtuals and pending_virtuals with new_virtuals.
17716 Replace redundant assignments with assertions.
17717 (check_for_override): Add comment.
17718 (check_bases_and_members): Replace pending_hard_virtuals with
17719 overridden_virtuals and pending_virtuals with new_virtuals.
17720 (create_vtbl_ptr): Likewise.
17721 (layout_class_type): Likewise.
17722 (finish_struct_1): Likewise. Add comments.
17724 2000-01-16 Mark Mitchell <mark@codesourcery.com>
17726 * class.c (finish_struct_1): Replace redundant code with
17729 * cp-tree.h (flag_new_abi): Move.
17730 (flag_use_cxa_atexit): Likewise.
17731 (flag_honor_std): Likewise.
17732 (flag_rtti): Likewise.
17733 (vbase_offsets_in_vtable_p): Define.
17734 (vptrs_present_everywhere_p): Likewise.
17735 (TYPE_CONTAINS_VPTR_P): Likewise.
17736 (dfs_walk_real): Declare.
17737 * class.c (build_vbase_pointer_fields): Check
17738 vbase_offsets_in_vtable_p.
17739 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
17741 (build_vbase_offset_vtbl_entries): Simplify.
17742 (build_vbase_offset_vtbl_entries): Adjust.
17743 (build_vbase_pointer): Add ability to look up vbase offsets in
17745 (start_vtable): New function.
17746 (add_virtual_function): Use it.
17747 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
17748 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
17749 (build_vtbl_initializer): Take the type of the complete object as
17750 input. Use it to correctly calculate vbase offsets.
17751 (dfs_finish_vtbls): Pass the complete type to
17752 build_vtbl_initializer.
17753 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
17754 (create_vtable_ptr): Create a vtable even if there are no
17755 new virtual functions, under the new ABI.
17756 (finish_struct_1): Likewise.
17757 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
17758 * decl.c (exapnd_static_init): Remove call to
17759 preserve_initializer.
17760 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
17762 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
17763 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
17764 (construct_virtual_bases): Don't initialize virtual base pointers
17766 (build_aggr_init): Clean up comment.
17767 (expand_aggr_init_1): Likewise.
17768 * rtti.c (expand_class_desc): Store the virtual function table
17769 index where the vbase offset lives in the offset field.
17770 * search.c (dfs_walk_real): Make it global.
17771 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
17772 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
17774 * tinfo.h (USItype): Make it signed under the new ABI.
17775 * tinfo.cc (convert_to_base): New function. Encapsulate base
17776 conversion logic here.
17777 (__class_type_info::do_upcast): Use it.
17778 (__class_type_info::do_dyncast): Likewise.
17779 (__class_type_info::do_find_public_subobj): Likewise.
17781 * init.c (construct_virtual_bases): Don't look up the addresses of
17782 virtual bases at run-time.
17784 * class.c (build_vbase_pointer): Relocate.
17785 (build_vbase_pointer_fields): Likewise.
17786 (dfs_build_vbase_offset_vtbl_entries): Likewise.
17787 (build_vbase_offset_vtbl_entries): Likewise.
17789 * decl.c (init_decl_processing): Complain if -fnew-abi
17790 -fno-vtable-thunks is used.
17792 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
17795 2000-01-15 Mark Mitchell <mark@codesourcery.com>
17797 * cp-tree.h (num_extra_vtbl_entries): New function.
17798 (size_extra_vtbl_entries): Likewise.
17799 (dfs_vtable_path_unmark): Likewise.
17800 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
17801 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
17802 * class.c (num_extra_vtbl_entries): New function.
17803 (size_extra_vtbl_entries): Likewise.
17804 (dfs_build_vbase_offset_vtbl_entries): New function.
17805 (build_vbase_offset_vtbl_entries): Likewise.
17806 (build_vtbl_initializer): Use it.
17807 (finish_struct_1): Adjust vtable sizes (using
17808 num_extra_vtbl_entries).
17809 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
17810 THUNK_DECL is non-NULL before expanding it.
17811 * init.c (expand_virtual_init): Adjust the vtable pointer by
17812 size_extra_vtbl_entries before storing it.
17813 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
17814 Handle TREE_LIST parameters here, not in the dfs_* functions.
17815 (dfs_unmarked_real_bases_queue_p): Adjust.
17816 (dfs_marked_real_bases_queue_p): Likewise.
17817 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
17818 (dfs_vtable_path_marked_real_bases_queue_p): New function.
17819 (dfs_vtable_path_unmark): Likewise.
17821 2000-01-14 Mark Mitchell <mark@codesourcery.com>
17823 * optimize.c (copy_body_r): Clear the operand three of a
17824 TARGET_EXPR when copying it.
17826 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17828 * method.c (build_decl_overload_real): Check whether we are in ::
17829 before returning __builtin_new/delete.
17831 2000-01-13 Mark Mitchell <mark@codesourcery.com>
17833 * pt.c (tsubst_friend_function): Improve comment.
17834 (instantiate_decl): Avoid crashing when a "nested" function is
17835 instantiated from the top level.
17837 * dump.c (dqeueue_and_dump): Dump
17838 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
17840 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17842 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
17844 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
17846 * g++spec.c (lang_specific_driver): Add -fnew-abi if
17847 ENABLE_NEW_GXX_ABI defined.
17848 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
17849 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
17850 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
17852 2000-01-12 Mark Mitchell <mark@codesourcery.com>
17854 * decl.c (start_cleanup_fn): Call pushdecl.
17856 * call.c (convert_class_to_reference): Fix typos.
17857 (build_conditional_expr): Handle errors gracefully.
17858 * class.c (push_nested_class): Likewise.
17859 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
17860 (DECL_THIS_EXTERN): Use it.
17861 (DECL_THIS_STATIC): Likewise.
17862 * cvt.c (convert_to_void): Handle errors gracefully.
17863 (build_expr_type_conversion): Likewise.
17864 * decl.c (maybe_push_decl): Likewise.
17865 (start_decl_1): Likewise.
17866 (require_complete_types_for_parms): Likewise.
17867 * parse.y (structsp): Likewise.
17868 (base_class): Likewise.
17869 * parse.c: Regenerated.
17870 * pt.c (finish_member_template_decl): Likewise.
17871 * typeck.c (decay_conversion): Likewise.
17873 * cp-tree.h (dfs_skip_vbases): New function.
17874 (find_vbase_instance): Likewise.
17875 * class.c (determine_primary_base): Allow a nearly empty base to
17876 serve as a primary base class under the new ABI.
17877 (get_class_offset_1): Rename to ...
17878 (dfs_get_class_offset): ... this. Simplify. Don't issue error
17880 (get_class_offset): Use it. Issue error messages here.
17881 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
17882 find the right copies of virtual bases.
17883 (fixup_vtable_deltas1): Rename to ...
17884 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
17885 bases as primary bases.
17886 (fixup_vtable_deltas): Remove.
17887 (override_one_vtable): Handle virtual bases as primary bases.
17888 (merge_overrides): Likewise.
17889 (finish_struct_1): Likewise.
17890 (dump_class_hierarchy): Dump primary-ness of bases as well.
17891 * search.c (mark_primary_bases): Use a pre-order traversal to
17892 handle primary virtual bases.
17893 (dfs_skip_vbases): New fiunction.
17894 (expand_upcast_fixups): Adjust to handle primary virtual bases.
17895 (fixup_virtual_upcast_offsets): Likewise.
17896 (fixup_all_virtual_upcast_offsets): Likewise.
17897 (dfs_find_vbase_instances): New function.
17898 (find_vbase_instance): Likewise.
17900 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
17902 * lex.c (DIR_SEPARATOR): Delete macro.
17904 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
17906 * decl2.c (lang_decode_option): Handle automatic line wrapping
17909 2000-01-11 Mark Mitchell <mark@codesourcery.com>
17911 * friend.c (do_friend): Don't resolve scopes when processing
17912 template declarations, even if the qualifying scope doesn't
17913 involve template parameters.
17915 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
17917 * class.c (dfs_modify_vtables_queue_p): Remove.
17918 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
17919 and dfs_marked_real_bases_queue_p instead of
17920 dfs_modify_vtables_queue_p.
17922 * class.c (build_vbase_path): Simplify.
17923 (dfs_propagate_binfo_offsets): New function.
17924 (propagate_binfo_offsets): Use it.
17925 (remove_base_field): Simplify.
17926 (dfs_set_offset_for_vbases): Remove.
17927 (dfs_set_offset_for_shared_vbases): New function.
17928 (dfs_set_offset_for_unshared_vbases): Likewise.
17929 (layout_virtual_bases): Use them.
17930 (layout_basetypes): Don't call propagate_binfo_offsets.
17931 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
17934 * class.c (build_base_field): New function, split out from ...
17935 (build_base_fields): ... here. Use it. Allocate primary bases
17936 first, under the new ABI.
17937 (get_vtable_entry): Remove.
17938 (remove_base_field): New function, split out from ...
17939 (remove_base_fields): ... here. Adjust since primary bases come
17940 first under the new ABI.
17942 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
17943 (initialize_vtbl_ptrs): New function.
17944 (expand_indirect_vtbls_init): Change prototype.
17945 (convert_pointer_to_vbase): Declare.
17946 * init.c (expand_direct_vtbls_init): Remove.
17947 (dfs_initialize_vtbl_ptrs): New function.
17948 (initialize_vtbl_ptrs): Likewise.
17949 (emit_base_init): Use initialize_vtbl_ptrs.
17950 * search.c (convert_pointer_to_vbase): Make it global.
17951 (expand_indirect_vtbls_init): Remove vtable initialization code.
17952 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
17954 * class.c (dfs_finish_vtbls): New function.
17955 (finish_vtbls): Use it.
17956 (dump_class_hierarchy): New function.
17958 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
17959 (BINFO_VBASE_PRIMARY_P): New macro.
17960 (BINFO_VIRTUALS): Add to documentation.
17961 (SET_BINFO_PRIMARY_MARKED_P): Remove.
17962 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
17963 (dfs_mark_primary_bases_queue_p): Likewise.
17964 (dfs_unmarked_real_bases_queue_p): New function.
17965 (dfs_marked_real_bases_queue_p): Likewise.
17966 * search.c (dfs_mark_primary_bases): Adjust.
17967 (mark_primary_bases): Likewise.
17968 (get_shared_vbase_if_not_primary): New function.
17969 (dfs_unmarked_real_bases_queue_p): Likewise.
17970 (dfs_marked_real_bases_queue_p): Likewise.
17971 (dfs_get_pure_virtuals): Simplify.
17972 (get_pure_virtuals): Likewise.
17974 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17976 * lex.c: Include tm_p.h.
17978 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
17980 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
17982 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
17984 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
17985 * pt.c (instantiate_decl): Defer comdat templates that might not be
17988 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
17989 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
17990 (finish_file): Likewise.
17992 * decl2.c (import_export_class): Undo 12/14 change.
17994 * error.c (dump_decl): operator new, not operatornew.
17996 * class.c (field_decl_cmp): A nontype is "greater" than a type.
17997 * search.c (lookup_field_1): Look for the last field with the
18000 2000-01-05 Nathan Sidwell <nathan@acm.org>
18002 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
18005 2000-01-05 Nathan Sidwell <nathan@acm.org>
18007 * typeck.c (build_static_cast): Don't strip target qualifiers
18008 when casting from a class.
18010 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18012 * class.c (warn_hidden): Initialize variable `fndecl'.
18014 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
18016 * decl.c (flag_isoc9x): New variable to be able to use code in
18017 c-common.c. For now always zero.
18019 2000-01-03 Mark Mitchell <mark@codesourcery.com>
18021 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
18022 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
18023 or unshare_base_binfos for virtual bases here.
18024 * search.c (dfs_get_vbase_types): Do it here.
18025 (get_vbase_types): Adjust.
18027 2000-01-02 Mark Mitchell <mark@codesourcery.com>
18029 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
18030 (BINFO_PRIMARY_MARKED_P): Use flag 5.
18031 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
18032 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
18033 (unmark_primary_bases): Remove declaration.
18034 (unmarkedp): Declare.
18035 (dfs_vbase_unmark): Likewise.
18036 * class.c (determine_primary_base): Return immediately if there
18037 are no base classes. Call mark_primary_bases here.
18038 (modify_all_direct_vtables): Remove.
18039 (modify_all_indirect_vtables): Remove.
18040 (dfs_modify_vtables_queue_p): New function.
18041 (dfs_modify_vtables): New function.
18042 (modify_all_vtables): Use them.
18043 (build_base_fields): Build FIELD_DECLs for primary virtual base
18045 (create_vtable_ptr): Don't call determine_primary_base here.
18046 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
18047 (dfs_set_offset_for_vbases): ... this.
18048 (layout_virtual_bases): Use it.
18049 (layout_class_type): Call determine_primary_base here.
18050 * search.c (unmarkedp): Make it global.
18051 (shared_marked_p): Simplify.
18052 (shared_unmarked_p): Likewise.
18053 (dfs_primary_bases_queue_p): Remove.
18054 (dfs_unmark_primary_bases): Likewise.
18055 (unmark_primary_bases): Likewise.
18056 (mark_primary_bases): Simplify.
18057 (get_pure_virtuals): Don't call mark_primary_bases here.
18058 (dfs_vbase_unmark): New function.
18059 (get_vbase_types): Simplify.
18061 * class.c (struct base_info): Remove.
18062 (determine_primary_base): Take has_virtual_p rather than a
18063 base_info as input. Don't calculate max_has_virtual.
18064 (finish_struct_bits): Remove max_has_virtual argument.
18065 (create_vtable_ptr): Remove max_has_virtual_p argument.
18066 (layout_virtual_bases): Remove max argument.
18067 (layout_basetypes): Likewise.
18068 (layout_class_type): Remove max_has_virtual_p argument.
18069 (finish_struct_1): Remove max_has_virtual.
18071 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
18072 (layout_basetypes): Remove.
18073 * class.c (propagate_binfo_offsets): Moved here from tree.c.
18074 Update to handle primary virtual bases.
18075 (remove_base_fields): New function, split out from
18077 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
18078 (layout_virtual_bases): New function, split out from
18079 layout_basetypes. Update to handle primary virtual bases.
18080 (layout_basetypes): Moved here from tree.c. Use
18081 remove_base_fields and layout_virtual_bases.
18082 * search.c (dfs_mark_primary_bases_queue_p): New function.
18083 (mark_primary_bases): Use it.
18084 * tree.c (CEIL): Remove.
18085 (propagate_binfo_offsets): Remove.
18086 (layout_basetypes): Remove.
18088 2000-01-01 Mark Mitchell <mark@codesourcery.com>
18090 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
18091 (BINFO_PRIMARY_MARKED_P): New macro.
18092 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
18093 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
18094 (mark_primary_bases): New function.
18095 (unmark_primary_bases): Likewise.
18096 * search.c (get_abstract_virtuals_1): Remove.
18097 (dfs_mark_primary_bases): New function.
18098 (mark_primary_bases): Likewise.
18099 (dfs_unmark_primary_bases): Likewise.
18100 (unmark_primary_bases): Likewise.
18101 (dfs_get_pure_virtuals): Likewise.
18103 2000-01-01 Mark Mitchell <mark@codesourcery.com>
18105 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
18106 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
18107 (modify_one_vtable): Adjust.
18108 (fixup_vtable_deltas1): Likewise.
18109 (override_one_vtable): Likewise.
18110 * search.c (get_abstract_virtuals_1): Likewise.
18111 (get_pure_virtuals): Likewise.
18112 (expand_upcast_fixups): Likewise.
18113 * tree.c (debug_binfo): Likewise.
18115 * class.c (build_vtable): Don't return a value. Don't rebuild
18116 vtables for bases that have already been handled.
18117 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
18118 already been handled.
18119 (modify_one_vtable): Adjust accordingly.
18120 (fixup_vtable_deltas1): Likewise.
18121 (finish_struct_1): Likewise.
18123 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18125 * call.c (build_new_method_call): Also check destructors.