1 2003-05-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4 * pt.c (instantiate_decl): Don't use full template arguments if
5 we are dealing with specializations.
7 2003-05-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
9 * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
10 (binding_depth): Unconditionally define.
11 (is_class_level): Likewise.
12 (indent): Likewise. Take an indenting parameter.
13 (push_binding_level): Remove conditional definittion.
14 (pop_binding_level): Likewise.
15 (suspend_binding_level): Likewise.
16 (resume_binding_level): Likewise.
17 (pushlevel): Likewise.
18 (pushlevel_class): Likewise.
19 (poplevel_class): Likewise.
20 (pop_everything): Likewise.
22 2003-05-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
24 * name-lookup.h (global_scope_p): New macro.
25 * decl.c (pop_binding_level): Use it. Don't refer directly to
27 (suspend_binding_level): Likewise.
28 (global_bindings_p): Likewise.
29 (print_other_binding_stack): Likewise.
30 (print_binding_stack): Likewise.
31 (maybe_push_to_top_level): Likewise.
32 (pushdecl_namespace_level): Likewise.
33 (cxx_init_decl_processing): Likewise.
34 (start_decl): Likewise.
35 (cp_finish_decl): Likewise.
36 (start_function): Likewise.
37 (global_binding_level): Remove.
39 2003-05-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
41 * parser.c (cp_parser_explicit_instantiation): Restore old
42 access before template instantiation.
44 2003-05-23 Geoffrey Keating <geoffk@apple.com>
46 * lang-specs.h: Use -o to specify preprocessor's output file.
47 Make -no-integrated-cpp work when building PCH files.
49 2003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
52 * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
53 check for implicitly created typedef to an enum.
55 2003-05-21 Jason Merrill <jason@redhat.com>
57 * init.c (build_vec_delete): Copy the address into a temporary
58 variable before calling build_vec_delete_1.
59 * decl2.c (delete_sanity): Don't call stabilize_reference.
61 2003-05-21 Nathan Sidwell <nathan@codesourcery.com>
63 * pt.c (register_specialization): Update the decl's location,
65 (check_explicit_specialization): Likewise.
67 2003-05-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
69 * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
71 2003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
74 * decl.c (duplicate_decls): Re-invoke make_decl_rtl
75 if the old decl had instantiated DECL_RTL.
76 (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
78 2003-05-19 Matt Austern <austern@apple.com>
80 * lang-options.h: Document -Wno-invalid-offsetof
81 * typeck.c (build_class_member_access_expr): Don't complain about
82 (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
84 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
86 * name-lookup.c (free_binding_entry): fix where the GTY markers are.
87 (binding_entry_make): Make entry->chain NULL after getting an entry.
88 fix the spelling of chain in a comment.
89 (binding_table_free): speed up by having temporary variable.
90 (binding_table_new): set table->chain to be NULL after allocating
92 (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
93 binding->previous to NULL after getting an binding for speed.
95 2003-05-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
97 * cp-tree.h (struct lang_type_class): Replace data member tags
98 with hash-table nested_udts.
99 (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
100 * class.c (unreverse_member_declarations): Don't touch
102 (pushclass): Use cxx_remember_type_decls.
103 * decl.c (struct cp_binding_level): Replace data member tags with
104 hash-table type_decls.
105 (pop_binding_level): Handle level->type_decls.
106 (kept_level_p): Adjust.
107 (poplevel): Remove unused local variable.
108 (bt_print_entry): New function.
109 (print_binding_level): Use it.
110 (push_namespace): Build current_binding_level->type_decls.
111 (maybe_process_template_type_declaration): Adjust.
113 (clear_anon_tags): Use binding_table_remove_anonymous_types.
115 (cxx_remember_type_decls): Rename from storetags. Adjust.
116 (lookup_tag): Use binding_table_find_anon_type. Tidy.
117 (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
118 (cxx_init_decl_processing): Build global_binding_level->type_decls.
119 (store_parm_decls): Remove pointless code.
120 * name-lookup.c (free_binding_entry): New variable.
121 (ENTRY_INDEX): New macro.
122 (struct binding_table_s): New datatype.
123 (binding_entry_make): New function.
124 (binding_entry_free): Likewise.
125 (binding_table_construct): Likewise.
126 (binding_table_free): Likewise.
127 (binding_table_new): Likewise.
128 (binding_table_expand): Likewise.
129 (binding_table_insert): Likewise.
130 (binding_table_find): Likewise.
131 (binding_table_find_anon_type): Likewise.
132 (binding_table_reverse_maybe_remap): Likewise.
133 (binding_table_remove_anonymous_types): Likewise.
134 (binding_table_foreach): Likewise.
135 * name-lookup.h (binding_table): New type.
136 (binding_entry): Likewise.
137 (bt_foreach_proc): Likewise.
138 (struct binding_entry_s): New datatype.
139 (SCOPE_DEFAULT_HT_SIZE): New macro.
140 (CLASS_SCOPE_HT_SIZE): Likewise.
141 (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
142 (NAMESPACE_STD_HT_SIZE): Likewise.
143 (GLOBAL_SCOPE_HT_SIZE): Likewise.
144 (binding_table_new): Declare.
145 (binding_table_free): Likewise.
146 (binding_table_insert): Likewise.
147 (binding_table_find_anon_type): Likewise.
148 (binding_table_reverse_maybe_remap): Likewise.
149 (binding_table_remove_anonymous_types): Likewise.
150 (binding_table_foreach): Likewise.
151 (binding_table_find): Likewise.
152 (cxx_remember_type_decls): Likewise.
153 * pt.c (bt_instantiate_type_proc): New function.
154 (do_type_instantiation): Use it.
155 * search.c (lookup_field_r): Use binding_table_find.
157 2003-05-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
159 * semantics.c (perform_deferred_access_checks): Don't discard
162 2003-05-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
164 * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
165 libiberty VA_ macros, always use stdarg.
166 * rtti.c (create_pseudo_type_info): Likewise.
167 * tree.c (build_min_nt, build_min): Likewise.
169 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
171 * ptree.c (cxx_print_type, cxx_print_xnode): Use string
172 concatentation on HOST_WIDE_INT_PRINT_* format specifier to
173 collapse multiple function calls into one.
174 * tree.c (debug_binfo): Likewise.
176 2003-05-15 Jason Merrill <jason@redhat.com>
179 * call.c (conditional_conversion): Don't consider implicit
180 conversions if T2 is a base of T1.
181 * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
182 (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
184 * parser.c (cp_parser_primary_expression): Convert a static data
185 member from reference.
187 2003-05-15 Mark Mitchell <mark@codesourcery.com>
189 * call.c (build_op_delete_call): Avoid creating unnecessary types.
190 * class.c (instantiate_type): Remove tests for tf_no_attributes.
191 * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
192 (COMPARE_NO_ATTRIBUTES): Remove.
193 * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
196 * semantics.c (finish_typeof): Refine type-dependency check.
198 2003-05-13 Jason Merrill <jason@redhat.com>
200 * typeck.c (build_modify_expr): Don't always stabilize the lhs and
201 rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
203 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
205 * method.c (synthesize_method): Call push/pop_deferring_access_checks.
207 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
209 PR c++/10230, c++/10481
210 * semantics.c (finish_non_static_data_member): Handle when the
211 non-static member is not from a base of the current class type.
213 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
216 * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
217 template and has dependent context.
219 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
221 * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
223 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
226 * cp-tree.h (saved_scope): Remove check_access field.
227 (tsubst_flags_t): Remove tf_parsing.
228 * decl.c (maybe_push_to_top_level): Don't initialize
229 scope_chain->check_access.
230 (make_typename_type, make_unbound_class_template): Don't use
232 (register_dtor_fn): Use push/pop_deferring_access_checks
233 instead of scope_chain->check_access.
234 * method.c (use_thunk): Likewise.
235 * parser.c (cp_parser_explicit_instantiation
236 (cp_parser_constructor_declarator_p): Don't call
237 push/pop_deferring_access_checks here.
238 (cp_parser_template_argument, cp_parser_class_name): Don't use
240 (yyparse): Check flag_access_control.
241 * pt.c (instantiate_class_template): Call
242 push/pop_deferring_access_checks.
243 * semantics.c (push_deferring_access_checks): Propagate
245 (perform_or_defer_access_check): Make sure basetype_path is
246 a type before comparison.
247 * call.c (build_op_delete_call, build_over_call): Use
248 perform_or_defer_access_check.
249 * class.c (alter_access): Likewise.
250 * init.c (build_offset_ref): Likewise.
251 * lex.c (do_identifier): Likewise.
252 * method.c (hack_identifier): Likewise.
253 * search.c (lookup_member): Likewise.
254 * semantics.c (finish_non_static_data_member): Likewise.
255 (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
256 instead of flag_access_control.
258 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
261 * parser.c (cp_parser_class_name): Remove check_access parameter.
262 All caller adjusted. Update declaration.
263 (cp_parser_lookup_name): Likewise.
264 * semantics.c (push_deferring_access_checks): Change parameter type
265 to enum deferring_kind. All caller adjusted.
266 (resume_deferring_access_checks): Adjust to use new enum.
267 (stop_deferring_access_checks): Likewise.
268 (perform_or_defer_access_check): Likewise.
269 * cp-tree.h (deferring_kind): New enum.
270 (deferred_access): Adjust field type.
271 (push_deferring_access_checks): Update declaration.
273 2003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
275 PR c++/10555, c++/10576
276 * pt.c (lookup_template_class): Handle class template with
277 multiple levels of parameters when one of the levels contain
280 2003-05-08 Jason Merrill <jason@redhat.com>
282 * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
283 expression. Undo some of the recent reorg.
285 2003-05-07 Richard Henderson <rth@redhat.com>
288 * cfns.gperf: Comment out POSIX thread cancellation points,
289 plus abort and raise.
290 * cfns.h: Regenerate.
292 2003-05-07 Jason Merrill <jason@redhat.com>
294 * call.c (build_conditional_expr): Don't assume that the folded
295 expression has result_type.
297 2003-05-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
299 * typeck.c (build_unary_op): Deal with const qualifier in
300 invalid pointer-to-member earlier.
302 2003-05-05 Jason Merrill <jason@redhat.com>
305 * call.c (conditional_conversion): Build an RVALUE_CONV if
306 we're just changing the cv-quals.
307 (build_conditional_expr): Don't call convert to change
310 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
313 * typeck.c (build_unary_op): Don't output const qualifier when
314 output invalid pointer-to-member diagnostics.
316 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
320 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
323 * decl.c (start_function): Use same_type_p to check return type
326 2003-05-03 Zack Weinberg <zack@codesourcery.com>
329 * cp/typeck.c (build_x_compound_expr): No need to check
330 extra_warnings as well as warn_unused_value.
332 2003-05-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
334 PR c++/9364, c++/10553, c++/10586
335 * decl.c (make_typename_type): Don't crash on illegal code.
337 2003-05-03 Nathan Sidwell <nathan@codesourcery.com>
339 * class.c (finish_struct): Use location_t and input_location
341 * decl.c (make_label_decl): Likewise.
342 (use_label): Likewise.
343 * decl2.c (warn_if_unknown_interface): Likewise.
344 (start_static_initialization_or_destruction): Likewise.
345 (generate_ctor_or_dtor_function): Likewise.
346 (finish_file): Likewise.
347 * error.c (print_instantiation_full_context): Likewise.
348 * init.c (create_temporary_var): Likewise.
349 * method.c (synthesize_method): Likewise.
350 * parser.c (cp_token): Likewise.
351 (cp_lexer_set_source_position_from_token): Likewise.
352 (cp_lexer_get_preprocessor_token): Likewise.
353 (cp_parser_statement): Likewise.
354 * pt.c (tsubst_friend_function): Likewise.
355 (instantiate_class_template): Likewise.
356 (tsubst_decl): Likewise.
358 (instantiate_decl): Likewise.
359 * semantics.c (begin_class_definition): Likewise.
360 (expand_body): Likewise.
362 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
364 * class.c (finish_struct): Rename lineno to input_line.
365 * decl.c (push_binding_level, pop_binding_level,
366 suspend_binding_level, resume_binding_level, make_label_decl,
367 use_label, start_function): Likewise.
368 * decl2.c (warn_if_unknown_interface,
369 start_static_initialization_or_destruction,
370 generate_ctor_or_dtor_function, finish_file): Likewise.
371 * error.c (cp_line_of, print_instantiation_full_context,
372 print_instantiation_context): Likewise.
373 * except.c (check_handlers_1, check_handlers): Likewise.
374 * init.c (create_temporary_var): Likewise.
375 * method.c (use_thunk, synthesize_method): Likewise.
376 * parser.c (cp_lexer_set_source_position_from_token,
377 cp_lexer_get_preprocessor_token): Likewise.
378 * pt.c (push_tinst_level, pop_tinst_level,
379 tsubst_friend_function, instantiate_class_template, tsubst_decl,
380 tsubst, tsubst_expr, instantiate_decl): Likewise.
381 * semantics.c (genrtl_try_block, finish_label_stmt,
382 begin_class_definition, expand_body,
383 genrtl_finish_function): Likewise.
384 * tree.c (build_min_nt, build_min): Likewise.
386 2003-05-01 Mark Mitchell <mark@codesourcery.com>
388 * decl2.c (comdat_linkage): Don't externalize explicit
391 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
394 * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
397 2003-05-01 Steven Bosscher <steven@gcc.gnu.org>
399 * cp-tree.h (struct lang_id2): Remove. Move fields from here...
400 (struct lang_identifier): ... to here.
401 (LANG_ID_FIELD): Remove.
402 (SET_LANG_ID): Remove.
403 (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
404 (SET_IDENTIFIER_LABEL_VALUE): Likewise.
405 (IDENTIFIER_IMPLICIT_DECL): Likewise.
406 (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
407 (IDENTIFIER_ERROR_LOCUS): Likewise.
408 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
410 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
413 * pt.c (convert_template_argument): Correct diagnostic.
415 2003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
417 PR c++/9432, c++/9528
418 * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
420 2003-04-30 Garbiel Dos Reis <gcc@integrable-solutions.net>
422 * decl.c (check_previous_goto_1): Adjust prototype.
423 (check_previous_goto): Adjust use.
424 (check_switch_goto): Likewise.
426 (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
427 (struct named_label_use_list): Use location_t datatype.
429 2003-04-29 Mark Mitchell <mark@codesourcery.com>
432 * pt.c (mark_decl_instantiated): Defer all explicit instantiations
433 that have not yet been written out.
435 2003-04-29 Mark Mitchell <mark@codesourcery.com>
438 * class.c (layout_class_type): Mark overlong bitfields as having
439 the maximum size permitted by their type, after layout.
442 * error.c (dump_expr): Correctly handling of NEW_EXPR.4
444 2003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
446 * call.c (build_operator_new_call): Fix typo.
447 * lang-options.h: Likewise.
449 2003-04-29 Mark Mitchell <mark@codesourcery.com>
452 * cp-tree.h (lookup_field_1): Declare it.
453 * search.c (lookup_field_1): Make it public.
454 * decl.c (reshape_init): Handle designated initializers.
456 * decl.c (maybe_commonize_var): Further tweak support for systems
457 without weak symbols.
459 2003-04-27 Mark Mitchell <mark@codesourcery.com>
461 * decl.c (maybe_commonize_var): Fix thinko in last patch.
463 2003-04-27 Mark Mitchell <mark@codesourcery.com>
466 * method.c (use_thunk): Decrement immediate_size_expand.
469 * cp-tree.h (DECL_VAR_MARKED_P): New macro.
470 (DECL_MAYBE_TEMPLATE): Remove.
471 * class.c (fixed_type_or_null): Avoid infinite recursion.
473 * decl.c (maybe_commonize_var): Make the code match the comments.
474 * pt.c (instantiate_decl): Move call to import_export_decl.
476 2003-04-26 Mark Mitchell <mark@codesourcery.com>
478 * decl2.c (finish_file): Fix merge botch.
480 2003-04-25 Mark Mitchell <mark@codesourcery.com>
482 * decl2.c (finish_file): Don't call import_export_decl for
483 functions that are not defined.
484 (handle_class_head): Robustify.
485 * pt.c (instantiate_decl): Do not call cp_finish_decl for
486 variables that are not defined.
488 2003-04-24 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
490 * call.c (print_z_candidates): Fix off by one error.
492 2003-04-24 Nathan Sidwell <nathan@codesourcery.com>
495 * call.c (joust): Don't warn about conversion ops that are exact
496 or cv-conversions. Rearrange to avoid multiple type comparisons.
498 2003-04-23 Mark Mitchell <mark@codesourcery.com>
501 * call.c (build_cxx_call): Robustify.
503 2003-04-23 Neil Booth <neil@daikokuya.co.uk>
505 * Make-lang.in (lex.o): Remove mbchar.h.
506 * lex.c (MULTIBYTE_CHARS): Lose.
507 * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
510 2003-04-23 Mark Mitchell <mark@codesourcery.com>
513 * cp-tree.h (duplicate_tag_error): Remove.
514 * class.c (duplicate_tag_error): Remove.
515 * semantics.c (begin_class_definition): Return immediately for a
516 duplicate class definition.
519 * decl.c (grokdeclarator): Correct logic for "mutable" errors.
521 2003-04-22 Mark Mitchell <mark@codesourcery.com>
524 * search.c (lookup_fnfields_1): Handle empty slots in the method
528 * decl.c (check_elaborated_type_specifier): New function, split
530 (xref_tag): ... here. Use the new function in more places.
532 * rtti.c (throw_bad_typeid): Use build_cxx_call.
534 2003-04-21 Mark Mitchell <mark@codesourcery.com>
536 * call.c (build_over_call): Use build_cxx_call.
537 (build_cxx_call): New method, split out of build_over_call.
538 * cp-tree.h (language_function): Add can_throw.
539 (build_cxx_call): Declare it.
540 * decl.c (finish_function): If a function does not contain any
541 calls to functions that can throw an exception, indicate that
543 * decl2.c (mark_used): Do not defer the instantiation of
544 functions, if the current function does not throw.
545 * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
546 * pt.c (instantiate_decl): Make sure import_export_decl is called
547 before emitting things.
548 * rtti.c (throw_bad_cast): Use build_cxx_call.
549 (build_dynamic_cast_1): Likewise.
550 * typeck.c (build_function_call): Likewise.
552 2003-04-21 Nathan Sidwell <nathan@codesourcery.com>
555 * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
556 expressions. Reverts my 2002-08-08 patch.
558 * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
561 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
563 * cp/decl2.c (start_static_storage_duration_function): Take count
564 arg, don't check if it wraps round.
565 (generate_ctor_or_dtor_function): Add locus arg, use it.
566 (generate_ctor_and_dtor_functions_for_priority): Data arg is a
568 (finish_file): Set line numbers to past EOF for synthesized
571 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
574 * search.c (lookup_field_1): Final scan goes backwards for
575 types, forwards for non-types.
577 2003-04-17 Roger Sayle <roger@eyesopen.com>
580 * decl.c (duplicate_decls): Preserve "const", "noreturn" and
581 "nothrow" function attributes.
583 2003-04-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
586 * pt.c (type_dependent_expression_p): Handle array new.
588 2003-04-15 Mark Mitchell <mark@codesourcery.com>
591 * parser.c (cp_parser_primary_expression): Reorganize logic for
592 dealing with name lookup failures.
594 2003-04-15 Jason Merrill <jason@redhat.com>
596 * decl2.c (mark_used): Don't instantiate anything if
599 2003-04-14 Ziemowit Laski <zlaski@apple.com>
601 * tree.c (build_cplus_array_type_1): Do not call
602 uses_template_parms() on a NULL index_type.
604 2003-04-13 Roger Sayle <roger@eyesopen.com>
606 * decl.c (duplicate_decls): Preserve pure and malloc attributes.
608 2003-04-12 Mark Mitchell <mark@codesourcery.com>
611 * init.c (build_new_1): Reorganize.
613 2003-04-12 Zack Weinberg <zack@codesourcery.com>
615 * class.c (initialize_array)
616 * decl.c (reshape_init)
617 * decl2.c (build_expr_from_tree)
618 * init.c (build_zero_init)
619 * pt.c (tsubst_copy, tsubst_copy_and_build)
620 * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
621 (ptm_initializer, class_initializer, get_pseudo_ti_init)
622 * semantics.c (finish_compound_literal)
623 * typeck.c (build_ptrmemfunc1)
624 * typeck2.c (store_init_value, process_init_constructor)
625 (build_functional_cast): Use build_constructor.
627 2003-04-12 Zack Weinberg <zack@codesourcery.com>
629 * call.c (print_z_candidates): Use gcc_gettext_width, not
630 strlen, to determine how much padding to use.
632 2003-04-10 Zack Weinberg <zack@codesourcery.com>
634 * decl.c: Update all calls to shadow_warning.
636 2003-04-10 Mark Mitchell <mark@codesourcery.com>
638 * class.c (layout_class_type): Correct handling for overlong
639 bit-fields whose width is the same as an integer type.
641 2003-04-06 Zack Weinberg <zack@codesourcery.com>
643 * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
644 * cp-lang.c (cp_tree_size): New function.
645 (LANG_HOOKS_TREE_SIZE): Override.
647 * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
648 tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
649 (union lang_tree_node): Remove common and srcloc members.
650 (build_srcloc_here): Don't prototype.
651 * decl.c (cp_tree_node_structure): Kill SRCLOC case.
652 * pt.c (pending_templates): Correct comment.
653 * tree.c (build_srcloc, build_srcloc_here): Kill.
655 2003-04-06 Zack Weinberg <zack@codesourcery.com>
657 * call.c: Include intl.h.
658 (print_z_candidate): Always use inform; get rid of errfn
659 argument. Reorganize so that all the strings get picked up
660 by xgettext. Note obligation of caller to pass first argument
662 (print_z_candidates): Update to match. Indent second and
663 successive candidates by strlen() of translated message.
664 (joust): Restructure ambiguous-conversion pedwarn so that
665 translators see a complete sentence. Update calls to
668 * Make-lang.in (cp/call.o): Update dependencies.
670 2003-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
672 * decl.c (set_current_binding_level): Delete, revert last change.
673 (current_binding_level): Modify to allow it as as lvalue.
675 2003-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
677 * name-lookup.c (find_binding): Pass appropriate pointer type to
678 POP_TIMEVAR_AND_RETURN.
680 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
682 * Make-lang.in (cp-warn): Add $(STRICT_WARN).
683 * cp-tree.h: Don't insist on having GNUC.
685 2003-04-03 Jason Merrill <jason@redhat.com>
687 * cvt.c (ocp_convert): Only abort if we try to convert an object
688 of TREE_ADDRESSABLE type.
690 * class.c (build_vtable): Set DECL_ALIGN here.
691 (get_vtable_decl): Not here.
692 (layout_vtable_decl): Or here.
693 (create_vtable_ptr): Or here.
694 (layout_class_type): Or here.
695 (check_bitfield_decl): Don't mess with field alignment.
697 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
699 * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
700 DEF_ASSN_OPERATOR): Delete spurious semi-colon.
701 * rtti.c (dfs_class_hint_mark): Likewise.
703 * decl.c (push_local_name, push_class_level_binding,
704 maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
705 functions returning void.
706 * decl2.c (add_using_namespace): Likewise.
708 * decl.c (print_binding_level, print_other_binding_stack,
709 print_binding_stack): Cast argument of %p specifier to void*.
710 * ptree.c (cxx_print_decl): Likewise.
712 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
713 VAR_FUNCTION_OR_PARM_DECL_CHECK,
714 VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
715 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
716 LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
718 * decl.c (set_current_binding_level): New macro. Use throughout
719 when setting the current binding level.
721 * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
723 * method.c (mangling_flags): Likewise.
725 * cp-tree.h (lang_type_header): Add __extension__ and use
726 CHAR_BITFIELD for members.
728 2003-04-02 Geoffrey Keating <geoffk@apple.com>
731 * mangle.c: Include gt-cp-mangle.h.
732 (subst_identifiers): Mark with GTY.
733 * config-lang.in (gtfiles): Add cp/mangle.c.
734 * Make-lang.in: (gt-cp-mangle.h): New rule.
735 (cp/mangle.o): Depends on gt-cp-mangle.h.
737 2003-04-01 Andrew Pinski <pinskia@physics.uc.edu>
739 * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
740 after \$(srcdir)/cp/name-lookup.h.
741 * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
742 of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file.
743 * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
744 (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
746 2003-03-31 Jason Merrill <jason@redhat.com>
749 * class.c (check_field_decl): Don't set DECL_ALIGN.
751 2003-03-30 Mark Mitchell <mark@codesourcery.com>
754 * decl.c (grokdeclarator): Tidy, slightly.
755 * search.c (lookup_field_1): Add want_type parameter.
756 (lookup_field_r): Adjust call to lookup_field_1.
758 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
760 * Make-lang.in (cp/name-lookup.o): Add more dependencies.
762 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
764 * cp-tree.h (binding_for_name: Move to name-lookup.h Adjust
766 (cxx_scope_find_binding_for_name): Likewise.
767 * decl.c (find_binding: Move to name-lookup.c.
768 (binding_for_name): Likewise.
769 (cxx_scope_find_binding_for_name): Likewise.
770 (BINDING_LEVEL): Remove.
771 (push_binding): Tidy.
772 (push_class_binding): Likewise.
773 (pop_binding): Likewise.
774 (poplevel): Likewise.
775 (poplevel_class): Likewise.
776 (set_identifier_type_value_with_scope): Likewise.
777 (push_overloaded_decl): Likewise.
778 (lookup_tag): Likewise.
779 (unqualified_namespace_lookup): Likewise.
780 (lookup_name_current_level): Likewise.
781 (maybe_inject_for_scope_var): Likewise.
782 (namespace_binding): Move to name-lookup.c.
783 (set_namespace_binding): Likewise.
784 * decl2.c (lookup_using_namespace): Tidy.
785 (qualified_lookup_using_namespace): Likewise.
786 (do_toplevel_using_decl): Likewise.
787 * name-lookup.c: Include "timevar.h"
788 * name-lookup.h (cxx_scope): Declare.
789 (struct cxx_binding): Lose member "has_level". Adjust "scope"
791 (BINDING_SCOPE): Adjust definition.
792 (BINDING_HAS_LEVEL_P): Remove.
794 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
796 * name-lookup.c: New file.
797 * name-lookup.h: Likewise..
798 * decl.c (push_binding): Adjust use cxx_binding_make.
799 (free_bindings): Move to name-lookup.c
800 (pop_binding): Use cxx_binding_free.
801 (binding_for_name): Tidy.
802 * cp-tree.h: Include "name-lookup.h"
803 (cxx_binding_make): Move to name-lookup.h
804 (cxx_binding_clear): Likewise.
805 (struct cxx_binding): Likewise.
806 (LOCAL_BINDING_P): Likewise.
807 (INHERITED_VALUE_BINDING_P): Likewise.
808 (BINDING_SCOPE): Likewise.
809 (BINDING_HAS_LEVEL_P): Likewise.
810 (BINDING_VALUE): Likewise.
811 (BINDING_TYPE): Likewise.
812 * config-lang.in (gtfiles): Add cp/name-lookup.h
813 * Make-lang.in (cp/name-lookup.o): New rule.
814 (CXX_OBJS): Add cp/name-lookup.o
815 (CXX_TREE_H): Add cp/name-lookup.h
817 2003-03-28 Jason Merrill <jason@redhat.com>
820 * cvt.c (force_rvalue): New fn.
821 * call.c (build_conditional_expr): Use it.
822 * cp-tree.h: Declare it.
824 2003-03-28 Mike Stump <mrs@apple.com>
826 * error.c (dump_expr): Add 0x to printed hex numbers to make
827 output match source code better.
829 2003-03-28 Mark Mitchell <mark@codesourcery.com>
832 * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
835 * decl2.c (generate_ctor_or_dtor_function): Tolerate a
836 non-existant ssdf_decls array.
837 (finish_file): Call generator_ctor_or_dtor_function when there are
838 static constructors or destructors and no other static
841 2003-03-28 Nathan Sidwell <nathan@codesourcery.com>
844 * decl2.c (finish_file): Don't warn about explicitly instantiated
847 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
850 * pt.c (lookup_template_class): Only check instantiated args if
851 they do not contain template parameters.
853 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
856 * parser.c (cp_parser_function_definition): Set
857 DECL_INITIALIZED_IN_CLASS for members.
858 * pt.c (instantiate_decl): Only reduce the template args for
859 friends that are not defined in class.
861 2003-03-25 Jason Merrill <jason@redhat.com>
863 * call.c (print_z_candidate): Change name of first arg to msgid.
864 (joust): Add comment for translators.
866 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
868 PR c++/9898, PR c++/383, DR 322
869 * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
870 through reference types on both PARM and ARG.
872 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
875 * error.c (dump_expr) <BASELINK>: Use dump_expr.
876 * pt.c (maybe_fold_nontype_args): New function.
877 (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
878 <TEMPLATE_ID_EXPR>: Break out folding code, call it.
879 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
880 maybe_fold_nontype_args.
882 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
885 * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
887 2003-03-23 Mark Mitchell <mark@codesourcery.com>
890 * typeck.c (cxx_mark_addressable): Adjust call to
891 gen_mem_addressof or put_var_into_stack.
893 2003-03-22 Nathan Sidwell <nathan@codesourcery.com>
895 PR c++/9978, c++/9708
896 * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
897 * call.c (add_template_candidate_real): Adjust
898 instantiate_template call.
899 * class.c (resolve_address_of_overloaded_function): Likewise.
900 * decl.c (build_enumerator): Set TREE_CONSTANT.
901 * pt.c (check_instantiated_args): New.
902 (push_inline_template_parms_recursive): Set TREE_CONSTANT,
904 (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
905 (reduce_template_parm_level): Likewise.
906 (process_template_parm): Likewise.
907 (check_explicit_specialization): Adjust instantiate_template call.
908 (convert_template_argument): Don't check non-type argument here.
909 (lookup_template_class): Check them here.
910 (tsubst_friend_function): Adjust instantiate_template call.
911 (instantiate_template): Add tsubst_flags parameter, use it. Check
914 2003-03-21 Zack Weinberg <zack@codesourcery.com>
916 * decl.c: Update calls to shadow_warning.
918 2003-03-21 Nathan Sidwell <nathan@codesourcery.com>
921 * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
922 (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
924 2003-03-20 Mark Mitchell <mark@codesourcery.com>
926 * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
928 * cp/pt.c (instantiate_class_template): Fix formatting.
930 2003-03-14 Matt Austern <austern@apple.com>
932 * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
933 (unemitted_tinfo_decl_p): Remove.
934 (emit_tinfo_decl): Change declaration to remove unused parameter.
935 * decl2.c (finish_file): Change tinfo emission to loop through
936 unemitted_tinfo_decls array instead of looping through all decls.
937 * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
938 unused second parameter.
939 (init_rtti_processing): initialize unemitted_tinfo_decls varray.
940 (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
941 (emit_tinfo_decl): remove unused second parameter, add assertion
942 that decl hasn't already been emitted.
944 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
946 * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
947 type from 'int' to 'bool'. Replace 0 and 1 with true and false in
950 2003-03-19 Jason Merrill <jason@redhat.com>
952 PR c++/8316, c++/9315, c++/10136
953 * call.c (print_z_candidate): Split out from...
954 (print_z_candidiates): ...here.
957 2003-03-17 Roger Sayle <roger@eyesopen.com>
960 * decl.c (duplicate_decls): Use the new type when prototyping
961 anticipated decls, even when the types match. This defines the
962 exception list for the built-in function.
964 2003-03-17 Jason Merrill <jason@redhat.com>
967 * typeck.c (build_class_member_access_expr): Compare
970 2003-03-17 Mark Mitchell <mark@codesourcery.com>
973 * parser.c (cp_parser_declarator_id): Clear parser->scope.
975 2003-03-16 Jason Merrill <jason@redhat.com>
978 * decl.c (finish_function): Only allow the NRVO to use variables
979 declared at function scope.
981 2003-03-17 Andreas Jaeger <aj@suse.de>
983 * Make-lang.in (cp/TAGS): Remove.
985 2003-03-16 Nathan Sidwell <nathan@codesourcery.com>
988 * cp-tree.h (struct language_function): Add in_base_initializer.
989 (in_base_initializer): define it.
990 (expand_member_init): Remove INIT param.
991 * init.c (expand_member_init): Remove INIT param, return the member.
992 (emit_mem_initializers): Set in_base_initializer.
993 * class.c (build_base_path): Check in_base_initializer.
994 * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
995 * pt.c (tsubst_initializer_list): Likewise.
997 2003-03-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
999 * decl.c (binding_for_name): Fix initialization thinko.
1001 2003-03-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
1003 Compile-time improvement: 2/n.
1004 * cp-tree.h (struct cxx_binding): New datatype;
1005 (struct lang_identifier): Use it.
1006 (LOCAL_BINDING_P): Adjust definition.
1007 (INHERITED_VALUE_BINDING_P): Likewise.
1008 (BINDING_SCOPE): Likewise.
1009 (BINDING_HAS_LEVEL_P): Likewise.
1010 (BINDING_VALUE): Likewise.
1011 (BINDING_TYPE): Likewise.
1012 (IDENTIFIER_VALUE): Likewise.
1013 (struct tree_binding): Remove.
1014 (TS_CP_BINDING): Likewise.
1015 ((union lang_tree_node): Remove field "binding".
1016 (cxx_binding_clear): New macro.
1017 (binding_for_name): Adjust return type.
1018 (qualified_lookup_using_namespace): Adjust prototype.
1019 (lookup_using_namespace): Adjust prototype.
1020 (cxx_scope_find_binding_for_name): Declare.
1021 * cp-tree.def: Remove CPLUS_BINDING definition.
1022 * decl.c (push_binding): Adjust local variable type.
1023 (add_binding): Likewise.
1024 (push_class_binding): Likewise.
1025 (pop_binding): Likewise.
1026 (poplevel): Likewise.
1027 (poplevel_class): Likewise.
1028 (free_bindings): Adjust type.
1029 (find_binding): Adjust return type, add a third parameter. Remove
1030 non-useful assertion now that we use static typing.
1031 (cxx_scope_find_binding_for_name): New function.
1032 (binding_for_name): Use it. Adjust local variable type. Simplify.
1033 (namespace_binding): Simplify.
1034 (set_namespace_binding): Likewise.
1035 (set_identifier_type_value_with_scope): Adjust local variable type.
1036 (lookup_tag): Don't type-abuse of local variable 'old'.
1037 (lookup_namespace_name): Likewise. Allocate binding on stack.
1038 (select_decl): Adjust prototype.
1039 (unqualified_namespace_lookup): Allocate binding on stack.
1040 Don't type-abuse of local variable 'val'.
1041 (lookup_name_real): Likewise.
1042 (maybe_inject_for_scope_var): Adjust local variable type.
1043 (cp_tree_node_structure): Remove CPLUS_BINDING case label.
1044 (namespace_binding): Adjust logic, simplify.
1045 (BINDING_LEVEL): Adjust definition.
1046 (push_class_level_binding): Adjust local variable type.
1047 (struct cxx_saved_binding): Adjust field 'binding' type.
1048 * decl2.c (ambiguous_decl): Adjust prototype.
1049 (lookup_using_namespace): Adjust local variable type.
1050 (qualified_lookup_using_namespace): Catch type error and correct
1051 ensueing logic error.
1052 (do_nonmember_using_decl): Adjust local variable type. Allocate
1053 temporary cxx_binding on stack.
1054 (do_toplevel_using_decl): Adjust local variable type.
1055 * ptree.c (cxx_print_cxx_binding): New function.
1056 (cxx_print_identifier): Use it.
1057 (cxx_print_xnode): Delete CPLUS_BINDING case label.
1059 2003-03-15 Roger Sayle <roger@eyesopen.com>
1061 * tree.c (count_functions): Fix whitespace.
1063 2003-03-15 Neil Booth <neil@daikokuya.co.uk>
1065 * Make-lang.in: Update.
1067 2003-03-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1070 * pt.c (maybe_process_partial_specialization): Handle
1071 member class template when enclosing class template is
1072 explicit specialized.
1073 (most_general_template): Stop looking when DECL is already
1076 2003-03-13 Jason Merrill <jason@redhat.com>
1079 * search.c (lookup_conversions): Call complete_type here.
1080 * call.c (implicit_conversion): Not here.
1082 2003-03-13 Mark Mitchell <mark@codesourcery.com>
1084 * decl2.c (do_nonmember_using_decl): Correct handling of
1085 simultaneous type/non-type bindings.
1087 * call.c (initialize_reference): Remove bogus assertion.
1088 * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
1090 2003-03-12 Andrew Lewycky <andrew@mxc.ca>
1093 * expr.c (cxx_expand_expr): Return const0_rtx for throw
1096 2003-03-11 Mark Mitchell <mark@codesourcery.com>
1099 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
1100 to merge old and new declarations.
1102 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
1105 * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
1106 (cp/g++.1): Build it from scratch in the build tree.
1107 (c++.install-man): Depend on it. Install it from the build tree.
1108 (c++.mostlyclean): Clean it.
1110 2003-03-11 Mark Mitchell <mark@codesourcery.com>
1113 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
1114 to merge old and new declarations.
1117 * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
1119 2003-03-11 Jason Merrill <jason@redhat.com>
1122 * search.c (lookup_member): Fix handling of functions in a class
1125 2003-03-11 Mark Mitchell <mark@codesourcery.com>
1128 * call.c (convert_class_to_reference): Adjust usage of
1130 (any_viable): Remove.
1131 (splice_viable): Combine with any_viable.
1132 (print_z_candidates): Avoid printing duplicates.
1133 (build_user_type_conversion_1): Adjust usage of splice_viable.
1134 (build_new_function_call): Likewise.
1135 (build_operator_new_call): Likewise.
1136 (build_object_call): Likewise.
1137 (build_conditional_expr): Likewise.
1138 (build_new_op): Likewise.
1139 (build_new_method_call): Likewise.
1140 (joust): Remove spurious comment.
1141 * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
1142 * decl2.c (arg_assoc_class): Simplify.
1143 * friend.c (add_friend): Likewise.
1145 2003-03-11 Jason Merrill <jason@redhat.com>
1148 * decl2.c (check_classfn): A member template only matches a
1151 2003-03-11 Neil Booth <neil@daikokuya.co.uk>
1153 * Make-lang.in (CXX_C_OBJS): Update.
1154 * lang-specs.h: Don't define __GNUG__ here.
1156 2003-03-10 Mark Mitchell <mark@codesourcery.com>
1158 * call.c (perform_overload_resolution): New function.
1159 (build_new_function_call): Use it.
1160 (build_operator_new_call): Likewise.
1161 (add_candidates): Add explicit_targs and template_only parameters.
1162 (build_new_op): Adjust accordingly.
1163 * cp-tree.h (build_operator_new_call): New function.
1164 (build_function_call_real): Remove.
1165 (build_function_call_maybe): Likewise.
1166 * init.c (build_new_1): Use build_operator_new_call.
1167 * typeck.c (build_function_call_real): Rename to ...
1168 (build_function_call): ... this.
1170 2003-03-10 Devang Patel <dpatel@apple.com>
1173 * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
1175 2003-03-10 Jason Merrill <jason@redhat.com>
1178 * decl.c (push_using_directive): Push before recursing.
1180 PR c++/9868, c++/9524
1181 * call.c (resolve_scoped_fn_name): Handle the case of a function
1184 * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
1185 argument in the pointer-to-member case.
1187 2003-03-09 Mark Mitchell <mark@codesourcery.com>
1190 * cp-lang.c (cxx_get_alias_set): Use alias set zero for
1191 pointers to member functions.
1194 * decl.c (build_ptrmemfunc_type): Do not allow default arugments
1195 in pointer-to-member-function types.
1197 2003-03-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1199 * expr.c (cplus_expand_constant): Use C90 prototype style.
1200 (cxx_expand_expr): Likewise.
1202 2003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1205 * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
1208 2003-03-08 Geoffrey Keating <geoffk@apple.com>
1210 * lang-specs.h (c++-header): Change .pch to .gch.
1212 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
1214 * cp-tree.h (cxx_init): Update prototype.
1215 * lex.c (cxx_init): Similarly.
1217 2003-03-08 Mark Mitchell <mark@codesourcery.com>
1220 * cp-tree.h (begin_mem_initializers): Remove.
1221 * parser.c (cp_parser_mem_initializer_list): Inline it here.
1222 Do not call finish_mem_initializers if not in a constructor.
1223 (cp_parser_class_head): Fix typo in error message.
1224 * semantics.c (begin_mem_initializers): Remove.
1225 * testsuite/g++.dg/parser/constructor1.C: New test.
1228 * call.c (add_function_candidate): Skip builtin fuctions that have
1229 not yet been declared.
1232 * init.c (build_new_1): Correct logic for determining whether or
1233 not to use an array cookie.
1236 * parser.c (cp_parser_postfix_expression): Call
1237 finish_non_static_data_member, even when processing_template_decl.
1240 * cp-tree.h (is_ancestor): New function.
1241 (handle_class_head): Change prototype.
1242 * decl2.c (is_namespace_ancestor): Rename to ...
1243 (namespace_anecestor): ... this.
1244 (set_decl_namespace): Adjust accordingly.
1245 (handle_class_head): Remove unncessary parameters.
1246 * parser.c (cp_parser_class_head): Check that
1247 nested-name-specifiers are used appropriately.
1249 2003-03-07 Mark Mitchell <mark@codesourcery.com>
1251 * call.c (reference_binding): Remove REF_IS_VAR parameter.
1252 (implicit_conversion): Adjust call to reference_binding.
1253 (make_temporary_var_for_ref_to_type): Add TYPE parameter.
1254 (initialize_reference): Adjust handling for references bound to
1256 * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
1258 (real_non_cast_lvalue_p): New method.
1259 * cvt.c (build_up_reference): Adjust use of
1260 make_temporary_var_for_ref_to_temp.
1261 * tree.c (real_non_cast_lvalue_p): New method.
1263 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
1265 * except.c (init_exception_processing): Use C90 prototype style.
1266 (cp_protect_cleanup_actions): Likewise.
1267 (prepare_eh_type): Likewise.
1268 (build_eh_type_type): Likewise.
1269 (build_exc_ptr): Likewise.
1270 (do_begin_catch): Likewise.
1271 (dtor_nothrow): Likewise.
1272 (do_end_catch): Likewise.
1273 (push_eh_cleanup): Likewise.
1274 (decl_is_java_type): Likewise.
1275 (choose_personality_routine): Likewise.
1276 (initialize_handler_parm): Likewise.
1277 (expand_start_catch_block): Likewise.
1278 (expand_end_catch_block): Likewise.
1279 (begin_eh_spec_block): Likewise.
1280 (finish_eh_spec_block): Likewise.
1281 (do_allocate_exception): Likewise.
1282 (do_free_exception): Likewise.
1283 (wrap_cleanups_r): Likewise.
1284 (stabilize_throw_expr): Likewise.
1285 (build_throw): Likewise.
1286 (complete_ptr_ref_or_void_ptr_p): Likewise.
1287 (is_admissible_throw_operand): Likewise.
1288 (nothrow_libfn_p): Likewise.
1289 (can_convert_eh): Likewise.
1290 (check_handlers_1): Likewise.
1291 (check_handlers): Likewise.
1293 2003-03-06 Mark Mitchell <mark@codesourcery.com>
1295 * call.c (merge_conversion_sequences): New function.
1296 (build_conv): Set ICS_USER_FLAG for USER_CONVs.
1297 (convert_class_to_reference): Correct handling of second
1298 standard conversion sequence in a user-defined conversion
1300 (build_user_type_conversion_1): Use merge_conversion_sequences.
1301 * cp-tree.def: Add comments for CONV nodes.
1302 * rtti.c (get_tinfo_decl): Use build_address/build_nop.
1304 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
1306 * error.c (init_error): Use C90 prototype style.
1307 (dump_scope): Likewise.
1308 (dump_qualifiers): Likewise.
1309 (dump_template_argument): Likewise.
1310 (dump_template_argument_list): Likewise.
1311 (dump_template_parameter): Likewise.
1312 (dump_template_bindings): Likewise.
1313 (dump_type): Likewise.
1314 (dump_typename): Likewise.
1315 (class_key_or_enum): Likewise.
1316 (dump_aggr_type): Likewise.
1317 (dump_type_prefix): Likewise.
1318 (dump_type_suffix): Likewise.
1319 (dump_global_iord): Likewise.
1320 (dump_simple_decl): Likewise.
1321 (dump_decl): Likewise.
1322 (dump_template_decl): Likewise.
1323 (dump_function_decl): Likewise.
1324 (dump_parameters): Likewise.
1325 (dump_exception_spec): Likewise.
1326 (dump_function_name): Likewise.
1327 (dump_template_parms): Likewise.
1328 (dump_char): Likewise.
1329 (dump_expr_list): Likewise.
1330 (dump_expr): Likewise.
1331 (dump_binary_op): Likewise.
1332 (dump_unary_op): Likewise.
1333 (type_as_string): Likewise.
1334 (expr_as_string): Likewise.
1335 (decl_as_string): Likewise.
1336 (context_as_string): Likewise.
1337 (lang_decl_name): Likewise.
1338 (cp_file_of): Likewise.
1339 (cp_line_of): Likewise.
1340 (decl_to_string): Likewise.
1341 (expr_to_string): Likewise.
1342 (fndecl_to_string): Likewise.
1343 (code_to_string): Likewise.
1344 (language_to_string): Likewise.
1345 (parm_to_string): Likewise.
1346 (op_to_string): Likewise.
1347 (type_to_string): Likewise.
1348 (assop_to_string): Likewise.
1349 (args_to_string): Likewise.
1350 (cv_to_string): Likewise.
1351 (cxx_print_error_function): Likewise.
1352 (cp_diagnostic_starter): Likewise.
1353 (cp_diagnostic_finalizer): Likewise.
1354 (cp_print_error_function): Likewise.
1355 (function_category): Likewise.
1356 (print_instantiation_full_context): Likewise.
1357 (print_instantiation_partial_context): Likewise.
1358 (maybe_print_instantiation_context): Likewise.
1359 (print_instantiation_context): Likewise.
1360 (cp_printer): Likewise.
1361 (print_integer): Likewise.
1362 (print_non_consecutive_character): Likewise.
1363 (locate_error): Likewise.
1365 2003-03-06 Mark Mitchell <mark@codesourcery.com>
1368 * call.c (reference_binding): Add ref_is_var parameter.
1369 (implicit_conversion): Adjust call to reference_binding.
1370 (initialize_reference): Likewise.
1373 * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
1377 * class.c (get_basefndecls): Use lookup_fnfields_1.
1379 2003-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1382 * parser.c (cp_parser_type_parameter): Remove redundant `expect'
1384 (cp_parser_single_declaration): Likewise.
1386 2003-03-05 Jason Merrill <jason@redhat.com>
1389 * call.c (build_conditional_expr): Use convert rather than an
1392 2003-03-02 Matt Austern <austern@apple.com>
1394 * decl.c (cp_binding_level): Add static_decls varray member.
1395 (add_decl_to_level): Add static/inline namespace scope
1396 declarations to static_decls array.
1397 (wrapup_global_for_namespace): Pass static_decls only, instead of
1398 all decls, to wrapup_global_declarations/check_global_declarations.
1399 (push_namespace): Initialize static_decls for ordinary namespaces.
1400 (cxx_init_decl_processing): Initialize static_decls for global
1403 2003-03-05 Mark Mitchell <mark@codesourcery.com>
1405 * class.c (end_of_class): Correct thinko.
1407 2003-03-04 Nathanael Nerode <neroden@gcc.gnu.org>
1409 * config-lang.in: Replace ${libstdcxx_version} by its value.
1411 2003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1413 * cp-tree.h (cxx_saved_binding): Declare.
1414 (struct saved_scope): Adjust type of field 'old_binding'.
1415 * decl.c (cxx_saved_binding_make): New macro.
1416 (struct cxx_saved_binding): Define.
1417 (store_bindings): Adjust prototype. Use cxx_saved_binding to save
1419 (maybe_push_to_top_level): Adjust local variable type.
1420 (pop_from_top_level): Likewise.
1422 2003-03-04 Tom Tromey <tromey@redhat.com>
1424 * Make-lang.in (c++.tags): New target.
1426 2003-03-04 Neil Booth <neil@daikokuya.co.uk>
1428 * Make-lang.in: Update.
1430 2003-03-03 Jason Merrill <jason@redhat.com>
1432 * decl.c (finish_enum): Do set the type in a template. Simplify.
1433 * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
1435 2003-03-03 Mark Mitchell <mark@codesourcery.com>
1438 * call.c (convert_class_to_reference): Correct conversion
1440 (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
1441 (implicit_conversion): Adjust call to reference_binding.
1442 (add_candidate): Change type of candidates parameter.
1443 (add_function_candidate): Likewise.
1444 (add_conv_candidate): Likewise.
1445 (build_builtin_candidate): Likewise.
1446 (add_builtin_candidate): Likewise.
1447 (add_builtin_candidates): Likewise.
1448 (add_template_candidate_real): Likewise.
1449 (add_template_candidate): Likewise.
1450 (add_template_conv_candidate): Likewise.
1451 (build_user_type_conversion_1): Adjust accordingly.
1452 (build_object_call): Likewise.
1453 (build_conditional_expr): Likewise.
1454 (add_candidates): Likewise.
1455 (build_new_op): Likewise.
1456 (convert_like_real): Use USER_CONV_CAND. Use build_nop.
1457 (build_new_method_call): Adjust calls to add_function_candidate.
1458 (make_temporary_var_for_ref_to_temp): New function.
1459 (initialize_reference): Add decl parameter.
1460 * class.c (build_rtti_vtbl_entries): Use build_address and
1462 * cp-tree.h (initialize_reference): Change prototype.
1463 (make_temporary_var_for_ref_to_temp): New function.
1464 (build_type_conversion): Change prototype.
1465 (build_address): New function.
1466 (build_nop): Likewise.
1467 * cvt.c (cp_convert_to_pointer): Adjust call to
1468 build_type_conversion. Avoid indicating redundant NOP_EXPRs.
1470 (convert_to_pointer_force): Use build_nop.
1471 (build_up_reference): Use make_temporary_var_for_ref_to_temp.
1472 (convert_to_reference): Adjust call to build_type_conversion.
1473 (ocp_convert): Likewise.
1474 (build_type_conversion): Remove for_sure parameter.
1475 * decl.c (grok_reference_init): Use initialize_reference.
1476 * typeck.c (build_address): New function.
1477 (build_nop): Likewise.
1478 (build_unary_op): Use them.
1479 (build_ptrmemfunc): Tidy slightly.
1480 (convert_for_initialization): Adjust call to
1481 initialize_reference.
1482 * typeck2.c (store_init_value): Remove #if 0'd code.
1484 2003-03-03 Jason Merrill <jason@redhat.com>
1486 * decl.c (start_function): Clear DECL_NUM_STMTS.
1488 * class.c (get_vtable_decl): Use vtbl_type_node.
1489 (build_primary_vtable): Check for it.
1491 2003-03-02 Aldy Hernandez <aldyh@redhat.com>
1493 * decl.c (check_initializer): Check for vector_opaque_p.
1495 2003-03-02 Ashif Harji <asharji@uwaterloo.ca>
1497 * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
1498 invoke an external cpp during compilation.
1500 2003-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
1502 * decl.c (duplicate_decls): Convert use of warning_with_decl() to
1504 (start_decl): Likewise.
1505 (start_function): Likewise.
1507 2003-03-01 Neil Booth <neil@daikokuya.co.uk>
1509 * Make-lang.in (CXX_C_OBJS): Update.
1511 2003-02-28 Mark Mitchell <mark@codesourcery.com>
1514 * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
1517 2003-02-28 Aldy Hernandez <aldyh@redhat.com>
1519 * parser.c (cp_parser_init_declarator): Revert opaque
1520 vector_opaque_p change.
1521 Do not include target.h.
1523 2003-02-28 Mark Mitchell <mark@codesourcery.com>
1526 * cp-tree.h (build_zero_init): Add parameter.
1527 * decl.c (cp_finish_decl): Adjust call.
1528 * init.c (build_zero_init): Add nelts parameter. Adjust recursive
1530 (build_default_init): Add nelts parameter. Adjust calls to
1532 (build_new_1): Adjust call to build_default_init.
1533 * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
1535 2003-02-26 Devang Patel <dpatel@apple.com>
1537 * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
1538 required. Postpone enum setting for template decls.
1539 (build_enumerator): Delay copying value node until finish_enum
1540 (). Remove #if 0'ed code.
1541 * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
1542 (tsubst_copy): Add check for enum type.
1544 2003-02-25 Mark Mitchell <mark@codesourcery.com>
1547 * decl2.c (prune_vars_needing_no_initialization): Do not throw
1548 away initializations for DECL_EXTERNAL VAR_DECLs.
1549 (finish_file): Adjust accordingly.
1550 * pt.c (instantiate_decl): Do not defer VAR_DECLs.
1552 2003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
1554 * decl.c (add_binding): Time TV_NAME_LOOKUP.
1555 (push_class_binding): Likewise.
1556 (set_namespace_binding): Likewise.
1558 2003-02-24 Mark Mitchell <mark@codesourcery.com>
1561 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
1562 specializations back to the main template.
1563 * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
1564 * pt.c (resolve_typename_type): Likewise.
1566 2003-02-24 Jeffrey D. Oldham <oldham@codesourcery.com>
1569 * pt.c (tsubst_copy_and_build): For a templated function inside a
1570 scope, process template arguments.
1572 2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1575 * typeck2.c (abstract_virtuals_error): Don't check when
1576 TYPE is still template parameter dependent.
1578 2003-02-23 Mark Mitchell <mark@codesourcery.com>
1581 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
1582 * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
1583 * pt.c (instantiate_class_template): Don't try to instantiate
1585 (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
1587 2003-02-21 Mark Mitchell <mark@codesourcery.com>
1590 * decl.c (grokdeclarator): Do not allow parameters with variably
1593 2003-02-21 Nathan Sidwell <nathan@codesourcery.com>
1595 * search.c (grow_bfs_bases): Remove. Fold into ...
1596 (bfs_walk): ... here, fix fencepost error. Fix merge lossage
1599 2003-02-20 Mark Mitchell <mark@codesourcery.com>
1602 * mangle.c (mangle_conv_op_name_for_type): Issue an error message
1603 when the G++ 3.2 ABI prevents correct compilation.
1605 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
1607 Change base class access representation. Share virtual base
1609 * cp/call.c (build_special_member_call): Remove binfo_for_vbase
1611 * cp/class.c (build_base_path): Likewise.
1612 (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
1613 (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
1614 (make_new_vtable): Adjust.
1615 (force_canonical_binfo_r): Delete.
1616 (force_canonical_binfo): Delete.
1617 (mark_primary_virtual_base): Delete.
1618 (dfs_unshared_virtual_bases): Delete.
1619 (mark_primary_bases): Adjust.
1620 (maybe_warn_about_overly_private_class): Adjust.
1621 (dfs_base_derived_from): Delete.
1622 (base_derived_from): Follow the inheritance chain.
1623 (struct find_final_overrider_data): Add vpath member.
1624 (dfs_find_final_overrider): Adjust.
1625 (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
1626 (find_final_overrider): Adjust.
1627 (update_vtable_entry_for_fn): Adjust.
1628 (modify_all_vtables): Adjust.
1629 (walk_subobject_offsets): Adjust.
1630 (layout_nonempty_base_or_field): Adjust.
1631 (layout_empty_base): Remove last parameter. Adjust.
1632 (build_base_field): Adjust.
1633 (build_base_fields): Adjust.
1634 (propagate_binfo_offsets): Remove last parameter. Adjust.
1635 (dfs_set_offset_for_unshared_vbases): Delete.
1636 (layout_virtual_bases): Adjust.
1637 (finish_struct_1): Adjust.
1638 (init_class_processing): Don't init access nodes.
1639 (dfs_get_primary_binfo): Delete.
1640 (get_primary_binfo): Adjust.
1641 (dump_class_hierarchy_r): Remove most derived arg, add IGO
1643 (dump_class_hierarchy): Adjust.
1644 (finish_vtbls): Adjust.
1645 (get_original_base): Delete.
1646 (build_vtt_inits): Adjust.
1647 (dfs_build_secondary_vptr_vtt_inits): Adjust.
1648 (dfs_ctor_vtable_bases_queue_p): Adjust.
1649 (build_ctor_vtbl_group): Adjust.
1650 (dfs_accumulate_vtbl_inits): Adjust.
1651 (build_vtbl_initializer): Adjust.
1652 (build_vbase_offset_vtbl_entries): Adjust.
1653 (add_vcall_offset_vtbl_entries_1): Adjust.
1654 * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
1655 (access_*_node): Remove.
1656 (CANONICAL_BINFO): Delete.
1657 (BINFO_UNSHARED_MARKED): Remove.
1658 (BINFO_MARKED): Set LANG_FLAG_0 directly.
1659 (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
1660 (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
1661 (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
1663 (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
1664 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
1665 (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
1667 (BINFO_DEPENDENT_BASE_P): New.
1668 (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
1670 (markedp, unmarkedp): Adjust.
1671 (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
1672 dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
1673 find_vbase_instance, binfo_for_vbase): Delete.
1674 (copied_binfo, original_binfo): Declare.
1675 (finish_base_specifier): Add virtual_p arg.
1676 (unshare_base_binfos): Delete.
1677 (copy_base_binfos): Declare.
1678 (reverse_path): Delete.
1679 * cp/decl.c (xref_basetypes): Access and virtuality passed
1680 differently. Don't copy direct base binfos here. Call
1682 * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
1683 (initialize_vtbl_ptrs): Adjust.
1684 (expand_member_init): Adjust.
1685 * cp/parser.c (cp_parser_base_specifier): Adjust.
1686 * cp/pt.c (instantiate_class_template): Adjust.
1687 (get_template_base_recursive): Adjust.
1688 * cp/rtti.c (get_pseudo_ti_init): Adjust.
1689 (get_pseudo_ti_desc): Adjust.
1690 * cp/tree.c (unshare_base_binfos): Rename to ...
1691 (copy_base_binfos): ... here, reimplement.
1692 (make_binfo): Set BINFO_DEPENDENT_BASE_P.
1693 (reverse_path): Remove.
1694 * cp/typeck.c (get_delta_difference): Adjust error messages.
1695 * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
1696 * cp/search.c (lookup_base_r): Adjust.
1697 (dynamic_cast_base_recurse): Adjust.
1698 (canonical_binfo): Remove.
1699 (dfs_canonical_queue): Remove.
1700 (dfs_assert_unmarked_p): Remove.
1701 (assert_canonical_unmarked): Remove.
1702 (shared_marked_p, shared_unmarked_p): Remove.
1703 (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
1704 (dfs_access_in_type): Adjust.
1705 (access_in_type): Adjust.
1706 (dfs_accessible_queue_p): Adjust.
1707 (dfs_accessible_p): Adjust.
1708 (is_subobject_of_p_1, is_subobject_of_p): Remove.
1709 (struct lookup_field_info): Remove from_dep_base_p field.
1710 (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
1711 (lookup_field_r): Remove dependent base code.
1712 (lookup_member): Likewise.
1713 (dfs_walk, dfs_walk_real): Add access arg to queue fn.
1714 (dfs_unmarked_real_bases_queue_p): Remove.
1715 (dfs_marked_real_bases_queue_p): Remove.
1716 (dfs_skip_vbases): Remove.
1717 (dfs_get_pure_virtuals): Adjust.
1718 (markedp, unmarkedp): Adjust.
1719 (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
1720 (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
1721 (dfs_unmark): Adjust.
1722 (dfs_get_vbase_types):Remove.
1723 (dfs_build_inheritance_graph_order): Remove.
1724 (get_vbase_types): Remove
1725 (dfs_find_vbase_instance): Remove.
1726 (find_vbase_instance): Remove.
1727 (dfs_debug_unmarkedp): Adjust.
1728 (dependent_base_p): Remove.
1729 (dfs_push_type_decls): Adjust.
1730 (dfs_push_decls): Adjust.
1731 (dfs_no_overlap_yet): Adjust.
1732 (copied_binfo): New function.
1733 (original_binfo): New function.
1734 (binfo_for_vbase): Remove.
1736 2003-02-18 Zack Weinberg <zack@codesourcery.com>
1738 * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
1739 (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
1742 2003-02-18 Mark Mitchell <mark@codesourcery.com>
1745 * class.c (layout_class_type): In the 3.2 ABI, take into account
1746 trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
1748 2003-02-18 Matt Austern <austern@apple.com>
1750 * cp/cp-lang.c: Change lang hooks so that final_write_globals does
1752 * cp/decl.c (wrapup_globals_for_namespace): Remove special
1753 handling of global namespace.
1755 2003-02-18 Geoffrey Keating <geoffk@apple.com>
1757 * cp-tree.h (rid_to_yy): Delete.
1758 (C_RID_YYCODE): Delete.
1759 (finish_file): Delete redundant declaration.
1761 2003-02-18 Jason Merrill <jason@redhat.com>
1764 * decl.c (reshape_init): Don't mess with initializer labels.
1767 * parser.c (cp_parser_postfix_expression): Set idk properly for
1768 object->scope::member.
1770 2003-02-18 Ben Elliston <bje@redhat.com>
1773 * decl.c (duplicate_decls): Fix typo in comment.
1775 2003-02-17 Michael Elizabeth Chastain <mec@shout.net>
1778 * class.c (build_base_field): Mark fields for base classes with
1781 2003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1784 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
1785 CONSTRUCTOR_ELTS only once.
1787 2003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1790 * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
1791 (dump_type_suffix): Likewise.
1793 2003-02-14 Nathan Sidwell <nathan@codesourcery.com>
1795 * search.c: ANSIfy function declarations and definitions.
1796 * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
1797 * call.c (build_method_call, resolve_scoped_fn_name,
1798 build_java_interface_fn_ref): Adjust lookup_field, lookup_member
1800 * class.c (handle_using_decl): Likewise.
1801 * decl.c (make_typename_type, make_unmound_class_template,
1802 start_decl, compute_array_index_type): Likewise.
1803 * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
1804 * init.c (expand_member_init, build_member_call): Likewise.
1805 * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
1806 resolve_typename_type): Likewise.
1807 * typeck.c (lookup_destructor, finish_class_member_access_exprm
1808 build_prememfunc_access_expr): Likewise.
1810 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
1812 * decl2.c: Include "timevar.h".
1813 (namespace_ancestor): Time name lookup.
1814 (add_using_namespace): Likewise.
1815 (lookup_using_namespace): Likewise.
1816 (qualified_lookup_using_namespace): Likewise.
1817 (decl_namespace): Likewise.
1818 (lookup_arg_dependent): Likewise.
1819 * lex.c (do_identifier): Likewise.
1820 (do_scoped_id): Likewise.
1821 * pt.c (lookup_template_class): Likewise.
1823 2003-02-14 Andrew Pinski <pinskia@physics.uc.edu>
1825 * decl.c: (define_label): Fix warning for return 0 instead of NULL.
1827 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
1829 * decl.c: Include "timevar.h".
1830 (poplevel): Time name lookup.
1831 (find_binding): Likewise.
1832 (push_namespace): Likewise.
1833 (pop_nested_namespace): Likewise.
1834 (store_bindings): Likewise.
1835 (maybe_push_to_top_level): Likewise.
1836 (pop_from_top_level): Likewise.
1837 (push_local_name): Likewise.
1838 (pushtag): Likewise.
1839 (pushdecl): Likewise.
1840 (pushdecl_with_scope): Likewise.
1841 (pushdecl_namespace_level): Likewise.
1842 (pushdecl_top_level): Likewise.
1843 (pushdecl_class_level): Likewise.
1844 (push_class_level_binding): Likewise.
1845 (push_using_decl): Likewise.
1846 (push_using_directive): Likewise.
1847 (push_overloaded_decl): Likewise.
1848 (lookup_label): Likewise.
1849 (define_label): Likewise.
1850 (lookup_tag): Likewise.
1851 (lookup_tag_reverse): Likewise.
1852 (lookup_namespace_name): Likewise.
1853 (select_decl): Likewise.
1854 (unqualified_namespace_lookup): Likewise.
1855 (lookup_name_real): Likewise.
1856 (lookup_name_current_level): Likewise.
1857 (lookup_type_current_level): Likewise.
1858 (maybe_inject_for_scope_var): Likewise.
1859 (xref_tag): Likewise.
1861 * Make-lang.in (cp/decl.o): Add dependency on timevar.h
1863 2003-02-12 Phil Edwards <pme@gcc.gnu.org>
1865 * decl.c (build_enumerator): Remove unneeded test.
1867 2003-02-09 Dan Nicolaescu <dann@ics.uci.edu>
1869 * cp-tree.h (struct lang_type_header): Make all fields unsigned
1872 2003-02-03 Mark Mitchell <mark@codesourcery.com>
1875 * call.c (z_candidate): Add args.
1876 (convert_class_to_reference): Set it.
1877 (implicit_conversion): Tidy.
1878 (add_candidate): Add args parameter.
1879 (add_function_candidate): Adjust call to add_candidate.
1880 (add_conv_candidate): Likewise.
1881 (build_builtin_candidate): Likewise.
1882 (build_user_type_conversion_1): Eliminate wasteful tree_cons
1884 (build_new_function_call): Likewise.
1885 (build_object_call): Likewise.
1886 (add_candidates): New function.
1887 (build_new_op): Use it.
1888 (covert_like_real): Adjust call to build_over_call.
1889 (build_over_call): Remove args parameter.
1890 * operators.def: Add <?= and >?=.
1892 2003-02-01 Richard Sandiford <rsandifo@redhat.com>
1894 * typeck.c (build_indirect_ref): Don't check flag_volatile.
1896 2003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1899 * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
1901 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
1903 * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
1904 BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
1905 (BINFO_LANG_ELTS): New #define.
1906 * tree.c (make_binfo): Use BINFO_LANG_ELTS.
1908 2003-01-30 Geoffrey Keating <geoffk@apple.com>
1910 * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
1912 2003-01-30 Mark Mitchell <mark@codesourcery.com>
1914 * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
1916 * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
1917 rather than TYPE_LANG_FLAG_0.
1918 (TYPE_BUILT_IN): Remove.
1919 (TYPE_DEPENDENT_P): New macro.
1920 (TYPE_DEPENDENT_P_VALID): Likewise.
1921 (lang_type_class): Add fields_readonly.
1922 * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
1923 * pt.c (dependent_type_p_r): New function, split out from ...
1924 (dependent_type_p): ... here. Memoize results.
1925 * search.c (dependent_base_p): Use dependent_type_p, not
1926 uses_template_parms.
1927 * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
1930 2003-01-29 Mark Mitchell <mark@codesourcery.com>
1932 * call.c (build_field_call): Use build_new_op, not build_opfncall.
1933 (prep_operand): New function.
1934 (build_new_op): Use it. Remove dead code.
1935 * class.c (pushclass): Change "modify" parameter type from int to
1937 (currently_open_class): Use same_type_p, not pointer equality.
1938 (push_nested_class): Adjust calls to pushclass, remove modify
1940 * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
1941 (pushclass): Change prototype.
1942 (push_nested_class): Likewise.
1943 (grokoptypename): Remove.
1944 (build_opfncall): Remove.
1945 (value_dependent_expression_p): Declare.
1946 (resolve_typename_type): Likewise.
1947 (resolve_typename_type_in_current_instantiation): Likewise.
1948 (enter_scope_of): Remove.
1950 (tsubst_expr): Likewise.
1951 (tsubst_copy): Likewise.
1952 (tsubst_copy_and_build): Likewise.
1953 * decl.c (warn_about_implicit_typename_lookup): Remove.
1954 (finish_case_label): Return error_mark_node for erroneous labels.
1955 (start_decl): Adjust calls to push_nested_class.
1956 (grokfndecl): Call push_scope/pop_scope around call to
1958 (grokdeclarator): Do not call tsubst.
1959 (start_function): Adjust calls to push_nested_class.
1960 * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
1961 (check_classfn): Use push_scope/pop_scope around type comparisions.
1962 (grokoptypename): Remove.
1963 (push_sscope): Adjust call to push_nested_class.
1964 * error.c (dump_type): Show cv-qualification of typename types.
1965 * init.c (build_member_call): Use build_new_op, not
1967 * method.c (build_opfncall): Remove.
1968 * parser.c (cp_parser): Add allow_non_constant_expression_p and
1969 non_constant_expression_p.
1970 (cp_parser_constant_expression): Adjust prototype.
1971 (cp_parser_resolve_typename_type): Remove.
1972 (cp_parser_non_constant_expression): New function.
1973 (cp_parser_non_constant_id_expression): Likewise.
1974 (cp_parser_new): Set allow_non_constant_expression_p and
1975 non_constant_expression_p.
1976 (cp_parser_primary_expression): Reject `this' and `va_arg' in
1977 constant-expressions. Note that dependent names aren't really
1979 (cp_parser_postfix_expression): Reject conversions to non-integral
1980 types in constant-expressions. Neither are increments or
1982 (cp_parser_unary_expression): Reject increments and decrements in
1983 constant-expressions.
1984 (cp_parser_direct_new_declarator): Adjust call to
1985 cp_parser_constant_expression.
1986 (cp_parser_cast_expression): Reject conversions to non-integral
1987 types in constant-expressions.
1988 (cp_parser_assignment_expression): Rejects assignments in
1989 constant-expressions.
1990 (cp_parser_expression): Reject commas in constant-expressions.
1991 (cp_parser_labeled_statement): Adjust call to
1992 cp_parser_constant_expression.
1993 (cp_parser_direct_declarator): Simplify array bounds, even in
1994 templates, when they are non-dependent. Use
1995 resolve_typename_type, not cp_parser_resolve_typename_type.
1996 (cp_parser_class_head): Use resolve_typename_type, not
1997 cp_parser_resolve_typename_type.
1998 (cp_parser_member_declaration): Adjust call to
1999 cp_parser_constant_expression.
2000 (cp_parser_constant_initializer): Likewise.
2001 (cp_parser_constructor_declarator): Use resolve_typename_type, not
2002 cp_parser_resolve_typename_type.
2003 (cp_parser_late_parsing_default_args): Adjust call to
2005 * pt.c (tsubst): Give it internal linkage.
2006 (tsubst_expr): Likewise.
2007 (tsubst_copy): Likewise.
2008 (tsubst_copy_and_build): Likewise.
2009 (push_access_scope_real): Likewise.
2010 (tsubst_friend_class): Likewise.
2011 (instantiate_class_template): Adjust call to pushclass.
2012 (value_dependent_expression_p): Give it external linkage.
2014 (resolve_typename_type): New function.
2015 * semantics.c (finish_call_expr): Use build_new_op, not
2017 (begin_constructor_declarator): Remove.
2018 (begin_class_definition): Adjust call to pushclass.
2019 (enter_scope_of): Remove.
2020 * typeck.c (comptypes): Resolve typename types as appropriate.
2021 (build_x_indirect_ref): Use build_new_op, not build_opfncall.
2022 (build_x_compound_expr): Likewise.
2023 (build_modify_expr): Likewise.
2024 (build_x_modify_expr): Likewise.
2025 * typeck2.c (build_x_arrow): Likewise.
2027 2003-01-29 Fariborz Jahanian <fjahanian@apple.com>
2029 * pt.c (last_pending_template) Declare GTY().
2031 2003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2034 * parser.c (cp_parser_elaborated_type_specifier): Convert
2035 TEMPLATE_DECL to TYPE_DECL only when processing template friends.
2036 (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
2038 2003-01-28 Nathan Sidwell <nathan@codesourcery.com>
2041 * pt.c (unify): Don't unify '*T' with 'U C::*'.
2044 * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
2045 inside a declarator.
2047 2003-01-27 Nathan Sidwell <nathan@codesourcery.com>
2049 * class.c (update_vtable_entry_for_fn): Add index parameter.
2050 Generate vcall thunk for covariant overriding from a virtual
2052 (dfs_modify_vtables): Adjust.
2054 2003-01-25 Nathan Sidwell <nathan@codesourcery.com>
2057 * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
2059 (cp_parser_base_specifier): Look for and consume a
2060 TEMPLATE keyword. Replace switch with array index.
2063 * semantics.c (finish_non_static_data_member): Remember the
2064 field's type even in a template.
2067 * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
2071 * parser.c (cp_parser_cast_expression): Be more tentative.
2073 2003-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2075 * cp-tree.h (flagged_type_tree_s): Remove.
2076 (check_for_new_type): Likewise.
2077 * typeck2.c (check_for_new_type): Likewise.
2079 2003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
2081 * dump.c: ANSIfy function declarations and definitions.
2083 * cp-tree.h, decl.h: Get rid of PARAMS. Again.
2085 2003-01-22 Mark Mitchell <mark@codesourcery.com>
2088 * init.c (build_new): Set the type of the new-expression, even
2089 when processing_templte_decl.
2092 * parser.c (cp_parser_primary_expression): Improve error message
2093 for templates used in an expression context.
2096 * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
2097 parse when encountering "typedef".
2099 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
2101 * class.c, parser.c: ANSIfy function definitions and declarations.
2103 2003-01-22 Mark Mitchell <mark@codesourcery.com>
2106 * error.c (dump_decl): For an OVERLOAD, just print the name of the
2107 function; it doesn't make sense to try to print its type.
2108 * semantics.c (finish_typeof): Issue errors about invalid uses.
2111 * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
2113 (cp_parser_expression_statement): Use it.
2114 (cp_parser_explicit_instantiation): Likewise.
2115 * pt.c (do_decl_instantiation): Improve error handling logic.
2117 2003-01-22 Mark Mitchell <mark@codesourcery.com>
2120 * parser.c (cp_parser_using_declaration): Issue error messages
2121 about name resolution failures here.
2124 * class.c (currently_open_derived_class): Use dependent_type_p.
2125 * cp-tree.h (dependent_type_p): New function.
2126 (dependent_template_arg_p): Likewise.
2127 (dependent_template_p): Likewise.
2128 (type_dependent_expression_p): Likewise.
2129 * parser.c (cp_parser_dependent_type_p): Remove.
2130 (cp_parser_value_dependent_type_p): Likewise.
2131 (cp_parser_type_dependent_expression_p): Likewise.
2132 (cp_parser_dependent_template_arg_p): Likewise.
2133 (cp_parser_dependent_template_id_p): Likewise.
2134 (cp_parser_dependent_template_p): Likewise.
2135 (cp_parser_diagnose_invalid_type_name): Replace
2136 cp_parser_dependent_type_p with dependent_type_p, etc.
2137 (cp_parser_primary_expresion): Likewise.
2138 (cp_parser_nested_name_specifier_opt): Likewise.
2139 (cp_parser_postfix_expression): Likewise.
2140 (cp_parser_unary_expression): Likewise.
2141 (cp_parser_template_name): Likewise.
2142 (cp_parser_class_name): Likewise.
2143 (cp_parser_lookup_name): Likewise.
2144 * pt.c (dependent_type_p): New function.
2145 (value_dependent_expression_p): Likewise.
2146 (type_dependent_expression_p): Likewise.
2147 (dependent_template_arg_p): Likewise.
2148 (dependent_template_id_p): Likewise.
2149 (dependent_template_p): Likewise.
2153 * parser.c (cp_parser_simple_declaration): Return quickly when
2154 encountering errors.
2156 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2158 Make-lang.in (cp/decl.o-warn): Add -Wno-error.
2160 2003-01-17 Jason Merrill <jason@redhat.com>
2162 PR c++/9167, c++/9358
2163 * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
2165 2003-01-17 Jason Merrill <jason@redhat.com>
2168 * call.c (build_conditional_expr): Always do lvalue-rvalue
2171 2003-01-17 Mark Mitchell <mark@codesourcery.com>
2174 * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
2175 * cp-tree.h (BASELINK_BINFO): Adjust.
2176 (BASELINK_FUNCTIONS): Likewise.
2177 (BASELINK_ACCESS_BINFO): Likewise.
2178 (tree_baselink): New structure.
2179 (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
2180 (lang_tree_node): Add baselink.
2181 * decl.c (cp_tree_node_structure): Add BASELINK case.
2182 * search.c (build_baselink): Adjust.
2183 * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P
2184 test from TREE_LIST case.
2187 * parser.c (cp_parser_constructor_declarator_p): Do not assume
2188 that a constructor cannot be declared outside of its own class.
2190 * parser.c (cp_parser_resolve_typename_type): If the scope cannot
2191 be resolved, neither can the qualified name.
2193 * rtti.c (get_pseudo_ti_desc): Fix thinko.
2195 2003-01-16 Jason Merrill <jason@redhat.com>
2198 * init.c (build_vec_init): Re-add maxindex parm.
2199 (perform_member_init, build_aggr_init): Pass it.
2200 (build_new_1): Pass it. Use an incomplete array type for full_type.
2201 * typeck.c (build_modify_expr): Pass it.
2202 * cp-tree.h: Adjust.
2204 2003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
2206 * cp-tree.h (tsubst_copy_and_build): New declaration.
2207 * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
2208 (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment.
2209 (tsubst_copy_and_build): New function.
2211 2003-01-16 Mark Mitchell <mark@codesourcery.com>
2213 * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
2214 (PARTIAL_INSTANTIATION_P): Remove.
2215 (IMPLICIT_TYPENAME_P): Likewise.
2216 (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
2217 (build_typename_type): Remove declaration.
2218 (parmlist_is_exprlist): Likewise.
2219 * decl.c (build_typename_type): Make it static, remove third
2221 (push_class_binding): Don't do implicit typename stuff.
2222 (make_typename_type): Likewise.
2223 (lookup_name_real): Likewise.
2224 (grokdeclarator): Don't try to convert declarations into
2225 initializations. Don't do implicit typename stuff.
2226 (parmlist_is_exprlist): Remove.
2227 (xref_basetypes): Simplify.
2228 * decl2.c (grokfield): Don't try to convert declarations into
2230 (build_anon_union_vars): Do this while processing templates, too.
2231 (finish_anon_union): Likewise.
2232 * error.c (dump_type): Remove implicit typename handling.
2233 * parser.c (cp_parser_diagnose_invalid_type_name): New method.
2234 (cp_parser_primary_expression): Correct handling of names not
2235 found by unqualified name lookup in templates.
2236 (cp_parser_nested_name_specifier_opt): Avoid checking dependency
2237 of types when possible.
2238 (cp_parser_simple_declaration): Complain intelligently about some
2239 invalid declarations.
2240 (cp_parser_member_declaration): Likewise.
2241 (cp_parser_constructor_declarator_p): Don't check when we're in a
2243 * pt.c (instantiate_class_template): Remove
2244 PARTIAL_INSTANTIATION_P gunk.
2245 * search.c (lookup_field_r): Don't build implicit typenames.
2246 (marked_pushdecls_p): Don't enter dependent base types.
2247 (unmarked_pushdecls_p): Likewise.
2248 * semantics.c (begin_class_definition): Remove implicit typename
2251 2003-01-16 Nathan Sidwell <nathan@codesourcery.com>
2254 * parser.c (cp_parser_direct_declarator): If accepting either
2255 abstract or named, the name must be an unqualified-id.
2257 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2259 * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
2261 2003-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2263 * decl2.c (check_classfn): Fix uninitialized warning.
2264 (build_anon_union_vars): Likewise.
2265 * pt.c (tsubst_copy): Likewise.
2267 2003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
2269 Further conform g++'s __vmi_class_type_info to the C++ ABI
2271 * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
2273 (class_hint_flags): Likewise.
2275 2003-01-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2277 * config-lang.in: Add semantics.c to gtfiles.
2278 * cp-tree.h (flagged_type_tree_s): Remove lookups field.
2279 (saved_scope): Likewise.
2280 (type_lookups): Remove.
2281 (deferred_access): New structure.
2282 (type_access_control): Remove.
2283 (save_type_access_control): Likewise.
2284 (reset_type_access_control): Likewise.
2285 (decl_type_access_control): Likewise.
2286 (push_deferring_access_checks): Declare.
2287 (resume_deferring_access_checks): Likewise.
2288 (stop_deferring_access_checks): Likewise.
2289 (pop_deferring_access_checks): Likewise.
2290 (get_deferred_access_checks): Likewise.
2291 (pop_to_parent_deferring_access_checks): Likewise.
2292 (perform_deferred_access_checks): Likewise.
2293 (perform_or_defer_access_check): Likewise.
2294 * decl.c (make_typename_type): Use perform_or_defer_access_check.
2295 (make_unbound_class_template): Likewise.
2296 (grokdeclarator): Don't call decl_type_access_control.
2297 * parser.c (cp_parser_context): Remove deferred_access_checks
2298 and deferring_access_checks_p fields.
2299 (cp_parser_context_new): Adjust.
2300 (cp_parser): Remove access_checks_lists.
2301 (cp_parser_defer_access_check): Remove.
2302 (cp_parser_start_deferring_access_checks): Remove.
2303 (cp_parser_stop_deferring_access_checks): Remove.
2304 (cp_parser_perform_deferred_access_checks): Remove.
2305 (cp_parser_nested_name_specifier_opt): Use new deferred access
2307 (cp_parser_simple_declaration): Likewise.
2308 (cp_parser_template_id): Likewise.
2309 (cp_parser_function_definition): Likewise.
2310 (cp_parser_class_specifier): Likewise.
2311 (cp_parser_lookup_name): Likewise.
2312 (cp_parser_single_declaration): Likewise.
2313 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
2314 (cp_parser_parse_tentatively): Likewise.
2315 (cp_parser_parse_definitely): Likewise.
2316 (yyparse): Likewise.
2317 (cp_parser_init_declarator): Remove access_checks parameter.
2318 Use new deferred access functions.
2319 (cp_parser_function_definition_from_specifiers_and_declarator):
2321 (cp_parser_class_head): Remove deferring_access_checks_p and
2322 saved_access_checks parameters. Use new deferred access functions.
2323 (cp_parser_member_specification_opt): Don't call
2324 reset_type_access_control.
2325 * search.c (type_access_control): Remove.
2326 * semantics.c: Include "gt-cp-semantics.h".
2327 (deferred_type_access_control): Remove.
2328 (deferred_access_stack): New variable.
2329 (deferred_access_free_list): Likewise.
2330 (push_deferring_access_checks): New function.
2331 (resume_deferring_access_checks): Likewise.
2332 (stop_deferring_access_checks): Likewise.
2333 (pop_deferring_access_checks): Likewise.
2334 (get_deferred_access_checks): Likewise.
2335 (pop_to_parent_deferring_access_checks): Likewise.
2336 (perform_deferred_access_checks): New function, adapted from
2337 cp_parser_perform_deferred_access_checks.
2338 (perform_or_defer_access_check): New function, adapted from
2339 cp_parser_defer_access_check.
2340 (current_type_lookups): Remove.
2341 (deferred_type_access_control): Likewise.
2342 (decl_type_access_control): Likewise.
2343 (save_type_access_control): Likewise.
2344 (reset_type_access_control): Likewise.
2345 (begin_function_definition): Adjust.
2346 (begin_class_definiton): Likewise.
2348 2003-01-13 Jason Merrill <jason@redhat.com>
2351 * class.c (build_base_path): Take the address before calling save_expr.
2353 * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
2354 all the ambiguous conversions are bad.
2356 * class.c (maybe_warn_about_overly_private_class): Don't stop
2357 searching when we find a nonprivate method.
2359 * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
2361 2003-01-12 Mark Mitchell <mark@codesourcery.com>
2363 * cp-tree.h (get_arglist_len_in_bytes): Remove.
2366 * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
2367 typeame types more robustly.
2369 2003-01-11 Phil Edwards <pme@gcc.gnu.org>
2371 * parser.c: Fix comment typos.
2373 2003-01-10 Mark Mitchell <mark@codesourcery.com>
2376 * parser.c (cp_parser_scope_through_which_access_occurs): Handle
2377 an object_type which is not a class type.
2379 2003-01-10 Geoffrey Keating <geoffk@apple.com>
2381 * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
2382 (cp_parser_late_parsing_default_args): Likewise.
2384 2003-01-10 Nathanael Nerode <neroden@gcc.gnu.org>
2386 * cfns.gperf: ANSIfy function declarations.
2387 * cfns.h: Regenerate.
2388 * cp-tree.h: ANSIfy function declarations.
2390 2003-01-10 Mark Mitchell <mark@codesourcery.com>
2392 * cp-tree.h (reparse_absdcl_as_expr): Remove.
2393 (reparse_absdcl_as_casts): Likewise.
2394 (reparse_decl_as_expr): Likewise.
2395 (finish_decl_parsing): Likewise.
2396 * decl2.c (reparse_absdcl_as_expr): Remove.
2397 (reparse_absdcl_as_casts): Likewise.
2398 (repase_decl_as_expr): Likewise.
2399 (finish_decl_parsing): Likewise.
2404 * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
2406 (cp_parser_nested_name_specifier_opt): Correct the
2407 check_dependency_p false.
2408 (cp_parser_postfix_expression): Fix formatting.
2409 (cp_parser_decl_specifier_seq): Avoid looking for constructor
2410 declarators when possible.
2411 (cp_parser_template_id): Avoid performing name-lookup when
2413 (cp_parser_class_head): Do not count specializations when counting
2414 levels of templates.
2415 (cp_parser_constructor_declarator_p): Return immediately if
2416 there's no chance that the tokens form a constructor declarator.
2417 * rtti.c (throw_bad_typeid): Add comment. Do not return an
2418 expression with reference type.
2419 (get_tinfo_decl_dynamic): Do not return an expression with
2421 (build_typeid): Add comment. Do not return an expression with
2423 * typeck.c (build_class_member_access_expr): Improve handling of
2424 conditionals and comma-expressions as objects.
2426 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
2428 * cfns.gperf: ANSIfy function declarations.
2429 * cfns.h: Regenerate.
2430 * cp-tree.h: ANSIfy function declarations.
2431 * parser.c: ANSIfy function declarations & definitions.
2433 * decl.c (bad_specifiers): Fix parameter order error I introduced.
2435 2003-01-09 Geoffrey Keating <geoffk@apple.com>
2437 Merge from pch-branch:
2439 2003-01-09 Geoffrey Keating <geoffk@apple.com>
2441 Merge to tag pch-merge-20030102:
2443 * semantics.c (finish_translation_unit): Don't call finish_file.
2444 * parser.c: Don't include ggc.h.
2445 (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
2446 read first token here. Don't allow PCH files after the first
2448 (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
2449 (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
2450 (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
2451 (cp_parser_late_parsing_for_member): Don't duplicate call to
2452 cp_lexer_set_source_position_from_token.
2453 (cp_parser_late_parsing_default_args): Likewise.
2454 (yyparse): Call finish_file after clearing the_parser.
2456 2002-12-11 Geoffrey Keating <geoffk@apple.com>
2458 * Make-lang.in: Remove $(GGC_H) from all dependencies.
2459 (CXX_TREE_H): Add $(GGC_H).
2460 * class.c: Don't include ggc.h.
2461 (field_decl_cmp): Make parameters be 'const void *' to match qsort.
2462 (method_name_cmp): Likewise.
2463 (resort_data): New variable.
2464 (resort_field_decl_cmp): New.
2465 (resort_method_name_cmp): New.
2466 (resort_sorted_fields): New.
2467 (resort_type_method_vec): New.
2468 (finish_struct_methods): Delete cast.
2469 (finish_struct_1): Delete cast.
2470 * cp-tree.h: Include ggc.h.
2471 (struct lang_type_class): Add reorder attribute to field `methods'.
2472 (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
2473 (resort_sorted_fields): New prototype.
2474 (resort_type_method_vec): New prototype.
2475 * call.c: Don't include ggc.h.
2477 * decl2.c: Likewise.
2480 * method.c: Likewise.
2481 * optimize.c: Likewise.
2482 * parse.y: Likewise.
2485 * search.c: Likewise.
2486 * semantics.c: Likewise.
2490 * lang-specs.h: Remove comment.
2492 2002-12-03 Geoffrey Keating <geoffk@apple.com>
2494 * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
2495 (operator_name_info): Mark to be saved for PCH, specify size.
2496 (assignment_operator_name_info): Likewise.
2498 2002-11-19 Geoffrey Keating <geoffk@apple.com>
2500 * decl.c (anon_cnt): Mark to be saved for PCH.
2502 2002-10-25 Geoffrey Keating <geoffk@apple.com>
2504 * lex.c (init_reswords): Delete now-untrue comment.
2505 Allocate ridpointers using GGC.
2507 2002-10-04 Geoffrey Keating <geoffk@apple.com>
2509 * cp-tree.h (union lang_decl_u2): Add tags to all fields.
2511 * g++spec.c (lang_specific_driver): Don't include standard
2512 libraries in `added'.
2514 2002-08-27 Geoffrey Keating <geoffk@redhat.com>
2516 * decl2.c (finish_file): Call c_common_write_pch.
2517 * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
2519 2002-08-17 Geoffrey Keating <geoffk@redhat.com>
2521 * g++spec.c (lang_specific_driver): Treat .h files as C++ header
2522 files when using g++.
2523 * lang-specs.h: Handle compiling C++ header files.
2525 2003-01-09 Jakub Jelinek <jakub@redhat.com>
2527 * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
2529 2003-01-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2531 * pt.c (push_access_scope_real): Call push_to_top_level for
2532 function in namespace scope.
2533 (pop_access_scope): Call pop_from_top_level for function in
2536 2003-01-09 Jakub Jelinek <jakub@redhat.com>
2538 * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
2540 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
2542 * Make-lang.in (c++.install-common, c++.install-man,
2543 c++.uninstall): Prepend $(DESTDIR) to destination paths in
2544 all (un)installation commands.
2545 (c++.install-common): Rewrite $(LN) commands to support
2546 DESTDIR with "ln" as well as with "ln -s".
2548 2003-01-08 Jason Merrill <jason@redhat.com>
2550 * parser.c (cp_parser_primary_expression): See through explicitly
2551 scoped ALIAS_DECLs, too.
2553 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
2555 * decl.c: Remove some #if 0 code.
2557 * decl.c: ANSIfy function declarations.
2559 2003-01-07 Mark Mitchell <mark@codesourcery.com>
2561 * parser.c (cp_parser_asm_definition): Correct handling of omitted
2564 2003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2567 * decl.c (make_typename_type): Check access only when tf_error.
2568 (make_unbound_class_template): Likewise.
2569 * pt.c (saved_access_scope): New variable.
2570 (push_access_scope_real): New function.
2571 (push_access_scope): Likewise.
2572 (pop_access_scope): Likewise.
2573 (tsubst_default_argument): Use them.
2574 (instantiate_template): Likewise.
2575 (regenerate_decl_from_template): Likewise.
2576 (instantiate_decl): Likewise.
2577 (get_mostly_instantiated_function_type): Likewise.
2579 2003-01-07 Nathanael Nerode <neroden@gcc.gnu.org>
2581 * tree.c: Delete bogus #if 0 code.
2583 2003-01-07 Andreas Schwab <schwab@suse.de>
2585 * class.c (layout_class_type): Don't use
2586 PCC_BITFIELD_TYPE_MATTERS if not defined.
2588 2003-01-06 Mark Mitchell <mark@codesourcery.com>
2591 * decl2.c (build_cleanup): Mark the object as used.
2593 * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
2594 (hash_local_specialization): New function.
2595 (register_local_specialization): Revert 2003-01-05 change.
2596 (instantiate_decl): Use hash_local_specialization when creating
2597 the local_specializations table.
2599 * decl2.c (mark_used): Do not synthesize thunks.
2601 * class.c (layout_class_type): Correct handling of unnamed
2602 bitfields wider than their types.
2605 * parser.c (cp_parser): Remove default_arg_types. Update
2606 documentation for unparsed_functions_queues.
2607 (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
2609 (cp_parser_new): Don't set parser->default_arg_types.
2610 (cp_parser_function_definition): Adjust usage of
2611 unparsed_funtions_queues.
2612 (cp_parser_class_specifier): Don't mess with
2613 parser->default_arg_types. Handle default argument processing in
2614 a separate phase from function body processing.
2615 (cp_parser_template_declaration_after_export): Adjust usage of
2616 unparsed_functions_queues.
2617 (cp_parser_late_parsing_for_member): Do not handle default
2620 2003-01-06 Nathan Sidwell <nathan@codesourcery.com>
2623 * parser.c (cp_parser_declarator_kind): New enum.
2624 (cp_parser_declarator): Adjust.
2625 (cp_parser_direct_declarator): Adjust. Allow for either named or
2626 abstract declarator. Prefer abstract, if possible. Allow
2627 parenthesized function name.
2628 (cp_parser_condition): Adjust cp_parser_declarator call.
2629 (cp_parser_explicit_instantiation): Likewise.
2630 (cp_parser_init_declarator): Likewise.
2631 (cp_parser_type_id): Likewise.
2632 (cp_parser_function_definition): Likewise.
2633 (cp_parser_member_declaration): Likewise.
2634 (cp_parser_parameter_declaration): Use cp_parser_declarator to do
2635 the tentative parsing.
2636 (cp_parser_exception_declaration): Likewise.
2638 2003-01-05 Mark Mitchell <mark@codesourcery.com>
2640 * parser.c (cp_parser_template_parameter): Adjust call to
2641 cp_parser_parameter_declaration.
2642 (cp_parser_parameter_declaration_list): Likewise.
2643 (cp_parser_parameter_declaration): Replace
2644 greater_than_is_operator_p with template_parm_p parameter. Do not
2645 cache tokens for template default arguments.
2647 * pt.c (retrieve_local_specialization): Use htab_find, not
2648 htab_find_with_hash.
2649 (register_local_specialization): Use htab_find_slot, not
2650 htab_find_slot_with_hash.
2651 (instantiate_decl): Pass a hash function to htab_create.
2653 2003-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2655 * parser.c (cp_parser_binary_expression,
2656 cp_parser_multiplicative_expression,
2657 cp_parser_additive_expression, cp_parser_shift_expression,
2658 cp_parser_relational_expression, cp_parser_equality_expression,
2659 cp_parser_and_expression, cp_parser_exclusive_or_expression,
2660 cp_parser_inclusive_or_expression,
2661 cp_parser_logical_and_expression, cp_parser_logical_or_expression,
2662 cp_parser_binary_expression): Const-ify.
2664 2003-01-04 Mark Mitchell <mark@codesourcery.com>
2666 * method.c (use_thunk): Disable access control while building the
2669 2003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
2671 * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
2674 2003-01-03 Matt Austern <austern@apple.com>
2676 * cp-tree.h (struct lang_type_class): add field for key method
2677 (cp_global_trees): rename dynamic_classes to keyed_classes
2678 (key_method): add definition
2679 * class.c (finish_struct_1): compute class's key method, and add
2680 the class to keyed_classes list if there is no key method.
2681 * decl.c (finish_function): add class to keyed_classes list if we
2682 see a definition of the class's key method.
2683 * pt.c (instantiate_class_template): add template specialization
2684 of a dynamic class to keyed_classes list.
2685 * decl2.c (key_method): remove
2686 (finish_file): iterate only through keyed_classes list when
2687 deciding whether to emit vtables, remove class from its list after
2690 2003-01-02 Jason Merrill <jason@redhat.com>
2692 * call.c (build_conditional_expr): Stabilize lvalues properly.
2693 * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
2694 * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
2695 Don't allow CALL_EXPR or VA_ARG_EXPR, either.
2697 * call.c (convert_like_real): Call decl_constant_value for an
2698 IDENTITY_CONV even if there are no more conversions.
2700 * cvt.c (build_up_reference): Don't push unnamed temps.
2702 * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
2704 * dump.c (cp_dump_tree): Don't try to dump class-specific fields
2705 for a backend struct.
2707 * except.c (wrap_cleanups_r, build_throw): Make
2708 MUST_NOT_THROW_EXPRs void.
2709 * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
2711 * init.c (build_vec_delete_1): Pre-evaluate the base address.
2713 * init.c (get_temp_regvar): Simplify logic.
2715 * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
2716 our replacement is a decl.
2718 * decl.c (cp_make_fname_decl): Push the decls inside the
2721 2003-01-03 Nathan Sidwell <nathan@codesourcery.com>
2724 * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
2727 2003-01-03 Graham Stott <graham.stott@btinternet.com>
2729 * parser.c (struct cp_parser): Add access_checks_lists field
2730 (cp_parser_simple_declaration): Use.
2731 (cp_parser_init_declarator): Likewise.
2733 2003-01-02 Mark Mitchell <mark@codesourcery.com>
2735 * parser.c (cp_parser_declaration): Accept the __extension__
2736 keyword before the declaration.
2739 * parser.c (cp_parser_parameter_declaration): Allow attributes to
2740 appear after the declarator.
2742 * call.c (build_new_method_call): Fix typo in message format
2745 2003-01-02 Mark Mitchell <mark@codesourcery.com>
2747 * parser.c (cp_lexer_next_token_is): Declare it inline.
2748 (cp_lexer_set_source_position_from_token): Likewise.
2749 (cp_lexer_debugging_p): Likewise.
2750 (cp_parser_parsing_tentatively): Likewise.
2751 (cp_parser_nested_name_specifier_opt): Reduce the number of calls
2752 to the cp_lexer_peek_token.
2754 * parser.c (cp_parser_sizeof_operand): Do not evaluate the
2757 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
2759 * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
2760 cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
2761 cp/repo.c: Fix copyright years.
2763 2003-01-01 Neil Booth <neil@daikokuya.co.uk>
2765 * lex.c: Remove superfluous include of cpplib.h.
2766 (CONSTRAINT): Define without conditions.
2767 (init_cp_pragma): Use c_register_pragma.
2769 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
2771 * .cvsignore: Remove.
2773 2002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl>
2775 * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
2776 except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
2777 lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
2778 pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
2779 typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
2781 * lex.h: parse.y is dead, so don't mention it. Also replace the
2782 copyright header with the default GNU copyright header.
2784 2002-12-31 Mark Mitchell <mark@codesourcery.com>
2786 * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
2787 (lookup_name_namespace_only): Likewise.
2788 (begin_only_namespace_names): Likewise.
2789 (end_only_namespace_names): Likewise.
2790 * decl.c (only_namespace_names): Remove.
2791 (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
2792 (lookup_name_real): Do not check only_namespace_names.
2793 (lookup_name_namespace_only): Remove.
2794 (begin_only_namespace_names): Likewise.
2795 (end_only_namespace_names): Likewise.
2796 * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
2797 nested-name-specifiers more gracefully.
2798 (cp_parser_class_or_namespace_name): Avoid looking up namespace
2799 names when they cannot possibly appear.
2800 (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
2801 (cp_parser_elaborated_type_specifier): Likewise.
2802 (cp_parser_namespace_name): Only look for namespace names.
2803 (cp_parser_lookup_name): Add is_namespace parameter.
2804 (cp_parser_lookup_name_simple): Adjust call to
2805 cp_parser_lookup_name.
2807 * parser.c (cp_parser_dependent_type_p): Fix thinko.
2809 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
2811 * .cvsignore: Update.
2813 2002-12-31 Nathan Sidwell <nathan@codesourcery.com>
2815 * class.c (modify_vtable_entry): Remove unused variable.
2816 (get_vcall_index): Always expect a non-thunk.
2817 (update_vtable_entry_for_fn): Combine covariant adjustments, when
2818 overriding a thunk. Pass get_vcall_index a non-thunk.
2820 * decl2.c (finish_file): Mark undefined inlines as extern.
2822 2002-12-31 Mark Mitchell <mark@codesourcery.com>
2824 * cp-tree.def (RETURN_INIT): Remove.
2825 * cp-tree.h (DECL_IN_MEMORY_P): Remove.
2826 (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
2827 (note_level_for_for): Remove.
2828 (note_level_for_try): Likewise.
2829 (note_level_for_catch): Likewise.
2830 (finish_named_return_value): Likewise.
2831 (do_pushlevel): Change prototype.
2832 (pending_lang_change): Remove.
2833 * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
2835 (note_level_for_for): Remove.
2836 (note_level_for_try): Likewise.
2837 (note_level_for_catch): Likewise.
2838 (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
2839 * parser.c (cp_parser_context_free_list): Make it "deletable".
2840 (cp_parser_template_argument): Remove misleading comment.
2841 * pt.c (tsubst_expr): Remove RETURN_INIT code.
2842 * semantics.c (genrtl_named_return_value): Remove.
2843 (do_pushlevel): Take a scope kind as an argument.
2844 (begin_if_stmt): Adjust.
2845 (begin_while_stmt): Likewise.
2846 (begin_for_stmt): Likewise.
2847 (finish_for_init_stmt): Likewise.
2848 (begin_switch_stmt): Likewise.
2849 (begin_handler): Likewise.
2850 (begin_compound_stmt): Likewise.
2851 (finish_named_return_value): Remove.
2852 (cp_expand_stmt): Remove RETURN_INIT case.
2853 * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
2855 2002-12-31 Mark Mitchell <mark@codesourcery.com>
2858 * parser.c (cp_parser_direct_declarator): Handle erroneous
2859 parenthesized declarators correctly.
2861 2002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2863 * cp-tree.h (pending_lang_change): Declare.
2865 2002-12-30 Mark Mitchell <mark@codesourcery.com>
2867 * parser.c (cp_parser_context_free_list): New variable.
2868 (cp_parser_context_new): Use it.
2869 (cp_parser_error): Check return code from
2870 cp_parser_simulate_error.
2871 (cp_parser_simulate_error): Return a value.
2872 (cp_parser_id_expression): Optimize common case.
2873 (cp_parser_class_name): Likewise.
2874 (cp_parser_class_specifier): Adjust call to
2875 cp_parser_late_parsing_default_args.
2876 (cp_parser_lookup_name): Optimize common case.
2877 (cp_parser_late_parsing_for_member): Adjust call to
2878 cp_parser_late_parsing_default_args.
2879 (cp_parser_late_parsing_default_args): Add scope parameter.
2880 (cp_parser_require): Avoid creating the error message unless it's
2882 (cp_parser_parse_definitely): Place free'd contexts on the free
2885 * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
2887 2002-12-30 David Edelsohn <edelsohn@gnu.org>
2889 * parser.c (cp_parser_parameter_declaration_clause): Treat system
2890 header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
2892 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
2894 * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
2897 2002-12-30 Mark Mitchell <mark@codesourcery.com>
2901 * Make-lang.in (gt-cp-spew.h): Remove.
2902 * cp-tree.h (do_pending_lang_change): Remove.
2903 (do_identifier): Change prototype.
2904 (finish_id_expr): Remove.
2905 * decl.c (lookup_name_real): Remove yylex variable.
2906 * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
2907 * lex.c (init_cpp_parse): Remove.
2908 (reduce_cmp): Likewise.
2909 (token_cmp): Likewise.
2911 (lastiddecl): Likewise.
2912 (token_count): Likewise.
2913 (reduce_count): Likewise.
2915 (print_parse_statistics): Likewise.
2916 (do_pending_lang_change): Likewise.
2917 (do_identifier): Remove parsing parameter.
2918 * lex.h (lastiddecl): Remove.
2919 (looking_for_typename): Remove.
2920 (looking_for_template): Likewise.
2921 (pending_lang_change): Likewise.
2923 * semantics.c (finish_id_expr): Remove.
2925 * decl.c (grokdeclarator): Diagnost "extern thread" and "static
2928 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
2930 * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
2931 end, not the C front end.
2933 2002-12-30 Nathan Sidwell <nathan@codesourcery.com>
2935 * cp-tree.h (THUNK_TARGET): New macro.
2936 (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
2937 (finish_thunk): Remove offset parms.
2938 * class.c (find_final_overrider): Look through thunks.
2939 (get_vcall_index): Use THUNK_TARGET.
2940 (update_vtable_entry_for_fn): Look through thunks. Set covariant
2941 fixed offset here. Adjust finish_thunk call.
2942 (build_vtbl_initializer): Adjust finish_thunk calls.
2943 * mangle.c (mangle_call_offset): Remove superfluous if.
2944 (mangle_thunk): Adjust.
2945 * method.c (make_thunk): Adjust.
2946 (finish_thunk): Adjust.
2947 (thunk_adjust): Remove assert.
2948 (use_thunk): Use THUNK_TARGET
2949 * dump1.c (cp_dump_tree): Adjust thunk dumping.
2952 * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
2953 * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
2955 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
2957 Remove traditional C constructs 4/n.
2958 * decl2.c (grok_method_quals, warn_if_unknown_interface,
2959 grok_x_components, cp_build_parm_decl, build_artificial_parm,
2960 maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
2961 delete_sanity, check_member_template, check_java_method,
2962 check_classfn, finish_static_data_member_decl, grokfield,
2963 grokbitfield, grokoptypename, grok_function_init,
2964 cplus_decl_attributes, constructor_name, defer_fn,
2965 build_anon_union_vars, finish_anon_union, coerce_new_type,
2966 coerce_delete_type, comdat_linkage, maybe_make_one_only,
2967 key_method, import_export_vtable, import_export_class,
2968 output_vtable_inherit, import_export_decl, import_export_tinfo,
2969 build_cleanup, get_guard, get_guard_bits, get_guard_cond,
2970 set_guard, start_objects, finish_objects,
2971 start_static_storage_duration_function,
2972 finish_static_storage_duration_function, get_priority_info,
2973 start_static_initialization_or_destruction,
2974 finish_static_initialization_or_destruction,
2975 do_static_initialization, do_static_destruction,
2976 prune_vars_needing_no_initialization, write_out_vars,
2977 reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
2978 add_using_namespace, merge_functions, ambiguous_decl,
2979 lookup_using_namespace, lookup_using_namespace,
2980 qualified_lookup_using_namespace, set_decl_namespace,
2981 decl_namespace, current_decl_namespace, push_decl_namespace,
2982 pop_decl_namespace, push_scope, pop_scope, add_function,
2983 arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
2984 lookup_arg_dependent, do_namespace_alias,
2985 validate_nonmember_using_decl, do_nonmember_using_decl,
2986 do_toplevel_using_decl, do_local_using_decl,
2987 do_class_using_decl, do_using_directive, check_default_args,
2988 mark_used, handle_class_head): Use C90 prototypings. Use booleans.
2989 * parser.c (cp_parser_class_head): Use booleanss.
2990 * decl.c (walk_globals, walk_vtables): Likewise.
2991 * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
2992 walk_globals): Change return type from 'int' to 'bool'.
2993 * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
2994 throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
2995 build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
2996 get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
2997 qualifier_flags, tinfo_base_init, generic_initializer,
2998 ptr_initializer, dfs_class_hint_mark, ptm_initializer,
2999 dfs_class_hint_unmark, class_hint_flags, class_initializer,
3000 typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
3001 get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
3002 unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
3003 * repo.c (repo_compile_flags, repo_template_declared,
3004 repo_template_defined, repo_class_defined, repo_get_id,
3005 repo_template_used, repo_vtable_used, repo_inline_used,
3006 repo_tinfo_used, repo_template_instantiated, extract_string,
3007 open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
3008 finish_repo): Likewise.
3009 * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
3010 cxx_print_xnode): Likewise..
3011 * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
3012 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
3013 * cxxfilt.c (demangle_it, print_demangler_list, usage,
3014 standard_symbol_characters, hp_symbol_characters, main, fatal):
3016 (strip_underscore): Change type from 'int' to 'bool'.
3017 (main): Use boolean constants.
3019 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
3021 Remove traditional C constructs 3/n.
3022 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
3023 build_up_reference, warn_ref_binding, convert_to_reference,
3024 convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
3025 convert_to_void, convert, convert_force, build_type_conversion,
3026 build_expr_type_conversion, type_promotes_to,
3027 perform_qualification_conversions): Use C90 prototyping style.
3028 * decl2.c (grok_array_decl): Use boolean constant.
3029 (delete_sanity): Likewise.
3030 * typeck.c (build_unary_op): Likewise.
3031 * semantics.c (finish_switch_cond): Likewise.
3032 * parser.c (cp_parser_direct_new_declarator): Likewise.
3033 * init.c (build_new): Likewise.
3035 2002-12-27 Mark Mitchell <mark@codesourcery.com>
3037 * Make-lang.in (po-generated): Remove parse.c.
3038 (CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
3039 ($(srcdir)/cp/parse.h): Remove target.
3040 ($(srcdir)/cp/parse.c): Likewise.
3041 (gt-cp-parse.h): Likewise.
3042 (gt-cp-parser.h): New target.
3043 (c++.distclean): Do not remove parse.output.
3044 (c++.maintainer-clean): Do not remove parse.c or parse.h.
3045 (cp/spew.o): Remove target.
3046 (cp/lex.o): Adjust dependencies.
3047 (cp/pt.o): Likewise.
3048 (cp/parse.o): Likewise.
3049 (cp/TAGS): Do not mention parse.c.
3050 (cp/parser.o): New target.
3051 * NEWS: Mention the new parser.
3052 * call.c (build_scoped_method_call): Simplify.
3053 (build_method_call): Likewise.
3054 (build_new_function_call): Adjust calls to add_function_candidate
3055 and add_template_candidate.
3056 (build_new_op): Improve handling of erroroneous operands.
3057 (convert_default_arg): Remove circular argument processing.
3058 (name_as_c_string): New function.
3059 (build_new_method_call): Use it.
3060 (perform_implicit_conversion): Use error_operand_p.
3061 * class.c (finish_struct_anon): Use constructor_name_p.
3062 (check_field_decls): Likewise.
3063 (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
3064 (resolve_address_of_overloaded_function): Likewise.
3065 (instantiate_type): Tweak pointer-to-member handling.
3066 (get_primary_binfo): Remove incorrect assertion.
3067 * config-lang.in (gtfiles): Add parser.c, remove parse.c.
3068 * cp-tree.h (DEFARG_TOKENS): New macro.
3069 (default_arg): New structure.
3070 (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
3071 (lang_tree_node): Add default_arg.
3072 (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
3073 (type_info_ref_type): New macro.
3074 (saved_scope): Make processing_explicit_instantiation a boolean.
3075 (check_access): New field.
3076 (unparsed_text): Remove.
3077 (language_function): Remove unparsed_inlines.
3078 (error_operand_p): New macro.
3079 (lang_decl): Adjust pending_inline_info.
3080 (DEFARG_POINTER): Remove.
3081 (tag_types): Add typenames.
3082 (lookup_ualified_name): Declare.
3083 (lookup_name_real): Likewise.
3084 (shadow_tag): Adjust prototype.
3085 (get_scope_of_declarator): Declare it.
3086 (process_next_inline): Remove it.
3087 (check_for_missing_semicolon): Likewise.
3088 (maybe_get_template_decl_from_type_decl): Declare it.
3089 (finish_label_stmt): Adjust prototype.
3090 (finish_non_static_data_meber): Declare it.
3091 (finish_pseudo_destructor_call_expr): Rename to ...
3092 (finish_pseudo_destructor_expr): ... this.
3093 (finish_compound_literal): Declare it.
3094 (begin_inline_definitions): Remove it.
3095 (init_spew): Remove.
3096 (peekyylex): Likewise.
3097 (arbitrate_lookup): Likewise.
3098 (frob_opname): Likewise.
3099 (maybe_snarf_defarg): Likewise.
3100 (add_defarg_fn): Likewise.
3101 (do_pending_defargs): Likewise.
3102 (done_pending_defargs): Likewise.
3103 (unprocessed_defarg_fn): Likewise.
3104 (replace_defarg): Likewise.
3105 (end_input): Likewise.
3106 (get_overloaded_fn): Likewise.
3107 * cvt.c (convert_to_reference): Improve error handling.
3108 * decl.c (lookup_name_real): Do not declare it static.
3109 (maybe_push_to_top_level): Set check_access.
3110 (identifier_type_value): Adjust call to lookup_name_real.
3111 (lookup_qualified_name): New method.
3112 (lookup_name_real): Remove special-case parsing code.
3113 (lookup_name-nonclass): Adjust call to lookup_name_real.
3114 (lookup_name_namespace_only): Likewise.
3115 (lookup_name): Likewise.
3116 (check_tag_decl): Return the type declared.
3117 (shadow_tag): Likewise.
3118 (register_dtor_fn): Tweak check_access.
3119 (grokfndecl): Use constructor_name_p.
3120 (get_scope_of_declarator): New function.
3121 (grokdeclarator): Obscure tweaks for slightly different declarator
3123 (start_method): Return error_mark_node to indicate failure.
3124 (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
3125 * decl2.c (constructor_name_full): Simplify.
3126 (constructor_name): Use it.
3127 (build_expr_from_tree): Adjust for changes to do new parser.
3128 (push_scope): Improve robustness.
3129 (validate_nonmember_using_decl): Process declarations, not names.
3130 (do_class_using_decl): Likewise.
3131 (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
3133 * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
3134 * expr.c (cxx_expand_expr): Handle BASELINKs.
3135 * init.c (member_init_ok_or_else): Issue more errors.
3136 (build_offset_ref): Tweak handling of FUNCTION_DECLs.
3137 * lex.c: Do not include parse.h.
3138 (yypring): Do not declare.
3140 (make_reference_declarator): Remove error-generating code.
3141 (rid_to_yy): Remove.
3142 (cxx_init): Do not call init_spew.
3144 (check_for_missing_semicolon): Remove.
3145 * lex.h (got_scope): Remove.
3146 (got_object): Remove.
3147 * method.c (hack_identifier): Use finish_non_static_data_member.
3148 (implicitly_declare_fn): Adjust use of constructor_name.
3149 * parser.c: New file.
3150 * pt.c (parse.h): Do not include it.
3151 (maybe_get_template_decl_from_template): Do not declare it.
3152 (finish_member_template_decl): Tweak.
3153 (begin_explicit_instantiation): Adjust for
3154 processing_explicit_instantiation being boolean.
3155 (end_explicit_instantiation): Likewise.
3156 (maybe_process_partial_specialization): Tighten specialization
3158 (retrieve_local_specialization): Adjust ue of hash table.
3159 (eq_local_specializations): New function.
3160 (register_local_specialization): Likewise.
3161 (push_template_decl_real): Remove unnecessary test.
3162 (maybe_get_template_decl_from_type_decl): Don't make it static.
3163 (for_each_template_parm_r): Handle TYPEOF_TYPE.
3164 (tsubst_copy): Use retrieive_local_specialization to handle
3165 PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
3166 Handle COMPONENT_REFs with pseudo-destructor-expressions.
3167 Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
3168 (tsubst_expr): Pass decls, not names, to do_local_using_decl.
3169 (unify): Tweak handling of CONST_DECLs.
3170 (regenerate_decl_from_template): Use push_nested_class.
3171 (template_for_substitution): New funciton.
3172 (instantiate_decl): Use it. Register parameters as local
3174 * rtti.c (init_rtti_processing): Set type_info_ref_type.
3175 (build_typeid): Use it.
3176 (get_typeid): Likeise.
3177 * search.c (accessible_p): Use check_access, not
3178 flag_access_control.
3179 (adjust_result_of_qualified_name_lookup): Pay attention to the
3181 * semantics.c (finish_asm_stmt): Adjust error handling.
3182 (finish_label_stmt): Return the statement.
3183 (finish_non_static_data_member): New function.
3184 (finish_class_expr): Handle BASELINKs.
3185 (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
3186 (finish_object_call_expr): Simplify handling during templates.
3187 (finish_pseudo_destructor_call_expr): Rename to ...
3188 (finish_pseudo_dtor_expr): ... this.
3189 (finish_compound_literal): New function.
3190 (begin_inline_definitions): Remove.
3191 (finish_sizeof): Remove special template handling.
3192 * spew.c: Do not include parse.h.
3193 * tree.c (get_overloaded_fn): Remove.
3194 * typeck.c (build_class_member_access_expr): Handle
3195 PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
3196 (lookup_destructor): New function.
3197 (finish_class_member_access_expr): Use it.
3198 (convert_arguments): Simplify.
3199 (build_unary_op): Handle BASELINKs.
3201 2002-12-26 Nathan Sidwell <nathan@codesourcery.com>
3204 * decl2.c (mark_used): Defer inline functions.
3205 (finish_file): Merge deferred_fns loops. Check all used
3206 inline functions have a definition.
3207 * method.c (make_thunk): Thunks are not inline.
3209 PR c++/5116, c++/764
3210 * call.c (build_new_op): Make sure template class operands are
3213 2002-12-24 Nathan Sidwell <nathan@codesourcery.com>
3216 * cp-tree.h (resolve_scoped_fn_name): Prototype.
3217 * call.c (resolve_scoped_fn_name): New function. Deal with
3218 more template expansion. Broken out of ...
3219 * parse.y (parse_finish_call_expr): ... here. Call it.
3220 * decl2.c (build_expr_from_tree, CALL_EXPR): Use
3221 resolve_scoped_fn_name and build_call_from_tree.
3224 * decl.c (duplicate_decls): Templates may be disambiguated by
3228 * decl2.c (check_classfn): Use lookup_fnfield_1. List all
3229 conversion operators on failure.
3231 2002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3233 Remove traditional C constructs 2/n.
3234 * call.c (tourney, build_field_call, equal_functions, joust,
3235 compare_ics, build_over_call, build_java_interface_fn_ref,
3236 convert_like_real, op_error, build_object_call, resolve_args,
3237 build_vfield_ref, check_dtor_name, build_scoped_method_call,
3238 build_addr_func, build_call, build_method_call, null_ptr_cst_p,
3239 sufficient_parms_p, build_conv, non_reference, strip_top_quals,
3240 standard_conversion, reference_related_p,
3241 reference_compatible_p, convert_class_to_reference,
3242 direct_reference_binding, reference_binding,
3243 ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
3244 add_template_conv_candidate, any_viable, any_strictly_viable,
3245 build_this, splice_viable, print_z_candidates,
3246 build_user_type_conversion, build_new_function_call,
3247 conditional_conversion, build_conditional_expr, build_new_op,
3248 build_op_delete_call, enforce_access, call_builtin_trap,
3249 convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
3250 convert_default_arg, type_passed_as, convert_for_arg_passing,
3251 in_charge_arg_for_name, is_properly_derived_from,
3252 maybe_handle_implicit_object, maybe_handle_ref_bind,
3253 source_type, add_warning, can_convert, can_convert_arg,
3254 perform_implicit_conversion, can_convert_arg_bad,
3255 initialize_reference, add_conv_candidate,
3256 add_template_candidate_real, add_template_candidate): Ansify.
3258 2002-12-22 Nathan Sidwell <nathan@codesourcery.com>
3261 * cp-tree.h (grokoptypename): Add SCOPE parameter.
3262 * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
3263 if in a template scope.
3264 * parse.y (unoperator): Return the scope.
3265 (operator_name): Adjust grokoptypename call.
3267 2002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3269 * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
3270 * decl.c (make_unbound_class_template): Adjust. Check for tf_error.
3271 * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
3273 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
3275 * ChangeLog: Fix a typo.
3276 * class.c: Fix comment typos.
3277 * cp-tree.h: Likewise.
3279 2002-12-18 Jason Merrill <jason@redhat.com>
3281 Handle anonymous unions at the tree level.
3282 C++ ABI change: Mangle anonymous unions using the name of their
3283 first named field (by depth-first search). Should not cause
3284 binary compatibility problems, though, as the compiler previously
3285 didn't emit anything for affected unions.
3286 * cp-tree.def (ALIAS_DECL): New tree code.
3287 * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
3288 first field, not the largest.
3289 (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
3290 push the decl, and write it out at namespace scope.
3291 * decl.c (lookup_name_real): See through an ALIAS_DECL.
3292 (pushdecl): Add namespace bindings for ALIAS_DECLs.
3293 * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
3294 of a decl which doesn't have one.
3295 * typeck.c (build_class_member_access_expr): Don't recurse if
3296 we already have the type we want.
3298 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3301 * friend.c (make_friend_class): Allow partial specialization
3302 when declaration is not a template friend.
3304 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3307 * pt.c (lookup_template_class): Copy TREE_PRIVATE and
3308 TREE_PROTECTED to created decl nodes.
3310 2002-12-18 Mark Mitchell <mark@codesourcery.com>
3312 * class.c (build_base_field): Do not set DECL_PACKED on the
3315 2002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
3317 * cp-tree.h (struct tree_srcloc): Use location_t.
3318 (SOURCE_LOCUS): New.
3319 (SRCLOC_FILE, SRCLOC_LINE): Adjust.
3321 2002-12-17 Jason Merrill <jason@redhat.com>
3323 * decl.c (finish_function): Also complain about no return in
3325 * semantics.c (finish_return_stmt): Also call check_return_expr in
3327 * typeck.c (check_return_expr): In a template, just remember that we
3330 2002-12-16 Jason Merrill <jason@redhat.com>
3332 * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
3335 * semantics.c (do_pushlevel): Call pushlevel after adding the
3337 (do_poplevel): Call poplevel before adding the SCOPE_STMT.
3338 * parse.y (function_body): Go back to using compstmt.
3339 * decl.c (pushdecl): Skip another level to get to the parms level.
3341 * call.c (build_new_method_call): Use is_dummy_object to determine
3342 whether or not to evaluate the object parameter to a static member
3345 2002-12-14 Jason Merrill <jason@redhat.com>
3347 * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
3348 return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
3349 * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
3350 don't bother with an AGGR_INIT_EXPR.
3351 (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
3352 just generate a new decl normally. Take return slot parm.
3353 * cp-tree.h: Adjust prototype.
3355 2002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
3358 * cvt.c (convert_to_pointer_force): Don't try comparing against
3361 2002-12-13 Geoffrey Keating <geoffk@apple.com>
3363 * cp-tree.h: Have the multiple-include guards around
3366 2002-12-10 David Edelsohn <edelsohn@gnu.org>
3368 * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
3370 (snarf_method): Same.
3371 (snarf_defarg): Same.
3373 2002-12-10 Mark Mitchell <mark@codesourcery.com>
3376 * pt.c (tsubst_copy): Handle destructor names more correctly.
3378 2002-12-10 Matt Austern <austern@apple.com>
3380 * cp-tree.h: get rid of needs_virtual_reinit bit.
3382 2002-12-09 Mark Mitchell <mark@codesourcery.com>
3384 * NEWS: Document removal of in-class initialization extension for
3385 static data members of non-arithmetic, non-enumeration type.
3386 * decl.c (check_static_variable_definition): Do not allow that
3388 * decl2.c (grokfield): Do not call digest_init when processing
3391 2002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3393 * error.c (dump_expr): Fix format specifier warning.
3395 2002-12-04 Geoffrey Keating <geoffk@apple.com>
3397 * class.c (finish_struct_1): Correct comment.
3398 * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
3400 2002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3403 * error.c (dump_expr): Don't ever try to dump a non-existent
3406 2002-12-03 Nathan Sidwell <nathan@codesourcery.com>
3408 Implement covariant returns.
3409 * cp-tree.h (IS_AGGR_TYPE_2): Remove.
3410 (struct lang_decl_flags): Add this_thunk_p flag.
3411 Rename vcall_offset to virtual_offset.
3412 (struct lang_decl): Rename delta to fixed_offset.
3413 (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
3414 (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
3415 (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
3416 (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
3417 (make_thunk): Add this_adjusting arg.
3418 (finish_thunk): Declare.
3419 (mangle_thunk): Add this_adjusting arg.
3420 * class.c (get_vcall_index): Use base function for lookup.
3421 (update_vtable_entry_for_fn): Generate covariant thunk.
3422 (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
3423 (build_vtbl_initializer): Use base function for lookup.
3424 Finish covariant thunk here. Adjust thunk generation.
3425 * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
3426 Adjust thunk dumping.
3427 * mangle.c (mangle_call_offset): New function.
3428 (mangle_thunk): Adjust for covariant thunks.
3429 * method.c (make_thunk): Adjust. Do not set name here.
3430 (finish_thunk): New function. Set name here.
3431 (use_thunk): Generate covariant thunks too.
3432 (thunk_adjust): New function.
3433 * search.c (covariant_return_p): Remove. Fold into ...
3434 (check_final_overrider): ... here. Simplify.
3435 * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
3437 2002-12-03 Jason Merrill <jason@redhat.com>
3440 * call.c (build_over_call): Check specifically for TARGET_EXPR
3443 PR c++/8461, c++/8625
3444 * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
3445 (cp_convert_parm_for_inlining): Remove.
3446 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
3448 * cp-tree.h (ADDR_IS_INVISIREF): Remove.
3449 * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
3451 * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
3452 an ambiguous conversion.
3454 2002-12-03 Mark Mitchell <mark@codesourcery.com>
3457 * decl.c (reshape_init): Handle erroneous initializers.
3459 2002-12-02 Mark Mitchell <mark@codesourcery.com>
3462 * spew.c (remove_last_token): Make sure that last_chunk is set
3466 * error.c (dump_expr): Handle character constants with
3469 2002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3472 * decl.c (grokdeclarator): Require class-key for all friend class.
3473 Output the correct type and context in the error message.
3475 2002-12-01 Mark Mitchell <mark@codesourcery.com>
3478 * pt.c (unify): Use variably_modified_type_p to test validity of
3479 template argument types.
3482 * cp-tree.h (lang_type_class): Add typeinfo_var.
3483 (CLASSTYPE_TYPEINFO_VAR): New macro.
3484 * rtti.c (get_tinfo_decl): Use it.
3487 * init.c (expand_member_init): Always get the main variant of a
3490 2002-12-01 Mark Mitchell <mark@codesourcery.com>
3494 * decl.c (cxx_init_decl_processing): Use size_type_node, not
3496 * decl2.c (coerce_new_type): Likewise.
3497 * except.c (do_allocate_exception): Likewise.
3499 2002-11-30 Zack Weinberg <zack@codesourcery.com>
3501 * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
3502 dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
3503 lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
3504 repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
3505 typeck2.c: Include coretypes.h and tm.h.
3506 * Make-lang.in: Update dependencies.
3508 2002-11-30 Mark Mitchell <mark@codesourcery.com>
3511 * decl.c (layout_var_decl): Deal gracefully with erroneous types.
3512 (check_initializer): Validate the type of the initialized
3513 variable, even if the initializer is absent.
3514 * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
3517 * typeck.c (convert_for_assignment): Do not use
3518 decl_constant_value on the operand.
3521 * pt.c (instantiate_decl): Handle template friends defined outside
3522 of the class correctly.
3524 2002-11-29 Joe Buck <jbuck@synopsys.com>
3526 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
3529 2002-11-29 Mark Mitchell <mark@codesourcery.com>
3531 * class.c (walk_subobject_offsets): Recur on binfos as well as on
3533 (layout_nonempty_base_or_field): Pass it a binfo when processing a
3535 (layout_empty_base): Likewise.
3536 (build_base_field): Likewise.
3538 2002-11-27 Mark Mitchell <mark@codesourcery.com>
3540 * class.c (build_base_field): Make sure we get the canonical base
3541 when descending through primary bases.
3543 2002-11-26 Geoffrey Keating <geoffk@apple.com>
3545 * decl.c (check_initializer): Don't error on initialisation of
3546 a scalar with a brace-enclosed expression.
3548 2002-11-26 Nathan Sidwell <nathan@codesourcery.com>
3550 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
3551 (template_parms_equal): Remove prototype.
3552 * typeck.c (buuld_indirect_ref): Reformat.
3554 2002-11-25 Jason Merrill <jason@redhat.com>
3556 * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
3559 2002-11-25 Mark Mitchell <mark@codesourcery.com>
3561 * tree.c (cp_build_qualified_type_real): Correct handling of
3563 * class.c (walk_subobject_offsets): Fix thinko.
3564 (build_base_field): Record offsets of empty bases in primary
3566 (layout_class_type): Record offsets of empty bases in fields.
3568 * search.c (is_subobject_of_p_1): Fix thinko.
3569 (lookup_field_queue_p): Likewise.
3571 2002-11-24 Mark Mitchell <mark@codesourcery.com>
3573 * class.c (layout_class_type): Reuse tail padding when laying out
3576 2002-11-22 Mark Mitchell <mark@codesourcery.com>
3578 * rtti.c (qualifier_flags): Fix thinko.
3580 2002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3582 Remove traditional C constructs 1/n.
3583 * cp-tree.h (init_method, set_mangled_name_for_decl,
3584 build_opfncall, hack_identifier, make_thunk, use_thunk,
3585 synthesize_method, implicitly_declare_fn,
3586 skip_artificial_parms_for, optimize_function, calls_setjmp_p,
3587 maybe_clone_body): Remove use of PARAMS.
3589 * method.c (do_build_assign_ref, do_build_copy_constructor,
3590 synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
3592 (synthesize_method): Use 'bool' type and constants instead of
3594 (locate_copy): Likewise.
3595 (implicitly_declare_fn): Likewise.
3597 * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
3598 Remove old-style declaration.
3599 (maybe_clone_body): Use 'bool' type and constants.
3601 2002-11-21 Glen Nakamura <glen@imodulo.com>
3604 * typeck.c (get_member_function_from_ptrfunc): Make sure that a
3605 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
3606 of the branches of a COND_EXPR.
3608 2002-11-19 Mark Mitchell <mark@codesourcery.com>
3610 * pt.c (for_each_template_parm): Free allocated memory.
3611 * search.c (is_subobject_of_p_1): New function.
3612 (is_subobject_of_p): Avoid walking virtual bases multiple times.
3614 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
3616 * g++spec.c (lang_specific_spec_functions): New.
3618 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
3620 * ChangeLog: Follow spelling conventions.
3621 * class.c: Likewise.
3622 * decl2.c: Likewise.
3624 2002-11-14 Zack Weinberg <zack@codesourcery.com>
3626 * search.c (dfs_push_decls): Do not try to reorder elements
3627 3..n of method_vec if method_vec has only two elements.
3628 Reverse order of two tests to avoid accessing unallocated
3631 2002-11-14 Mark Mitchell <mark@codesourcery.com>
3633 * class.c (dfs_find_final_overrider): Adjust so that the most
3634 derived object is a binfo, rather than a class type.
3635 (find_final_overrider): Likewise.
3636 (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
3637 (add_vcall_offset): Likewise.
3639 2002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3642 * pt.c (instantiate_template): Push class scope for member
3644 (get_mostly_instantiated_function_type): Likewise. Don't call
3645 tsubst on context. Remove CONTEXTP and TPARMSP parameters.
3646 * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
3647 * mangle.c (write_encoding, write_unqualified_name): Adjust.
3649 2002-11-07 Mark Mitchell <mark@codesourcery.com>
3651 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
3652 vcall offfsets. Split out ...
3653 (add_vcall_offset): ... new function.
3656 * pt.c (for_each_template_parm): Add htab parameter.
3657 (process_partial_specialization): Adjust call.
3658 (push_template_decl_real): Likewise.
3659 (pair_fn_data): Add visited.
3660 (for_each_template_parm_r): Avoid walking duplicates more than
3662 (uses_template_parms): Adjust call to for_each_template_parm.
3664 2002-11-07 Mark Mitchell <mark@codesourcery.com>
3666 * class.c (add_implicitly_declared_members): Put implicitly
3667 declared functions at the end of TYPE_METHODs when -fabi-version
3670 2002-11-05 Geoffrey Keating <geoffk@apple.com>
3672 * decl2.c (finish_file): Correct spelling.
3674 2002-11-03 Mark Mitchell <mark@codesourcery.com>
3676 * call.c (build_special_member_call): Do not try to lookup VTTs by
3678 * class.c (vtbl_init_data): Add generate_vcall_entries.
3679 (get_vtable_decl): Do not look up virtual tables by name.
3680 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
3681 (set_primary_base): Do not set CLASSTYPE_RTTI.
3682 (determine_primary_base): Likewise.
3683 (get_matching_virtual): Remove.
3684 (get_vcall_index): New function.
3685 (update_vtable_entry_for_fn): Do not try to use virtual thunks
3686 when they are not required. Assign vcall indices at this point.
3687 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
3688 Do update dynamic_classes.
3689 (build_vtt): Do not add VTTs to the symbol table.
3690 (build_ctor_vtbl_group): Likewise.
3691 (build_vtbl_initializer): Simplify handling of vcall indices.
3692 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
3693 for the most derived class.
3694 (add_vcall_offset_vtbl_entries_1): But do not actually add them to
3696 * cp-tree.h (dynamic_classes): New macro.
3697 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
3698 (CLASSTYPE_RTTI): Remove.
3699 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
3700 (CLASSTYPE_VCALL_INDICES): New macro.
3701 (CLASSTYPE_VTABLES): Likewise.
3702 (BV_USE_VCALL_INDEX_P): Remove.
3703 (build_vtable_path): Remove.
3704 * decl2.c (finish_vtable_vardecl): Remove.
3705 (key_method): Remove #if 0'd code.
3706 (finish_vtable_vardecl): Rename to ...
3707 (maybe_emit_vtables): ... this.
3708 (finish_file): Use it.
3709 * search.c (look_for_overrides_here): Update comment.
3711 2002-11-01 Zack Weinberg <zack@codesourcery.com>
3714 * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
3716 2002-10-30 Jason Merrill <jason@redhat.com>
3719 * cp-tree.h (ADDR_IS_INVISIREF): New macro.
3720 * call.c (convert_for_arg_passing): Set it.
3721 * except.c (stabilize_throw_expr): Recurse for such an arg.
3723 2002-10-31 Mark Mitchell <mark@codesourcery.com>
3725 * cp-tree.h (lang_decl_flags): Remove init_priority.
3726 (lang_decl): Add delta.
3727 (GLOBAL_INIT_PRIORITY): Remove.
3728 (THUNK_DELTA): Revise definition.
3729 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
3730 * dump.c (cp_dump_tree): Don't dump it.
3732 2002-10-30 Mark Mitchell <mark@codesourcery.com>
3735 * typeck2.c (process_init_constructor): Call complete_array_type.
3738 * decl.c (make_typename_type): Issue errors about invalid results.
3740 2002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3742 Core issue 287, PR c++/7639
3743 * cp-tree.h (lang_type_class): Add decl_list field.
3744 (CLASSTYPE_DECL_LIST): New macro.
3745 (maybe_add_class_template_decl_list): Add declaration.
3746 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
3747 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
3748 (maybe_add_class_template_decl_list): New function.
3749 (add_implicitly_declared_members): Use it.
3750 * decl.c (maybe_process_template_type_declaration): Likewise.
3751 (pushtag): Likewise.
3752 * friend.c (add_friend): Likewise.
3753 (make_friend_class): Likewise.
3754 * semantics.c (finish_member_declaration): Likewise.
3755 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
3756 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
3757 to process members and friends in the order of declaration.
3759 2002-10-29 Mark Mitchell <mark@codesourcery.com>
3762 * decl.c (finish_destructor_body): Create the label to jump to
3763 when returning from a destructor here.
3764 (finish_function_body): Rather than here.
3766 2002-10-25 Zack Weinberg <zack@codesourcery.com>
3769 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
3770 SCOPE_REF is not null before dereferencing it.
3772 2002-10-25 Mark Mitchell <mark@codesourcery.com>
3774 * call.c (build_over_call): Use DECL_CONTEXT, not
3775 DECL_VIRTUAL_CONTEXT.
3776 * class.c (modify_vtable_entry): Don't mess with
3777 DECL_VIRTUAL_CONTEXT.
3778 (set_vindex): Remove.
3779 (set_primary_base): Remove vfuns_p parameter.
3780 (determine_primary_base): Likewise.
3781 (modify_all_vtables): Likewise.
3782 (layout_class_type): Likewise. Adjust calls to other functions
3784 (finish_struct_1): Adjust calls to modified functions. Set
3786 * cp-tree.h (lang_type_class): Remove vsize.
3787 (CLASSTYPE_VSIZE): Remove.
3788 (lang_decl): Remove thunks.
3789 (DECL_THUNKS): Adjust.
3790 (DECL_VIRTUAL_CONTEXT): Remove.
3791 (duplicate_decls): Don't copy it.
3792 * pt.c (build_template_decl): Don't set it.
3793 (tsubst_decl): Likewise.
3794 * typeck.c (expand_ptrmemfunc_cst): Don't use it.
3796 * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
3797 (build_vtable_entry): Remove.
3798 * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
3799 (lang_decl): Add thunks.
3800 (DECL_THUNKS): New macro.
3801 * decl.c (duplicate_decls): Copy it.
3802 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
3803 * semantics.c (emit_associated_thunks): Simplify.
3805 2002-10-24 David Edelsohn <edelsohn@gnu.org>
3808 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
3809 lang_type structure exists before accessing field.
3810 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
3811 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
3812 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
3813 * class.c (check_field_decls): Use new macros.
3814 * typeck2.c (process_init_constructor): Remove redundant check for
3815 existence of lang_type structure.
3817 2002-10-24 Mark Mitchell <mark@codesourcery.com>
3819 * class.c (end_of_base): New method.
3820 (end_of_class): Use it. Check indirect virtual bases.
3822 * class.c (check_field_decls): Fix typo.
3824 2002-10-23 Mark Mitchell <mark@codesourcery.com>
3827 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
3831 * spew.c (next_token): Do not return an endless stream of
3832 END_OF_SAVED_INPUT tokens.
3833 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
3834 the cached token stream.
3835 (snarf_defarg): Likewise.
3837 2002-10-23 Zack Weinberg <zack@codesourcery.com>
3839 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
3840 variably_modified_type_p.
3841 * cp-tree.h: Remove prototype of variably_modified_type_p.
3842 * tree.c (variably_modified_type_p): Remove; now implemented
3843 in language-independent code.
3845 2002-10-22 Mark Mitchell <mark@codesourcery.com>
3848 * spew.c (snarf_parenthesized_expression): New function.
3849 (snarf_block): Use it.
3851 2002-10-22 Richard Henderson <rth@redhat.com>
3853 * method.c (use_thunk): Always compute vcall_value; assert that
3854 it is not zero. Use can_output_mi_thunk; use output_mi_thunk
3855 for vcall thunks as well.
3857 2002-10-21 Mark Mitchell <mark@codesourcery.com>
3859 * class.c (empty_base_at_nonzero_offset_p): New function.
3860 (layout_nonempty_base_or_field): Do not check for conflicts when
3861 laying out a virtual base using the GCC 3.2 ABI.
3862 (build_base_field): Correct checking for presence of empty classes
3863 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
3865 * class.c (include_empty_classes): Use normalize_rli.
3866 (layout_class_type): Likewise.
3868 * decl.c (reshape_init): Tweak handling of character arrays.
3871 * cp-tree.h (lang_type_class): Add contains_empty_class_p.
3872 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
3873 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
3874 (check_field_decls): Likewise.
3875 (layout_class_type): Likewise.
3876 (finish_struct_1): Initialize it.
3877 (walk_subobject_offsets): Use it to prune searches.
3879 2002-10-20 Mark Mitchell <mark@codesourcery.com>
3881 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
3882 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
3883 TARGET_ASM_OUTPUT_MI_THUNK in comments.
3885 2002-10-18 Zack Weinberg <zack@codesourcery.com>
3887 * decl.c (start_decl): Point users of the old initialized-
3888 typedef extension at __typeof__.
3890 2002-10-18 Mark Mitchell <mark@codesourcery.com>
3892 * Make-lang.in (method.o): Depend on TARGET_H.
3893 * method.c (target.h): Include it.
3894 (use_thunk): Use target hooks. Use vcall thunks, if available.
3896 2002-10-18 Mark Mitchell <mark@codesourcery.com>
3898 * class.c (base_derived_from): Make sure return value is a bool.
3900 2002-10-18 Mark Mitchell <mark@codesourcery.com>
3902 * class.c (find_final_overrider_data_s): Remove overriding_fn and
3904 (dfs_base_derived_from): New function.
3905 (base_derived_from): Likewise.
3906 (dfs_find_final_overrider): Use base_derived_from.
3907 (find_final_overrider): Adjust.
3909 2002-10-18 Jason Merrill <jason@redhat.com>
3912 * semantics.c (finish_for_cond, finish_while_cond): Don't mess
3913 with condition decls in a template.
3915 2002-10-17 Nathan Sidwell <nathan@codesourcery.com>
3917 * class.c (add_method): Compare template parms too.
3919 2002-10-17 Mark Mitchell <mark@codesourcery.com>
3922 * class.c (handle_using_decl): Allow the declaration used to be
3923 from an ambiguous base.
3925 * pt.c (convert_template_argument): Revert this change:
3926 2002-10-16 Mark Mitchell <mark@codesourcery.com>
3927 * pt.c (convert_template_argument): Do not fold non-type
3928 template rguments when inside a template.
3930 * init.c (expand_default_init): Handle brace-enclosed initializers
3933 2002-10-16 Mark Mitchell <mark@codesourcery.com>
3935 * mangle.c (write_expression): Correct handling of enumeration
3937 (write_template_arg): Likewise.
3938 * pt.c (convert_template_argument): Do not fold non-type template
3939 arguments when inside a template.
3942 * cvt.c (convert_to_reference): Allow references as the incoming
3945 2002-10-16 Mark Mitchell <mark@codesourcery.com>
3948 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
3949 build_qualified_type.
3951 2002-10-15 Richard Henderson <rth@redhat.com>
3953 * error.c (dump_expr): Use real_to_decimal directly, and with
3956 2002-10-15 Mark Mitchell <mark@codesourcery.com>
3958 * decl.c (reshape_init): Fix typo.
3960 * cp-tree.h (operator_name_info_t): Add arity.
3961 * lex.c (init_operators): Initialize it.
3962 * mangle.c (write_conversion_operator_name): New function.
3963 (write_unqualified_name): Use it.
3964 (write_template_args): Accept template arguments as a TREE_LIST.
3965 (write_expression): Adjust handling of qualified names to match
3968 2002-10-15 Jason Merrill <jason@redhat.com>
3970 * call.c (call_builtin_trap): New fn.
3971 (convert_arg_to_ellipsis): Use it. Downgrade error to warning.
3972 (build_call): Don't set current_function_returns_abnormally outside
3975 2002-10-14 Mark Mitchell <mark@codesourcery.com>
3977 * class.c (check_field_decls): Remove empty_p parameter. Instead,
3978 clear CLASSTYPE_EMPTY_P.
3979 (build_base_field): Likewise.
3980 (build_base_fields): Likewise.
3981 (check_bases_and_members): Likewise.
3982 (create_vtbl_ptr): Likewise.
3983 (layout_class_type): Likewise. Ensure that empty classes have
3984 size zero when used as base classes in the 3.2 ABI.
3985 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
3986 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
3988 (is_empty_class): Correct definition when using post-3.2 ABI.
3989 * cp-tree.h (lang_type_class): Add empty_p.
3990 (CLASSTYPE_EMPTY_P): New macro.
3992 2002-10-12 Nathan Sidwell <nathan@codesourcery.com>
3994 * init.c (build_delete): Do not apply save_expr for arrays.
3995 (build_vec_delete): Likewise.
3997 2002-10-14 Mark Mitchell <mark@codesourcery.com>
3999 * decl.c (layout_var_decl): Call layout_decl even for variables
4000 whose type is an array with unspecified bounds.
4003 * lex.c (do_identifier): Add another option for the parsing
4005 * parse.y (do_id): Use it.
4007 2002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
4009 PRs C++/6803, C++/7721 and C++/7803
4010 * decl.c (grokdeclarator): Gracefully handle template-name as
4013 2002-10-11 Jason Molenda <jmolenda@apple.com>
4015 * init.c (build_field_list): Provide uses_unions_p with a default
4018 2002-10-11 Mark Mitchell <mark@codesourcery.com>
4021 * cp-tree.h (variably_modified_type_p): New function.
4022 (grokdeclarator) Tighten check for variably modified types as
4024 * pt.c (convert_template_argument): Do not allow variably modified
4025 types as template arguments.
4026 * tree.c (variably_modified_type_p): New function.
4028 * NEWS: Document removal of "new X = ..." extension.
4029 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
4030 brace-enclosed initializers.
4031 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
4032 (initialize_local_var): Remove declaration.
4033 (expand_static_init): Likewise.
4034 * decl.c (next_initializable_field): New function.
4035 (reshape_init): Likewise.
4036 (check_initializer): Use them. Build dynamic initializer for
4037 aggregates here too.
4038 (initialize_local_var): Simplify, and incorporate cleanup
4039 insertion code as well.
4040 (destroy_local_var): Remove.
4041 (cp_finish_decl): Tidy.
4042 (expand_static_init): Fold checks for whether or not a variable
4043 needs initialization into this function. Simplify.
4044 * decl2.c (do_static_initialization): Simplify.
4045 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
4046 be done for us automatically.
4047 (expand_default_init): Handle brace-enclosed initializers
4049 (expand_aggr_init_1): Remove RTL-generation code.
4050 (build_vec_init): Remove "new X = ..." support.
4051 * parse.y (new_initializer): Likewise.
4052 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
4053 brace-enclosed initializer.
4054 (create_pseudo_type_info): Likewise.
4055 * typeck2.c (store_init_value): Don't try to handle digest_init
4056 being called more than once.
4057 (digest_init): Tidy handling of brace-enclosed initializers.
4059 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4061 * decl.c (typename_hash): Use htab_hash_pointer.
4063 2002-10-10 Jim Wilson <wilson@redhat.com>
4065 * decl.c (duplicate_decls): Don't call decl_attributes.
4067 2002-10-09 Zack Weinberg <zack@codesourcery.com>
4070 * decl.c (start_decl): Unconditionally issue error for
4071 'typedef foo = bar'.
4072 (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
4073 (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
4075 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4077 * decl2.c (prune_vtable_vardecl): Delete unused function.
4079 2002-10-03 Mark Mitchell <mark@codesourcery.com>
4082 * decl2.c (finish_anon_union): Do not expand anonymous unions when
4083 procesing template functions.
4084 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
4085 type. Call layout_decl.
4086 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
4088 2002-10-07 Richard Henderson <rth@redhat.com>
4090 * decl2.c, pt.c: Revert c++/7754 fix.
4092 2002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4095 * error.c (dump_expr) [REAL_CST]: Output in decimal format.
4097 2002-10-03 Mark Mitchell <mark@codesourcery.com>
4100 * pt.c (for_each_template_parm_r): Handle BASELINKs.
4103 * decl2.c (finish_anon_union): Do not expand anonymous unions when
4104 procesing template functions.
4105 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
4106 type. Call layout_decl.
4107 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
4109 2002-10-03 Mark Mitchell <mark@codesourcery.com>
4112 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
4113 template parameters.
4114 (globals): Add entity and need_abi_warning.
4115 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
4116 CLASSTYPE_TEMPLATE_INFO.
4117 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
4119 (write_prefix): Handle typename types correctly.
4120 (write_template_prefix): Handle template template parameters
4122 (start_mangling): Add entity parameter.
4123 (finish_mangling): Warn about names whose mangling will change.
4124 (mangle_decl_string): Adjust.
4125 (mangle_type_string): Likewise.
4126 (mangle_special_for_type): Likewise.
4127 (mangle_ctor_vtbl_for_type): Likewise.
4128 (mangle_thunk): Likewise.
4129 (mangle_guard_variable): Likewise.
4130 (mangle_ref_init_variable): Likewise.
4132 2002-10-02 Mark Mitchell <mark@codesourcery.com>
4135 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
4136 * cp-tree.h (emit_base_init): Rename to ....
4137 (emit_mem_initializers): ... this.
4138 (expand_member_init): Change prototype.
4139 * init.c (perform_member_init): Compute explicit, rather than
4140 requiring it as a parameter.
4141 (sort_member_init): Rename to ...
4142 (sort_mem_initializers): ... this. Process bases and data members
4144 (sort_base_init): Remove.
4145 (emit_base_init): Rename to ...
4146 (emit_mem_initializers): ... this.
4147 (expand_aggr_vbase_init_1): Remove.
4148 (construct_virtual_bases): Rename to ...
4149 (construct_virtual_base): ... this.
4150 (expand_member_init): Rework handling of base initializers.
4151 * method.c (do_build_copy_constructor): Use
4152 finish_mem_initializers.
4153 * parse.y (member_init): Adjust calls to expand_member_init.
4154 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
4155 (tsubst_initializer_list): Use expand_member_init.
4156 * semantics.c (finish_mem_intiailizers): Simplify.
4158 2002-10-02 Matt Austern <austern@apple.com>
4159 * decl.c (walk_vtables_r): Fixed typo that caused result to
4160 never get a nonzero value.
4162 2002-10-02 Roger Sayle <roger@eyesopen.com>
4164 PR optimization/6627
4165 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
4166 from here, and move it to tree.h.
4167 * decl.c (cxx_init_decl_processing): If storing the vbit
4168 in function pointers, ensure that force_align_functions_log
4171 2002-10-02 Matt Austern <austern@apple.com>
4173 * class.c (check_field_decls): Changed warning about const member
4174 variables so that it doesn't get issued for a class aggregate.
4176 2002-10-01 Mark Mitchell <mark@codesourcery.com>
4178 * decl.c (cp_finish_decl): Make sure array types are laid out,
4179 even if the array bounds are unknown.
4181 2002-10-01 Steve Ellcey <sje@cup.hp.com>
4183 * class.c (build_vtbl_initializer): Change build_c_cast
4186 2002-10-01 Mark Mitchell <mark@codesourcery.com>
4188 * decl.c (cp_finish_decl): Make sure array types are laid out,
4189 even if the array bounds are unknown.
4191 * decl.c (cp_finish_decl): Correct check for dynamic
4192 initialization of thread-local storage.
4194 2002-09-30 Nathan Sidwell <nathan@codesourcery.com>
4196 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
4199 2002-09-30 Steve Ellcey <sje@cup.hp.com>
4201 * class.c (build_vtbl_initializer): Add cast.
4202 (add_vcall_offset_vtbl_entries_1):
4203 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
4205 2002-09-30 Mark Mitchell <mark@codesourcery.com>
4207 * class.c (walk_subobject_offsets): Correct the calculation of
4208 offsets for virtual bases. Correct the counting of array
4210 (layout_nonempty_base_or_field): Simplify. Correct the
4211 calculation of offsets to be propagated through the binfo
4213 (build_base_field): Avoid creating a FIELD_DECL for empty bases.
4214 Add the FIELD_DECL to TYPE_FIELDS.
4215 (build_base_fields): Adjust accordingly.
4216 (layout_virtual_bases): Use build_base_field.
4217 (end_of_class): Return a tree, not an integer.
4218 (warn_about_ambiguous_direct_bases): Rename to ...
4219 (warn_about_ambiguous_bases): ... this.
4220 (include_empty_classes): New function.
4221 (layout_class_type): Create an alternative version of the type to
4222 be used when as a base class type. Do not call
4223 finish_record_layout until we are done laying out the class.
4224 * cp-tree.h (lang_type_class): Remove size, size_unit. Add
4226 (CLASSTYPE_SIZE): Reimplement.
4227 (CLASSTYPE_SIZE_UNIT): Likewise.
4228 (CLASSTYPE_ALIGN): Likweise.
4229 (CLASSTYPE_USER_ALIGN): Likewise.
4230 (CLASSTYPE_AS_BASE): New macro.
4231 (DECL_INITIALIZED_P): Likewise.
4232 (extract_init): Remove prototype.
4233 (build_forced_zero_init): Rename to ...
4234 (build_zero_init): ... this.
4235 (force_store_init_value): Remove.
4236 * decl.c (obscure_complex_init): Remove.
4237 (duplicate_decls): Copy DECL_INITIALIZED_P.
4238 (check_initializer): Do not leave junk in DECL_INITIAL.
4239 (cp_finish_decl): Handle zero-initialization of entities with
4240 static storage duration.
4241 * expr.c (extract_init): Remove.
4242 * init.c (build_forced_zero_init): Remove.
4243 (build_zero_init): New function.
4244 (build_default_init): Use it.
4245 (build_field_list): Skip FIELD_DECLs for base subobjects.
4246 (push_base_cleanups): Likewise.
4247 * method.c (do_build_assign_ref): Likewise.
4248 (synthesize_exception_spec): Likewise.
4249 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
4250 (regenerate_decl_from_template): To not set DECL_INITIAL for a
4251 static data member whose initialization took place in its class.
4252 (instantiate_decl): Do not pass an initializer to cp_finish_decl
4254 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
4255 (dfs_unuse_fields): Likewise.
4256 * tree.c (pod_type_p): Handle error_mark_node.
4257 (zero_init_p): Likewise.
4258 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
4260 * typeck2.c (store_init_value): Remove #if 0'd code.
4261 (force_store_init_value): Remove.
4262 (process_init_constructor): Use build_zero_init.
4264 2002-09-29 Nathan Sidwell <nathan@codesourcery.com>
4267 * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
4269 2002-09-29 Kazu Hirata <kazu@cs.umass.edu>
4271 * cp-tree.h: Fix comment typos.
4275 2002-09-25 Mark Mitchell <mark@codesourcery.com>
4277 * cp/class.c (contains_empty_class_p): New method.
4278 (walk_subobject_offsets): Correct computation of field offset.
4279 (layout_empty_base): Correct placement of emtpy base classes.
4280 (layout_class_type): Warn about ABI changes.
4282 2002-09-23 Mark Mitchell <mark@codesourcery.com>
4284 * cp/class.c (layout_virtual_bases): Do not round the size of the
4285 type to a multiple of the alignment before laying out virtual bases.
4286 (layout_class_type): Correct handling of bit-fields that are wider
4287 than their type inside unions. Round the size of the type to a
4288 even number of bytes when computing the size without virtual
4290 * cp/cp-tree.h (abi_version_at_least): New macro.
4292 2002-09-21 Kazu Hirata <kazu@cs.umass.edu>
4294 * ChangeLog: Follow spelling conventions.
4295 * ChangeLog.2: Likewise.
4297 * class.c: Likewise.
4298 * cp-tree.h: Likewise.
4301 * decl2.c: Likewise.
4302 * except.c: Likewise.
4303 * friend.c: Likewise.
4304 * g++spec.c: Likewise.
4307 * mangle.c: Likewise.
4308 * method.c: Likewise.
4309 * operators.def: Likewise.
4310 * optimize.c: Likewise.
4313 * search.c: Likewise.
4314 * semantics.c: Likewise.
4317 * typeck.c: Likewise.
4319 2002-09-18 Devang Patel <dpatel@apple.com>
4321 * cp/cp-tree.h: New prototype for walk_vtabls().
4322 * cp/decl.c (walk_vtables_r): New function.
4323 (struct cp_binding_level): Add new members, namespaces,
4324 names_size and vtables.
4325 (add_decl_to_level): Add decl in namespaces or vtables
4326 chain, if conditions match.
4327 (walk_vtables): New function.
4328 (walk_namespaces_r): Travers separate namespace chain
4329 for namespace decls.
4330 (wrapup_globals_for_namespace): Use names_size instead
4332 * cp/decl2.c (finish_file): Use walk_vtables() instead of
4333 walk_globals() to walk vtable decls.
4335 2002-09-18 Nathan Sidwell <nathan@codesourcery.com>
4337 * decl.c (grokdeclarator): Use assert, not internal_error. Don't
4338 ICE with invalid pointers & references.
4340 2002-09-17 Zack Weinberg <zack@codesourcery.com>
4342 * Make-lang.in: Remove all references to the demangler.
4343 * cxxfilt.c: Moved to binutils.
4345 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
4348 * pt.c (tsubst_decl): Remove assert.
4350 Remove DR 295 implementation.
4351 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
4352 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
4353 about ignoring volatile qualifiers.
4355 * search.c (lookup_member): Correct documentation.
4357 2002-09-16 Geoffrey Keating <geoffk@apple.com>
4359 * cp-tree.h (union lang_tree_node): Add chain_next option.
4361 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
4363 * parse.y (parse_finish_call_expr): Check lookup_member result.
4366 * semantic.c (finish_asm_stmt): Fix operand/output_operands
4368 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
4370 2002-09-15 Nathan Sidwell <nathan@codesourcery.com>
4373 * call.c (build_over_call): Convert this pointer for fns found by
4376 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
4378 * ChangeLog: Follow spelling conventions.
4379 * ChangeLog.1: Likewise.
4381 2002-09-14 Nathan Sidwell <nathan@codesourcery.com>
4384 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
4386 2002-09-14 Kazu Hirata <kazu@cs.umass.edu>
4388 * error.c: Fix comment formatting.
4389 * except.c: Likewise.
4391 * friend.c: Likewise.
4392 * g++spec.c: Likewise.
4395 * mangle.c: Likewise.
4396 * method.c: Likewise.
4397 * optimize.c: Likewise.
4400 * search.c: Likewise.
4401 * semantics.c: Likewise.
4404 * typeck.c: Likewise.
4405 * typeck2.c: Likewise.
4407 2002-09-13 Matt Austern <austern@apple.com>
4410 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
4411 * cp/call.c: Change call-by-const-reference mechanism to use
4412 non_cast_lvalue_p when deciding whether the create a temporary.
4413 We need a temporary when passing, e.g. (long) x by const ref.
4415 2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
4417 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
4419 2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
4421 * decl.c: Fix comment formatting.
4422 * decl2.c: Likewise.
4424 2002-09-12 Kazu Hirata <kazu@cs.umass.edu>
4426 * call.c: Fix comment formatting.
4427 * class.c: Likewise.
4428 * cp-lang.c: Likewise.
4429 * cp-tree.h: Likewise.
4432 2002-09-11 Zack Weinberg <zack@codesourcery.com>
4434 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
4435 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
4436 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
4437 minor adjustments (use version_string, eliminate yet another
4438 duplicate of xmalloc)
4440 2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4442 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
4444 2002-09-05 Jason Merrill <jason@redhat.com>
4446 * typeck2.c (add_exception_specifier): Only pedwarn for an
4448 (require_complete_eh_spec_types): New fn.
4449 (cxx_incomplete_type_diagnostic): Also support pedwarning.
4450 * typeck.c (complete_type_or_diagnostic): Likewise.
4451 * call.c (build_call): Call require_complete_eh_spec_types.
4452 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
4453 on an incomplete type.
4455 2002-09-04 Jakub Jelinek <jakub@redhat.com>
4457 * decl.c (start_cleanup_fn): Clear interface_only before
4458 start_function, restore it afterwards.
4460 2002-09-02 Nathan Sidwell <nathan@codesourcery.com>
4462 * cp-tree.h (finish_builtin_type): Remove.
4463 * decl2.c (finish_builtin_type): Move to common code.
4464 * decl.c (build_ptrmemfunc_type): Adjust.
4465 * rtti.c (create_pseudo_type_info): Adjust.
4466 (create_tinfo_types): Adjust.
4468 2002-08-31 Jason Merrill <jason@redhat.com>
4470 * cp-lang.c (cp_expr_size): Allow initialization from a
4473 2002-08-30 Richard Henderson <rth@redhat.com>
4476 * tree.c: Include target.h.
4477 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
4479 * Makefile.in (tree.o): Update.
4481 2002-08-27 Mark Mitchell <mark@codesourcery.com>
4483 * class.c (layout_virtual_bases): Warn about bugs in G++ that
4484 result in incorrect object layouts.
4485 (layout_class_type): Likewise.
4487 2002-08-24 Matt Austern <austern@apple.com>
4489 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
4491 (real_lvalue_p): Update caller.
4493 (non_cast_lvalue_or_else): New.
4494 * tree.h: Declare it.
4495 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
4497 2002-08-22 Mark Mitchell <mark@codesourcery.com>
4499 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
4500 and COND_EXPR specially; fix error message output.
4502 2002-08-22 Jason Merrill <jason@redhat.com>
4504 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
4505 * semantics.c (nullify_returns_r): Likewise.
4507 2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
4510 * typeck.c (finish_class_member_access_expr): Diagnose cases where
4511 name lookup finds nothing.
4513 2002-08-15 Jason Merrill <jason@redhat.com>
4515 * semantics.c (finish_then_clause): Remove redundant assignment.
4516 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
4517 extra binding level outside the if/switch statement.
4518 (finish_while_cond, finish_for_cond): Rewrite complex condition
4521 2002-08-15 Alexandre Oliva <aoliva@redhat.com>
4523 * parse.y (sizeof, alignof, typeof): New non-terminals to
4524 increment skip_evaluation. Replace terminals with them and
4525 decrement skip_evaluation at the end of rules using them.
4526 * decl2.c (mark_used): Don't assemble_external if
4527 skipping evaluation.
4529 2002-08-15 Gabriel Dos Reis <gdr@nerim.net>
4532 * parse.y (parse_finish_call_expr): Handle incomplete
4533 type used to name a scope.
4535 2002-08-15 Nathan Sidwell <nathan@codesourcery.com>
4538 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
4539 regression caused by my 2002-08-08 patch.
4541 2002-08-13 Mark Mitchell <mark@codesourcery.com>
4543 * decl.c (pushdecl_class_level): Honor requests to bind names to
4546 2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4548 * decl2.c (build_call_from_tree): Fix uninitialized variable.
4549 * parse.y (parse_finish_call_expr): Likewise.
4550 * repo.c (old_args, old_dir, old_main): Const-ify.
4552 2002-08-11 Gabriel Dos Reis <gdr@nerim.net>
4554 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
4555 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
4556 * optimize.c (maybe_clone_body): Likewise.
4557 * pt.c (tsubst_enum): Likewise.
4558 (lookup_template_class): Likewise.
4559 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
4561 2002-08-10 Neil Booth <neil@daikokuya.co.uk>
4563 * lang-specs.h: Remove -ansi.
4565 2002-08-10 Nathan Sidwell <nathan@codesourcery.com>
4567 * tree.c (maybe_dummy_object): Replace // with /* */
4569 2002-08-09 Mark Mitchell <mark@codesourcery.com>
4571 * call.c (standard_conversion): Use build_ptrmem_type.
4572 * cp-tree.h (build_ptrmem_type): New function.
4573 (adjust_result_of_qualified_name_lookup): Likewise.
4574 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
4575 static data members.
4576 (build_ptrmem_type): New function.
4577 (grokdeclarator): Do not use build_offset_type when encountering a
4579 * parse.y (parse_finish_call_expr): Use
4580 adjust_result_of_qualified_name_lookup.
4581 * search.c (adjust_result_of_qualified_name_lookup): New function.
4582 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
4583 accessing OFFSET_TYPEs directly.
4585 2002-08-08 Mike Stump <mrs@apple.com>
4587 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
4588 (type_decays_to): Likewise.
4589 * class.c (find_final_overrider): Likewise.
4590 (maybe_note_name_used_in_class): Likewise.
4591 * decl.c (current_tmpl_spec_kind): Likewise.
4592 (add_binding): Likewise.
4593 (push_class_binding): Likewise.
4594 (duplicate_decls): Likewise.
4595 (layout_var_decl): Likewise.
4596 (grokfndecl): Likewise.
4597 (grokdeclarator): Likewise.
4598 (check_default_argument): Likewise.
4599 * decl2.c (handle_class_head): Likewise.
4600 * error.c (dump_template_decl): Likewise.
4601 * init.c (build_offset_ref): Likewise.
4602 * pt.c (check_specialization_scope): Likewise.
4603 (determine_specialization): Likewise.
4604 (check_explicit_specialization): Likewise.
4605 (maybe_check_template_type): Likewise.
4606 (process_partial_specialization): Likewise.
4607 (check_default_tmpl_args): Likewise.
4608 (push_template_decl_real): Likewise.
4609 (convert_template_argument): Likewise.
4610 (try_class_unification): Likewise.
4611 (get_bindings_real): Likewise.
4612 (do_decl_instantiation): Likewise.
4613 * semantics.c (begin_function_definition): Likewise.
4614 (finish_member_declaration): Likewise.
4615 (check_multiple_declarators): Likewise.
4616 * typeck.c (comp_array_types): Likewise.
4617 (comptypes): Likewise.
4618 (expr_sizeof): Likewise.
4619 (build_binary_op): Likewise.
4620 (dubious_conversion_warnings): Likewise.
4621 (check_return_expr): Likewise.
4623 2002-08-08 Mark Mitchell <mark@codesourcery.com>
4625 * typeck.c (build_class_member_access_expr): Do not return
4626 error_mark_node when no error has occurred.
4628 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
4630 * typeck.c (build_component_addr): Remove.
4631 (build_unary_op): Just check it's not a bitfield, and then build
4634 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
4636 * class.c (convert_to_base): Correct check for error_mark_node.
4637 (create_vtable_ptr): Remove unused VFUNS_P parm.
4639 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
4641 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
4643 2002-08-07 Mark Mitchell <mark@codesourcery.com>
4645 Rework build_component_ref.
4646 * call.c (build_vfield_ref): Do not go through build_component_ref.
4647 (build_field_call): Use build_class_member_access_expr.
4648 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
4649 (build_object_call): Likewise.
4650 * class.c (convert_to_base): New function.
4651 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
4652 (instantiate_type): Handle BASELINKs.
4653 * cp-tree.def (BASELINK): New tree code.
4654 * cp-tree.h (BASELINK_P): Reimplement.
4655 (SET_BASELINK_P): Remove.
4656 (BASELINK_BINFO): Reimplement.
4657 (BASELINK_FUNCTIONS): Likewise.
4658 (BASELINK_ACCESS_BINFO): Likewise.
4659 (BASELINK_OPTYPE): Likewise.
4660 (convert_to_base): New function.
4662 (build_object_ref): Remove.
4663 (build_component_ref_1): Likewise.
4664 (build_component_ref): Likewise.
4665 (build_x_component_ref): Likewise.
4666 (build_class_member_access_expr): New function.
4667 (finish_class_member_access_expr): Likewise.
4668 (build_ptrmemfunc_access_expr): Likewise.
4669 * decl.c (grokdeclarator): Handle BASELINKs.
4670 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
4671 finish_class_member_access_expr.
4672 (arg_assoc): Handle BASELINKs.
4673 (do_class_using_decl): Likewise.
4674 * error.c (dump_decl): Likewise.
4675 (dump_expr): Use build_ptrmemfunc_access_expr.
4676 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
4678 (build_throw): Use BASELINK_FUNCTIONS.
4679 * init.c (perform_member_init): Use
4680 build_class_member_access_expr.
4681 (build_offset_ref): Handle BASELINKs. Use
4682 build_class_member_access_expr.
4683 * method.c (hack_identifier): Likewise.
4684 * parse.y (do_id): Use BASELINK, not TREE_LIST.
4685 (primary): Remove uses of build_object_ref.
4686 * pt.c (lookup_template_function): Handle BASELINKs.
4687 (resolve_overloaded_unification): Likewise.
4688 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
4689 (lookup_field): Use BASELINK, not TREE_LIST.
4690 (lookup_fnfiels): Likewise.
4691 (setup_class_bindings): Likewise.
4692 * semantics.c (finish_object_call_expr): Do not use
4693 build_method_call when we already know what function is being
4695 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
4696 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
4698 (name_p): New function.
4699 * typeck.c (build_object_ref): Remove.
4700 (build_component_ref_1): Likewise.
4701 (build_x_component_ref): Likewise.
4702 (build_class_member_access_expr): New function.
4703 (finish_class_member_access_expr): Likewise.
4704 (build_ptrmemfunc_access_expr): Likewise.
4705 (get_member_function_from_ptrfunc): Use
4706 build_ptrmemfunc_access_expr.
4707 (build_binary_op): Likewise.
4708 (build_unary_op): Likewise.
4709 (build_ptrmemfunc): Likewise.
4710 (pfn_from_ptrmemfunc): Likewise.
4711 * typeck2.c (build_m_component_ref): Adjust comment.
4713 2002-08-07 Neil Booth <neil@daikokuya.co.uk>
4715 * Make-lang.in (CXX_C_OBJS): Update.
4716 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
4717 * cp-tree.h (cxx_decode_option): Remove.
4718 * decl2.c (compare_options, lang_f_options, unsupported_options,
4719 cxx_decode_option): Remove.
4721 2002-08-06 Gabriel Dos Reis <gdr@nerim.net>
4723 * typeck.c (build_x_unary_op): Handle pointer-to-member.
4725 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
4727 * class.c: Don't include obstack.h.
4729 * decl2.c: Delete bogus comment.
4730 * error.c: Don't include obstack.h.
4731 * except.c: Likewise.
4732 (dump_type): Correct comment.
4733 * method.c: Don't include obstack.h.
4736 2002-08-04 Gabriel Dos Reis <gdr@nerim.net>
4739 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
4740 expressions to pointer-to-data-member of pointer-to-member-functions.
4742 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
4744 * cvt.c (ocp_convert): Delete obsolete code.
4745 * parse.y (permanent_obstack): Delete declaration.
4746 * pt.c (permanent_obstack): Delete declaration.
4747 * repo.c (permanent_obstack): Delete declaration.
4748 (open_repo_file): Use xmalloc instead of permanent_obstack.
4749 (init_repo): Use xstrdup instead of permanent_obstack.
4751 2002-08-04 Nathan Sidwell <nathan@codesourcery.com>
4753 * cp-tree.h (VF_DERIVED_VALUE): Remove.
4754 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
4756 2002-08-03 Nathan Sidwell <nathan@codesourcery.com>
4759 C++ ABI change - vfunc ordering.
4760 * class.c (add_virtual_function): Remove.
4761 (dfs_modify_all_vtables): Take list of all declared
4762 virtuals. Assign all that are not in primary base.
4763 (check_for_override): Adjust comments.
4764 (create_vtable_ptr): Take single list of virtuals. Build chain
4765 of declared virtuals here.
4766 (layout_class_type): Take single list of virtuals. Adjust.
4767 (finish_struct_1): Keep virtuals on single list. Adjust.
4769 2002-08-02 Mark Mitchell <mark@codesourcery.com>
4771 * init.c (build_member_call): Use build_new_method_call, not
4774 2002-08-02 Krister Walfridsson <cato@df.lth.se>
4776 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
4778 2002-08-02 Mark Mitchell <mark@codesourcery.com>
4780 * call.c (build_method_call): Issue a more helpful error message
4781 about ambiguous method names.
4783 2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
4785 * tree.c (build_shared_int_cst): Make cache file scope, and
4788 2002-08-02 Jason Merrill <jason@redhat.com>
4790 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
4791 (cp_expr_size): New fn.
4792 * call.c (build_over_call): Lose empty class hackery.
4793 (convert_arg_to_ellipsis): Promote non-POD warning to error.
4794 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
4796 * semantics.c (expand_body): Do tree optimization in the function
4799 2002-08-01 Neil Booth <neil@daikokuya.co.uk>
4801 * cp-tree.h: Move all warning and flag declarations to c-common.h.
4802 * decl.c: Move all warning and flag variables to c-common.c.
4803 * decl2.c: Move all warning and flag variables to c-common.c.
4804 * lex.c (flag_digraphs): Remove.
4805 (warn_traditional): Now in c-common.c.
4807 2002-07-31 Mark Mitchell <mark@codesourcery.com>
4809 * call.c (build_field_call): Do not look up the field by name.
4810 (build_method_call): Simplify.
4811 (struct z_candidate): Add access_path and conversion_path. Remove
4813 (convert_class_to_reference): Adjust use of
4814 add_function_candidate.
4815 (add_candidate): Add conversion_path argument.
4816 (add_function_candidate): Use it.
4817 (add_conv_dndidate): Likewise.
4818 (build_builtin_candidate): Likewise.
4819 (add_template_candidate_real): Add conversion_path argument.
4820 (add_template_conv_candidate): Likewise.
4821 (add_template_candidate): Likewise.
4822 (build_user_type_conversion_1): Use it.
4823 (build_new_function_call): Remove name lookup code. Adjust use of
4824 add_template_candidate and add_function_candidate.
4825 (build_new_op): Likewise.
4826 (convert_like_real): Use build_special_member_call.
4827 (build_over_call): Use cand->conversion_path.
4828 (build_special_member_call): New method.
4829 (build_new_method_call): Remove name lookup code.
4830 * cp-tree.def (OFFSET_REF): Update documentation.
4831 (TEMPLATE_ID_EXPR): Likewise.
4832 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
4833 (BASELINK_OPTYPE): Likewise.
4834 (build_new_method_call): Adjust prototype.
4835 (build_special_member_call): New method.
4836 (build_baselink): New method.
4837 (build_offset_ref_call_from_tree): Likewise.
4838 (build_call_from_tree): Likewise.
4839 (finish_qualified_call_expr): Remove.
4840 (finish_call_expr): Adjust prototype.
4841 (build_x_function_call): Remove.
4842 * cvt.c (ocp_convert): Use build_special_member_call.
4843 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
4844 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
4846 (build_offset_ref_call_from_tree): New function.
4847 (build_call_from_tree): Likewise.
4848 * init.c (expand_cleanup): Use build_special_member_call.
4849 (expand_default_init): Likewise.
4850 (build_member_call): Use finish_call_expr.
4851 (build_new_1): Use build_special_member_call.
4852 (push_base_cleanups): Likewise.
4853 * method.c (do_build_assign_ref): Likewise.
4854 * parse.y (template_id): Do not pass a COMPONENT_REF to
4855 lookup_template_function.
4856 (primary): Use parse_finish_call_epxr, not finish_call_expr.
4857 (parse_finish_call_expr): New function.
4858 * pt.c (lookup_template_function): Add assertions.
4859 * search.c (lookup_base): Allow T to be a binfo.
4860 (build_baselink): New function.
4861 (lookup_member): Use it.
4862 * semantics.c (finish_call_expr): Do not do name lookup.
4863 (finish_object_call_expr): Remove #if 0'd code.
4864 (finish_qualified_call_expr): Remove.
4865 * typeck.c (build_x_function_call): Remove.
4866 (build_static_case): Use build_special_member_call.
4867 * typeck2.c (build_functional_cast): Likewise.
4869 2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
4871 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
4873 2002-07-30 Gabriel Dos Reis <gdr@nerim.net>
4875 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
4877 2002-07-30 Nathan Sidwell <nathan@codesourcery.com>
4879 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
4882 2002-07-29 Alan Modra <amodra@bigpond.net.au>
4884 * cp-tree.h: Comment typo fix.
4886 2002-07-29 Richard Earnshaw <rearnsha@arm.com>
4888 * spew.c (space_for_token): Allocate zeroed memory for a new token
4891 2002-07-27 Roger Sayle <roger@eyesopen.com>
4893 * decl.c (builtin_function_1): No need to explicitly mark
4894 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
4896 2002-07-27 Roger Sayle <roger@eyesopen.com>
4898 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
4900 2002-07-26 Jason Merrill <jason@redhat.com>
4902 * call.c (build_over_call): Likewise.
4903 (cp_convert_parm_for_inlining): New fn.
4904 (convert_for_arg_passing): New fn.
4905 (convert_default_arg, build_over_call): Use it.
4906 (type_passed_as): New fn.
4907 * pt.c (tsubst_decl): Use it.
4908 * decl2.c (cp_build_parm_decl): New fn.
4909 (build_artificial_parm): Use it.
4910 (start_static_storage_duration_function): Likewise.
4911 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
4912 (grokparms): Don't mess with DECL_ARG_TYPE.
4913 * typeck.c (convert_arguments): Use convert_for_arg_passing.
4914 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
4916 * cp-tree.h: Declare new fns.
4918 2002-07-26 Neil Booth <neil@daikokuya.co.uk>
4920 * cp-tree.h (flag_operator_names): Remove.
4921 * decl2.c (flag_operator_names): Remove.
4922 (lang_f_options): Remove operator-names.
4923 * lex.c (D_OPNAME): Remove.
4924 (reswords): Remove operator names.
4925 (rid_to_yy): Remove operator names.
4926 (init_reswords): No need to handle D_OPNAME.
4927 * spew.c (read_process_identifier): There are no operator
4930 2002-07-26 Jason Merrill <jason@redhat.com>
4932 * dump.c (cp_dump_tree): Call c_dump_tree.
4933 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
4935 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
4937 * error.c (print_whitespace): Remove.
4938 * g++spec.c (LIBUNWIND): Move.
4939 * mangle.c (mangled_position, write_signed_number): Remove.
4941 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
4943 * decl2.c (cxx_decode_option): Similarly.
4945 2002-07-25 Gabriel Dos Reis <gdr@nerim.net>
4947 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
4948 (cxx_sizeof_or_alignof_type): Take a third argument.
4949 (cxx_sizeof): Adjust definition.
4950 (cxx_alignof): Likewise.
4951 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
4952 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
4954 (c_sizeof_nowarn): Remove definition.
4955 (build_unary_op): Use cxx_sizeof_nowarn.
4957 2002-07-24 Geoffrey Keating <geoffk@redhat.com>
4959 * tree.c (cp_build_qualified_type_real): When copying
4960 pointer-to-method types, unshare the record that holds
4961 the cached pointer-to-member-function type.
4963 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
4965 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
4967 2002-07-23 Gabriel Dos Reis <gdr@nerim.net>
4970 * typeck.c (cxx_sizeof_or_alignof_type): New function.
4971 (c_sizeof): Remove definition.
4972 (expr_sizeof): Use cxx_sizeof.
4973 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
4974 * decl.c (finish_destructor_body): Use cxx_sizeof.
4975 * semantics.c (finish_alignof): Likewise.
4976 (finish_alignof): Use cxx_alignof.
4977 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
4978 (cxx_sizeof_or_alignof_type): Declare.
4979 (my_friendly_assert): Move to ../c-common.h.
4981 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
4983 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
4985 2002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4987 PR c++/7347, c++/7348
4988 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
4989 * decl.c (make_typename_type): Use it.
4990 (make_unbound_class_template): Likewise.
4991 (lookup_name_real): Don't call type_access_control if scope is
4992 template parameter dependent.
4993 * parse.y (template_arg): Call make_unbound_class_template with
4995 (nest_name_specifier): Call make_typename_type with tf_parsing set.
4996 (typename_sub0): Likewise.
4997 (typename_sub1): Likewise.
4998 (instantiate_decl): Push class scope.
4999 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
5000 for both static variable and member function template.
5001 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
5003 * search.c (type_access_control): Do type access for TEMPLATE_DECL
5006 2002-07-20 Roger Sayle <roger@eyesopen.com>
5008 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
5009 test by using positive_option. Make whitespace consistent.
5011 2002-07-20 Gabriel Dos Reis <gdr@nerim.net>
5013 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
5014 members with 'locus'. Adjust use throughout.
5015 (struct feed): Likewise.
5016 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
5018 (snarf_defarg): Use error(), not error_with_file_and_line().
5020 2002-07-19 Chris Demetriou <cgd@broadcom.com>
5022 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
5023 cpp_options is included.
5025 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5027 PR c++/2862, c++/2863
5028 * pt.c (determine_specialization): Compare the length of
5029 TYPE_ARG_TYPES. Tidy.
5031 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5034 * decl.c (duplicate_decls): Don't propagate inlining parameters from
5035 olddecl to newdecl when newdecl is a specialization of the
5036 instantiation olddecl.
5038 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5040 PR c++/4802, c++/5387
5041 * decl.c (make_typename_type): Use enforce_access.
5043 2002-07-17 Scott Snyder <snyder@fnal.gov>
5046 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
5048 2002-07-12 Mark Mitchell <mark@codesourcery.com>
5050 * class.c (add_method): Correct handling of conversion operators.
5052 2002-07-11 Mark Mitchell <mark@codesourcery.com>
5055 * class.c (add_method): Simplify.
5057 2002-07-11 Jason Merrill <jason@redhat.com>
5060 * tree.c (cp_copy_res_decl_for_inlining): Also copy
5063 2002-07-10 Graham Stott <graham.stott@btinternet.com>
5065 * pt.c (template_parm_this_level_p, push_template_decl_real):
5066 Pass depth as int pointer.
5068 2002-07-11 Tim Josling <tej@melbpc.org.au>
5070 Remove front end hard coding from gengtype.c.
5072 * config-lang.in (gtfiles): Add files needed for this front end.
5074 2002-07-10 Mark Mitchell <mark@codesourcery.com>
5076 * cp-tree.h (unqualified_name_lookup_error): Declare it.
5077 (begin_function_definition): Adjust prototype.
5078 * lex.c (unqualified_name_lookup_error): New function, split out
5080 (do_identifier): ... here.
5081 * parse.y (parse_begin_function_definition): New function.
5083 * semantics.c (begin_function_definition): Accept decl-specifiers
5084 and attributes as separate parameters.
5086 2002-07-10 Jason Merrill <jason@redhat.com>
5089 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
5090 modifying the old one.
5092 2002-07-09 Mark Mitchell <mark@codesourcery.com>
5094 * cp-tree.h (constructor_name_p): Declare it.
5095 (check_template_template_default_arg): Likewise.
5096 * class.c (handle_using_decl): Use constructor_name_p.
5097 * decl.c (grokdeclarator): Likewise.
5098 * decl2.c (constructor_name_p): Define it.
5099 * init.c (build_member_call): Use constructor_name_p.
5100 * parse.y (template_parm): Use check_template_template_default_arg.
5101 * pt.c (check_explicit_specialization): Use constructor_name_p.
5102 * semantics.c (check_template_template_default_arg): New function.
5104 2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5106 * pt.c (can_complete_type_without_circularity): Add static to
5107 function definition.
5109 2002-07-08 Mark Mitchell <mark@codesourcery.com>
5111 * cp-tree.h (have_extern_spec): Declare it
5112 * decl.c (have_extern_spec): Define it.
5113 (start_decl): Eliminate use of used_extern_spec.
5114 (start_function): Likewise.
5115 * parse.y (have_extern_spec): Remove declaration.
5116 (used_extern_spec): Likewise.
5117 (frob_specs): Eliminate use of used_extern_spec.
5118 (.hush_warning): Likewise.
5120 2002-07-07 Mark Mitchell <mark@codesourcery.com>
5122 * Make-lang.in (cp/parse.o): Depend on decl.h.
5123 * cp-tree.h (do_decl_instantiation): Change prototype.
5124 * parse.y: Include decl.h.
5125 (parse_decl_instantiation): New function.
5126 (explicit_instantiation): Use it.
5127 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
5130 2002-07-07 Roger Sayle <roger@eyesopen.com>
5132 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
5133 constructor and destructor tests when passed a TEMPLATE_DECL.
5135 2002-07-05 Jason Merrill <jason@redhat.com>
5137 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
5140 PR optimization/7145
5141 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
5143 2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
5145 Repair damage on weak-impared targets caused by my previous patch.
5146 * cp-tree.h (import_export_tinfo): Add parameter.
5147 * decl2.c (import_export_tinfo): Add parameter, post adjust
5149 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
5150 import_export_tinfo.
5152 2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5155 * init.c (build_aggr_init): Remove qualifiers of init before calling
5157 (build_vec_init): Flatten multi-dimensional array during cleanup.
5158 (build_vec_delete_1): Abort if the type of each element is array.
5160 2002-07-03 Graham Stott <graham.stott@btinternet.com>
5162 * pt.c (instantiate_class_template): Fix typo.
5164 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5166 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
5167 by CVS conflict in my last patch.
5169 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5172 * pt.c (can_complete_type_without_circularity): New function.
5173 (instantiate_class_template): Use it.
5174 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
5175 message due to incomplete fields.
5177 2002-07-01 Mark Mitchell <mark@codesourcery.com>
5180 * mangle.c (write_expression): Add mangling for sizeof when
5182 * operators.def: Remove stale comment.
5184 2002-06-30 Nathan Sidwell <nathan@codesourcery.com>
5186 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
5187 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
5188 (tinfo_decl_type): Replace with ...
5189 (type_info_ptr_type): ... this.
5190 (import_export_tinfo): Declare.
5191 (tinfo_decl_p): Rename to ...
5192 (unemitted_tinfo_decl_p): ... this.
5193 * decl2.c (import_export_decl): Break out tinfo handling into ...
5194 (import_export_tinfo): ... here. New function.
5195 (finish_file): Adjust.
5196 * rtti.c (TINFO_REAL_NAME): New macro.
5197 (init_rtti_processing): Create the tinfo types.
5198 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
5199 (get_tinfo_decl): Adjust.
5200 (get_tinfo_ptr): New function.
5201 (get_type_id): Use it.
5202 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
5203 (ptr_initializer): Use get_tinfo_ptr.
5204 (ptm_initializer): Likewise.
5205 (synthesize_tinfo_var): Break into ...
5206 (get_pseudo_ti_init): ... this. Just create the initializer.
5207 (get_pseudo_ti_desc): .. and this.
5208 (create_real_tinfo_var): Remove.
5209 (create_pseudo_type_info): Don't create the vtable decl here.
5210 (get_vmi_pseudo_type_info): Remove.
5211 (create_tinfo_types): Adjust.
5212 (tinfo_decl_p): Rename to ...
5213 (unemitted_tinfo_decl_p): ... here. Adjust.
5214 (emit_tinfo_decl): Adjust. Create the initializer.
5216 2002-06-27 Mark Mitchell <mark@codesourcery.com>
5219 * pt.c (tsubst_friend_class): Substitute into the context of the
5220 friend before using it.
5222 2002-06-26 Mark Mitchell <mark@codesourcery.com>
5224 * cp-tree.h (xref_tag): Change prototype.
5225 (handle_class_head): Likewise.
5226 (build_x_component_ref): Likewise.
5227 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
5228 (xref_tag): Take attributes as a separate parameter.
5229 (xref_tag_from_type): Adjust call to xref_tag.
5230 * decl2.c (build_expr_from_tree): Adjust call to
5231 build_x_component_ref.
5232 (handle_class_head): Take attributes as a separate parameter.
5233 * parse.y (parse_xref_tag): New function.
5234 (parse_handle_class_head): Likewise.
5235 (primary): Use parse_xref_tag.
5236 (class_head_decl): Use parse_handle_class_head.
5237 (class_head_defn): Likewise.
5238 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
5239 (build_dynamic_cast_1): Likewise.
5240 (create_pseudo_type_info): Likewise.
5241 (emit_support_tinfos): Likewise.
5242 * typeck.c (build_object_ref): Adjust call to
5243 build_x_component_ref.
5244 (build_x_component_ref): Remove protect parameter.
5246 2002-06-25 Mark Mitchell <mark@codesourcery.com>
5248 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
5249 * class.c (handle_using_decl): Likewise.
5250 (instantiate_type): Likewise.
5251 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
5252 (xref_basetypes): Change prototype.
5253 (begin_mem_initializers): New function.
5254 (get_overloaded_fn): Likewise.
5255 * decl.c (xref_basetypes): Simplify.
5256 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
5257 * init.c (build_offset_ref): Likewise.
5258 * parse.y (base_init): Use begin_mem_initializers().
5259 (structsp): Adjust call to xref_basetypes.
5260 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
5261 (instantiate_class_template): Adjust call to xref_basetypes.
5262 * semantics.c (begin_mem_initializers): New function.
5263 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
5264 (really_overlaoded_fn): Likewise.
5265 (get_overloaded_fn): New function.'
5266 (get_first_fn): USe BASELINK_FUNCTIONS.
5268 2002-06-24 Mark Mitchell <mark@codesourcery.com>
5270 * cp-tree.h (SCALAR_TYPE_P): New macro.
5271 (check_for_out_of_scope_variable): New function.
5272 (at_class_scope_p): Likewise.
5273 (finish_fname): Likewise.
5274 * class.c (finish_struct): Use at_function_scope_p.
5275 * decl.c (check_for_out_of_scope_variable): New function, split
5276 out from do_identifier.
5277 (finish_enum): Use at_function_scope_p.
5278 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
5279 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
5280 (primary): Use at_function_scope_p.
5281 * search.c (at_class_scope_p): New function.
5282 * semantics.c (finish_fname): Likewise.
5283 (check_multiple_declarators): Use at_function_scope_p.
5285 2002-06-23 Mark Mitchell <mark@codesourcery.com>
5287 * parse.y (parse_scoped_id): New function.
5289 * cp-tree.h (do_scoped_id): Adjust declaration.
5290 * lex.c (do_scoped_id): Remove call to yylex.
5291 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
5292 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
5293 expanding it inline.
5295 2002-06-23 Matt Thomas <matt@3am-software.com>
5297 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
5300 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5302 * mangle.c (integer_type_codes): Const-ify.
5304 2002-06-20 Richard Henderson <rth@redhat.com>
5307 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
5308 Call put_var_into_stack.
5310 2002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5312 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
5313 array size calculation.
5315 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5318 * pt.c (tsubst_expr): Handle FILE_STMT.
5320 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5323 * pt.c (lookup_template_class): Don't build complete argument of
5324 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
5327 2002-06-19 Akim Demaille <akim@epita.fr>
5329 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
5331 * spew.c, lex.c: Adjust.
5332 * parse.y (explicit_instantiation): Add empty action to override
5333 the default $$ = $1 where it introduces a type clash.
5335 2002-06-14 Jason Merrill <jason@redhat.com>
5337 * semantics.c (begin_for_stmt): Push the 'for' scope before
5338 adding the FOR_STMT.
5341 * class.c (build_base_field): Set DECL_PACKED.
5342 (layout_class_type): Don't use tail padding of PODs.
5343 * mangle.c (write_unqualified_name): Fix template conversion op
5346 2002-06-16 Richard Henderson <rth@redhat.com>
5349 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
5350 after template instantiation.
5352 2002-06-16 Richard Henderson <rth@redhat.com>
5354 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
5356 2002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
5358 * cp-tree.h (compiler_error): Remove declaration.
5359 * lex.c (compiler_error): Remove definition.
5361 2002-06-14 Steve Ellcey <sje@cup.hp.com>
5363 * g++spec.c (LIBUNWIND): New.
5364 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
5366 2002-06-13 Jessica Han <jessica@cup.hp.com>
5368 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
5369 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
5370 (build_vbase_offset_vtbl_entries): Likewise.
5371 * rtti.c (build_headof): Likewise.
5372 (get_tinfo_decl_dynamic): Likewise.
5373 (create_pseudo_type_info): Likewise.
5375 2002-06-12 Stan Shebs <shebs@apple.com>
5377 * mpw-config.in: Remove file, no longer used.
5378 * mpw-make.sed: Ditto.
5380 2002-06-07 Zack Weinberg <zack@codesourcery.com>
5382 * decl2.c: Update call to cpp_handle_option.
5384 2002-06-07 H.J. Lu (hjl@gnu.org)
5386 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
5388 2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
5390 * error.c (cp_error_at): Fix typo.
5392 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
5394 * error.c (cp_diagnostic_starter): Adjust call.
5395 (maybe_print_instantiation_context): Change prototype to take a
5396 'diagnostic_info *'.
5397 (print_instantiation_full_context): Likewise.
5398 (print_instantiation_partial_context): Likewise.
5399 (cp_diagnostic_starter): Likewise.
5400 (cp_diagnostic_finalizer): Likewise.
5401 (cp_print_error_function): Likewise.
5402 (cp_printer): Take a secondary parameter as a 'text_info *'.
5403 Remove output_state savings. Adjust calls.
5405 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
5407 * pt.c (inline_parm_levels): Mark for GC.
5409 * mangle.c (start_mangling): Allocate G.substitutions here...
5410 (init_mangle): ... rather than here.
5411 (finish_mangling): Clear the varray pointer when done with it.
5412 * spew.c (yylexstring): Don't use VARRAY_FREE.
5413 * search.c (bfs_walk): Don't use VARRAY_FREE.
5414 * decl2.c (pending_statics): Use gengtype to mark.
5415 (deferred_fns): Likewise.
5416 (ssdf_decls): Likewise.
5417 (init_decl2): Delete.
5418 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
5419 (cxx_init_decl_processing): Don't call init_decl2.
5420 (cxx_pop_function_context): Don't use VARRAY_FREE.
5421 * cp-tree.h (struct saved_scope): No need for special marking
5423 (struct language_function): Likewise.
5424 (local_classes): Use gengtype to mark.
5425 (init_decl2): Delete prototype.
5426 * class.c (init_class_processing): Don't use
5427 ggc_add_tree_varray_root.
5428 (build_vtbl_initializer): Don't use VARRAY_FREE.
5430 * decl.c (typename_compare): Don't use same_type_p.
5432 * decl.c: Include hashtab.h instead of hash.h.
5433 (typename_hash): Update to use htab_h.
5434 (typename_compare): Likewise.
5435 (typename_htab): Use gengtype to mark.
5436 (build_typename_type): Update to use htab_h.
5437 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
5439 * Make-lang.in (gt-cp-tree.h): New rule.
5440 (cp/tree.o): Depend on gt-cp-tree.h.
5441 * config-lang.in (gtfiles): Add cp/tree.c.
5442 * tree.c: Include gt-cp-tree.h.
5443 (list_hash_table): Use gengtype to mark.
5444 (init_tree): Use gengtype to mark trees.
5446 * Make-lang.in (cp/decl.o): Add debug.h dependency.
5447 * call.c (struct z_candidate): Use gengtype.
5448 (USER_CONV_CAND): Use WRAPPER_ZC.
5449 (convert_class_to_reference): Use build_zc_wrapper.
5450 (build_type_conversion_1): Likewise.
5451 (build_over_call): Use WRAPPER_ZC.
5452 (add_warning): Use build_zc_wrapper.
5453 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
5454 * cp-tree.h (struct lang_identifier): Use gengtype.
5455 (struct template_parm_index_s): Likewise.
5456 (struct ptrmem_cst): Likewise.
5457 (struct tree_binding): Likewise.
5458 (struct tree_overload): Likewise.
5459 (struct tree_srcloc): Likewise.
5460 (struct tree_wrapper): Likewise. Also modify to have a pointer
5461 to struct z_candidate rather than void.
5462 (enum cp_tree_node_structure_enum): New.
5463 (union lang_tree_node): New.
5464 (cxx_mark_tree): Delete prototype.
5465 (cp_tree_node_structure): New prototype.
5466 (build_ptr_wrapper): Delete prototype.
5467 (build_int_wrapper): Delete prototype.
5468 (build_zc_wrapper): New prototype.
5469 * decl.c: Include debug.h
5470 (cxx_mark_tree): Delete.
5471 (cp_tree_node_structure): New.
5472 * tree.c (build_ptr_wrapper): Delete.
5473 (build_int_wrapper): Delete.
5474 (build_zc_wrapper): New.
5476 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
5477 Correct typo. Patch from k_fukui@highway.ne.jp.
5479 * semantics.c (current_stmt_tree): Update for change to
5480 struct language_function.
5481 (finish_mem_initializers): Likewise.
5482 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
5483 * cp-tree.h (struct language_function): Rename from
5484 cp_language_function. Change all uses.
5485 (cp_function_chain): Don't need to cast.
5487 * class.c (duplicate_tag_error): Reset discriminator.
5488 (check_bases_and_members): Update for data structure changes.
5489 * cp-tree.h (struct lang_id2): Use gengtype.
5490 (flagged_type_tree): Likewise.
5491 (SET_LANG_ID): Use GGC on struct lang_id2.
5492 (struct cp_language_function): Use gengtype. Remove field
5493 'x_vcalls_possible_p'.
5494 (current_vcalls_possible_p): Delete.
5495 (struct lang_type_header): New.
5496 (struct lang_type_class): Rename from struct lang_type. Include
5497 struct lang_type_header.
5498 (struct lang_type_ptrmem): New.
5499 (struct lang_type): New.
5500 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
5501 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
5502 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
5503 (struct lang_decl_flags): Use gengtype. Add discriminators.
5504 (struct lang_decl): Use gengtype. Add and use discriminators.
5505 Update the macros that reference moved fields.
5506 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
5507 (SET_DECL_THUNK_P): Set discriminator too.
5508 (clear_inline_text_obstack): Delete prototype.
5509 (finish_inline_definitions): Delete prototype.
5510 (mark_pending_inlines): Delete prototype.
5511 (lang_check_failed): New prototype.
5512 * decl.c (struct named_label_use_list): Use gengtype.
5513 (struct named_label_list): Likewise.
5514 (mark_binding_level): Delete.
5515 (mark_named_label_lists): Delete.
5516 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
5517 (cxx_init_decl_processing): Use generated marker routine.
5518 (begin_destructor_body): Delete dead set to
5519 current_vcalls_possible_p.
5520 (mark_lang_function): Delete.
5521 (mark_cp_function_context): Delete.
5522 (lang_mark_tree): Use generated marker routines.
5523 * decl2.c (start_objects): Set discriminator when setting
5524 GLOBAL_INIT_PRIORITY.
5525 * lex.c (retrofit_lang_decl): Set discriminators.
5526 (copy_lang_type): Update for changes to lang_type structure.
5527 (cp_make_lang_type): Set discriminator.
5528 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
5529 * search.c: Include ggc.h.
5530 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
5531 (finish_inline_definitions): Delete.
5532 * spew.c (struct token): Use gengtype.
5533 (struct token_chunk): New.
5534 (struct unparsed_text): Use gengtype. Store tokens in chunks.
5535 (struct feed): Use gengtype.
5536 (feed_obstack): Delete.
5537 (feed): Mark as GC root.
5538 (pending_inlines): Mark as GC root.
5539 (pending_inlines_tail): Likewise.
5540 (processing_these_inlines): Likewise.
5541 (token_obstack): Make static.
5542 (first_token): Likewise.
5543 (init_spew): Don't initialize deleted things; use gengtype for roots.
5544 (clear_inline_text_obstack): Delete.
5545 (feed_input): Use GC for struct feed. Update for changes to
5546 struct unparsed_text.
5547 (mark_pending_inlines): Delete.
5548 (next_token): Rename from add_token. Change all callers. Update
5549 for changes to struct unparsed_text.
5550 (space_for_token): New.
5551 (remove_last_token): New.
5552 (alloc_unparsed_text): New.
5553 (snarf_block): Take an unparsed_text. Update for changes to struct
5555 (snarf_method): Update for changes to struct unparsed_text.
5556 (snarf_defarg): Update for changes to struct unparsed_text.
5557 * tree.c (lang_check_failed): New.
5559 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
5560 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
5561 (cp/spew.o): Add dependency on gt-<filename>.h.
5562 (cp/decl2.o): Add dependency on gt-<filename>.h.
5563 (cp/call.o): Add dependency on gt-<filename>.h.
5564 (cp/pt.o): Add dependency on gt-<filename>.h.
5565 (cp/repo.o): Add dependency on gt-<filename>.h.
5566 (cp/parse.o): Add dependency on gt-<filename>.h.
5567 * call.c: Use gengtype for roots.
5568 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
5569 decl2.c parse.y pt.c repo.c spew.c.
5570 * cp-tree.h: Use gengtype for roots.
5571 (struct saved_scope): Use GGC, gengtype.
5572 (cp_parse_init): Delete prototype.
5573 (init_pt): Delete prototype.
5574 * decl.c: Use gengtype for roots.
5575 (mark_saved_scope): Delete.
5576 (cxx_init_decl_processing): Don't call deleted initilisation
5578 (signed_size_zero_node): Delete, unused.
5579 * decl.h: Use gengtype for roots.
5580 * decl2.c: Use gengtype for roots.
5581 * lex.h: Use gengtype for roots.
5582 * parse.y: Use gengtype for roots.
5583 (cp_parse_init): Delete.
5584 * pt.c: Use gengtype for roots.
5586 * repo.c: Use gengtype for roots.
5587 * spew.c: Use gengtype for roots.
5589 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
5590 (cp/decl.o): Add dependency on gtype-cp.h.
5591 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
5592 Include gtype-cp.h. Allow for filename changes.
5594 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
5595 (cp/decl.o): Add cp/gt-decl.h dependency.
5596 * config-lang.in (gtfiles): New.
5597 * tree.h: Rename struct binding_level to struct cp_binding_level.
5598 * decl.c: Rename struct binding_level to struct cp_binding_level.
5599 Include cp/gt-decl.h.
5600 (struct cp_binding_level): Use gengtype.
5601 (make_binding_level): Use GGC on struct cp_binding_level.
5602 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
5603 (cxx_init_decl_processing): Mark free_binding_level as
5606 * decl.c (mark_cp_function_context): Update calling sequence.
5608 * decl.c (start_function): Don't free 'struct
5609 cp_language_function'.
5610 (pop_cp_function_context): Likewise.
5611 (save_function_data): Allocate it using GC.
5612 * semantics.c (genrtl_start_function): Don't free 'struct
5613 cp_language_function'.
5615 2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
5617 * lang-specs.h: Use cpp_debug_options.
5619 2002-05-28 Zack Weinberg <zack@codesourcery.com>
5621 * mangle.c, tree.c: Include real.h.
5622 * Make-lang.in: Update dependency lists.
5624 2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
5626 * lex.c: Don't include c-lex.h.
5627 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
5629 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
5631 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
5633 2002-05-22 Richard Henderson <rth@redhat.com>
5635 * decl.c (obscure_complex_init): Check for VAR_DECL
5636 before using DECL_THREAD_LOCAL.
5638 2002-05-22 Richard Henderson <rth@redhat.com>
5640 * decl.c (check_tag_decl): Handle RID_THREAD.
5641 (obscure_complex_init): Reject run-time init of tls.
5642 (grokvardecl, grokdeclarator): Handle RID_THREAD.
5643 * lex.c (reswords): Add __thread.
5644 (rid_to_yy): Map RID_THREAD to SCSPEC.
5646 2002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
5648 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
5649 * cp-tree.h (cxx_post_options): Kill.
5650 * cp-lex.c (cxx_post_options): Kill.
5652 2002-05-21 Richard Henderson <rth@redhat.com>
5654 * lex.c (rid_to_yy): Add RID_THREAD.
5656 2002-05-21 Alexandre Oliva <aoliva@redhat.com>
5658 * init.c (build_vec_init): Test for trivial copy-assignment when
5659 copy-assigning arrays.
5661 2002-05-20 Andreas Jaeger <aj@suse.de>
5663 * init.c (build_default_init): Remove unused variable.
5665 2002-05-20 Alexandre Oliva <aoliva@redhat.com>
5667 * call.c (any_strictly_viable): New.
5668 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
5670 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5672 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
5674 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5677 * pt.c (do_decl_instantiation): Don't complain explicit
5678 instantiation after explicit specialization.
5679 (do_type_instantiation): Likewise.
5681 2002-05-19 Alexandre Oliva <aoliva@redhat.com>
5683 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
5685 (complete_type_or_else): ... this. Redefined as macro.
5686 (cxx_incomplete_type_diagnostic): Declare.
5687 (cxx_incomplete_type_error): Define as macro.
5688 * init.c (build_delete): Warn about incomplete types other than
5689 void, and use the built-in operator delete for them.
5690 * typeck.c (complete_type_or_diagnostic): Renamed from
5691 complete_type_or_else. Added warn_only argument, passed to...
5692 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
5693 warnings or errors depending on new warn_only argument. Renamed
5695 (cxx_incomplete_type_error): ... this. New implementation in
5696 terms of cxx_incomplete_type_diagnostic.
5698 2002-05-18 Jason Merrill <jason@redhat.com>
5701 * decl2.c (import_export_decl): If we clear
5702 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
5704 2002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5707 * pt.c (verify_class_unification): Don't check if PARM is template
5708 parameter dependent. Simplify.
5709 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
5710 parameter dependent expression.
5712 2002-05-14 Jason Merrill <jason@redhat.com>
5714 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
5716 (synthesize_tinfo_var): Take the public decl.
5717 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
5718 (emit_tinfo_decl): Adjust. Call import_export_decl.
5719 * decl2.c (import_export_decl): Simplify tinfo decl handling.
5721 2002-05-14 Alexandre Oliva <aoliva@redhat.com>
5723 * cp-tree.h (struct lang_type): Added non_zero_init.
5724 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
5725 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
5726 * class.c (check_field_decls): Test non_zero_init.
5727 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
5728 zero-to-NULL conversions.
5729 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
5730 type that needs zero-initialization without zeros.
5731 (check_initializer_decl): Compute zero-initializer for types
5732 that require a non-trivial one.
5733 * init.c (build_forced_zero_init): New function.
5734 (build_default_init): Use it.
5735 * tree.c (zero_init_p): New function.
5736 * typeck2.c (force_store_init_value): New function.
5737 (process_init_constructor): Create non-trivial zero-initializers
5738 for array members and class fields.
5740 2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
5742 * lang-specs.h: Remove redundant -lang-c++.
5744 2002-05-13 Jason Merrill <jason@redhat.com>
5746 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
5747 (fixed_type_or_null): See through reference vars.
5748 (build_base_path): Vtable contents are constant.
5749 * typeck.c (get_member_function_from_ptrfunc): Likewise.
5751 2002-05-12 Jason Merrill <jason@redhat.com>
5753 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
5756 2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
5758 * cp-tree.h (flag_ansi): Remove.
5759 * decl2.c (flag_ansi): Remove.
5760 (cxx_decode_option): Set flag_iso and flag_undef.
5762 2002-05-09 Jason Merrill <jason@redhat.com>
5764 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
5765 Use subtraction rather than a bitmask to get the index.
5766 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
5768 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
5770 2002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
5772 * Make-lang.in (decl2.o): Update.
5773 * cp-tree.h (warn_multichar): Remove.
5774 * decl2.c: Include c-common.h.
5775 (warn_multichar): Remove.
5777 2002-05-03 Jason Merrill <jason@redhat.com>
5779 * tree.c (build_cplus_array_type): Only const and volatile get
5782 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
5784 2002-04-30 Mark Mitchell <mark@codesourcery.com>
5786 ABI change, returning simple classes from functions.
5787 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
5788 TYPE_HAS_TRIVIAL_INIT_REF is false or
5789 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
5791 2002-04-30 Jason Merrill <jason@redhat.com>
5794 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
5795 anonymous class with a typedef if there are attributes.
5797 2002-04-29 Paul Eggert <eggert@twinsun.com>
5799 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
5801 2002-04-29 Jakub Jelinek <jakub@redhat.com>
5804 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
5807 2002-04-29 Mark Mitchell <mark@codesourcery.com>
5810 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
5811 enter that scope before name lookup.
5814 * method.c (do_build_copy_constructor): Avoid building
5815 cv-qualified reference types.
5817 2002-04-29 Nathan Sidwell <nathan@codesourcery.com>
5820 * decl.c (grok_op_properties): Assignment ops don't have to return
5821 by value. operator% should.
5823 2002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
5826 * decl.c (duplicate_decls): Call merge_weak.
5828 2002-04-26 Richard Henderson <rth@redhat.com>
5830 * parse.y (malloced_yyss, malloced_yyvs): New.
5831 (yyoverflow): Re-add. Set them.
5832 (free_parser_stacks): New.
5834 2002-04-26 Mark Mitchell <mark@codesourcery.com>
5837 * method.c (do_build_assign_ref): Pass a derivation to
5838 build_method_call when calling base class assignment operators.
5840 2002-04-26 Richard Henderson <rth@redhat.com>
5842 * parse.y (yyoverflow): Revert.
5844 2002-04-26 Richard Henderson <rth@redhat.com>
5847 * parse.y (string): Remove. Update all uses to use STRING
5848 instead, and not call combine_strings.
5849 * rtti.c (tinfo_name): Use fix_string_type.
5850 * semantics.c (finish_asm_stmt): Don't call combine_strings.
5851 * spew.c (yylexstring): New.
5852 (read_token): Use it.
5854 2002-04-25 Richard Henderson <rth@redhat.com>
5857 * parse.y (yyoverflow): New.
5859 2002-04-25 Jason Merrill <jason@redhat.com>
5862 * search.c (check_final_overrider): No longer static.
5863 * class.c (update_vtable_entry_for_fn): Call it.
5864 * cp-tree.h: Adjust.
5866 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
5868 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
5869 * cp-tree.h (cxx_set_yydebug): Die.
5870 * lex.c (YYDEBUG): Get from c-lex.h.
5871 (cxx_set_yydebug): Remove.
5872 * parse.y: Include c-lex.h.
5873 (YYDEBUG): Get from c-lex.h.
5875 2002-04-24 Mark Mitchell <mark@codesourcery.com>
5878 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
5881 2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
5883 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
5884 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
5886 * cp-tree.h (cp_attribute_table): Rename.
5887 * decl.c (lang_attribute_table): Remove declaration.
5888 (cxx_init_decl_processing): Don't set it.
5889 * tree.c (cp_attribute_table): Rename.
5891 2002-04-24 Jason Merrill <jason@redhat.com>
5894 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
5895 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
5896 The pedwarn for array assignment is now unconditional.
5897 * tree.c (build_cplus_array_type_1): Still process simple array types
5898 normally in templates.
5901 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
5904 2002-04-23 Jakub Jelinek <jakub@redhat.com>
5906 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
5907 node with attributes.
5909 2002-2-23 David O'Brien <obrien@FreeBSD.org>
5911 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
5912 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
5914 2002-04-23 Mark Mitchell <mark@codesourcery.com>
5917 * pt.c (tsubst_friend_class): Handle templates with explicit
5921 * typeck.c (merge_types): Remember the cv-qualification of pointer
5922 types when merging them.
5924 2002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
5926 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
5927 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
5928 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
5929 cxx_mark_function_context): New.
5930 * decl.c (push_cp_function_context, pop_cp_function_context,
5931 mark_cp_function_context): Rename for consistency.
5932 (cxx_init_decl_processing): Don't set old hooks.
5934 2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
5936 * call.c (convert_type_from_ellipsis): Rename, update.
5937 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
5938 * cp-tree.h (convert_type_from_ellipsis): Rename.
5939 * decl.c (cxx_init_decl_processing): Don't set hook.
5941 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
5943 * call.c (build_new_method_call): Update.
5944 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
5945 * cp-tree.h (cxx_incomplete_type_error): New.
5946 * decl.c (grokdeclarator, grokparms): Update.
5947 * decl2.c (check_classfn): Update.
5948 * pt.c (tsubst): Update.
5949 * typeck.c (complete_type_or_else, expr_sizeof,
5950 decay_conversion): Update.
5951 * typeck2.c (incomplete_type_error): Rename.
5952 (add_exception_specifier): Update.
5954 2002-04-18 Jason Merrill <jason@redhat.com>
5957 * search.c (setup_class_bindings): A class template qualifies as a
5960 2002-04-17 Jakub Jelinek <jakub@redhat.com>
5963 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
5966 2002-04-16 Mark Mitchell <mark@codesourcery.com>
5968 * init.c (begin_init_stmts): Remove commented out code.
5969 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
5970 * semantics.c (begin_gobal_stmt_expr): Adjust call to
5971 expand_start_stmt_expr.
5973 2002-04-15 Mark Mitchell <mark@codesourcery.com>
5975 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
5976 dso_handle itself, to __cxa_atexit.
5978 2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
5980 * error.c (cxx_print_error_function): Adjust call to macros.
5982 2002-04-14 Jakub Jelinek <jakub@redhat.com>
5984 * class.c (layout_virtual_bases): Do all dsize computation on trees.
5986 2002-04-14 Jason Merrill <jason@redhat.com>
5988 * typeck.c (get_member_function_from_ptrfunc): Don't do
5989 gratuitious division and multiplication on
5990 ptrmemfunc_vbit_in_delta targets.
5992 2002-04-12 Mark Mitchell <mark@codesourcery.com>
5995 * semantics.c (finish_expr_stmt): Remember the type of the
5996 expression before any conversions are performed.
5998 2002-04-12 Mark Mitchell <mark@codesourcery.com>
6001 * call.c (add_template_candidate_real): Do not treat member
6002 templates as copy constructors.
6004 2002-04-12 Mark Mitchell <mark@codesourcery.com>
6006 * decl.c (duplicate_decls): Do not copy the RTL for a variable
6007 declaration if the old variable had an incomplete type and the new
6009 (complete_vars): Do not call layout_decl for completed variables.
6011 2002-04-12 Richard Sandiford <rsandifo@redhat.com>
6013 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
6014 with an explicit one.
6015 (follow_tag_typedef): New.
6016 (lookup_tag): Use it to extract the tag of an explicit typedef.
6017 (xref_tag): Likewise.
6019 2002-04-11 Andrew Haley <aph@redhat.com>
6021 * typeck.c (type_after_usual_arithmetic_conversions):
6022 If two types have the same variant, return immediately.
6023 When two floating-point operands are the same precision:
6024 convert to float if one of the operands is float;
6025 if neither operand is one of the standard types, return the type
6026 of the first operand.
6028 2002-04-10 Nathan Sidwell <nathan@codesourcery.com>
6031 * decl.c (make_typename_type): Remove implicit typenameness.
6033 2002-04-09 Jason Merrill <jason@redhat.com>
6035 PR optimization/6189
6036 * semantics.c (genrtl_start_function): Don't free
6037 DECL_SAVED_FUNCTION_DATA for inline functions.
6039 * init.c (build_member_call): For now, don't convert to
6040 intermediate base if it would cause an error.
6042 2002-04-08 Paolo Carlini <pcarlini@unitus.it>
6044 * parse.y (namespace_qualifier, maybe_identifier,
6045 begin_explicit_instantiation, end_explicit_instantiation,
6046 apparent_template_type, .finish_template_type,
6047 do_id, maybe_init, defarg_again, component_decl_1):
6048 Add ending ';', in accordance with POSIX.
6050 2002-04-06 Mark Mitchell <mark@codesourcery.com>
6053 * class.c (layout_class_type): Remember incomplete static
6055 (finish_struct_1): Call complete_vars, not
6056 hack_incomplete_structures.
6057 * cp-tree.h (hack_incomplete_structures): Rename to ...
6058 (complete_vars): ... this.
6059 (struct saved_scope): Remove incomplete.
6060 (namespace_scope_incomplete): Remove.
6061 * decl.c (struct binding_level): Remove incomplete.
6062 (incomplete_vars): New variable.
6063 (mark_binding_level): Don't mark incomplete.
6064 (print_binding_level): Don't print it.
6065 (mark_saved_scope): Don't mark incomplete.
6066 (pushdecl): Use maybe_register_incopmlete_var.
6067 (cxx_init_decl_processing): Register incomplete_vars for GC.
6068 (start_decl_1): Clarify error message.
6069 (hack_incomplete_vars): Remove.
6070 (maybe_register_incomplete_var): New function.
6071 (complete_vars): Likewise.
6073 2002-04-06 Jason Merrill <jason@redhat.com>
6076 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
6077 set before checking it.
6080 * init.c (build_member_call): Use build_scoped_ref.
6081 (resolve_offset_ref): Likewise.
6082 * call.c (build_scoped_method_call): Likewise.
6083 * tree.c (maybe_dummy_object): Kludge around current_class_type being
6085 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
6086 * cp-tree.h: Adjust.
6088 * init.c (push_base_cleanups): Just use build_scoped_method_call.
6091 * method.c (implicitly_declare_fn): Pass unqualified type to
6092 synthesize_exception_spec.
6094 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
6096 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
6097 * cvt.c: Update comment.
6098 * init.c (expand_cleanup_for_base): Update.
6099 * semantics.c (finish_parenthesized_expr): Update.
6100 * typeck.c (cp_truthvalue_conversion): Update.
6102 2002-04-04 Jason Merrill <jason@redhat.com>
6104 * semantics.c (finish_eh_cleanup): New fn.
6105 * cp-tree.h: Add prototype.
6106 * init.c (perform_member_init, expand_cleanup_for_base): Use
6108 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
6109 * cp-tree.h: Remove references.
6110 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
6111 * dump.c (cp_dump_tree): Likewise.
6112 * pt.c (tsubst_expr): Likewise.
6113 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
6114 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
6115 * tree.c (cp_statement_code_p): Likewise.
6117 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
6120 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
6124 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
6126 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
6128 2002-04-03 Richard Henderson <rth@redhat.com>
6130 * cp-lang.c (cxx_warn_unused_global_decl): New.
6131 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
6133 2002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
6135 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
6136 * tree.c (init_tree): Don't set hook.
6138 2002-04-03 Roger Sayle <roger@eyesopen.com>
6141 * decl.c (duplicate_decls): Don't mess with assembler names when
6142 redeclaring builtin functions as static.
6144 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
6146 * call.c (build_addr_func): Update.
6147 * class.c (resolve_address_of_overloaded_function): Update.
6148 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
6149 * cp-tree.h (cxx_mark_addressable): New.
6150 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
6151 * decl2.c (build_cleanup): Update.
6152 * except.c (build_throw): Update.
6153 * init.c (resolve_offset_ref): Update.
6154 * pt.c (convert_nontype_argument): Update.
6155 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
6156 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
6157 unary_complex_lvalue): Update.
6158 (mark_addressable): Rename.
6160 2002-04-01 Roger Sayle <roger@eyesopen.com>
6163 * decl.c (duplicate_decls): Overwrite the RTL when (and only
6164 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
6165 but follow the SET_DECL_RTL idiom used elsewhere in the function.
6167 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
6169 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
6170 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
6171 * decl.c (grokdeclarator): Update.
6172 * mangle.c (write_integer_cst): Update.
6173 * typeck.c (build_binary_op): Update.
6175 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
6177 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
6178 * lex.c (cxx_init): Don't set hook.
6180 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
6182 * Make-lang.in (error.o): Update.
6183 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
6184 * cp-tree.h (struct diagnostic_context): Predeclare.
6185 (cxx_print_error_function): New.
6186 * error.c: Include langhooks-def.h.
6187 (lang_print_error_function): Rename. Update.
6188 (init_error): Don't set hook.
6190 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
6192 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
6194 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
6195 * decl.c (finish_enum): Similarly.
6196 * error.c (dump_type): Similarly.
6197 * lex.c (cxx_init): Similarly.
6198 * mangle.c (write_builtin_type): Similarly.
6199 * typeck.c (comptypes): Similarly.
6201 2002-03-28 Roger Sayle <roger@eyesopen.com>
6204 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
6205 in the g++ front-end.
6206 (duplicate_decl): Allow redefinition of anticipated built-ins.
6207 Fix inlining problem by over-writing the old DECL_RTL.
6208 (lookup_namespace_name): Fail to find an identifier in the
6209 specified namespace if its still anticipated.
6210 (builtin_function_1): New function split out from builtin_function
6211 to create a builtin in the current namespace with given context.
6212 (builtin_function): Call builtin_function_1 to define the
6213 appropriate builtins in both the std and global namespaces.
6214 (select_decl): Don't test for anticipated decls here.
6215 (unqualified_namespace_lookup): Instead ignore them whilst
6216 searching through scopes and namespaces.
6217 * decl2.c (do_nonmember_using_decl): If a using declaration
6218 specifies an anticipated built-in function, mark it as no longer
6219 anticipated in that scope.
6220 (ambiguous_decl): Avoid resolving to an anticipated decl.
6221 * lex.c (do_scoped_id): Fail to find an identifier in the global
6222 namespace if its still anticipated.
6224 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
6226 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
6227 * cp-tree.h (cp_make_lang_type): Rename.
6228 * lex.c (cp_make_lang_type): Rename.
6229 (make_aggr_type): Update.
6230 * tree.c (init_tree): Don't set make_lang_type_fn.
6232 2002-03-29 Jakub Jelinek <jakub@redhat.com>
6235 * class.c (finish_struct_1): Update static field's DECL_MODE even
6236 if its type is a variant of t.
6238 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
6240 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
6241 * cp-tree.h (cxx_insert_default_attributes): New.
6242 * decl.c (insert_default_attributes): Rename.
6244 2002-03-27 Mark Mitchell <mark@codesourcery.com>
6247 * call.c (build_op_delete_call): Allow for the fact the placement
6248 may be a COMPOUND_EXPR.
6250 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
6252 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
6253 * cp-tree.h (init_cplus_expand): Remove.
6254 (cxx_expand_expr): New.
6255 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
6257 (init_cplus_expand): Remove.
6258 * lex.c (cxx_init): Don't call init_cplus_expand.
6260 2002-03-26 Mark Mitchell <mark@codesourcery.com>
6263 * init.c (build_new_1): Allow for the fact the result of
6264 build_function_call may be a COMPOUND_EXPR.
6266 2002-03-26 Nathan Sidwell <nathan@codesourcery.com>
6269 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
6270 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
6271 (dfs_skip_nonprimary_vbases_markedp): Remove.
6272 * search.c (get_shared_vbase_if_not_primary): Remove.
6273 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
6274 (dfs_skip_nonprimary_vbases_markedp): Remove.
6275 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
6276 (dfs_marked_real_bases_queue_p): Likewise.
6278 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
6280 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
6281 * cp-tree.h (cxx_mark_tree): New.
6282 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
6284 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
6286 * cp-tree.h (cxx_maybe_build_cleanup): New.
6287 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
6288 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
6289 * tree.c (build_target_expr): Update.
6290 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
6292 2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
6294 * decl2.c (cxx_decode_option): Handle -E.
6295 * lang-specs.h (default_compilers): Preprocess with cc1plus.
6296 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
6298 2002-03-23 Jakub Jelinek <jakub@redhat.com>
6301 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
6303 2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
6305 * error.c (dump_type): Be careful about implicit typenames.
6307 2002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
6310 * semantics.c (finish_base_specifier): Handle erronous base
6313 2002-03-22 Zack Weinberg <zack@codesourcery.com>
6315 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
6318 2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
6320 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
6321 an index into the vtable_entry array regardless of
6322 TARGET_PTRMEMFUNC_VBIT_LOCATION.
6324 2002-03-21 Aldy Hernandez <aldyh@redhat.com>
6326 * tree.c (cp_cannot_inline_tree_fn): Same.
6328 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
6330 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
6331 insert_block, getdecls, global_bindings_p): New.
6333 2002-03-20 Nathan Sidwell <nathan@codesourcery.com>
6336 * mangle.c (struct globals) Add internal_mangling_p member.
6337 (write_template_param): Do internal mangling, if needed.
6338 (mangle_conv_op_name_for_type): Request internal mangling.
6340 2002-03-20 Jason Merrill <jason@redhat.com>
6343 * init.c (build_delete): Check access for a member op delete here.
6344 * decl2.c (delete_sanity): Not here.
6346 2002-03-19 Jason Merrill <jason@redhat.com>
6349 * class.c (get_vfield_name): Use the constructor_name.
6351 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
6353 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
6354 * cp-tree.h (lang_printable_name): Rename.
6355 * error.c (lang_decl_name): Use new hook.
6356 * lex.c (cxx_init): Remove old hook.
6357 * pt.c (tsubst_decl): Use new hook.
6358 * tree.c (lang_printable_name): Rename.
6360 2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
6363 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
6364 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
6365 only after recording the declaration.
6367 2002-03-18 Jason Merrill <jason@redhat.com>
6370 * init.c (resolve_offset_ref): Hand off to build_component_ref.
6372 PR c++/4222, c++/5995
6373 * call.c (build_over_call): Fix empty class logic.
6376 * cp-tree.h (struct saved_scope): Add last_parms field.
6377 * decl.c (maybe_push_to_top_level): Save last_function_parms.
6378 (pop_from_top_level): Restore it.
6381 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
6385 * pt.c (tsubst_friend_function): Use decl_namespace_context.
6387 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
6388 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
6389 type with a nontrivial destructor.
6391 2002-03-17 Jason Merrill <jason@redhat.com>
6394 * class.c (build_base_path): Virtual base layout is fixed in
6397 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
6399 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
6400 * parse.y (yyparse): Remove macro.
6402 2002-03-17 Jason Merrill <jason@redhat.com>
6405 * init.c (build_new_1): Pass the right pointer to op delete.
6407 2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
6410 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
6411 conversion operators go.
6412 (struct lang_decl_flags): Add template_conv_p and unused
6414 (DECL_TEMPLATE_CONV_FN_P): New macro.
6415 * call.c (build_user_type_conversion_1): Don't check second type
6416 conversion of overload set first.
6417 * class.c (add_method): Make sure templated conversion operators
6418 all end up on slot 2.
6419 * lex.c (do_identifier): A conversion operator token might be
6420 satisfied by a templated conversion operator.
6421 * pt.c (check_explicit_specialization): Use
6422 CLASSTYPE_FIRST_CONVERSION_SLOT.
6423 (template_parm_this_level_p): New function.
6424 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
6425 * search.c (lookup_fnfields_1): Template conversions will be on
6427 * typeck.c (build_component_ref): Preserve the type of an
6428 conversion operator name on the overload type.
6429 (build_x_function_call): Retrieve the conversion operator name.
6431 2002-03-15 Richard Henderson <rth@redhat.com>
6433 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
6435 2002-03-15 Mark Mitchell <mark@codesourcery.com>
6437 * cp-tree.h (CLEANUP_DECL): Remove.
6438 (CLEANUP_EXPR): Likewise.
6439 * decl.c (destroy_local_var): Simplify.
6440 (maybe_build_cleanup): Tidy.
6441 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
6442 * semantics.c (cp_expand_stmt): Likewise.
6443 * cp/tree.c (cp_statement_code_p): Likewise.
6445 2002-03-15 Jason Merrill <jason@redhat.com>
6448 * decl.c (duplicate_decls): Use merge_types instead of common_type.
6449 * typeck.c (common_type): Just hand off to
6450 type_after_usual_arithmetic_conversions and
6451 composite_pointer_type.
6452 (merge_types): New fn.
6453 (commonparms): Use it instead of common_type.
6454 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
6455 (composite_pointer_type): Also handle attributes.
6456 * cp-tree.h: Declare merge_types.
6458 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
6460 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
6462 2002-03-14 Richard Henderson <rth@redhat.com>
6464 * decl.c: Include c-pragma.h.
6465 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
6466 * Make-lang.in: Update dependencies.
6468 2002-03-14 Jakub Jelinek <jakub@redhat.com>
6471 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
6472 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
6474 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
6476 * mangle.c (write_builtin_type): Handle 128-bit integers even if
6477 they are not a standard integer type.
6479 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
6481 * cp-tree.h (init_init_processing): Remove declaration.
6482 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
6483 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
6485 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6487 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
6489 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
6491 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
6492 cplus_tree_code_name): Delete.
6493 (cxx_init): Don't call add_c_tree_codes, instead set
6494 lang_unsafe_for_reeval. Don't try to copy into the various
6497 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
6500 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
6501 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
6504 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
6506 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
6507 DR209 is now not a defect.
6508 * cp-tree.h (skip_type_access_control): Remove.
6509 * decl.c (grokdeclarator): Do type access control for friend
6511 * semantics.c (decl_type_access_control): Don't reset
6512 current_type_lookups.
6513 (save_type_access_control): Always save the lookups.
6514 (skip_type_access_control): Remove.
6515 (finish_class_definition): Don't change type_lookups.
6517 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
6519 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
6521 * typeck.c (build_static_cast): Compare non-qualified types
6522 with pointer to member conversions.
6524 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
6525 Daniel Berlin <dan@dberlin.org>
6527 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
6528 (cxx_get_alias_set): Use it.
6530 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6532 * cp-tree.h (stabilize_expr): Prototype.
6534 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
6536 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
6537 conditional return void.
6539 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
6541 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
6542 * cp-tree.h (cxx_unsave): New.
6543 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
6544 (init_tree): Update.
6546 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6548 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
6549 explicit sizeof/sizeof.
6550 * decl2.c (cxx_decode_option): Likewise.
6551 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
6553 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
6556 * decl.c (lookup_tag): Only reject enum/class mismatch, not
6557 class/union mismatch.
6558 * parse.y (check_class_key): New function.
6559 (structsp): Call it.
6561 2002-03-01 Michael Matz <matz@suse.de>
6563 * typeck.c (cp_pointer_int_sum): Complete inner type which is
6564 used later by size_in_bytes().
6566 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
6568 * cp-tree.h: Require __GNUC__ to be #defined.
6569 (build_init): Add missing prototype.
6571 2002-03-01 Jason Merrill <jason@redhat.com>
6573 * except.c: Don't include decl.h or obstack.h. Do include
6575 (build_throw): Destroy temporaries from the thrown
6576 expression before calling __cxa_throw. Construct a thrown
6577 temporary directly into the exception object.
6578 (stabilize_throw_expr): New function.
6579 (wrap_cleanups_r): New function.
6580 * tree.c (stabilize_expr): New function.
6581 * init.c (build_init): New function.
6582 * Make-lang.in (cp/except.o): Adjust .h deps.
6584 2002-02-28 Jason Merrill <jason@redhat.com>
6586 * search.c (lookup_base_r): Don't clear is_non_public just because
6587 we found a friendly scope.
6589 * decl.c (finish_function): Only warn about missing return
6590 statement with -Wreturn-type.
6592 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
6594 * class.c (build_clone): Update.
6595 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
6596 * cp-tree.h (cxx_dup_lang_specific_decl): New.
6597 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
6598 (copy_decl): Update.
6599 * method.c (make_thunk): Update.
6601 2002-02-27 Zack Weinberg <zack@codesourcery.com>
6603 * decl2.c: Delete traditional-mode-related code copied from
6604 the C front end but not used, or used only to permit the
6607 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
6610 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
6613 2002-02-22 Jakub Jelinek <jakub@redhat.com>
6616 * semantics.c (finish_switch_cond): Don't call get_unwidened
6619 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
6622 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
6624 (make_typename_type): Use tsubst_flags_t.
6625 * decl.c (make_typename_type): Adjust. Return non-artificial
6626 TYPE_DECLs, if required.
6627 (grokdeclarator): Simplify CVR qualification handling. Allow bad
6628 qualifiers on typedef types.
6629 * decl2.c (handle_class_head): Adjust make_typename_type call.
6630 * parse.y (nested_name_specifier): Likewise.
6631 (typename_sub0): Likewise.
6632 (typename_sub1): Likewise.
6633 * pt.c (convert_template_argument): Adjust make_typename_type
6635 (tsubst): Adjust cp_build_qualified_type_real calls.
6636 (check_cv_quals_for_unify): Cope with allowing bad qualifications
6637 on template type parms.
6638 (instantiate_decl): Recheck substitutions to give warnings on bad
6640 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
6642 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
6644 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
6646 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
6647 unless DECL_ALWAYS_INLINE.
6649 2002-02-20 Jakub Jelinek <jakub@redhat.com>
6651 * typeck.c (cp_pointer_int_sum): Renamed from
6652 pointer_int_sum, call pointer_int_sum.
6654 2002-02-20 Jakub Jelinek <jakub@redhat.com>
6656 * decl.c (duplicate_decls): Return 0 if issued error about
6659 2002-02-19 Jason Merrill <jason@redhat.com>
6661 ABI change: Mangle `void (A::*)() const' as
6662 M1AKFvvE, not MK1AFvvE.
6663 * mangle.c (write_function_type): Write cv-quals for member
6665 (write_pointer_to_member_type): Not here.
6667 2002-02-18 Jason Merrill <jason@redhat.com>
6669 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
6670 (do_decl_instantiation): Likewise.
6672 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
6675 * decl.c (duplicate_decls): Make warning unconditional
6676 if duplicate default argument declarations are present.
6678 2002-02-17 Jakub Jelinek <jakub@redhat.com>
6680 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
6683 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
6685 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
6686 remove incorrect comment. Move #if 0'd code to common path. Use
6687 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
6689 2002-02-13 Jason Merrill <jason@redhat.com>
6691 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
6692 (finish_function): Don't warn if current_function_returns_null.
6694 * typeck2.c (digest_init): Do handle values of vector type.
6696 * typeck2.c (digest_init, process_init_constructor): Treat vectors
6699 2002-02-11 Jason Merrill <jason@redhat.com>
6701 * parse.y (reserved_declspecs): Don't handle attributes.
6702 (reserved_typespecquals): Handle them here.
6703 * Make-lang.in (parse.c): Adjust expected conflicts.
6705 2002-02-08 Jakub Jelinek <jakub@redhat.com>
6707 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
6708 instead of compstmt.
6709 (compstmt_or_stmtexpr): Renamed from compstmt.
6710 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
6712 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
6714 Rename instantiate_type_flags to tsubst_flags_t & expand use.
6715 * cp-tree.h (instantiate_type_flags): Rename to ...
6716 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
6717 add tf_warning flag.
6718 (instantiate_type): Adjust prototype.
6719 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
6720 do_type_instantiation, cp_build_qualified_type_real): Likewise.
6721 cp_build_qualified_type: Adjust.
6722 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
6724 * call.c (standard_conversion): Rename itf_* to tf_*.
6725 (reference_binding): Likewise.
6726 (convert_like_real): Likewise.
6727 * cvt.c (cp_convert_to_pointer): Likewise.
6728 (convert_to_reference): Likewise.
6729 * decl.c (lookup_namespace_name): Use tf_* flags.
6730 (make_typename_type): Likewise.
6731 (grokdeclarator): Likewise.
6732 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
6733 (coerce_template_template_parms, convert_template_argument,
6734 coerce_template_parms, maybe_get_template_decl_from_type_decl,
6735 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
6736 instantiate_class_template, tsubst_template_arg_vector,
6737 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
6738 tsubst_decl, tsubst_arg_types, tsubst_function_type,
6739 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
6740 instantiate_template, fn_type_unification,
6741 resolve_overloaded_unification, verify_class_unification,
6742 unify, get_bindings_real, do_type_instantiation,
6743 regenerate_decl_from_template, instantiate_decl,
6744 tsubst_initializer_list, tsubst_enum,
6745 get_mostly_instantiated_function_type,
6746 invalid_nontype_parm_type_p): Likewise.
6747 * tree.c (cp_build_qualified_type_real): Likewise.
6748 * typeck.c (build_binary_op): Rename itf_* to tf_*.
6749 (build_ptrmemfunc): Likewise.
6750 (convert_for_assignment): Likewise.
6752 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
6755 * decl.c (grokdeclarator): Allow friend declarations from
6757 * decl2.c (handle_class_head): Don't push into template parm contexts.
6758 * pt.c (push_template_decl_real): Template parm contexts are never
6761 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
6763 * class.c: Include target.h.
6764 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
6765 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
6767 * Make-lang.in: Adjust deps.
6769 2002-02-05 Jason Merrill <jason@redhat.com>
6771 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
6773 2002-02-04 Jakub Jelinek <jakub@redhat.com>
6775 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
6776 (finish_switch_cond): Set SWITCH_TYPE.
6778 2002-02-04 Richard Henderson <rth@redhat.com>
6780 * method.c (use_thunk): Always initialize the block tree. Reindent.
6781 * semantics.c (expand_body): Emit thunks after function, not before.
6783 2002-02-04 Jason Merrill <jason@redhat.com>
6785 * decl.c (start_function): Call cplus_decl_attributes immediately
6786 after grokdeclarator.
6788 * decl.c (start_function): Combine DECL_RESULT handling code.
6790 2002-02-03 Jason Merrill <jason@redhat.com>
6793 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
6794 (cp/xref.o): Remove dependencies.
6795 * class.c (finish_struct_1, check_methods): Don't call xref fns.
6796 (finish_struct_1): Likewise.
6797 * friend.c (make_friend_class): Likewise.
6798 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
6799 * spew.c (read_process_identifier): Likewise.
6801 2002-02-01 Jason Merrill <jason@redhat.com>
6804 * decl.c (finish_function): Warn about a non-void function with
6805 no return statement and no abnormal exit.
6806 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
6807 (current_function_returns_abnormally): New macro.
6808 * call.c (build_call): Set it.
6810 * typeck.c (build_component_ref): Always complain about offsetof
6811 constructs on non-PODs. Only make it an error for members of
6814 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
6815 (dump_function_decl): Always dump parms.
6817 * decl2.c (finish_static_data_member_decl): Complain about a local
6818 class with a static data member.
6821 * search.c (lookup_field_1): Don't xref a static data member
6822 just because we looked it up.
6824 2002-01-31 Jason Merrill <jason@redhat.com>
6826 * Make-lang.in (parse.c): Handle .output file.
6829 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
6831 * semantics.c (finish_class_definition): Adjust.
6833 Allow attributes in parms and casts.
6834 * parse.y (named_parm): Don't strip attrs.
6835 (declmods): Remove 'attributes' production.
6836 (nonempty_cv_qualifiers): Accept attributes.
6837 (ATTRIBUTE): Give precedence.
6838 * decl.c (groktypename): Handle attributes.
6839 (grokparms): Likewise.
6841 2002-01-29 Jakub Jelinek <jakub@redhat.com>
6843 * decl2.c (cxx_decode_option): Pass 0 as last argument to
6845 * lang-specs.h: Use cpp_unique_options instead of cpp_options
6846 when used together with cc1_options.
6848 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
6851 * typeck2.c (digest_init): Make sure non-array core type is
6853 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
6854 constructor, rather than build a new one.
6855 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
6856 PURPOSE of constructor elts.
6858 2002-01-23 Zack Weinberg <zack@codesourcery.com>
6860 * Make-lang.in (parse.c): Adjust expected number of
6861 shift-reduce conflicts.
6862 (decl.o): Depend on diagnostic.h.
6863 * decl.c: Include diagnostic.h.
6864 (grokdeclarator): Check for null pointer.
6865 (finish_function): Don't abort when
6866 current_binding_level->parm_flag != 1, if errors have
6867 occurred; throw away the statement tree and extra binding
6868 levels, and continue.
6869 * lex.c (note_list_got_semicolon): Check for null pointer.
6870 * method.c (hack_identifier): Just return error_mark_node if
6871 value is error_mark_node.
6872 * parse.y (primary: TYPEID(type_id)): No need to use
6873 TYPE_MAIN_VARIANT here.
6874 (handler_seq): Accept an empty list of catch clauses and
6875 generate a fake handler block to avoid later crashes.
6876 (ansi_raise_identifier): Accept the error token too.
6877 * semantics.c (begin_class_definition,
6878 finish_class_definition): Check for error_mark_node.
6880 2002-01-23 Zack Weinberg <zack@codesourcery.com>
6882 * typeck2.c (friendly_abort): Delete definition.
6883 * cp-tree.h (friendly_abort): Don't prototype.
6884 (my_friendly_assert): Use fancy_abort.
6886 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
6888 * cp-tree.h (my_friendly_abort): Remove.
6890 2002-01-23 Jakub Jelinek <jakub@redhat.com>
6892 * spew.c (pending_inlines, pending_inlines_tail,
6893 processing_these_inlines): Make static.
6894 (mark_pending_inlines): Remove static.
6895 (begin_parsing_inclass_inline): If in function, save pi
6896 for GC to cp_function_chain->unparsed_inlines instead.
6897 (process_next_inline): Likewise.
6898 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
6899 (mark_pending_inlines): Add prototype.
6900 * decl.c (spew_debug): Remove unused extern.
6901 (mark_lang_function): Call mark_pending_inlines.
6903 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
6905 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
6906 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
6907 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
6908 Change my_fancy_abort() to abort().
6910 2002-01-23 Jason Merrill <jason@redhat.com>
6913 * class.c (fixed_type_or_null): Fix thinko.
6916 * init.c (resolve_offset_ref): Use build_indirect_ref.
6918 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
6920 2002-01-22 Jason Merrill <jason@redhat.com>
6922 * parse.y (function_body): Suppress the block for the outermost
6924 * decl.c (pushdecl): Don't try to skip it.
6925 (begin_function_body): Keep the block we create, not the next one.
6926 * init.c (emit_base_init): Don't mess with keep_next_level.
6928 * class.c (build_base_path): Tweak formatting.
6930 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
6932 Fix regression introduced with patch for c++/775
6933 * parse.y (class_head_defn): Check for template specializations
6934 with a different class-key.
6936 2002-01-17 Jason Merrill <jason@redhat.com>
6938 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
6939 (begin_function_body): Call them and keep_next_level.
6940 * init.c (emit_base_init): Call keep_next_level.
6941 * semantics.c (setup_vtbl_ptr): Lose.
6942 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
6943 (vtbls_set_up_p): Lose.
6944 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
6945 * method.c (do_build_copy_constructor): Likewise.
6946 (synthesize_method): Call finish_mem_initializers.
6947 * parse.y (nodecls): Likewise.
6949 * error.c (dump_type_suffix): Print the exception specs before
6951 (dump_function_decl): Here, too.
6953 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
6955 2002-01-10 Ira Ruben <ira@apple.com>
6958 * decl.c (start_method): Handle attrlist.
6960 2002-01-10 Jakub Jelinek <jakub@redhat.com>
6962 * decl2.c (max_tinst_depth): Increase default limit to 500.
6964 2002-01-10 Graham Stott <grahams@redhat.com>
6966 * spew.c (YYCHAR): Uppercase macro parameter and add
6969 (NAME): Uppercase macro parameter.
6971 2002-01-09 Graham Stott <grahams@redhat.com>
6973 * decl.h (grokdeclarator): Wrap long line.
6975 * semantics.c (FINISH_COND): Uppercase macro paramaters and
6978 2002-01-08 Graham Stott <grahams@redhat.com>
6980 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
6981 (PALLOC): Uppercase macro parameter and whitespace.
6982 (SALLOC): Uppercase macro parameter.
6983 (SFREE): Uppercase macros parameter, add parenthese and
6985 (STREQL): Uppercase macro parameter and whitespace.
6992 * call.c (convert_like): Add parenthesis and wrap.
6993 (convert_like_with_context): Likewise.
6994 (ICS_RANK): Whitespace.
6995 (NEED_TEMPORARY_P): Remove parenthesis.
6997 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
6999 (VTT_MARKED_BINFO_P): Likewise.
7001 * decl.c (BINDING_LEVEL): Add parenthesis.
7002 (DEF_OPERATOR): Likewise.
7004 * mangle.c (MANGLE_TRACE): Add parenthesis.
7005 (MANGLE_TRACE_TREE): Likewise.
7006 (write_signed_number): Likewise.
7007 (write_unsigned_number): Likewise.
7009 * pt.c (ccat): Uppercase macro parameter.
7012 * search.c (SET_BINFO_ACCESS): Add parenthesis.
7014 2002-01-07 Jason Merrill <jason@redhat.com>
7016 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
7020 * method.c (make_thunk): If !flag_weak, give the thunk the
7022 (use_thunk): Here, too.
7024 2002-01-07 Graham Stott <grahams@redhat.com>
7026 * error.c: Update copyright date.
7027 (print_scope_operator): Add parenthesis.
7028 (print_left_paren): Likewise.
7029 (print_right_paren): Likewise.
7030 (print_left_bracket): Likewise.
7031 (print_right_bracket): Likewise.
7032 (print_template_argument_list_start): Likewise.
7033 (print_template_argument_list_end): Likewise.
7034 (print_non_consecutive_character): Likewise.
7035 (print_tree_identifier): Likewise.
7036 (print_identifier): Likewise.
7037 (NEXT_CODE): Uppercase macro parameter.
7038 (ident_fndecl): Delete unused.
7039 (GLOBAL_THING): Likewise.
7041 2002-01-06 Graham Stott <grahams@redhat.com>
7043 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
7044 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
7045 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
7046 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
7047 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
7048 (C_IS_RESERVED_WORD): Uppercase macro parameter.
7049 (C_RID_YYCODE) Likewise.
7050 (ptrmem_cst): Use rtx.
7051 (LOCAL_BINDING_P): Add whitespace.
7052 (INHERITED_VALUE_BINDING_P): Likewise.
7053 (BINDING_SCOPE): Wrap long line.
7054 (BINDING_HAS_LEVEL_P): Remove parenthesis.
7055 (BINDING_VALUE): Wrap long line.
7056 (BINDING_TYPE): Whitespace.
7057 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
7058 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
7059 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
7060 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
7061 (same_type_p): Uppercase macro parameters.
7062 (same_type_ignoring_top_level_qualifiers_p): Likewise.
7063 (OVL_FUNCTION): Wrap long line.
7064 (OVL_CHAIN): Whitespace.
7065 (OVL_CURRENT): Add parenthesis and whitespace.
7066 (OVL_NEXT): Whitespace.
7067 (OVL_USED): Likewise.
7068 (IDENTIFIER_TYPE_VALUE): Likewise.
7069 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
7070 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
7071 (LANG_ID_FIELD): Whitespace.
7072 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
7073 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
7074 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
7075 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
7076 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
7077 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
7078 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
7079 (IDENTIFIER_VIRTUAL_P): Likewise.
7080 (IDENTIFIER_OPNAME_P): Likewise.
7081 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
7082 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
7083 (C_SET_EXP_ORIGINAL_CODE): Likewise.
7084 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
7085 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
7086 (IS_AGGR_TYPE): Uppercase macro parameter.
7087 (CLASS_TYPE_P): Likewise.
7088 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
7089 (IS_AGGR_TYPE_2): Whitespace.
7090 (TAGGED_TYPE_P): Uppercase macro parameter.
7091 (TYPE_BUILT_IN): Whitespace.
7092 (TYPE_FOR_JAVA): Likewise.
7093 (FUNCTION_ARG_CHAIN): Remove parenthesis.
7094 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
7095 (FUNCTION_FIRST_USER_PARAM): Likewise.
7096 (PROMOTES_TO_AGGR_TYPE): Whitespace.
7097 (DERIVED_FROM_P): Add parenthesis and wrap.
7098 (UNIQUELY_DERIVED_FROM_P): Likewise.
7099 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
7100 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
7101 (CLASSTYPE_USE_TEMPLATE): Whitespace.
7102 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
7103 (TYPE_GETS_DELETE): Add parenthesis.
7104 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
7105 (TYPE_HAS_ASSIGN_REF): Likewise,
7106 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
7107 (TYPE_HAS_INIT_REF): Likewise.
7108 (TYPE_HAS_CONST_INIT_REF): Likewise.
7109 (TYPE_BEING_DEFINED): Likewise.
7110 (TYPE_LANG_SPECIFIC): Likewise.
7111 (CLASSTYPE_RTTI): Likewise.
7112 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
7113 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
7114 (TYPE_OVERLOADS_ARROW): Likewise.
7115 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
7116 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
7117 (CLASSTYPE_METHOD_VEC): Likewise.
7118 (CLASSTYPE_MARKED_N): Likewise.
7119 (CLASSTYPE_MARKED): Likewise.
7120 (CLASSTYPE_MARKED2): Likewise.
7121 (CLASSTYPE_MARKED3): Likewise.
7122 (CLASSTYPE_MARKED4): Likewise.
7123 (CLASSTYPE_MARKED5): Likewise.
7124 (CLASSTYPE_MARKED6): Likewise.
7125 (SET_CLASSTYPE_MARKED): Whitespace.
7126 (CLEAR_CLASSTYPE_MARKED): Likewise.
7127 (SET_CLASSTYPE_MARKED2): Likewise.
7128 (CLEAR_CLASSTYPE_MARKED2): Likewise.
7129 (SET_CLASSTYPE_MARKED3): Likewise.
7130 (CLEAR_CLASSTYPE_MARKED3): Likewise.
7131 (SET_CLASSTYPE_MARKED4): Likewise.
7132 (CLEAR_CLASSTYPE_MARKED4): Likewise.
7133 (SET_CLASSTYPE_MARKED5): Likewise.
7134 (CLEAR_CLASSTYPE_MARKED5): Likewise.
7135 (SET_CLASSTYPE_MARKED6): Likewise.
7136 (CLEAR_CLASSTYPE_MARKED6): Likewise.
7137 (CLASSTYPE_TAGS): Likewise.
7138 (CLASSTYPE_VSIZE): Likewise.
7139 (CLASSTYPE_VBASECLASSES): Likewise.
7140 (CANONICAL_BINFO): Add parenthesis.
7141 (CLASSTYPE_SIZE(NODE): Likewise.
7142 (CLASSTYPE_SIZE_UNIT): Likewise.
7143 (CLASSTYPE_ALIGN(NODE): Likewise.
7144 (CLASSTYPE_USER_ALIGN): Likewise.
7145 (TYPE_JAVA_INTERFACE): Likewise.
7146 (CLASSTYPE_PURE_VIRTUALS): Likewise.
7147 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
7148 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
7149 (CLASSTYPE_HAS_MUTABLE): Likewise.
7150 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
7151 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
7152 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
7153 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
7154 (CLASSTYPE_INTERFACE_ONLY): Likewise.
7155 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
7156 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
7157 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
7158 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
7159 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
7160 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
7161 (BINFO_UNSHARED_MARKED): Whitespace.
7162 (BINFO_MARKED): Whitespace and wrap.
7163 (SET_BINFO_MARKED): Likewise.
7164 (CLEAR_BINFO_MARKED): Likewise.
7165 (BINFO_VTABLE_PATH_MARKED): Likewise.
7166 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
7167 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
7168 (BINFO_SUBVTT_INDEX): Remove parenthesis.
7169 (BINFO_VPTR_INDEX): Likewise.
7170 (BINFO_PRIMARY_BASE_OF): Likewise,
7171 (CLASSTYPE_VFIELDS): Whitespace.
7172 (VF_DERIVED_VALUE): Wrap long line.
7173 (NAMESPACE_LEVEL): Whitespace.
7174 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
7175 (DEFARG_POINTER): Whitespace.
7176 (DECL_NEEDED_P): Remove parenthesis.
7177 (DECL_LANGUAGE): Whitespace.
7178 (SET_DECL_LANGUAGE): Add parenthesis.
7179 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
7180 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
7181 (DECL_IN_AGGR_P): Whitespace.
7182 (DECL_FRIEND_P): Likewise.
7183 (DECL_BEFRIENDING_CLASSES): Likewise.
7184 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
7185 (DECL_NONCONVERTING_P): Whitespace.
7186 (DECL_PURE_VIRTUAL_P): Likewise.
7187 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
7188 (DECL_PENDING_INLINE_INFO): Whitespace.
7189 (DECL_SORTED_FIELDS): Likewise.
7190 (DECL_DEFERRED_FN): Likewise.
7191 (DECL_TEMPLATE_INFO): Likewise.
7192 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
7193 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
7194 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
7195 (TMPL_ARGS_LEVEL): Likewise.
7196 (SET_TMPL_ARGS_LEVEL): Likewise.
7197 (INNERMOST_TEMPLATE_PARMS): Whitespace.
7198 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
7199 (INTEGRAL_CODE_P(CODE): Add parenthesis.
7200 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
7201 (TYPE_HAS_CONSTRUCTOR): Whitespace.
7202 (TREE_HAS_CONSTRUCTOR): Likewise.
7203 (TYPE_HAS_DESTRUCTOR): Likewise.
7204 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
7205 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
7206 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
7207 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
7208 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
7209 (TYPE_PTRMEMFUNC_P): Likewise.
7210 (TYPE_PTRMEMFUNC_FLAG): Likewise.
7211 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
7212 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
7213 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
7214 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
7215 (DECL_ACCESS): Whitespace.
7216 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
7217 (DECL_GLOBAL_DTOR_P): Likewise.
7218 (GLOBAL_INIT_PRIORITY): Likewise.
7219 (DECL_TEMPLATE_PARMS): Likewise.
7220 (DECL_TEMPLATE_RESULT): Likewise.
7221 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
7222 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
7223 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
7224 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
7225 (PRIMARY_TEMPLATE_P): Add parenthesis.
7226 (DECL_USE_TEMPLATE): Whitespace.
7227 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
7228 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
7229 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
7230 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
7231 (CALL_DECLARATOR_PARMS): Remove parenthesis.
7232 (CALL_DECLARATOR_QUALS): Likewise.
7233 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
7234 (TEMP_NAME_P): Wrap.
7235 (VFIELD_NAME_P): Likewise.
7236 (B_SET): Uppercase macro parameters and add parenthesis.
7239 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
7240 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
7241 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
7242 (same_or_base_type_p): Likewise.
7243 (cp_deprecated): Likewise.
7245 2002-01-05 Richard Henderson <rth@redhat.com>
7247 * semantics.c (expand_body): Revert last change.
7249 2002-01-04 Jason Merrill <jason@redhat.com>
7252 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
7255 * class.c (build_vtbl_initializer): Check for a lost primary
7256 before calculating the vtable entry to throw away.
7258 2002-01-02 Jason Merrill <jason@redhat.com>
7260 * semantics.c (expand_body): Call outlining_inline_function when
7261 emitting an inline function out of line.
7263 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
7265 PR c++/5116, c++/764 reversion
7266 * call.c (build_new_op): Revert the instantiations. They are
7269 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
7272 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
7274 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
7277 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
7278 (tsubst, case POINTER_TYPE): Handle pmfs here.
7279 (tsubst, case OFFSET_TYPE): Check it is not an offset to
7280 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
7282 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
7285 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
7286 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
7287 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
7289 (tsubst_template_parms): Break up loop statements.
7290 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
7291 parm PARM_DECLs don't get promoted.
7293 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
7296 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
7297 (build_x_function_call): Cope with a COMPONENT_REF containing a
7300 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
7303 * pt.c (convert_template_argument): Be more careful determining
7304 when RECORD_TYPE templates are or are not templates.
7306 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
7309 * cp-tree.h (handle_class_head): Adjust prototype.
7310 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
7311 parameters. Use for all class heads.
7312 * parse.y (named_class_head_sans_basetype, named_class_head,
7313 named_complex_class_head_sans_basetype,
7314 named_class_head_sans_basetype_defn,
7315 unnamed_class_head): Remove.
7316 (class_head, class_head_apparent_template): Recognize class heads
7317 (class_head_decl, class_head_defn): New reductions. Process class
7319 (structsp): Adjust class definition and class declaration
7321 (maybe_base_class_list): Give diagnostic on empty list.
7323 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
7326 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
7327 single non-static member.
7328 (unary_complex_lvalue): If it cannot be a pointer to member, don't
7329 make it so. Check it is not pointer to reference.
7331 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
7334 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
7335 are processing a template decl.
7337 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
7339 PR c++/5116, c++/764
7340 * call.c (build_new_op): Make sure template class operands are
7341 instantiated. Simplify arglist construction.
7343 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
7345 * call.c (build_user_type_conversion_1): Use my_friendly_assert
7346 rather than if ... abort.
7347 * cvt.c (convert_to_reference): Likewise.
7348 * semantics.c (setup_vtbl_ptr): Likewise.
7349 * pt.c (lookup_template_class): Comment typo.
7351 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
7354 * pt.c (push_template_decl_real): Make sure DECL has
7357 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
7360 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
7361 for non-reference fields.
7362 * typeck.c (require_complete_type): Use resolve_offset_ref).
7364 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
7367 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
7369 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
7372 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
7373 up. Don't stabilize_references when initializing a reference.
7375 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7377 * decl2.c (lang_f_options): Const-ify.
7379 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
7381 * config-lang.in (diff_excludes): Remove.
7383 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
7386 * typeck.c (build_function_call_real): Use original function
7387 expression for errors.
7389 2001-12-18 Jason Merrill <jason@redhat.com>
7392 * class.c (add_method): Do compare 'this' quals when trying to match a
7393 used function. Don't defer to another used function.
7395 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
7397 * pt.c (instantiate_clone): Remove, fold into ...
7398 (instantiate_template): ... here. Simplify by removing mutual
7400 * typeck2.c (build_m_component_ref): Don't cv qualify the function
7401 pointed to by a pointer to function.
7402 * class.c (delete_duplicate_fields_1): Typo.
7404 2001-12-18 Jason Merrill <jason@redhat.com>
7406 C++ ABI change: destroy value arguments in caller.
7407 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
7408 create an extra binding level for the parameters.
7409 * decl.c (store_parm_decls): Don't do parameter cleanups.
7411 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
7413 * call.c (build_new_method_call): Use '%#V'.
7414 * error.c (cv_to_string): Use V parameter to determine padding.
7416 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
7418 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
7419 spellings in messages.
7421 2001-12-17 Zack Weinberg <zack@codesourcery.com>
7423 * cp-tree.h: Delete #defines for cp_error, cp_warning,
7424 cp_pedwarn, and cp_compiler_error.
7425 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
7426 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
7427 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
7428 typeck2.c: Change calls to the above macros to use their
7429 language-independent equivalents: error, warning, pedwarn, and
7430 internal_error respectively.
7432 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
7434 * decl2.c (finish_file): Remove back_end_hook.
7436 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
7438 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
7439 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
7440 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
7442 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
7444 * lang-options.h: Use American spelling in messages.
7446 2001-12-13 Jason Merrill <jason@redhat.com>
7448 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
7450 Use cleanups to run base and member destructors.
7451 * init.c (push_base_cleanups): New function, split out from...
7452 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
7453 * decl.c (finish_destructor_body): Move vbase destruction code to
7455 (begin_function_body, finish_function_body): New fns.
7456 (finish_function): Move [cd]tor handling and call_poplevel to
7457 finish_function_body.
7458 (pushdecl): Skip the new level.
7459 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
7460 (setup_vtbl_ptr): Call push_base_cleanups.
7461 * method.c (synthesize_method): Call {begin,end}_function_body.
7462 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
7463 * cp-tree.h: Declare new fns.
7464 * parse.y (function_body, .begin_function_body): New nonterminals.
7465 (fndef, pending_inline, function_try_block): Use function_body.
7466 (ctor_initializer_opt, function_try_block): No longer has a value.
7467 (base_init): Remove .set_base_init token.
7468 (.set_base_init, compstmt_or_error): Remove.
7469 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
7471 * optimize.c (maybe_clone_body): Fix parameter updating.
7473 2001-12-12 Jason Merrill <jason@redhat.com>
7475 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
7476 * semantics.c (genrtl_start_function): Don't pass
7477 parms_have_cleanups or push an extra binding level.
7478 (genrtl_finish_function): Lose cleanup_label cruft.
7480 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
7481 (ctor_label): Remove.
7482 * semantics.c (finish_return_stmt): Lose ctor_label support.
7483 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
7484 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
7487 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
7489 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
7491 * decl.c (finish_function): Check VMS_TARGET, not VMS.
7493 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
7494 (end_cleanup_fn): And poplevel.
7496 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
7497 if we're in a template.
7499 2001-12-12 Jakub Jelinek <jakub@redhat.com>
7501 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
7502 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
7503 THIS_NAME_P): Delete.
7504 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
7505 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
7506 with internal naming scheme.
7507 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
7509 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
7511 * decl.c (grokdeclarator): Deprecated implicit typename use.
7513 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
7516 * parse.y (frob_specs): Indicate it is a language linkage which
7517 contained the extern.
7518 * decl.c (grokdeclarator): Allow extern language linkage with
7521 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
7524 * decl.c (add_binding): Don't reject duplicate typedefs involving
7525 template parameters.
7527 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
7529 * parse.y, semantics.c: Similarly.
7531 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
7534 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
7535 (copy_args_p): Rename to ...
7536 (copy_fn_p): ... here.
7537 (grok_special_member_properties): New function.
7538 (grok_op_properties): Lose VIRTUALP parameter.
7539 (copy_assignment_arg_p): Remove.
7540 * call.c (build_over_call): Use copy_fn_p.
7541 * decl.c (grokfndecl): Reformat. Adjust call to
7543 (copy_args_p): Rename to ...
7544 (copy_fn_p): ... here. Reject template functions. Check for pass
7546 (grok_special_member_properties): Remember special functions.
7547 (grok_ctor_properties): Don't remember them here, just check.
7548 (grok_op_properties): Likewise.
7549 (start_method): Call grok_special_member_properties.
7550 * decl2.c (grokfield): Likewise.
7551 (copy_assignment_arg_p): Remove.
7552 (grok_function_init): Don't remember abstract assignment here.
7553 * pt.c (instantiate_class_template): Call
7554 grok_special_member_properties.
7555 (tsubst_decl): Adjust grok_op_properties call.
7557 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
7559 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
7560 RID_TYPES_COMPATIBLE_P.
7562 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
7564 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
7565 call to build_aggr_init.
7566 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
7568 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
7570 * parse.y: Replace uses of the string non-terminal with STRING.
7571 Don't perform string concatentaion here.
7572 (string): Remove non-terminal.
7573 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
7575 2001-12-05 Jason Merrill <jason@redhat.com>
7577 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
7578 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
7579 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
7580 * pt.c (push_tinst_level): No longer static.
7581 * cp-tree.h: Declare them.
7583 * init.c (resolve_offset_ref): Don't check access for the base
7584 conversion to access a FIELD_DECL.
7586 * cp-tree.h (TYPE_REFFN_P): New macro.
7587 * decl.c (bad_specifiers): Check it, too.
7589 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
7590 on the __*_type_info type if we haven't seen a definition.
7592 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
7594 * decl.c: Include c-common.h.
7595 (shadow_warning): Move to c-common.c.
7597 2001-12-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7599 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
7601 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
7603 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
7605 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
7608 * init.c (sort_base_init): Allow binfos to be directly specified.
7609 * method.c (do_build_copy_constructor): Explicitly convert to the
7611 (do_build_assign_ref): Likewise.
7613 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
7615 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
7616 declaration and initialization.
7618 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
7620 * typeck2.c: Remove leading capital from diagnostic messages, as
7621 per GNU coding standards.
7623 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
7626 * decl.c (xref_basetypes): Handle attributes between
7629 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
7632 * parse.y (named_complex_class_head_sans_basetype): Add new
7634 * Make-lang.in (parse.c): Adjust expected conflict count.
7636 2001-12-03 Jason Merrill <jason@redhat.com>
7638 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
7639 immediate binfos for our virtual bases.
7641 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
7643 * call.c (build_java_interface_fn_ref): Similarly.
7644 * except.c (is_admissible_throw_operand): Similarly.
7645 * init.c (build_java_class_ref): Similarly.
7646 * xref.c (open_xref_file): Similarly.
7648 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
7650 * class.c (finish_struct): Remove trailing periods from messages.
7651 * decl.c (check_tag_decl): Similarly.
7652 * lex.c (cxx_set_yydebug): Similarly.
7653 * typeck2.c (friendly_abort): Similarly.
7655 2001-11-29 Mark Mitchell <mark@codesourcery.com>
7658 * cp-tree.h (ovl_member): Remove.
7659 * decl2.c (merge_functions): Handle extern "C" functions
7661 * tree.c (ovl_member): Remove.
7663 2001-11-29 Mark Mitchell <mark@codesourcery.com>
7666 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
7667 FUNCTION_DECL, as input.
7668 (mark_overriders): Remove.
7669 (warn_hidden): Rework for the new ABI.
7671 2001-11-29 Mark Mitchell <mark@codesourcery.com>
7674 * call.c (convert_like_real): Do not build additional temporaries
7675 for rvalues of class type.
7677 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
7679 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
7680 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
7681 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
7682 (DERIVED_FROM_P): Likewise.
7683 (enum base_access): Renumber, add ba_quiet bit mask.
7684 (get_binfo): Remove.
7685 (get_base_distance): Remove.
7686 (binfo_value): Remove.
7687 (ACCESSIBLY_DERIVED_FROM_P): Remove.
7688 * call.c (standard_conversion): Use lookup_base.
7689 * class.c (strictly_overrides): Likewise.
7690 (layout_virtual_bases): Likewise.
7691 (warn_about_ambiguous_direct_bases): Likewise.
7692 (is_base_of_enclosing_class): Likewise.
7693 (add_vcall_offset_vtbl_entries_1): Likewise.
7694 * cvt.c (build_up_reference): Adjust comment.
7695 * init.c (build_member_call): Reformat.
7696 * search.c (get_binfo): Remove.
7697 (get_base_distance_recursive): Remove.
7698 (get_base_distance): Remove.
7699 (lookup_base_r): Tweak.
7700 (lookup_base): Add ba_quiet control. Complete the types here.
7701 (covariant_return_p): Use lookup_base.
7702 * tree.c (binfo_value): Remove.
7703 (maybe_dummy_object): Use lookup_base.
7704 * typeck.c (build_static_cast): Use lookup_base.
7705 (get_delta_difference): Likewise.
7706 * typeck2.c (binfo_or_else): Use lookup_base.
7707 (build_scoped_ref): Add back error_mark_check.
7708 (build_m_component_ref): Use lookup_base.
7710 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
7712 * Make-lang.in (c++.generated-manpages): New dummy target.
7714 2001-11-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7716 * Make-lang.in (cp-lang.o): Depends on c-common.h.
7717 * cp-lang.c (c-common.h): Include.
7718 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
7719 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
7720 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
7722 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
7724 * decl2.c (c_language): Move to c-common.c.
7725 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
7729 2001-11-26 Jason Merrill <jason@redhat.com>
7731 * call.c (joust): Remove COND_EXPR hack.
7733 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
7735 * search.c (lookup_base_r): Declare bk in variable declaration
7738 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
7741 * class.c (build_vbase_pointer): Remove.
7742 (build_vbase_path): Remove.
7743 (build_base_path): New function.
7744 * cp-tree.h (base_access, base_kind): New enumerations.
7745 (build_base_path): Declare.
7746 (convert_pointer_to_real): Remove.
7747 (convert_pointer_to): Remove.
7748 (lookup_base): Declare.
7749 (convert_pointer_to_vbase): Remove.
7750 * call.c (build_scoped_method_call): Use lookup_base &
7751 build_base_path instead of convert_pointer_to_real,
7752 get_base_distance & get_binfo.
7753 (build_over_call): Likewise.
7754 * cvt.c (cp_convert_to_pointer): Likewise.
7755 (convert_to_pointer_force): Likewise.
7756 (build_up_reference): Likewise.
7757 (convert_pointer_to_real): Remove.
7758 (convert_pointer_to): Remove.
7759 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
7760 instead of convert_pointer_to_vbase & build_vbase_path.
7761 (emit_base_init): Use build_base_path instead of
7762 convert_pointer_to_real.
7763 (expand_virtual_init): Lose unrequired conversions.
7764 (resolve_offset_ref): Use lookup_base and build_base_path
7765 instead of convert_pointer_to.
7766 * rtti.c (build_dynamic_cast_1): Use lookup_base &
7767 build_base_path instead of get_base_distance & build_vbase_path.
7768 * search.c (get_vbase_1): Remove.
7769 (get_vbase): Remove.
7770 (convert_pointer_to_vbase): Remove.
7771 (lookup_base_r): New function.
7772 (lookup_base): New function.
7773 * typeck.c (require_complete_type): Use lookup_base &
7774 build_base_path instead of convert_pointer_to.
7775 (build_component_ref): Likewise.
7776 (build_x_function_call): Likewise.
7777 (get_member_function_from_ptrfunc): Likewise.
7778 (build_component_addr): Likewise.
7779 * typeck2.c (build_scoped_ref): Likewise.
7781 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7783 * cp-tree.h (CP_TYPE_QUALS): Removed.
7784 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
7785 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
7786 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
7787 * dump.c (cp_dump_tree): Use void* dump_info argument to match
7788 lang-hooks prototype.
7789 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
7790 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
7791 CP_TYPE_QUALS changed to cp_type_quals.
7792 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
7793 (CXX_C_OBJS): Remove c-dump.o.
7795 2001-11-21 Mark Mitchell <mark@codesourcery.com>
7798 * pt.c (lookup_template_class): Ensure that all specializations
7799 are registered on the list corresponding to the most general
7802 2001-11-20 Mark Mitchell <mark@codesourcery.com>
7804 * call.c (non_reference): Add documentation.
7805 (convert_class_to_reference): Do not strip reference types
7806 from conversion operators.
7807 (maybe_handle_ref_bind): Simplify.
7808 (compare_ics): Correct handling of references.
7810 2001-11-19 John Wilkinson <johnw@research.att.com>
7812 * dump.c (dump_op): New function.
7813 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
7814 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
7815 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
7817 2001-11-19 Mark Mitchell <mark@codesourcery.com>
7820 * semantics.c (finish_sizeof): Make sure that expression created
7821 while processing a template do not have a type.
7822 (finish_alignof): Likewise.
7823 * typeck.c (c_sizeof): Likewise.
7824 (expr_sizeof): Likewise.
7826 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
7828 * lex.c (cxx_finish): Call c_common_finish.
7829 (finish_parse): Remove.
7831 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7833 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
7834 when displaying error message about missing array bounds.
7836 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7838 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
7840 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
7842 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
7844 * cp-tree.h (print_class_statistics): Restore.
7846 2001-11-15 Jason Merrill <jason@redhat.com>
7848 * method.c (use_thunk): Don't emit debugging information for thunks.
7850 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
7851 * decl.c (make_typename_type): Handle getting a class template.
7852 * search.c (lookup_field_r): A class template is good enough for
7855 * call.c (convert_like_real): Only use cp_convert for the bad part.
7856 (standard_conversion): Also allow bad int->enum.
7857 * typeck.c (ptr_reasonably_similar): Also allow functions to
7858 interconvert. Pointers to same-size integers are reasonably
7861 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
7864 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
7867 * init.c (sort_base_init): Remove unreachable code.
7868 (expand_member_init): Adjust comment to reflect reality. Simplify
7869 and remove unreachable code.
7871 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
7873 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
7874 (cxx_init): Update prototype.
7875 * decl.c (init_decl_processing): Rename. Move null node init
7876 to its creation time.
7877 * lex.c (cxx_init_options): Update.
7878 (cxx_init): Combine with old init_parse; also call
7879 cxx_init_decl_processing.
7881 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
7883 * decl.c (check_initializer): Try to complete the type of an
7884 array element before checking whether it's complete. Don't
7885 complain about arrays with complete element types but an
7887 (cp_finish_decl): Build the hierarchical constructor before
7888 calling maybe_deduce_size_from_array_init.
7890 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
7892 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
7894 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
7897 * parse.y (already_scoped_stmt): Remove.
7898 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
7900 2001-11-12 H.J. Lu <hjl@gnu.org>
7902 * cvt.c (ocp_convert): Don't warn the address of a weak
7903 function is always `true'.
7905 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
7907 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
7908 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
7909 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
7910 * cp-tree.h (print_class_statistics): Remove.
7911 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
7912 cxx_print_identifier, cxx_set_yydebug): New.
7913 * lex.c (set_yydebug): Rename c_set_yydebug.
7914 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
7915 lang_print_xnode): Rename.
7916 * tree.c (print_lang_statistics): Rename.
7918 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7920 * class.c (dump_array): Fix format specifier warning.
7922 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
7924 * cp-lang.c (LANG_HOOKS_NAME): Override.
7925 (struct lang_hooks): Constify.
7926 * lex.c (cxx_init_options): Update.
7927 (lang_identify): Remove.
7928 * parse.y (language_string): Remove.
7930 2001-11-08 Andreas Franck <afranck@gmx.de>
7932 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
7933 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
7934 suggested by autoconf.
7935 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
7936 (c++.install-common): Use the transformed target alias names.
7938 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
7940 * Make-lang.in: Update.
7941 * cp-lang.c: Include langhooks-def.h.
7943 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7945 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
7947 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7949 * lex.c (copy_lang_type): Add static prototype.
7951 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7953 * pt.c (unify): Handle SCOPE_REF.
7955 2001-11-01 Jakub Jelinek <jakub@redhat.com>
7957 * tree.c (cp_copy_res_decl_for_inlining): Adjust
7958 DECL_ABSTRACT_ORIGIN for the return variable.
7960 2001-10-31 Zack Weinberg <zack@codesourcery.com>
7962 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
7964 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
7966 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
7967 semantics.c, spew.c: Fix spelling errors.
7969 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7971 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
7973 2001-10-25 Zack Weinberg <zack@codesourcery.com>
7975 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
7978 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7980 * cp-lang.c (cxx_get_alias_set): New function.
7981 Point LANG_HOOKS_GET_ALIAS_SET to it.
7983 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7985 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
7986 * cp-tree.h (make_unbound_class_template): Prototype new function.
7987 * decl.c (make_unbound_class_template): New function.
7988 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
7989 * error.c (dump_type): Likewise.
7990 * mangle.c (write_type): Likewise.
7991 * parse.y (template_parm): Likewise.
7992 (template_argument): Use make_unbound_class_template.
7993 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
7995 (tsubst_copy): Likewise.
7997 * tree.c (walk_tree): Likewise.
7998 * typeck.c (comptypes): Likewise.
8000 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8002 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
8003 extra calls into fewer ones.
8005 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
8007 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
8008 Warn when merging inline with attribute noinline.
8009 (start_decl, start_function): Warn if inline and attribute
8010 noinline appear in the same declaration.
8012 2001-10-16 H.J. Lu <hjl@gnu.org>
8014 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
8015 for tree checking disabled.
8017 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
8019 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
8020 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
8022 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
8024 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
8025 (unify): Only handle MINUS_EXPR specially if the above flag is set
8026 and the subtracted constant is 1. Clear the flag on recursive calls.
8027 Set it when unifying the maximum value in an INTEGER_TYPE's range.
8029 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
8031 * decl.c (bad_specifiers): Don't allow exception specifications
8034 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
8036 * cp/lex.c (init_cp_pragma): Similarly.
8038 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8040 * pt.c (lookup_template_class): Build complete template arguments
8041 for BOUND_TEMPLATE_TEMPLATE_PARM.
8043 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8045 * cp-tree.h (TYPE_BINFO): Update comment.
8046 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
8047 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
8048 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
8049 (copy_type): Prototype new function.
8050 * lex.c (copy_lang_decl): Gather tree node statistics.
8051 (copy_lang_type): New function.
8052 (copy_type): Likewise.
8053 (cp_make_lang_type): Create lang_type for
8054 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
8055 and BOUND_TEMPLATE_TEMPLATE_PARM.
8056 * pt.c (tsubst): Use copy_type instead of copy_node.
8057 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
8059 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8061 * pt.c (determine_specialization): Ignore functions without
8064 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
8067 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
8069 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
8071 * typeck2.c (store_init_value): Don't re-digest a bracketed
8074 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
8077 2001-10-11 Richard Henderson <rth@redhat.com>
8079 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
8080 of an asm statement.
8081 (build_vtbl_ref_1): Split out from build_vtbl_ref.
8082 (build_vfn_ref): Use it to handle vtable descriptors before
8083 calling build_vtable_entry_ref.
8084 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
8086 2001-10-10 Richard Henderson <rth@redhat.com>
8088 * parse.y (asm_operand): Allow named operands.
8089 * semantics.c (finish_asm_stmt): Tweek for changed location
8090 of the operand constraint.
8092 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
8094 * call.c (standard_conversion): Add bad conversion between
8095 integers and pointers.
8096 (convert_like_real): Don't use convert_for_initialization for bad
8097 conversions; complain here and use cp_convert.
8098 (build_over_call): Don't handle bad conversions specially.
8099 (perform_implicit_conversion): Allow bad conversions.
8100 (can_convert_arg_bad): New fn.
8101 * cp-tree.h: Declare it.
8102 * typeck.c (convert_for_assignment): Use it.
8103 (ptr_reasonably_similar): Any target type is similar to void.
8105 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
8107 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
8108 (cp/cp-lang.o): New rule.
8109 * cp-tree.h: Declare hooks.
8110 * tree.c: Make hooks non-static.
8111 (init_tree): Don't initialize hooks here.
8112 * lex.c: Likewise. Move definition of lang_hooks to...
8113 * cp-lang.c: ... new file.
8115 2001-10-08 Richard Henderson <rth@redhat.com>
8117 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
8118 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
8120 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8122 * class.c (build_vtable_entry_ref): Const-ify.
8123 * decl.c (predefined_identifier,
8124 initialize_predefined_identifiers): Likewise.
8125 * init.c (build_new_1): Likewise.
8126 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
8129 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
8131 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
8132 (INSNS_PER_STMT): Likewise.
8133 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
8134 (copy_body, initialize_inlined_parameters): Likewise.
8135 (declare_return_variable, inlinable_function_p): Likewise.
8136 (expand_call_inline, expand_calls_inline): Likewise.
8137 (optimize_inline_calls, clone_body): Likewise.
8138 * tree.c (walk_tree): Moved to ../tree-inline.c.
8139 (walk_tree_without_duplicates): Likewise.
8140 (copy_tree_r, remap_save_expr): Likewise.
8142 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
8144 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
8145 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
8146 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
8147 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
8148 (flag_inline_trees): Moved declaration to ../tree-inline.h.
8149 (walk_tree): Moved declaration to ../tree-inline.h.
8150 (walk_tree_without_duplicates, copy_tree_r): Likewise.
8151 (remap_save_expr): Likewise.
8152 * decl.c: Include tree-inline.h.
8153 (lang_mark_tree): Don't mark inlined_fns.
8154 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
8155 * optimize.c: Include tree-inline.h.
8156 (optimize_inline_calls): Move declaration to ../tree.h, as
8158 (remap_decl): Use language-independent constructs and hooks.
8159 (remap_block, copy_body_r, declare_return_variable): Likewise.
8160 (inlinable_function_p): Likewise. Don't test for
8161 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
8162 no longer language-specific.
8163 (optimize_inline_calls): Likewise. Make it non-static. Moved
8164 call of dump_function to...
8165 (optimize_function): Here...
8166 (clone_body): New function, extracted from...
8167 (maybe_clone_body): ... here. Build decl_map locally and pass
8168 it on to clone_body.
8169 * pt.c, semantics.c: Include tree-inline.h.
8171 (cp_walk_subtrees): New language-specific hook for tree inlining.
8172 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
8173 cp_is_overload_p, cp_auto_var_in_fn_p,
8174 cp_copy_res_decl_for_inlining): Likewise.
8175 (walk_tree): Move language-specific constructs into...
8176 (cp_walk_subtrees): this new function.
8177 (copy_tree_r): Use language-independent constructs and hooks.
8178 (init_tree): Initialize tree inlining hooks.
8179 (remap_save_expr): Adjust prototype so that the declaration
8180 does not require the definition of splay_tree.
8182 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
8184 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
8185 to build the declaration instead of the declaration itself.
8187 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
8189 * decl2.c (cxx_decode_option): Add 'else'.
8191 * spew.c (end_input): No longer static.
8192 * cp-tree.h: Declare it.
8193 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
8195 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
8197 * call.c (build_over_call), typeck.c (build_function_call_real):
8198 Pass type attributes to check_function_format rather than name or
8199 assembler name. Don't require there to be a name or assembler
8200 name to check formats.
8202 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
8204 * decl.c (init_decl_processing): Don't call
8205 init_function_format_info. Initialize lang_attribute_table
8207 (builtin_function): Call decl_attributes.
8208 (insert_default_attributes): New.
8210 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
8212 * decl.c (grokdeclarator): Copy array typedef handling from C
8215 * decl.c (grokdeclarator): Copy too-large array handling from C
8218 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
8220 * config-lang.in (target_libs): Added target-gperf, so that we
8221 don't try to build it if C++ is disabled.
8223 2001-09-23 Zack Weinberg <zack@codesourcery.com>
8225 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
8226 (cp/errfn.o): Delete rule.
8227 (cp/error.o): Depend on flags.h.
8228 * errfn.c: Delete file.
8229 * cp-tree.h: Declare warn_deprecated. Remove definitions of
8230 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
8231 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
8232 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
8233 internal_error respectively. Make cp_deprecated into a macro.
8234 Don't define cp_printer typedef or declare cp_printers.
8235 * error.c: Include flags.h.
8236 Delete: struct tree_formatting_info, print_function_argument_list,
8237 print_declaration, print_expression, print_function_declaration,
8238 print_function_parameter, print_type_id, print_cv_qualifier_seq,
8239 print_type_specifier_seq, print_simple_type_specifier,
8240 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
8241 print_parameter_declaration_clause, print_exception_specification,
8242 print_nested_name_specifier, and definition of cp_printers.
8243 (locate_error): New function.
8244 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
8245 rewritten in terms of locate_error and diagnostic.c.
8246 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
8247 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
8248 (init_error): Adjust to match.
8250 2001-09-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8252 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
8254 2001-09-21 Richard Henderson <rth@redhat.com>
8256 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
8257 (build_vtbl_initializer): Likewise.
8258 (build_vfn_ref): New.
8259 * cp-tree.h: Declare it.
8260 * call.c (build_over_call): Use it.
8261 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
8262 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
8264 2001-09-21 J"orn Rennecke <amylaar@redhat.com>
8266 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
8268 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
8270 Table-driven attributes.
8271 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
8272 * decl2.c (cplus_decl_attributes): Only take one attributes
8274 * cp-tree.c (cplus_decl_attributes): Update prototype.
8275 * class.c (finish_struct), decl.c (start_decl, start_function),
8276 decl2.c (grokfield), friend.c (do_friend), parse.y
8277 (parse_bitfield): Update calls to cplus_decl_attributes.
8278 * decl.c (grokdeclarator): Take a pointer to a single ordinary
8280 * decl.h (grokdeclarator): Update prototype.
8281 * decl2.c (grokfield): Take a single ordinary attribute list.
8282 * friend.c (do_friend): Likewise.
8283 * decl.c (shadow_tag, groktypename, start_decl,
8284 start_handler_parms, grokdeclarator, grokparms, start_function,
8285 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
8286 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
8287 (process_template_parm, do_decl_instantiation): Pass single
8288 ordinary attribute lists around.
8289 * decl.c (grokdeclarator): Correct handling of nested attributes.
8291 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
8292 * decl.c (grokdeclarator): Embedded attrs bind to the right,
8295 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
8296 (cp_attribute_table): Declare.
8297 * decl.c (valid_lang_attribute): Don't define.
8298 (lang_attribute_table): Define.
8299 (init_decl_processing): Initialize lang_attribute_table instead of
8300 valid_lang_attribute.
8301 * tree.c (cp_valid_lang_attribute): Remove.
8302 (handle_java_interface_attribute, handle_com_interface_attribute,
8303 handle_init_priority_attribute): New functions.
8304 (cp_attribute_table): New array.
8305 * decl2.c (import_export_class): Don't use
8306 targetm.valid_type_attribute.
8308 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
8310 * Make-lang.in (cp/error.o): Depend on real.h
8311 * error.c: #include "real.h"
8313 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8315 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
8316 xmalloc/strcpy/strcat.
8318 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8320 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
8322 * pt.c (tsubst_decl): Likewise.
8324 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8326 * decl2.c (lang_f_options): Const-ification.
8327 * lex.c (cplus_tree_code_name): Likewise.
8328 * spew.c (yyerror): Likewise.
8330 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
8333 * class.c (force_canonical_binfo_r): Check & move an indirect
8335 (force_canonical_binfo): Check that it's not already
8337 (mark_primary_virtual_base): Remove BINFO parameter.
8338 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
8340 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
8342 Remove TYPE_NONCOPIED_PARTS.
8343 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
8344 CLASSTYPE_PURE_VIRTUALS.
8345 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
8346 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
8347 (layout_class_type): Don't call fixup_inline_methods here ...
8348 (finish_struct_1): ... call it here.
8350 2001-09-04 Mark Mitchell <mark@codesourcery.com>
8352 * decl.c (duplicate_decls): Remove code deadling with
8354 * decl2.c (finish_file): Likewise.
8355 * pt.c (instantiate_decl): Likewise.
8356 * semantics.c (expand_body): Don't defer local functions if
8357 they wouldn't be deferred for some other reason. Don't
8358 generate RTL for functions that will not be emitted.
8359 (genrtl_start_function): Remove code deadling with
8361 (genrtl_finish_function): Likewise.
8363 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
8366 * call.c (build_over_call): Do not optimize any empty base
8369 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8371 * error.c (dump_template_decl): Output template parameters
8372 together with their specifiers.
8373 Output `class' prefix for template template parameter.
8374 (dump_decl): Fix formatting.
8376 2001-08-30 Kurt Garloff <garloff@suse.de>
8378 * optimize.c (inlinable_function_p): Allow only smaller single
8379 functions. Halve inline limit after reaching recursive limit.
8381 2001-08-30 Joern Rennecke <amylaar@redhat.com>
8382 Jason Merrill <jason_merrill@redhat.com>
8384 * class.c (build_vtable_entry_ref): Subtract in char*, not
8387 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
8389 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
8390 (build_cplus_array_type): Use cp_build_qualified_type, not
8391 TYPE_MAIN_VARIANT, to get an unqualified version.
8393 * decl2.c (grok_alignof): Lose.
8394 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
8395 * typeck.c (c_alignof): Lose.
8396 * semantics.c (finish_sizeof, finish_alignof): New.
8397 * parse.y: Use them.
8398 * cp-tree.h: Declare them.
8400 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
8402 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
8403 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
8404 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
8406 2001-08-19 Jakub Jelinek <jakub@redhat.com>
8408 * typeck2.c (add_exception_specifier): Only require complete type if
8409 not in processing template declaration.
8411 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8413 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
8414 GNU_xref_start_scope and GNU_xref_end_scope.
8416 * tree.c (TYPE_HASH): Moved to ../tree.h.
8418 2001-08-16 Mark Mitchell <mark@codesourcery.com>
8420 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
8423 2001-08-14 Richard Henderson <rth@redhat.com>
8425 * class.c, cp-tree.h (build_vfn_ref): Remove.
8426 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
8428 2001-08-13 Mark Mitchell <mark@codesourcery.com>
8430 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
8431 empty class assignment as having side-effects to avoid
8434 2001-08-13 Zack Weinberg <zackw@panix.com>
8436 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
8437 * except.c: Include libfuncs.h.
8439 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
8441 * decl.c (grokdeclarator): Clarify diagnostic message.
8443 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8445 * decl2.c (do_nonmember_using_decl): Replace using directive
8446 with using declaration in the error message.
8448 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8450 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
8451 criterion to avoid rebuilding expression tree instead of
8452 processing_template_decl.
8454 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
8456 Support named return value optimization for inlines, too.
8457 * decl.c (finish_function): Nullify returns here.
8458 * semantics.c (genrtl_start_function): Not here.
8459 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
8460 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
8461 Also nullify the CLEANUP_STMT for the nrv.
8462 * cp-tree.h: Declare it.
8463 * optimize.c (declare_return_variable): Replace the nrv with the
8465 * typeck.c (check_return_expr): Be more flexible on alignment check.
8466 Ignore cv-quals when checking for a matching type.
8468 2001-08-09 Richard Henderson <rth@redhat.com>
8470 * decl2.c (finish_objects): Use target hooks instead of
8471 assemble_constructor and assemble_destructor.
8473 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
8475 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
8477 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
8480 Stop using TYPE_NONCOPIED_PARTS.
8481 * call.c (build_over_call): Be careful when copy constructing
8482 or assigning to an empty class.
8483 * class.c (check_bases_and_members): It has a
8484 COMPLEX_ASSIGN_REF if it has a vptr.
8485 (layout_class_type): Don't add empty class padding to
8486 TYPE_NONCOPIED_PARTS.
8487 (finish_struct_1): Don't add the VFIELD either.
8488 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
8491 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
8493 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
8495 2001-08-06 Richard Henderson <rth@redhat.com>
8497 * decl2.c (finish_objects): Pass a symbol_ref and priority to
8498 assemble_{constructor,destructor}. Remove priority handling.
8500 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
8502 Don't allow template-id in using-declaration.
8503 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
8504 (do_class_using_decl): Likewise.
8506 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
8508 * cp/spew.c (read_token): No need to pop buffers.
8510 2001-08-02 Stan Shebs <shebs@apple.com>
8512 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
8513 (fnaddr_from_vtable_entry): Remove decl.
8514 * method.c (use_thunk): Update comment.
8516 2001-08-01 Andrew Cagney <ac131313@redhat.com>
8518 * repo.c (get_base_filename): Change return value to const char
8521 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
8525 * cp-tree.h (flag_honor_std): Remove.
8526 (CPTI_FAKE_STD): Remove.
8527 (std_node): Remove comment about it being NULL.
8528 (fake_std_node): Remove.
8529 * decl.c (in_fake_std): Remove.
8530 (walk_namespaces_r): Remove fake_std_node check.
8531 (push_namespace): Remove in_fake_std code.
8532 (pop_namespace): Likewise.
8533 (lookup_name_real): Remove fake_std_node check.
8534 (init_decl_processing): Always create std_node. Always add
8536 (builtin_function): Always put non '_' fns in std.
8537 * decl2.c (flag_honor_std): Remove.
8538 (lang_f_options): Remove honor-std.
8539 (unsupported_options): Add honor-std.
8540 (set_decl_namespace): Remove fake_std_node check.
8541 (validate_nonmember_using_decl): Likewise.
8542 (do_using_directive): Likewise.
8543 (handle_class_head): Likewise.
8544 * dump.c (cp_dump_tree): Likewise.
8545 * except.c (init_exception_processing): Adjust.
8546 * init.c (build_member_call): Remove fake_std_node check.
8547 (build_offset_ref): Likewise.
8548 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
8549 * rtti.c (init_rtti_processing): Adjust.
8551 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
8553 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
8554 operand while calling cp_tree_equal.
8556 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
8558 The 3.0 ABI no longer has vbase pointer fields.
8559 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
8560 FORMAT_VBASE_NAME): Remove.
8561 * method.c (do_build_copy_constructor): Adjust.
8562 (do_build_assign_ref): Adjust.
8563 * search.c (lookup_field_r): Adjust.
8564 * typeck.c (build_component_ref): Adjust.
8566 The 3.0 ABI always has a vtable pointer at the start of every
8568 * rtti.c (build_headof_sub): Remove.
8569 (build_headof): Adjust.
8570 (get_tinfo_decl_dynamic): No need to check flag_rtti
8572 (create_real_tinfo_var): Explain why we need a hidden name.
8574 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
8577 * class.c (update_vtable_entry_for_fn): The fixed adjustment
8578 of a virtual thunk should be from declaring base.
8580 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
8582 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
8583 the shared virtual base, so preserving inheritance graph order.
8585 2001-07-30 Andreas Jaeger <aj@suse.de>
8587 * decl2.c: Remove unused var global_temp_name_counter.
8589 2001-07-28 Richard Henderson <rth@redhat.com>
8591 * method.c (pending_inlines): Remove.
8593 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
8595 * class.c (mark_primary_virtual_base): Don't adjust base
8597 (dfs_unshared_virtual_bases): Adjust them here.
8598 (mark_primary_bases): Explain why we adjust at the end.
8600 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
8602 * class.c (finish_struct_1): When copying the primary base's
8603 VFIELD, make sure we find it is at offset zero.
8605 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8607 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
8608 tsubst_expr for default template arguments.
8610 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
8613 * spew.c (yylex): Only copy the token's lineno, if it is
8616 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
8619 * call.c (resolve_args): Simplify, call
8620 convert_from_reference.
8621 (build_new_op): Resolve and convert from reference ARG1
8622 earlier. Adjust ARG2 & ARG3 resolve and conversion.
8624 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
8626 * decl.c (last_function_parm_tags): Remove.
8627 (current_function_parm_tags): Remove.
8628 (init_decl_processing): Adjust.
8629 (start_function): Adjust.
8630 (store_parm_decls): Adjust.
8633 * decl.c (grokdeclarator): Detect when a function typedef is
8634 declaring a function, and create last_function_parms correctly.
8636 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
8638 * call.c (joust): Only prefer a non-builtin candidate to a builtin
8639 one if they have the same signature.
8641 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
8642 it rather than toplevel_bindings_p. Give it a mangled name if static.
8643 (convert_to_reference): Adjust.
8644 * decl2.c (get_temp_name): Lose.
8645 * mangle.c (mangle_ref_init_variable): New fn.
8646 (mangle_guard_variable): Strip the ref-init header.
8647 * cp-tree.h: Adjust.
8648 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
8650 (grok_reference_init): Always use DECL_INITIAL.
8652 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
8655 * call.c (build_conditional_expr): Recheck args after
8657 * cp-tree.h (build_conditional_expr): Move to correct file.
8658 * typeck.c (decay_conversion): Diagnose any unknown types
8660 (build_binary_op): Don't do initial decay or default
8661 conversions on overloaded functions.
8662 (build_static_cast): Don't do a decay conversion here.
8664 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
8667 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
8668 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
8670 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
8672 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
8673 (create_vtbl_ptr): ... here.
8675 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
8677 * class.c (build_vbase_offset_vbtl_entries): Look for
8678 non-primary base of which we are a sub vtable.
8680 2001-07-24 Phil Edwards <pme@sources.redhat.com>
8682 * semantics.c (finish_this_expr): Remove unused code.
8684 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
8686 Simplify rtti, now we've only one ABI.
8687 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
8689 (tinfo_decl_id, tinfo_var_id): Remove.
8690 (get_typeid_1): Remove.
8692 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
8693 (typeid_ok_p): New function.
8694 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
8695 (get_tinfo_decl): Remove old abi documentation.
8696 (tinfo_from_decl): Remove.
8697 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
8698 (get_typeid_1): Remove.
8699 (get_base_offset): Remove.
8700 (synthesize_tinfo_var): Absorb get_base_offset.
8701 (create_real_tinfo_var): Don't use tinfo_decl_id.
8703 2001-07-23 Graham Stott <grahams@redhat.com>
8705 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
8706 variable has_two_argument_delete_p.
8708 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
8710 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
8711 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
8712 (CPTI_INDEX_IDENTIFIER): Remove.
8713 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
8714 (delta2_identifier): Remove.
8715 (index_identifier): Remove.
8716 (pfn_or_delta2_identifier): Remove.
8717 (flag_vtable_thunks): Remove.
8718 (VTABLE_DELTA2_NAME): Remove.
8719 (VTABLE_INDEX_NAME): Remove.
8720 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
8721 (vfunc_ptr_type_node): Adjust.
8722 (VTABLE_NAME_PREFIX): Adjust.
8723 (build_vfn_ref): Lose first parameter.
8724 (fixup_all_virtual_upcast_offsets): Remove.
8725 * decl.c (initialize_predefined_identifiers): Remove
8726 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
8727 (init_decl_processing): Remove no-vtable-thunk code.
8728 * decl2.c (flag_vtable_thunks): Remove.
8729 (mark_vtable_entries): Remove no-vtable-thunk code.
8730 * error.c (dump_decl): Remove no-vtable-thunk code.
8731 (dump_expr): Adjust ptr to member function code.
8732 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
8734 * rtti.c (build_headof): Remove no-vtable-thunk code.
8735 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
8736 * search.c (get_base_distance): Remove expand_upcast_fixups case.
8737 (virtual_context) Remove.
8738 (expand_upcast_fixups): Remove.
8739 (fixup_virtual_upcast_offsets): Remove.
8740 (fixup_all_virtual_upcast_offsets): Remove.
8741 * typeck.c (get_member_function_from_ptrfunc): Remove
8742 no-vtable-thunk code.
8743 * call.c (build_over_call): Adjust call to build_vfn_ref.
8744 * class.c (build_vfn_ref): Lose first parameter. Remove
8745 no-vtable-thunk code.
8746 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
8747 (build_vtable_entry): Remove no-vtable-thunk code.
8749 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
8751 Remove old-abi remnants. Remove comments about old abi
8752 behavior. Remove references to 'new-abi' in comments.
8753 * cp-tree.h: Adjust comments.
8754 (vbase_offsets_in_vtable_p): Delete.
8755 (vcall_offsets_in_vtable_p): Delete.
8756 (vptrs_present_everywhere_p): Delete.
8757 (all_overridden_vfuns_in_vtables_p): Delete.
8758 (merge_primary_and_secondary_vtables_p): Delete.
8759 (TYPE_CONTAINS_VPTR_P): Adjust.
8760 (VTT_NAME_PREFIX): Remove.
8761 (CTOR_VTBL_NAME_PREFIX): Remove.
8762 (init_vbase_pointers): Remove.
8763 * class.c: Adjust coments.
8764 (build_vbase_pointer_fields): Delete.
8765 (build_vbase_pointer): Remove old-abi code.
8766 (build_secondary_vtable): Likewise.
8767 (modify_all_vtables): Likewise.
8768 (create_vtable_ptr): Likewise.
8769 (layout_class_type): Likewise.
8770 (finish_struct_1): Likewise.
8771 (finish_vtbls): Likewise.
8772 (dfs_finish_vtbls): Delete.
8773 (build_vbase_offset_vtbl_entries): Remove old-abi code.
8774 * cvt.c: Adjust comments.
8775 * decl.c: Adjust comments.
8776 * decl2.c: Adjust comments.
8777 * init.c: Adjust comments.
8778 (construct_virtual_bases): Remove old-abi code.
8779 * lang-specs.h: Remove -fno-new-abi.
8780 * mangle.c: Adjust comments.
8781 * rtti.c: Adjust comments.
8782 (get_base_offset): Remove old-abi-code.
8783 * search.c: Adjust comments.
8784 (dfs_init_vbase_pointers): Remove.
8785 (dfs_vtable_path_unmark): Remove.
8786 (init_vbase_pointers): Remove.
8787 * semantics.c: Adjust comments.
8788 (emit_associated_thunks): Remove old-abi code.
8789 * typeck.c: Adjust comments.
8791 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
8793 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
8796 2001-07-19 Mark Mitchell <mark@codesourcery.com>
8798 * class.c (finish_struct_anon): Forbid nested classes.
8800 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
8802 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
8803 * optimize.c: Include debug.h.
8804 (maybe_clone_body): Use debug hook.
8805 * semantics.c: Include debug.h.
8806 (expand_body): Use debug hook.
8808 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
8810 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
8812 2001-07-18 Mark Mitchell <mark@codesourcery.com>
8814 * class.c (type_requires_array_cookie): New function.
8815 (check_methods): Don't try to figure out whether the type needs a
8817 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
8818 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
8819 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
8820 * pt.c (instantiate_class_template): Don't set
8821 TYPE_VEC_DELETE_TAKES_SIZE.
8822 * NEWS: Document ABI changes from GCC 3.0.
8824 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
8825 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
8827 * NEWS (Changes in GCC 3.0): Fix typo.
8829 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
8831 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
8832 which attributes are to be attached, and a flags argument. Update
8833 call to decl_attributes.
8834 (grokfield): Update call to decl_attributes.
8835 * class.c (finish_struct): Update call to cplus_decl_attributes.
8836 * cp-tree.h (cplus_decl_attributes): Update prototype.
8837 * decl.c (start_decl, grokdeclarator, start_function): Update
8838 calls to decl_attributes and cplus_decl_attributes.
8839 * friend.c (do_friend): Update call to cplus_decl_attributes.
8840 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
8842 2001-07-12 Mark Mitchell <mark@codesourcery.com>
8844 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
8845 for `register' variables with an asm-specification.
8847 2001-07-11 Mark Mitchell <mark@codesourcery.com>
8849 * semantics.c (finish_asm_stmt): Mark the output operands
8850 to an asm addressable, if necessary.
8852 2001-07-11 Ben Elliston <bje@redhat.com>
8854 * Revert this change -- there is a subtle bug.
8857 * decl.c (finish_enum): New "attributes" argument; pass it to
8858 cplus_decl_attributes. Use a narrower type if the enum is packed.
8859 * cp-tree.h (finish_enum): Adjust prototype.
8860 * parse.y (enum_head): New non-terminal.
8861 (structsp): Use it. Enums now may be preceded or followed by
8862 optional attributes -- pass their chained tree to finish_enum().
8863 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
8865 2001-07-10 Mark Mitchell <mark@codesourcery.com>
8867 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
8870 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
8872 * semantics.c (cp_expand_stmt): Fix for null
8873 current_function_return_value.
8875 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
8877 * call.c (build_op_delete_call): Initialize fn.
8878 (convert_like_real): Delete conditional.
8879 (joust): Initialize *w and *l.
8880 * class.c: Add prototype for binfo_ctor_vtable.
8881 (get_primary_binfo): Initialize result.
8882 * init.c (build_java_class_ref): Initialize name.
8884 2001-07-09 Erik Rozendaal <dlr@acm.org>
8886 * typeck.c (unary_complex_lvalue): Do not duplicate the
8887 argument to modify, pre-, or post-increment when used as an
8888 lvalue and when the argument has side-effects.
8890 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
8892 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
8893 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
8894 cplus_decl_attributes even if attrs is NULL.
8895 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
8897 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
8899 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
8900 calls to decl_attributes.
8902 2001-07-06 Ira Ruben <ira@apple.com>
8904 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
8905 be DECL_TEMPLATE_RESULT.
8907 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8909 * cp-tree.h (copy_template_template_parm): Rename to ...
8910 (bind_template_template_parm): ... here.
8911 * tree.c (copy_template_template_parm): Rename to ...
8912 (bind_template_template_parm): ... here. Remove the case when
8913 NEWARGS is NULL_TREE.
8914 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
8915 BOUND_TEMPLATE_TEMPLATE_PARM.
8916 * pt.c (lookup_template_class): Adjust.
8918 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
8920 * cvt.c (convert_lvalue): New fn.
8921 * cp-tree.h: Declare it.
8922 * method.c (do_build_assign_ref): Use it.
8923 (do_build_copy_constructor): Convert parm to base types
8924 before calling base constructors.
8926 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
8927 DECL_USER_ALIGN. Check flag_elide_constructors instead of
8929 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
8931 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
8933 * optimize.c (optimize_inline_calls): New function, broken out
8935 (optimize_function): ... here. Call it. Don't inline if it is
8937 (dump_function): Print name of dump flag causing this dump.
8938 * semantics.c (expand_body): Move thunk inline check to
8941 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
8943 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
8944 (comptypes): Use target.comp_type_attributes.
8946 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
8948 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
8950 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
8952 * error.c (lang_print_error_function): Add a `diagnostic_context *'
8955 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
8957 * decl2.c (import_export_class): Update.
8959 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
8961 * error.c (init_error): Adjust settings.
8963 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
8965 * error.c (init_error): Adjust settings.
8967 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
8969 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
8970 return pointers to data members by reference rather than by value.
8972 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
8974 Implement the Named Return Value optimization.
8975 * cp-tree.h (struct cp_language_function): Add x_return_value.
8976 (current_function_return_value): Now a macro.
8977 * decl.c: Don't define it.
8978 (define_label, finish_case_label): Don't clear it.
8979 (init_decl_processing): Don't register it with GC.
8980 * semantics.c (genrtl_finish_function): Don't check it for
8981 no_return_label. Copy the RTL from the return value to
8982 current_function_return_value and walk, calling...
8983 (nullify_returns_r): ...this new fn.
8984 * typeck.c (check_return_expr): Set current_function_return_value.
8986 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
8988 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
8989 sharing a ctor vtable with. Merge code for cases 1 and 2.
8990 (binfo_ctor_vtable): New fn.
8991 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
8993 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
8995 * class.c (dfs_find_final_overrider): Fix logic.
8997 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
8998 virtual thunk instead of non-virtual.
8999 (get_matching_virtual): Uncomment.
9001 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
9002 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
9005 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
9007 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
9008 we've not emerged from the hierarchy of RTTI_BINFO on reaching
9011 2001-06-13 Mark Mitchell <mark@codesourcery.com>
9013 * NEWS: Update release number.
9015 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
9017 PR c++/3130, c++/3131, c++/3132
9018 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
9019 * class.c (force_canonical_binfo_r): Move
9020 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
9021 virtual bases unless they're primary and what they're primary
9023 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
9024 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
9025 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
9027 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
9028 (layout_nonempty_base_or_field): Add most derived type
9030 (layout_empty_base): Likewise.
9031 (build_base_field): Likewise.
9032 (build_base_fields): Likewise.
9033 (propagate_binfo_offsets): Add most derived type
9034 parameter. Skip non canonical virtual bases too.
9035 (dfs_set_offset_for_unshared_vbases): Don't skip primary
9036 bases. Do skip canonical bases.
9037 (layout_virtual_bases): Adjust.
9038 (layout_class_type): Adjust.
9039 (dfs_get_primary_binfo): Build list of virtual primary base
9041 (get_primary_binfo): Check that the shared virtual primary
9042 base candidate was found first.
9043 (accumulate_vtbl_inits): Don't do anything for non-vptr
9044 containing binfos. For case 1 primary virtual bases, keep
9045 checking that we've not emerged from the hierarchy of RTTI_BINFO.
9047 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
9050 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
9051 hierarchy looking for primary bases for a ctor
9052 vtable. Recursively call oneself, if we meet our primary via
9053 this route and haven't met it yet via inheritance graph order.
9055 2001-06-11 Mark Mitchell <mark@codesourcery.com>
9057 * lang-options.h: Emit documentation for -fno-honor-std, not
9060 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
9062 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
9063 Don't clobber delta.
9064 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
9066 2001-06-10 Mark Mitchell <mark@codesourcery.com>
9067 Gabriel Dos Reis <gdr@codesourcery.com>
9069 * Make-lang.in (cp/call.o): Depend on diagnostic.h
9070 (cp/typeck.o): Depend on diagnostic.h
9071 (cp/typeck2.o): Depend on diagnostic.h
9072 (cp/repo.o): Depend on dignostic.h
9073 * typeck.c: #include diagnostic.h
9074 (convert_for_initialization): Remove extern declaration for
9075 warningcount and errorcount.
9077 * call.c: #include diagnostic.h
9078 (convert_like_real): Remove extern declaration for warnincount and
9081 * repo.c: #include diagnostic.h
9082 * typeck2.c: #include diagnostic.h
9084 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
9086 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
9089 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
9092 * friend.c (do_friend): Use push_decl_namespace for classes at
9095 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
9096 Jason Merrill <jason_merrill@redhat.com>
9099 * class.c (build_secondary_vtable): Use assert, rather than an error
9101 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
9102 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
9103 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
9104 Don't set BINFO_VTABLE for a primary virtual base.
9106 2001-06-07 Mark Mitchell <mark@codesourcery.com>
9108 * decl.c (duplicate_decls): Update source position information
9109 when a template function is defined.
9111 2001-06-07 Phil Edwards <pme@sources.redhat.com>
9113 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
9115 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
9118 * decl.c (pushtag): Don't push into a complete type's scope.
9120 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
9122 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
9123 (struct lang_decl_flags): Lose generate_with_vtable_p.
9124 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
9125 * class.c (copy_virtuals): Adjust.
9126 * decl2.c (mark_vtable_entries): Adjust.
9127 * method.c (make_thunk, build_vtable_entry): Adjust.
9128 * class.c (update_vtable_entry_for_fn): Only look as far as the
9129 first defining class.
9130 (build_vtbl_initializer): Put nothing in the slot for a function only
9131 defined in a lost primary virtual base.
9132 (add_vcall_offset_vtbl_entries_1): Use the same code for
9133 the lost primary case and the normal case.
9134 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
9135 (get_vfield_offset, get_derived_offset): Lose.
9136 (dfs_find_final_overrider): Use look_for_overrides_here.
9137 (get_matching_virtual): New fn.
9138 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
9140 * search.c (look_for_overrides_here): Split out from...
9141 (look_for_overrides_r): Here.
9143 * class.c (find_final_overrider): Return error_mark_node on error.
9145 * decl2.c (key_method): #if 0 accidental change.
9147 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
9149 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
9150 (build_over_call): Likewise.
9151 * decl.c (grokparms): Likewise.
9152 * pt.c (tsubst_decl): Likewise.
9153 * typeck.c (convert_arguments): Likewise.
9155 2001-06-05 Mark Mitchell <mark@codesourcery.com>
9157 * semantics.c (begin_class_definition): Robustify.
9159 * pt.c (instantiate_decl): Tell the repository code about the
9160 clones, not the cloned functions.
9161 * repo.c (repo_template_used): Explicitly instantiate the cloned
9162 function, not the clones.
9164 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
9166 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
9167 ICS_BAD_FLAG on created conversion.
9168 (compare_ics): Break out rank.
9170 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
9172 * decl.c (xref_tag): Remove extraneous %s on dependent name
9175 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
9177 * class.c (layout_vtable_decl): Fix off by one error on
9179 (build_vtt): Likewise.
9180 (build_ctor_vtbl_group): Likewise.
9182 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
9184 * class.c (maybe_indent_hierarchy): New function.
9185 (dump_class_hierarchy_r): Add flags. Dump extra binfo
9186 information, if enabled. Use maybe_indent_hierarchy. Adjust
9188 (dump_class_hierarchy): Adjust prototype. Adjust output format.
9189 (dump_array, dump_vtable, dump_vtt): New functions.
9190 (finish_struct_1): Adjust hierarchy dumping.
9191 (initialize_vtable): Call dump_vtable.
9192 (build_vtt): Call dump_vtt.
9193 (build_ctor_vtbl_group): Call dump_vtable.
9194 * decl2.c (flag_dump_class_layout): Remove.
9195 (cxx_decode_option): Remove dump translation unit
9196 and dump class hierarchy check. Call dump_switch_p.
9197 (finish_file): Adjust dumping.
9198 (dump.c): Only dump base classes if not TDF_SLIM.
9199 Only dump namespace members if not TDF_SLIM.
9200 * optimize.c (dump_function): New function.
9201 (optimize_function): Call dump_function.
9202 * semantics.c (expand_body): Use dump_enabled_p.
9204 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
9207 Part missed from first commit
9208 * decl2.c (finish_anon_union): Copy context.
9210 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
9213 * optimize.c (remap_decl): Remap anonymous aggregate members too.
9215 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
9218 * semantics.c (expand_body): Don't optimize thunks.
9220 2001-05-25 Sam TH <sam@uchicago.edu>
9222 * cp-tree.h lex.h: Fix header include guards.
9224 2001-05-25 Mark Mitchell <mark@codesourcery.com>
9226 * decl.c (init_decl_processing): Tweak.
9228 2001-05-24 Mark Mitchell <mark@codesourcery.com>
9230 * decl.c (duplicate_decls): Tidy.
9231 (init_decl_processing): Always set flag_no_builtin.
9233 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
9236 * decl2.c (do_local_using_decl): Push the decls, even in a
9239 2001-05-22 Mark Mitchell <mark@codesourcery.com>
9241 * optimize.c (initialize_inlined_parameters): Don't set
9242 TREE_READONLY for a VAR_DECL taking the place of an inlined
9245 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
9247 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
9248 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
9251 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
9253 * parse.y: Refer to compound literals as such, not as
9254 constructor-expressions.
9256 2001-05-21 Mark Mitchell <mark@codesourcery.com>
9258 * call.c (build_op_delete_call): Ignore exception-specifications
9259 when looking for matching delete operators.
9260 * init.c (build_new_1): Compute whether or not the allocation
9261 function used is a placement allocation function or not, and
9262 communicate this information to build_op_delete_call.
9264 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
9266 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
9267 (build_vtbl_ref): Adjust.
9268 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
9269 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
9271 (unsupported_options): Correspondingly.
9273 * decl2.c (maybe_make_one_only): Check flag_weak, not
9274 supports_one_only().
9276 * cp-tree.def (START_CATCH_STMT): Lose.
9277 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
9278 * tree.c (cp_statement_code_p): Don't case it.
9279 * semantics.c (cp_expand_stmt): Likewise.
9280 * cp-tree.h (START_CATCH_TYPE): Lose.
9281 (HANDLER_TYPE): New.
9282 * except.c (expand_start_catch_block): Don't start any blocks.
9284 (expand_end_catch_block): Don't end any blocks.
9285 * parse.y (handler): Don't pass anything from finish_handler_parms
9287 * pt.c (tsubst_expr): Likewise.
9288 * semantics.c (begin_handler): Call note_level_for_catch here.
9289 (finish_handler_parms): Don't return anything.
9290 (genrtl_catch_block, begin_catch_block): Lose.
9291 (genrtl_handler): Call expand_start_catch here.
9293 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
9295 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
9296 (get_vtable_decl, build_vtt): Not here.
9298 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
9301 * optimize.c (update_cloned_parm): Copy addressability and other
9304 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9306 * pt.c (determine_specialization): Ignore artificial functions.
9308 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
9310 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
9311 (C_RID_CODE): Remove.
9312 * lex.c (cxx_init_options): Call set_identifier_size. Update.
9313 (init_parse): Don't do it here.
9315 2001-05-18 Diego Novillo <dnovillo@redhat.com>
9317 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
9318 function declaration to avoid stripping the symbol's attributes.
9320 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
9322 * decl.c (pushdecl): Adjust error string.
9323 (xref_tag): Adjust friend class injection warning. Remove the
9324 inherited name from the class shadowed scope.
9326 2001-05-17 Mark Mitchell <mark@codesourcery.com>
9328 * except.c (cp_protect_cleanup_actions): New function.
9329 (init_exception_processing): Don't set protect_cleanup_actions
9330 here. Do set lang_protect_cleanup_actions.
9332 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
9334 * spew.c (read_token): Call yyerror on all unexpected tokens.
9336 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
9338 * init.c (member_init_ok_or_else): Take a tree rather than
9340 (expand_member_init): Adjust.
9342 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
9344 * decl.c (duplicate_decls): Suppress warning about duplicate
9345 decls if the first decl is a friend.
9347 2001-05-12 Zack Weinberg <zackw@stanford.edu>
9349 * except.c (choose_personality_routine): Export. Add
9350 explanatory comment. Take an enum languages, not a boolean.
9351 (initialize_handler_parm): Adjust to match.
9352 * cp-tree.h: Prototype choose_personality_routine.
9353 * lex.c (handle_pragma_java_exceptions): New function.
9354 (init_cp_pragma): Register #pragma GCC java_exceptions.
9356 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
9358 * method.c (build_mangled_C99_name): Remove unused prototype.
9360 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
9362 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
9363 * typeck.c (get_member_function_from_ptrfunc,
9364 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
9365 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
9367 Reverted Geoff Keating's 2001-05-03's patch.
9369 2001-05-11 Ira Ruben <ira@apple.com>
9371 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
9373 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
9375 * cp-tree.h (finish_label_expr, lookup_label): Delete.
9376 * parse.y: Update for '&&'; don't issue warning here.
9377 * semantics.c (finish_label_expr): Delete.
9379 2001-05-07 Mark Mitchell <mark@codesourcery.com>
9381 * splay-tree.h (splay_tree_max): New function.
9382 (splay_tree_min): Likewise.
9384 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
9386 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
9387 (pfn_vflag_identifier): Define.
9388 Update comment about layout of pointer functions.
9389 (build_ptrmemfunc1): Update prototype.
9390 (expand_ptrmemfunc_cst): Update prototype.
9391 * decl.c (initialize_predefined_identifiers): Initialize
9392 pfn_vflag_identifier.
9393 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
9394 an extra field to the type.
9395 * expr.c (cplus_expand_constant): Pass 'flag' between
9396 expand_ptrmemfunc_cst and build_ptrmemfunc1.
9397 * typeck.c (get_member_function_from_ptrfunc): When
9398 FUNCTION_BOUNDARY < 16, look at additional field to determine
9399 if a pointer-to-member is a real pointer or a vtable offset.
9400 (build_ptrmemfunc1): Add new parameter to contain extra field.
9401 (build_ptrmemfunc): Pass the extra field around.
9402 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
9403 (pfn_from_ptrmemfunc): Ignore the extra field.
9405 2001-05-03 Mark Mitchell <mark@codesourcery.com>
9407 * cp-tree.h (flag_inline_trees): Update documentation.
9408 * decl.c (init_decl_processing): Adjust handling of
9409 flag_inline_functions and flag_inline_trees to support -O3.
9410 (grokfndecl): Set DECL_INLINE on all functions if that's what
9412 (save_function_data): Clear DECL_INLINE in
9413 current_function_cannot_inline is non-NULL.
9414 * decl2.c (flag_inline_trees): Update documentation.
9416 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
9418 * dump.c (cp_dump_tree, USING_STMT case): New case.
9419 * tree.c (cp_statement_code_p): Add USING_STMT.
9420 * decl2.c (do_using_directive): Add the using directive statement.
9422 * tree.c (walk_tree): Reformat an if block.
9424 2001-05-02 Mark Mitchell <mark@codesourcery.com>
9426 * decl.c (compute_array_index_type): Don't try to do anything with
9427 the indices when processing a template.
9429 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9431 * call.c: NULL_PTR -> NULL.
9432 * class.c: Likewise.
9435 * decl2.c: Likewise.
9436 * except.c: Likewise.
9439 * search.c: Likewise.
9441 * typeck.c: Likewise.
9442 * typeck2.c: Likewise.
9444 2001-05-02 Mark Mitchell <mark@codesourcery.com>
9446 * decl2.c (do_using_directive): Revert previous patch.
9448 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
9450 * cp-tree.def (USING_STMT): New statement node.
9451 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
9452 * decl2.c (do_using_directive): Add USING_STMT to statement
9453 tree. Don't emit errors when processing template decl.
9454 * pt.c (tsubst_expr, USING_STMT case): New case.
9455 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
9457 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
9459 * call.c (build_new_op): Convert args from reference here.
9460 (build_conditional_expr): Don't convert here.
9462 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
9464 * spew.c (last_token_id): New static variable.
9465 (read_token): Set it here.
9466 (yyerror): Use it here.
9468 2001-04-30 Richard Henderson <rth@redhat.com>
9470 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
9473 2001-04-30 Mark Mitchell <mark@codesourcery.com>
9475 * gxxint.texi: Remove.
9476 * Make-lang.in: Remove all traces of gxxint.texi.
9478 2001-04-30 Mark P Mitchell <mark@codesourcery.com>
9480 * decl2.c (start_static_initialization_or_destruction): Correct
9481 logic to handle the -fno-use-cxa-atexit case.
9483 2001-04-30 Mark Mitchell <mark@codesourcery.com>
9485 * optimize.c (update_cloned_parm): New function.
9486 (maybe_clone_body): Use it. Update the `this' parameter too.
9488 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
9490 * decl2.c (unsupported_options): Add new-abi.
9491 * lang-options.h: Remove no longer supported options.
9493 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
9495 * except.c (can_convert_eh): Don't check template parms,
9498 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
9500 * optimize.c (maybe_clone_body): Copy parameter names and locations.
9502 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
9504 * cp-tree.h (adjust_clone_args): Prototype new function.
9505 * class.c (adjust_clone_args): New function.
9506 * decl.c (start_function): Call it for in charge ctors.
9508 2001-04-26 Mark Mitchell <mark@codesourcery.com>
9510 * method.c (use_thunk): Make sure that thunks really are emitted
9513 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
9515 * mangle.c (write_chars): New macro.
9516 (hwint_to_ascii): New function
9517 (write_number): Use it.
9518 (write_integer_cst): Deal with really big numbers.
9520 2001-04-25 Mark Mitchell <mark@codesourcery.com>
9522 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
9525 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
9527 * decl.c (grokdeclarator): Set context of namespace scope
9530 2001-04-24 Zack Weinberg <zackw@stanford.edu>
9532 * cp/optimize.c: Include hashtab.h.
9533 (struct inline_data): Add tree_pruner.
9534 (expand_call_inline, expand_calls_inline): Use it when calling
9536 (optimize_function): Initialize and free tree_pruner.
9538 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
9540 Lazy __FUNCTION__ generation.
9541 * cp-tree.def (FUNCTION_NAME): Remove.
9542 * cp-tree.h (function_name_declared_p): Remove.
9543 (cp_fname_init): Prototype.
9544 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
9545 don't call declare_function_name. Call start_fname_decls.
9546 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
9547 clobber the line number.
9548 (cp_fname_init): New function.
9549 (start_function): Call start_fname_decls.
9550 (finish_function): Call finish_fname_decls.
9551 * lex.c (reswords): Add slots for __FUNCTION__ et al.
9552 (rid_to_yy): Add mappings for __FUNCTION__ et al.
9553 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
9554 * parse.y (VAR_FUNC_NAME): New token.
9555 (primary): Add VAR_FUNC_NAME.
9556 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
9558 (tsubst, FUNCTION_NAME case): Remove.
9559 (tsubst_copy, FUNCTION_NAME case): Remove.
9560 (tsubst_expr, DECL_STMT case): Be careful with a
9561 DECL_PRETTY_FUNCTION_P.
9562 (instantiate_decl): Remove function_name_declared_p.
9563 * semantics.c (begin_compound_statement): Don't call
9564 declare_function_name here.
9565 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
9566 (finish_translation_unit): Call finish_fname_decls.
9567 (expand_body): Remove function_name_declared_p.
9568 * typeck2.c (digest_init): Allow any ERROR_MARK.
9570 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
9572 * pt.c (tsubst_decl): Use VOID_TYPE_P.
9573 * semantics.c: Fix some typos.
9575 2001-04-23 Phil Edwards <pme@sources.redhat.com>
9577 * cp/decl2.c (flag_honor_std): Always initialize to 1.
9579 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9581 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
9583 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
9585 * except.c (build_throw): Wrap the initialization of the exception
9586 object in a MUST_NOT_THROW_EXPR.
9587 (do_free_exception): #if 0.
9589 2001-04-20 Mark Mitchell <mark@codesourcery.com>
9591 * cp-tree.h (finish_enum): Change prototype.
9592 * decl.c (finish_enum): Reorganize.
9593 * parse.y (structsp): Adjust calls to finish_enum.
9595 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
9597 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
9600 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
9602 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
9603 (layout_empty_base): Return at end flag.
9604 (build_base_field): Likewise.
9605 (build_base_fields): Likewise.
9606 (layout_virtual_bases): Don't add 1 to eoc value.
9607 (end_of_class): Use full size for empty bases.
9608 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
9609 empty bases. Don't add 1 to eoc value. Only add trailing padding
9610 if we're an empty class with no empty bases.
9611 (dump_class_hierarchy): Dump size and alignment.
9613 2001-04-20 Jakub Jelinek <jakub@redhat.com>
9615 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
9618 2001-04-20 Jakub Jelinek <jakub@redhat.com>
9620 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
9621 is found, look first if name does not match the structure name.
9623 2001-04-19 Mark Mitchell <mark@codesourcery.com>
9625 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
9627 (SET_DECL_LANGUAGE): New macro.
9628 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
9629 (pushdecl): Likewise.
9630 (build_library_fn_1): Likewise.
9631 (build_cp_library_fn): Likewise.
9632 (grokfndecl): Likewise.
9633 (grokvardecl): Mark `extern "C"' variables as having C linkage.
9634 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
9635 * lex.c (retrofit_lang_decl): Likewise.
9636 * mangle.c (mangle_decl_string): Don't mangle the names of
9637 variables declared with C language linkage.
9638 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
9640 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
9642 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
9643 flag_access_control from uninitialized storage.
9645 2001-04-15 Mark Mitchell <mark@codesourcery.com>
9647 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
9648 * mangle.c (write_pointer_to_member_type): Fix mangling of
9649 pointers to cv-qualified member function types.
9651 * init.c (build_delete): Create a SAVE_EXPR for the address if
9652 we're going to use it more than once.
9654 2001-04-13 Mark Mitchell <mark@codesourcery.com>
9656 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
9657 (expand_ptremfunc_cst): Change prototype.
9658 (delta2_from_ptrmemfunc): Remove.
9659 * expr.c (cplus_expand_constant): Adjust call to
9660 expand_ptrmemfunc_cst.
9661 * typeck.c (build_ptrmemfunc1): Simplify.
9662 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
9663 results in a constant.
9664 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
9665 (delta2_from_ptrmemfunc): Remove.
9666 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
9668 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
9670 * cp-tree.h (decl_namespace_list): New macro.
9671 (struct saved_scope): Add decl_ns_list.
9672 * decl.c (mark_saved_scope): Mark it.
9673 * decl2.c: Lose static decl_namespace_list.
9674 (init_decl2): Don't save it.
9676 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9678 * cp-tree.h (warn_return_type, yylex): Delete redundant
9681 * decl.c (current_class_depth, global_namespace): Likewise.
9683 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
9685 * repo.c (flag_use_repository): Likewise.
9687 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9689 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
9690 set_block, pushdecl, getdecls, gettags, init_decl_processing,
9691 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
9692 lvalue_or_else, print_lang_statistics, comp_target_types,
9693 unsigned_type, signed_type, signed_or_unsigned_type,
9694 build_function_call, mark_addressable, incomplete_type_error):
9695 Delete redundant declarations.
9697 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
9699 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
9700 (TYPE_ANONYMOUS_P): New macro.
9701 (TAGGED_TYPE_P): New macro.
9702 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
9703 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
9704 * tree.c (no_linkage_helper): Likewise.
9705 * semantics.c (begin_class_definition): Likewise.
9706 * pt.c (convert_template_argument): Likewise.
9707 * lex.c (check_for_missing_semicolon): Likewise.
9709 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
9711 * class.c (dfs_unshared_virtual_bases): New function.
9712 (mark_primary_bases): Call it.
9713 (check_bases): Ignore virtual bases when determining
9716 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
9718 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
9720 2001-04-11 Mark Mitchell <mark@codesourcery.com>
9722 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
9723 cloned function to the clone.
9725 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9727 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
9729 * semantics.c: Include expr.h.
9731 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
9733 * method.c (implicitly_declare_fn): Commonize code for copy ctor
9734 and assignment op. Set TREE_USED for parameter.
9736 2001-04-10 Mark Mitchell <mark@codesourcery.com>
9738 * class.c (find_final_overrider_data): Add `candidates'.
9739 (dfs_find_final_overrider): Don't issue error messages
9741 (find_final_overrider): Issue error messages here.
9742 (build_base_field): Don't warn about amgibuous direct bases here.
9743 (warn_about_ambiguous_direct_bases): New function.
9744 (layout_class_type): Use it.
9746 2001-04-10 Richard Henderson <rth@redhat.com>
9748 * typeck.c (build_array_ref): Push the array reference inside
9749 COMPOUND_EXPR and COND_EXPR.
9751 2001-04-05 Mark Mitchell <mark@codesourcery.com>
9753 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
9754 * decl.c (duplicate_decls): Adjust accordingly.
9755 (maybe_commonize_var): Likewise.
9756 (grokfndecl): Likewise.
9757 (start_function): Likewise.
9758 (start_method): Likewise.
9759 * decl2.c (key_method): Likewise.
9760 (import_export_decl): Likewise.
9761 * method.c (implicitly_declare_fn): Likewise.
9762 * optimize.c (maybe_clone_body): Likewise.
9764 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
9766 * lang-specs.h: Add __DEPRECATED.
9768 2001-04-05 J"orn Rennecke <amylaar@redhat.com>
9770 * search.c (get_dynamic_cast_base_type): When building a new
9771 constant, set its type to ssizetype.
9773 2001-04-04 Jakub Jelinek <jakub@redhat.com>
9775 * optimize.c (expand_call_inline): Only add newly inlined statements
9778 2001-04-03 Mark Mitchell <mark@codesourcery.com>
9780 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
9781 (OPERATOR_FORMAT): Likewise.
9782 (OPERATOR_TYPENAME_FORMAT): Likewise.
9783 * operators.def: Remove old name-mangling information.
9784 * decl.c (grok_op_properties): Adjust accordingly.
9785 * lex.c (init_operators): Likewise.
9786 * rtti.c (get_tinfo_decl): Issue error messages about types that
9789 2001-04-03 Mark Mitchell <mark@codesourcery.com>
9791 * decl2.c (import_export_decl): Don't call import_export_class
9792 when processing an inline member function.
9793 * semantics.c (expand_body): Call import_export_decl before
9794 emitting inline functions.
9796 2001-03-28 Richard Henderson <rth@redhat.com>
9798 IA-64 ABI Exception Handling:
9799 * cp-tree.def (EH_SPEC_BLOCK): New.
9800 (MUST_NOT_THROW_EXPR): New.
9801 * cp-tree.h: Update changed function declarations.
9802 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
9803 (CPTI_CALL_UNEXPECTED): New.
9804 (struct cp_language_function): Rename x_eh_spec_try_block
9806 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
9807 * decl.c (current_binding_level): If no current function
9808 bindings, revert to scope_chain.
9809 (initialize_predefined_identifiers): Remove __cp_push_exception.
9810 (store_parm_decls): Use begin_eh_spec_block.
9811 (finish_function): Use finish_eh_spec_block.
9812 (mark_lang_function): Update for name changes.
9813 * decl2.c (finish_file): No mark_all_runtime_matches.
9814 * dump.c (cp_dump_tree): Handle new tree codes.
9815 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
9816 * except.c (catch_language_init, catch_language): Remove.
9817 (init_exception_processing): Don't set language code.
9818 Initialize call_unexpected_node, protect_cleanup_actions,
9819 eh_personality_libfunc, lang_eh_runtime_type.
9820 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
9821 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
9822 (prepare_eh_type): Split out type canonicalizations ...
9823 (build_eh_type_type): ... from here.
9824 (build_eh_type_type_ref): Remove.
9825 (mark_all_runtime_matches): Remove.
9826 (build_exc_ptr): New.
9827 (do_begin_catch, do_end_catch): New.
9828 (do_pop_exception): Remove.
9829 (build_terminate_handler): Remove.
9830 (choose_personality_routine): Split out language choice from ...
9831 (initialize_handler_parm): ... here.
9832 Use MUST_NOT_THROW_EXPR.
9833 (expand_start_catch_block): Use do_begin_catch. Simplify Java
9834 exception object handling.
9835 (expand_start_eh_spec, expand_end_eh_spec): Remove.
9836 (expand_exception_blocks, alloc_eh_object): Remove.
9837 (begin_eh_spec_block, finish_eh_spec_block): New.
9838 (do_allocate_exception, do_free_exception): New.
9839 (expand_throw): Merge into ...
9840 (build_throw): ... here. Update for abi.
9841 * expr.c (cplus_expand_expr): No expand_internal_throw.
9842 Handle MUST_NOT_THROW_EXPR.
9843 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
9844 * semantics.c (*) Update for except.h name changes.
9845 (genrtl_try_block): No protect_with_terminate.
9846 (genrtl_eh_spec_block): New.
9847 (genrtl_handler): Don't emit the goto here.
9848 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
9849 (genrtl_finish_function): Don't expand_exception_blocks.
9850 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
9852 2001-03-28 Richard Henderson <rth@redhat.com>
9854 * decl.c (struct named_label_list): Rename eh_region to
9855 in_try_scope, add in_catch_scope.
9856 (struct binding_level): Rename eh_region to is_try_scope,
9858 (note_level_for_try): Rename from note_level_for_eh.
9859 (note_level_for_catch): New.
9860 (poplevel): Copy both is_try_scope and is_catch_scope to
9861 the named_label_list struct.
9862 (check_previous_goto_1): Don't check for catch block via
9863 DECL_ARTIFICIAL; use in_try_scope instead.
9864 (check_goto): Likewise.
9865 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
9866 * except.c (expand_start_catch_block): Call note_level_for_catch.
9867 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
9869 2001-03-27 Richard Henderson <rth@redhat.com>
9871 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
9872 exceptions_via_longjmp.
9874 2001-03-27 Phil Edwards <pme@sources.redhat.com>
9876 * pt.c (check_default_tmpl_args): Make error messages clearer.
9878 2001-03-26 Phil Edwards <pme@sources.redhat.com>
9880 * error.c: Also undefine 'A' macro used for cp_printers definition.
9882 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9884 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
9886 2001-03-26 Mike Yang <yang@research.att.com>
9887 Mark Mitchell <mark@codesourcery.com>
9889 * dump.c (dump_access): New function.
9890 (cp_dump_tree): Use it. Dump basetype information for class
9893 2001-03-26 Mark Mitchell <mark@codesourcery.com>
9895 * Makefile.in (optimize.o): Depend on params.h.
9896 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
9897 (init_decl_processing): Set flag_no_inline when doing
9899 * optimize.c: Include params.h.
9900 (struct inline_data): Improve documentation of FNS. Add
9901 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
9902 (INSNS_PER_STMT): New macro.
9903 (remap_block): Use CLONING_P.
9904 (inlinable_function_p): Don't inline big functions.
9905 (expand_call_inline): Keep track of how much inlining we've done.
9906 (optimize_function): Set FIRST_INLINED_FN.
9907 (maybe_clone_body): Set CLONING_P.
9908 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
9910 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
9911 rest_of_compilation. Clear DECL_RTL for local variables
9913 (clear_decl_rtl): New function.
9915 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
9918 * cp-tree.h (skip_type_access_control,
9919 reset_type_access_control): Prototype.
9920 * decl.c (grokdeclarator): Access of friends is not checked.
9921 * parse.y (component_decl_list): Reset type access control.
9922 * semantics.c (decl_type_access_control): Clear
9923 current_type_lookups.
9924 (save_type_access_control): Don't save if not deferring.
9925 (skip_type_access_control, reset_type_access_control): New
9927 (begin_class_definition): Do type access control for basetypes.
9928 Start deferred access control.
9929 (finish_class_definition): Resume immediate access control if
9930 this is a local class.
9932 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9934 * class.c (add_method): Use memcpy/memmove, not bcopy.
9936 * decl.c (duplicate_decls): Likewise.
9938 2001-03-23 Jakub Jelinek <jakub@redhat.com>
9940 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
9943 2001-03-23 Jakub Jelinek <jakub@redhat.com>
9945 * decl.c (local_names): Define.
9946 (push_local_name): New.
9947 (grok_reference_init): Return init if initializing static reference
9948 variable with non-constant instead of emitting it.
9949 Move expand_static_init call to cp_finish_decl.
9950 (layout_var_decl): Call push_local_name.
9951 (maybe_commonize_var): Allow inlining functions even if they have
9952 static local variables, use comdat_linkage for them if flag_weak.
9953 (check_initializer): Call obscure_complex_init if
9954 grok_reference_init returned nonzero.
9955 (save_function_data): Clear x_local_names.
9956 (pop_cp_function_context): Free x_local_names.
9957 (mark_inlined_fns): Remove.
9958 (mark_lang_function): Mark x_local_names.
9959 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
9960 Mark inlined_fns as tree, remove call to mark_inlined_fns.
9961 * class.c (alter_access): Ensure DECL_ACCESS is never set if
9962 DECL_DISCRIMINATOR_P.
9963 * cp-tree.h (cp_language_function): Add x_local_names.
9964 (lang_decl_flags): Add discriminator into u2.
9965 (lang_decl_inlined_fns): Remove.
9966 (lang_decl): inlined_fns is now a TREE_VEC.
9967 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
9968 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
9969 TREE_VEC, not a custom structure.
9970 (optimize_function): Likewise.
9971 * mangle.c (discriminator_for_local_entity): Discriminate among
9972 VAR_DECL local entities.
9973 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
9976 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
9978 Add support for Java interface method calls.
9979 * cp-tree.h (struct lang_type): Add java_interface flag.
9980 (TYPE_JAVA_INTERFACE): New macro.
9981 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
9982 by setting TYPE_JAVA_INTERFACE.
9983 * call.c (java_iface_lookup_fn): New static.
9984 (build_over_call): If calling a method declared in a
9985 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
9986 expression which resolves the function address.
9987 (build_java_interface_fn_ref): New function.
9989 2001-03-22 Richard Henderson <rth@redhat.com>
9991 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
9992 * except.c: Don't include it.
9994 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
9995 based on an idea from Joe Buck <jbuck@synopsys.com>
9997 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
9999 (data_def, component_decl): Add reductions to bad_decl.
10001 2001-03-22 Jakub Jelinek <jakub@redhat.com>
10003 * method.c (do_build_assign_ref): Don't use build_modify_expr for
10004 anonymous aggregates, since they don't have assignment operator
10006 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
10007 assignment operators for anonymous structure fields.
10009 2001-03-21 Jason Merrill <jason@redhat.com>
10011 * pt.c (instantiate_decl): Abort if we see a member constant
10012 instantiation that doesn't already have its initializer.
10013 Downgrade explicit instantiation without definition to pedwarn.
10015 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
10016 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
10017 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
10019 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
10020 (pending_vtables): Remove.
10021 * decl2.c (pending_vtables): Remove.
10022 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
10023 CLASSTYPE_VTABLE_NEEDS_WRITING.
10024 (import_export_class): Likewise.
10025 (init_decl2): Don't mark pending_vtables.
10026 * lex.c (handle_pragma_vtable): Just sorry.
10027 * pt.c (instantiate_class_template): Don't mess with
10028 CLASSTYPE_VTABLE_NEEDS_WRITING.
10029 (mark_class_instantiated): Likewise.
10030 * ptree.c (print_lang_type): Don't print it.
10031 * semantics.c (begin_class_definition): Don't set it.
10033 * pt.c (template_tail): Replace with last_pending_template.
10034 (maybe_templates, maybe_template_tail): Remove.
10035 (add_pending_template): Adjust.
10036 (instantiate_pending_templates): Adjust.
10038 * cp-tree.h (struct saved_scope): Remove lang_stack field.
10039 (current_lang_stack): Remove.
10040 * decl.c (maybe_push_to_top_level): Don't initialize it.
10041 (duplicate_decls): Use current_lang_depth.
10042 (xref_basetypes): Likewise.
10043 * class.c (current_lang_depth): New fn.
10044 (push_lang_context): Use more varray functionality.
10045 (pop_lang_context): Likewise.
10047 * error.c (GLOBAL_THING): Always use '__'.
10049 2001-03-21 Mark Mitchell <mark@codesourcery.com>
10051 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
10053 * mangle.c (mangle_decl_string): Mangle the names of overloaded
10054 operators, even when they have `extern "C"' linkage.
10056 2001-03-19 Mark Mitchell <mark@codesourcery.com>
10058 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
10059 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
10060 where it's not necessary.
10061 (add_method): Remove optimization involving comparison of
10062 DECL_ASSEMBLER_NAME.
10063 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
10064 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
10065 where it's not necessary.
10066 (check_methods): Likewise.
10067 (build_clone): Likewise.
10068 (built_vtt): Likewise.
10069 * cp-tree.h (DECL_NEEDED_P): Likewise.
10070 * decl.c (pushtag): Likewise.
10071 (duplicate_decls): Likewise.
10072 (pushdecl): Likewise.
10073 (builtin_function): Likewise.
10074 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
10075 (build_cp_library_fn): Likewise.
10076 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
10077 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
10078 where it's not necessary.
10079 (make_rtl_for_nonlocal_decl): Likewise.
10080 (cp_finish_decl): Likewise.
10081 (grokfndecl): Likewise.
10082 (grokvardecl): Likewise.
10083 (grokdeclarator): Likewise.
10084 (start_function): Likewise.
10085 (cp_missing_return_ok_p): Likewise.
10086 * decl2.c (grokclassfn): Likewise.
10087 (check_classfn): Likewise.
10088 (finish_static_data_member_decl): Likewise.
10089 (grokfield): Likewise.
10090 * error.c (GLOBAL_IORD_P): Remove.
10091 (dump_global_iord): Improve output.
10092 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
10093 * except.c (nothrow_libfn_p): Summarily reject any function not in
10095 * init.c (build_java_class_ref): Don't explicitly set
10096 DECL_ASSEMBLER_NAME after calling mangle_decl.
10097 * mangle.c (mangle_decl_string): Handle extern "C" functions.
10098 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
10099 * method.c (set_mangled_name_for_decl): Don't explicitly set
10100 DECL_ASSEMBLER_NAME after calling mangle_decl.
10101 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
10102 IDENTIFIER_GLOBAL_VALUE for the thunk.
10103 * pt.c (set_mangled_name_for_template_decl): Remove.
10104 (check_explicit_specialization): Don't use it.
10105 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
10106 (tsubst_friend_function): Likewise.
10107 (tsubst_decl): Likewise.
10108 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
10109 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
10110 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
10111 where it's not necessary.
10112 (tinfo_base_init): Likewise.
10113 (create_real_tinfo_var): Likewise.
10114 * search.c (looup_field_1): Likewise.
10115 * semantics.c (finish_named_return_value): Likewise.
10116 * tree.c (init_tree): Set lang_set_decl_assembler_name.
10118 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
10120 Correct semantics restrictions checking in throw-expression.
10121 * except.c (is_admissible_throw_operand): New function.
10122 (build_throw): Use it.
10124 2001-03-14 Mark Mitchell <mark@codesourcery.com>
10126 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
10129 2001-03-14 Mark Mitchell <mark@codesourcery.com>
10131 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
10132 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
10133 * decl.c (duplicate_decls): Likewise.
10134 (builtin_function): Likewise.
10135 (build_library_fn): Likewise.
10136 (build_cp_library_fn): Likewise.
10137 (check_initializer): Likewise.
10138 (cp_finish_decl): Likewise.
10139 * decl2.c (grokfield): Likewise.
10140 (grok_function_init): Remove #if 0'd code.
10141 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
10142 * friend.c (do_friend): Likewise.
10143 * init.c (get_temp_regvar): Likewise.
10144 * method.c (make_thunk): Likewise.
10145 * pt.c (tsubst_friend_function): Likewise.
10146 (tsubst_decl): Likewise.
10147 (regenerate_decl_from_template): Likewise.
10148 * semantics.c (genrtl_named_return_value): Likewise.
10149 (expand_body): Likewise.
10150 (genrtl_finish_function): Likewise.
10151 * tree.c (cp_tree_equal): Likewise.
10153 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
10155 * call.c (convert_like_real): Add extra semantics to INNER
10156 parameter. Don't convert to temporary if a user conversion
10157 gives us an lvalue that we're about to bind to a reference.
10158 Set INNER to indicate pending reference binding on recursive
10161 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
10163 * cp/lex.c: Delete duplicate pending_lang_change.
10165 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
10167 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
10169 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
10170 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
10172 2001-03-09 Zack Weinberg <zackw@stanford.edu>
10174 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
10176 2001-03-08 Stan Shebs <shebs@apple.com>
10178 * cp-tree.h (set_identifier_local_value): Remove unused decl.
10180 2001-03-06 Zack Weinberg <zackw@stanford.edu>
10182 * spew.c: Remove references to CPP_OSTRING.
10184 2001-03-06 Andrew Haley <aph@redhat.com>
10186 * typeck.c (convert_arguments): Check that we have an fndecl.
10188 2001-03-05 Andrew Haley <aph@redhat.com>
10190 * typeck.c (convert_arguments): Don't do ellipsis conversion for
10191 __built_in_constant_p.
10193 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
10195 * typeck.c (build_static_cast): Allow enum to enum conversions
10198 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
10200 * class.c (check_field_decls): Pointers to member do not a
10201 non-pod struct make, as per DR 148.
10203 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
10205 * call.c (joust): cp_pedwarn when using gnu extension concerning
10206 worst conversion sequences.
10208 2001-03-01 Zack Weinberg <zackw@stanford.edu>
10210 * decl.c: Replace all uses of 'boolean' with 'bool'.
10212 2001-03-01 Zack Weinberg <zackw@stanford.edu>
10214 * lang-specs.h: Add zero initializer for cpp_spec field to
10215 all array elements that need one. Don't put an #ifdef inside
10216 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
10219 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
10221 Implement using decls inside template functions.
10222 * decl2.c (validate_nonmember_using_decl): Don't special case
10223 fake_std_node in the global namespace. Don't reject early when
10224 processing a template.
10225 (do_local_using_decl): Add to statement tree. Don't do further
10226 processing when building a template.
10227 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
10229 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
10231 * decl2.c (do_nonmember_using_decl): Don't complain if we find
10232 same function. Do complain about ambiguating extern "C"
10235 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
10237 Remove floating point and complex type template constant parms.
10238 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
10239 COMPLEX_TYPE extensions.
10240 (invalid_nontype_parm_type_p): Likewise.
10242 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
10244 * except.c (call_eh_info): Revert "match_function"'s type.
10246 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
10248 Fix ctor vtable vcall offsets.
10249 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
10250 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
10251 (get_matching_base): Remove.
10252 (get_original_base): New function.
10253 (build_vtbl_initializer): Initialize vid.rtti_binfo.
10254 Use a virtual thunk for a ctor vtable with an index
10255 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
10256 primary base within a constructor vtable. Only set
10257 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
10258 when primary base has been lost.
10259 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
10261 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
10263 * call.c (joust): Ensure more_specialized()'s argument length
10264 parameter has correct value for constructors.
10266 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
10268 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
10270 * decl.c (mark_inlined_fns): Prototype.
10272 2001-02-22 Mark Mitchell <mark@codesourcery.com>
10274 * spew.c (yylex): Correct handling of friends.
10276 2001-02-22 Mark Mitchell <mark@codesourcery.com>
10278 * mangle.c (write_encoding): Pass write_function_type the
10279 FUNCTION_DECL for the function being encoded.
10280 (write_function_type): Pass it along to write_bare_function_type.
10281 (write_bare_function_type): Pass it along to write_method_parms.
10282 (write_method_parms): Don't mangle the compiler-generated
10283 parameters to a constructor or destructor.
10285 2001-02-22 Andreas Jaeger <aj@suse.de>
10287 * optimize.c: Include toplev.h for
10288 note_deferral_of_defined_inline_function prototype.
10290 2001-02-22 Jakub Jelinek <jakub@redhat.com>
10292 * cp-tree.h (struct lang_decl_inlined_fns): New.
10293 (struct lang_decls): Add inlined_fns.
10294 (DECL_INLINED_FNS): New macro.
10295 * optimize.c (struct inline_data): Add inlined_fns.
10296 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
10297 (inlinable_function_p): Likewise, fix typo in comment,
10298 function is not inlinable if it already inlined function currently
10300 (expand_call_inline): Add fn to inlined_fns if necessary.
10301 (optimize_function): Initialize inlined_fns.
10302 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
10303 * decl.c (mark_inlined_fns): New function.
10304 (lang_mark_tree): Call it.
10306 2001-02-21 Jason Merrill <jason@redhat.com>
10308 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
10309 (DECL_UNINLINABLE): Move to middle-end.
10311 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
10312 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
10313 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
10314 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
10315 parms and outer BLOCK. note_deferral_of_defined_inline_function.
10317 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
10318 second parm of op=.
10320 2001-02-19 Mark Mitchell <mark@codesourcery.com>
10322 * decl2.c (set_decl_namespace): Allow explicit instantiations in
10325 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10327 * optimize.c (expand_call_inline): Don't walk subtrees of type
10330 2001-02-18 Mark Mitchell <mark@codesourcery.com>
10332 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
10335 2001-02-18 Jason Merrill <jason@redhat.com>
10337 Do put the VTT parameter in DECL_ARGUMENTS.
10338 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
10339 (current_vtt_parm): New macro.
10340 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
10341 (DECL_HAS_VTT_PARM_P): New macro.
10342 (DECL_VTT_PARM): Remove.
10343 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
10344 * decl.c (duplicate_decls): Only copy the operator code if
10346 (start_function): Set current_vtt_parm.
10347 (lang_mark_tree): Don't mark vtt_parm.
10348 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
10349 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
10350 * class.c (build_clone): Maybe remove the VTT parm.
10351 * optimize.c (maybe_clone_body): Set up the VTT parm.
10352 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
10353 * call.c (build_over_call): Just allow the VTT arg.
10354 * method.c (make_thunk): Don't set DECL_VTT_PARM.
10355 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
10356 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
10357 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
10358 * error.c (dump_function_decl): Likewise.
10359 * call.c (build_user_type_conversion_1, convert_like_real): Abort
10360 if we try to call a constructor with in-charge or VTT parms.
10361 * method.c (skip_artificial_parms_for): New fn.
10362 * call.c (add_function_candidate, build_over_call): Call it.
10363 * call.c (build_new_method_call): Use current_vtt_parm.
10364 * init.c (expand_virtual_init): Likewise.
10365 * class.c (same_signature_p): No longer static.
10366 * cp-tree.h: Declare it.
10367 * search.c (look_for_overrides_r): Use it.
10369 2001-02-17 Mark Mitchell <mark@codesourcery.com>
10371 * cp-tree.h (new_abi_rtti_p): Remove.
10372 (name_mangling_version): Likewise.
10373 (flag_do_squangling): Likewise.
10374 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
10375 * decl.c (grokfndecl): Likewise.
10376 * decl2.c (name_mangling_version): Remove.
10377 (flag_do_squangling): Likewise.
10378 (lang_f_options): Remove `squangle'.
10379 (unsupported_options): Add `squangle'.
10380 (cxx_decode_option): Issue a warning about uses of
10381 -fname-mangling-version.
10382 (finish_file): Remove old ABI support.
10383 * pt.c (check_explicit_specialization): Likewise.
10384 (tsubst_decl): Likewise.
10385 * rtti.c (init_rtti_processing): Likewise.
10386 (build_headof): Likewise.
10387 (get_tinfo_decl_dynamic): Likewise.
10388 (tinfo_from_decl): Likewise.
10389 (build_dynamic_cast_1): Likewise.
10390 (synthesize_tinfo_var): Likewise.
10391 * init.c (build_new): Allow enumeration types for the array-bounds
10392 in a direct-new-declarator.
10394 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
10396 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
10397 TREE_PROTECTED from the template being specialized.
10399 2001-02-17 Jason Merrill <jason@redhat.com>
10401 * decl2.c (build_artificial_parm): Set TREE_READONLY.
10403 * decl.c (bad_specifiers): Allow throw specs on things with
10404 pointer-to-function or -member-function type.
10405 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
10408 2001-02-17 Mark Mitchell <mark@codesourcery.com>
10410 * call.c (check_dtor_name): Handle template names correctly.
10412 2001-02-16 Jason Merrill <jason@redhat.com>
10414 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
10415 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
10416 * optimize.c (maybe_clone_body): Don't substitute it.
10417 * call.c (build_new_method_call): Check in_chrg instead.
10418 * init.c (expand_virtual_init): Likewise.
10420 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
10422 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
10423 class-type introduces at least a type-name.
10425 2001-02-16 Jakub Jelinek <jakub@redhat.com>
10427 * call.c (convert_like_real): Create a temporary for non-lvalue.
10429 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
10431 * cp-tree.h: Fix typos in comments.
10433 2001-02-16 Jason Merrill <jason@redhat.com>
10435 * optimize.c (remap_block): If we're compiling a clone, pass the
10436 new block to insert_block.
10438 2001-02-16 Mark Mitchell <mark@codesourcery.com>
10440 * semantics.c (finish_asm_stmt): Robustify.
10442 2001-02-15 Mark Mitchell <mark@codesourcery.com>
10444 * pt.c (push_template_decl_real): Don't remangle the name of a
10447 2001-02-15 Jim Meyering <meyering@lucent.com>
10449 * Make-lang.in (c++.install-common): Depend on installdirs.
10450 (c++.install-info): Likewise.
10451 (c++.install-man): Likewise.
10453 2001-02-15 Mark Mitchell <mark@codesourcery.com>
10455 * typeck2.c (build_m_component_ref): Robustify.
10457 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
10459 * friend.c (do_friend): Don't take the nested [template] class
10460 into account when deciding whether to warn about the friend
10461 function not referring to a template function.
10463 2001-02-14 Jakub Jelinek <jakub@redhat.com>
10465 * typeck.c (build_unary_op): Clarify error message.
10467 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
10469 * parse.y (component_constructor_declarator): allow optional
10470 parentheses around constructor class name.
10472 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
10474 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
10476 * init.c (emit_base_init): Remove incorrect comment about
10478 * method.c (make_thunk): Fix comment alignment.
10480 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
10482 Kill remnants of this is variable.
10483 * cp-tree.h (flag_this_is_variable): Remove.
10484 * decl2.c (flag_this_is_variable): Remove.
10485 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
10486 (build_vbase_path): The path is non-static, even in a cdtor.
10487 (resolves_to_fixed_type_p): Add additional return value.
10488 * search.c (init_vbase_pointers): Adjust.
10489 * tree.c (lvalue_p_1): Adjust.
10490 * typeck.c (mark_addressable): Adjust.
10492 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
10494 * pt.c (unify): Don't check cv quals of array types.
10496 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
10498 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
10499 check whether we already have the type.
10501 2001-02-13 Mark Mitchell <mark@codesourcery.com>
10503 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
10504 * call.c (build_op_delete_call): Simplify to remove duplicate
10506 * class.c (clone_function_decl): Don't build the deleting variant
10507 of a non-virtual destructor.
10508 * decl.c (finish_destructor_body): Don't call delete if this is a
10509 non-virtual destructor.
10510 * init.c (build_delete): Explicitly call `operator delete' when
10511 deleting an object with a non-virtual destructor.
10513 2001-02-13 Jason Merrill <jason@redhat.com>
10515 * lang-specs.h: Add more __EXCEPTIONS.
10517 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
10519 * typeck2.c (process_init_constructor): Check
10520 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
10522 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
10524 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
10525 Remove spurious information in comment. Allow further
10526 adjustments of REFERENCE_TYPE args.
10528 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
10530 * errfn.c (cp_deprecated): Tweak diagnostic text.
10531 * parse.y (new_initializer): Deprecate initializer lists
10534 2001-02-12 Mark Mitchell <mark@codesourcery.com>
10536 Remove old ABI support.
10538 2001-02-11 Mark Mitchell <mark@codesourcery.com>
10540 * decl2.c (flag_vtable_thunks): Always set it to 1.
10541 (flag_new_abi): Likewise.
10542 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
10544 * Makefile.in (g++spec.o): Fix typo.
10546 2001-02-09 Jason Merrill <jason@redhat.com>
10548 * lang-specs.h: Restore definition of __EXCEPTIONS.
10550 2001-02-08 Jason Merrill <jason@redhat.com>
10552 * search.c (shared_member_p): New function.
10553 (lookup_field_r): Use it.
10554 * cp-tree.h (SHARED_MEMBER_P): Remove.
10556 * method.c (process_overload_item): Handle template-dependent array
10558 * pt.c (type_unification_real): If we end up with undeduced nontype
10561 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
10564 * typeck2.c (friendly_abort): Don't say anything if we have
10565 earlier errors or sorries.
10567 * decl.c (check_tag_decl): Notice attempts to redefine bool and
10568 wchar_t. Ignore if in_system_header.
10570 * decl.c (maybe_push_cleanup_level): New fn...
10571 (start_decl_1): ...split out from here.
10572 * cvt.c (build_up_reference): Use it.
10573 * cp-tree.h: Declare it.
10575 2001-02-07 Mark Mitchell <mark@codesourcery.com>
10577 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
10580 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
10582 * pt.c (lookup_template_class): Make sure it's a primary
10583 template or template_template_parm when called from the parser.
10584 (instantiate_template_class): Add assertion.
10586 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
10588 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
10589 from error_mark_node.
10591 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
10593 Fix specification and implementation bugs in V3 ABI
10594 construction vtables.
10595 * cp-tree.h (flag_dump_class_layout): New flag.
10596 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
10597 (BINFO_LOST_PRIMARY_P): New flag.
10598 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
10599 (BINFO_PRIMARY_MARKED_P): Rename to ...
10600 (BINFO_PRIMARY_P): ... here.
10601 (binfo_via_virtual): New prototype.
10602 * decl2.c (flag_dump_class_layout): New flag.
10603 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
10604 use `=' as a file name separator.
10605 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
10607 (build_vtbl_address): If this is a virtual primary base, then
10608 get the vtbl of what it is ultimately primary for.
10609 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
10610 for BINFO_PRIMARY_P.
10611 (dfs_skip_nonprimary_vbases_markedp): Likewise.
10612 (get_shared_vbase_if_not_primary): Likewise.
10613 (dfs_get_pure_virtuals): Likewise.
10614 (expand_upcast_fixups): Likewise.
10615 (fixup_virtual_upcast_offsets): Likewise.
10616 (dfs_find_vbase_instance): Likewise.
10617 (find_vbase_instance): Likewise.
10618 (binfo_from_vbase): Adjust comment to reflect reality.
10619 (binfo_via_virtual): New function.
10620 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
10621 for binfo walking during VTT construction.
10622 (dfs_mark_primary_bases): Remove.
10623 (force_canonical_binfo_r): New function.
10624 (force_canonical_binfo): New function.
10625 (mark_primary_virtual_base): New function.
10626 (mark_primary_bases): Walk in inheritance graph order, use
10627 mark_primary_virtual_base.
10628 (determine_primary_base): Use some more intermediate variables.
10629 (dfs_find_final_overrider): Don't check for overriding along a
10631 (dfs_modify_vtables): Walk into primary virtual bases too.
10632 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
10633 (build_base_fields): Likewise.
10634 (dfs_set_offset_for_unshared_vbases): Likewise.
10635 (layout_virtual_bases): Likewise.
10636 (end_of_class): Likewise.
10637 (finish_struct_1): Call dump_class_hierarchy, if requested.
10638 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
10639 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
10640 (dump_class_hierarchy): Add file parameter. Append to file, if
10642 (finish_vtbls): Adjust accumulate_vtbl_inits call.
10643 Use canonical base for virtual bases.
10644 (build_vtt): Add more comments. Adjust build_vtt_inits call.
10645 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
10646 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
10647 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
10649 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
10650 from DATA. We want virtual primary bases and all bases via virtual.
10651 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
10652 virtual base when not a construction vtable.
10653 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
10654 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
10655 Use canonical bases when processing virtual bases.
10656 (accumulate_vtbl_inits): We're interested in any base via a
10658 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
10659 within a construction vtable, determine what is being overridden.
10660 (build_vtbl_initializer): Add more comments
10661 (add_vcall_offset_vtbl_entries_1): Adjust comment.
10662 (build_rtti_vtbl_entries): Check if the base has lost its
10665 2001-02-05 Mark Mitchell <mark@codesourcery.com>
10667 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
10669 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10671 * decl.c (pushdecl): Call abort instead of fatal.
10672 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
10673 * init.c (build_new_1): Likewise.
10674 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
10675 * decl.c (build_typename_type): hash_table_init now returns void.
10676 decl.c (init_decl_processing): Make an error non-fatal.
10678 2001-02-04 Mark Mitchell <mark@codesourcery.com>
10680 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
10682 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
10683 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
10684 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10685 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
10686 * decl.c (maybe_commonize_var): Use the new name-mangling where
10688 * decl2.c (comdat_linkage): Enhance comments. Make all
10689 compiler-generated things static, if COMDAT is not available.
10690 (get_tinfo_decl): Do not make typeinfo objects that belong in the
10692 (tinfo_base_init): Use the correct mangled name for typeinfo
10693 strings, and push them into the global scope.
10694 (typeinfo_in_lib_p): New function.
10695 (synthesize_tinfo_var): Use it.
10696 (create_real_tinfo_var): Likewise.
10698 2001-02-03 Jakub Jelinek <jakub@redhat.com>
10700 * decl.c (push_class_binding): Use context_for_name_lookup instead
10701 of CP_DECL_CONTEXT.
10702 * search.c (context_for_name_lookup): Remove static. Check for NULL
10703 context in the loop.
10704 * cp-tree.h (context_for_name_lookup): Add prototype.
10706 2001-02-02 Jakub Jelinek <jakub@redhat.com>
10708 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
10709 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
10711 * call.c (convert_class_to_reference, build_user_type_conversion_1,
10712 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
10714 2001-02-02 Mark Mitchell <mark@codesourcery.com>
10716 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
10717 of macros used when compiling g++spec.c.
10718 * g++spec.c (lang_specific_driver): Link with the shared
10721 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
10723 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
10724 make_reference_declarator, make_call_declarator), method.c
10725 (implicitly_declare_fn), parse.y (namespace_using_decl,
10726 notype_unqualified_id, expr_or_declarator, new_type_id,
10727 after_type_declarator, direct_after_type_declarator,
10728 notype_declarator, complex_notype_declarator,
10729 complex_direct_notype_declarator, qualified_id,
10730 notype_qualified_id, overqualified_id, direct_new_declarator,
10731 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
10732 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
10733 instead of build_parse_node.
10735 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10737 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
10738 (minus_one_node): Moved to top level gcc directory. Renamed
10739 to integer_minus_one_node.
10741 * init.c (init_init_processing): Don't set minus_one_node.
10742 (build_vec_init): Use integer_minus_one_node.
10744 * rtti.c (get_tinfo_decl_dynamic): Likewise.
10746 2001-01-28 Jakub Jelinek <jakub@redhat.com>
10748 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
10749 identical and they would be replaced with constant, remove
10750 MODIFY_EXPR from the tree.
10752 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10754 * Make-lang.in: Remove all dependencies on defaults.h.
10755 * call.c: Don't include defaults.h.
10756 * decl.c: Likewise.
10757 * decl2.c: Likewise.
10758 * except.c: Likewise.
10760 * rtti.c: Likewise.
10761 * tree.c: Likewise.
10762 * typeck.c: Likewise.
10764 2001-01-25 Jakub Jelinek <jakub@redhat.com>
10766 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
10767 operators even in "C" linkage.
10768 * method.c (set_mangled_name_for_decl): Likewise.
10769 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
10770 overloaded operators in "C" linkage.
10772 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
10774 * pt.c (tsubst_decl): Remove IN_DECL parameter.
10775 (tsubst_arg_types): Check parameter is not void.
10776 (tsubst): Adjust tsubst_decl call.
10778 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
10780 * call.c (add_builtin_candidate): Quote std properly, from
10783 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10785 * pt.c (check_explicit_specialization): Clone constructors and
10788 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
10790 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
10791 indicates anything special about template depth. Make sure we
10792 only count the user visible template classes.
10794 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
10796 * call.c (build_conv): Typo in comment.
10797 (add_builtin_candidate): Add more explanation.
10798 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
10799 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
10800 when we have enumeral types.
10801 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
10802 candidates for relops and eqops.
10803 (joust): Simplify control flow. Allow a non-template user
10804 function to hide a builtin.
10806 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
10808 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
10809 (more_specialized): Add deduction parameter.
10810 * call.c (joust): Adjust more_specialized call.
10811 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
10812 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
10813 (get_bindings_order): Remove.
10814 (get_bindings_real): Add DEDUCE parameter.
10815 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
10816 REFERENCE_TYPE jig for DEDUCE_ORDER.
10817 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
10818 maybe_adjust_types_for_deduction.
10819 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
10821 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
10822 (check_cv_quals_for_unify): Use new unify qualifier flags.
10823 (unify): Clear new unify qualifier flags.
10824 (get_bindings_real): Add DEDUCE parameter.
10825 (get_bindings): Adjust call to get_bindings_real.
10826 (get_bindings_overload): Likewise.
10827 (most_specialized_instantiation): Adjust call to
10830 2001-01-19 Jason Merrill <jason@redhat.com>
10832 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
10834 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
10837 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
10839 * decl2.c (arg_assoc_class): Fix double iteration logic.
10841 2001-01-19 Jason Merrill <jason@redhat.com>
10843 * init.c (build_delete): Always call convert_force to strip cv-quals.
10845 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
10846 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
10847 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
10849 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
10851 * search.c (get_vbase_1): Count only virtual bases.
10853 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
10855 * class.c (duplicate_tag_error): Robustify flag clearing.
10857 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
10859 * cp-tree.h (lookup_template_class): Add complain parm.
10860 * decl.c (lookup_namespace_name): Adjust call to
10861 lookup_template_class.
10862 (make_typename_type): Likewise.
10863 * semantics.c (finish_template_type): Likewise.
10864 * pt.c (lookup_template_class): Add complain parm. Adjust.
10865 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
10866 (tsubst): Likewise.
10868 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
10870 * pt.c (copy_default_args_to_explicit_spec): Preserve
10871 object's CV quals. Reorganize.
10873 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
10875 * typeck.c (build_modify_expr): Say `initialization' for
10877 * init.c (build_default_init): Convert to enumeral type, if
10880 2001-01-18 Jakub Jelinek <jakub@redhat.com>
10882 * parse.y (nomods_initdcl0): Properly set things up for
10885 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
10887 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
10888 (type_unification_real): Set it.
10891 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
10893 * decl.c (finish_destructor_body): Convert to vbase pointer here.
10895 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
10897 * semantics.c (begin_class_definition): Check we're not inside a
10898 template parm list.
10900 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
10902 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
10905 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10907 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
10908 * call.c (build_over_call): Add comment.
10910 2001-01-16 Daniel Berlin <dberlin@redhat.com>
10912 * cvt.c (ocp_convert): Handle vector type conversion
10913 * typeck2.c (digest_init): Handle vector type initializations
10915 2001-01-16 Phil Edwards <pme@sources.redhat.com>
10917 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
10920 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
10922 * pt.c (check_nontype_parm): Rename to ...
10923 (invalid_nontype_parm_type_p): ... here.
10924 (process_template_parm): Adjust.
10925 (convert_template_argument): Adjust.
10927 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
10929 * pt.c (check_nontype_parm): New function.
10930 (process_template_parm): Use it.
10931 (convert_template_argument): Use it.
10932 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
10935 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
10937 * tree.c: Add defaults.h
10938 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
10939 * Make-lang.in (cp/tree.o): Add defaults.h.
10941 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
10943 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
10945 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
10947 * g++.1: Change to be ".so man1/gcc.1".
10949 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
10951 * Make-lang.in (c++.info, c++.install-info): Build and install g++
10953 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
10954 ($(srcdir)/cp/g++int.info): New target.
10955 * gxxint.texi: Add info directory entry. Use @@ in email address.
10956 * .cvsignore: Update.
10958 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
10960 * typeck.c (build_c_cast): Do template processing earlier.
10961 Always pedwarn on array casts.
10963 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
10965 * friend.c (make_friend_class): Make sure a templated class is
10966 actually a template.
10968 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
10970 * decl2.c (get_guard): Set linkage from guarded decl.
10972 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
10974 * call.c (convert_default_arg): Check for unprocessed
10976 * cp-tree.h (replace_defarg): Move to spew.c.
10977 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
10978 spew.c, which is where they really are.
10979 (done_pending_defargs): Declare.
10980 (unprocessed_defarg_fn): Declare.
10981 * decl.c (replace_defarg): Move to spew.c
10982 * parse.y (structsp): Call done_pending_defargs.
10983 * spew.c (defarg_fns): Rearrange list structure.
10984 (defarg_fnsdone): New static variable.
10985 (defarg_depfns): New static variable.
10986 (init_spew): Adjust.
10987 (add_defarg_fn): Store the type in TREE_TYPE.
10988 (do_pending_defargs): Detect and deal with ordering constraints
10990 (done_pending_defargs): New function.
10991 (unprocessed_defarg_fn): New function.
10992 (replace_defarg): Moved from decl.c. Robustify. Don't save
10993 if circularity detected.
10995 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
10997 * pt.c (unify): Check array has a domain, before checking
10998 whether it is variable sized.
11000 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
11002 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
11003 parameters with pointers to arrays of unknown bound.
11005 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
11007 * parse.y (template_parm_header, template_spec_header): New
11008 reductions. Split out from ...
11009 (template_header): ... here. Use them.
11010 (template_template_parm): Use template_parm_header.
11011 * semantics.c (finish_template_template_parm): Add assert.
11013 2001-01-10 Mark Mitchell <mark@codesourcery.com>
11015 * mangle.c (write_builtin_type): Fix thinko.
11017 * pt.c (copy_default_args_to_explicit_spec_1): New function.
11018 (copy_default_args_to_explicit_spec): Likewise.
11019 (check_explicit_specialization): Use it.
11021 * class.c (finish_struct_1): Remove last argument in call to
11022 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
11023 * decl.c (builtin_function): Likewise.
11024 (build_cp_library_fn): Likewise.
11025 (check_initializer): Likewise.
11026 (make_rtl_for_nonlocal_decl): Likewise.
11027 (cp_finish_decl): Likewise.
11028 (start_function): Likewise.
11029 * decl2.c (finish_anon_union): Likewise.
11030 * friend.c (do_friend): Likewise.
11031 * init.c (build_java_class_ref): Likewise.
11032 * method.c (make_thunk): Likewise.
11033 * pt.c (tsubst_friend_function): Likewise.
11034 * semantics.c (expand_body): Likewise.
11036 2001-01-10 Mark Mitchell <mark@codesourcery.com>
11038 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
11039 looking at DECL_CLONED_FUNCTION for non-functions.
11041 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
11043 * error.c (dump_template_parameter): Use parm to determine how
11044 to print default value.
11046 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
11048 * class.c (duplicate_tag_error): Clear more flags.
11050 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
11052 * call.c (build_new_method_call): Use binfo_for_vbase.
11054 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
11056 * cp-tree.h (flag_cond_mismatch): Don't declare.
11057 * decl2.c (flag_cond_mismatch): Don't define.
11058 (lang_f_options): Remove cond-mismatch.
11059 (unsupported_options): Add cond-mismatch.
11061 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
11063 * class.c (handle_using_decl): Reject using of constructor name
11064 of sourcing class. Allow injecting of a method with same name as
11065 nested class. Fixup error messages.
11067 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
11069 * decl2.c (lang_decode_option): Handle -Wformat=2.
11071 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
11073 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
11074 initialized_in_class.
11075 (DECL_DEFINED_IN_CLASS_P): Rename to ...
11076 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
11077 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
11078 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
11079 * pt.c (check_default_tmpl_args): Adjust for
11080 DECL_INITIALIZED_IN_CLASS_P.
11081 (instantiate_class_template): Likewise.
11082 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
11084 * class.c (finish_struct): Constify saved_filename.
11086 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
11088 * class.c (duplicate_tag_error): Adjust diagnostic.
11089 (finish_struct): Locally set location to start of struct.
11090 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
11092 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
11094 * decl.c (struct binding_level): Adjust class_shadowed comments
11095 to reflect reality.
11096 (push_class_level_binding): Adjust comments to reflect reality.
11097 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
11098 Don't set TREE_VALUE on the class_shadowed list.
11100 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
11102 * decl2.c (acceptable_java_type): Allow references too.
11103 * init.c (build_java_class_ref): When using the new ABI, search
11104 `class$' and have it mangled with `mangle_decl.'
11105 * mangle.c (write_java_integer_type_codes): New function.
11106 (write_builtin_type): Detect and mangle Java integer and real
11109 2001-01-07 Mark Mitchell <mark@codesourcery.com>
11111 * decl2.c (grokfield): Don't accept `asm' specifiers for
11112 non-static data members.
11114 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11116 * expr.c (cplus_expand_expr): Don't reset `target'.
11118 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
11120 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
11122 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
11124 * parse.y (template_datadef): Check for error_mark_node.
11126 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
11128 * cp-tree.def (DEFAULT_ARG): Make `x' class.
11130 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
11132 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
11133 (record_builtin_type): Make non-static.
11134 (flag_short_double): Don't declare.
11135 (init_decl_processing): Remove the creation of many tree nodes now
11136 in c_common_nodes_and_builtins.
11137 (build_void_list_node): New function.
11138 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
11139 * cp-tree.h (flag_short_wchar): Don't declare.
11141 2001-01-04 Mark Mitchell <mark@codesourcery.com>
11143 * call.c (build_conv): Don't use build1 for USER_CONV.
11144 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
11146 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
11148 * lex.c (lang_init): Call c_common_lang_init.
11150 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
11152 * search.c (lookup_fnfields_here): Remove.
11153 (look_for_overrides_r): Use lookup_fnfields_1.
11154 Ignore functions from using declarations.
11156 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
11158 Implement exceptions specifiers for implicit member functions.
11159 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
11160 * method.c (synthesize_exception_spec): New function.
11161 (locate_dtor, locate_ctor, locate_copy): New functions.
11162 (implicitly_declare_fn): Generate the exception spec too.
11163 * search.c (check_final_overrider): Check artificial functions
11165 * typeck2.c (merge_exception_specifiers): New function.
11167 2001-01-03 Jason Merrill <jason@redhat.com>
11169 * init.c (build_default_init): New fn.
11170 (perform_member_init): Split out from here.
11171 (build_new_1): Use it. Simplify initialization logic.
11172 (build_vec_init): Take an array, rather than a pointer and maxindex.
11173 Speed up simple initializations. Don't clean up if we're assigning.
11174 * cp-tree.h: Adjust.
11175 * decl2.c (do_static_initialization): Remove TREE_VEC case.
11176 * parse.y (new_initializer): Return void_zero_node for ().
11177 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
11178 * typeck2.c (digest_init): Only complain about user-written
11181 2000-12-22 Mike Stump <mrs@wrs.com>
11183 * decl2.c: (max_tinst_depth): Increase to 50.
11185 2001-01-02 Mark Mitchell <mark@codesourcery.com>
11187 * class.c (invalidate_class_lookup_cache): Zero the
11188 previous_class_values.
11189 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
11191 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
11192 * decl.c (free_bindings): New variable.
11193 (push_binding): Don't create a new binding if we have one on the
11195 (pop_binding): Put old bindings on the free list.
11196 (init_decl_processing): Use size_int, not build_int_2.
11197 Register free_bindings as a GC root.
11198 (cp_make_fname_decl): Use size_int, not build_int_2.
11199 (push_inline_template_parms_recursive): Likewise.
11200 (end_template_parm_list): Likewise.
11201 (for_each_template_parm): Do not use walk_tree_without_duplicates.
11202 (tsubst_template_parms): Use size_int, not build_int_2.
11203 (tsubst): Likewise.
11204 * rtti.c (get_vmi_pseudo_type_info): Likewise.
11206 2001-01-02 Richard Henderson <rth@redhat.com>
11208 * parse.y (asm): Set ASM_INPUT_P.
11210 2001-01-02 Jason Merrill <jason@redhat.com>
11212 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
11215 * typeck.c (cp_truthvalue_conversion): New fn.
11216 * cvt.c (ocp_convert): Use it.
11218 * cp-tree.h: Lose c-common.c decls.
11220 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
11221 * cvt.c (convert_to_void): Use type_unknown_p.
11223 * typeck.c (strip_all_pointer_quals): Also strip quals from
11224 pointer-to-member types.
11226 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
11229 * call.c (build_new_method_call): Do evaluate the object parameter
11230 when accessing a static member.
11231 * typeck.c (build_component_ref): Likewise.
11233 2001-01-02 Andreas Jaeger <aj@suse.de>
11235 * decl.c (cp_missing_noreturn_ok_p): New.
11236 (init_decl_processing): Set lang_missing_noreturn_ok_p.
11238 2000-12-29 Jakub Jelinek <jakub@redhat.com>
11240 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
11242 2000-12-29 Mark Mitchell <mark@codesourcery.com>
11244 * class.c (pushclass): Remove #if 0'd code.
11245 * cp-tree.h (overload_template_name): Remove.
11246 * decl.c (store_bindings): Simplify.
11247 (pop_from_top_level): Likewise.
11248 * pt.c (overload_template_name): Remove.
11249 (instantiate_decl): Don't call push_to_top_level if it's not
11252 2000-12-28 Mark Mitchell <mark@codesourcery.com>
11254 * pt.c (register_local_specialization): Don't return a value.
11255 (lookup_template_class): Use move-to-front heuristic when looking
11256 up template instantiations.
11257 (instantiate_decl): Only push_to_top_level when we're actually
11258 going to instantiate the template.
11260 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
11262 * search.c (binfo_for_vtable): Return least derived class, not
11263 most. Handle secondary vtables.
11265 2000-12-22 Jason Merrill <jason@redhat.com>
11267 * pt.c (more_specialized): Don't optimize len==0.
11268 (fn_type_unification): If we're adding the return type, increase len.
11270 * typeck.c (build_binary_op): Fix pmf comparison logic.
11272 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
11273 DECL_STATIC_FUNCTION_P.
11275 * semantics.c (genrtl_finish_function): Don't try to jump to
11276 return_label unless it exists.
11278 In partial ordering for a call, ignore parms for which we don't have
11280 * call.c (joust): Pass len to more_specialized.
11281 (add_template_candidate_real): Strip 'this', pass len.
11282 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
11283 (get_bindings_order): New fn. Pass len down.
11284 (get_bindings_real): Strip 'this', pass len.
11285 (fn_type_unification): Likewise.
11286 (type_unification_real): Succeed after checking 'len' args.
11287 (most_specialized_instantiation): Lose explicit_args parm.
11288 * class.c (resolve_address_of_overloaded_function): Strip 'this',
11291 2000-12-21 Jason Merrill <jason@redhat.com>
11293 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
11294 DECL_TEMPLATE_RESULT.
11296 * search.c (lookup_field_r): Call lookup_fnfields_1, not
11297 lookup_fnfields_here.
11299 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
11301 * call.c (build_object_call): Also allow conversions that return
11302 reference to pointer to function.
11303 (add_conv_candidate): Handle totype being ref to ptr to fn.
11304 (build_field_call): Also allow members of type reference to function.
11305 Lose support for calling pointer to METHOD_TYPE fields.
11307 * error.c (dump_expr): Handle *_CAST_EXPR.
11309 * typeck2.c (build_scoped_ref): Always convert to the naming class.
11311 * tree.c (break_out_cleanups): Lose.
11312 * cp-tree.h: Remove prototype.
11313 * typeck.c (build_component_ref): Don't break_out_cleanups.
11314 (build_compound_expr): Likewise.
11315 * semantics.c (finish_expr_stmt): Likewise.
11317 2000-12-20 Richard Henderson <rth@redhat.com>
11319 * cp-tree.h: Update declarations.
11320 * decl.c (finish_case_label): Return the new stmt node.
11321 * semantics.c (finish_goto_stmt): Likewise.
11322 (finish_expr_stmt, finish_return_stmt): Likewise.
11323 (finish_break_stmt, finish_continue_stmt): Likewise.
11324 (finish_asm_stmt): Likewise.
11325 * parse.y (already_scoped_stmt): Set STMT_LINENO.
11326 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
11327 (simple_if, simple_stmt): Return the new stmt node.
11328 (save_lineno): New.
11330 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
11332 * cp-tree.h: Don't declare warn_long_long.
11334 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11336 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
11339 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11341 * pt.c (unify): Handle when both ARG and PARM are
11342 BOUND_TEMPLATE_TEMPLATE_PARM.
11344 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11346 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
11347 DECL_TEMPLATE_PARM_P.
11349 2000-12-15 Jason Merrill <jason@redhat.com>
11351 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
11353 * init.c (build_new_1): Don't strip quals from type.
11355 * decl.c (pushdecl): Don't check for linkage on a non-decl.
11357 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
11359 * call.c (build_new_function_call): Lose space before paren in
11361 (build_new_method_call): Likewise.
11363 * typeck2.c (build_m_component_ref): Propagate quals from datum.
11365 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11367 * pt.c (check_explicit_specialization): Propagate default
11368 function arguments to explicit specializations.
11370 2000-12-13 DJ Delorie <dj@redhat.com>
11372 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
11375 2000-12-08 Jason Merrill <jason@redhat.com>
11377 * error.c (dump_function_name): Don't let the user see __comp_ctor.
11379 Clean up copy-initialization in overloading code.
11380 * call.c (build_user_type_conversion_1): Die if we are asked to
11381 convert to the same or a base type.
11382 (implicit_conversion): Avoid doing so. Lose reference binding code.
11383 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
11384 direct-initialization. Also do direct-init part of copy-init.
11385 (build_user_type_conversion): Don't provide context to convert_like.
11386 * cvt.c (ocp_convert): build_user_type_conversion will now provide
11387 the constructor call for copy-init.
11389 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
11390 instantiation of a member template.
11391 (do_decl_instantiation): Not here.
11393 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
11395 * class.c (check_field_decls): Don't special case anonymous
11396 fields in error messages.
11397 (note_name_declared_in_class): Use %D on diagnostic.
11399 * tree.c (pod_type_p): Use strip_array_types.
11400 (cp_valid_lang_attribute): Likewise.
11401 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
11402 multiple evaluations.
11403 (cp_has_mutable_p): Use strip_array_types.
11405 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
11407 * cp-tree.h (sufficient_parms_p): Declare new function.
11408 * call.c (sufficient_parms_p): New function, broken out of ...
11409 (add_function_candidate): ... here. Use it.
11410 (add_conv_candidate): Use it.
11411 * decl.c (grok_ctor_properties): Use it.
11413 2000-12-07 Jakub Jelinek <jakub@redhat.com>
11415 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
11417 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
11419 * decl2.c (lang_decode_option): Handle -Wformat-security.
11421 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11423 * pt.c (verify_class_unification): New function.
11424 (get_class_bindings): Use it.
11425 (try_class_unification): Tidy.
11426 (unify): Handle when argument of a template-id is not
11427 template parameter dependent.
11428 (template_args_equal): Handle when TREE_CODE's do not match.
11430 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
11432 * lang-specs.h (c++): When invoking the stand-alone preprocessor
11433 for -save-temps, pass all relevant -Defines to it, and then don't
11434 pass them to cc1plus.
11436 2000-12-05 Will Cohen <wcohen@redhat.com>
11438 * decl.c (finish_case_label): Cleared
11439 more_cleanups_ok in surrounding function scopes.
11440 (define_label): Likewise.
11442 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
11444 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
11445 (get_matching_virtual): Remove.
11446 (look_for_overrides): Declare new function.
11447 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
11449 * class.c (check_for_override): Move base class iteration code
11450 to look_for_overrides.
11451 * search.c (next_baselink): Remove.
11452 (get_virtuals_named_this): Remove.
11453 (get_virtual_destructor): Remove.
11454 (tree_has_any_destructors_p): Remove.
11455 (struct gvnt_info): Remove.
11456 (check_final_overrider): Remove `virtual' from error messages.
11457 (get_matching_virtuals): Remove. Move functionality to ...
11458 (look_for_overrides): ... here, and ...
11459 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
11462 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
11464 * typeck.c (get_delta_difference): If via a virtual base,
11466 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
11469 2000-12-04 Richard Henderson <rth@redhat.com>
11471 * error.c (dump_tree): Use output_add_string not OB_PUTS.
11473 2000-12-04 Jason Merrill <jason@redhat.com>
11475 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
11476 (write_builtin_type): Pass intSI_type_node and the like through
11478 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
11479 Pass intSI_type_node and the like through type_for_mode.
11480 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
11481 * pt.c (tsubst, unify): Likewise.
11482 * tree.c (walk_tree): Likewise.
11483 * error.c (dump_type): Likewise.
11484 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
11486 * Make-lang.in: Tweak top comment for emacs.
11487 (cp/TAGS): Restore.
11489 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
11491 * class.c (clone_function_decl): Robustify.
11493 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
11495 * decl.c (store_bindings): Only search in the non modified
11496 old_bindings for duplicates.
11498 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
11500 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
11501 TYPE_POLYMORPHIC_P.
11503 * typeck.c (build_static_cast): Remove unused variable.
11505 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11507 * pt.c: Fix typo in comment.
11509 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
11511 * decl2.c (warn_format): Remove definition.
11512 (lang_decode_option): Handle -Wformat-nonliteral,
11513 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
11515 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
11517 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
11518 (init_decl_processing): Don't create string_type_node,
11519 const_string_type_node, wint_type_node, intmax_type_node,
11520 uintmax_type_node, default_function_type, ptrdiff_type_node and
11521 unsigned_ptrdiff_type_node. Adjust position of call to
11522 c_common_nodes_and_builtins.
11523 (identifier_global_value): New function.
11525 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
11527 * call.c (standard_conversion): Reject pointer to member
11528 conversions from ambiguous, inaccessible or virtual bases.
11529 * typeck.c (build_static_cast): Don't check pointers to members
11532 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
11534 * method.c (do_build_copy_constructor): Preserve cv
11535 qualifications when accessing source object members.
11536 (do_build_assign_ref): Likewise. Remove separate diagnostics for
11539 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
11541 * method.c (do_build_assign_ref): Construct appropriately
11542 CV-qualified base reference. Don't allow const casts in base
11545 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
11547 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
11548 incomplete return type.
11550 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
11552 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
11553 * semantics.c (finish_base_specifier): Accept a _TYPE not a
11556 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
11558 * spew.c (yyerror): Cope if yylval.ttype is NULL.
11560 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
11562 * decl.c (grokdeclarator): Diagnose undefined template contexts.
11564 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
11566 * decl.c (grokdeclarator): Do type access control on friend
11569 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
11571 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
11572 bison parser ickiness.
11573 * pt.c (tsubst_friend_function): Enter namespace scope when
11574 tsubsting the function name.
11575 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
11577 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
11579 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
11580 * cvt.c (cp_convert_to_pointer): Add force parameter.
11581 Allow conversions via virtual base if forced.
11582 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
11583 (ocp_convert): Likewise.
11584 * search.c (binfo_from_vbase): Return the virtual base's binfo.
11585 * typeck.c (get_delta_difference): Adjust handling of virtual
11588 2000-11-26 Mark Mitchell <mark@codesourcery.com>
11590 * tree.c (struct list_hash): Remove.
11591 (list_hash_table): Make it be an htab.
11592 (struct list_proxy): New type.
11593 (list_hash_eq): New function.
11594 (list_hash_pieces): Renamed from ...
11595 (list_hash): ... this.
11596 (list_hash_lookup): Remove.
11597 (list_hash_add): Remove.
11598 (hash_tree_cons): Use the generic hashtable.
11599 (mark_list_hash): Remove.
11600 (init_tree): Create the hashtable.
11602 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
11604 * method.c (build_mangled_C9x_name): Rename to
11605 build_mangled_C99_name. Change C9X references in comments to
11608 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
11610 * parse.y (unary_expr): Move VA_ARG from here ...
11611 (primary): ... to here.
11613 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
11615 * semantics.c (finish_id_expr): If type is error_mark, return
11618 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
11620 * pt.c (lookup_template_class): Simplify loop exit constructs.
11621 Cope when there is no partial instantiation of a template
11624 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
11626 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
11628 2000-11-22 Mark Mitchell <mark@codesourcery.com>
11630 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
11633 * pt.c (do_decl_instantiate): Explicitly clone constructors and
11634 destructors that haven't already been cloned.
11636 2000-11-20 Richard Henderson <rth@redhat.com>
11638 * parse.y (yyparse_1): Rename the parser entry point.
11640 2000-11-20 Alex Samuel <samuel@codesourcery.com>
11642 * mangle.c (write_name): Use <unscoped-name> for names directly in
11644 (write_unscoped_name): Accept names directly in function scope.
11646 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
11648 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
11649 * parse.y (extdef): Add EXPORT reduction.
11650 * spew.c (yylex): Don't skip export here.
11652 2000-11-19 Mark Mitchell <mark@codesourcery.com>
11654 * decl.c (init_decl_processing): Correct name of pure virtual
11655 function under the new ABI.
11656 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
11657 (throw_bad_typeid): Likewise for bad typeid function.
11659 2000-11-18 Mark Mitchell <mark@codesourcery.com>
11661 * decl.c (grokparms): Don't even function types of `void' type,
11663 * mangle.c (write_type): Don't crash when confronted with the
11666 * decl.c (grokparms): Don't create parameters of `void' type.
11668 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
11670 * lex.c (mark_impl_file_chain): Delete.
11671 (init_parse): Remove call to ggc_add_string_root. No need to
11672 ggc_strdup a string constant. Do not add impl_file_chain to GC
11674 (handle_pragma_implementation): No need to ggc_strdup main_filename.
11676 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
11678 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
11680 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
11682 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
11683 * decl.c (grokdeclarator): Don't reject void parms here.
11684 (require_complete_types_for_parms): Simplify, use
11685 complete_type_or_else.
11686 (grokparms): Remove bitrot. Remove funcdef parm.
11687 Deal with ellipsis parm lists here.
11688 * semantics.c (finish_parmlist): Don't append void_list_node
11689 here. Set PARMLIST_ELLIPSIS_P.
11691 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
11693 * typeck2.c (incomplete_type_error): Reorganize to avoid
11694 excessive diagnostics.
11696 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
11698 * lex.c (struct impl_files, internal_filename): Constify a char *.
11700 2000-11-16 Mark Mitchell <mark@codesourcery.com>
11702 * mangle.c (write_special_name_constructor): Don't generate
11703 assembler junk when confronted with an old-style constructor.
11704 (write_special_name_destructor): Likewise.
11705 (mangle_decl_string): Do it here instead.
11707 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
11709 * call.c (op_error): Make error messages clearer.
11711 2000-11-15 Mark Mitchell <mark@codesourcery.com>
11713 * decl.c (wrapup_globals_for_namespace): Don't mark things
11714 TREE_ASM_WRITTEN when they're not.
11716 2000-11-15 Jason Merrill <jason@redhat.com>
11718 * typeck2.c (friendly_abort): Uncount the error before handing
11719 off to fancy_abort.
11721 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
11723 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
11725 2000-11-14 Mark Mitchell <mark@codesourcery.com>
11727 * class.c (build_vtbl_initializer): Fix typo in comment.
11728 * typeck.c (expr_sizeof): Don't crash on errors.
11730 2000-11-14 Jim Wilson <wilson@redhat.com>
11732 * lang-specs.h: Add %2 after %(cc1_options).
11734 2000-11-14 Richard Henderson <rth@redhat.com>
11736 * typeck.c (c_sizeof): Be strict about casting result value
11737 back to c_size_type_node.
11738 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
11740 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
11742 * typeck.c (build_unary_op): Use boolean_increment from
11743 c-common.c, moving the relevant code there.
11745 2000-11-11 Jason Merrill <jason@redhat.com>
11747 * typeck.c (mark_addressable): Don't call put_var_into_stack.
11749 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
11752 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11754 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
11755 * lex.c (copy_lang_decl): Likewise.
11757 2000-11-09 Mark Mitchell <mark@codesourcery.com>
11759 * dump.c (cp_dump_tree): Don't dump function bodies here.
11761 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
11762 (dump.o): Update dependency list.
11763 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
11764 (flag_dump_translation_unit): Likewise.
11765 (CP_TYPE_QUALS): Adjust definition.
11766 (DECL_C_BIT_FIELD): Remove.
11767 (SET_DECL_C_BIT_FIELD): Likewise.
11768 (CLEAR_DECL_C_BIT_FIELD): Likewise.
11769 (add_maybe_template): Likewise.
11770 (strip_array_types): Likewise.
11771 (dump_node_to_file): Likewise.
11772 (cp_dump_tree): New function.
11773 * decl.c (init_decl_processing): Set lang_dump_tree.
11774 * decl2.c (flag_dump_translation_unit): Remove.
11775 * dump.c: Move most of it to ../c-dump.c.
11776 (cp_dump_tree): New function.
11777 * pt.c (add_maybe_template): Remove.
11778 * typeck.c (strip_array_types): Likewise.
11780 2000-11-07 Eric Christopher <echristo@redhat.com>
11782 * decl.c (init_decl_processing): Change definition of
11783 __wchar_t to wchar_t. Remove artificial declaration of
11785 * lex.c: Change instances of __wchar_t to wchar_t.
11787 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
11789 * lex.c (do_identifier): Don't lookup_name for operators.
11790 * parse.y (operator): Save looking_for_typename.
11791 (unoperator): Restore it.
11792 * spew.c (frob_opname): Use nth_token for lookahead.
11794 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
11796 * decl.c (grok_op_properties): Always use coerce_new_type and
11797 coerce_delete_type.
11798 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
11799 exception specification. Tidy up.
11800 (coerce_delete_type): Preserve exception specification. Tidy up.
11802 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
11804 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
11805 (push_binding_level), error.c (cp_tree_printer), pt.c
11806 (process_partial_specialization, tsubst_template_arg_vector),
11807 search.c (lookup_member): Use memset () instead of bzero ().
11809 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
11811 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
11813 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
11815 * Make-lang.in (c++.distdir): Remove.
11817 2000-11-04 Mark Mitchell <mark@codesourcery.com>
11819 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
11820 declarations from different namespaces to be combined.
11822 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
11824 * decl.c: Include tm_p.h.
11826 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
11828 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
11830 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
11832 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
11833 (build_overload_value), repo.c (open_repo_file), xref.c
11834 (open_xref_file): Use strchr () and strrchr () instead of index ()
11837 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
11839 * call.c (build_over_call): Call fold on the CALL_EXPR.
11841 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
11843 * error.c (dump_template_decl): Separate template hearders with
11846 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
11848 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
11849 TS_* flags with corresponding TFF_*. Adjust prototypes of
11850 functions (which used to take a tree_string_flags) to take an int.
11852 * cp-tree.h (enum tree_string_flags): Remove
11853 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
11854 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
11855 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
11856 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
11857 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
11858 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
11859 (type_as_string, decl_as_string, expr_as_string,
11860 context_as_string): Adjust prototype.
11862 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
11863 instead of TS_PLAIN.
11865 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
11866 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
11869 2000-10-30 Mark Mitchell <mark@codesourcery.com>
11871 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
11872 (linkage_kind): New enumeration.
11873 (decl_linkage): New function.
11874 * decl2.c (comdat_linkage): Extend comment.
11875 * error.c (dump_function_decl): Print the arguments used to
11876 instantiate a template, even when not printing the type of the
11878 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
11879 not TREE_PUBLIC, to test for external linkage.
11880 * tree.c (decl_linkage): New function.
11882 2000-10-28 Mark Mitchell <mark@codesourcery.com>
11884 * pt.c (instantiate_decl): Always instantiate static data members
11885 initialized in-class.
11887 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
11889 * Make-lang.in: Move all build rules here from Makefile.in,
11890 adapt to new context. Wrap all rules that change the current
11891 directory in parentheses. Expunge all references to $(P).
11892 When one command depends on another and they're run all at
11893 once, use && to separate them, not ;. Add OUTPUT_OPTION to
11894 all object-file generation rules. Delete obsolete variables.
11896 * Makefile.in: Delete.
11897 * config-lang.in: Delete outputs= line.
11899 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
11901 * error.c (dump_function_decl): Print no space between
11902 `ptr-operator' the `type-specifier' of the return type.
11903 (dump_type_prefix): Make sure we put space at the appropriate
11906 2000-10-23 Jason Merrill <jason@redhat.com>
11908 * call.c (equal_functions): Also call decls_match for extern "C" fns.
11910 2000-10-22 Jason Merrill <jason@redhat.com>
11912 * call.c (build_conditional_expr): Use ocp_convert to force
11915 2000-10-22 Mark Mitchell <mark@codesourcery.com>
11917 * call.c (standard_conversion): Use RVALUE_CONVs for all
11918 expressions that satisfy lvalue_p, not just those that satisfy
11921 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
11923 * typeck.c (c_sizeof): Return an expression of `size_t' type,
11924 not one with TYPE_IS_SIZETYPE set.
11925 (dubious_conversion_warnings): Remove special-case code.
11927 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
11929 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
11930 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
11931 (dump_type_prefix): Print vector-of-int as 'int vector'.
11932 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
11933 * tree.c (walk_tree): Handle VECTOR_TYPE.
11935 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
11937 2000-10-21 Jason Merrill <jason@redhat.com>
11939 * parse.y (operator): Set got_object from got_scope.
11940 Set looking_for_typename.
11941 * decl.c (lookup_name_real): Clear val after setting from_obj.
11942 Reorganize diagnostic.
11944 2000-10-20 Jason Merrill <jason@redhat.com>
11946 * tree.c (walk_tree): Don't walk into default args.
11948 * error.c (dump_expr): Use host_integerp.
11950 2000-10-20 David Edelsohn <edelsohn@gnu.org>
11952 * typeck2.c (abstract_virtuals_error): Use "because" instead of
11953 "since" in error message.
11955 2000-10-20 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11957 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
11959 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
11961 * decl.c (revert_static_member_fn): Fixed typo.
11963 2000-10-19 Mark Mitchell <mark@codesourcery.com>
11965 * class.c (subobject_offset_fn): New type.
11966 (dfs_record_base_offsets): Remove.
11967 (record_base_offsets): Likewise.
11968 (dfs_search_base_offsets): Likewise.
11969 (record_subobject_offset): New function.
11970 (check_subobject_offset): Likewise.
11971 (walk_subobject_offsets): Likewise.
11972 (record_subobject_offsets): Likewise.
11973 (layout_conflict_p): Reimplement.
11974 (layout_nonempty_base_or_field): Correct handling of type
11975 conflicts during layout.
11976 (layout_empty_base): Likewise.
11977 (build_base_field): Adjust to handle new representation of empty
11979 (build_base_fields): Likewise.
11980 (layout_virtual_bases): Likewise.
11981 (splay_tree_compare_integer_csts): New function.
11982 (layout_class_type): Use a splay_tree, rather than a varray, to
11983 represent the offsets of empty bases.
11985 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
11986 * decl.c (select_decl): Don't return declarations that are
11989 2000-10-18 Mark Mitchell <mark@codesourcery.com>
11991 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
11992 (fake_std_node): New macro.
11993 * decl.c (in_std): Rename to ...
11994 (in_fake_std): ... this.
11995 (flag_no_builtin): Remove.
11996 (flag_no_nonansi_builtin): Likewise.
11997 (walk_namespaces_r): Use fake_std_node.
11998 (push_namespace): Use std_identifier.
11999 (pop_namespace): Use in_fake_std.
12000 (lookup_name_real): Use fake_std_node.
12001 (init_decl_processing): When -fhonor-std, create the `std'
12002 namespace. Don't create a dummy fake_std_node in that case.
12003 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
12004 (builtin_function): Put builtins whose names don't begin
12005 with `_' in the std namespace.
12006 * decl2.c (flag_no_builtin): Remove.
12007 (flag_no_nonansi_builtin): Likewise.
12008 (set_decl_namespace): Use fake_std_node.
12009 (validate_nonmember_using_decl): Likewise.
12010 (do_using_directive): Likewise.
12011 (handle_class_head): Likewise.
12012 * dump.c (dequeue_and_dump): Likewise.
12013 * except.c (init_exception_processing): Use std_identifier.
12014 * init.c (build_member_call): Use fake_std_node.
12015 * rtti.c (init_rtti_processing): Use std_identifier.
12017 2000-10-17 Mark Mitchell <mark@codesourcery.com>
12019 * cp-tree.h (back_end_hook): Remove declaration.
12020 * decl2.c (back_end_hook): Remove definition.
12022 * dump.c (dequeue_and_dump): Dump TREE_USED.
12024 2000-10-17 Brad Lucier <lucier@math.purdue.edu>
12026 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
12028 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
12030 * decl.c (WINT_TYPE): Define.
12031 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
12032 c_size_type_node, signed_size_type_node and wint_type_node.
12034 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
12036 * decl2.c (warn_missing_format_attribute): New variable.
12037 (lang_decode_option): Decode -Wmissing-format-attribute.
12039 2000-10-16 Mark Mitchell <mark@codesourcery.com>
12041 * typeck.c (qualify_type): Remove.
12042 (composite_pointer_type): Fix handling of conversions to `cv void*'.
12044 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12046 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
12048 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12050 * Makefile.in (parse.c, parse.h): Create atomically.
12052 2000-10-12 Mark Mitchell <mark@codesourcery.com>
12054 * class.c (current_obstack): Remove.
12055 * decl.c (ggc_p): Remove.
12056 (start_decl): Don't use decl_tree_cons.
12057 (grokdeclarator): Don't use build_decl_list.
12058 (start_function): Don't use decl_tree_cons.
12059 (finish_function): Don't mess with obstacks.
12060 * decl2.c (grok_x_components): Don't use build_decl_list.
12061 * lex.c (make_call_declarator): Don't call decl_tree_cons.
12062 (implicitly_declare_fn): Don't call build_decl_list.
12063 * parse.y (frob_specs): Don't call build_decl_list or
12065 (expr_or_declarator_intern): Don't call decl_tree_cons.
12066 (primary): Don't call build_decl_list.
12067 (fcast_or_absdcl): Likewise.
12068 (typed_declspecs): Don't call decl_tree_cons.
12069 (reserved_declspecs): Don't call build_decl_list.
12070 (declmods): Likewise.
12071 (reserved_typespecquals): Likewise.
12073 (new_type_id): Likewise.
12074 (cv_qualifiers): Likewise.
12075 (after_type_declarator_intern): Likewise.
12076 (notype_declarator_intern): Likewise.
12077 (absdcl_intern): Likewise.
12078 (named_parm): Likewise.
12079 * pt.c (most_specialized_class): Likewise.
12080 * repo.c (temporary_obstack): Make it a structure, not a pointer.
12081 (init_repo): Initialize it.
12082 * search.c (current_obstack): Remove.
12083 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
12085 2000-10-09 Richard Henderson <rth@cygnus.com>
12087 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
12088 (c++ language support bits for libgcc): Remove.
12089 (c++.clean): Remove cplib2.txt cleanup.
12090 * config-lang.in (headers, lib2funcs): Remove.
12092 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
12093 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
12094 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
12095 * inc/new.h, inc/typeinfo: Remove files.
12097 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
12099 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
12101 (init_decl_processing): Initialize intmax_type_node and
12104 2000-10-06 Richard Henderson <rth@cygnus.com>
12106 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
12107 (original_result_rtx): Remove.
12108 * decl.c (save_function_data): Don't clear x_result_rtx.
12109 (mark_lang_function): Don't mark it either.
12110 * expr.c (fixup_result_decl): Remove.
12111 * semantics.c (genrtl_named_return_value): Frob the return decl
12112 before calling emit_local_var.
12113 (genrtl_finish_function): Don't call fixup_result_decl.
12114 Always emit the jump to return_label.
12116 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
12118 * pt.c (lookup_template_class): Set current access for enum.
12119 (tsubst_enum): Set file & line for enum decl.
12121 * spew.c (yylex): Remove unused variable.
12123 2000-10-05 Richard Henderson <rth@cygnus.com>
12125 * semantics.c (genrtl_finish_function): Don't init or check
12126 can_reach_end; remove noreturn and return value checks.
12128 2000-10-05 Tom Tromey <tromey@cygnus.com>
12130 * init.c (build_java_class_ref): Use `build_static_name' with a
12131 suffix, not a prefix, to build the class object's name.
12133 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
12135 * cp-tree.h (access_kind): Fix comment typo.
12136 * decl2.c (grokfield): Fix diagnostic typo.
12137 * semantics.c (finish_template_type): Fix comment typo.
12138 (finish_qualified_object_call_expr): Likewise.
12140 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
12142 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
12145 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
12147 * spew.c (frob_id): New static function.
12148 (frob_opname): Use it.
12151 2000-10-01 Mark Mitchell <mark@codesourcery.com>
12153 * decl.c (lang_mark_false_label_stack): Remove.
12154 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
12156 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
12158 * gxxint.texi: Use @email for formatting email addresses.
12160 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
12162 * error.c: Remove direct obstack manipulation. Replace with
12163 output_buffer-based formatting. Adjust calls to removed macros.
12164 (obstack_chunk_alloc, obstack_chunk_free): Remove.
12165 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
12166 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
12168 2000-09-24 Mark Mitchell <mark@codesourcery.com>
12170 * ir.texi: Move to ../c-tree.texi.
12172 2000-09-20 Jason Merrill <jason@redhat.com>
12174 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
12176 2000-09-21 Andreas Jaeger <aj@suse.de>
12178 * errfn.c: Move declaration of cp_printer and cp_printers to ...
12179 * cp-tree.h: ... here.
12181 * error.c: Remove declaration of cp_printer.
12183 2000-09-20 Mark Mitchell <mark@codesourcery.com>
12185 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
12187 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
12189 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
12192 2000-09-18 Mark Mitchell <mark@codesourcery.com>
12194 * decl.c (start_function): Robustify.
12196 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12198 * cp-tree.h (check_function_format): Accept a `status' parameter.
12200 * call.c, typeck.c: Updates calls to `check_function_format'.
12202 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
12204 * decl2.c (handle_class_head): Always push some scope even
12207 2000-09-16 Mark Mitchell <mark@codesourcery.com>
12209 * cp-tree.h (struct cp_language_function): Remove
12210 x_scope_stmt_stack and name_declared.
12211 (current_scope_stmt_stack): Remove.
12212 (function_name_declared_p): New macro.
12213 (struct lang_decl_flags): Use c_lang_decl as a base class.
12215 (struct lang_decl): Replace saved_tree with context.
12216 (DECL_FRIEND_CONTEXT): Adjust accordingly.
12217 (SET_DECL_FRIEND_CONTEXT): Likewise.
12218 (DECL_VIRTUAL_CONTEXT): Likewise.
12219 (DECL_SAVED_TREE): Remove.
12220 (C_DECLARED_LABEL_FLAG): Likewise.
12221 (cplus_expand_expr_stmt): Don't declare.
12222 (add_decl_stmt): Likewise.
12223 (add_scope_stmt): Likewise.
12224 * decl.c (mark_stmt_tree): Remove.
12225 (case_compare): Likewise.
12226 (finish_case_label): Use c_add_case_label.
12227 (init_decl_processing): Set more language-specific hooks.
12228 (build_enumerator): Fix typo in comment.
12229 (cplus_expand_expr_stmt): Remove.
12230 (mark_lang_function): Use mark_c_language_function.
12231 (lang_mark_tree): Use c_mark_lang_decl.
12232 * decl2.c: Change order of inclusion.
12233 * except.c: Likewise.
12234 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
12235 back on c_expand_expr.
12236 * friend.c: Include expr.h.
12237 * init.c: Change order of inclusion.
12238 * Makefile.in: Update dependencies.
12239 * lex.h (free_lang_decl_chain): Remove.
12240 * optimize.c (maybe_clone_body): Use function_name_declared_p.
12241 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
12243 (instantiate_decl): Use function_name_declared_p.
12244 * semantics.c (lang_expand_expr_stmt): Remove.
12245 (set_current_function_name_declared): Likewise.
12246 (current_function_name_declared): Likewise.
12247 (begin_compound_stmt): Use function_name_declared_p.
12248 (add_decl_stmt): Remove.
12249 (setup_vtbl_ptr): Use function_name_declared_p.
12250 (add_scope_stmt): Remove.
12251 (current_scope_stmt_stack): New function.
12252 (cp_expand_stmt): Don't handle SCOPE_STMTs.
12253 (expand_body): Use function_name_declared_p.
12254 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
12255 * typeck.c: Change order of includes.
12256 (convert_sequence): Remove.
12258 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
12260 * lex.c (reswords): Add _Complex.
12262 2000-09-14 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12264 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
12266 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
12268 * init.c (begin_init_stmts): Don't use // comments.
12270 2000-09-12 Jason Merrill <jason@redhat.com>
12272 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
12273 all non-extern arrays.
12275 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
12276 typenames, too. Downgrade complaint to pedwarn.
12277 (xref_tag): Warn about surprising behavior of 'friend struct T'.
12278 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
12279 'class This::Inherited'.
12281 2000-09-12 Mark Mitchell <mark@codesourcery.com>
12283 * decl.c (finish_case_label): Given the LABEL_DECL a
12286 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
12288 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
12289 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
12290 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
12291 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
12292 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
12294 (sorry_for_unsupported_tree, print_scope_operator,
12295 print_left_paren, print_right_paren, print_left_bracket,
12296 print_right_bracket, print_whitespace): Likewise.
12297 (aggr_variety): Rename to class_key_or_enum.
12298 (print_type): Rename to print_type_id.
12299 (print_type_specifier_seq, print_simple_type_specifier,
12300 print_elaborated_type_specifier,
12301 print_rest_of_abstract_declarator,
12302 print_parameter_declaration_clause, print_exception_specification,
12303 print_nested_name_specifier, print_template_id,
12304 typedef_original_name, print_template_argument_list_start,
12305 print_template_argument_list_end): New functions.
12307 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
12309 * ir.texi: Add more documentation.
12311 2000-09-11 Mark Mitchell <mark@codesourcery.com>
12313 * cp-tree.h (struct saved_scope): Remove x_function_parms.
12314 (current_function_parms): Don't define.
12315 (struct cp_language_function): Remove parms_stored.
12316 (current_function_just_assigned_this): Don't define.
12317 (current_function_parms_stored): Likewise.
12318 (static_ctors): Declare.
12319 (static_dtors): Likewise.
12320 (SF_EXPAND): Don't define.
12321 (expand_start_early_try_stmts): Remove declaration.
12322 (store_parm_decls): Likewise.
12323 * decl.c (static_ctors): Don't declare.
12324 (static_dtors): Likewise.
12325 (struct binding_level): Remove this_block.
12326 (poplevel): Remove dead code.
12327 (set_block): Likewise.
12328 (mark_binding_level): Don't mark this_block.
12329 (mark_saved_scope): Don't mark x_function_parms.
12330 (init_decl_processing): Don't add current_function_parms as a GC
12332 (check_function_type): Change prototype.
12333 (start_function): Remove RTL-generation code.
12334 (expand_start_early_try_stmts): Remove.
12335 (store_parm_decls): Give it internal linkage. Remove
12336 RTL-generation code.
12337 (finish_function): Remove RTL-generation code.
12338 * decl2.c (static_ctors): Fix formatting.
12339 (static_dtors): Likewise.
12340 * method.c (use_thunk): Don't call store_parm_decls.
12341 (synthesize_method): Likewise.
12342 * optimize.c (maybe_clone_body): Likewise.
12343 * parse.y (fn.def2): Likewise.
12344 (.set_base_init): Likewise.
12345 (nodecls): Likewise.
12346 * pt.c (instantiate_decl): Likewise.
12347 * rtti.c (synthesize_tinfo_fn): Likewise.
12348 * semantics.c (genrtl_try_block): Simplify.
12349 (expand_body): Use genrtl_start_function and
12350 genrtl_finish_function.
12351 (genrtl_start_function): New function.
12352 (genrtl_finish_function): Likewise.
12354 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
12356 * error.c (cp_tree_printer, case 'P'): Append break.
12358 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
12360 * cp-tree.h (frob_opname): Declare.
12361 * parse.y (saved_scopes): New static variable.
12362 (cp_parse_init): Adjust.
12363 (do_id): If lastiddecl is NULL, do do_identifier.
12364 (operator): Save scope information.
12365 (unoperator): New reduction. Restore scope information.
12366 (operator_name): Append unoperator. Call frob_opname.
12367 * spew.c (frob_opname): Define.
12369 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
12371 * decl.c, rtti.c: Include defaults.h if not already included.
12372 Don't define the *_TYPE_SIZE macros.
12374 2000-09-09 Mark Mitchell <mark@codesourcery.com>
12376 * cp-tree.h (push_switch): Change prototype.
12377 (check_cp_case_value): Remove declaration.
12378 (decl_constant_value): Likewise.
12379 * decl.c (struct cp_switch): Add switch_stmt and cases.
12380 (case_compare): New function.
12381 (push_switch): Set switch_stmt. Initialize cases.
12382 (pop_switch): Clean up cases.
12383 (define_case_label): Rename to ...
12384 (finish_case_label): ... this. Do semantic analysis for case
12386 (start_function): Correct comment.
12387 * decl2.c (check_cp_case_value): Remove.
12388 * expr.c (do_case): Remove.
12389 * pt.c (tsubst_expr): Adjust call to finish_case_label.
12390 * semantics.c (genrtl_do_poplevel): Remove declaration.
12391 (RECHAIN_STMTS): Remove.
12392 (finish_break_stmt): Use build_break_stmt.
12393 (finish_continue_stmt): Use build_continue_stmt.
12394 (finish_switch_cond): Adjust condition here, rater than in
12395 c_expand_start_case.
12396 (finish_case_label): Remove.
12397 * typeck.c (c_expand_return): Remove.
12398 (c_expand_start_case): Likewise.
12400 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
12402 * ir.texi: Document type nodes.
12404 2000-09-06 Mark Mitchell <mark@codesourcery.com>
12406 * cp-tree.h (init_cp_semantics): Declare.
12407 (genrtl_try_block): Don't declare.
12408 (genrtl_handler): Likewise.
12409 (genrtl_catch_block): Likewise.
12410 (genrtl_ctor_stmt): Likewise.
12411 (genrtl_subobject): Likewise.
12412 (genrtl_do_poplevel): Likewise.
12413 (genrtl_named_return_value): Likewise.
12414 * lex.c (init_parse): Call init_cp_semantics.
12415 * semantics.c (genrtl_try_block): Give it internal linkage.
12416 (genrtl_handler): Likewise.
12417 (genrtl_catch_block): Likewise.
12418 (genrtl_ctor_stmt): Likewise.
12419 (genrtl_subobject): Likewise.
12420 (genrtl_do_poplevel): Likewise.
12421 (genrtl_named_return_value): Likewise.
12422 (lang_expand_stmt): Rename to ...
12423 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
12424 (init_cp_semantics): Define.
12426 * decl.c (initialize_local_var): Remove RTL-generating code.
12427 * semantics.c (genrtl_try_block): Fix formatting.
12429 Move statement-tree facilities from C++ to C front-end.
12430 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
12431 (void_zero_node): Remove.
12432 (stmt_tree): Likewise.
12433 (scope_chain): Adjust.
12434 (language_function): Rename to cp_language_function.
12435 (cp_function_chain): Adjust.
12436 (current_stmt_tree): Remove.
12437 (last_tree): Likewise.
12438 (last_expr_type): Likewise.
12439 (struct lang_decl): Adjust.
12440 (STMT_IS_FULL_EXPR_P): Remove.
12441 (add_tree): Remove.
12442 (begin_stmt_tree): Likewise.
12443 (finish_stmt_tree): Likewise.
12444 (walk_tree_fn): Likewise.
12445 (walk_stmt_tree): Likewise.
12446 * class.c (finish_struct): Replace use of add_tree with add_stmt.
12447 * decl.c (mark_stmt_tree): Adjust type.
12448 (init_decl_processing): Don't build void_zero_node.
12449 (initialize_local_var): Adjust usage of current_stmt_tree.
12450 (finish_enum): Use add_stmt, not add_tree.
12451 (save_function_data): Adjust use of language_function.
12452 (finish_constructor_body): Use add_stmt, not add_tree.
12453 (finish_destructor_body): Likewise.
12454 (push_cp_function_context): Adjust use of language_function.
12455 (pop_cp_function_context): Likewise.
12456 (mark_lang_function): Likewise.
12457 (mark_cp_function_context): Likewise.
12458 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
12459 (build_vec_init): Likewise.
12460 * semantics.c (SET_LAST_STMT): Remove.
12461 (RECHAIN_STMTS): Don't use it.
12462 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
12463 (current_stmt_tree): Define.
12464 (add_tree): Remove.
12465 (finish_goto_stmt): Use add_stmt, not add_tree.
12466 (finish_expr_stmt): Likewise.
12467 (begin_if_stmt): Likewise.
12468 (finish_then_clause): Likewise.
12469 (begin_while_stmt): Likewise.
12470 (begin_do_stmt): Likewise.
12471 (finish_return_stmt): Likewise.
12472 (begin_for_stmt): Likewise.
12473 (finish_break_stmt): Likewise.
12474 (finish_continue_stmt): Likewise.
12475 (begin_switch_stmt): Likewise.
12476 (finish_case_label): Likewise.
12477 (begin_try_block): Likewise.
12478 (begin_function_try_block): Likewise.
12479 (begin_handler): Likewise.
12480 (begin_catch_block): Likewise.
12481 (begin_compound_stmt): Likewise.
12482 (begin_asm_stmt): Likewise.
12483 (finish_asm_stmt): Likewise.
12484 (finish_label_stmt): Likewise.
12485 (add_decl_stmt): Likewise.
12486 (finish_subobject): Likewise.
12487 (finish_decl_cleanup): Likewise.
12488 (finish_named_return_value): Likewise.
12489 (setup_vtbl_ptr): Likewise.
12490 (add_scope_stmt): Likewise.
12491 (finish_stmt_expr): Likewise.
12492 (prune_unused_decls): Remove.
12493 (begin_stmt_tree): Likewise.
12494 (finish_stmt_tree): Likewise.
12495 (prep_stmt): Adjust use of current_stmt_tree.
12496 (lang_expand_stmt): Likewise.
12497 * tree.c (statement_code_p): Remove.
12498 (cp_statement_code_p): New function.
12499 (walk_stmt_tree): Remove.
12500 (init_tree): Set lang_statement_code_p.
12502 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
12504 Integrated preprocessor.
12506 * Make-lang.in, Makefile.in: Remove all references to input.c,
12507 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
12508 * gxx.gperf, hash.h, input.c: Delete.
12509 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
12510 initialized properly.
12512 * class.c (fixup_pending_inline): Take a tree, not a
12513 struct pending_inline *. All callers changed.
12514 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
12515 RID_PROTECTED entries in ridpointers[] array here.
12516 * decl.c (duplicate_decls): Do not refer to struct
12518 (record_builtin_type, init_decl_processing): Use RID_MAX not
12520 (grokdeclarator): Use C_IS_RESERVED_WORD.
12521 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
12523 (grok_x_components): Do not inspect pending_inlines chain.
12525 * cp-tree.h (struct lang_identifier): Add rid_code entry.
12526 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
12527 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
12528 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
12529 TIME_IDENTIFIER_FILEINFO): Kill.
12531 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
12532 single 32-bit word.
12533 * parse.y: Call do_pending_inlines unconditionally.
12534 reinit_parse_for_method is now snarf_method. fn.defpen is no
12535 longer necessary. Remove unnecessary <itype> annotation on
12536 SCOPE. Do not refer to end_of_file or struct pending_inline.
12537 * semantics.c (begin_inline_definitions): Call
12538 do_pending_inlines unconditionally.
12540 * lex.c: Remove all code now shared with C front end.
12541 Initialize cpplib properly if USE_CPPLIB. Put reserved words
12542 into the get_identifier table. Rewrite pragma handling to
12543 work with the registry. Move code to save tokens for later
12544 processing to spew.c.
12546 * spew.c: Rewrite everything in terms of token streams instead
12547 of text. Move routines here from lex.c / input.c as
12548 appropriate. GC-mark trees hanging off the pending inlines
12551 2000-09-06 Mark Mitchell <mark@codesourcery.com>
12553 * NEWS: Mention that the named return value extension has been
12555 * cp-tree.h (original_result_rtx): Define.
12556 (TREE_REFERENCE_EXPR): Remove.
12557 (DECL_VPARENT): Likewise.
12558 (pushdecl_nonclass_level): Likewise.
12559 (store_return_init): Likewise.
12560 (reinit_lang_specific): Likewise.
12561 (genrtl_named_return_value): Change prototype.
12562 * decl.c (original_result_rtx): Remove.
12563 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
12564 Do not generate RTL for local variables here.
12565 (store_return_init): Remove.
12566 * semantics.c (genrtl_named_return_value): Simplify. Fold in
12568 (finish_named_return_value): Adjust accordingly. Warn that this
12569 extension is deprecated.
12570 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
12572 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
12574 * pt.c (type_unification_real): Replace switch with if.
12575 (unify): Tsubst non-type parms before comparing.
12577 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
12579 * error.c (dump_typename): New function, broken out of ...
12580 (dump_type): ... here. Use it.
12581 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
12583 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
12585 * init.c (build_offset_ref): Deal with namespace scoped
12588 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
12590 * class.c (resolve_address_of_overloaded_function): Add
12591 explanation message.
12592 * decl.c (define_case_label): Reformat explanation.
12593 * decl2.c (finish_static_data_member_decl): Likewise.
12594 (grokfield): Likewise.
12595 * friend.c (do_friend): Likewise.
12597 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
12599 * tree.c (walk_tree): Expose tail recursion.
12600 (walk_stmt_tree): New function.
12601 * cp-tree.h: Prototype walk_stmt_tree.
12602 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
12603 the BLOCKs directly. If a BLOCK has no variables after
12604 pruning, discard it.
12605 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
12606 restore the line number.
12608 2000-09-05 Mark Mitchell <mark@codesourcery.com>
12610 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
12611 (pt.o): Remove dependency on HTAB_H.
12612 * cp-tree.h: Include hashtab.h.
12613 (walk_tree): Change prototype.
12614 (walk_tree_without_duplicates): New function.
12615 * decl.c (check_default_argument): Use it.
12616 * optimize.c (remap_decl): Adjust calls to walk_tree.
12617 (copy_body): Likewise.
12618 (expand_calls_inline): Likewise.
12619 (calls_setjmp_p): Use walk_tree_without_duplicates.
12620 * pt.c: Don't include hashtab.h.
12621 (for_each_template_parm): Use walk_tree_without_duplicates.
12622 * semantics.c (finish-stmt_tree): Likewise.
12623 (expand_body): Likewise.
12624 * tree.c (walk_tree): Add additional parameter.
12625 (walk_tree_without_duplicates): New function.
12626 (count_trees): Use it.
12627 (verify_stmt_tree): Adjust call to walk_tree.
12628 (find_tree): Use walk_tree_without_duplicates.
12629 (no_linkage_check): Likewise.
12630 (break_out_target_exprs): Adjust call to walk_tree.
12631 (cp_unsave): Likewise.
12633 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12635 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
12636 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
12637 * cp-tree.h (TYPE_BINFO): Adjust comment.
12638 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
12639 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
12640 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
12641 (TYPE_TEMPLATE_INFO): Likewise.
12642 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
12643 * class.c (push_nested_class): Likewise.
12644 * decl.c (lookup_name_real): Likewise.
12645 (grokdeclarator): Likewise.
12646 (grok_op_properties): Likewise.
12647 (xref_tag): Likewise.
12648 (xref_basetypes): Likewise.
12649 * decl2.c (constructor_name_full): Likewise.
12650 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
12651 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
12652 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
12653 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12654 (dump_type_suffix): Likewise.
12655 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
12657 (get_aggr_from_typedef): Likewise.
12658 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
12659 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12660 (write_template_parm): Likewise.
12661 (write_template_template_parm): Check tree code instead of
12662 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12663 * method.c (build_overload_nested_name): Add
12664 BOUND_TEMPLATE_TEMPLATE_PARM.
12665 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
12666 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12667 * pt.c (convert_template_argument): Check tree code instead of
12668 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12669 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
12670 (for_each_template_parm): Adjust comment.
12671 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
12672 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12673 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
12674 template_args_equal to compare template template parameter cases.
12675 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12676 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
12678 * tree.c (copy_template_template_parm): Decide whether to create
12679 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
12680 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12681 (copy_tree_r): Likewise.
12682 * typeck.c (comptypes): Likewise. Check tree code instead of
12683 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12685 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
12687 * decl.c (finish_function): Move the code for handling functions
12688 marked with the constructor and destructor attributes inside the
12691 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
12693 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
12695 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
12697 * pt.c (lookup_template_class): Remove abort.
12698 * tree.c (get_type_decl): Allow error_mark_node.
12700 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
12702 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
12705 2000-09-03 Mark Mitchell <mark@codesourcery.com>
12707 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
12710 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
12712 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
12713 union tag mismatch error reporting.
12715 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
12717 * call.c (build_scoped_method_call): Check it is not a namespace.
12719 2000-08-30 Jason Merrill <jason@redhat.com>
12721 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
12723 * tree.c (bot_manip): Check TREE_CONSTANT rather than
12724 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
12725 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
12727 * decl.c (start_function): Always call make_function_rtl.
12729 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
12731 * semantics.c (prune_unused_decls): New function.
12732 (finish_stmt_tree): Call it via walk_tree.
12734 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
12736 * class.c (build_secondary_vtable): Constify a char *.
12737 * decl.c (init_decl_processing): Initialize function_id_node,
12738 pretty_function_id_node, and func_id_node.
12739 * input.c (struct input_source): Constify 'str'.
12740 (feed_input): Constify first argument.
12741 * mangle.c (write_identifier): Constify argument.
12742 * pt.c (mangle_class_name_for_template): Constify argument.
12744 2000-08-29 Mark Mitchell <mark@codesourcery.com>
12746 * typeck.c (mark_addressable): Remove code that pokes around in
12749 2000-08-28 Jason Merrill <jason@redhat.com>
12751 * lex.c (file_name_nondirectory): Move to toplev.c.
12753 * cp-tree.h (LOCAL_CLASS_P): New macro.
12754 * class.c (finish_struct_1): Use it.
12756 2000-08-27 Alex Samuel <samuel@codesourcery.com>
12758 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
12759 (write_encoding): Pass another argument to write_name.
12760 (write_name): Add ignore_local_scope parameter. Fix handling of
12762 (write_nested_name): Use write_unqualified_name.
12763 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
12764 (write_template_prefix): Use write_unqualified_name.
12765 (write_component): Remove.
12766 (write_local_name): Add parameter. Use direct local entity to
12767 discriminator calculation.
12768 (write_class_enum_type): Pass another argument to write_name.
12769 (write_template_template_arg): Likewise.
12770 (make_guard_variable): Likewise.
12772 2000-08-27 Jason Merrill <jason@redhat.com>
12774 * decl.c (pushdecl): Matching decls for local externs are found in
12775 the current level. Propagate linkage information from previous
12778 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
12780 * ir.texi (Expressions): Fix typo.
12782 2000-08-25 Greg McGary <greg@mcgary.org>
12784 * tree.c (init_tree): Use ARRAY_SIZE.
12786 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
12788 * error.c (cp_tree_printer): Rework.
12790 2000-08-25 Mark Mitchell <mark@codesourcery.com>
12792 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
12794 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
12795 (cp-demangle.o): Remove target.
12796 (dyn-string.o): Likewise.
12798 * decl.c (grokfndecl): Require that `main' return an `int'.
12799 * mangle.c (write_encoding): Don't mangle return types for
12800 conversion functions.
12802 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
12804 * error.c (tree_formatting_info): New data type.
12805 (tree_being_formatted): New macro.
12806 (tree_formatting_flags): Likewise.
12807 (put_whitespace): Likewise.
12808 (print_tree_identifier): Likewise.
12809 (print_identifier): Likewise.
12810 (cp_tree_printer, print_function_argument_list, print_declaration,
12811 print_expression, print_function_declaration,
12812 print_function_parameter, print_type, print_cv_qualifier): New
12814 (init_error): Initialize lang_printer.
12816 2000-08-24 Jason Merrill <jason@redhat.com>
12818 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
12819 adjustment necessary.
12821 2000-08-24 Greg McGary <greg@mcgary.org>
12823 * cp-tree.h (MAIN_NAME_P): Remove macro.
12825 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
12827 * error.c (print_instantiation_context): Don't forget to flush the
12830 2000-08-23 Jason Merrill <jason@redhat.com>
12832 * typeck.c (build_ptrmemfunc): Save the input pmf.
12834 * method.c (process_modifiers): Use same_type_p.
12836 2000-08-23 Mark Mitchell <mark@codesourcery.com>
12838 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
12839 * mangle.c (write_function_type): Change prototype.
12840 (write_encoding): Don't mangle return types for
12841 constructors or destructors.
12842 (write_type): Adjust call to write_function_type.
12843 * pt.c (instantiate_template): Instantiate alternate entry points
12844 when instantiating the main function.
12846 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
12848 * error.c (cp_print_error_function): Don't use embedded '\n' in
12851 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
12853 * decl.c (init_decl_processing): Remove bogus initialization.
12854 * error.c (lang_print_error_function): Restore here.
12855 (init_error): Initialize print_error_function.
12857 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12859 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
12861 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
12863 * Makefile.in (error.o): Depends on diagnostic.h
12865 * cp-tree.h (problematic_instantiation_changed,
12866 record_last_problematic_instantiation, current_instantiation,
12867 print_instantiation_context): Declare.
12868 (maybe_print_template_context): Remove.
12870 * decl.c (init_decl_processing): Set print_error_function to NULL.
12871 (lang_print_error_function): Remove, since we're using a new
12874 * error.c: #include diagnostic.h
12875 (function_category): New function.
12876 (cp_diagnostic_starter): Likewise.
12877 (cp_diagnostic_finalizer): Likewise.
12878 (cp_print_error_function): Likewise.
12879 (maybe_print_instantiation_context): Likewise.
12880 (print_instantiation_full_context): Likewise.
12881 (print_instantiation_partial_context): Likewise.
12882 (print_instantiation_context): Define.
12883 (init_error): Initialize diagnostic pager and finalizer.
12885 * pt.c (problematic_instantiation_changed): Define.
12886 (record_last_problematic_instantiation): Likewise.
12887 (current_instantiation): Likewise.
12888 (maybe_print_template_context): Remove.
12889 (print_template_context): Likewise.
12890 (current_tinst_level): Make static to reflect Brendan Kehoe's
12891 change of 1995-04-13.
12892 (push_tinst_level): Call print_instantiation_context.
12894 2000-08-21 Nix <nix@esperi.demon.co.uk>
12896 * lang-specs.h: Do not process -o or run the assembler if
12899 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
12901 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
12903 * decl2.c (lang_decode_option): Disable gettext attributes for
12906 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
12908 * lex.c (lang_init_options): Default diagnostic message maximum
12909 length to 80, when line-wrapping.
12911 2000-08-20 Mark Mitchell <mark@codesourcery.com>
12913 * class.c (build_vtbl_initializer): Clear the entire
12914 vtbl_init_data. Start keeping track of the functions for which we
12915 have created vcall offsets here.
12916 (dfs_build_vcall_offset_vtbl_entries): Remove.
12917 (build_vcall_offset_vtbl_entries): Reimplement.
12918 (add_vcall_offset_vtbl_entries_r): New function.
12919 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
12920 computing when vcall offsets are necessary.
12922 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
12924 * decl.c (member_function_or_else): Use cp_error ... %T.
12925 (grokdeclarator): Likewise.
12926 (start_method): Likewise.
12927 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
12929 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
12931 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
12934 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
12936 * cp-tree.h (PTRMEM_OK_P): New macro.
12937 (itf_ptrmem_ok): New enumeration value.
12938 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
12939 argument. Diagnose implicit pointer to member.
12940 (instantiate_type): Don't diagnose implicit pointer to member
12941 here. Pass itf_ptrmem_ok if ok. Adjust calls to
12942 resolve_address_of_overloaded_function.
12943 * init.c (build_offset_ref): Set PTRMEM_OK_P.
12944 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
12945 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
12946 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
12947 (build_unary_op): Deal with single non-static member in
12950 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
12952 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
12954 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
12956 * cp-tree.h (enum_name_string): Remove prototype.
12957 (report_case_error): Remove prototype.
12958 * cp/typeck2.c (enum_name_string): Remove.
12959 (report_case_error): Remove.
12960 * error.c (dump_expr): Deal with enum values directly.
12961 Correctly negate integer constant.
12963 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
12965 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
12966 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
12967 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
12968 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
12969 (__cxa_vec_new): Use __cxa_vec_new2.
12970 (__cxa_vec_delete): Use __cxa_vec_delete2.
12972 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
12974 * vec.cc (__cxa_vec_new): Set "C" linkage.
12975 (__cxa_vec_ctor): Likewise.
12976 (__cxa_vec_cctor): Likewise.
12977 (__cxa_vec_dtor): Likewise.
12978 (__cxa_vec_delete): Likewise.
12979 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
12980 (__cxa_vec_ctor): Likewise.
12981 (__cxa_vec_cctor): Likewise.
12982 (__cxa_vec_dtor): Likewise.
12983 (__cxa_vec_delete): Likewise.
12985 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
12987 * class.c (instantiate_type): Reinstate local variable
12988 deleted in previous change.
12990 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
12993 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
12995 * cp-tree.h (instantiate_type_flags): New enumeration.
12996 (instantiate_type): Change parameter.
12997 * class.c (instantiate_type): Adjust prototype. Adjust.
12998 * call.c (standard_conversion): Adjust instantiate_type call.
12999 (reference_binding): Likewise.
13000 (build_op_delete_call): Likewise.
13001 (convert_like_real): Likewise.
13002 * cvt.c (cp_convert_to_pointer): Likewise.
13003 (convert_to_reference): Likewise.
13004 * pt.c (convert_nontype_argument): Likewise.
13005 * typeck.c (build_binary_op): Likewise.
13006 (build_ptrmemfunc): Likewise.
13007 (convert_for_assignment): Likewise.
13009 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
13011 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
13012 (current_aggr): Define.
13013 * decl.c (grokdeclarator): Make sure a friend class is an
13014 elaborated type specifier.
13015 * parse.y (current_aggr): Remove static definition.
13016 (cp_parse_init): Adjust.
13017 (structsp): Clear and restore current_aggr.
13018 (component_decl_list): Clear current_aggr.
13020 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
13021 aggregate tag on the typename's context.
13023 * pt.c (tsubst_friend_class): Return error_mark_node, if
13024 parms becomes NULL.
13025 (instantiate_class_template): Ignore error_mark_node friend types.
13027 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
13029 * cvt.c (warn_ref_binding): New static function, broken out of ...
13030 (convert_to_reference): ... here. Use it.
13032 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
13034 * parse.y (template_arg): Add rule for template qualified with
13037 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13039 * decl2.c (add_function): Reorganize.
13040 (arg_assoc): Do not consider function template decls.
13042 2000-08-11 Jason Merrill <jason@redhat.com>
13044 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
13047 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
13049 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
13050 (lookup_nested_tag): Likewise.
13052 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
13055 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
13057 * parse.y (named_complex_class_head_sans_basetype): Remove
13060 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
13062 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
13063 explicit TEMPLATE_ID_EXPR args.
13064 (build_expr_from_tree, case CALL_EXPR): Likewise.
13066 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
13068 * decl.c (check_tag_decl): Diagnose typename's which don't
13071 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
13073 * init.c (build_aggr_init): Reject bogus array initializers
13076 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
13078 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
13080 * cp/tinfo.cc (__dynamic_cast): Likewise.
13081 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
13083 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
13085 * cvt.c (convert_to_pointer_force): Fix error message when
13086 attempting to cast from ambiguous base.
13088 2000-08-08 Jason Merrill <jason@redhat.com>
13090 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
13091 (tsubst_template_arg_vector): Likewise.
13093 * decl2.c (build_anon_union_vars): Choose the largest field; don't
13094 assume that one will be as large as the union.
13096 2000-08-07 Kazu Hirata <kazu@hxi.com>
13098 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
13099 * decl.c (pop_labels): Likewise.
13101 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
13103 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
13105 (__pointer_to_member_type_info): Likewise.
13106 (__base_class_info): Likewise.
13107 (__class_type_info): Likewise.
13108 (__si_class_type_info): Likewise.
13109 (__vmi_class_type_info): Likewise.
13110 * tinfo.cc (__si_class_type_info::__do_find_public_src):
13111 Changed member names to match specifications.
13112 (__vmi_class_type_info::__do_find_public_src): Likewise.
13113 (__si_class_type_info::__do_dyncast): Likewise.
13114 (__vmi_class_type_info::__do_dyncast): Likewise.
13115 (__si_class_type_info::__do_upcast): Likewise.
13116 (__vmi_class_type_info::__do_upcast): Likewise.
13117 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
13118 (__pbase_type_info::__pointer_catch): Likewise.
13119 (__pointer_type_info::__pointer_catch): Likewise.
13120 (__pointer_to_member_type_info::__pointer_catch): Likewise.
13122 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
13124 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
13125 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
13126 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
13128 2000-08-04 Mark Mitchell <mark@codesourcery.com>
13130 * cp-tree.h (add_method): Change prototype.
13131 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
13132 Don't double the size of the method vector in the error case.
13133 (handle_using_decl): Adjust call to add_method.
13134 (add_implicitly_declared_members): Likewise.
13135 (clone_function_decl): Likewise.
13136 * decl2.c (check_classfn): Likewise.
13137 * semantics.c (finish_member_declaration): Likewise.
13139 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
13141 * decl.c (flag_isoc94): New variable.
13143 2000-08-02 Jason Merrill <jason@redhat.com>
13145 * pt.c (do_type_instantiation): Add complain parm; don't complain
13146 if called recursively.
13147 * cp-tree.h, parse.y: Adjust.
13149 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
13151 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
13152 -Wno-strict-prototypes.
13154 * g++spec.c: Adjust type of second argument to
13155 lang_specific_driver, and update code as necessary.
13157 * cp-tree.h: Don't prototype min_precision here.
13158 (my_friendly_assert): Cast expression to void.
13159 * semantics.c (do_poplevel): Initialize scope_stmts.
13161 2000-08-02 Mark Mitchell <mark@codesourcery.com>
13163 * cp-tree.h (DECL_NEEDED_P): Tweak.
13165 2000-07-28 Jason Merrill <jason@redhat.com>
13167 * lang-specs.h: Use %i in rule for .ii files.
13169 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
13171 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
13173 2000-07-30 Mark Mitchell <mark@codesourcery.com>
13175 Allow indirect primary bases.
13176 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
13178 (CLASSTYPE_VFIELD_PARENT): Remove.
13179 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
13180 (BINFO_PRIMARY_BINFO): Remove.
13181 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
13182 (BINFO_VBASE_PRIMARY_P): Likewise.
13183 (BINFO_PRIMARY_BASE_OF): New macro.
13184 (BINFO_INDIRECT_PRIMARY_P): Likewise.
13185 (get_primary_binfo): New function.
13186 * decl.c (lang_mark_tree): Make lang_type::primary_base.
13187 * class.c (vcall_offset_data_s): Rename to ...
13188 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
13189 and add ctor_vtbl_p.
13190 (get_derived_offset): Use get_primary_binfo.
13191 (dfs_mark_primary_bases): Adjust handling of virtual primary
13193 (mark_primary_bases): Likewise.
13194 (set_primary_base): Take a binfo, not an integer, as a
13195 representation of the primary base.
13196 (indirect_primary_base_p): Remove.
13197 (determine_primary_base): Adjust for indirect primary bases.
13198 (dfs_find_final_overrider): Fix typo in coment.
13199 (update_vtable_entry_for_fn): Use get_primary_binfo.
13200 (layout_nonempty_base_or_field): Tweak.
13201 (build_base_fields): Adjust for new primary base semantics.
13202 (dfs_propagate_binfo_offsets): Remove.
13203 (propagate_binfo_offsets): Rewrite.
13204 (dfs_set_offset_for_shared_vbases): Remove.
13205 (layout_virtual_bases): Don't use it.
13206 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
13208 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
13209 CLASSTYPE_VFIELD_PARENT.
13210 (dfs_get_primary_binfo): New function.
13211 (get_primary_binfo): Likewise.
13212 (dump_class_hierarchy_r): Tweak printing of primary bases.
13213 (build_vtbl_initializer): Fix typo in comments. Use
13215 (build_vcall_and_vbase_vtbl_entries): Likewise.
13216 (build_vbaes_offset_vtbl_entries): Likewise.
13217 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
13218 BV_VCALL_INDEX to handle indirect primary bases.
13219 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
13220 (build_rtti_vtbl_entries): Likewise.
13221 * search.c (get_shared_vbase_if_not_primary): Tweak.
13222 (find_vbase_instance): Likewise.
13223 (binfo_for_vtable): Simplify.
13224 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
13225 (make_binfo): Make it have 11 entries.
13227 2000-07-30 Alex Samuel <samuel@codesourcery.com>
13229 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
13230 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
13231 ascertaining primaryness.
13232 (G): Remove template_args.
13233 (decl_is_template_id): New function.
13234 (write_encoding): Use decl_is_template_id.
13235 (write_name): Likewise. Handle type_decls. Get main variant of
13237 (write_nested_name): Likewise.
13238 (write_prefix): Likewise.
13239 (write_template_prefix): Likewise.
13240 (write_special_name_constructor): Remove defunct production from
13242 (write_bare_function_type): Remove comment about absent parameter.
13243 (write_template_template_arg): Add missing grammar production to
13246 2000-07-27 Jason Merrill <jason@redhat.com>
13248 * decl.c (duplicate_decls): If common_type produces a non-typedef
13249 type for a typedef, just use the old type.
13251 2000-07-27 Mark Mitchell <mark@codesourcery.com>
13253 * cp-tree.h (function_depth): Declare.
13254 (verify_stmt_tree): Likewise.
13255 (find_tree): Likewise.
13256 * decl.c (function_depth): Give it external linkage.
13257 * optimize.c (optimize_function): Increment and decrement it.
13258 * tree.c (verify_stmt_tree_r): New function.
13259 (verify_stmt_tree): Likewise.
13260 (find_tree_r): Likewise.
13261 (find_tree): Likewise.
13263 2000-07-27 Jason Merrill <jason@redhat.com>
13265 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
13267 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
13269 2000-07-26 Mark Mitchell <mark@codesourcery.com>
13271 * decl.c (start_cleanup_fn): Mark the function as `inline'.
13272 * decl2.c (get_guard): Call cp_finish_decl, not
13273 rest_of_decl_compilation, for local guards.
13274 * lex.c (do_identifier): Remove unused variable.
13276 2000-07-26 Marc Espie <espie@cvs.openbsd.org>
13278 * parse.y: Add missing ';'.
13280 2000-07-26 Mark Mitchell <mark@codesourcery.com>
13282 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
13285 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
13287 Kill strict_prototype. Backwards compatibility only for
13288 non NO_IMPLICIT_EXTERN_C systems.
13289 * cp-tree.h (flag_strict_prototype): Remove.
13290 (strict_prototype): Remove.
13291 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
13292 * decl.c (maybe_push_to_top_level): Adjust.
13293 (pop_from_top_level): Adjust.
13294 (decls_match): Only allow sloppy parm matching for ancient
13296 (init_decl_processing): Adjust.
13297 (grokdeclarator): Adjust.
13298 * decl2.c (flag_strict_prototype): Remove.
13299 (strict_prototype): Remove.
13300 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
13301 (lang_f_options): Remove "strict-prototype".
13302 (unsupported-options): Add "strict-prototype".
13303 * lex.c (do_identifier): Adjust.
13304 (do_scoped_id): Adjust.
13305 * parse.y (empty_parms): Adjust.
13306 * class.c (push_lang_context): Adjust.
13307 (pop_lang_context): Adjust.
13308 * typeck.c (comp_target_parms): Adjust.
13310 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
13312 * decl.c (poplevel): Deal with anonymous variables at for scope.
13313 (maybe_inject_for_scope_var): Likewise.
13315 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
13317 * decl.c: Remove all signal handling code, now done in toplev.c.
13319 2000-07-23 Mark Mitchell <mark@codesourcery.com>
13321 * decl.c (make_rtl_for_nonlocal_decl): Rework.
13323 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
13326 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
13328 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
13329 Define my_friendly_assert and my_friendly_abort as macros
13330 which may call friendly_abort. Prototype friendly abort, not
13331 my_friendly_abort or my_friendly_assert.
13332 * decl.c (signal_catch): Report the signal caught in the error
13333 message. Call fatal directly.
13334 * typeck2.c (ack, my_friendly_assert): Delete.
13335 (my_friendly_abort): Rename to friendly_abort. Expect file,
13336 line, and function parameters. Report the abort code, then
13337 call fancy_abort. Do not mask an abort if errors have
13340 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
13342 * typeck.c (comp_target_parms): Remove obsolete parameter.
13343 (comp_target_types): Adjust.
13345 2000-07-17 Jason Merrill <jason@redhat.com>
13347 * typeck.c (mark_addressable): Never set TREE_USED.
13348 * call.c (build_call): Don't abort on calls to library functions
13349 that have been declared normally.
13351 * typeck.c (build_binary_op): Fix grammar in warning.
13353 * exception.cc (__eh_free): Fix prototype.
13355 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
13357 * decl.c (pushdecl): Handle seeing an OVERLOAD in
13358 IDENTIFIER_NAMESPACE_VALUE.
13360 2000-07-16 Mark Mitchell <mark@codesourcery.com>
13362 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
13363 * method.c (use_thunk): Correct handling of vcall offsets.
13365 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
13367 * .cvsignore: parse.h and parse.c have no cp- prefix.
13369 2000-07-13 Mark Mitchell <mark@codesourcery.com>
13371 * .cvsignore: New file.
13373 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
13375 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
13377 2000-07-12 Mark Mitchell <mark@codesourcery.com>
13379 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
13381 * parse.h: Likewise.
13383 2000-07-11 Mark Mitchell <mark@codesourcery.com>
13385 * class.c (layout_class_type): Add pointers to virtual bases after
13386 base classes under the old ABI.
13388 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
13390 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
13391 (finish_continue_stmt): Likewise.
13392 (begin_for_stmt): Remove call to note_level_for_for.
13393 (finish_goto_stmt): Change call from build_min_nt
13395 (finish_expr_stmt): Likewise.
13396 (begin_if_stmt): Likewise.
13397 (begin_while_stmt): Likewise.
13398 (finish_while_stmt): Likewise.
13399 (finish_return_stmt): Likewise.
13400 (begin_for_stmt): Likewise.
13401 (finish_for_stmt): Likewise.
13402 (finish_break_stmt): Likewise.
13403 (begin_switch_stmt): Likewise.
13404 (finish_case_label): Likewise.
13405 (genrtl_try_block): Likewise.
13406 (begin_try_block): Likewise.
13407 (begin_handler): Likewise.
13408 (begin_compound_stmt): Likewise.
13409 (finish_asm_stmt): Likewise.
13410 (finish_label_stmt): Likewise.
13411 (add_decl_stmt): Likewise.
13412 (finish_subobject): Likewise.
13413 (finish_decl_cleanup): Likewise.
13414 (finish_named_return_value): Likewise.
13415 (setup_vtbl_ptr): Likewise.
13416 (add_scope_stmt): Likewise.
13417 * decl.c (finish_constructor_body): Likewise.
13418 (finish_destructor_body): Likewise.
13419 * optimize.c (copy_body_r): Likewise.
13420 (initialize_inlined_parameters): Likewise.
13421 (declare_return_variable): Likewise.
13422 (expand_call_inline): Likewise.
13424 2000-07-10 Jakub Jelinek <jakub@redhat.com>
13426 * semantics.c (expand_body): Sync interface information
13427 at the end of function body expansion.
13429 2000-07-09 Jason Merrill <jason@redhat.com>
13431 * init.c (build_new_1): Bail early if the call to new fails.
13433 * decl.c (compute_array_index_type): Check specifically for
13434 an INTEGER_CST, not just TREE_CONSTANT.
13436 * decl.c (duplicate_decls): Don't call duplicate_decls on
13437 the DECL_TEMPLATE_RESULT.
13438 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
13441 * error.c (dump_template_bindings): Don't crash if we had an
13442 invalid argument list.
13444 * typeck.c (c_expand_start_case): Do narrowing here.
13445 * semantics.c (finish_switch_cond): Not here.
13447 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
13449 * parse.y (asm_clobbers): Do string concatenation.
13451 2000-07-09 Mark Mitchell <mark@codesourcery.com>
13453 * decl.c (pushtag): Don't put local classes in template functions
13454 on the local_classes list.
13456 2000-07-04 Scott Snyder <snyder@fnal.gov>
13458 * decl2.c (get_guard): Add missing return for old ABI local
13461 2000-07-09 Mark Mitchell <mark@codesourcery.com>
13463 * cp-tree.h (char_type_p): New function.
13464 * decl.c (init_decl_processing): Don't initialize
13465 signed_wchar_type_node or unsigned_wchar_type_node.
13466 (complete_array_type): Handle brace-enclosed string-constants.
13467 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
13468 * tree.c (char_type_p): New function.
13469 * typeck2.c (digest_init): Use char_type_p.
13471 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
13473 * pt.c (tsubst): Don't layout type, if it's error_mark.
13475 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
13477 * pt.c (instantiate_pending_templates): Reset template level.
13479 2000-07-05 Jason Merrill <jason@redhat.com>
13481 * call.c (joust): Don't complain about `operator char *()' beating
13482 `operator const char *() const'.
13484 2000-07-04 scott snyder <snyder@fnal.gov>
13485 Jason Merrill <jason@redhat.com>
13487 * repo.c (repo_get_id): Handle the case where a class with virtual
13488 bases has a null TYPE_BINFO_VTABLE.
13490 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
13491 Jason Merrill <jason@redhat.com>
13493 * parse.y (member_init): Just pass in the type.
13494 * init.c (expand_member_init): Handle getting a type.
13496 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
13497 Jason Merrill <jason@redhat.com>
13499 * decl.c (finish_function): Warn if a function has no return
13501 Suggested by Andrew Koenig.
13502 * typeck.c (check_return_expr): Do set current_function_returns_value
13503 if we got an error_mark_node.
13505 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
13507 * decl2.c (push_decl_namespace): Push the original namespace.
13509 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
13511 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
13512 * semantics.c (begin_class_definition): Clear it.
13514 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
13516 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
13517 (genrtl_expr_stmt): Likewise.
13518 (genrtl_decl_stmt): Likewise.
13519 (genrtl_if_stmt): Likewise.
13520 (genrtl_while_stmt): Likewise.
13521 (genrtl_do_stmt): Likewise.
13522 (genrtl_return_stmt): Likewise.
13523 (genrtl_for_stmt): Likewise.
13524 (genrtl_break_stmt): Likewise.
13525 (genrtl_continue_stmt): Likewise.
13526 (genrtl_scope_stmt): Likewise.
13527 (genrtl_switch_stmt): Likewise.
13528 (genrtl_case_label): Likewise.
13529 (genrtl_begin_compound_stmt): Likewise.
13530 (genrtl_finish_compound_stmt): Likewise.
13531 (genrtl_compound_stmt): Likewise.
13532 (genrtl_asm_stmt): Likewise.
13534 * init.c (begin_init_stmts): Remove call to
13535 genrtl_begin_compound_stmt.
13536 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
13538 * semantics.c (lang_expand_stmt): Changed call to
13539 genrtl_compound_stmt to ignore return value.
13541 2000-07-02 Mark Mitchell <mark@codesourcery.com>
13543 * mangle.c (canonicalize_for_substitution): Return the canonical
13546 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
13548 * typeck.c (commonparms): Remove obstack manipulations.
13550 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
13552 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
13554 * Makefile.in (OBJS): Added ../c-semantics.o.
13555 (OBJDEPS): Likewise.
13557 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
13559 (struct stmt_tree): Added comment.
13560 (current_function_name_declared): Removed.
13561 (stmts_are_full_exprs_p): Likewise.
13562 (genrtl_do_pushlevel): Likewise.
13563 (genrtl_clear_out_block): Likewise.
13564 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
13565 (DECL_ANON_UNION_ELEMS): Likewise.
13566 (emit_local_var): Likewise.
13567 (make_rtl_for_local_static): Likewise.
13568 (do_case): Likewise.
13569 (expand_stmt): Likewise.
13570 (genrtl_decl_cleanup): Likewise.
13571 (c_expand_asm_operands): Likewise.
13572 (c_expand_return): Likewise.
13573 (c_expand_start_case): Likewise.
13575 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
13576 (emit_local_var): Likewise.
13577 (initialize_local_var): Change reference to
13578 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
13579 Change reference to stmts_are_full_exprs_p to
13580 current_stmt_tree->stmts_are_full_exprs_p.
13581 (push_cp_function_context): Likewise.
13583 * expect.c (expand_throw): Change reference to
13584 stmts_are_full_exprs_p.
13586 * init.c (build_aggr_init): Change reference to
13587 stmts_are_full_exprs_p.
13588 (build_vec_init): Likewise.
13590 * optimize.c (maybe_clone_body): Change reference to
13591 current_function_name_declared to
13592 cp_function_chain->name_declared.
13594 * pt.c (instantiate_decl): Change reference to
13595 current_function_name_declared to
13596 cp_function_chain->name_declared.
13598 * semantics.c (expand_cond): Moved declaration to c-common.h.
13599 (genrtl_do_pushlevel): Moved to c-semantics.c.
13600 (genrtl_clear_out_block): Likewise.
13601 (genrtl_goto_stmt): Likewise.
13602 (genrtl_expr_stmt): Likewise.
13603 (genrtl_decl_stmt): Likewise.
13604 (gerntl_if_stmt): Likewise.
13605 (genrtl_while_stmt): Likewise.
13606 (genrtl_do_stmt): Likewise.
13607 (genrtl_return_stmt): Likewise.
13608 (genrtl_for_stmt): Likewise.
13609 (genrtl_break_stmt): Likewise.
13610 (genrtl_continue_stmt): Likewise.
13611 (genrtl_scope_stmt): Likewise.
13612 (genrtl_switch_stmt): Likewise.
13613 (genrtl_case_label): Likewise.
13614 (genrtl_begin_compound_stmt): Likewise.
13615 (genrtl_finish_compound_stmt): Likewise.
13616 (genrtl_compound_stmt): Likewise.
13617 (genrtl_asm_stmt): Likewise.
13618 (genrtl_decl_cleanup): Likewise.
13619 (expand_cond): Likewise.
13620 (expand_stmt): Renamed to ...
13621 (lang_expand_stmt): ... this.
13622 (lang_expand_expr_stmt): Initialize.
13623 (set_current_function_name_declared): Likewise.
13624 (stmts_are_full_exprs_p): Likewise.
13625 (current_function_name_declared): Likewise.
13626 (anon_aggr_type_p): Likewise.
13627 (do_poplevel): Change reference to
13628 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
13629 Change reference to stmts_are_full_exprs_p to
13630 current_stmt_tree->stmts_are_full_exprs_p.
13631 (add_tree): Likewise.
13632 (finish_expr_stmt): Likewise.
13633 (prep_stmt): Likewise.
13634 (lang_expand_stmt): Likewise.
13635 (begin_compound_stmt): Change reference to
13636 current_function_name_declared to
13637 cp_function_chain->name_declared and call to
13638 current_function_name_declared().
13639 (setup_vtbl_ptr): Likewise.
13640 (genrtl_do_poplevel): Removed.
13642 2000-06-30 Jason Merrill <jason@redhat.com>
13644 * init.c (init_init_processing): Go back to aligning like
13645 double_type_node for old ABI.
13646 (get_cookie_size): Make cookie larger if we get a type that needs
13648 (build_vec_delete): Call it.
13650 * typeck.c (qualify_type_recursive): New fn.
13651 (composite_pointer_type): Use it.
13652 (build_binary_op): Use composite_pointer_type.
13654 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
13655 Jason Merrill <jason@redhat.com>
13657 * typeck.c (check_return_expr): Don't complain about returning
13658 NULL from operator new if -fcheck-new.
13659 * cp-tree.h: Declare flag_check_new here.
13660 * init.c: Not here.
13662 2000-06-28 Alex Samuel <samuel@codesourcery.com>
13664 * mangle.c (find_substitution): Use same_type_p.
13665 (write_encoding): Don't check for substitutions.
13667 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
13669 * parse.y (expr_no_comma_rangle): New non-terminal.
13670 (template_parm): Use it for default parameter case.
13671 (template_arg): Use it.
13672 (expr_no_commas): Remove commented out undefined extensions.
13673 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
13674 * parse.h, parse.c: Rebuilt.
13676 2000-06-30 Mark Mitchell <mark@codesourcery.com>
13678 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
13679 (finish_asm_stmt): Do it here, instead.
13681 * cp-tree.h (ridpointers): Don't declare.
13682 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
13683 (record_builtin_java_type): Likewise.
13684 (init_decl_processing): Likewise.
13685 * lex.c: Move inclusion of lex.h.
13686 (ridpointers): Don't define.
13687 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
13689 * lex.h (enum rid): Rename to ...
13690 (enum cp_rid): ... this.
13691 (ridpointers): Don't declare.
13692 * parse.y: Move inclusion of lex.h.
13693 * parse.c: Regenerated.
13694 * spew.c: Move inclusion of lex.h.
13696 * cp-tree.h (struct language_function): Remove temp_name_counter.
13697 (temp_name_counter): Remove.
13698 (get_temp_name): Change prototype.
13699 (get_guard): New function.
13700 (get_guard_cond): Likewise.
13701 (set_guard): Likewise.
13702 * cvt.c (build_up_reference): Adjust call to get_temp_name.
13703 * decl.c (expand_static_init): Use get_guard and friends to
13704 implement guard variables.
13705 * decl2.c (get_temp_name): Assume that the variables created are
13707 (get_sentry): Rename to ...
13708 (get_guard): ... this. Implement new ABI guard variables.
13709 (get_guard_bits): New function.
13710 (get_guard_cond): Likewise.
13711 (set_guard): Likewise.
13712 (start_static_initialization_or_destruction): Use them.
13713 (do_static_initialization): Replace sentry with guard throughout.
13714 (do_static_destruction): Likewise.
13715 * init.c (create_temporary_var): Add comment.
13717 2000-06-28 Alex Samuel <samuel@codesourcery.com>
13719 * mangle.c (find_substitution): Use same_type_p.
13720 (write_encoding): Don't check for substitutions.
13722 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
13724 * parse.y (expr_no_comma_rangle): New non-terminal.
13725 (template_parm): Use it for default parameter case.
13726 (template_arg): Use it.
13727 (expr_no_commas): Remove commented out undefined extensions.
13728 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
13729 * parse.h, parse.c: Rebuilt.
13731 2000-06-29 Mark Mitchell <mark@codesourcery.com>
13733 * cp-tree.h (flag_const_strings): Remove.
13734 (warn_parentheses): Likewise.
13735 (warn_format): Likewise.
13736 (common_type): Likewise.
13737 (default_conversion): Likewise.
13738 (build_binary_op): Likewise.
13739 (cp_build_binary_op): New macro.
13740 * call.c (build_new_op): Use cp_build_binary_op instead of
13742 * class.c (build_vtable_entry_ref): Likewise.
13743 * decl.c (expand_static_init): Likewise.
13744 (compute_array_index_type): Likewise.
13745 (build_enumerator): Likewise.
13746 * decl2.c (delete_sanity): Likewise.
13747 (start_static_initialization_or_destruction): Likewise.
13748 * error.c (dump_type_suffix): Likewise.
13749 * init.c (resolve_offset_ref): Likewise.
13750 (build_new): Likewise.
13751 (build_new_1): Likewise.
13752 (build_vec_delete_1): Likewise.
13753 (build_vec_init): Likewise.
13754 (build_delete): Likewise.
13755 * rtti.c (synthesize_tinfo_fn): Likewise.
13756 (synthesize_tinfo_var): Likewise.
13757 * search.c (expand_upcast_fixups): Likewise.
13758 (fixup_all_virtual_upcast_offsets): Likewise.
13759 * typeck.c (build_array_ref): Likewise.
13760 (get_member_function_from_ptrfunc): Likewise.
13761 (build_binary_op): Add parameter.
13762 (pointer_int_sum): Use cp_build_binary_op.
13763 (pointer_diff): Likewise.
13764 (build_modify_expr): Likewise.
13765 (get_delta_difference): Likewise.
13766 (build_ptrmemfunc): Likewise.
13768 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
13770 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
13771 * decl.c (create_implicit_typedef): Adjust.
13772 * decl2.c (build_artificial_parm): Adjust.
13773 * method.c (implicitly_declare_fn): Adjust.
13774 * pt.c (push_inline_template_parms_recursive): Adjust.
13775 (process_template_parm): Adjust.
13776 (overloaded_template_name): Adjust.
13777 * semantics.c (finish_template_template_parm): Adjust.
13779 2000-06-28 Mark Mitchell <mark@codesourcery.com>
13781 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
13782 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
13783 where to emit thunks.
13784 (build_vtt): Adjust call to build_vtt_inits.
13785 (build_vtt_inits): Add parameter to indicate whether or not
13786 sub-VTTs for virtual bases should be included. Adjust handling of
13787 construction vtables.
13788 (get_matching_base): New function.
13789 (dfs_build_vtt_inits): Rename to ...
13790 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
13791 construction vtables.
13792 (dfs_fixup_binfo_vtbls): Likewise.
13793 (build_ctor_vtbl_groups): Build construction vtables for virtual
13795 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
13796 to build construction vtbls.
13797 (dfs_accumulate_vtbl_inits): Adjust handling of
13798 construction vtables.
13800 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
13803 2000-06-27 Mark Mitchell <mark@codesourcery.com>
13805 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
13807 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
13809 * search.c (hides): Remove.
13810 (is_subobject_of_p): Add most_derived parameter. Use
13812 (lookup_field_queue_p): Adjust.
13813 (lookup_field_r): Adjust.
13815 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
13817 * decl2.c (handle_class_head): Bash typedefs to the type's main
13820 2000-06-25 Mark Mitchell <mark@codesourcery.com>
13822 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
13823 (begin_global_stmt_expr): ... this.
13824 (genrtl_finish_stmt_expr): Rename to ...
13825 (finish_global_stmt_expr): ... this.
13826 * init.c (begin_init_stmts): Adjust calls.
13827 (finish_init_stmts): Likewise.
13828 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
13829 (begin_global_stmt_expr): ... this.
13830 (genrtl_finish_stmt_expr): Rename to ...
13831 (finish_global_stmt_expr): ... this.
13833 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13835 * search.c (lookup_member): Fix typo in comment.
13837 2000-06-24 Jason Merrill <jason@redhat.com>
13839 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
13840 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
13842 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
13844 * parse.y (complex_direct_notype_declarator): Support global_scope.
13845 * Makefile.in: Adjust conflict count.
13847 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13849 * parse.y (template_arg): Convert TEMPLATE_DECL
13850 that is a template template parameter to
13851 TEMPLATE_TEMPLATE_PARM here.
13853 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
13854 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
13855 (copy_template_template_parm): Adjust prototype.
13856 * decl.c (grokdeclarator): Remove dead code.
13857 * pt.c (process_template_parm): Tidy.
13858 (lookup_template_class): Construct nodes in
13859 copy_template_template_parm.
13860 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
13861 lookup_template_class. Use TYPE_TI_TEMPLATE.
13862 * tree.c (copy_template_template_parm): Add NEWARGS
13864 (mapcar): Adjust call to copy_template_template_parm.
13865 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
13866 * method.c (build_template_template_parm_names): Change error
13867 code to avoid compilation warning.
13869 * gxxint.texi: Document template template parameter
13872 2000-06-21 Alex Samuel <samuel@codesourcery.com>
13874 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
13875 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
13876 (cp-demangle.o): New rule.
13877 (dyn-string.o): Likewise.
13878 * inc/cxxabi.h (__cxa_demangle): New declaration.
13880 2000-06-22 Mark Mitchell <mark@codesourcery.com>
13882 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
13883 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
13884 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
13885 a tree, not an int.
13886 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
13887 (make_thunk): Change prototype.
13888 (emit_thunk): Rename to use_thunk.
13889 (mangle_thunk): Change prototype.
13890 * class.c (get_derived_offset): Simplify.
13891 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
13892 BV_GENERATE_THUNK_WITH_VTABLE_P.
13893 (build_primary_vtable): Simplify.
13894 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
13895 (dfs_find_base): Remove.
13896 (update_vtable_entry_for_fn): Correct bug in finding the base
13897 where a virtual function was first declared. Figure out whether
13898 or not to emit a vcall-thunk with the vtables in which it appears.
13899 Correct logic for deciding whether to use an ordinary thunk, or a
13901 (finish_struct_1): Remove unnecssary code.
13902 (build_vtbl_initializer): Use ssize_int for the running counter of
13904 (build_vtbl_initializer): Only use vcall thunks where necessary.
13905 Mark thunks as needing to be emitted with their vtables, or not.
13906 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
13907 indices. Use size_binop.
13908 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
13909 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
13911 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
13912 (build_vtable_entry): Mark thunks as needing to be emitted with
13913 their vtables, or not.
13914 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
13915 * decl2.c (mark_vtable_entries): Use use_thunk instead of
13917 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
13919 * error.c (dump_expr): Use BV_FN.
13920 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
13922 * method.c (make_thunk): Likewise.
13923 (emit_thunk): Rename to use_thunk. Allow callers to decide
13924 whether or not to actually emit the thunk. Adjust for changes in
13925 representation of vcall offsets.
13926 * search.c (dfs_get_pure_virtuals): Use BV_FN.
13927 * semantics.c (emit_associated_thunks): New function.
13928 (expand_body): Use it.
13929 * ir.texi: Adjust decriptions of thunks.
13931 2000-06-22 Jason Merrill <jason@redhat.com>
13933 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
13934 (tsubst_friend_function): Copy it here.
13936 * decl.c (grok_op_properties): Fix typo.
13938 * decl2.c (delete_sanity): Clarify warning, avoid failure on
13941 * pt.c (check_explicit_specialization): Clarify error.
13943 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
13944 an old OVERLOAD when we're declaring a non-function.
13945 (pushdecl, destroy_local_var): Check for error_mark_node.
13946 (warn_extern_redeclared_static): Also bail early if
13947 we're a CONST_DECL.
13948 (push_overloaded_decl): Ignore an old error_mark_node.
13950 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
13952 * call.c (build_x_va_arg): Check if in a template decl.
13953 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
13955 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13957 * class.c (push_lang_context): TYPE_NAME gets you to the Java
13959 * decl.c (check_goto): Computed gotos assumed OK.
13961 2000-06-20 Jason Merrill <jason@redhat.com>
13963 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
13964 for which we don't need to look for instantiations.
13966 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
13968 * parse.y (program): Always call finish_translation_unit.
13969 * parse.c, parse.h: Rebuilt.
13971 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
13973 * method.c: Don't include hard-reg-set.h.
13975 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
13977 * rtti.c (get_base_offset): Cope when vbase field is in a base.
13979 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
13981 * call.c (build_conditional_expr): Use VOID_TYPE_P.
13982 * cvt.c (cp_convert_to_pointer): Likewise.
13983 (convert_to_void): Likewise.
13984 * error.c (dump_expr): Likewise.
13985 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
13986 * init.c (build_delete): Likewise.
13987 * method.c (emit_thunk): Likewise.
13988 * optmize.c (declare_return_variable): Likewise.
13989 * rtti.c (get_tinfo_decl_dynamic): Likewise.
13990 (get_typeid): Likewise.
13991 (build_dynamic_cast_1): Likewise.
13992 * typeck.c (composite_pointer_type): Likewise.
13993 (common_type): Likewise.
13994 (build_indirect_ref): Likewise.
13995 (build_binary_op): Likewise.
13996 (build_x_compound_expr): Likewise.
13997 (check_return_expr): Likewise.
13998 * typeck2.c (add_exception_specifier): Likewise.
14000 * mangle.c (write_method_parms): Use direct comparison for end
14003 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
14005 * cp-tree.h (genrtl_try_block): Declare function.
14006 (genrtl_handler): Likewise.
14007 (genrtl_catch_block): Likewise.
14008 (genrtl_ctor_stmt): Likewise.
14009 (genrtl_subobject): Likewise.
14010 (genrtl_decl_cleanup): Likewise.
14011 (genrtl_do_poplevel): Likewise.
14012 (genrtl_do_pushlevel): Likewise.
14013 (genrtl_clear_out_block): Likewise.
14014 (genrtl_goto_stmt): Likewise.
14015 (genrtl_expr_stmt): Likewise.
14016 (genrtl_decl_stmt): Likewise.
14017 (genrtl_if_stmt): Likewise.
14018 (genrtl_while_stmt): Likewise.
14019 (genrtl_do_stmt): Likewise.
14020 (genrtl_return_stmt): Likewise.
14021 (genrtl_for_stmt): Likewise.
14022 (genrtl_break_stmt): Likewise.
14023 (genrtl_continue_stmt): Likewise.
14024 (genrtl_scope_stmt): Likewise.
14025 (genrtl_switch_stmt): Likewise.
14026 (genrtl_case_label): Likewise.
14027 (genrtl_begin_compound_stmt): Likewise.
14028 (genrtl_finish_compound_stmt): Likewise.
14029 (genrtl_compound_stmt): Likewise.
14030 (genrtl_asm_stmt): Likewise.
14031 (genrtl_named_return_value): Likewise.
14032 (genrtl_begin_stmt_expr): Likewise.
14033 (genrtl_finish_stmt_expr): Likewise.
14034 (finish_for_stmt): Removed first argument.
14035 (finish_switch_stmt): Likewise.
14037 * semantics.c (genrtl_try_block): Define function.
14038 (genrtl_handler): Likewise.
14039 (genrtl_catch_block): Likewise.
14040 (genrtl_ctor_stmt): Likewise.
14041 (genrtl_subobject): Likewise.
14042 (genrtl_decl_cleanup): Likewise.
14043 (genrtl_do_poplevel): Likewise.
14044 (genrtl_do_pushlevel): Likewise.
14045 (genrtl_clear_out_block): Likewise.
14046 (genrtl_goto_stmt): Likewise.
14047 (genrtl_expr_stmt): Likewise.
14048 (genrtl_decl_stmt): Likewise.
14049 (genrtl_if_stmt): Likewise.
14050 (genrtl_while_stmt): Likewise.
14051 (genrtl_do_stmt): Likewise.
14052 (genrtl_return_stmt): Likewise.
14053 (genrtl_for_stmt): Likewise.
14054 (genrtl_break_stmt): Likewise.
14055 (genrtl_continue_stmt): Likewise.
14056 (genrtl_scope_stmt): Likewise.
14057 (genrtl_switch_stmt): Likewise.
14058 (genrtl_case_label): Likewise.
14059 (genrtl_begin_compound_stmt): Likewise.
14060 (genrtl_finish_compound_stmt): Likewise.
14061 (genrtl_compound_stmt): Likewise.
14062 (genrtl_asm_stmt): Likewise.
14063 (genrtl_named_return_value): Likewise.
14064 (genrtl_begin_stmt_expr): Likewise.
14065 (genrtl_finish_stmt_expr): Likewise.
14066 (finish_for_stmt): Removed first argument and generate rtl
14068 (finish_switch_stmt): Likewise.
14069 (do_poplevel): Removed generate rtl specific code.
14070 (do_pushlevel): Likewise.
14071 (add_tree): Likewise.
14072 (finish_goto_stmt): Likewise.
14073 (finish_expr_stmt): Likewise.
14074 (begin_if_stmt): Likewise.
14075 (finish_if_stmt_cond): Likewise.
14076 (finish_then_clause): Likewise.
14077 (begin_else_clause): Likewise.
14078 (finish_else_clause): Likewise.
14079 (finish_if_stmt): Likewise.
14080 (clear_out_block): Likewise.
14081 (begin_while_stmt): Likewise.
14082 (finish_while_stmt_cond): Likewise.
14083 (finish_while_stmt): Likewise.
14084 (begin_do_stmt): Likewise.
14085 (finish_do_body): Likewise.
14086 (finish_do_stmt): Likewise.
14087 (finish_return_stmt): Likewise.
14088 (begin_for_stmt): Likewise.
14089 (finish_for_init_stmt): Likewise.
14090 (finish_for_cond): Likewise.
14091 (finish_for_expr): Likewise.
14092 (finish_break_stmt): Likewise.
14093 (finish_continue_stmt): Likewise.
14094 (begin_switch_stmt): Likewise.
14095 (finish_switch_cond): Likewise.
14096 (finish_case_label): Likewise.
14097 (begin_try_block): Likewise.
14098 (begin_function_try_block): Likewise.
14099 (finish_try_block): Likewise.
14100 (finish_cleanup_try_block): Likewise.
14101 (finish_cleanup): Likewise.
14102 (finish_function_try_block): Likewise.
14103 (finish_handler_sequence): Likewise.
14104 (finish_function_handler_sequence): Likewise.
14105 (begin_handler): Likewise.
14106 (finish_handler_parms): Likewise.
14107 (begin_catch_block): Likewise.
14108 (finish_handler): Likewise.
14109 (begin_compound_stmt): Likewise.
14110 (finish_compound_stmt): Likewise.
14111 (finish_asm_stmt): Likewise.
14112 (finish_label_stmt): Likewise.
14113 (finish_label_decl): Likewise.
14114 (finish_subobject): Likewise.
14115 (finish_decl_cleanup): Likewise.
14116 (finish_named_return_value): Likewise.
14117 (begin_stmt_expr): Likewise.
14118 (finish_stmt_expr): Likewise.
14120 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
14121 to call genrtl_expr_stmt when appropriate.
14123 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
14124 begin_compound_expr to call genrtl_begin_stmt_expr and
14125 genrtl_begin_compound_expr when appropriate.
14126 (finish_init_stmts): Changed calls to finish_compound_expr and
14127 finish_stmt_expr to call genrtl_finish_compound_expr and
14128 genrtl_finish_stmt_expr when appropriate.
14129 (expand_default_init): Changed call to finish_expr_stmt to call
14130 genrtl_expr_stmt when appropriate.
14131 (build_vec_init): Likewise.
14133 * parse.y (simple_stmt): Removed first argument from call to
14134 finish_for_stmt. Removed first argument from call to
14135 finish_switch_stmt.
14137 * parse.c: Regenerated.
14139 * pt.c (tsubst_expr): Removed first argument from call to
14140 finish_for_stmt. Removed first argument from call to
14141 finish_switch_stmt.
14143 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
14145 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
14146 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
14148 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
14149 (cplus_tree_code_length[]): Likewise.
14150 (cplus_tree_code_name[]): Likewise.
14151 (init_parse): Added call to add_c_tree_codes. Changed
14152 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
14154 2000-06-16 Mark Mitchell <mark@codesourcery.com>
14156 * cp-tree.h (finish_mem_initializers): Declare.
14157 (count_trees): Likewise.
14158 * parse.y (base_init): Use finish_mem_initializers.
14159 * semantics.c (finish_mem_initializers): New function.
14161 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
14162 the number of trees.
14164 (count_trees): Don't use it.
14166 2000-06-15 Jason Merrill <jason@redhat.com>
14168 * tree.c (count_trees): New debugging function.
14170 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
14171 * init.c (build_member_call): Pull out the name of a DECL.
14173 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
14174 * semantics.c (expand_body): Push to TV_INTEGRATION here.
14175 * optimize.c (optimize_function): Not here.
14176 * pt.c (instantiate_decl): Push to TV_PARSE.
14178 2000-06-15 Mark Mitchell <mark@codesourcery.com>
14180 * cp-tree.h (struct language_function): Remove x_base_init_list
14181 and x_member_init_list.
14182 (current_base_init_list): Remove.
14183 (current_member_init_list): Likewise.
14184 (setup_vtbl_ptr): Change prototype.
14185 (emit_base_init): Likewise.
14186 (expand_member_init): Likewise.
14187 (reinit_parse_for_function): Remove.
14188 * decl.c (save_function_data): Don't clear x_base_init_list and
14189 x_member_init_list.
14190 (mark_language_function): Don't mark them.
14191 * init.c (perform_member_init): Tweak comment.
14192 (sort_member_init): Take the list of initializers as an argument.
14193 (sort_base_init): Likewise.
14194 (emit_base_init): Likewise.
14195 (expand_member_init): Return the initializer. Don't use global
14197 * lex.c (reinit_parse_for_function): Remove.
14198 * method.c (build_template_parm_names): Correct substitution.
14199 (do_build_copy_constructor): Don't use current_member_init_list
14200 and current_base_init_list.
14201 (synthesize_method): Likewise.
14202 * parse.y (base_init): Split mem-initializers into
14203 base-initializers and field-initializers.
14204 (member_init_list): Build up the list here.
14205 (member_init): Return the initializer.
14206 (fn.depfn): Don't use reinit_parse_for_function.
14207 * parse.c: Regenerated.
14208 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
14210 (tsubst_expr): Don't use current_member_init_list
14211 and current_base_init_list.
14212 (tsubst_expr_values): Rename to ...
14213 (tsubst_initializer_list): ... this. Use convert_from_reference.
14214 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
14215 and current_base_init_list.
14216 (begin_function_definition): Don't call reinit_parse_for_function.
14218 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
14220 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
14223 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
14225 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
14227 * cp-tree.h (IF_COND): Move to c-common.h.
14228 (THEN_CLAUSE): Likewise.
14229 (ELSE_CLAUSE): Likewise.
14230 (WHILE_COND): Likewise.
14231 (WHILE_BODY): Likewise.
14232 (DO_COND): Likewise.
14233 (DO_BODY): Likewise.
14234 (RETURN_EXPR): Likewise.
14235 (EXPR_STMT_EXPR): Likewise.
14236 (FOR_INIT_STMT): Likewise.
14237 (FOR_COND): Likewise.
14238 (FOR_EXPR): Likewise.
14239 (FOR_BODY): Likewise.
14240 (SWITCH_COND): Likewise.
14241 (SWITCH_BODY): Likewise.
14242 (CASE_LOW): Likewise.
14243 (CASE_HIGH): Likewise.
14244 (GOTO_DESTINATION): Likewise.
14245 (COMPOUND_BODY): Likewise.
14246 (ASM_CV_QUAL): Likewise.
14247 (ASM_STRING): Likewise.
14248 (ASM_OUTPUTS): Likewise.
14249 (ASM_INPUTS): Likewise.
14250 (ASM_CLOBBERS): Likewise.
14251 (DECL_STMT_DECL): Likewise.
14252 (STMT_EXPR_STMT): Likewise.
14253 (LABEL_STMT_LABEL): Likewise.
14254 (SCOPE_BEGIN_P): Likewise.
14255 (SCOPE_END_P): Likewise.
14256 (SCOPE_STMT_BLOCK): Likewise.
14257 (SCOPE_NULLIFIED_P): Likewise.
14258 (SCOPE_NO_CLEANUPS_P): Likewise.
14259 (SCOPE_PARTIAL_P): Likewise.
14260 (ASM_VOLATILE_P): Likewise.
14261 (STMT_LINENO): Likewise.
14262 (STMT_LINENO_FOR_FN_P): Likewise.
14264 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
14265 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
14266 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
14267 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
14268 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
14270 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
14272 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
14273 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
14275 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
14276 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
14277 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
14279 2000-06-14 Mark Mitchell <mark@codesourcery.com>
14281 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
14282 * class.c (dfs_find_final_overrider): Set it appropriately.
14283 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
14284 avoid unneeded secondary vptrs.
14286 2000-06-13 Jakub Jelinek <jakub@redhat.com>
14288 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
14289 (check_bitfield_decl, check_field_decl): Likewise.
14290 (build_vtbl_or_vbase_field, build_base_field): Likewise.
14291 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
14292 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
14293 (xfer_tag, finish_enum): Likewise.
14294 * decl2.c (finish_builtin_type): Likewise.
14295 * init.c (init_init_processing): Likewise.
14296 * pt.c (instantiate_class_template): Likewise.
14297 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
14298 * cp-tree.h (struct lang_type): Add user_align member.
14299 (CLASSTYPE_USER_ALIGN): Define.
14301 2000-06-13 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
14303 * Make-lang.in (c++.install-common): Install g++-cross in
14304 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
14305 $(target_alias)-g++ and $(target_alias)-c++.
14307 2000-06-12 Mark Mitchell <mark@codesourcery.com>
14309 * class.c (vcall_offset_data_s): Add last_init and fns.
14310 (overrides): Rename to same_signature_p.
14311 (dfs_find_final_overrider): Adjust accordingly.
14312 (mark_overriders): Likewise.
14313 (warn_hidden): Likewise.
14314 (build_vtbl_initializer): Reorganize machinery for building things
14315 at negative offsets.
14316 (build_vcall_and_vbase_vtbl_entries): Likewise.
14317 (build_vbase_offset_vtbl_entries): Likewise.
14318 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
14319 offset entries. Do not create two entries for functions with the
14321 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
14322 (build_rtti_vtbl_entries): Reorganize machinery for building things
14323 at negative offsets.
14325 * optimize.c (expand_call_inline): Don't recurse into the code
14326 used to initialize the parameters more than once.
14328 2000-06-11 Mark Mitchell <mark@codesourcery.com>
14330 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
14331 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
14332 (find_substitution): Only use the `Sa' substitution for
14333 std::allocator, not instantiations of it.
14334 (write_template_prefix): Move comment. Only use a TREE_LIST to
14335 represent substitutions for a member template.
14336 (write_array_type): Mangle array dimensions correctly.
14337 * optimize.c (maybe_clone_body): Copy more information from the
14339 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
14340 on the regenerated declaration.
14342 2000-06-11 Chip Salzenberg <chip@valinux.com>
14343 Mark Mitchell <mark@codesourcery.com>
14345 * class.c (build_vtable): Clarify comment.
14346 (build_ctor_vtbl_group): Pass the most derived type to
14349 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14351 * decl2.c (compare_options): Don't needlessly cast away const-ness.
14353 2000-06-10 Mark Mitchell <mark@codesourcery.com>
14355 * decl.c (add_binding): Handle duplicate declarations of external
14358 2000-06-09 Chip Salzenberg <chip@valinux.com>
14359 Mark Mitchell <mark@codesourcery.com>
14361 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
14363 (write_signed_number): New macro.
14364 (write_unsigned_number): Likewise.
14365 (write_source_name): Use them.
14366 (write_number): Handle signed and unsigned values.
14367 (write_integer_cst): Use tree_int_cst_sgn, and use
14368 write_unsigned_number or write_signed_number as appropriate.
14369 (write_discriminator): Use write_unsigned_number or
14370 write_signed_number as appropriate.
14371 (write_template_arg_literal): Likewise.
14372 (write_array_type): Use tree_low_cst.
14373 (write_template_parm): Use write_unsigned_number or
14374 write_signed_number as appropriate.
14375 (write_substitution): Adjust call to write_number.
14376 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
14377 (write_expression): Handle non-type template arguments of
14378 reference type correctly.
14379 (mangle_thunk): Use write_signed_number.
14381 2000-06-09 Chip Salzenberg <chip@valinux.com>
14383 * mangle.c (find_substition): Don't mangle objects with typename
14384 substitutions (e.g. "cin" as "Si").
14386 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
14388 * call.c (add_candidate): Use ggc_alloc_cleared.
14389 * decl.c (lookup_label): Likewise.
14390 * lex.c (retrofit_lang_decl): Likewise.
14392 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
14394 * semantics.c (expand_body): Push to TV_EXPAND.
14395 * optimize.c (optimize_function): Push to TV_INTEGRATION.
14396 * decl.c (start_function): Always call announce_function.
14398 * tinfo2.cc: Just declare abort.
14400 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
14402 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
14403 whenever @ is a symbolic name.
14405 2000-06-08 Jakub Jelinek <jakub@redhat.com>
14407 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
14409 2000-06-07 Mark Mitchell <mark@codesourcery.com>
14411 * decl.c (pushdecl): Look up functions by DECL_NAME, not
14412 DECL_ASSEMBLER_NAME.
14414 2000-06-06 Mark Mitchell <mark@codesourcery.com>
14416 * decl2.c (c_language): Define.
14418 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
14420 * lex.c (lang_init_options): Tweak.
14422 * decl2.c: Remove #inclusion of diagnostic.h
14423 (lang_decode_option): Move diagnostic formatting options to
14426 * lang-options.h: Remove documentation for diagnostic options.
14428 * Makefile.in (lex.o): Depends upon diagnostic.h
14430 2000-06-06 Mark Mitchell <mark@codesourcery.com>
14432 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
14433 the same DECL_RESULT, it's not a redefinition.
14434 * pt.c (tsubst_decl): Remove code to handle illegal
14437 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
14439 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
14441 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
14443 * search.c (maybe_suppress_debug_info): Don't check
14444 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
14446 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
14449 Remember instantiation context in deferred instantiations.
14450 * cp-tree.h (struct tinst_level): Remove.
14451 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
14452 * pt.c (current_tinst_level): Now a tree.
14453 (print_template_context, push_tinst_level, pop_tinst_level,
14454 tinst_for_decl): Adjust.
14455 (reopen_tinst_level): New fn.
14456 (init_pt): Register current_tinst_level as a root.
14457 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
14458 of the pending templates list.
14459 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
14460 * lex.c (extract_interface_info): Adjust.
14461 * decl2.c (warn_if_unknown_interface): Adjust.
14463 2000-06-05 Mark Mitchell <mark@codesourcery.com>
14465 * class.c (indirect_primary_base_p): New function.
14466 (determine_primary_base): Use it.
14468 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
14470 Update new-abi dynamic cast algorithm.
14471 * tinfo.cc (__class_type_info::__dyncast_result): Add
14472 whole_details. Adjust constructor.
14473 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
14474 Avoid unnecessary searching.
14475 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
14477 2000-06-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14479 * decl.c (init_decl_processing): Don't call record_component_aliases.
14480 * tree.c (build_cplus_array_type_1): Likewise.
14482 2000-06-04 Mark Mitchell <mark@codesourcery.com>
14484 * ir.texi: Correct typo.
14485 * mangle.c (write_expression): Handle non-type template arguments
14486 with reference type.
14487 * method.c (build_overload_value): Likewise.
14488 * pt.c (convert_nontype_argument): Explicitly represent conversion
14489 to a reference with an ADDR_EXPR.
14490 (unify): Always unify arguments in left-to-right order.
14492 2000-06-03 Alex Samuel <samuel@codesourcery.com>
14493 Mark Mitchell <mark@codesourcery.com>
14495 * Make-lang.in (CXX_SRCS): Add mangle.c.
14496 * Makefile.in (CXX_OBJS): Add mangle.o.
14497 (mangle.o): New rule.
14499 * class.c (local_classes): New variable.
14500 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
14501 (get_vtt_name): Use mangle_vtt_name for new ABI.
14502 (init_class_processing): Initialize local_classes.
14503 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
14504 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
14505 (std_identifier): New macro.
14506 (DECL_VOLATILE_MEMFUNC_P): New macro.
14507 (DECL_NAMESPACE_STD_P): Likewise.
14508 (local_classes): Declare.
14509 (get_mostly_instantiated_function_type): Declare.
14510 (init_mangle): Declare.
14511 (mangle_decl): Likewise.
14512 (mangle_type_string): Likewise.
14513 (mangle_type): Likewise.
14514 (mangle_typeinfo_for_type): Likewise.
14515 (mangle_typeinfo_string_for_type): Likewise.
14516 (mangle_vtbl_for_type): Likewise.
14517 (mangle_vtt_for_type): Likewise.
14518 (mangle_ctor_vtbl_for_type): Likewise.
14519 (mangle_thunk): Likewise.
14520 (mangle_conv_op_name_for_type): Likewise.
14521 (mangle_guard_variable): Likewise.
14522 * decl.c (pushtag): Keep track of local classes.
14523 (initialize_predefined_identifiers): Initialize std_identifier.
14524 (init_decl_processing): Use std_identifier.
14525 (start_decl): Don't treat instantiations as specializations.
14526 (grokdeclarator): Likewise.
14527 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
14528 name for fully-instantiated templates.
14529 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
14530 destructors with the new ABI.
14531 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
14532 (grokfield): Use mangle_type for new ABI.
14533 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
14534 (get_sentry): Use mangle_guard_variable for new ABI.
14535 (start_static_initialization_or_destruction): Likewise.
14536 * expr.c (extract_aggr_init): Remove.
14537 (extract_scalar_init): Likewise.
14538 (extract_init): Remove #if 0'd code.
14539 * mangle.c: New function.
14540 * method.c (build_mangled_name): Assert not flag_new_abi.
14541 (build_static_name): Likewise.
14542 (build_decl_overload_real): Likewise.
14543 (build_typename_overload): Likewise.
14544 (build_overload_with_type): Likewise.
14545 (build_overload_name): Likewise.
14546 (get_ctor_vtbl_name): Likewise.
14547 (start_squangling): Likewise.
14548 (get_id_2): Likewise.
14549 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
14550 (init_method): Call init_mangle for new ABI.
14551 (make_thunk): Call mangle_thunk for new ABI.
14552 * operators.def: Correct new ABI manglings for the `%' operator.
14554 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
14555 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
14556 (lookup_template_class): Call mangle_decl for new ABI.
14557 (get_mostly_instantiated_function_type): New function.
14558 (set_mangled_name_for_template_decl): Use it.
14559 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
14560 the new ABI. Use mangle_conv_op_name_for_type for instantiated
14561 conversion op names.
14562 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
14563 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
14564 (tinfo_base_init): Likewise. Mangle typeinfo string name with
14565 mangle_typeinfo_string_for_type.
14567 2000-06-03 Mark Mitchell <mark@codesourcery.com>
14569 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
14570 (INNERMOST_TEMPLATE_ARGS): New macro.
14571 (innermost_args): Remove.
14572 (get_innermost_template_args): New function.
14573 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
14574 * error.c (dump_function_decl): Be caution when using
14575 most_general_template.
14576 * method.c (build_template_parm_names): Use
14577 INNERMOST_TEMPLATE_ARGS.
14578 * pt.c (add_to_template_args): Tidy comment
14579 (get_innermost_template_args): New function.
14580 (check_explicit_specialization): Clear DECL_INITIAL for a new
14582 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
14584 (push_template_decl): Always register specializations of the most
14586 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
14587 (coerce_template_parms): Likewise.
14588 (lookup_template_class): Likewise.
14589 (innermost_args): Remove.
14590 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
14591 (tsubst_decl): Handle tricky specializations. Use
14592 get_innermost_template_args.
14593 (instantiate_template): Simplify handling of partial
14595 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
14596 (most_general_template): Reimplement, in a more straightforward
14598 (regenerate_decl_from_template): Tweak formatting. Use
14599 TMPL_ARGS_DEPTH for clarity.
14600 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
14602 * dump.c (dequeue_and_dump): Dump information about thunks.
14604 2000-06-01 Richard Henderson <rth@cygnus.com>
14606 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
14608 2000-06-01 Richard Henderson <rth@cygnus.com>
14610 * decl2.c (unsupported_options): Fix typo, make const.
14611 (lang_decode_option): Fix bsearch argument order.
14613 2000-06-01 Mark Mitchell <mark@codesourcery.com>
14615 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
14618 2000-05-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14620 * cp-tree.h (c_get_alias_set): Deleted.
14621 * Makefile.in (decl.o): Include ../expr.h.
14622 * decl.c (expr.h): Include.
14623 (init_decl_processing): Call record_component_aliases for arrays.
14624 (grokdeclarator): Likewise.
14625 Set TREE_ADDRESSABLE for fields that aren't bitfields.
14626 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
14628 2000-05-31 Mark Mitchell <mark@codesourcery.com>
14630 Remove guiding declaration support.
14631 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
14632 (flag_guiding_decls): Remove.
14633 * call.c (build_user_type_conversion_1): Remove support for
14635 (build_new_function_call): Likewise.
14636 (build_new_op): Likewise.
14637 (build_new_method_call): Likewise.
14638 * decl.c (start_function): Likewise.
14639 * friend.c (is_friend): Likewise.
14640 (do_friend): Likewise.
14641 * decl2.c ((flag_dump_translation_unit): Make it const.
14642 (flag_guiding_decls): Remove.
14643 (unsupported_options): New variable
14644 (compare_options): New function.
14645 (lang_decode_option): Use them.
14647 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
14649 * method.c (mangle_expression): Adjust test for legal expression
14652 * pt.c (instantiate_decl): Save and restore the local
14653 specializations list.
14655 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
14657 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
14659 2000-05-30 Mark Mitchell <mark@codesourcery.com>
14661 * call.c (add_template_candidate_real): Handle member template
14662 constructors for classes with virtual bases.
14663 (build_user_type_conversion_1): Use in_charge_arg_for_name.
14664 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
14666 * ir.texi: Update thunk documentation.
14668 * call.c (joust): Fix handling of overloaded builtin operators.
14670 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
14672 * cp-tree.h (DECL_ANTICIPATED): New macro.
14673 Document new use of DECL_LANG_FLAG_7.
14674 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
14675 in the user namespace.
14676 * lex.c (do_identifier): If the identifier's declaration has
14677 DECL_ANTICIPATED on, it has not yet been declared. But do not
14678 replace it with an ordinary implicit declaration.
14680 * tinfo2.cc: Include stdlib.h.
14682 2000-05-29 Mark Mitchell <mark@codesourcery.com>
14684 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
14685 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
14688 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
14690 * decl2.c (lang_decode_option): Use skip_leading_substring instead
14693 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
14695 * operators.def (<?): Duplicated, should have been...
14698 2000-05-27 Alex Samuel <samuel@codesourcery.com>
14699 Mark Mitchell <mark@codesourcery.com>
14701 * cp-tree.h (ansi_opname): Make it a macro.
14702 (ansi_assopname): Likewise.
14703 (struct lang_decl_flags): Add assignment_operator_p.
14704 (struct lang_decl): Add operator_code.
14705 (DECL_VTT_PARM): Adjust.
14706 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
14707 overloaded operator.
14708 (SET_OVERLOADED_OPERATOR_CODE): New macro.
14709 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
14710 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
14711 (opname_tab): Remove.
14712 (assignop_tab): Likewise.
14713 (operator_name_info_t): New type.
14714 (operator_name_info): New variable.
14715 (assignment_operator_name_info): Likewise.
14716 (build_cp_library_fn): Remove declaration.
14717 (push_cp_library_fn): Likewise.
14718 (operator_name_string): Likewise.
14719 (build_decl_overload): Likewise.
14720 * call.c (print_z_candidates): Simplify.
14721 (build_object_call): Adjust usage of ansi_opname. Use
14722 DECL_OVERLOADED_OPERATOR_P.
14723 (op_error): Adjust operator name lookup.
14724 (build_conditional_expr): Adjust usage of ansi_opname.
14725 (build_new_op): Likewise.
14726 (build_op_delete_call): Likewise.
14727 (build_over_call): Likewise.
14728 (joust): Use DECL_OVERLOADED_OPERATOR_P.
14729 * decl.c (duplicate_decls): Copy operator_code.
14730 (init_decl_processing): Adjust parameters to push_cp_library_fn.
14731 (builtin_function): Adjust parameters to build_library_fn_1.
14732 (build_library_fn_1): Accept an overloaded operator code.
14733 (build_library_fn): Pass ERROR_MARK.
14734 (build_cp_library_fn): Accept an overloaded operator code.
14735 (push_cp_library_fn): Likewise.
14736 (grokfndecl): Tweak.
14737 (grokdeclarator): Simplify code to compute names of overloaded
14738 operators. Adjust use of ansi_opname.
14739 (ambi_op_p): Work on tree_codes, not identifiers.
14740 (unary_op_p): Likewise.
14741 (grok_op_properties): Likewise.
14742 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
14743 (lang_mark_tree): Don't try to mark the operator_code.
14744 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
14745 * error.c (dump_decl): Remove special handling for operator
14747 (dump_function_name): Likewise.
14748 (dump_expr): Adjust name lookup of operators.
14749 (op_to_string): Simplify.
14750 (assop_to_string): Likewise.
14751 * init.c (build_new_1): Adjust use of ansi_opname.
14752 * lex.c (opname_tab): Remove.
14753 (assignop_tab): Likewise.
14754 (ansi_opname): Likewise.
14755 (ansi_assopname): Likewise.
14756 (operator_name_string): Likewise.
14757 (reinit_lang_specific): Likewise.
14758 (operator_name_info): New variable.
14759 (assignment_operator_name_info): Likewise.
14760 (init_operators): New function.
14761 (init_parse): Use it.
14762 (do_identifier): Adjust use of ansi_opname.
14763 * method.c (mangle_expression): Don't use ansi_opname for
14765 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
14766 (build_decl_overload): Remove.
14767 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
14768 (do_build_assign_ref): Adjust use of ansi_opname.
14769 (synthesize_method): Likewise.
14770 (implicitly_declare_fn): Likewise.
14771 * operators.def: New file.
14772 * parse.y (operator): Adjust use of ansi_opname.
14773 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
14774 (set_mangled_name_for_template_decl): Don't play games with
14776 (special_function_p): Adjust use of ansi_opname.
14777 * typeck.c (check_return_expr): Likewise.
14778 * Make-lang.in (cc1plus): Depend on operators.def.
14779 * Makefile.in (lex.o): Likewise.
14780 (decl.o): Likewise.
14782 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
14784 * Make-lang.in (cplib2.ready): Eradicate.
14786 2000-05-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14788 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
14789 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
14790 (built_min, cp_tree_equal): Likewise.
14792 2000-05-26 Mark Mitchell <mark@codesourcery.com>
14794 * class.c (layout_nonempty_base_or_field): Replace
14795 `record_layout_info' with `record_layout_info_s'.
14797 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
14800 * cp-tree.h (struct language_function): x_named_labels is now
14801 a struct named_label_list*.
14802 * decl.c (struct named_label_use_list): Renamed from...
14803 (struct named_label_list): ...this. New struct.
14804 (push_binding_level): Don't set eh_region.
14805 (note_level_for_eh): New fn.
14806 (pop_label): Take label and old value directly.
14807 (pop_labels): Adjust for new named_labels format.
14808 (lookup_label): Likewise.
14809 (poplevel): Note characteristics of a binding level containing a
14810 named label. Mess with named label lists earlier.
14811 (mark_named_label_lists): New fn.
14812 (mark_lang_function): Call it.
14813 (use_label): New fn, split out from...
14814 (make_label_decl): ...here. Don't call it.
14815 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
14816 check_previous_gotos): New fns, split out from...
14817 (define_label): ...here.
14818 (check_switch_goto): New fn.
14819 (define_case_label): Call it.
14820 (check_goto): New fn.
14821 * semantics.c (finish_goto_stmt): Call it and use_label.
14822 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
14823 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
14825 2000-05-26 Mark Mitchell <mark@codesourcery.com>
14827 * class.c (build_vtable_entry_ref): Correct usage of
14828 get_vtbl_decl_for_binfo.
14830 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
14831 * method.c (implicitly_declare_fn): Not here.
14833 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
14835 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
14836 (CPTI_PTMD_DESC_TYPE): ... here.
14837 (ptmd_desc_type_node): Rename to ...
14838 (ptm_desc_type_node): ... here.
14839 * decl.c: Likewise.
14840 * rtti.c (ptmd_initializer): Rename to ...
14841 (ptm_initializer): ... here.
14842 (sythesize_tinfo_var): Adjust. Deal with pointer to member
14844 (create_tinfo_types): Adjust.
14846 2000-05-25 Mark Mitchell <mark@codesourcery.com>
14848 Finish implementation of VTTs.
14849 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
14850 CPTI_VTT_PARM_IDENTIFIER.
14851 (vtt_parm_identifier): New macro.
14852 (vtt_parm_type): Likewise.
14853 (BINFO_SUBVTT_INDEX): Likewise.
14854 (BINFO_VPTR_INDEX): Likewise.
14855 (struct lang_decl): Add vtt_parm.
14856 (DECL_VTT_PARM): New macro.
14857 (DECL_USE_VTT_PARM): Likewise.
14858 (DECL_NEEDS_VTT_PARM_P): Likewise.
14859 (get_vtt_name): Declare.
14860 (build_artificial_parm): Likewise.
14861 (fixup_all_virtual_upcast_offsets): Likewise.
14862 (expand_indirect_vtbls_init): Remove.
14863 * call.c (build_new_method_call): Pass the vtt to subobject
14864 constructors and destructors.
14865 * class.c (get_vtt_name): Give it external linkage.
14866 (build_clone): Handle the magic VTT parameters for clones.
14867 (clone_function_decl): Fix typo in comment.
14868 (build_vtt): Keep track of the indices in the VTTs where various
14869 entities are stored.
14870 (build_vtt_inits): Likewise.
14871 (dfs_build_vtt_inits): Likewise.
14872 (build_ctor_vtbl_group): Tweak type of construction vtables.
14873 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
14874 primary bases, when building construction vtables.
14875 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
14876 (initialize_predefined_identifiers): Add vtt_parm_identifier.
14877 (init_decl_processing): Initialize vtt_parm_type.
14878 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
14879 (lang_mark_tree): Make vtt_parm.
14880 * decl2.c (build_artificial_parm): New function.
14881 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
14882 (grokclassfn): Use build_artificial_parm.
14883 * init.c (initialize_vtbl_ptrs): Call
14884 fixup_all_virtual_upcast_offsets directly.
14885 (perform_member_init): Use the complete subobject destructor for
14887 (build_vtbl_address): New function.
14888 (expand_virtual_init): Handle VTTs.
14889 * optimize (maybe_clone_body): Likewise.
14890 * search.c (fixup_all_virtual_upcast_offsets): Give it external
14892 (expand_indirect_vtbls_init): Remove.
14893 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
14894 * tree.c (make_binfo): Make them bigger.
14896 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
14898 * inc/cxxabi.h (__pbase_type_info): Define, based on
14899 __pointer_type_info.
14900 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
14901 (__pointer_to_member_type_info): Likewise.
14902 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
14903 (__pointer_to_member_type_info::__is_pointer_p): Remove.
14904 (__pointer_type_info::__do_catch): Rename to ...
14905 (__pbase_type_info::__do_catch): ... here. Adjust.
14906 (__pbase_type_info::__pointer_catch): Implement.
14907 (__pointer_type_info::__pointer_catch): Adjust.
14908 (__pointer_to_member_type_info::__pointer_catch): Adjust.
14910 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
14912 * tinfo.h (__user_type_info::contained_virtual_p): New
14914 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
14916 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
14917 diamond shaped hierarchy. Add early out for mixed diamond and
14918 duplicate shaped hierarchy.
14920 2000-05-24 Mark Mitchell <mark@codesourcery.com>
14922 * cp-tree.h (build_delete): Change prototype.
14923 (build_vec_delete): Likewise.
14924 * call.c (build_scoped_method_call): Use special_function_kind
14925 values to indicate the kind of destruction to be done.
14926 (build_method_call): Likewise.
14927 * decl.c (finish_destructor_body): Likewise.
14928 (maybe_build_cleanup_1): Likewise. Rename to ...
14929 (maybe_build_cleanup): ... this.
14930 * decl2.c (delete_sanity): Use special_function_kind
14931 values to indicate the kind of destruction to be done.
14932 (build_cleanup): Likewise.
14933 * init.c (perform_member_init): Likewise.
14934 (build_vec_delete_1): Likewise.
14935 (build_dtor_call): Simplify.
14936 (build_delete): Use special_function_kind
14937 values to indicate the kind of destruction to be done.
14938 (build_vbase_delete): Likewise.
14939 (build_vec_delete): Likewise.
14941 * init.c (sort_member_init): Fix typo in error message generation
14944 2000-05-15 Donald Lindsay <dlindsay@cygnus.com>
14946 * semantics.c (begin_class_definition): make the packed
14947 attribute be sensitive to the "-fpack-struct" command line flag
14949 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
14951 Update new-abi upcast algorithm.
14952 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
14953 prototype and meaning of return value.
14954 (__si_class_type_info::__do_upcast): Likewise.
14955 (__vmi_class_type_info::__do_upcast): Likewise.
14956 * tinfo.cc (__class_type_info::__upcast_result): Replace
14957 whole2dst with part2dst. Adjust ctor.
14958 (__class_type_info::__do_upcast): Adjust call of worker function.
14959 (__class_type_info::__do_upcast): Adjust.
14960 (__si_class_type_info::__do_upcast): Adjust. Use parent's
14962 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
14963 virtual base in diamond hierarchy bug.
14965 2000-05-23 Mark Mitchell <mark@codesourcery.com>
14967 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
14968 and bitfield to tinfo_fn_p.
14969 (DECL_TINFO_FN_P): Adjust.
14970 (SET_DECL_TINFO_FN_P): Likewise.
14971 (DECL_MUTABLE_P): Likewise.
14972 (DECL_C_BIT_FIELD): Likewise.
14973 (SET_DECL_C_BIT_FIELD): Likewise.
14974 (CLEAR_DECL_C_BIT_FIELD): Likewise.
14975 (DECL_UNINLINABLE): Likewise.
14976 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
14977 (handle_using_decl): Remove assertion.
14978 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
14979 to build FIELD_DECLs.
14980 (build_base_field): Likewise.
14981 (layout_class_type): Likewise.
14982 * decl.c (init_decl_processing): Likewise.
14983 (build_ptrmemfunc_type): Likewise.
14984 (grokdeclarator): Likewise.
14985 * decl2.c (grok_x_components): Likewise.
14986 * except.c (call_eh_info): Likewise.
14987 * init.c (init_init_processing): Likewise.
14988 * rtti.c (expand_class_desc): Likewise.
14989 (create_pseudo_type_info): Likewise.
14990 (get_vmi_pseudo_type_info): Likewise.
14991 (create_tinfo_types): Likewise.
14992 * ptree.c (print_lang_decl): Adjust.
14993 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
14994 before checking DECL_MUTABLE_P.
14996 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
14997 parameters for template functions.
14998 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
14999 destructors as well as constructors.
15001 2000-05-22 Mark Mitchell <mark@codesourcery.com>
15003 * class.c (build_ctor_vtbl_group): Set inits.
15004 * optimize.c (maybe_clone_body): Set DECL_INLINE and
15005 DECL_THIS_INLINE appropriately for clones.
15007 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
15008 (DECL_CONV_FN_P): Simplify.
15009 (DECL_OPERATOR): Remove.
15010 (language_to_string): Declare.
15011 * decl.c (duplicate_decls): Fix typo in comment.
15012 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
15013 (grok_op_properties): Use DECL_CONV_FN_P instead of
15014 IDENTIFIER_TYPENAME_P.
15015 * dump.c (dequeue_and_dump): Dump the language linkage of
15017 * error.c (language_to_string): Give it external linkage.
15018 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
15019 (implicitly_declare_fn): Set DECL_LANGUAGE.
15020 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
15021 IDENTIFIER_TYPENAME_P.
15022 (tsubst_decl): Likewise.
15023 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
15024 * semantics.c (finish_member_declaration): Don't mark members of
15025 classes declared in an extern "C" region as extern "C".
15027 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
15029 * decl2.c (qualified_lookup_using_namespace): Look through
15032 * decl.c (push_using_decl): Return the old decl on namespace level.
15034 2000-05-21 Mark Mitchell <mark@codesourcery.com>
15036 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
15037 (VTT_NAME_PREFIX): New macro.
15038 (CTOR_VTBL_NAME_PREFIX): Likewise.
15039 (get_ctor_vtbl_name): New function.
15040 * class.c (get_vtable_name): Simplify.
15041 (get_vtt_name): New function.
15042 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
15043 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
15044 when a virtual base becomes primary.
15045 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
15047 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
15048 additional parameters.
15049 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
15050 (initialize_array): New function.
15051 (build_vtt): Likewise.
15052 (build_vtt_inits): Likewise.
15053 (dfs_build_vtt_inits): Likewise.
15054 (dfs_fixup_binfo_vtbls): Likewise.
15055 (build_ctor_vtbl_group): Likewise.
15056 (initialize_vtable): Use initialize_array.
15057 (accumulate_vtbl_inits): Reimplement to handle construction
15059 (dfs_accumulate_vtbl_inits): Likewise.
15060 (bulid_vtbl_initializer): Adjust parameter name.
15061 * method.c (build_typename_overload): Remove #if 0'd code.
15062 (get_ctor_vtbl_name): New function.
15063 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
15064 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
15066 * cp-tree.h (struct lang_type): Remove search_slot.
15067 (CLASSTYPE_SEARCH_SLOT): Remove.
15068 (emit_base_init): Change prototype.
15069 (initialize_vtbl_ptrs): Likewise.
15070 (expand_indirect_vtbls_init): Likewise.
15071 (clear_search_slots): Remove.
15072 * decl.c (lang_mark_tree): Don't mark search_slot.
15073 * init.c (initialize_vtbl_ptrs): Simplify.
15074 (emit_base_init): Likewise.
15075 * search.c (struct vbase_info): Document decl_ptr.
15076 (convert_pointer_to_single_level): Remove.
15077 (dfs_find_vbases): Remove.
15078 (dfs_init_base_pointers): Simplify.
15079 (dfs_clear_vbase_slots): Remove.
15080 (dfs_vtable_path_unmark): New function.
15081 (init_vbase_pointers): Simplify.
15082 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
15083 (expand_indirect_vtbls_init): Simplify. Don't call
15084 mark_all_temps_used.
15085 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
15086 initialize_vtbl_ptrs.
15088 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
15090 * except.c: Add static prototypes.
15092 2000-05-20 H.J. Lu <hjl@gnu.org>
15094 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
15096 2000-05-19 Mark Mitchell <mark@codesourcery.com>
15098 Don't create a separate copy of virtual bases for the
15099 CLASSTYPE_VBASECLASSES list.
15100 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
15101 (BINFO_FOR_VBASE): Remove.
15102 (CANONICAL_BINFO): Adjust.
15103 (binfo_for_vbase): New function.
15104 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
15105 instead of BINFO_FOR_VBASE.
15106 (build_vbase_pointer): Likewise.
15107 (build_secondary_vtable): Likewise.
15108 (dfs_mark_primary_bases): Likewise.
15109 (mark_primary_bases): Likewise.
15110 (layout_nonempty_base_or_field): Likewise.
15111 (dfs_set_offset_for_shared_vbases): Likewise.
15112 (dfs_set_offset_for_unshared_vbases): Likewise.
15113 (layout_virtual_bases): Likewise. Adjust for changes to the
15114 CLASSTYPE_VBASECLASSES list.
15115 (dump_class_hierarchy_r): Use binfo_for_vbase
15116 instead of BINFO_FOR_VBASE.
15117 (dump_class_hierarchy): Likewise.
15118 (finish_vtbls): Likewise.
15119 (build_vtbl_initializer): Adjust for changes to the
15120 CLASSTYPE_VBASECLASSES list.
15121 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
15122 * decl.c (finish_destructor_body): Adjust for changes to the
15123 CLASSTYPE_VBASECLASSES list.
15124 * init.c (sort_base_init): Use binfo_for_vbase.
15125 (construct_virtual_bases): Adjust for changes to the
15126 CLASSTYPE_VBASECLASSES list.
15127 (expand_member_init): Use binfo_for_vbase.
15128 (build_vbase_delete): Adjust for changes to the
15129 CLASSTYPE_VBASECLASSES list.
15130 * method.c (do_build_copy_constructor): Likewise.
15131 * rtti.c (get_base_offset): Use binfo_for_vbase.
15132 (expand_class_desc): Remove #if 0'd code.
15133 * search.c (struct vbase_info): Remove vbase_types.
15134 (get_base_distance): Use binfo_for_vbase.
15135 (lookup_field_queue_p): Use CANONICAL_BINFO.
15136 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
15137 (get_pure_virtuals): Adjust for changes to the
15138 CLASSTYPE_VBASECLASSES list.
15139 (dfs_find_vbases): Use binfo_for_vbase.
15140 (dfs_init_vbase_pointers): Likewise.
15141 (init_vbase_pointers): Don't initialize vi.vbase_types.
15142 (virtual_context): Use binfo_for_vbase.
15143 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
15144 CLASSTYPE_VBASECLASSES list.
15145 (expand_indirect_vtbls_init): Simplify.
15146 (dfs_get_vbase_types): Don't replicate virtual bases.
15147 (find_vbase_instance): Use binfo_for_vbase.
15148 (binfo_for_vbase): New function.
15149 * typeck.c (get_delta_difference): Use binfo_for_vbase.
15151 2000-05-17 Mark Mitchell <mark@codesourcery.com>
15153 * decl2.c (finish_anon_union): Generalize error messages to handle
15154 anonymous structures.
15155 * init.c (perform_member_init): Remove `name' parameter.
15156 (build_field_list): New function.
15157 (sort_member_init): Handle anonymous union initialization order
15158 correctly. Check for multiple initializations of the same union.
15159 (emit_base_init): Don't look up fields by name here.
15160 (expand_member_init): Record the result of name lookup for future
15162 * typeck.c (build_component_ref): Fix formatting.
15164 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
15166 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
15167 * typeck.c (build_x_compound_expr): Replace warn_unused with
15170 * decl2.c (lang_decode_option): Update -Wall unused flags by
15171 calling set_Wunused.
15173 2000-05-16 Mark Mitchell <mark@codesourcery.com>
15175 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
15176 * init.c (dfs_vtable_path_unmark): Remove.
15177 * search.c (marked_new_vtable_p): Likewise.
15178 (unmarked_new_vtable_p): Likewise.
15179 (dfs_search_slot_nonempty_p): Likewise.
15180 (dfs_mark): Likewise.
15181 (dfs_vtable_path_unmark): Likewise.
15182 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
15183 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
15184 (dfs_init_vbase_pointers): Remove special-case new ABI code.
15185 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
15186 (init_vbase_pointers): Simplify.
15187 (expand_indirect_vtbls_init): Likewise.
15189 * class.c (copy_virtuals): New function.
15190 (build_primary_table): Use it.
15191 (build_secondary_vtable): Likewise.
15192 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
15193 indicate that no vcall offset is required.
15194 (add_virtual_function): Likewise.
15195 (modify_all_vtables): Likewise.
15196 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
15197 (dfs_accumulate_vtbl_inits): Likewise.
15198 (build_vtbl_initializer): Make changes to handle construction
15200 (dfs_build_vcall_offset_vtbl_entries): Likewise.
15201 (build_rtti_vtbl_entries): Likewise.
15202 (build_vtable_entries): Handle a NULL vcall_index.
15204 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
15206 * decl2.c (lang_decode_option): Fix thinko.
15208 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
15210 * except.c (check_handlers): New fn.
15211 * cp-tree.h: Declare it.
15212 * semantics.c (finish_handler_sequence): Call it.
15213 (finish_function_handler_sequence): Likewise.
15214 (finish_handler_parms): Set TREE_TYPE on the handler.
15215 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
15216 * search.c (get_base_distance_recursive): If protect>1, ignore
15218 (get_base_distance): Don't reduce watch_access.
15220 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
15222 * lex.c: #include diagnostic.h.
15223 (lang_init_options): Set default prefixing rules.
15225 * lang-options.h: Add -fdiagnostics-show-location=.
15227 * decl2.c: #include diagnostic.h.
15228 (lang_decode_option): Handle -fdiagnostics-show-location=.
15230 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
15232 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
15233 * vec.cc: Revert my 2000-05-07 change.
15235 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
15237 * class.c (check_field_decls): Complain about non-static data
15238 members with same name as class in class with constructor.
15240 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
15242 * decl.c (grokdeclarator): Allow non-static data members with
15243 same name as class.
15245 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
15247 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
15248 and pending_inline.filename. Update prototypes.
15249 * decl.c (define_label): Constify filename parameter.
15250 * decl2.c (warn_if_unknown_interface): Constify local char *.
15251 * input.c Constify input_source.filename. Don't declare
15252 input_filename or lineno. Constify filename parameter to feed_input.
15253 * lex.c (init_parse): Constify parameter and return value.
15254 (cp_pragma_interface, cp_pragma_implementation): Constify
15256 (reinit_parse_for_method, reinit_parse_for_block,
15257 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
15258 Constify local char *.
15259 * pt.c: Don't declare lineno or input_filename.
15260 (print_template_context, tsubst_friend_function, tsubst_decl,
15261 tsubst, instantiate_decl): Constify local char *.
15262 * semantics.c (expand_body): Constify local char *.
15263 * tree.c (build_srcloc): Constify filename parameter.
15264 * typeck.c (c_expand_asm_operands): Constify filename
15267 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
15269 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
15270 offsetof expansion.
15272 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
15274 * inc/cxxabi.h: Fix typos in comment.
15275 (__base_class_info::__offset): Use a static_cast.
15277 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
15279 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
15280 of std::size_t and std::ptrdiff_t respectively.
15281 * tinfo.cc: Likewise.
15282 * vec.cc: Likewise.
15284 2000-05-06 Richard Henderson <rth@cygnus.com>
15286 * typeck.c (build_c_cast): Don't warn integer->pointer size
15287 mismatch for constants.
15289 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
15291 * rtti.c (ptmd_initializer): Set non-public, if class is
15294 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
15295 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
15296 __cxa_vec_delete): Likewise.
15297 * tinfo.cc (__dynamic_cast): Likewise.
15298 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
15299 __cxa_vec_delete): Likewise.
15301 2000-05-04 Mark Mitchell <mark@codesourcery.com>
15303 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
15304 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
15305 (lang_decl_flags): Add vcall_offset.
15306 (THUNK_VCALL_OFFSET): Use it.
15307 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
15308 * method.c (make_thunk): Create the lang_decl here, not in
15310 (emit_thunk): Make generic thunks into ordinary functions once
15311 they have been fed to expand_body.
15312 * semantics.c (expand_body): Set current_function_is_thunk here.
15314 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15316 * class.c (update_vtable_entry_for_fn): Prototype.
15318 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
15321 * search.c (dfs_build_inheritance_graph_order): Prototype.
15323 2000-05-04 Mark Mitchell <mark@codesourcery.com>
15325 * cp-tree.h (special_function_kind): Add various kinds of
15327 (special_function_p): New function.
15328 * class.c (overrides): Don't let one kind of destructor override
15330 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
15331 whether or not to instantiate a template.
15332 * tree.c (special_function_p): Define.
15334 2000-05-03 Mark Mitchell <mark@codesourcery.com>
15336 * cp-tree.def (THUNK_DECL): Remove.
15337 * cp-tree.h (DECL_THUNK_P): New macro.
15338 (DECL_NON_THUNK_FUNCTION_P): Likewise.
15339 (DECL_EXTERN_C_FUNCTION_P): Likewise.
15340 (SET_DECL_THUNK_P): Likewise.
15341 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
15342 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
15343 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
15344 * decl.c (decls_match): Use DECL_EXTERN_C_P.
15345 (duplicate_decls): Likewise.
15346 (pushdecl): Likewise. Adjust thunk handling.
15347 (grokfndecl): Use DECL_EXTERN_C_P.
15348 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
15349 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
15350 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
15351 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
15352 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
15353 DECL_NO_STATIC_CHAIN.
15354 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
15355 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
15356 * search.c (covariant_return_p): Remove THUNK_DECL handling.
15359 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
15361 * tree.c (walk_tree): Set lineno.
15363 2000-05-01 Mark Mitchell <mark@codesourcery.com>
15365 * exception.cc: Update license notice.
15366 * new.cc: Likewise.
15367 * new1.cc: Likewise.
15368 * new2.cc: Likewise.
15369 * tinfo.cc: Likewise.
15370 * tinfo2.cc: Likewise.
15371 * vec.cc: Likewise.
15372 * inc/cxxabi.h: Likewise.
15373 * inc/exception: Likewise.
15374 * inc/new: Likewise.
15375 * inc/new.h: Likewise.
15376 * inc/typeinfo: Likewise.
15378 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
15380 * tree.c (build_target_expr_with_type): If we already have a
15381 TARGET_EXPR, just return it.
15383 * optimize.c (initialize_inlined_parameters): Don't generate an
15384 EXPR_STMT if we can just use DECL_INITIAL.
15385 * decl.c (emit_local_var): Only make the initialization a
15386 full-expression if stmts_are_full_exprs_p.
15388 2000-05-01 Mark Mitchell <mark@codesourcery.com>
15390 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
15392 * call.c (standard_conversion): Use it.
15393 (direct_reference_binding): Likewise.
15394 (build_over_call): Likewise.
15395 (is_properly_derived_from): Likewise.
15396 (compare_ics): Likewise.
15397 * class.c (resolves_to_fixed_type_p): Likewise.
15398 * optimize.c (declare_return_variable): Likewise.
15399 * pt.c (is_specialization_of): Likewise.
15401 * typeck.c (comp_target_parms): Likeiwse.
15402 (build_static_cast): Likewise.
15403 (build_reinterpret_cast): Likewise.
15404 (build_const_cast): Likewise.
15405 (comp_ptr_ttypes_real): Likewise.
15406 (comp_ptr_ttypes_const): Likewise.
15407 * typeck2.c (process_init_constructor): Likewise.
15409 2000-04-30 Scott Snyder <snyder@fnal.gov>
15411 * decl.c (finish_destructor_body): Use the base destructor when
15412 destroying virtual bases.
15414 2000-04-30 Mark Mitchell <mark@codesourcery.com>
15416 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
15418 * optimize.c (struct inline_data): Add target_exprs field.
15419 (declare_return_variable): When a function returns an aggregate,
15420 use the variable declared in the TARGET_EXPR as the remapped
15422 (expand_call_inline): Update the pending target_exprs stack.
15423 (optimize_function): Initialize the stack.
15425 * decl2.c (finish_file): Fix typo in comment.
15427 * method.c (emit_thunk): Don't try to return a `void' value.
15429 * optimize.c (initialize_inlined_parameters): If the parameter is
15430 addressable, we need to make a new VAR_DECL, even if the
15431 initializer is constant.
15433 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
15435 * decl.c (grok_op_properties): Add an extra check of argtypes.
15437 2000-04-27 Mark Mitchell <mark@codesourcery.com>
15439 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
15441 (initialize_inlined_parameters): Try to avoid creating new
15444 2000-04-27 Alex Samuel <samuel@codesourcery.com>
15446 * lex.c (my_get_run_time): Remove.
15447 (init_filename_times): Use get_run_time instead of my_get_run_time.
15448 (check_newline): Likewise.
15449 (dump_time_statistics): Likewise.
15450 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
15451 of computing elapsed time explicitly.
15453 2000-04-26 Mark Mitchell <mark@codesourcery.com>
15455 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
15456 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
15457 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
15458 before calling decl_constant_value.
15459 * class.c (check_bitfield_decl): Likewise.
15460 * cvt.c (ocp_convert): Likewise.
15461 (convert): Likewise.
15462 * decl.c (compute_array_index_type): Likewise.
15463 (build_enumerator): Likewise.
15464 * decl2.c (check_cp_case_value): Likewise.
15465 * pt.c (convert_nontype_argument): Likewise.
15466 (tsubst): Likewise.
15467 * typeck.c (decay_conversion): Likewise.
15468 (build_compound_expr): Likewise.
15469 (build_reinterpret_cast): Likewise.
15470 (build_c_cast): Likewise.
15471 (convert_for_assignment): Likewise.
15473 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
15475 * decl.c (finish_function): Don't play games with DECL_INLINE.
15477 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
15479 * ir.texi: Correct typo.
15481 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
15483 * decl.c (grokdeclarator): Reject VLAs as members.
15485 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
15487 * call.c (standard_conversion): Accept conversion between
15490 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
15492 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
15494 * decl2.c (finish_file): Remove double setup for accounting
15497 2000-04-24 Robert Lipe <robertlipe@usa.net>
15499 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
15501 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
15503 * new.cc (set_new_handler): Needs to be in std::.
15505 2000-04-23 Mark Mitchell <mark@codesourcery.com>
15507 * cp-tree.h (lang_decl): Remove pretty_function_p.
15508 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
15509 language-specific node.
15510 * decl.c (cp_make_fname_decl): Use build_decl, not
15511 build_lang_decl, to build the variables.
15512 (grokvardecl): Don't call build_lang_decl for local variables in
15514 (grokdeclarator): Don't call build_lang_decl for local type
15515 declarations in templates.
15516 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
15517 zero'd memory, rather than calling memset.
15518 * pt.c: Include hashtab.h.
15519 (local_specializations): New variable.
15520 (retrieve_local_specialization): Use it.
15521 (register_local_specialization): Likewise.
15522 (tsubst_decl): Don't assume local variables have
15523 DECL_LANG_SPECIFIC.
15524 (instantiate_decl): Set up local_specializations.
15525 * Makefile.in (HTAB_H): New variable.
15527 2000-04-23 Richard Henderson <rth@cygnus.com>
15529 * typeck.c (c_expand_asm_operands): Restore the original
15530 contents of the output list.
15532 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
15534 * ir.texi: Document complex number representation.
15536 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
15538 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
15539 (target_incomplete_p): New function.
15540 (tinfo_base_init): Create comdat NTBS name variable.
15541 (ptr_initializer): Add non_public parameter. Calculate it.
15542 (ptmd_initializer): Likewise.
15543 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
15544 (create_real_tinfo_var): Add non_public parameter. Use it.
15545 Push proxy into global namespace.
15546 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
15548 * inc/typeinfo (type_info::before, type_info::operator==):
15549 Compare __name addresses.
15551 * tinfo2.cc: Remove new-abi builtins comment.
15553 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
15555 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
15557 * call.c (joust): Exit early if we get the same function, too.
15559 * decl2.c (key_method): Return NULL_TREE for template classes.
15560 (import_export_class): Don't need to check for template classes.
15562 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
15564 * lex.c: Remove references to cccp.c.
15566 2000-04-18 Mark Mitchell <mark@codesourcery.com>
15568 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
15569 volatile_memfunc. Add destructor_attr. Adjust dummy.
15570 (DECL_DESTRUCTOR_P): Use destructor_attr.
15571 (DECL_CONST_MEMFUNC_P): Reimplement.
15572 (DECL_VOLATILE_MEMFUNC_P): Remove.
15573 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
15574 (overrides): Use DECL_DESTRUCTOR_P.
15575 (check_for_override): Likewise.
15576 * decl.c (start_function): Likewise.
15577 * decl2.c (grokfclassfn): Likewise.
15578 (check_classfn): Likewise.
15579 (grok_function_init): Likewise.
15581 2000-04-17 Mark Mitchell <mark@codesourcery.com>
15583 * decl2.c (grokfield): Issue error on illegal data member
15586 2000-04-17 Mark P Mitchell <mark@codesourcery.com>
15588 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
15590 2000-04-16 Mark Mitchell <mark@codesourcery.com>
15592 * class.c (build_vtable_entry): Don't build thunks for type-info
15595 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
15597 * decl.c (decls_match): Allow a redeclaration of a builtin to
15598 specify args while the builtin did not.
15600 2000-04-15 Mark Mitchell <mark@codesourcery.com>
15602 * cp-tree.def (THUNK_DECL): Add to documentation.
15603 * cp-tree.h (flag_huge_objects): Declare.
15604 * class.c (modify_vtable_entry): Tidy.
15605 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
15606 Calculate delta appropriately for the new ABI.
15607 (dfs_modify_vtables): Use it.
15608 (modify_all_vtables): Fix thinko in code to add overriding copies
15609 of functions to primary vtables.
15610 (build_clone): Fix typo in comment.
15611 (clone_function_decl): Correct order of destructors in vtable.
15612 (build_vbase_offset_vtbl_entries): Adjust comment.
15613 (dfs_vcall_offset_queue_p): Remove.
15614 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
15615 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
15616 (build_vtable_entry): Correct check for pure virtual functions.
15617 Don't declare flag_huge_objects.
15618 * decl.c (flag_huge_objects): Remove declaration.
15619 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
15620 Use int_size_in_bytes.
15621 (emit_thunk): Handle vcall offset thunks.
15623 2000-04-15 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15625 * decl2.c (parse_time, varconst_time): Delete declarations.
15626 (finish_file): Delete LINENO declaration.
15627 START_TIME and THIS_TIME now long.
15629 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
15631 * class.c (build_base_field): Reformat comment.
15633 * inc/cxxabi.h (stddef.h): Comment inclusion.
15634 (__base_class_info::__offset): Comment shift.
15636 2000-04-12 Mark Mitchell <mark@codesourcery.com>
15638 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
15639 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
15640 (cp_push_exception_identifier): New macro.
15641 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
15642 (DECL_BASE_DESTRUCTOR_P): Likewise.
15643 (DECL_DELETING_DESTRUCTOR_P): Likewise.
15644 (get_vtbl_decl_for_binfo): Fix formatting.
15645 (in_charge_arg_for_name): New macro.
15646 (maybe_build_cleanup_and_delete): Remove declaration.
15647 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
15648 (in_charge_arg_for_name): New function.
15649 (build_new_method_call): Use it. Handle cloned destructors.
15650 (build_clone): Don't make the base constructor virtual.
15651 Automatically defer generated functions.
15652 (clone_function_decl): Handle destructors, too.
15653 (clone_constructors_and_destructors): Likewise.
15654 (create_vtable_ptr): Don't create a vtable entry for a cloned
15656 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
15657 (initialize_predefined_identifiers): Update appropriately.
15658 (finish_destructor_body): Simplify.
15659 (maybe_build_cleanup_and_delete): Remove.
15660 * except.c (expand_throw): Handle new-ABI destructors.
15661 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
15662 (build_dtor_call): New function.
15663 (build_delete): Use it. Simplify.
15664 * optimize.c (maybe_clone_body): Handle destructors.
15665 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
15667 * exception.cc (cleanup_fn): New typedef.
15668 (CALL_CLEANUP): New macro.
15669 (cp_eh_info): Use them.
15670 (__cp_push_exception): Likewise.
15671 (__cp_pop_exception): Likewise.
15673 2000-04-11 Mark Mitchell <mark@codesourcery.com>
15675 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
15676 (complete_dtor_identifier): New macro.
15677 (CLASSTYPE_FIRST_CONVERSION): Remove.
15678 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
15679 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
15680 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
15681 (CLASSTYPE_CONSTRUCTORS): Likewise.
15682 (CLASSTYPE_DESTRUCTORS): Likewise.
15683 (lang_decl): Add cloned_function.
15684 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
15685 (DECL_BASE_CONSTRUCTOR_P): Likewise.
15686 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
15687 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
15688 (DECL_CLONED_FUNCTION_P): Likewise.
15689 (DECL_CLONED_FUNCTION): Likewise.
15690 (clone_function_decl): Declare.
15691 (maybe_clone_body): Likewise.
15692 * call.c (build_user_type_conversion_1): Call complete object
15693 constructors in the new ABI.
15694 (build_new_method_call): Don't add in-charge parameters under the
15696 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
15697 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
15698 CLASSTYPE_DESTRUCTOR_SLOT.
15699 (build_clone): New function.
15700 (clone_function_decl): Likewise.
15701 (clone_constructors_and_destructors): Likewise.
15702 (check_bases_and_members): Use it.
15703 * decl.c (iniitialize_predefined_identifiers): Initialize
15704 complete_dtor_identifier.
15705 (finish_function): Don't add extra code to a clone.
15706 (lang_mark_tree): Mark cloned_function.
15707 * decl2.c (mark_used): Don't bother trying to instantiate things
15709 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
15710 * method.c (set_mangled_name_for_decl): Don't treat clones as
15712 (synthesize_method): Sythesize cloned functions, not the clones.
15713 * optimize.c (inline_data): Update comment on ret_label.
15714 (remap_block): Don't assume DECL_INITIAL exists.
15715 (copy_body_r): Allow ret_label to be NULL.
15716 (maybe_clone_body): Define.
15717 * pt.c (tsubst_decl): Handle clones.
15718 (instantiate_clone): New function.
15719 (instantiate_template): Use it.
15720 (set_mangled_name_for_template_decl): Don't treat clones as
15722 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
15723 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
15724 * semantics.c (expand_body): Clone function bodies as necessary.
15726 * optimize.c (remap_decl): Avoid sharing structure for arrays
15727 whose size is only known at run-time.
15728 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
15730 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
15731 to has_in_charge_parm_p.
15732 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
15733 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
15734 (DECL_COPY_CONSTRUCTOR_P): New macro.
15735 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
15736 (build_user_type_conversion_1): Likewise.
15737 (convert_like_real): Likewise.
15738 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
15739 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
15740 (copy_args_p): Likewise.
15741 (grok_ctor_properties): Likewise.
15742 (start_function): Likewise.
15743 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
15744 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
15745 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
15746 * method.c (do_build_copy_constructor): Use
15747 DECL_HAS_IN_CHARGE_PARM_P.
15748 (synthesize_method): Likewise.
15749 * pt.c (instantiate_template): Remove goto.
15750 * tree.c (build_cplus_method_type): Remove mention of obstacks in
15753 * cp-tre.h (finish_function): Change prototype.
15754 * decl.c (end_cleanup_fn): Adjust caller.
15755 (finish_function): Take only one parameter.
15756 * decl2.c (finish_objects): Adjust caller.
15757 (finish_static_storage_duration_function): Likewise.
15758 * method.c (emit_thunk): Likewise.
15759 * parse.y: Likewise.
15760 * parse.c: Regenerated.
15761 * pt.c (instantiate_decl): Likewise.
15762 * rtti.c (synthesize_tinfo_fn): Likewise.
15763 * semantics.c (expand_body): Likewise.
15765 * cp-tree.h (copy_decl): New function.
15766 * class.c (finish_struct_1): Use it.
15767 * lex.c (copy_decl): Define it.
15768 * pt.c (tsubst_decl): Likewise.
15769 * tree.c (copy_template_template_parm): Likewise.
15771 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
15772 has_nonpublic_assign_ref.
15773 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
15774 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
15775 * class.c (finish_struct_methods): Don't set
15776 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
15777 (interface_only): Don't declare.
15778 (interface_unknown): Likewise.
15780 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
15782 * tree.h (HAVE_TEMPLATES): Remove definition.
15783 * lang-options.h (-fthis-is-variable): Remove documentation.
15785 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
15787 * class.c (instantiate_type): Handle object-relative template-id.
15789 * semantics.c (finish_expr_stmt): Call convert_to_void here.
15790 * decl.c (cplus_expand_expr_stmt): Not here.
15792 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
15793 Initialize exprtype earlier.
15795 * parse.y (fn.def1): Check for defining types in return types.
15797 * decl.c (check_tag_decl): Notice extra fundamental types.
15798 Diagnose empty decls in classes, too.
15800 * decl.c (grokdeclarator): Don't override an anonymous name if no
15801 declarator was given.
15803 * cvt.c (convert_to_void): Call resolve_offset_ref.
15805 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
15807 * decl2.c (decl_namespace): Handle getting a type.
15809 * typeck.c (build_c_cast): Re-enable warning for cast between
15810 pointer and integer of different size.
15812 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
15814 * inc/cxxabi.h (__pointer_type_info): Add restrict and
15816 (__pointer_type_info::__pointer_catch): New virtual function.
15817 (__pointer_to_member_type_info): Derive from
15818 __pointer_type_info. Adjust.
15819 (__pointer_to_member_type_info::__do_catch): Remove.
15820 (__pointer_to_member_type_info::__is_pointer_p): Declare.
15821 (__pointer_to_member_type_info::__pointer_catch): Declare.
15822 * rtti.c (qualifier_flags): Add restrict flag.
15823 (ptmd_initializer): Reorder members.
15824 (create_tinfo_types): Expand comments. Reorder
15825 ptmd_desc_type_node members.
15826 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
15828 (__pointer_type_info::__do_catch): Move specific code into
15829 __pointer_catch. Call it.
15830 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
15831 specific catch checking. Fix void conversion check.
15832 (__pointer_to_member_type_info::__do_catch): Remove.
15833 (__pointer_to_member_type_info::__pointer_catch): Implement.
15835 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
15837 * lex.c (init_parse): Remove traces of classof and headof.
15838 * decl2.c (flag_operator_names): Default to 1.
15839 (lang_decode_option): Do not set it for -ansi.
15841 2000-04-09 Mark Mitchell <mark@codesourcery.com>
15843 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
15844 (DECL_MAIN_VARIANT): Remove.
15845 * decl.c (duplicate_decls): Don't set it.
15846 (start_function): Likewise.
15847 (lang_mark_tree): Don't mark it.
15848 * decl2.c (defer_fn): Don't use it.
15849 * lex.c (retrofit_lang_decl): Don't set it.
15850 * pt.c (tsubst_decl): Likewise.
15851 * ptree.c (print_lang_decl): Don't print it.
15852 * typeck.c (mark_addressable): Don't use it.
15854 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
15856 * vec.cc: Include <new> and <exception>.
15857 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
15858 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
15860 (__cxa_vec_delete): Catch dtor exceptions.
15862 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
15864 Prepend __ to implementation defined names.
15865 * inc/typeinfo (type_info): Rename _name to __name.
15866 (type_info::type_info): Rename parameter.
15867 (type_info::operator==, type_info::operator!=,
15868 type_info::before): Likewise.
15869 (type_info::is_pointer_p, type_info::is_function_p,
15870 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
15873 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
15874 (__pointer_type_info::__pointer_type_info): Likewise.
15875 (__pointer_type_info::is_pointer_p,
15876 __pointer_type_info::do_catch): Prepend __. Rename parameters.
15877 (__array_type_info::__array_type_info): Rename parameters.
15878 (__function_type_info::__function_type_info): Likewise.
15879 (__function_type_info::is_function_p): Prepend __.
15880 (__enum_type_info::__enum_type_info): Rename parameters.
15881 (__pointer_to_member_type_info::__pointer_to_member_type_info):
15883 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
15885 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
15886 (__class_type_info::__class_type_info): Rename parameters.
15887 (__class_type_info::sub_kind): Prepend __. Adjust member names.
15888 (__class_type_info::upcast_result,
15889 __class_type_info::dyncast_result): Prepend __. Move definition
15891 (__class_type_info::do_upcast, __class_type_info::do_catch,
15892 __class_type_info::find_public_src,
15893 __class_type_info::do_dyncast,
15894 __class_type_info::do_find_public_src): Prepend __. Rename
15896 (__si_class_type_info::__si_class_type_info): Rename parameters.
15897 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
15898 __si_class_type_info::do_find_public_src): Prepent __. Rename
15900 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
15901 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
15902 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
15904 (__dynamic_cast): Rename parameters.
15905 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
15906 type_info::do_catch, type_info::do_upcast): Prepend __.
15907 (contained_p, public_p, virtual_p, contained_public_p,
15908 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
15909 (__class_type_info::do_catch,
15910 __class_type_info::do_upcast): Prepend __. Adjust.
15911 (__class_type_info::__upcast_result,
15912 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
15914 (__class_type_info::find_public_src): Prepend __. Adjust.
15915 (__class_type_info::do_find_public_src,
15916 __si_class_type_info::do_find_public_src,
15917 __vmi_class_type_info::do_find_public_src): Likewise.
15918 (__class_type_info::do_dyncast,
15919 __si_class_type_info::do_dyncast,
15920 __vmi_class_type_info::do_dyncast): Likewise.
15921 (__class_type_info::do_upcast,
15922 __si_class_type_info::do_upcast,
15923 __vmi_class_type_info::do_upcast): Likewise.
15924 (__dynamic_cast): Adjust.
15925 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
15926 (__function_type_info::is_function_p): Likewise.
15927 (__pointer_type_info::do_catch): Likewise. Adjust.
15928 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
15929 (__throw_type_match_rtti_2): Adjust.
15930 (__is_pointer): Adjust.
15932 2000-04-08 Mark Mitchell <mark@codesourcery.com>
15934 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
15935 (complete_ctor_identifier): New macro.
15936 (special_function_kind): Add sfk_copy_constructor and
15937 sfk_assignment_operator.
15938 (LOOKUP_HAS_IN_CHARGE): Remove.
15939 (cons_up_default_function): Rename to ...
15940 (implicitly_declare_fn): ... this.
15941 * call.c (build_new_method_call): Add in-charge parameters for
15943 * class.c (add_implicitly_declared_members): Change parameter name
15944 from cant_have_assignment to cant_have_const_assignment.
15945 Replace calls to cons_up_default_function to implicitly_declare_fn.
15946 * cvt.c (ocp_convert): Use complete_ctor_identifier.
15947 * decl.c (initialize_predefined_identifiers): Initialize it.
15948 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
15949 complex expression.
15950 * init.c (expand_default_init): Don't calculate the in-charge
15952 (build_new_1): Likewise.
15953 * lex.c (cons_up_default_function): Move to method.c.
15954 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
15955 (implicitly_declare_fn): New function.
15956 * typeck.c (build_static_cast): Use complete_ctor_identifier.
15957 (build_modify_expr): Likewise.
15958 * typeck2.c (build_functional_cast): Likewise.
15960 Under the new ABI, constructors don't return `this'.
15961 * cp-tree.h (warn_reorder): Declare.
15962 (special_function_kind): New enum.
15963 (global_base_init_list): Remove declaration.
15964 (emit_base_init): Don't return a value.
15965 (check_base_init): Don't declare.
15966 (is_aggr_typedef): Likewise.
15967 * decl.c (check_special_function_return_type): New function.
15968 (return_types): Remove.
15969 (grokdeclarator): Use check_special_function_return_type.
15970 (start_function): Don't initialize ctor_label under the new ABI.
15971 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
15972 * init.c (begin_init_stmts): Move to top of file.
15973 (finish_init_stmts): Likewise.
15974 (warn_reorder): Don't declare.
15975 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
15977 (check_base_init): Remove.
15978 (is_aggr_typedef): Likewise.
15979 (build_new_1): Don't use the return value of a constructor.
15980 * semantics.c (setup_vtbl_ptr): Don't use the return value
15982 * typeck.c (check_return_expr): Don't magically convert return
15983 statements into `return this' in constructors under the new ABI.
15985 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
15986 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
15987 (base_ctor_identifier): New macro.
15988 (base_dtor_identifier): Likewise.
15989 (deleting_dtor_identifier): Likewise.
15990 * decl.c: Don't include obstack.h.
15991 (obstack_chunk_alloc): Don't define.
15992 (obstack_chunk_free): Likewise.
15993 (struct predefined_identifier): New type.
15994 (initialize_predefined_identifiers): New function.
15995 (init_decl_processing): Use it.
15996 (debug_temp_inits): Remove.
15997 (start_method): Don't call preserve_data.
15998 (hack_incomplete_structures): Update comment.
15999 * init.c (init_init_processing): Don't initialize
16001 (build_offset_rf): Remove dead code.
16002 (build_delete): Use CLASSTYPE_N_BASECLASSES.
16003 * search.c (init_search_processing): Don't initialize
16006 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16008 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
16009 some sign_compare warnings.
16011 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
16013 Rename abi::__vmi_class_type_info members.
16014 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
16015 base_list, detail_masks members to vmi_flags, vmi_base_count,
16016 vmi_bases and vmi_flags_masks respectively.
16017 (__vmi_class_type_info::vmi_flags_masks): Rename
16018 details_unknown_mask to flags_unknown_mask.
16019 * tinfo.cc (__class_type_info::do_upcast): Adjust.
16020 (__vmi_class_type_info::do_find_public_src): Adjust.
16021 (__vmi_class_type_info::do_dyncast): Adjust.
16022 (__vmi_class_type_info::do_upcast): Adjust.
16024 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
16026 * tinfo.cc (convert_to_base): New function.
16027 (get_vbase_offset): Remove. Move into convert_to_base.
16028 (__vmi_class_type_info::do_find_public_src): Adjust.
16029 (__vmi_class_type_info::do_dyncast): Adjust.
16030 (__vmi_class_type_info::do_upcast): Adjust.
16032 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
16034 * tinfo.cc (operator=): Use __builtin_strcmp.
16035 * tinfo2.cc (before): Likewise.
16037 2000-04-06 Mark Mitchell <mark@codesourcery.com>
16039 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
16040 (DECL_SAVED_INLINE): Rename to ...
16041 (DECL_DEFERRED_FN): ... this.
16042 (in_function_p): Remove declaration.
16043 (mark_inline_for_output): Rename to ...
16044 (defer_fn): ... this.
16045 * decl.c (finish_function): Adjust call to mark_inline_for_output.
16046 (in_function_p): Remove definition.
16047 * decl2.c (saved_inlines): Rename to ...
16048 (deferred_fns): ... this.
16049 (saved_inlines_used): Rename to ...
16050 (deferred_fns_used): ... this.
16051 (mark_inline_for_output): Rename to ...
16052 (defer_fn): ... this.
16053 (finish_file): Adjust accordingly.
16054 (init_decl2): Likewise.
16055 * lex.c (cons_up_default_function): Likewise.
16056 * pt.c (mark_decl_instantiated): Likewise.
16057 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
16059 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
16060 * semantics.c (expand_body): Defer more functions.
16062 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
16064 * vec.cc: New file.
16065 * Make-lang.in (CXX_LIB2FUNCS): Add it.
16067 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
16068 __cxa_vec_delete): Declare.
16070 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
16072 * rtti.c (dfs_class_hint_mark): New static function.
16073 (dfs_class_hint_unmark): New static function.
16074 (class_hint_flags): Use them.
16076 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
16078 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
16080 2000-04-05 Mark Mitchell <mark@codesourcery.com>
16082 * cp-tree.h (instantiate_decl): Change prototype.
16083 * decl2.c (mark_used): Adjust call.
16084 * optimize.c (inlinable_function_p): Adjust handling of templates.
16085 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
16086 (do_type_instantiation): Likewise.
16087 (instantiate_decl): Defer more templates.
16088 (instantiate_pending_templates): Adjust logic to handle inline
16091 * Makefile.in (GGC_H): New variable. Use it throughout in place
16094 * call.c: Don't include obstack.h. Include ggc.h.
16095 (obstack_chunk_alloc): Don't define.
16096 (obstack_chunk_free): Likewise.
16097 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
16098 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
16099 (pop_switch): Free it.
16101 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
16103 * dump.c (dequeue_and_dump): Don't try to print the bit_position
16104 if we don't have a DECL_FIELD_OFFSET.
16106 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
16108 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
16109 special_function_p.
16111 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16113 * cfns.gperf (hash, libc_name_p): Prototype.
16115 * rtti.c (build_dynamic_cast_1): Constification.
16117 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
16119 * semantics.c (deferred_type_access_control): Prototype.
16121 2000-04-04 Mark Mitchell <mark@codesourcery.com>
16123 Correct many new ABI issues regarding vbase and vcall offset
16125 * cp-tree.h (BINFO_VTABLE): Document.
16126 (struct lang_type): Tweak formatting.
16127 (BINFO_PRIMARY_BINFO): Add to documentation.
16128 (CLASSTYPE_VSIZE): Fix typo in comment.
16129 (CLASSTYPE_VBASECLASSES): Update documentation.
16130 (BINFO_VBASE_MARKED): Remove.
16131 (SET_BINFO_VBASE_MARKED): Likewise.
16132 (CLEAR_BINFO_VBASE_MARKED): Likewise.
16133 (BINFO_FIELDS_MARKED): Remove.
16134 (SET_BINFO_FIELDS_MARKED): Likewise.
16135 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
16136 (enum access_kind): New enumeration.
16137 (num_extra_vtbl_entries): Remove declaration.
16138 (size_extra_vtbl_entries): Likewise.
16139 (get_vtbl_decl_for_binfo): New function.
16140 (dfs_vbase_unmark): Remove declaration.
16141 (mark_primary_bases): Likewise.
16142 * class.c (SAME_FN): Remove.
16143 (struct vcall_offset_data_s): Move definition.
16144 (build_vbase_pointer): Use `build', not `build_binary_op', to
16145 access the vbase pointer under the new ABI.
16146 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
16147 (build_primary_vtable): Likewise.
16148 (dfs_mark_primary_bases): Move here from search.c.
16149 (mark_primary_bases): Likewise.
16150 (determine_primary_bases): Under the new ABI, don't make a base
16151 class a primary base just because we don't yet have any virtual
16153 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
16154 (num_vfun_entries): Remove.
16155 (dfs_count_virtuals): Likewise.
16156 (num_extra_vtbl_entries): Likewise.
16157 (size_extra_vtbl_entries): Likewise.
16158 (layout_virtual_bases): Iterate in inheritance graph order under
16160 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
16161 indicate that a vfield is present.
16162 (init_class_processing): Initialize access_public_node, etc., from
16164 (get_vtbl_decl_for_binfo): New function.
16165 (dump_class_hierarchy_r): Likewise.
16166 (dump_class_hierarchy): Use it.
16167 (finish_vtbls): Build the vtbls in inheritance graph order.
16168 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
16169 (initialize_vtable): Use get_vtbl_decl_for_binfo.
16170 (accumulate_vtbl_inits): Add comments explaining why a pre-order
16172 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
16173 where the vptr points, even for primary vtables.
16174 (build_vtbl_initializer): Adjust handling of vbase and vcall
16176 (build_vcall_and_vbase_vtable_entries): New function.
16177 (dfs_build_vbase_offset_vtbl_entries): Remove.
16178 (build_vbase_offset_vtbl_entries): Reimplement.
16179 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
16180 were already handled in a primary base class vtable.
16181 (build_vcall_offset_vtbl_entries): Adjust.
16182 (build_rtti_vtbl_entries): Adjust.
16183 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
16184 * init.c (expand_virtual_init): Simplify.
16185 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
16186 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
16187 * search.c (BINFO_ACCESS): New macro.
16188 (SET_BINFO_ACCESS): Likewise.
16189 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
16190 (access_in_type): Likewise.
16191 (dfs_accessible_p): Likewise.
16192 (protected_accessible_p): Likewise.
16193 (lookup_fnfields_1): Adjust documentation.
16194 (dfs_mark_primary_bases): Move to class.c
16195 (mark_primary_bases): Likewise.
16196 (dfs_vbase_unmark): Remove.
16197 (virtual_context): Use BINFO_FOR_VBASE.
16198 (dfs_get_vbase_types): Simplify.
16199 (dfs_build_inheritance_graph_order): New function.
16200 (get_vbase_types): Use it.
16201 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
16203 * tinfo.cc (get_vbase_offset): New function.
16204 (__vmi_class_type_info::do_find_public_src): Use it.
16205 (__vmi_class_type_info::do_dyncast): Likewise.
16206 (__vmi_class_type_info::do_upcast): Likewise.
16208 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
16210 * lang-specs.h: Pass -fno-show-column to the preprocessor.
16212 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
16214 * rtti.c (class_hint_flags): Rename flags.
16215 (class_initializer): Remove flags.
16216 (synthesize_tinfo_var): Combine offset and flags. Add flags
16217 for __vmi_class_type_info.
16218 (create_tinfo_types): Remove flags from __class_type_info and
16219 __si_class_type_info. Merge flags and offset from
16220 base_class_type_info.
16221 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
16222 (__base_class_info::is_virtual_p): Adjust.
16223 (__base_class_info::is_public_p): Adjust.
16224 (__base_class_info::offset): New accessor.
16225 (__class_type_info::details): Remove member.
16226 (__class_type_info::__class_type_info): Lose details.
16227 (__class_type_info::detail_masks): Remove.
16228 (__si_class_type_info::__si_class_type_info): Lose details.
16229 (__vmi_class_type_info::details): New member.
16230 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
16231 (__vmi_class_type_info::detail_masks): New member.
16232 * tinfo.cc (__class_type_info::do_upcast): Initialize result
16233 with unknown_details_mask.
16234 (__vmi_class_type_info::do_find_public_src): Adjust
16235 (__vmi_class_type_info::do_dyncast): Adjust.
16236 (__vmi_class_type_info::do_upcast): Set result details, if
16238 (__dynamic_cast): Temporarily #if out optimization.
16240 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
16242 * rtti.c (get_tinfo_decl): Mark used.
16243 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
16244 mark as dealt with, if we output it.
16246 2000-03-28 Mark Mitchell <mark@codesourcery.com>
16248 * class.c: Reorganize to put virtual function table initialization
16249 machinery at the end of the file.
16251 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
16253 * class.c (finish_struct): Use bitsize_zero_node.
16254 * pt.c (instantiate_class_template): Likewise.
16256 2000-03-28 Mark Mitchell <mark@codesourcery.com>
16258 Put RTTI entries at negative offsets in new ABI.
16259 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
16260 vbase offset at index -3, not -1.
16261 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
16262 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
16263 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
16264 (build_rtti_vtbl_entries): New function.
16265 (set_rtti_entry): Remove.
16266 (build_primary_vtable): Don't use it.
16267 (build_secondary_vtable): Likewise.
16268 (start_vtable): Remove.
16269 (first_vfun_index): New function.
16270 (set_vindex): Likewise.
16271 (add_virtual_function): Don't call start_vtable. Do call
16273 (set_primary_base): Rename parameter.
16274 (determine_primary_base): Likewise.
16275 (num_vfun_entries): Don't use skip_rtti_stuff.
16276 (num_extra_vtbl_entries): Include RTTI information.
16277 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
16278 (skip_rtti_stuff): Remove.
16279 (dfs_modify_vtables): Don't use it.
16280 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
16281 (layout_nonempty_base_or_field): Update size handling.
16282 (create_vtable_ptr): Tweak.
16283 (layout_class_type): Adjust parameter names.
16284 (finish_struct_1): Simplify.
16285 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
16286 (skip_rtti_stuff): Remove.
16287 (first_vfun_index): New function.
16288 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
16289 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
16290 (marked_vtable_pathp): Declare.
16291 (unmarked_vtable_pathp): Likewise.
16292 * error.c (dump_expr): Use first_vfun_index to calculate vtable
16294 * rtti.c (build_headof): Look for RTTI at negative offsets.
16295 (get_tinfo_decl_dynamic): Likewise.
16296 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
16298 (create_pseudo_type_info): Do it here instead. Adjust so that
16299 vptr points at first virtual function.
16300 * search.c (marked_vtable_pathp): Make it global.
16301 (unmarked_vtable_pathp): Likewise.
16302 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
16303 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
16304 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
16305 (get_pure_virtuals): Likewise.
16306 (expand_upcast_fixups): Likewise.
16307 * tree.c (debug_binfo): Likewise.
16308 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
16311 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16313 * class.c (check_field_decl): Fix typo.
16314 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
16315 (check_methods): Likewise.
16316 (check_field_decls): Likewise.
16317 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
16318 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
16319 Use DECL_RESULT_FLD, not DECL_RESULT.
16320 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
16321 * lex.c (identifier_type): Likewise.
16322 * pt.c (determine_specialization, lookup_template_class): Likewise.
16323 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
16324 (resolve_overloaded_unification, more_specialized): Likewise.
16325 * semantics.c (finish_member_declaration): Likewise.
16326 * typeck.c (build_x_function_call): Likewise.
16328 2000-03-26 Mark Mitchell <mark@codesourcery.com>
16330 * class.c (layout_empty_base): Handle empty bases with non-byte
16332 (build_base_field): Likewise.
16333 (layout_virtual_bases): Likewise.
16335 * class.c (finish_struct_1): Fix typo in this change:
16337 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16339 2000-03-25 Mark Mitchell <mark@codesourcery.com>
16341 * decl.c (grokdeclarator): Count partial specializations when
16342 keeping track of how many template classes have been seen.
16344 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
16346 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16348 * class.c (build_vbase_pointer_fields): layout_field now place_field.
16349 (get_vfield_offset): Use byte_position.
16350 (set_rtti_entry): Set OFFSET to ssizetype zero.
16351 (get_binfo_offset_as_int): Deleted.
16352 (dfs_record_base_offsets): Use tree_low_cst.
16353 (dfs_search_base_offsets): Likewise.
16354 (layout_nonempty_base_or_field): Reflect changes in RLI format
16355 and call byte_position.
16356 (layout_empty_base): Convert offset to ssizetype.
16357 (build_base_field): use rli_size_unit_so_far.
16358 (dfs_propagate_binfo_offsets): Do computation in proper type.
16359 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
16360 (layout_class_type): Reflect changes in RLI names and fields.
16361 (finish_struct_1): Set DECL_FIELD_OFFSET.
16362 * dump.c (dequeue_and_dump): Call bit_position.
16363 * expr.c (cplus_expand_constant): Use byte_position.
16364 * rtti.c (expand_class_desc): Use bitsize_one_node.
16365 * typeck.c (build_component_addr): Use byte_position and don't
16366 special case for zero offset.
16368 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
16370 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
16372 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
16374 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
16377 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16379 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
16381 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
16382 make_typename_type, check_initializer, cp_finish_decl,
16383 xref_tag): Likewise.
16384 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
16385 decl_namespace, arg_assoc_template_arg, arg_assoc,
16386 validate_nonmember_using_decl, do_class_using_decl): Likewise.
16387 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
16388 args_to_string): Likewise.
16389 * friend.c (is_friend): Likewise.
16390 * lex.c (note_got_semicolon, note_list_got_semicolon,
16391 is_global): Likewise.
16392 * method.c (build_overload_nested_name, build_overload_value,
16393 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
16394 * parse.y (typename_sub, typename_sub1): Likewise.
16395 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
16396 process_partial_specialization, convert_template_argument,
16397 template_args_equal, add_pending_template, lookup_template_class,
16398 for_each_template_parm_r, maybe_fold_nontype_arg,
16399 tsubst, instantiate_template, type_unification_real, unify,
16400 instantiate_pending_templates, set_mangled_name_for_template_decl):
16402 * repo.c (repo_get_id, repo_template_used): Likewise.
16403 * search.c (lookup_field_1): Likewise.
16404 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
16405 * xref.c (classname): Likewise.
16407 2000-03-22 Mark Mitchell <mark@codesourcery.com>
16409 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
16410 (CANONICAL_BINFO): New macro.
16411 (BINFO_NEW_VTABLE_MARKED): Use it.
16412 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
16413 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
16414 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
16416 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
16417 (build_secondary_vtable): Likewise.
16418 (dfs_finish_vtbls): Likewise.
16419 (dfs_accumulate_vtbl_inits): Likewise.
16420 (accumulate_vtbl_inits): New function.
16421 (finish_vtbls): Make sure that virtual bases come after
16422 non-virtual bases in the vtable group.
16423 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
16424 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
16425 * search.c (struct vbase_info): Move definition.
16426 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
16427 (unmarked_new_vtable_p): Likewise.
16428 (dfs_mark_vtable_path): Remove.
16429 (dfs_mark_new_vtable): Remove.
16430 (dfs_unmark_new_vtable): Likewise.
16431 (dfs_clear_search_slot): Likewise.
16432 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
16433 (dfs_clear_vbase_slots): Likewise.
16434 (init_vbase_pointers): LIkewise.
16436 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
16438 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
16439 SIZETYPE to a non-SIZETYPE.
16441 2000-03-21 Mark Mitchell <mark@codesourcery.com>
16443 * class.c (layout_virtual_bases): Adjust names in conditionally
16446 * class.c (record_base_offsets): New function.
16447 (layout_conflict_p): Likewise.
16448 (layout_nonempty_base_or_field): Use it.
16449 (layout_empty_base): New function.
16450 (build_base_field): Use it.
16451 (build_base_fields): Update comment.
16452 (layout_virtual_bases): Fold in a little code form
16453 layout_basetypes. Use layout_empty_base.
16454 (layout_basetypes): Remove.
16455 (end_of_class): New function.
16456 (layout_class_type): Use it. Adjust.
16458 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
16459 (fntype_p): Remove.
16460 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
16462 (dfs_skip_nonprimary_vbases_markedp): Likewise.
16463 * typeck.c (fntype_p): Remove.
16465 * cp-tree.h (TI_SPEC_INFO): Remove.
16466 (CLASSTYPE_TI_SPEC_INFO): Likewise.
16467 * pt.c (process_partial_specialization): Likewise.
16469 * class.c (build_base_field): Fix thinko in computation of binfo
16472 * tree.c (mark_local_for_remap_p): Mark variables declared in
16473 TARGET_EXPRs as well.
16475 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
16477 * typeck.c (require_complete_type, complete_type,
16478 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
16479 build_array_ref, convert_arguments, pointer_diff,
16480 build_x_unary_op, build_unary_op, build_c_cast,
16481 build_modify_expr): Use COMPLETE_TYPE_P etc.
16482 * call.c (is_complete, convert_like_real,
16483 build_new_method_call): Likewise.
16484 * class.c (build_vbase_pointer_fields, check_bases,
16485 build_base_field, finish_struct_1, pushclass): Likewise.
16486 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
16487 * decl.c (maybe_process_template_type_declaration, pushtag,
16488 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
16489 layout_var_decl, check_initializer, cp_finish_decl,
16490 grokdeclarator, require_complete_types_for_parms,
16491 grok_op_properties, xref_tag, xref_basetypes,
16492 check_function_type): Likewise.
16493 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
16494 * friend.c (do_friend): Likewise.
16495 * init.c (build_offset_ref): Likewise.
16496 * parse.y (structsp): Likewise.
16497 * pt.c (maybe_process_partial_specialization,
16498 tsubst_friend_function, instantiate_class_template, tsubst,
16499 do_type_instantiation, instantiate_pending_templates): Likewise.
16500 * repo.c (repo_get_id): Likewise.
16501 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
16502 synthesize_tinfo_var, emit_support_tinfos): Likewise.
16503 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
16504 * semantics.c (begin_class_definition): Likewise.
16505 * tree.c (build_cplus_method_type): Likewise.
16506 * typeck2.c (digest_init, build_functional_cast,
16507 add_exception_specifier): Likewise.
16508 * parse.h, parse.c: Regenerated.
16510 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
16512 * inc/cxxabi.h: New header file. Define new-abi entry points.
16513 (__pointer_type_info::target): Rename member to ...
16514 (__pointer_type_info::type): ... here.
16515 (__base_class_info::type): Rename member to ...
16516 (__base_class_info::base): ... here.
16517 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
16518 * cp-tree.h (CPTI_ABI): New global tree enumeration.
16519 (abi_node): New global tree node.
16520 * decl.c (abi_node): Document.
16521 (init_decl_processing): Initialize abi_node.
16522 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
16523 (get_vmi_pseudo_type_info): Likewise.
16524 (create_tinfo_types): Likewise.
16525 (emit_support_tinfos): Likewise.
16526 * tinfo.h (cxxabi.h): Include for new-abi.
16527 Move rtti class definitions to new header file.
16528 * tinfo.cc (abi): Use the namespace.
16529 (std): Move new abi rtti classes from here ...
16530 (__cxxabiv1): ... to here.
16531 * tinfo2.cc (cxxabi.h): Include for new-abi.
16532 Move rtti class definitions to new header file.
16533 (std): Move new abi rtti classes from here ...
16534 (__cxxabiv1): ... to here.
16535 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
16538 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
16539 Jason Merrill <jason@casey.cygnus.com>
16541 * method.c (build_overload_int): Use host_integerp.
16543 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16545 * init.c (build_offset_ref): Handle the case of a templated member
16548 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
16550 * except.c (expand_exception_blocks): Clear catch_clauses_last.
16552 2000-03-18 Mark Mitchell <mark@codesourcery.com>
16554 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
16555 * class.c (check_bitfield_decl): Turn illegal bitfields into
16557 (dfs_propagate_binfo_offsets): Adjust for new size_binop
16559 (dfs_offset_for_unshared_vbases): Likewise.
16560 * cvt.c (cp_convert_to_pointer): Convert NULL to a
16561 pointer-to-member correctly under the new ABI.
16562 * expr.c (cplus_expand_constant): Don't use cp_convert when
16563 turning an offset into a pointer-to-member.
16564 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
16565 when dereferencing them under the new ABI.
16566 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
16567 of pointers-to-members under the new ABI.
16569 * class.c (check_bitfield_decl): Remove restriction on really long
16571 (layout_class_type): Implement new ABI handling of bitfields
16572 longer than their types.
16574 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
16576 * parse.y (extdefs): Call ggc_collect.
16577 * parse.c: Regenerated.
16579 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
16581 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
16582 (note_name_declared_in_class): Use OVL_CURRENT to get at a
16583 potential overload.
16585 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16587 * class.c (build_vbase_path): Use integer_zerop.
16588 (build_vtable_entry): Use tree_low_cst.
16589 (get_vfield_offset): Use bit_position.
16590 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
16592 (check_bitfield_decl): Set DECL_SIZE using convert.
16593 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
16594 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
16596 (finish_struct_1): Use bit_position.
16597 (dump_class_hierarchy): Use tree_low_cst.
16598 * cp-tree.h (min_precision): Add declaration.
16599 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
16600 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
16601 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
16602 * expr.c (cplus_expand_constant): Use bit_position.
16603 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
16604 * rtti.c (get_base_offset): Use bit_position.
16605 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
16606 host_integerp, and tree_low_cst.
16607 (pointer_int_sum): Use integer_zerop.
16608 (build_component_addr): Use bit_position.
16610 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
16612 * typeck.c (require_complete_type): Don't assume size_zero_node.
16613 (complete_type_or_else): Likewise.
16615 2000-03-16 Steven Grady <grady@digitaldeck.com>
16616 Jason Merrill <jason@casey.cygnus.com>
16618 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
16620 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
16622 * decl2.c (grokfield): Bail out if type is error_mark_node.
16624 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
16626 * tinfo2.cc (__ptr_to_member_data): Rename to ...
16627 (__pointer_to_member_data): ... here. Adjust.
16628 * rtti.c (create_tinfo_types): Adjust.
16630 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
16632 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
16633 * decl.c (ref_desc_type_node): Undocument.
16634 * rtti.c (ptr_ref_initializer): Rename to ...
16635 (ptr_initializer): ... here. Adjust comments.
16636 (ptmd_initializer): Fix comment thinko.
16637 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
16638 (create_tinfo_types): Remove ref_desc_type_node init.
16639 * tinfo2.cc (__reference_type_info): Remove.
16641 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
16643 * decl.c (cp_finish_decl): Remove obsolete comment.
16645 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
16647 2000-03-14 Mark Mitchell <mark@codesourcery.com>
16649 * cp-tree.h: Tweak documentation.
16650 * class.c (build_vbase_pointer_fields): Layout the fields, too.
16651 (avoid_overlap): Remove.
16652 (get_binfo_offset_as_int): New function.
16653 (dfs_serach_base_offsets): Likewise.
16654 (layout_nonempty_base_or_field): Likewise.
16655 (build_base_field): Layout fields here. Avoid placing two objects
16656 of the same type at the same address, under the new ABI.
16657 (build_base_fields): Adjust accordingly.
16658 (create_vtable_ptr): Return the new field, but don't attach it to
16660 (remove_base_field): Remove.
16661 (remove_base_fields): Remove.
16662 (layout_basetypes): Adjust accordingly.
16663 (layout_class_type): Call layout_field for each field, rather than
16664 just making a wholesale call to layout_type.
16666 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
16668 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
16670 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
16672 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
16674 * except.c (dtor_nothrow): New fn.
16675 (do_pop_exception): Use it. Take type parm.
16676 (push_eh_cleanup): Take type parm.
16677 (expand_start_catch_block): Pass it.
16678 (build_eh_type_type_ref): Accept null type.
16680 2000-03-12 Mark Mitchell <mark@codesourcery.com>
16682 * cp-tree.h (revert_static_member_fn): Change prototype.
16683 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
16684 (grok_op_properties): Likewise.
16685 (start_function): Likewise.
16686 (revert_static_member_fn): Simplify.
16687 * pt.c (check_explicit_specialization): Adjust call to
16688 revert_static_member_fn.
16690 2000-03-11 Mark Mitchell <mark@codesourcery.com>
16692 * cp-tree.h (scope_kind): New type.
16693 (tmpl_spec_kind): Likewise.
16694 (declare_pseudo_global_level): Remove.
16695 (pseudo_global_level_p): Rename to template_parm_scope_p.
16696 (pushlevel): Remove declaration.
16697 (begin_scope): New function.
16698 (finish_scope): Likewise.
16699 (current_tmpl_spec_kind): Likewise.
16700 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
16701 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
16702 Add template_spec_p.
16703 (toplevel_bindings_p): Adjust.
16704 (declare_pseudo_global_level): Remove.
16705 (pseudo_global_level_p): Rename to template_parm_scope_p.
16706 (current_tmpl_spec_kind): New function.
16707 (begin_scope): Likewise.
16708 (finish_scope): Likewise.
16709 (maybe_push_to_top_level): Adjust.
16710 (maybe_process_template_type_declaration): Likewise.
16711 (pushtag): Likewise.
16712 (pushdecl_nonclass_level): Likewise.
16713 (lookup_tag): Likewise.
16714 (grokfndecl): Handle member template specializations. Share
16715 constructor and non-constructor code.
16716 * decl2.c (check_classfn): Handle member template specializations.
16717 * pt.c (begin_template_parm_list): Use begin_scope.
16718 (begin_specialization): Likewise.
16719 (end_specialization): Likewise.
16720 (check_explicit_specialization): Use current_tmpl_spec_kind.
16721 Handle member template specializations.
16722 (end_template_decl): Use finish_scope. Remove call to
16724 (push_template_decl_real): Remove bogus error message.
16725 (tsubst_decl): Fix typo in code contained in comment.
16726 (instantiate_template): Handle member template specializations.
16727 (most_general_template): Likewise.
16729 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
16731 * lex.c (whitespace_cr): Compress consecutive calls to warning().
16732 (do_identifier): Ditto for error().
16734 * pt.c (convert_nontype_argument): Ditto for cp_error().
16735 (convert_template_argument): Ditto for cp_pedwarn().
16737 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
16739 * exception.cc (__check_null_eh_spec): New fn.
16740 * except.c (expand_end_eh_spec): Call it if the spec is throw().
16742 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
16744 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
16745 * except.c (expand_end_eh_spec): Add the return type.
16746 * rtti.c (throw_bad_cast): Add the parmtypes.
16747 (throw_bad_typeid): Likewise.
16749 * semantics.c (expand_stmt): Only leave out rtl for unused
16750 artificials, and set DECL_IGNORED_P on them as well.
16751 * decl.c (wrapup_globals_for_namespace): Likewise.
16753 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
16755 * decl.c (maybe_commonize_var): Skip all artificial decls.
16756 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
16758 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
16760 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
16761 * cp-tree.h: Declare flag_enforce_eh_specs.
16762 * decl.c (store_parm_decls, finish_function): Check it.
16764 C library functions don't throw.
16765 * Makefile.in (cfns.h): New target.
16766 (except.o): Depend on it.
16767 * Make-lang.in (cc1plus): Depend on cfns.gperf.
16768 * cfns.gperf: New file.
16769 * cfns.h: Generated.
16770 * except.c: Include it.
16771 (nothrow_libfn_p): New fn.
16772 * decl.c (grokfndecl): Use it.
16773 * cp-tree.h: Declare it.
16775 * decl.c (push_overloaded_decl_1, auto_function,
16776 define_function): Lose.
16777 (build_library_fn_1): New static fn.
16778 (builtin_function): Use it.
16779 (get_atexit_node): Use build_library_fn_ptr.
16780 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
16781 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
16782 push_void_library_fn, push_throw_library_fn): New fns.
16783 * cp-tree.h: Declare them.
16784 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
16785 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
16786 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
16787 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
16788 * rtti.c (build_runtime_decl): Lose.
16789 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
16790 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
16791 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
16793 * call.c (build_call): Remove result_type parm.
16794 Call mark_used on unused artificial fns.
16795 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
16797 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
16799 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
16801 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
16802 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
16803 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
16804 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
16805 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
16806 expand_generic_desc): Likewise.
16808 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
16810 * exception.cc (__cp_pop_exception): Cleanup the original object.
16812 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
16814 * decl.c (grok_op_properties): Merge conversion to void warning
16815 with other silly op warnings.
16817 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
16819 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
16820 array CONSTRUCTOR elements. Don't use expr_tree_cons.
16822 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
16824 * decl.c (cp_make_fname_decl): New function.
16825 (wrapup_globals_for_namespace): Don't emit unused static vars.
16826 (init_decl_processing): Remove comment about use of
16827 array_domain_type. Set make_fname_decl.
16828 (cp_finish_decl): Remove __FUNCTION__ nadgering.
16829 * semantics.c (begin_compound_stmt): Remove
16830 current_function_name_declared flagging.
16831 (expand_stmt): Don't emit unused local statics.
16832 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
16835 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
16837 * typeck.c (convert_for_assignment): Don't look at array
16839 * call.c (convert_like_real): Likewise.
16841 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
16843 Add initial support for '\uNNNN' specifier.
16844 * lex.c (read_ucs): New fn.
16845 (readescape, skip_white_space): Call it.
16846 (is_extended_char, is_extended_char_1): New fns.
16847 (utf8_extend_token): New fn, #if 0'd out.
16848 (real_yylex): Treat extended chars like letters.
16850 * search.c (note_debug_info_needed): Walk the bases even if we
16851 weren't deferring the type itself.
16853 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16855 * decl2.c (finish_objects): Constify a char*.
16857 * method.c (emit_thunk): Likewise.
16859 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
16861 * typeck.c (dubious_conversion_warnings): Look through
16864 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16866 * class.c (dfs_modify_vtables): I is now unsigned.
16867 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
16868 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
16869 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
16870 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
16871 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
16872 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
16873 Call integer_all_onesp.
16874 * typeck2.c (process_init_constructor): Use compare_tree_int.
16876 * lang-specs.h (as): Don't call if -syntax-only.
16878 2000-03-06 Mark Mitchell <mark@codesourcery.com>
16880 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
16881 RTL_EXPR_HAS_NO_SCOPE after all.
16883 2000-03-05 Mark Mitchell <mark@codesourcery.com>
16885 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
16886 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
16887 RTL_EXPR_HAS_NO_SCOPE.
16889 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
16892 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
16894 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
16896 * call.c (convert_like): Macrofy.
16897 (convert_like_with_context): New macro.
16898 (convert_like_real): Renamed from convert_like. Add calling
16899 context parameters, for diagnostics. Add recursive flag. Call
16900 dubious_conversion_warnings for outer conversion.
16901 (build_user_type_conversion): Use convert_like_with_context.
16902 (build_over_call): Likewise. Don't warn about dubious
16903 conversions here. Adjust convert_default_arg calls.
16904 (convert_default_arg): Add context parameters for diagnostics.
16905 Pass through to convert_like_with_context.
16906 * cp-tree.h (convert_default_arg): Add context parameters.
16907 (dubious_conversion_warnings): Prototype new function.
16908 * typeck.c (convert_arguments): Adjust convert_default_arg call.
16909 (dubious_conversion_warnings): New function, broken
16910 out of convert_for_assignment.
16911 (convert_for_assignment): Adjust.
16913 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
16915 * decl2.c (key_method): Break out from...
16916 (import_export_vtable, import_export_class): ...here.
16918 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
16919 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
16921 * search.c (note_debug_info_needed, dfs_debug_mark,
16922 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
16923 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
16925 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
16927 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
16930 2000-03-02 Mark Mitchell <mark@codesourcery.com>
16932 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
16933 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
16934 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
16935 (lang_type): Split gets_new into has_new and has_array_new.
16936 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16937 (TYPE_GETS_NEW): Split into ...
16938 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
16939 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
16940 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
16941 (build_op_new_call): Don't declare.
16942 (build_new_1): Likewise.
16943 * call.c (build_op_new_call): Remove.
16944 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
16945 instead of TYPE_NEEDS_DESTRUCTOR.
16946 (finish_struct_bits): Likewise.
16947 (add_implicitly_declared_members): Likewise.
16948 (check_field_decl): Likewise.
16949 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
16950 correctly under the new ABI.
16951 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
16952 instead of TYPE_NEEDS_DESTRUCTOR.
16953 (initialize_local_var): Likewise.
16954 (destroy_local_var): Likewise.
16955 (cp_finish_decl): Likewise.
16956 (register_dtor_fn): Likewise.
16957 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
16958 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
16959 TYPE_VEC_DELETE_TAKES_SIZE here.
16960 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
16961 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
16962 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16963 (finish_destructor_body): Likewise.
16964 (maybe_build_cleanup_1): Likewise.
16965 * decl2.c (do_static_destruction): Likewise.
16966 * init.c (build_new_1): Make it static.
16967 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16968 (expand_cleanup_for_base): Likewise.
16969 (get_cookie_size): New function.
16970 (build_new_1): Handle array-new cookies correctly under the new
16972 (build_vec_delete_1): Likewise.
16973 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16974 (build_delete): Likewise.
16975 (build_vec_delete): Handle array-new cookies correctly under the new
16977 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16978 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
16979 TYPE_HAS_ARRAY_NEW_OPERATOR.
16980 * ptree.c (print_lang_type): Check them.
16981 * search.c (context_for_name_lookup): Fix typo in comment.
16982 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16983 * tree.c (break_out_cleanups): Likewise.
16984 (build_cplus_array_test_1): Likewise.
16985 (cp_build_qualified_type_real): Likewise.
16986 * typeck.c (complete_type): Likewise.
16988 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
16989 the command-line, not the end.
16991 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
16993 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
16995 2000-03-02 Tom Tromey <tromey@cygnus.com>
16997 * cp-tree.h (build_java_class_ref): Declare.
16998 * init.c (build_java_class_ref): No longer static.
16999 * except.c (expand_throw): Generate a Java-style `throw' if the
17000 thrown object is a "Java" object.
17001 (initialize_handler_parm): Generate a Java-style lookup of
17002 exception info if the caught object is a "Java" object.
17003 (catch_language, catch_language_init): New globals.
17004 (decl_is_java_type): New function.
17005 (expand_start_catch_block): Don't call push_eh_info() or
17006 push_eh_cleanup() when handling a Java-style "catch". Pass Java
17007 class reference to build_catch_block.
17009 2000-03-02 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17011 * typeck.c (comptypes): Treat sizetype like its language equivalent.
17013 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
17015 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
17016 to merge reference/pointer code and fix incorrect warnings.
17018 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
17020 * search.c (protected_accessible_p): Use context_for_name_lookup.
17022 * init.c (construct_virtual_bases): Fix thinko.
17023 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
17025 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
17027 * decl.c (current_function_decl): Move to toplev.c.
17029 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
17031 * pt.c (fn_type_unification): Unify return type, whenever
17033 (get_bindings_real): Only pass return type when necessary.
17034 Remove explicit return type check.
17035 * class.c (resolve_address_of_overloaded_function): Pass desired
17036 return type to fn_type_unification.
17038 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17040 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
17042 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
17044 * rtti.c (expand_class_desc): Likewise.
17045 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
17046 (THUNK_VCALL_OFFSET): Likewise.
17047 (THUNK_DELTA): Reflect changes in ../tree.h.
17049 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
17051 * search.c (protected_accessible_p): Also allow the access if
17052 the member is public in DERIVED. Lose TYPE parm.
17053 (friend_accessible_p): Lose TYPE parm.
17054 (accessible_p): Adjust.
17056 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17058 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
17059 on things that are not sizes; ssize_binop deleted.
17060 Call size_diffop when appropriate.
17061 (dfs_build_vcall_offset_vtbl_entries): Likewise.
17062 (build_primary_vtable, build_secondary_vtable): Likewise.
17063 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
17064 Variable I is HOST_WIDE_INT.
17065 (get_vfield_offset): Pass proper types to size_binop.
17066 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
17067 (finish_struct_1): Likewise.
17068 (skip_rtti_stuff): Arg N is now pointer to signed.
17069 (layout_class_type): Use size_zero_node.
17070 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
17071 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
17072 * decl.c (complete_arry_type): Pass proper types to size_binop.
17073 (xref_basetypes): BINFO_OFFSET is sizetype.
17074 * error.c (dump_expr): Don't use size_binop non-sizes.
17075 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
17076 * init.c (construct_virtual_bases): Fix type error.
17077 (build_vec_delete_1): Pass proper type to size_binop and don't
17079 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
17080 * rtti.c (get_base_offset): Pass proper type to size_binop.
17081 * search.c (dfs_find_vbases): Fix type error.
17082 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
17083 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
17084 * tree.c (debug_binfo): Variable N is signed.
17085 Use HOST_WIDE_INT_PRINT_DEC.
17086 * typeck.c (comptypes): sizetype is same as equivalent integer type.
17087 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
17088 size_one_node and size_zero_node.
17089 (c_alignof): Use size_one_node.
17090 (build_component_addr): Pass proper types to size_binop.
17091 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
17093 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
17095 Implement class scope using-declarations for functions.
17096 * class.c (handle_using_decl): Call add_method for used functions.
17097 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
17098 (add_method): Used functions are hidden by local functions.
17099 (check_bases_and_members): Handle using-decls before finalizing
17100 CLASSTYPE_METHOD_VEC.
17101 * call.c (add_function_candidate): Add ctype parm; if nonzero,
17102 override the type of 'this' accordingly.
17103 (add_template_candidate, add_template_candidate_real): Add ctype parm.
17104 (convert_class_to_reference, build_user_type_conversion_1,
17105 build_new_function_call, build_object_call, build_new_op,
17106 build_new_method_call): Pass ctype parm.
17108 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
17110 * call.c (convert_class_to_reference, build_user_type_conversion_1,
17111 build_new_function_call, build_object_call, build_new_op,
17112 build_new_method_call, build_op_delete_call): Don't get basetype_path
17114 * typeck.c (build_component_ref): Likewise.
17115 * init.c (build_offset_ref): Likewise.
17116 (resolve_offset_ref): Don't call enforce_access.
17117 Call build_scoped_ref.
17118 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
17119 would cause an error or if -pedantic.
17120 * class.c (alter_access): Lose binfo parm.
17122 2000-02-26 Mark Mitchell <mark@codesourcery.com>
17124 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
17127 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
17129 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
17130 pseudo_type_info creation into the std namespace
17132 2000-02-26 Mark Mitchell <mark@codesourcery.com>
17134 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
17135 (import_export_class): Remove declaration.
17136 * decl2.c (import_export_class): Make it static.
17137 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
17138 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
17139 EXPR_WITH_FILE_LOCATION.
17140 * lex.c (check_newline): Tweak filename/lineno setting.
17141 * semantics.c (begin_while_stmt): Fix typo in comment.
17143 2000-02-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17145 * lang-options.h (-fmessage-length=): Add missing option.
17147 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
17149 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
17151 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
17153 2000-02-25 Jim Wilson <wilson@cygnus.com>
17155 * optimize.c (expand_call_inline): Emit the return label before
17156 evaluating the return value.
17158 2000-02-24 Mark Mitchell <mark@codesourcery.com>
17160 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
17161 than duplicating functionality here.
17162 * optimize.c: Include input.h.
17163 (expand_call_inline): Use push_srcloc and pop_srcloc.
17164 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
17165 * parse.c: Regenerated.
17166 * Makefile.in (lex.o): Depend on input.h.
17167 (optimize.o): Likewise.
17169 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
17171 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
17172 function type, rather than ICE.
17174 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
17176 * decl.c (grokdeclarator): Call decl_type_access_control.
17177 * parse.y (parse_end_decl): Don't call decl_type_access_control if
17180 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
17182 * decl.c (decls_match): Remove obsolete static member nadgering.
17184 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17186 * decl.c (grokdeclarator): Change ANSI to ISO.
17187 * lex.c (consume_string, readescape, do_identifier): Likewise.
17188 (parse_float, real_yylex): Likewise.
17189 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
17190 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
17191 new_type_id, maybe_label_decls, simple_stmt,
17192 for.init.statement): Likewise.
17193 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
17194 * semantics.c (finish_named_return_value): Likewise.
17195 * parse.c: Regenerate.
17197 2000-02-21 Mark Mitchell <mark@codesourcery.com>
17199 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
17200 (CPTI_CLASS_STAR_TYPE): Remove.
17201 (vtable_index_type): Likewise.
17202 (class_star_type_node): Remove.
17203 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
17204 (build_binary_op_nodefault): Remove.
17205 * call.c (build_new_op): Use build_binary_op instead of
17206 build_binary_op_nodefault.
17207 * decl.c (init_decl_processing): Remove class_star_type_node
17208 initialization. Make delta_type_node ptrdiff_type_node under the
17209 new ABI. Initialize vtable_index_type.
17210 (build_ptrmemfunc_type): Build different structures for the new
17212 (build_enumerator): Use build_binary_op instead of
17213 build_binary_op_nodefault.
17214 * method.c (build_overload_value): Mangle pointers-to-members
17215 appropriately under the new ABI.
17216 * typeck.c (build_array_ref): Use build_binary_op instead of
17217 build_binary_op_nodefault.
17218 (get_member_function_from_ptrfunc): Adjust for the new ABI.
17219 (build_binary_op_nodefault): Rename to ...
17220 (build_binary_op): ... this. Remove old version. Adjust for
17221 pointer-to-member comparisons under the new ABI.
17222 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
17223 (build_ptrmemfunc): Adjust for the new ABI.
17224 (expand_ptrmemfunc_cst): Likewise.
17225 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
17226 (pfn_from_ptrmemfunc): Adjust for the new ABI.
17228 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
17230 * call.c (build_object_call): Compress consecutive calls to
17232 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
17233 (build_op_delete_call): Adjust message formatting.
17235 * class.c (check_bases): Compress consecutive calls to
17237 (finish_struct_anon): Say 'ISO C++'.
17239 * decl.c (start_decl): Same here.
17240 (grok_reference_init): Likewise.
17241 (grokfndecl): Correct message formatting.
17242 (grokfndecl): Improve diagnostic.
17243 (check_static_variable_definition): Likewise. Say 'ISO C++'
17244 (compute_array_index_type): Say 'ISO C++'
17245 (create_array_type_for_decl): Compress consecutive calls to
17247 (grokdeclarator): Say 'ISO C++'
17248 (grok_op_properties): Likewise.
17250 * decl2.c (delete_sanity): Clairify diagnostic.
17251 (check_member_template): Same here.
17252 (grok_function_init): Use consistent terminology.
17254 * expr.c (do_case): Say 'ISO C++'
17256 * friend.c (do_friend): Compress consecutive calls to warning.
17258 2000-02-20 Mark Mitchell <mark@codesourcery.com>
17260 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
17261 * class.c (build_secondary_vtable): Reorganize. Don't create a
17262 new vtable under the new ABI.
17263 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
17264 computing the size.
17265 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
17266 the initializing elements.
17267 (initialize_vtable): New function.
17268 (dfs_finish_vtbls): Use it.
17269 (dfs_accumulate_vtbl_inits): New function.
17270 (finish_vtbls): Merge primary and secondary vtables under the new
17272 (finish_struct_1): Remove redundant call to layout_vtable_decl.
17273 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
17276 * class.c (build_vtable): New function, split out from ...
17277 (get_vtable_decl): ... here, and ...
17278 (build_secondary_vtable): ... here.
17280 * pt.c (tsubst_decl): Fix formatting.
17282 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17284 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
17285 (avoid_overlap, build_base_field): Likewise.
17286 (build_base_field, build_base_fields, is_empty_class):
17287 Test DECL_SIZE with integer_zero.
17288 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
17289 * cp-tree.h (struct lang_type): New field size_unit.
17290 (CLASSTYPE_SIZE_UNIT): New macro.
17291 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
17292 (cp_finish_decl): Delete -Wlarger-than processing.
17293 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
17294 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
17295 * tree.c (make_binfo): binfo vector is one entry longer.
17296 (walk_tree): Walk DECL_SIZE_UNIT.
17298 2000-02-19 Mark Mitchell <mark@codesourcery.com>
17300 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
17302 (build_vtable_entry): Don't assume all vtable entries are
17304 (build_vtbl_initializer): Adjust accordingly.
17305 (get_vtable_decl): Fix formatting.
17307 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
17309 * semantics.c (deferred_type_access_control): Walk the entire
17311 (save_type_access_control): Rename from
17312 initial_deferred_type_access_control. Just remember the value.
17313 (decl_type_access_control): New fn.
17314 (begin_function_definition): Use deferred_type_access_control, after
17315 we've started the function. Set type_lookups to error_mark_node.
17316 * parse.y (frob_specs, fn.def1): Adjust.
17317 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
17318 (parse_end_decl, parse_bitfield0, parse_method): New fns.
17319 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
17320 (after_type_component_declarator0): Likewise.
17321 (after_type_component_declarator): Likewise.
17322 (notype_component_declarator): Likewise.
17323 * cp-tree.h: Adjust.
17325 * decl.c (redeclaration_error_message): Allow redeclaration of
17326 namespace-scope decls.
17328 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
17330 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
17332 2000-02-17 Mark Mitchell <mark@codesourcery.com>
17334 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
17335 * decl2.c (grokclassfn): Likewise.
17337 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
17339 * decl2.c (lang_decode_option): Don't set default message length
17341 * lex.c (lang_init_options): Set it here.
17343 2000-02-16 Mark Mitchell <mark@codesourcery.com>
17345 Make DECL_CONTEXT mean the class in which a member function was
17346 declared, even for a virtual function.
17347 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
17348 (DECL_FRIEND_CONTEXT): New macro.
17349 (DECL_REAL_CONTEXT): Remove.
17350 (SET_DECL_FRIEND_CONTEXT): Likewise.
17351 (DECL_VIRTUAL_CONTEXT): Adjust.
17352 (DECL_CLASS_SCOPE_P): Use TYPE_P.
17353 (add_friends): Remove.
17354 (hack_decl_function_context): Likewise.
17355 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
17357 (build_over_call): Fix indentation. Use DECL_CONTEXT
17358 instead of DECL_CLASS_CONTEXT.
17359 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
17360 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
17361 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
17362 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
17363 (build_base_field): Likewise.
17364 (finish_struct_1): Likewise.
17365 (build_self_reference): Likewise.
17366 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
17368 (pushtag): Use decl_function_context, not
17369 hack_decl_function_context.
17370 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
17371 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
17372 (pushdecl): Remove bogus code.
17373 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
17374 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
17375 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
17376 Use decl_function_context, nothack_decl_function_context.
17377 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
17378 (grokdeclarator): Likewise. Use decl_function_context, not
17379 hack_decl_function_context.
17380 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
17381 (start_function): Use DECL_FRIEND_CONTEXT, not
17382 DECL_CLASS_CONTEXT. Use decl_function_context, not
17383 hack_decl_function_context.
17384 (finish_function): Use decl_function_context, not
17385 hack_decl_function_context.
17386 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
17387 DECL_CLASS_CONTEXT.
17388 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
17389 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
17390 (grokfield): Likewise.
17391 (finish_builtin_type): Likewise.
17392 (finish_vtable_vardec): Use decl_function_context, not
17393 hack_decl_function_context.
17394 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
17395 (start_static_initialization_or_destruction): Likewise.
17396 (finish_static_initialization_or_destruction): Likewise.
17397 (mark_used): Adjust logic for deciding when to synthesize methods.
17398 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
17400 * error.c (dump_function_decl): Use DECL_CONTEXT, not
17401 DECL_CLASS_CONTEXT.
17402 * friend.c (is_friend): Likewise.
17403 (add_friends): Remove.
17404 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
17405 * lex.c (begin_definition_of_inclass_inline): Use
17406 decl_function_context, not hack_decl_function_context.
17407 (process_next_inline): Likewise.
17408 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
17409 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
17410 DECL_CLASSS_CONTEXT.
17411 (hack_identifier): Likewise.
17412 (synthesize_method): Use decl_function_context, not
17413 hack_decl_function_context.
17414 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
17416 (is_member_template): Use decl_function_context, not
17417 hack_decl_function_context. Use DECL_CONTEXT, not
17418 DECL_CLASS_CONTEXT.
17419 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
17420 DECL_CLASS_CONTEXT.
17421 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
17423 (push_template_decl_real): Likewise.
17424 (instantiate_class_template): Don't call add_friends.
17425 (tsubst_default_argument): Use DECL_CONTEXT, not
17427 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
17428 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
17429 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
17430 DECL_CLASS_CONTEXT.
17431 * repo.c (repo_inline_used): Likewise.
17432 * search.c (current_scope): Adjust for new _CONTEXT macros.
17433 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
17435 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
17436 (lookup_fnfields_here):Likewise.
17437 (check_final_overrider): Likewise.
17438 (init_vbase_pointers): Likewise.
17439 (virtual_context): Likewise.
17440 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
17441 (expand_body): Use decl_function_context, not
17442 hack_decl_function_context.
17443 * tree.c (hack_decl_function_context): Remove.
17444 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
17445 DECL_CLASS_CONTEXT.
17446 * typeck2.c (error_not_base_type): Likewise.
17448 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
17450 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
17452 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17454 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
17456 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
17458 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
17460 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
17462 * decl2.c (lang_decode_option): Enable automatic line wrapping.
17464 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
17466 * parse.y (frob_specs): Split out...
17467 (parse_decl): From here.
17468 (fn.def2): Call initial_deferred_type_access_control.
17469 (after_type_component_declarator0): Call frob_specs.
17470 (notype_component_declarator0): Likewise.
17471 * search.c (friend_accessible_p): Nested classes are friends of their
17474 2000-02-10 Mark Mitchell <mark@codesourcery.com>
17476 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
17477 used to create an implicit temporary.
17479 * class.c (dfs_modify_vtables): Tweak calculation of functions to
17482 2000-02-08 Nathan Sidwell <nathan@acm.org>
17484 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
17485 strip array element qualifiers too.
17487 2000-02-07 Mark Mitchell <mark@codesourcery.com>
17489 * decl.c (store_parm_decls): Don't build cleanups for parameters
17490 while processing_template_decl.
17492 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
17494 * cp-tree.h (struct saved_scope): Add incomplete field.
17495 (namespace_scope_incomplete): New macro.
17496 * decl.c (pushdecl): Use it.
17497 (hack_incomplete_structures): Use it. See through artificial
17499 (mark_saved_scope): Mark it.
17501 Implement access control for nested types.
17502 * search.c (type_access_control): New fn.
17503 (accessible_p): Now we do perform access control for types.
17504 * semantics.c (deferred_type_access_control): New fn.
17505 (initial_deferred_type_access_control): New fn.
17506 (begin_function_definition): Call it. Add lookups parm.
17507 * decl.c (struct binding_level): Add this_class field.
17508 (pushlevel_class): Set it.
17509 (mark_binding_level): Mark it.
17510 (lookup_name_real): Use it. Call type_access_control.
17511 (mark_saved_scope): Mark lookups field.
17512 * cp-tree.h (flagged_type_tree): Add lookups field.
17513 (struct saved_scope): Add lookups field.
17514 (type_lookups): New macro.
17515 * parse.y (declmods): Now <ftype>.
17516 (parse_decl): Add lookups parm. Call
17517 initial_deferred_type_access_control.
17518 (lang_extdef): Clear type_lookups.
17519 (typed_declspecs, declmods, typespec): Set lookups field.
17520 (initdcl): Call deferred_type_access_control.
17521 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
17522 component_decl_1, named_parm): Adjust.
17523 * friend.c (is_friend): Nested classes are friends of their
17526 * class.c (currently_open_derived_class): New fn.
17527 * method.c (hack_identifier): Use it.
17529 * lex.c (do_identifier): Remove obsolete code.
17531 * parse.y (typed_typespecs): Propagate new_type_flag properly.
17533 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
17535 * tinfo.h: Remove apostrophes from C++ comment (xgettext
17536 thinks this file is plain C).
17538 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17540 * Makefile.in (call.o): Depend on $(EXPR_H).
17542 * call.c: Include "expr.h".
17544 * class.c (dump_class_hierarchy): Add prototype.
17546 * search.c (dfs_get_pure_virtuals): Likewise.
17548 2000-02-1 Ulrich Drepper <drepper@redhat.com>
17550 * parse.y (simple_stmt): Allow :: token in asm parameter list.
17551 * parse.c: Rebuilt.
17553 2000-01-31 Jim Wilson <wilson@cygnus.com>
17555 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
17556 Store it in DECL_FCONTEXT.
17557 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
17559 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
17561 * tinfo.h (old abi): #include "tconfig.h".
17562 * tinfo.cc (convert_to_base): Move into old abi section.
17564 2000-01-31 Mark Mitchell <mark@codesourcery.com>
17566 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
17567 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
17568 (BINFO_PRIMARY_BINFO): New macro.
17569 (BF_DELTA): Rename to ...
17570 (BV_DELTA): ... this.
17571 (BF_VCALL_INDEX): Rename to ...
17572 (BV_VCALL_INDEX): ... this.
17573 (BF_FN): Rename to ...
17575 * class.c (build_vbase_path): Adjust for changes to reverse_path.
17576 (set_rtti_entry): Rename BF_ macros to BV_ variants.
17577 (modify_vtable_entry): Simplify.
17578 (add_virtual_function): Rename BF_ macros to BV_ variants.
17579 (build_vtable_initializer): Likewise.
17580 (get_class_offset_1): Remove.
17581 (dfs_get_class_offset): Likewise.
17582 (get_class_offset): Likewise.
17583 (dfs_find_final_overrider): New function.
17584 (find_final_overrider): Likewise.
17585 (modify_one_vtable): Remove.
17586 (dfs_find_base): New function.
17587 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
17588 find_final_overrider.
17589 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
17591 (dfs_fixup_vtable_deltas): Remove.
17592 (override_one_vtable): Remove.
17593 (merge_overrides): Likewise.
17594 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
17595 unreal chilren of virtual bases.
17596 (finish_struct_1): Don't use merge_overrides. Don't use
17597 dfs_fixup_vtable_deltas.
17598 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
17601 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
17602 Jason Merrill <jason@yorick.cygnus.com>
17604 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
17606 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
17608 * exception.cc (__throw_bad_typeid): Add missing std::.
17610 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17612 * cp-tree.h (make_thunk): PROTO -> PARAMS.
17614 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
17616 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
17618 Runtime support for new-abi rtti.
17619 * inc/typeinfo (type_info::operator!=): Define in class.
17620 (type_info::before, type_info::name, type_info::operator==,
17621 type_info::operator!=): Define new ABI implementations.
17622 (type_info::is_pointer_p, type_info::is_function_p): Declare
17623 new virtual functions.
17624 (type_info::do_catch, type_info::do_upcast): Likewise.
17626 * tinfo.h (__base_class_info): Define new class.
17627 (__class_type_info): Likewise.
17628 (__si_class_type_info): Likewise.
17629 (__vmi_class_type_info): Likewise.
17630 (__dynamic_cast): Prototype.
17632 * tinfo.cc: Conditionalize old and new rtti mechanisms.
17633 (type_info::is_pointer_p): Define new function.
17634 (type_info::is_function_p): Likewise.
17635 (type_info::do_catch): Likewise.
17636 (type_info::do_upcast): Likewise.
17637 (vtable_prefix): New structure for vtable access.
17638 (adjust_pointer): Define new template function.
17639 (contained_p, public_p, virtual_p, contained_public_p,
17640 contained_nonpublic_p, contained_nonvirtual_p): Define new
17642 (nonvirtual_base_type): New local variable.
17643 (__class_type_info::~__class_type_info): Define.
17644 (__si_class_type_info::~__si_class_type_info): Likewise.
17645 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
17646 (__class_type_info::do_catch): Define new function.
17647 (__class_type_info::do_upcast): Likewise.
17648 (__class_type_info::find_public_src): Likewise.
17649 (__class_type_info::do_find_public_src): Likewise.
17650 (__si_class_type_info::do_find_public_src): Likewise.
17651 (__vmi_class_type_info::do_find_public_src): Likewise.
17652 (__class_type_info::do_dyncast): Likewise.
17653 (__si_class_type_info::do_dyncast): Likewise.
17654 (__vmi_class_type_info::do_dyncast): Likewise.
17655 (__class_type_info::do_upcast): Likewise.
17656 (__si_class_type_info::do_upcast): Likewise.
17657 (__vmi_class_type_info::do_upcast): Likewise.
17658 (__dynamic_cast): Likewise.
17660 * tinfo2.cc (__fundamental_type_info): Define new class.
17661 (__pointer_type_info): Likewise.
17662 (__reference_type_info): Likewise.
17663 (__array_type_info): Likewise.
17664 (__function_type_info): Likewise.
17665 (__enum_type_info): Likewise.
17666 (__ptr_to_member_type_info): Likewise.
17667 (__fundamental_type_info::~__fundamental_type_info): Define.
17668 (__pointer_type_info::~__pointer_type_info): Likewise.
17669 (__reference_type_info::~__reference_type_info): Likewise.
17670 (__array_type_info::~__array_type_info): Likewise.
17671 (__function_type_info::~__function_type_info): Likewise.
17672 (__enum_type_info::~__enum_type_info): Likewise.
17673 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
17674 (__pointer_type_info::do_catch): Define new function.
17675 (__ptr_to_member_type_info::do_catch): Define new function.
17677 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
17678 (__is_pointer): Likewise.
17680 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
17682 2000-01-30 Mark Mitchell <mark@codesourcery.com>
17684 * cp/class.c (build_vtable): Rename to build_primary_vtable.
17685 (prepare_fresh_vtable): Rename to build_secondary_vtable.
17686 (make_new_vtable): New function.
17687 (modify_vtable_entry): Handle generation of new vtables correctly.
17688 (modify_one_vtable): Remove unused parameter.
17689 (dfs_fixup_vtable_deltas): Likewise.
17690 (override_one_vtable): Use build_secondary_vtable.
17691 (finish_struct_1): Use build_primary_vtable and
17692 build_secondary_vtable.
17694 2000-01-28 Ulrich Drepper <drepper@redhat.com>
17696 * cp/decl.c: Adjust variable names, comments, help strings.
17698 2000-01-29 Nathan Sidwell <nathan@acm.org>
17700 * new2.cc (operator delete[]): Use operator delete, don't assume
17703 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
17705 * class.c (build_vtbl_initializer): Add argument to
17706 build_vtable_entry call.
17708 2000-01-27 Mark Mitchell <mark@codesourcery.com>
17710 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
17711 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
17712 (BF_DELTA): New macro.
17713 (BF_VCALL_INDEX): Likewise.
17715 (THUNK_VCALL_OFFSET): Likewise.
17716 (make_thunk): Change prototype.
17717 * class.c (build_vtable_entry): Integrate
17718 build_vtable_entry_for_fn. Handle vcall indices.
17719 (build_vtable_entry_for_fn): Remove.
17720 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
17721 BF_VCALL_INDEX, BF_FN.
17722 (modify_vtable_entry): Integrate common code from
17723 modify_one_vtable and dfs_fixup_vtable_deltas.
17724 (add_virtual_function): Set BF_VCALL_INDEX.
17725 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
17727 (modify_one_vtable): Simplify.
17728 (dfs_fixup_vtable_deltas): Likewise.
17729 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
17730 * method.c (make_thunk): Handle vcall indices.
17732 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
17734 Compiler side new abi rtti (not enabled).
17735 * cp-tree.h (new_abi_rtti_p): New macro.
17736 (emit_support_tinfos): Prototype new function.
17737 (tinfo_decl_p): Likewise.
17738 (emit_tinfo_decl): Likwise.
17739 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
17741 (doing_runtime): New local static.
17742 (init_rtti_processing): Add new-abi initializer.
17743 (get_tinfo_decl): Add new-abi logic.
17744 (tinfo_from_decl): Likewise.
17745 (build_dynamic_cast_1): Likewise.
17746 (qualifier_flags): New static function.
17747 (tinfo_base_init): Likewise.
17748 (generic_initializer): Likewise.
17749 (ptr_ref_initializer): Likewise.
17750 (ptmd_initializer): Likewise.
17751 (class_hint_flags): Likewise.
17752 (class_initializer): Likewise.
17753 (synthesize_tinfo_var): Likewise.
17754 (create_real_tinfo_var): Likewise.
17755 (create_pseudo_type_info): Likewise.
17756 (get_vmi_pseudo_type_info): Likewise.
17757 (create_tinfo_types): Likewise.
17758 (emit_support_tinfos): New global function.
17759 (tinfo_decl_p): New global predicate.
17760 (emit_tinfo_decl): New global function.
17761 * class.c (set_rtti_entry): Generalize for old and new rtti.
17762 (build_vtbl_initializer): Likewise.
17763 * decl2.c (finish_file): Likewise.
17765 2000-01-27 Jim Wilson <wilson@cygnus.com>
17767 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
17768 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
17770 2000-01-27 Mike Stump <mrs@wrs.com>
17772 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
17775 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
17777 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
17779 2000-01-26 J"orn Rennecke <amylaar@cygnus.co.uk>
17781 * optimize.c (calls_setjmp_r): Supply new argument
17782 to special_function_p.
17784 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17786 * call.c: PROTO -> PARAMS.
17787 * class.c: Likewise.
17788 * cp-tree.h: Likewise.
17790 * decl.c: Likewise.
17791 * decl.h: Likewise.
17792 * decl2.c: Likewise.
17793 * dump.c: Likewise.
17794 * errfn.c: Likewise.
17795 * error.c: Likewise.
17796 * except.c: Likewise.
17797 * expr.c: Likewise.
17798 * init.c: Likewise.
17799 * input.c: Likewise.
17802 * method.c: Likewise.
17803 * optimize.c: Likewise.
17804 * parse.y: Likewise.
17806 * repo.c: Likewise.
17807 * rtti.c: Likewise.
17808 * search.c: Likewise.
17809 * semantics.c: Likewise.
17810 * spew.c: Likewise.
17811 * tree.c: Likewise.
17812 * typeck.c: Likewise.
17813 * typeck2.c: Likewise.
17814 * xref.c: Likewise.
17816 2000-01-25 Richard Henderson <rth@cygnus.com>
17818 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
17820 2000-01-25 Mark Mitchell <mark@codesourcery.com>
17822 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
17823 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
17824 (struct vcall_offset_data_s): New type.
17825 (dfs_vcall_offset_queue_p): New function.
17826 (dfs_build_vcall_offset_vtbl_entries): Likewise.
17827 (build_vcall_offset_vtbl_entries): Likewise.
17828 (layout_vtable_decl): Likewise.
17829 (num_vfun_entries): Likewise.
17830 (num_extra_vtbl_entries): Add the entries for vcall offsets.
17831 (build_vtbl_initializer): Likewise.
17832 (dfs_finish_vtabls): Use layout_vtable_decl.
17833 (modify_one_vtables): Always duplicate vtables under the new ABI.
17834 (finish_struct_1): Use layout_vtable_decl.
17836 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17838 * decl.c (member_function_or_else): Change third arg from a format
17839 specifier to an `enum overload_flags'. Callers changed.
17841 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
17843 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
17844 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
17845 build_const_cast, get_delta_difference, check_return_expr): Avoid
17846 ANSI string concatenation usage.
17848 2000-01-24 Mark Mitchell <mark@codesourcery.com>
17850 * class.c (layout_class_type): Put the fields required to make a
17851 class non-empty at the end, not the beginning, of the TYPE_FIELDs
17854 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
17856 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
17859 * decl2.c (mark_used): Do instantiate inlines that have been
17860 explicitly instantiated.
17862 2000-01-24 Richard Henderson <rth@cygnus.com>
17864 * call.c (build_over_call): Use expand_tree_builtin.
17865 * typeck.c (build_function_call_real): Likewise.
17866 (build_binary_op_nodefault): Handle unordered compares.
17868 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
17870 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
17871 cp_tree_index values.
17872 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
17873 New global node #defines for them.
17874 * rtti.c (call_void_fn): Replace with ...
17875 (build_runtime_decl): ... new static function.
17876 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
17877 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
17878 (build_dynamic_cast_1): Always produce correctly typed result.
17879 Explicitly produce type_info addresses. Use dynamic_cast_node.
17880 * exception.cc (__throw_bad_cast): Return `void *'.
17881 (__throw_bad_typeid): Return `const type_info &'.
17883 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
17885 * cp-tree.h (get_vtable_decl): Prototype new function.
17886 * class.c (get_vtable_decl): New function. Broken out from ...
17887 (build_vtable): ... here. Use it.
17888 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
17889 by get_vtable_decl.
17891 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
17893 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
17894 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
17895 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
17896 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
17897 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
17898 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
17899 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
17900 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
17901 (CPTI_TINFO_VAR_ID): New enumeration.
17902 (__tp_desc_type_node, __access_mode_type_node,
17903 __bltn_desc_type_node, __user_desc_type_node,
17904 __class_desc_type_node, __ptr_desc_type_node,
17905 __attr_desc_type_node, __func_desc_type_node,
17906 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
17907 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
17908 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
17909 enum_desc_type_node, class_desc_type_node,
17910 si_class_desc_type_node, vmi_class_desc_type_node,
17911 ptmd_desc_type_node, base_desc_type_node): New #defines.
17912 (tinfo_fn_id, tinfo_fn_type): Rename to ...
17913 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
17914 (tinfo_var_id): New enumeration.
17915 (DECL_TINFO_FN_P): Augment comment.
17916 * decl.c (cp_global_trees): Adjust documentation.
17917 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
17918 tinfo_decl_type and tinfo_var_id.
17919 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
17920 (build_typeid): Remove unused variable.
17921 (get_tinfo_var): Use tinfo_var_id.
17922 (tinfo_name): New static function.
17923 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
17924 (tinfo_from_decl): Likewise.
17925 (get_base_offset): New static function, broken out of
17927 (expand_si_desc): Use tinfo_name.
17928 (expand_class_desc): Likewise. Lose local static variable.
17929 Use base_desc_type_node. Use get_base_offset.
17930 (expand_ptr_desc): Use tinfo_name.
17931 (expand_attr_desc): Likewise.
17932 (expand_generic_desc): Likewise.
17934 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
17935 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
17937 2000-01-23 Mark Mitchell <mark@codesourcery.com>
17939 * cp-tree.h (__eprintf): Remove declaration.
17940 * tree.c (__eprintf): Remove definition.
17942 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
17943 Mark Mitchell <mark@codesourcery.com>
17945 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
17946 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
17948 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
17950 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
17952 2000-01-23 Mark Mitchell <mark@codesourcery.com>
17954 * cp-tree.h (register_dtor_fn): New function.
17955 * decl.c (destroy_local_static): Rename to ...
17956 (register_dtor_fn): ... this. Give it external linkage.
17957 (expand_static_init): Use it.
17958 * decl2.c (do_static_initialization): Likewise, if using
17960 (do_static_destruction): Check that __cxa_atexit is not in use.
17961 (finish_file): Don't call do_static_destruction if using
17964 * typeck.c (convert_arguments): Restore two-message error
17967 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
17969 Remap dynamic cast hint values to be consistent across ABIs.
17970 * search.c (dynamic_cast_base_recurse): Remap generated value.
17971 (get_dynamic_cast_base_type): Adjust documentation.
17972 * tinfo.h (__user_type_info::dyncast): Likewise.
17973 (__user_type_info::find_public_subobj): Remap BOFF meaning.
17974 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
17975 (__class_type_info::do_dyncast): Likewise.
17976 (__class_type_info::do_find_public_subobj): Likewise.
17977 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
17979 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
17981 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
17983 * typeck2.c (incomplete_type_error): Restore previous
17984 cp_error and cp_error_at call sequence.
17986 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
17988 * class.c (dump_class_hierarchy): Make format agree with argument;
17989 cast pointer to unsigned long and print with %lx.
17991 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
17993 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
17995 * typeck.c (composite_pointer_type, common_type,
17996 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
17997 build_function_call_real, convert_arguments,
17998 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
17999 build_unary_op, mark_addressable, build_compound_expr,
18000 build_static_cast, build_reinterpret_cast, build_const_cast,
18001 build_c_cast, build_modify_expr, get_delta_difference,
18002 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
18003 'ISO C++'. Fusion consecutive calls to diagnostic message routines
18005 * typeck2.c (readonly_error, abstract_virtuals_error,
18006 process_init_constructor, check_for_new_type): Likewise.
18008 2000-01-19 Mark Mitchell <mark@codesourcery.com>
18010 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
18013 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
18015 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
18016 (build_x_typeid): Likewise.
18017 (get_tinfo_fn): Likewise.
18018 (get_tinfo_fn_unused): Rename to ...
18019 (get_tinfo_decl): ... here.
18020 * rtti.c (build_headof): Replace logic error with assertion.
18021 (get_tinfo_fn_dynamic): Rename to ...
18022 (get_tinfo_decl_dynamic): ... here. Make static. Use
18023 complete_type_or_else.
18024 (build_x_typeid): Move into ...
18025 (build_typeid): ... here. Adjust call to
18026 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
18027 throw_bad_typeid expression.
18028 (get_tinfo_fn_unused): Rename to ...
18029 (get_tinfo_decl): ... here. Adjust comment.
18030 (get_tinfo_fn): Delete.
18031 (tinfo_from_decl): New static function.
18032 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
18033 (get_typeid): Use complete_type_or_else.
18034 (build_dynamic_cast_1): Adjust calls to
18035 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
18036 * parse.y (primary): Adjust call to build_typeid.
18037 * except.c (build_eh_type_type_ref): Adjust call to
18038 get_tinfo_decl. Mark as used.
18039 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
18040 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
18041 * parse.c: Regenerated.
18043 2000-01-17 Mark Mitchell <mark@codesourcery.com>
18045 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
18046 calling convention.
18047 (resolves_to_fixed_type_p): Document calling convention.
18048 * rtti.c (build_x_typeid): Initialize NONNULL.
18050 * cp-tree.h (build_shared_int_cst): New function.
18051 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
18052 * class.c (modify_vtable_entry): Likewise.
18053 (add_virtual_function): Split out code to generated shared
18054 INTEGER_CSTs to build_share_int_cst.
18055 (modify_all_vtables): Handle all the overridden functions here.
18056 Add overridden functions from non-primary virtual bases to the
18058 (finish_struct_1): Adjust call to modify_all_vtables. Add
18059 overridden functions from non-primary bases to the vtable.
18060 * tree.c (build_shared_int_cst): New function.
18062 * cp-tree.h (scratchalloc): Remove.
18063 (build_scratch_list): Likewise.
18064 * call.c (convert_class_to_reference): Replace build_scratch_list
18065 and build_expr_list with build_tree_list.
18066 (add_candidate): Replace scratchalloc with expralloc. Note memory
18068 (build_user_type_conversion_1): Replace build_scratch_list
18069 and build_expr_list with build_tree_list.
18070 (build_new_op): Likewise.
18071 (build_op_delete_call): Likewise.
18072 (convert_like): Likewise.
18073 * cvt.c (ocp_convert): Likewise.
18074 * decl.c (start_decl): Likewise.
18075 (start_function): Likewise.
18076 (finish_destructor_body): Likewise.
18077 (maybe_build_cleanup_1): Likewise.
18078 * decl2.c (reparse_decl_as_expr): Likewise.
18079 * init.c (perform_member_init): Likewise.
18080 (expand_cleanup_for_base): Likewise.
18081 (build_builtin_delete_call): Likewise.
18082 (build_new_1): Likewise.
18083 (build_delete): Likewise.
18084 * method.c (do_build_assign_ref): Likewise.
18085 * parse.y (already_scoped_stmt): Likewise.
18086 (nontrivial_exprlist): Likewise.
18087 (net_initializer): Likewise.
18088 (initlist): Likewise.
18089 * parse.c: Regenerated.
18090 * rtti.c (build_x_typeid): Likewise.
18091 (build_dynamic_cast_1): Likewise.
18092 * typeck.c (build_x_compound_expr): Likewise.
18093 (build_static_cast): Likewise.
18094 (build_modify_expr): Likewise.
18096 * cp-tree.h (DECL_VINDEX): Add documentation.
18097 * class.c (build_vtable_entry): Likewise.
18098 (start_vtable): Add comment.
18099 (add_virtual_function): Replace pending_hard_virtuals with
18100 overridden_virtuals and pending_virtuals with new_virtuals.
18101 Replace redundant assignments with assertions.
18102 (check_for_override): Add comment.
18103 (check_bases_and_members): Replace pending_hard_virtuals with
18104 overridden_virtuals and pending_virtuals with new_virtuals.
18105 (create_vtbl_ptr): Likewise.
18106 (layout_class_type): Likewise.
18107 (finish_struct_1): Likewise. Add comments.
18109 2000-01-16 Mark Mitchell <mark@codesourcery.com>
18111 * class.c (finish_struct_1): Replace redundant code with
18114 * cp-tree.h (flag_new_abi): Move.
18115 (flag_use_cxa_atexit): Likewise.
18116 (flag_honor_std): Likewise.
18117 (flag_rtti): Likewise.
18118 (vbase_offsets_in_vtable_p): Define.
18119 (vptrs_present_everywhere_p): Likewise.
18120 (TYPE_CONTAINS_VPTR_P): Likewise.
18121 (dfs_walk_real): Declare.
18122 * class.c (build_vbase_pointer_fields): Check
18123 vbase_offsets_in_vtable_p.
18124 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
18126 (build_vbase_offset_vtbl_entries): Simplify.
18127 (build_vbase_offset_vtbl_entries): Adjust.
18128 (build_vbase_pointer): Add ability to look up vbase offsets in
18130 (start_vtable): New function.
18131 (add_virtual_function): Use it.
18132 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
18133 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
18134 (build_vtbl_initializer): Take the type of the complete object as
18135 input. Use it to correctly calculate vbase offsets.
18136 (dfs_finish_vtbls): Pass the complete type to
18137 build_vtbl_initializer.
18138 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
18139 (create_vtable_ptr): Create a vtable even if there are no
18140 new virtual functions, under the new ABI.
18141 (finish_struct_1): Likewise.
18142 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
18143 * decl.c (exapnd_static_init): Remove call to
18144 preserve_initializer.
18145 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
18147 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
18148 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
18149 (construct_virtual_bases): Don't initialize virtual base pointers
18151 (build_aggr_init): Clean up comment.
18152 (expand_aggr_init_1): Likewise.
18153 * rtti.c (expand_class_desc): Store the virtual function table
18154 index where the vbase offset lives in the offset field.
18155 * search.c (dfs_walk_real): Make it global.
18156 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
18157 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
18159 * tinfo.h (USItype): Make it signed under the new ABI.
18160 * tinfo.cc (convert_to_base): New function. Encapsulate base
18161 conversion logic here.
18162 (__class_type_info::do_upcast): Use it.
18163 (__class_type_info::do_dyncast): Likewise.
18164 (__class_type_info::do_find_public_subobj): Likewise.
18166 * init.c (construct_virtual_bases): Don't look up the addresses of
18167 virtual bases at run-time.
18169 * class.c (build_vbase_pointer): Relocate.
18170 (build_vbase_pointer_fields): Likewise.
18171 (dfs_build_vbase_offset_vtbl_entries): Likewise.
18172 (build_vbase_offset_vtbl_entries): Likewise.
18174 * decl.c (init_decl_processing): Complain if -fnew-abi
18175 -fno-vtable-thunks is used.
18177 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
18180 2000-01-15 Mark Mitchell <mark@codesourcery.com>
18182 * cp-tree.h (num_extra_vtbl_entries): New function.
18183 (size_extra_vtbl_entries): Likewise.
18184 (dfs_vtable_path_unmark): Likewise.
18185 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
18186 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
18187 * class.c (num_extra_vtbl_entries): New function.
18188 (size_extra_vtbl_entries): Likewise.
18189 (dfs_build_vbase_offset_vtbl_entries): New function.
18190 (build_vbase_offset_vtbl_entries): Likewise.
18191 (build_vtbl_initializer): Use it.
18192 (finish_struct_1): Adjust vtable sizes (using
18193 num_extra_vtbl_entries).
18194 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
18195 THUNK_DECL is non-NULL before expanding it.
18196 * init.c (expand_virtual_init): Adjust the vtable pointer by
18197 size_extra_vtbl_entries before storing it.
18198 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
18199 Handle TREE_LIST parameters here, not in the dfs_* functions.
18200 (dfs_unmarked_real_bases_queue_p): Adjust.
18201 (dfs_marked_real_bases_queue_p): Likewise.
18202 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
18203 (dfs_vtable_path_marked_real_bases_queue_p): New function.
18204 (dfs_vtable_path_unmark): Likewise.
18206 2000-01-14 Mark Mitchell <mark@codesourcery.com>
18208 * optimize.c (copy_body_r): Clear the operand three of a
18209 TARGET_EXPR when copying it.
18211 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18213 * method.c (build_decl_overload_real): Check whether we are in ::
18214 before returning __builtin_new/delete.
18216 2000-01-13 Mark Mitchell <mark@codesourcery.com>
18218 * pt.c (tsubst_friend_function): Improve comment.
18219 (instantiate_decl): Avoid crashing when a "nested" function is
18220 instantiated from the top level.
18222 * dump.c (dqeueue_and_dump): Dump
18223 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
18225 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18227 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
18229 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
18231 * g++spec.c (lang_specific_driver): Add -fnew-abi if
18232 ENABLE_NEW_GXX_ABI defined.
18233 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
18234 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
18235 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
18237 2000-01-12 Mark Mitchell <mark@codesourcery.com>
18239 * decl.c (start_cleanup_fn): Call pushdecl.
18241 * call.c (convert_class_to_reference): Fix typos.
18242 (build_conditional_expr): Handle errors gracefully.
18243 * class.c (push_nested_class): Likewise.
18244 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
18245 (DECL_THIS_EXTERN): Use it.
18246 (DECL_THIS_STATIC): Likewise.
18247 * cvt.c (convert_to_void): Handle errors gracefully.
18248 (build_expr_type_conversion): Likewise.
18249 * decl.c (maybe_push_decl): Likewise.
18250 (start_decl_1): Likewise.
18251 (require_complete_types_for_parms): Likewise.
18252 * parse.y (structsp): Likewise.
18253 (base_class): Likewise.
18254 * parse.c: Regenerated.
18255 * pt.c (finish_member_template_decl): Likewise.
18256 * typeck.c (decay_conversion): Likewise.
18258 * cp-tree.h (dfs_skip_vbases): New function.
18259 (find_vbase_instance): Likewise.
18260 * class.c (determine_primary_base): Allow a nearly empty base to
18261 serve as a primary base class under the new ABI.
18262 (get_class_offset_1): Rename to ...
18263 (dfs_get_class_offset): ... this. Simplify. Don't issue error
18265 (get_class_offset): Use it. Issue error messages here.
18266 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
18267 find the right copies of virtual bases.
18268 (fixup_vtable_deltas1): Rename to ...
18269 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
18270 bases as primary bases.
18271 (fixup_vtable_deltas): Remove.
18272 (override_one_vtable): Handle virtual bases as primary bases.
18273 (merge_overrides): Likewise.
18274 (finish_struct_1): Likewise.
18275 (dump_class_hierarchy): Dump primary-ness of bases as well.
18276 * search.c (mark_primary_bases): Use a pre-order traversal to
18277 handle primary virtual bases.
18278 (dfs_skip_vbases): New fiunction.
18279 (expand_upcast_fixups): Adjust to handle primary virtual bases.
18280 (fixup_virtual_upcast_offsets): Likewise.
18281 (fixup_all_virtual_upcast_offsets): Likewise.
18282 (dfs_find_vbase_instances): New function.
18283 (find_vbase_instance): Likewise.
18285 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
18287 * lex.c (DIR_SEPARATOR): Delete macro.
18289 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
18291 * decl2.c (lang_decode_option): Handle automatic line wrapping
18294 2000-01-11 Mark Mitchell <mark@codesourcery.com>
18296 * friend.c (do_friend): Don't resolve scopes when processing
18297 template declarations, even if the qualifying scope doesn't
18298 involve template parameters.
18300 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
18302 * class.c (dfs_modify_vtables_queue_p): Remove.
18303 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
18304 and dfs_marked_real_bases_queue_p instead of
18305 dfs_modify_vtables_queue_p.
18307 * class.c (build_vbase_path): Simplify.
18308 (dfs_propagate_binfo_offsets): New function.
18309 (propagate_binfo_offsets): Use it.
18310 (remove_base_field): Simplify.
18311 (dfs_set_offset_for_vbases): Remove.
18312 (dfs_set_offset_for_shared_vbases): New function.
18313 (dfs_set_offset_for_unshared_vbases): Likewise.
18314 (layout_virtual_bases): Use them.
18315 (layout_basetypes): Don't call propagate_binfo_offsets.
18316 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
18319 * class.c (build_base_field): New function, split out from ...
18320 (build_base_fields): ... here. Use it. Allocate primary bases
18321 first, under the new ABI.
18322 (get_vtable_entry): Remove.
18323 (remove_base_field): New function, split out from ...
18324 (remove_base_fields): ... here. Adjust since primary bases come
18325 first under the new ABI.
18327 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
18328 (initialize_vtbl_ptrs): New function.
18329 (expand_indirect_vtbls_init): Change prototype.
18330 (convert_pointer_to_vbase): Declare.
18331 * init.c (expand_direct_vtbls_init): Remove.
18332 (dfs_initialize_vtbl_ptrs): New function.
18333 (initialize_vtbl_ptrs): Likewise.
18334 (emit_base_init): Use initialize_vtbl_ptrs.
18335 * search.c (convert_pointer_to_vbase): Make it global.
18336 (expand_indirect_vtbls_init): Remove vtable initialization code.
18337 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
18339 * class.c (dfs_finish_vtbls): New function.
18340 (finish_vtbls): Use it.
18341 (dump_class_hierarchy): New function.
18343 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
18344 (BINFO_VBASE_PRIMARY_P): New macro.
18345 (BINFO_VIRTUALS): Add to documentation.
18346 (SET_BINFO_PRIMARY_MARKED_P): Remove.
18347 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
18348 (dfs_mark_primary_bases_queue_p): Likewise.
18349 (dfs_unmarked_real_bases_queue_p): New function.
18350 (dfs_marked_real_bases_queue_p): Likewise.
18351 * search.c (dfs_mark_primary_bases): Adjust.
18352 (mark_primary_bases): Likewise.
18353 (get_shared_vbase_if_not_primary): New function.
18354 (dfs_unmarked_real_bases_queue_p): Likewise.
18355 (dfs_marked_real_bases_queue_p): Likewise.
18356 (dfs_get_pure_virtuals): Simplify.
18357 (get_pure_virtuals): Likewise.
18359 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18361 * lex.c: Include tm_p.h.
18363 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
18365 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
18367 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
18369 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
18370 * pt.c (instantiate_decl): Defer comdat templates that might not be
18373 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
18374 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
18375 (finish_file): Likewise.
18377 * decl2.c (import_export_class): Undo 12/14 change.
18379 * error.c (dump_decl): operator new, not operatornew.
18381 * class.c (field_decl_cmp): A nontype is "greater" than a type.
18382 * search.c (lookup_field_1): Look for the last field with the
18385 2000-01-05 Nathan Sidwell <nathan@acm.org>
18387 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
18390 2000-01-05 Nathan Sidwell <nathan@acm.org>
18392 * typeck.c (build_static_cast): Don't strip target qualifiers
18393 when casting from a class.
18395 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18397 * class.c (warn_hidden): Initialize variable `fndecl'.
18399 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
18401 * decl.c (flag_isoc9x): New variable to be able to use code in
18402 c-common.c. For now always zero.
18404 2000-01-03 Mark Mitchell <mark@codesourcery.com>
18406 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
18407 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
18408 or unshare_base_binfos for virtual bases here.
18409 * search.c (dfs_get_vbase_types): Do it here.
18410 (get_vbase_types): Adjust.
18412 2000-01-02 Mark Mitchell <mark@codesourcery.com>
18414 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
18415 (BINFO_PRIMARY_MARKED_P): Use flag 5.
18416 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
18417 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
18418 (unmark_primary_bases): Remove declaration.
18419 (unmarkedp): Declare.
18420 (dfs_vbase_unmark): Likewise.
18421 * class.c (determine_primary_base): Return immediately if there
18422 are no base classes. Call mark_primary_bases here.
18423 (modify_all_direct_vtables): Remove.
18424 (modify_all_indirect_vtables): Remove.
18425 (dfs_modify_vtables_queue_p): New function.
18426 (dfs_modify_vtables): New function.
18427 (modify_all_vtables): Use them.
18428 (build_base_fields): Build FIELD_DECLs for primary virtual base
18430 (create_vtable_ptr): Don't call determine_primary_base here.
18431 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
18432 (dfs_set_offset_for_vbases): ... this.
18433 (layout_virtual_bases): Use it.
18434 (layout_class_type): Call determine_primary_base here.
18435 * search.c (unmarkedp): Make it global.
18436 (shared_marked_p): Simplify.
18437 (shared_unmarked_p): Likewise.
18438 (dfs_primary_bases_queue_p): Remove.
18439 (dfs_unmark_primary_bases): Likewise.
18440 (unmark_primary_bases): Likewise.
18441 (mark_primary_bases): Simplify.
18442 (get_pure_virtuals): Don't call mark_primary_bases here.
18443 (dfs_vbase_unmark): New function.
18444 (get_vbase_types): Simplify.
18446 * class.c (struct base_info): Remove.
18447 (determine_primary_base): Take has_virtual_p rather than a
18448 base_info as input. Don't calculate max_has_virtual.
18449 (finish_struct_bits): Remove max_has_virtual argument.
18450 (create_vtable_ptr): Remove max_has_virtual_p argument.
18451 (layout_virtual_bases): Remove max argument.
18452 (layout_basetypes): Likewise.
18453 (layout_class_type): Remove max_has_virtual_p argument.
18454 (finish_struct_1): Remove max_has_virtual.
18456 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
18457 (layout_basetypes): Remove.
18458 * class.c (propagate_binfo_offsets): Moved here from tree.c.
18459 Update to handle primary virtual bases.
18460 (remove_base_fields): New function, split out from
18462 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
18463 (layout_virtual_bases): New function, split out from
18464 layout_basetypes. Update to handle primary virtual bases.
18465 (layout_basetypes): Moved here from tree.c. Use
18466 remove_base_fields and layout_virtual_bases.
18467 * search.c (dfs_mark_primary_bases_queue_p): New function.
18468 (mark_primary_bases): Use it.
18469 * tree.c (CEIL): Remove.
18470 (propagate_binfo_offsets): Remove.
18471 (layout_basetypes): Remove.
18473 2000-01-01 Mark Mitchell <mark@codesourcery.com>
18475 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
18476 (BINFO_PRIMARY_MARKED_P): New macro.
18477 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
18478 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
18479 (mark_primary_bases): New function.
18480 (unmark_primary_bases): Likewise.
18481 * search.c (get_abstract_virtuals_1): Remove.
18482 (dfs_mark_primary_bases): New function.
18483 (mark_primary_bases): Likewise.
18484 (dfs_unmark_primary_bases): Likewise.
18485 (unmark_primary_bases): Likewise.
18486 (dfs_get_pure_virtuals): Likewise.
18488 2000-01-01 Mark Mitchell <mark@codesourcery.com>
18490 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
18491 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
18492 (modify_one_vtable): Adjust.
18493 (fixup_vtable_deltas1): Likewise.
18494 (override_one_vtable): Likewise.
18495 * search.c (get_abstract_virtuals_1): Likewise.
18496 (get_pure_virtuals): Likewise.
18497 (expand_upcast_fixups): Likewise.
18498 * tree.c (debug_binfo): Likewise.
18500 * class.c (build_vtable): Don't return a value. Don't rebuild
18501 vtables for bases that have already been handled.
18502 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
18503 already been handled.
18504 (modify_one_vtable): Adjust accordingly.
18505 (fixup_vtable_deltas1): Likewise.
18506 (finish_struct_1): Likewise.
18508 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18510 * call.c (build_new_method_call): Also check destructors.