1 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3 * decl2.c (finish_objects): Constify a char*.
5 * method.c (emit_thunk): Likewise.
7 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
9 * typeck.c (dubious_conversion_warnings): Look through
12 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14 * class.c (dfs_modify_vtables): I is now unsigned.
15 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
16 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
17 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
18 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
19 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
20 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
21 Call integer_all_onesp.
22 * typeck2.c (process_init_constructor): Use compare_tree_int.
24 * lang-specs.h (as): Don't call if -syntax-only.
26 2000-03-06 Mark Mitchell <mark@codesourcery.com>
28 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
29 RTL_EXPR_HAS_NO_SCOPE after all.
31 2000-03-05 Mark Mitchell <mark@codesourcery.com>
33 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
34 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
35 RTL_EXPR_HAS_NO_SCOPE.
37 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
40 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
42 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
44 * call.c (convert_like): Macrofy.
45 (convert_like_with_context): New macro.
46 (convert_like_real): Renamed from convert_like. Add calling
47 context parameters, for diagnostics. Add recursive flag. Call
48 dubious_conversion_warnings for outer conversion.
49 (build_user_type_conversion): Use convert_like_with_context.
50 (build_over_call): Likewise. Don't warn about dubious
51 conversions here. Adjust convert_default_arg calls.
52 (convert_default_arg): Add context parameters for diagnostics.
53 Pass throught to convert_like_with_context.
54 * cp-tree.h (convert_default_arg): Add context parameters.
55 (dubious_conversion_warnings): Prototype new function.
56 * typeck.c (convert_arguments): Adjust convert_default_arg call.
57 (dubious_conversion_warnings): New function, broken
58 out of convert_for_assignment.
59 (convert_for_assignment): Adjust.
61 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
63 * decl2.c (key_method): Break out from...
64 (import_export_vtable, import_export_class): ...here.
66 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
67 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
69 * search.c (note_debug_info_needed, dfs_debug_mark,
70 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
71 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
73 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
75 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
78 2000-03-02 Mark Mitchell <mark@codesourcery.com>
80 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
81 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
82 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
83 (lang_type): Split gets_new into has_new and has_array_new.
84 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
85 (TYPE_GETS_NEW): Split into ...
86 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
87 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
88 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
89 (build_op_new_call): Don't declare.
90 (build_new_1): Likewise.
91 * call.c (build_op_new_call): Remove.
92 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
93 instead of TYPE_NEEDS_DESTRUCTOR.
94 (finish_struct_bits): Likewise.
95 (add_implicitly_declared_members): Likewise.
96 (check_field_decl): Likewise.
97 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
98 correctly under the new ABI.
99 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
100 instead of TYPE_NEEDS_DESTRUCTOR.
101 (initialize_local_var): Likewise.
102 (destroy_local_var): Likewise.
103 (cp_finish_decl): Likewise.
104 (register_dtor_fn): Likewise.
105 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
106 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
107 TYPE_VEC_DELETE_TAKES_SIZE here.
108 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
109 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
110 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
111 (finish_destructor_body): Likewise.
112 (maybe_build_cleanup_1): Likewise.
113 * decl2.c (do_static_destruction): Likewise.
114 * init.c (build_new_1): Make it static.
115 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
116 (expand_cleanup_for_base): Likewise.
117 (get_cookie_size): New function.
118 (build_new_1): Handle array-new cookies correctly under the new
120 (build_vec_delete_1): Likewise.
121 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
122 (build_delete): Likewise.
123 (build_vec_delete): Handle array-new cookies correctly under the new
125 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
126 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
127 TYPE_HAS_ARRAY_NEW_OPERATOR.
128 * ptree.c (print_lang_type): Check them.
129 * search.c (context_for_name_lookup): Fix typo in comment.
130 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
131 * tree.c (break_out_cleanups): Likewise.
132 (build_cplus_array_test_1): Likewise.
133 (cp_build_qualified_type_real): Likewise.
134 * typeck.c (complete_type): Likewise.
136 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
137 the command-line, not the end.
139 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
141 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
143 2000-03-02 Tom Tromey <tromey@cygnus.com>
145 * cp-tree.h (build_java_class_ref): Declare.
146 * init.c (build_java_class_ref): No longer static.
147 * except.c (expand_throw): Generate a Java-style `throw' if the
148 thrown object is a "Java" object.
149 (initialize_handler_parm): Generate a Java-style lookup of
150 exception info if the caught object is a "Java" object.
151 (catch_language, catch_language_init): New globals.
152 (decl_is_java_type): New function.
153 (expand_start_catch_block): Don't call push_eh_info() or
154 push_eh_cleanup() when handling a Java-style "catch". Pass Java
155 class reference to build_catch_block.
157 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
159 * typeck.c (comptypes): Treat sizetype like its language equivalent.
161 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
163 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
164 to merge reference/pointer code and fix incorrect warnings.
166 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
168 * search.c (protected_accessible_p): Use context_for_name_lookup.
170 * init.c (construct_virtual_bases): Fix thinko.
171 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
173 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
175 * decl.c (current_function_decl): Move to toplev.c.
177 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
179 * pt.c (fn_type_unification): Unify return type, whenever
181 (get_bindings_real): Only pass return type when necessary.
182 Remove explicit return type check.
183 * class.c (resolve_address_of_overloaded_function): Pass desired
184 return type to fn_type_unification.
186 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
188 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
190 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
192 * rtti.c (expand_class_desc): Likewise.
193 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
194 (THUNK_VCALL_OFFSET): Likewise.
195 (THUNK_DELTA): Reflect changes in ../tree.h.
197 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
199 * search.c (protected_accessible_p): Also allow the access if
200 the member is public in DERIVED. Lose TYPE parm.
201 (friend_accessible_p): Lose TYPE parm.
202 (accessible_p): Adjust.
204 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
206 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
207 on things that are not sizes; ssize_binop deleted.
208 Call size_diffop when appropriate.
209 (dfs_build_vcall_offset_vtbl_entries): Likewise.
210 (build_primary_vtable, build_secondary_vtable): Likewise.
211 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
212 Variable I is HOST_WIDE_INT.
213 (get_vfield_offset): Pass proper types to size_binop.
214 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
215 (finish_struct_1): Likewise.
216 (skip_rtti_stuff): Arg N is now pointer to signed.
217 (layout_class_type): Use size_zero_node.
218 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
219 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
220 * decl.c (complete_arry_type): Pass proper types to size_binop.
221 (xref_basetypes): BINFO_OFFSET is sizetype.
222 * error.c (dump_expr): Don't use size_binop non-sizes.
223 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
224 * init.c (construct_virtual_bases): Fix type error.
225 (build_vec_delete_1): Pass proper type to size_binop and don't
227 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
228 * rtti.c (get_base_offset): Pass proper type to size_binop.
229 * search.c (dfs_find_vbases): Fix type error.
230 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
231 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
232 * tree.c (debug_binfo): Variable N is signed.
233 Use HOST_WIDE_INT_PRINT_DEC.
234 * typeck.c (comptypes): sizetype is same as equivalent integer type.
235 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
236 size_one_node and size_zero_node.
237 (c_alignof): Use size_one_node.
238 (build_component_addr): Pass proper types to size_binop.
239 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
241 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
243 Implement class scope using-declarations for functions.
244 * class.c (handle_using_decl): Call add_method for used functions.
245 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
246 (add_method): Used functions are hidden by local functions.
247 (check_bases_and_members): Handle using-decls before finalizing
248 CLASSTYPE_METHOD_VEC.
249 * call.c (add_function_candidate): Add ctype parm; if non-zero,
250 override the type of 'this' accordingly.
251 (add_template_candidate, add_template_candidate_real): Add ctype parm.
252 (convert_class_to_reference, build_user_type_conversion_1,
253 build_new_function_call, build_object_call, build_new_op,
254 build_new_method_call): Pass ctype parm.
256 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
258 * call.c (convert_class_to_reference, build_user_type_conversion_1,
259 build_new_function_call, build_object_call, build_new_op,
260 build_new_method_call, build_op_delete_call): Don't get basetype_path
262 * typeck.c (build_component_ref): Likewise.
263 * init.c (build_offset_ref): Likewise.
264 (resolve_offset_ref): Don't call enforce_access.
265 Call build_scoped_ref.
266 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
267 would cause an error or if -pedantic.
268 * class.c (alter_access): Lose binfo parm.
270 2000-02-26 Mark Mitchell <mark@codesourcery.com>
272 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
275 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
277 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
278 pseudo_type_info creation into the std namespace
280 2000-02-26 Mark Mitchell <mark@codesourcery.com>
282 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
283 (import_export_class): Remove declaration.
284 * decl2.c (import_export_class): Make it static.
285 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
286 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
287 EXPR_WITH_FILE_LOCATION.
288 * lex.c (check_newline): Tweak filename/lineno setting.
289 * semantics.c (begin_while_stmt): Fix typo in comment.
291 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
293 * lang-options.h (-fmessage-length=): Add missing option.
295 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
297 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
299 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
301 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
303 * optimize.c (expand_call_inline): Emit the return label before
304 evaluating the return value.
306 2000-02-24 Mark Mitchell <mark@codesourcery.com>
308 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
309 than duplicating functionality here.
310 * optimize.c: Include input.h.
311 (expand_call_inline): Use push_srcloc and pop_srcloc.
312 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
313 * parse.c: Regenerated.
314 * Makefile.in (lex.o): Depend on input.h.
315 (optimize.o): Likewise.
317 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
319 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
320 function type, rather than ICE.
322 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
324 * decl.c (grokdeclarator): Call decl_type_access_control.
325 * parse.y (parse_end_decl): Don't call decl_type_access_control if
328 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
330 * decl.c (decls_match): Remove obsolete static member nadgering.
332 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
334 * decl.c (grokdeclarator): Change ANSI to ISO.
335 * lex.c (consume_string, readescape, do_identifier): Likewise.
336 (parse_float, real_yylex): Likewise.
337 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
338 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
339 new_type_id, maybe_label_decls, simple_stmt,
340 for.init.statement): Likewise.
341 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
342 * semantics.c (finish_named_return_value): Likewise.
343 * parse.c: Regenerate.
345 2000-02-21 Mark Mitchell <mark@codesourcery.com>
347 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
348 (CPTI_CLASS_STAR_TYPE): Remove.
349 (vtable_index_type): Likewise.
350 (class_star_type_node): Remove.
351 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
352 (build_binary_op_nodefault): Remove.
353 * call.c (build_new_op): Use build_binary_op instead of
354 build_binary_op_nodefault.
355 * decl.c (init_decl_processing): Remove class_star_type_node
356 initialization. Make delta_type_node ptrdiff_type_node under the
357 new ABI. Initialize vtable_index_type.
358 (build_ptrmemfunc_type): Build different structures for the new
360 (build_enumerator): Use build_binary_op instead of
361 build_binary_op_nodefault.
362 * method.c (build_overload_value): Mangle pointers-to-members
363 appropriately under the new ABI.
364 * typeck.c (build_array_ref): Use build_binary_op instead of
365 build_binary_op_nodefault.
366 (get_member_function_from_ptrfunc): Adjust for the new ABI.
367 (build_binary_op_nodefault): Rename to ...
368 (build_binary_op): ... this. Remove old version. Adjust for
369 pointer-to-member comparisons under the new ABI.
370 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
371 (build_ptrmemfunc): Adjust for the new ABI.
372 (expand_ptrmemfunc_cst): Likewise.
373 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
374 (pfn_from_ptrmemfunc): Adjust for the new ABI.
376 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
378 * call.c (build_object_call): Compress consecutive calls to
380 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
381 (build_op_delete_call): Adjust message formatting.
383 * class.c (check_bases): Compress consecutive calls to
385 (finish_struct_anon): Say 'ISO C++'.
387 * decl.c (start_decl): Same here.
388 (grok_reference_init): Likewise.
389 (grokfndecl): Correct message formatting.
390 (grokfndecl): Improve diagnostic.
391 (check_static_variable_definition): Likewise. Say 'ISO C++'
392 (compute_array_index_type): Say 'ISO C++'
393 (create_array_type_for_decl): Compress consecutive calls to
395 (grokdeclarator): Say 'ISO C++'
396 (grok_op_properties): Likewise.
398 * decl2.c (delete_sanity): Clairify diagnostic.
399 (check_member_template): Same here.
400 (grok_function_init): Use consistent terminology.
402 * expr.c (do_case): Say 'ISO C++'
404 * friend.c (do_friend): Compress consecutive calls to warning.
406 2000-02-20 Mark Mitchell <mark@codesourcery.com>
408 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
409 * class.c (build_secondary_vtable): Reorganize. Don't create a
410 new vtable under the new ABI.
411 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
413 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
414 the initializing elements.
415 (initialize_vtable): New function.
416 (dfs_finish_vtbls): Use it.
417 (dfs_accumulate_vtbl_inits): New function.
418 (finish_vtbls): Merge primary and secondary vtables under the new
420 (finish_struct_1): Remove redundant call to layout_vtable_decl.
421 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
424 * class.c (build_vtable): New function, split out from ...
425 (get_vtable_decl): ... here, and ...
426 (build_secondary_vtable): ... here.
428 * pt.c (tsubst_decl): Fix formatting.
430 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
432 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
433 (avoid_overlap, build_base_field): Likewise.
434 (build_base_field, build_base_fields, is_empty_class):
435 Test DECL_SIZE with integer_zero.
436 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
437 * cp-tree.h (struct lang_type): New field size_unit.
438 (CLASSTYPE_SIZE_UNIT): New macro.
439 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
440 (cp_finish_decl): Delete -Wlarger-than processing.
441 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
442 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
443 * tree.c (make_binfo): binfo vector is one entry longer.
444 (walk_tree): Walk DECL_SIZE_UNIT.
446 2000-02-19 Mark Mitchell <mark@codesourcery.com>
448 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
450 (build_vtable_entry): Don't assume all vtable entries are
452 (build_vtbl_initializer): Adjust accordingly.
453 (get_vtable_decl): Fix formatting.
455 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
457 * semantics.c (deferred_type_access_control): Walk the entire
459 (save_type_access_control): Rename from
460 initial_deferred_type_access_control. Just remember the value.
461 (decl_type_access_control): New fn.
462 (begin_function_definition): Use deferred_type_access_control, after
463 we've started the function. Set type_lookups to error_mark_node.
464 * parse.y (frob_specs, fn.def1): Adjust.
465 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
466 (parse_end_decl, parse_bitfield0, parse_method): New fns.
467 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
468 (after_type_component_declarator0): Likewise.
469 (after_type_component_declarator): Likewise.
470 (notype_component_declarator): Likewise.
473 * decl.c (redeclaration_error_message): Allow redeclaration of
474 namespace-scope decls.
476 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
478 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
480 2000-02-17 Mark Mitchell <mark@codesourcery.com>
482 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
483 * decl2.c (grokclassfn): Likewise.
485 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
487 * decl2.c (lang_decode_option): Don't set default message length
489 * lex.c (lang_init_options): Set it here.
491 2000-02-16 Mark Mitchell <mark@codesourcery.com>
493 Make DECL_CONTEXT mean the class in which a member function was
494 declared, even for a virtual function.
495 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
496 (DECL_FRIEND_CONTEXT): New macro.
497 (DECL_REAL_CONTEXT): Remove.
498 (SET_DECL_FRIEND_CONTEXT): Likewise.
499 (DECL_VIRTUAL_CONTEXT): Adjust.
500 (DECL_CLASS_SCOPE_P): Use TYPE_P.
501 (add_friends): Remove.
502 (hack_decl_function_context): Likewise.
503 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
505 (build_over_call): Fix indentation. Use DECL_CONTEXT
506 instead of DECL_CLASS_CONTEXT.
507 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
508 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
509 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
510 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
511 (build_base_field): Likewise.
512 (finish_struct_1): Likewise.
513 (build_self_reference): Likewise.
514 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
516 (pushtag): Use decl_function_context, not
517 hack_decl_function_context.
518 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
519 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
520 (pushdecl): Remove bogus code.
521 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
522 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
523 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
524 Use decl_function_context, nothack_decl_function_context.
525 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
526 (grokdeclarator): Likewise. Use decl_function_context, not
527 hack_decl_function_context.
528 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
529 (start_function): Use DECL_FRIEND_CONTEXT, not
530 DECL_CLASS_CONTEXT. Use decl_function_context, not
531 hack_decl_function_context.
532 (finish_function): Use decl_function_context, not
533 hack_decl_function_context.
534 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
536 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
537 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
538 (grokfield): Likewise.
539 (finish_builtin_type): Likewise.
540 (finish_vtable_vardec): Use decl_function_context, not
541 hack_decl_function_context.
542 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
543 (start_static_initialization_or_destruction): Likewise.
544 (finish_static_initialization_or_destruction): Likewise.
545 (mark_used): Adjust logic for deciding when to synthesize methods.
546 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
548 * error.c (dump_function_decl): Use DECL_CONTEXT, not
550 * friend.c (is_friend): Likewise.
551 (add_friends): Remove.
552 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
553 * lex.c (begin_definition_of_inclass_inline): Use
554 decl_function_context, not hack_decl_function_context.
555 (process_next_inline): Likewise.
556 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
557 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
559 (hack_identifier): Likewise.
560 (synthesize_method): Use decl_function_context, not
561 hack_decl_function_context.
562 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
564 (is_member_template): Use decl_function_context, not
565 hack_decl_function_context. Use DECL_CONTEXT, not
567 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
569 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
571 (push_template_decl_real): Likewise.
572 (instantiate_class_template): Don't call add_friends.
573 (tsubst_default_argument): Use DECL_CONTEXT, not
575 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
576 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
577 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
579 * repo.c (repo_inline_used): Likewise.
580 * search.c (current_scope): Adjust for new _CONTEXT macros.
581 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
583 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
584 (lookup_fnfields_here):Likewise.
585 (check_final_overrider): Likewise.
586 (init_vbase_pointers): Likewise.
587 (virtual_context): Likewise.
588 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
589 (expand_body): Use decl_function_context, not
590 hack_decl_function_context.
591 * tree.c (hack_decl_function_context): Remove.
592 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
594 * typeck2.c (error_not_base_type): Likewise.
596 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
598 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
600 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
602 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
604 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
606 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
608 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
610 * decl2.c (lang_decode_option): Enable automatic line wrapping.
612 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
614 * parse.y (frob_specs): Split out...
615 (parse_decl): From here.
616 (fn.def2): Call initial_deferred_type_access_control.
617 (after_type_component_declarator0): Call frob_specs.
618 (notype_component_declarator0): Likewise.
619 * search.c (friend_accessible_p): Nested classes are friends of their
622 2000-02-10 Mark Mitchell <mark@codesourcery.com>
624 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
625 used to create an implicit temporary.
627 * class.c (dfs_modify_vtables): Tweak calculation of functions to
630 2000-02-08 Nathan Sidwell <nathan@acm.org>
632 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
633 strip array element qualifiers too.
635 2000-02-07 Mark Mitchell <mark@codesourcery.com>
637 * decl.c (store_parm_decls): Don't build cleanups for parameters
638 while processing_template_decl.
640 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
642 * cp-tree.h (struct saved_scope): Add incomplete field.
643 (namespace_scope_incomplete): New macro.
644 * decl.c (pushdecl): Use it.
645 (hack_incomplete_structures): Use it. See through artificial
647 (mark_saved_scope): Mark it.
649 Implement access control for nested types.
650 * search.c (type_access_control): New fn.
651 (accessible_p): Now we do perform access control for types.
652 * semantics.c (deferred_type_access_control): New fn.
653 (initial_deferred_type_access_control): New fn.
654 (begin_function_definition): Call it. Add lookups parm.
655 * decl.c (struct binding_level): Add this_class field.
656 (pushlevel_class): Set it.
657 (mark_binding_level): Mark it.
658 (lookup_name_real): Use it. Call type_access_control.
659 (mark_saved_scope): Mark lookups field.
660 * cp-tree.h (flagged_type_tree): Add lookups field.
661 (struct saved_scope): Add lookups field.
662 (type_lookups): New macro.
663 * parse.y (declmods): Now <ftype>.
664 (parse_decl): Add lookups parm. Call
665 initial_deferred_type_access_control.
666 (lang_extdef): Clear type_lookups.
667 (typed_declspecs, declmods, typespec): Set lookups field.
668 (initdcl): Call deferred_type_access_control.
669 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
670 component_decl_1, named_parm): Adjust.
671 * friend.c (is_friend): Nested classes are friends of their
674 * class.c (currently_open_derived_class): New fn.
675 * method.c (hack_identifier): Use it.
677 * lex.c (do_identifier): Remove obsolete code.
679 * parse.y (typed_typespecs): Propagate new_type_flag properly.
681 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
683 * tinfo.h: Remove apostrophes from C++ comment (xgettext
684 thinks this file is plain C).
686 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
688 * Makefile.in (call.o): Depend on $(EXPR_H).
690 * call.c: Include "expr.h".
692 * class.c (dump_class_hierarchy): Add prototype.
694 * search.c (dfs_get_pure_virtuals): Likewise.
696 2000-02-1 Ulrich Drepper <drepper@redhat.com>
698 * parse.y (simple_stmt): Allow :: token in asm parameter list.
701 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
703 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
704 Store it in DECL_FCONTEXT.
705 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
707 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
709 * tinfo.h (old abi): #include "tconfig.h".
710 * tinfo.cc (convert_to_base): Move into old abi section.
712 2000-01-31 Mark Mitchell <mark@codesourcery.com>
714 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
715 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
716 (BINFO_PRIMARY_BINFO): New macro.
717 (BF_DELTA): Rename to ...
718 (BV_DELTA): ... this.
719 (BF_VCALL_INDEX): Rename to ...
720 (BV_VCALL_INDEX): ... this.
721 (BF_FN): Rename to ...
723 * class.c (build_vbase_path): Adjust for changes to reverse_path.
724 (set_rtti_entry): Rename BF_ macros to BV_ variants.
725 (modify_vtable_entry): Simplify.
726 (add_virtual_function): Rename BF_ macros to BV_ variants.
727 (build_vtable_initializer): Likewise.
728 (get_class_offset_1): Remove.
729 (dfs_get_class_offset): Likewise.
730 (get_class_offset): Likewise.
731 (dfs_find_final_overrider): New function.
732 (find_final_overrider): Likewise.
733 (modify_one_vtable): Remove.
734 (dfs_find_base): New function.
735 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
736 find_final_overrider.
737 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
739 (dfs_fixup_vtable_deltas): Remove.
740 (override_one_vtable): Remove.
741 (merge_overrides): Likewise.
742 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
743 unreal chilren of virtual bases.
744 (finish_struct_1): Don't use merge_overrides. Don't use
745 dfs_fixup_vtable_deltas.
746 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
749 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
750 Jason Merrill <jason@yorick.cygnus.com>
752 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
754 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
756 * exception.cc (__throw_bad_typeid): Add missing std::.
758 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
760 * cp-tree.h (make_thunk): PROTO -> PARAMS.
762 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
764 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
766 Runtime support for new-abi rtti.
767 * inc/typeinfo (type_info::operator!=): Define in class.
768 (type_info::before, type_info::name, type_info::operator==,
769 type_info::operator!=): Define new ABI implementations.
770 (type_info::is_pointer_p, type_info::is_function_p): Declare
771 new virtual functions.
772 (type_info::do_catch, type_info::do_upcast): Likewise.
774 * tinfo.h (__base_class_info): Define new class.
775 (__class_type_info): Likewise.
776 (__si_class_type_info): Likewise.
777 (__vmi_class_type_info): Likewise.
778 (__dynamic_cast): Prototype.
780 * tinfo.cc: Conditionalize old and new rtti mechanisms.
781 (type_info::is_pointer_p): Define new function.
782 (type_info::is_function_p): Likewise.
783 (type_info::do_catch): Likewise.
784 (type_info::do_upcast): Likewise.
785 (vtable_prefix): New structure for vtable access.
786 (adjust_pointer): Define new template function.
787 (contained_p, public_p, virtual_p, contained_public_p,
788 contained_nonpublic_p, contained_nonvirtual_p): Define new
790 (nonvirtual_base_type): New local variable.
791 (__class_type_info::~__class_type_info): Define.
792 (__si_class_type_info::~__si_class_type_info): Likewise.
793 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
794 (__class_type_info::do_catch): Define new function.
795 (__class_type_info::do_upcast): Likewise.
796 (__class_type_info::find_public_src): Likewise.
797 (__class_type_info::do_find_public_src): Likewise.
798 (__si_class_type_info::do_find_public_src): Likewise.
799 (__vmi_class_type_info::do_find_public_src): Likewise.
800 (__class_type_info::do_dyncast): Likewise.
801 (__si_class_type_info::do_dyncast): Likewise.
802 (__vmi_class_type_info::do_dyncast): Likewise.
803 (__class_type_info::do_upcast): Likewise.
804 (__si_class_type_info::do_upcast): Likewise.
805 (__vmi_class_type_info::do_upcast): Likewise.
806 (__dynamic_cast): Likewise.
808 * tinfo2.cc (__fundamental_type_info): Define new class.
809 (__pointer_type_info): Likewise.
810 (__reference_type_info): Likewise.
811 (__array_type_info): Likewise.
812 (__function_type_info): Likewise.
813 (__enum_type_info): Likewise.
814 (__ptr_to_member_type_info): Likewise.
815 (__fundamental_type_info::~__fundamental_type_info): Define.
816 (__pointer_type_info::~__pointer_type_info): Likewise.
817 (__reference_type_info::~__reference_type_info): Likewise.
818 (__array_type_info::~__array_type_info): Likewise.
819 (__function_type_info::~__function_type_info): Likewise.
820 (__enum_type_info::~__enum_type_info): Likewise.
821 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
822 (__pointer_type_info::do_catch): Define new function.
823 (__ptr_to_member_type_info::do_catch): Define new function.
825 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
826 (__is_pointer): Likewise.
828 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
830 2000-01-30 Mark Mitchell <mark@codesourcery.com>
832 * cp/class.c (build_vtable): Rename to build_primary_vtable.
833 (prepare_fresh_vtable): Rename to build_secondary_vtable.
834 (make_new_vtable): New function.
835 (modify_vtable_entry): Handle generation of new vtables correctly.
836 (modify_one_vtable): Remove unused parameter.
837 (dfs_fixup_vtable_deltas): Likewise.
838 (override_one_vtable): Use build_secondary_vtable.
839 (finish_struct_1): Use build_primary_vtable and
840 build_secondary_vtable.
842 2000-01-28 Ulrich Drepper <drepper@redhat.com>
844 * cp/decl.c: Adjust variable names, comments, help strings.
846 2000-01-29 Nathan Sidwell <nathan@acm.org>
848 * new2.cc (operator delete[]): Use operator delete, don't assume
851 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
853 * class.c (build_vtbl_initializer): Add argument to
854 build_vtable_entry call.
856 2000-01-27 Mark Mitchell <mark@codesourcery.com>
858 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
859 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
860 (BF_DELTA): New macro.
861 (BF_VCALL_INDEX): Likewise.
863 (THUNK_VCALL_OFFSET): Likewise.
864 (make_thunk): Change prototype.
865 * class.c (build_vtable_entry): Integrate
866 build_vtable_entry_for_fn. Handle vcall indices.
867 (build_vtable_entry_for_fn): Remove.
868 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
869 BF_VCALL_INDEX, BF_FN.
870 (modify_vtable_entry): Integrate common code from
871 modify_one_vtable and dfs_fixup_vtable_deltas.
872 (add_virtual_function): Set BF_VCALL_INDEX.
873 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
875 (modify_one_vtable): Simplify.
876 (dfs_fixup_vtable_deltas): Likewise.
877 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
878 * method.c (make_thunk): Handle vcall indices.
880 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
882 Compiler side new abi rtti (not enabled).
883 * cp-tree.h (new_abi_rtti_p): New macro.
884 (emit_support_tinfos): Prototype new function.
885 (tinfo_decl_p): Likewise.
886 (emit_tinfo_decl): Likwise.
887 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
889 (doing_runtime): New local static.
890 (init_rtti_processing): Add new-abi initializer.
891 (get_tinfo_decl): Add new-abi logic.
892 (tinfo_from_decl): Likewise.
893 (build_dynamic_cast_1): Likewise.
894 (qualifier_flags): New static function.
895 (tinfo_base_init): Likewise.
896 (generic_initializer): Likewise.
897 (ptr_ref_initializer): Likewise.
898 (ptmd_initializer): Likewise.
899 (class_hint_flags): Likewise.
900 (class_initializer): Likewise.
901 (synthesize_tinfo_var): Likewise.
902 (create_real_tinfo_var): Likewise.
903 (create_pseudo_type_info): Likewise.
904 (get_vmi_pseudo_type_info): Likewise.
905 (create_tinfo_types): Likewise.
906 (emit_support_tinfos): New global function.
907 (tinfo_decl_p): New global predicate.
908 (emit_tinfo_decl): New global function.
909 * class.c (set_rtti_entry): Generalize for old and new rtti.
910 (build_vtbl_initializer): Likewise.
911 * decl2.c (finish_file): Likewise.
913 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
915 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
916 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
918 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
920 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
923 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
925 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
927 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
929 * optimize.c (calls_setjmp_r): Supply new argument
930 to special_function_p.
932 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
934 * call.c: PROTO -> PARAMS.
936 * cp-tree.h: Likewise.
944 * except.c: Likewise.
950 * method.c: Likewise.
951 * optimize.c: Likewise.
956 * search.c: Likewise.
957 * semantics.c: Likewise.
960 * typeck.c: Likewise.
961 * typeck2.c: Likewise.
964 2000-01-25 Richard Henderson <rth@cygnus.com>
966 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
968 2000-01-25 Mark Mitchell <mark@codesourcery.com>
970 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
971 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
972 (struct vcall_offset_data_s): New type.
973 (dfs_vcall_offset_queue_p): New function.
974 (dfs_build_vcall_offset_vtbl_entries): Likewise.
975 (build_vcall_offset_vtbl_entries): Likewise.
976 (layout_vtable_decl): Likewise.
977 (num_vfun_entries): Likewise.
978 (num_extra_vtbl_entries): Add the entries for vcall offsets.
979 (build_vtbl_initializer): Likewise.
980 (dfs_finish_vtabls): Use layout_vtable_decl.
981 (modify_one_vtables): Always duplicate vtables under the new ABI.
982 (finish_struct_1): Use layout_vtable_decl.
984 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
986 * decl.c (member_function_or_else): Change third arg from a format
987 specifier to an `enum overload_flags'. Callers changed.
989 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
991 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
992 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
993 build_const_cast, get_delta_difference, check_return_expr): Avoid
994 ANSI string concatenation usage.
996 2000-01-24 Mark Mitchell <mark@codesourcery.com>
998 * class.c (layout_class_type): Put the fields required to make a
999 class non-empty at the end, not the beginning, of the TYPE_FIELDs
1002 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
1004 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
1007 * decl2.c (mark_used): Do instantiate inlines that have been
1008 explicitly instantiated.
1010 2000-01-24 Richard Henderson <rth@cygnus.com>
1012 * call.c (build_over_call): Use expand_tree_builtin.
1013 * typeck.c (build_function_call_real): Likewise.
1014 (build_binary_op_nodefault): Handle unordered compares.
1016 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
1018 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
1019 cp_tree_index values.
1020 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
1021 New global node #defines for them.
1022 * rtti.c (call_void_fn): Replace with ...
1023 (build_runtime_decl): ... new static function.
1024 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
1025 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
1026 (build_dynamic_cast_1): Always produce correctly typed result.
1027 Explicitly produce type_info addresses. Use dynamic_cast_node.
1028 * exception.cc (__throw_bad_cast): Return `void *'.
1029 (__throw_bad_typeid): Return `const type_info &'.
1031 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
1033 * cp-tree.h (get_vtable_decl): Prototype new function.
1034 * class.c (get_vtable_decl): New function. Broken out from ...
1035 (build_vtable): ... here. Use it.
1036 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
1039 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
1041 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
1042 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
1043 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
1044 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
1045 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
1046 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
1047 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
1048 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
1049 (CPTI_TINFO_VAR_ID): New enumeration.
1050 (__tp_desc_type_node, __access_mode_type_node,
1051 __bltn_desc_type_node, __user_desc_type_node,
1052 __class_desc_type_node, __ptr_desc_type_node,
1053 __attr_desc_type_node, __func_desc_type_node,
1054 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
1055 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
1056 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
1057 enum_desc_type_node, class_desc_type_node,
1058 si_class_desc_type_node, vmi_class_desc_type_node,
1059 ptmd_desc_type_node, base_desc_type_node): New #defines.
1060 (tinfo_fn_id, tinfo_fn_type): Rename to ...
1061 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
1062 (tinfo_var_id): New enumeration.
1063 (DECL_TINFO_FN_P): Augment comment.
1064 * decl.c (cp_global_trees): Adjust documentation.
1065 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
1066 tinfo_decl_type and tinfo_var_id.
1067 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
1068 (build_typeid): Remove unused variable.
1069 (get_tinfo_var): Use tinfo_var_id.
1070 (tinfo_name): New static function.
1071 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
1072 (tinfo_from_decl): Likewise.
1073 (get_base_offset): New static function, broken out of
1075 (expand_si_desc): Use tinfo_name.
1076 (expand_class_desc): Likewise. Lose local static variable.
1077 Use base_desc_type_node. Use get_base_offset.
1078 (expand_ptr_desc): Use tinfo_name.
1079 (expand_attr_desc): Likewise.
1080 (expand_generic_desc): Likewise.
1082 * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
1083 * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
1085 2000-01-23 Mark Mitchell <mark@codesourcery.com>
1087 * cp-tree.h (__eprintf): Remove declaration.
1088 * tree.c (__eprintf): Remove definition.
1090 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
1091 Mark Mitchell <mark@codesourcery.com>
1093 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
1094 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
1096 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
1098 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
1100 2000-01-23 Mark Mitchell <mark@codesourcery.com>
1102 * cp-tree.h (register_dtor_fn): New function.
1103 * decl.c (destroy_local_static): Rename to ...
1104 (register_dtor_fn): ... this. Give it external linkage.
1105 (expand_static_init): Use it.
1106 * decl2.c (do_static_initialization): Likewise, if using
1108 (do_static_destruction): Check that __cxa_atexit is not in use.
1109 (finish_file): Don't call do_static_destruction if using
1112 * typeck.c (convert_arguments): Restore two-message error
1115 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
1117 Remap dynamic cast hint values to be consistent across ABIs.
1118 * search.c (dynamic_cast_base_recurse): Remap generated value.
1119 (get_dynamic_cast_base_type): Adjust documentation.
1120 * tinfo.h (__user_type_info::dyncast): Likewise.
1121 (__user_type_info::find_public_subobj): Remap BOFF meaning.
1122 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
1123 (__class_type_info::do_dyncast): Likewise.
1124 (__class_type_info::do_find_public_subobj): Likewise.
1125 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
1127 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.coom>
1129 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
1131 * typeck2.c (incomplete_type_error): Restore previous
1132 cp_error and cp_error_at call sequence.
1134 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
1136 * class.c (dump_class_hierarchy): Make format agree with argument;
1137 cast pointer to unsigned long and print with %lx.
1139 2000-01-19 Gabriel Dos Reis <gdr@codesourcery>
1141 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
1143 * typeck.c (composite_pointer_type, common_type,
1144 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
1145 build_function_call_real, convert_arguments,
1146 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
1147 build_unary_op, mark_addressable, build_compound_expr,
1148 build_static_cast, build_reinterpret_cast, build_const_cast,
1149 build_c_cast, build_modify_expr, get_delta_difference,
1150 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
1151 'ISO C++'. Fusion consecutive calls to diagnotic message routines
1153 * typeck2.c (readonly_error, abstract_virtuals_error,
1154 process_init_constructor, check_for_new_type): Likewise.
1156 2000-01-19 Mark Mitchell <mark@codesourcery.com>
1158 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
1161 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
1163 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
1164 (build_x_typeid): Likewise.
1165 (get_tinfo_fn): Likewise.
1166 (get_tinfo_fn_unused): Rename to ...
1167 (get_tinfo_decl): ... here.
1168 * rtti.c (build_headof): Replace logic error with assertion.
1169 (get_tinfo_fn_dynamic): Rename to ...
1170 (get_tinfo_decl_dynamic): ... here. Make static. Use
1171 complete_type_or_else.
1172 (build_x_typeid): Move into ...
1173 (build_typeid): ... here. Adjust call to
1174 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
1175 throw_bad_typeid expression.
1176 (get_tinfo_fn_unused): Rename to ...
1177 (get_tinfo_decl): ... here. Adjust comment.
1178 (get_tinfo_fn): Delete.
1179 (tinfo_from_decl): New static function.
1180 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
1181 (get_typeid): Use complete_type_or_else.
1182 (build_dynamic_cast_1): Adjust calls to
1183 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
1184 * parse.y (primary): Adjust call to build_typeid.
1185 * except.c (build_eh_type_type_ref): Adjust call to
1186 get_tinfo_decl. Mark as used.
1187 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
1188 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
1189 * parse.c: Regenerated.
1191 2000-01-17 Mark Mitchell <mark@codesourcery.com>
1193 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
1195 (resolves_to_fixed_type_p): Document calling convention.
1196 * rtti.c (build_x_typeid): Initialize NONNULL.
1198 * cp-tree.h (build_shared_int_cst): New function.
1199 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
1200 * class.c (modify_vtable_entry): Likewise.
1201 (add_virtual_function): Split out code to generated shared
1202 INTEGER_CSTs to build_share_int_cst.
1203 (modify_all_vtables): Handle all the overridden functions here.
1204 Add overridden functions from non-primary virtual bases to the
1206 (finish_struct_1): Adjust call to modify_all_vtables. Add
1207 overridden functions from non-primary bases to the vtable.
1208 * tree.c (build_shared_int_cst): New function.
1210 * cp-tree.h (scratchalloc): Remove.
1211 (build_scratch_list): Likewise.
1212 * call.c (convert_class_to_reference): Replace build_scratch_list
1213 and build_expr_list with build_tree_list.
1214 (add_candidate): Replace scratchalloc with expralloc. Note memory
1216 (build_user_type_conversion_1): Replace build_scratch_list
1217 and build_expr_list with build_tree_list.
1218 (build_new_op): Likewise.
1219 (build_op_delete_call): Likewise.
1220 (convert_like): Likewise.
1221 * cvt.c (ocp_convert): Likewise.
1222 * decl.c (start_decl): Likewise.
1223 (start_function): Likewise.
1224 (finish_destructor_body): Likewise.
1225 (maybe_build_cleanup_1): Likewise.
1226 * decl2.c (reparse_decl_as_expr): Likewise.
1227 * init.c (perform_member_init): Likewise.
1228 (expand_cleanup_for_base): Likewise.
1229 (build_builtin_delete_call): Likewise.
1230 (build_new_1): Likewise.
1231 (build_delete): Likewise.
1232 * method.c (do_build_assign_ref): Likewise.
1233 * parse.y (already_scoped_stmt): Likewise.
1234 (nontrivial_exprlist): Likewise.
1235 (net_initializer): Likewise.
1236 (initlist): Likewise.
1237 * parse.c: Regenerated.
1238 * rtti.c (build_x_typeid): Likewise.
1239 (build_dynamic_cast_1): Likewise.
1240 * typeck.c (build_x_compound_expr): Likewise.
1241 (build_static_cast): Likewise.
1242 (build_modify_expr): Likewise.
1244 * cp-tree.h (DECL_VINDEX): Add documentation.
1245 * class.c (build_vtable_entry): Likewise.
1246 (start_vtable): Add comment.
1247 (add_virtual_function): Replace pending_hard_virtuals with
1248 overridden_virtuals and pending_virtuals with new_virtuals.
1249 Replace redundant assignments with assertions.
1250 (check_for_override): Add comment.
1251 (check_bases_and_members): Replace pending_hard_virtuals with
1252 overridden_virtuals and pending_virtuals with new_virtuals.
1253 (create_vtbl_ptr): Likewise.
1254 (layout_class_type): Likewise.
1255 (finish_struct_1): Likewise. Add comments.
1257 2000-01-16 Mark Mitchell <mark@codesourcery.com>
1259 * class.c (finish_struct_1): Replace redundant code with
1262 * cp-tree.h (flag_new_abi): Move.
1263 (flag_use_cxa_atexit): Likewise.
1264 (flag_honor_std): Likewise.
1265 (flag_rtti): Likewise.
1266 (vbase_offsets_in_vtable_p): Define.
1267 (vptrs_present_everywhere_p): Likewise.
1268 (TYPE_CONTAINS_VPTR_P): Likewise.
1269 (dfs_walk_real): Declare.
1270 * class.c (build_vbase_pointer_fields): Check
1271 vbase_offsets_in_vtable_p.
1272 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
1274 (build_vbase_offset_vtbl_entries): Simplify.
1275 (build_vbase_offset_vtbl_entries): Adjust.
1276 (build_vbase_pointer): Add ability to look up vbase offsets in
1278 (start_vtable): New function.
1279 (add_virtual_function): Use it.
1280 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
1281 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
1282 (build_vtbl_initializer): Take the type of the complete object as
1283 input. Use it to correctly calculate vbase offsets.
1284 (dfs_finish_vtbls): Pass the complete type to
1285 build_vtbl_initializer.
1286 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
1287 (create_vtable_ptr): Create a vtable even if there are no
1288 new virtual functions, under the new ABI.
1289 (finish_struct_1): Likewise.
1290 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
1291 * decl.c (exapnd_static_init): Remove call to
1292 preserve_initializer.
1293 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
1295 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
1296 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
1297 (construct_virtual_bases): Don't initialize virtual base pointers
1299 (build_aggr_init): Clean up comment.
1300 (expand_aggr_init_1): Likewise.
1301 * rtti.c (expand_class_desc): Store the virtual function table
1302 index where the vbase offset lives in the offset field.
1303 * search.c (dfs_walk_real): Make it global.
1304 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
1305 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
1307 * tinfo.h (USItype): Make it signed under the new ABI.
1308 * tinfo.cc (convert_to_base): New function. Encapsulate base
1309 conversion logic here.
1310 (__class_type_info::do_upcast): Use it.
1311 (__class_type_info::do_dyncast): Likewise.
1312 (__class_type_info::do_find_public_subobj): Likewise.
1314 * init.c (construct_virtual_bases): Don't look up the addresses of
1315 virtual bases at run-time.
1317 * class.c (build_vbase_pointer): Relocate.
1318 (build_vbase_pointer_fields): Likewise.
1319 (dfs_build_vbase_offset_vtbl_entries): Likewise.
1320 (build_vbase_offset_vtbl_entries): Likewise.
1322 * decl.c (init_decl_processing): Complain if -fnew-abi
1323 -fno-vtable-thunks is used.
1325 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
1328 2000-01-15 Mark Mitchell <mark@codesourcery.com>
1330 * cp-tree.h (num_extra_vtbl_entries): New function.
1331 (size_extra_vtbl_entries): Likewise.
1332 (dfs_vtable_path_unmark): Likewise.
1333 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
1334 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
1335 * class.c (num_extra_vtbl_entries): New function.
1336 (size_extra_vtbl_entries): Likewise.
1337 (dfs_build_vbase_offset_vtbl_entries): New function.
1338 (build_vbase_offset_vtbl_entries): Likewise.
1339 (build_vtbl_initializer): Use it.
1340 (finish_struct_1): Adjust vtable sizes (using
1341 num_extra_vtbl_entries).
1342 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
1343 THUNK_DECL is non-NULL before expanding it.
1344 * init.c (expand_virtual_init): Adjust the vtable pointer by
1345 size_extra_vtbl_entries before storing it.
1346 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
1347 Handle TREE_LIST parameters here, not in the dfs_* functions.
1348 (dfs_unmarked_real_bases_queue_p): Adjust.
1349 (dfs_marked_real_bases_queue_p): Likewise.
1350 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
1351 (dfs_vtable_path_marked_real_bases_queue_p): New function.
1352 (dfs_vtable_path_unmark): Likewise.
1354 2000-01-14 Mark Mitchell <mark@codesourcery.com>
1356 * optimize.c (copy_body_r): Clear the operand three of a
1357 TARGET_EXPR when copying it.
1359 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1361 * method.c (build_decl_overload_real): Check whether we are in ::
1362 before returning __builtin_new/delete.
1364 2000-01-13 Mark Mitchell <mark@codesourcery.com>
1366 * pt.c (tsubst_friend_function): Improve comment.
1367 (instantiate_decl): Avoid crashing when a "nested" function is
1368 instantiated from the top level.
1370 * dump.c (dqeueue_and_dump): Dump
1371 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
1373 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1375 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
1377 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
1379 * g++spec.c (lang_specific_driver): Add -fnew-abi if
1380 ENABLE_NEW_GXX_ABI defined.
1381 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
1382 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
1383 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
1385 2000-01-12 Mark Mitchell <mark@codesourcery.com>
1387 * decl.c (start_cleanup_fn): Call pushdecl.
1389 * call.c (convert_class_to_reference): Fix typos.
1390 (build_conditional_expr): Handle errors gracefully.
1391 * class.c (push_nested_class): Likewise.
1392 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
1393 (DECL_THIS_EXTERN): Use it.
1394 (DECL_THIS_STATIC): Likewise.
1395 * cvt.c (convert_to_void): Handle errors gracefully.
1396 (build_expr_type_conversion): Likewise.
1397 * decl.c (maybe_push_decl): Likewise.
1398 (start_decl_1): Likewise.
1399 (require_complete_types_for_parms): Likewise.
1400 * parse.y (structsp): Likewise.
1401 (base_class): Likewise.
1402 * parse.c: Regenerated.
1403 * pt.c (finish_member_template_decl): Likewise.
1404 * typeck.c (decay_conversion): Likewise.
1406 * cp-tree.h (dfs_skip_vbases): New function.
1407 (find_vbase_instance): Likewise.
1408 * class.c (determine_primary_base): Allow a nearly empty base to
1409 serve as a primary base class under the new ABI.
1410 (get_class_offset_1): Rename to ...
1411 (dfs_get_class_offset): ... this. Simplify. Don't issue error
1413 (get_class_offset): Use it. Issue error messages here.
1414 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
1415 find the right copies of virtual bases.
1416 (fixup_vtable_deltas1): Rename to ...
1417 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
1418 bases as primary bases.
1419 (fixup_vtable_deltas): Remove.
1420 (override_one_vtable): Handle virtual bases as primary bases.
1421 (merge_overrides): Likewise.
1422 (finish_struct_1): Likewise.
1423 (dump_class_hierarchy): Dump primary-ness of bases as well.
1424 * search.c (mark_primary_bases): Use a pre-order traversal to
1425 handle primary virtual bases.
1426 (dfs_skip_vbases): New fiunction.
1427 (expand_upcast_fixups): Adjust to handle primary virtual bases.
1428 (fixup_virtual_upcast_offsets): Likewise.
1429 (fixup_all_virtual_upcast_offsets): Likewise.
1430 (dfs_find_vbase_instances): New function.
1431 (find_vbase_instance): Likewise.
1433 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
1435 * lex.c (DIR_SEPARATOR): Delete macro.
1437 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
1439 * decl2.c (lang_decode_option): Handle automatic line wrapping
1442 2000-01-11 Mark Mitchell <mark@codesourcery.com>
1444 * friend.c (do_friend): Don't resolve scopes when processing
1445 template declarations, even if the qualifying scope doesn't
1446 involve template parameters.
1448 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
1450 * class.c (dfs_modify_vtables_queue_p): Remove.
1451 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
1452 and dfs_marked_real_bases_queue_p instead of
1453 dfs_modify_vtables_queue_p.
1455 * class.c (build_vbase_path): Simplify.
1456 (dfs_propagate_binfo_offsets): New function.
1457 (propagate_binfo_offsets): Use it.
1458 (remove_base_field): Simplify.
1459 (dfs_set_offset_for_vbases): Remove.
1460 (dfs_set_offset_for_shared_vbases): New function.
1461 (dfs_set_offset_for_unshared_vbases): Likewise.
1462 (layout_virtual_bases): Use them.
1463 (layout_basetypes): Don't call propagate_binfo_offsets.
1464 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
1467 * class.c (build_base_field): New function, split out from ...
1468 (build_base_fields): ... here. Use it. Allocate primary bases
1469 first, under the new ABI.
1470 (get_vtable_entry): Remove.
1471 (remove_base_field): New function, split out from ...
1472 (remove_base_fields): ... here. Adjust since primary bases come
1473 first under the new ABI.
1475 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
1476 (initialize_vtbl_ptrs): New function.
1477 (expand_indirect_vtbls_init): Change prototype.
1478 (convert_pointer_to_vbase): Declare.
1479 * init.c (expand_direct_vtbls_init): Remove.
1480 (dfs_initialize_vtbl_ptrs): New function.
1481 (initialize_vtbl_ptrs): Likewise.
1482 (emit_base_init): Use initialize_vtbl_ptrs.
1483 * search.c (convert_pointer_to_vbase): Make it global.
1484 (expand_indirect_vtbls_init): Remove vtable initialization code.
1485 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
1487 * class.c (dfs_finish_vtbls): New function.
1488 (finish_vtbls): Use it.
1489 (dump_class_hierarchy): New function.
1491 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
1492 (BINFO_VBASE_PRIMARY_P): New macro.
1493 (BINFO_VIRTUALS): Add to documentation.
1494 (SET_BINFO_PRIMARY_MARKED_P): Remove.
1495 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
1496 (dfs_mark_primary_bases_queue_p): Likewise.
1497 (dfs_unmarked_real_bases_queue_p): New function.
1498 (dfs_marked_real_bases_queue_p): Likewise.
1499 * search.c (dfs_mark_primary_bases): Adjust.
1500 (mark_primary_bases): Likewise.
1501 (get_shared_vbase_if_not_primary): New function.
1502 (dfs_unmarked_real_bases_queue_p): Likewise.
1503 (dfs_marked_real_bases_queue_p): Likewise.
1504 (dfs_get_pure_virtuals): Simplify.
1505 (get_pure_virtuals): Likewise.
1507 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1509 * lex.c: Include tm_p.h.
1511 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
1513 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
1515 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
1517 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
1518 * pt.c (instantiate_decl): Defer comdat templates that might not be
1521 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
1522 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
1523 (finish_file): Likewise.
1525 * decl2.c (import_export_class): Undo 12/14 change.
1527 * error.c (dump_decl): operator new, not operatornew.
1529 * class.c (field_decl_cmp): A nontype is "greater" than a type.
1530 * search.c (lookup_field_1): Look for the last field with the
1533 2000-01-05 Nathan Sidwell <nathan@acm.org>
1535 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
1538 2000-01-05 Nathan Sidwell <nathan@acm.org>
1540 * typeck.c (build_static_cast): Don't strip target qualifiers
1541 when casting from a class.
1543 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1545 * class.c (warn_hidden): Initialize variable `fndecl'.
1547 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
1549 * decl.c (flag_isoc9x): New variable to be able to use code in
1550 c-common.c. For now always zero.
1552 2000-01-03 Mark Mitchell <mark@codesourcery.com>
1554 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
1555 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
1556 or unshare_base_binfos for virtual bases here.
1557 * search.c (dfs_get_vbase_types): Do it here.
1558 (get_vbase_types): Adjust.
1560 2000-01-02 Mark Mitchell <mark@codesourcery.com>
1562 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
1563 (BINFO_PRIMARY_MARKED_P): Use flag 5.
1564 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
1565 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
1566 (unmark_primary_bases): Remove declaration.
1567 (unmarkedp): Declare.
1568 (dfs_vbase_unmark): Likewise.
1569 * class.c (determine_primary_base): Return immediately if there
1570 are no base classes. Call mark_primary_bases here.
1571 (modify_all_direct_vtables): Remove.
1572 (modify_all_indirect_vtables): Remove.
1573 (dfs_modify_vtables_queue_p): New function.
1574 (dfs_modify_vtables): New function.
1575 (modify_all_vtables): Use them.
1576 (build_base_fields): Build FIELD_DECLs for primary virtual base
1578 (create_vtable_ptr): Don't call determine_primary_base here.
1579 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
1580 (dfs_set_offset_for_vbases): ... this.
1581 (layout_virtual_bases): Use it.
1582 (layout_class_type): Call determine_primary_base here.
1583 * search.c (unmarkedp): Make it global.
1584 (shared_marked_p): Simplify.
1585 (shared_unmarked_p): Likewise.
1586 (dfs_primary_bases_queue_p): Remove.
1587 (dfs_unmark_primary_bases): Likewise.
1588 (unmark_primary_bases): Likewise.
1589 (mark_primary_bases): Simplify.
1590 (get_pure_virtuals): Don't call mark_primary_bases here.
1591 (dfs_vbase_unmark): New function.
1592 (get_vbase_types): Simplify.
1594 * class.c (struct base_info): Remove.
1595 (determine_primary_base): Take has_virtual_p rather than a
1596 base_info as input. Don't calculate max_has_virtual.
1597 (finish_struct_bits): Remove max_has_virtual argument.
1598 (create_vtable_ptr): Remove max_has_virtual_p argument.
1599 (layout_virtual_bases): Remove max argument.
1600 (layout_basetypes): Likewise.
1601 (layout_class_type): Remove max_has_virtual_p argument.
1602 (finish_struct_1): Remove max_has_virtual.
1604 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
1605 (layout_basetypes): Remove.
1606 * class.c (propagate_binfo_offsets): Moved here from tree.c.
1607 Update to handle primary virtual bases.
1608 (remove_base_fields): New function, split out from
1610 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
1611 (layout_virtual_bases): New function, split out from
1612 layout_basetypes. Update to handle primary virtual bases.
1613 (layout_basetypes): Moved here from tree.c. Use
1614 remove_base_fields and layout_virtual_bases.
1615 * search.c (dfs_mark_primary_bases_queue_p): New function.
1616 (mark_primary_bases): Use it.
1617 * tree.c (CEIL): Remove.
1618 (propagate_binfo_offsets): Remove.
1619 (layout_basetypes): Remove.
1621 2000-01-01 Mark Mitchell <mark@codesourcery.com>
1623 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
1624 (BINFO_PRIMARY_MARKED_P): New macro.
1625 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
1626 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
1627 (mark_primary_bases): New function.
1628 (unmark_primary_bases): Likewise.
1629 * search.c (get_abstract_virtuals_1): Remove.
1630 (dfs_mark_primary_bases): New function.
1631 (mark_primary_bases): Likewise.
1632 (dfs_unmark_primary_bases): Likewise.
1633 (unmark_primary_bases): Likewise.
1634 (dfs_get_pure_virtuals): Likewise.
1636 2000-01-01 Mark Mitchell <mark@codesourcery.com>
1638 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
1639 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
1640 (modify_one_vtable): Adjust.
1641 (fixup_vtable_deltas1): Likewise.
1642 (override_one_vtable): Likewise.
1643 * search.c (get_abstract_virtuals_1): Likewise.
1644 (get_pure_virtuals): Likewise.
1645 (expand_upcast_fixups): Likewise.
1646 * tree.c (debug_binfo): Likewise.
1648 * class.c (build_vtable): Don't return a value. Don't rebuild
1649 vtables for bases that have already been handled.
1650 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
1651 already been handled.
1652 (modify_one_vtable): Adjust accordingly.
1653 (fixup_vtable_deltas1): Likewise.
1654 (finish_struct_1): Likewise.
1656 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1658 * call.c (build_new_method_call): Also check destructors.
1660 1999-12-31 Mark Mitchell <mark@codesourcery.com>
1662 * cp-tree.h (VF_NORMAL_VALUE): Remove.
1663 * class.c (struct base_info): Remove vfield, vfields, and rtti.
1664 (set_primary_base): New function, split out from ...
1665 (finish_base_struct): ... here. Rename to ...
1666 (determine_primary_base): ... this. Simplify.
1667 (create_vtable_ptr): Tweak accordingly.
1668 (finish_struct_1): Simplify.
1670 * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation.
1671 (CLASSTYPE_N_BASECLASSES): Likewise.
1672 (BINFO_FOR_VBASE): New macro.
1673 (get_vbase_types): Change prototype.
1674 * class.c (build_vbase_path): Use BINFO_FOR_VBASE.
1675 (prepare_fresh_vtable): Likewise.
1676 (finish_vtbls): Likewise.
1677 (get_class_offset_1): Likewise.
1678 (modify_all_indirect_vtables): Likewise.
1679 (build_vbase_pointer_fields): Likewise.
1680 * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here.
1681 * init.c (sort_base_init): Use BINFO_FOR_VBASE.
1682 (expand_member_init): Likewise.
1683 * search.c (get_base_distance): Likewise.
1684 (lookup_field_queue_p): Likewise.
1685 (virtual_context): Likewise.
1686 (get_vbase_types): Don't return a value. Set
1687 CLASSTYPE_VBASECLASSES here.
1688 * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE.
1690 1999-12-30 Mark Mitchell <mark@codesourcery.com>
1692 * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS.
1694 1999-12-29 Mark Mitchell <mark@codesourcery.com>
1696 * class.c (create_vtable_ptr): Put the vtable at the beginning of
1697 the class, not the end, in the new ABI.
1698 * tree.c (propagate_binfo_offsets): Do the right thing for the new
1701 1999-12-29 Mark Mitchell <mark@codesourcery.com>
1703 * cp-tree.h (lang_type): Add nearly_empty_p. Adjust dummy.
1704 (CLASSTYPE_NEARLY_EMPTY_P): New macro.
1705 * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P.
1706 (check_field_decls): Likewise.
1707 (check_bases_and_members): Likewise.
1709 1999-12-28 Mark Mitchell <mark@codesourcery.com>
1711 * cp-tree.h (do_inline_function_hair): Remove.
1712 * class.c (layout_class_type): New function, split out from
1714 (fixup_pending_inline): Likewise.
1715 (fixup_inline_methods): New function.
1716 * method.c (fixup_pending_inline): Remove.
1717 (do_inline_function_hair): Likewise.
1719 * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
1722 * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals.
1723 (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ...
1724 (CLASSTYPE_PURE_VIRTUALS): ... this.
1725 (lang_decl_flags): Replace abstract_virtual with pure_virtual.
1726 (DECL_ABSTRACT_VIRTUAL_P): Rename to ...
1727 (DECL_PURE_VIRTUAL_P): ... this.
1728 (get_abstract_virtuals): Rename to ...
1729 (get_pure_virtuals): ... this.
1730 * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with
1731 DECL_ABSTRACT_VIRTUAL_P. Replace CLASSTYPE_ABSTRACT_VIRTUALS with
1732 CLASSTYPE_PURE_VIRTUALS.
1733 * class.c (build_vtable_entry): Likewise.
1734 (finish_struct_bits): Likewise. Call get_pure_virtuals, not
1735 get_abstract_virtuals.
1736 (build_vtbl_initializer): Likewise.
1737 (override_one_vtable): Likewise.
1738 (check_methods): Likewise.
1739 * decl.c (duplicate_decls): Likewise.
1740 (redeclaration_error_message): Likewise.
1741 (lang_mark_tree): Likewise.
1742 * decl2.c (grok_function_init): Likewise.
1743 (import_export_vtable): Likewise.
1744 (import_expor_class): Likewise.
1745 * typeck2.c (abstract_virtuals_error): Likewise.
1746 * xref.c (GNU_xref_member): Likewise.
1747 * search.c (get_abstract_virtuals): Rename to get_pure_virtuals.
1749 1999-12-26 Zack Weinberg <zack@wolery.cumb.org>
1751 * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
1754 1999-12-26 Mark Mitchell <mark@codesourcery.com>
1756 * decl.c (store_return_init): Use mode of old RTL generated for
1757 DECL_RESULT, not the mode of DECL_RESULT itself.
1758 * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE
1759 for functions that used named return values.
1761 1999-12-24 Mark Mitchell <mark@codesourcery.com>
1763 * semantics.c (expand_body): Use
1764 note_deferral_of_defined_inline_function.
1766 1999-12-22 Mark Mitchell <mark@codesourcery.com>
1768 * dump.c (dequeue_and_dump): Handle CTOR_STMTs.
1770 1999-12-22 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
1772 * error.c (dump_decl): Support named return values.
1774 1999-12-20 Mark Mitchell <mark@codesourcery.com>
1776 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments.
1777 (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro.
1778 (CLASSTYPE_PRIMARY_BINFO): Likewise.
1779 * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF,
1780 TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here.
1781 (check_bases_and_members): Set them here instead.
1782 (create_vtable_ptr): New function, split out from ...
1783 (finish_struct_1): ... here. Use it. Tidy. Use
1784 CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO.
1785 * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as
1786 the first field in the class.
1787 * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES. Handle
1788 seeing TYPE_VFIELD as the first field in the class.
1790 * cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
1791 (TYPE_POLYMORPHIC_P): ... this.
1792 (TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
1793 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
1794 (TREE_CALLS_NEW): Remove.
1795 (TREE_MANGLED): Likewise.
1796 * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
1797 and TYPE_POLYMORPHIC_P.
1798 * class.c (check_bases): Likewise.
1799 (finish_base_struct): Likewise.
1800 (finish_struct_bits): Likewise.
1801 (check_for_override): Likewise.
1802 (finish_struct_1): Likewise.
1803 (get_vfield_name): Likewise.
1804 * decl.c (xref_basetypes): Likewise.
1805 * decl2.c (import_export_class): Likewise.
1806 (import_export_decl): Likewise.
1807 * error.c (dump_function_decl): Likewise.
1808 * pt.c (instantiate_class_template): Likewise.
1809 * repo.c (repo_inline_used): Likewise.
1810 * rtti.c (build_headof): Likewise.
1811 (get_tinfo_fn_dynamic): Likewise.
1812 (build_x_typeid): Likewise.
1813 (get_tinfo_var): Likewise.
1814 (build_dynamic_cast_1): Likewise.
1815 (synthesize_tinfo_fn): Likewise.
1816 * search.c (lookup_field_1): Likewise.
1817 (dfs_debug_mark): Likewise.
1818 (maybe_suppress_debug_info): Likewise.
1819 * typeck.c (build_component_ref): Likewise.
1820 (build_component_addr): Likewise.
1821 * typeck2.c (process_init_constructor): Likewise.
1823 1999-12-20 Nathan Sidwell <nathan@acm.org>
1825 * typeck.c (strip_all_pointer_quals): New static function.
1826 (build_static_cast): Use it. Don't use at_least_as_qualified_p.
1828 1999-12-16 Mark Mitchell <mark@codesourcery.com>
1830 * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE.
1831 (dso_handle_node): New macro.
1832 (flag_use_cxa_atexit): New variable.
1833 (declare_global_var): New function.
1834 (start_anon_func): Remove declaration.
1835 (end_anon_func): Likewise.
1836 * decl.c (get_atexit_node): New function, split out from
1837 destroy_local_static. Handle flag_use_cxa_atexit.
1838 (get_dso_handle_node): Likewise.
1839 (start_cleanup_fn): Renamed from start_anon_func. Moved here from
1840 except.c. Handle flag_use_cxa_atexit.
1841 (end_cleanup_fn): Renamed from end_anon_func. Moved here from
1843 (declare_global_var): New variable.
1844 (destroy_local_static): Handle flag_use_cxa_atexit.
1845 * decl2.c (flag_use_cxa_atexit): New variable.
1846 (lang_f_options): Likewise.
1847 * except.c (start_anon_func): Remove.
1848 (end_anon_func): Liekwise.
1849 * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit.
1850 * rtti.c (get_tinfo_var): Use declare_global_var.
1852 1999-12-16 Mark Mitchell <mark@codesourcery.com>
1854 * class.c (check_field_decls): Don't return a value.
1855 (avoid_overlap): Moved here from tree.c.
1856 (build_base_fields): Likewise.
1857 (check_bases): New function, split out from finish_base_struct.
1858 (check_bases_and_members): New function, split out from
1860 (struct base_info): Remove cant_have_default_ctor,
1861 cant_have_const_ctor, cant_have_asn_ref.
1862 (finish_base_struct): Split semantic analysis into check_bases.
1863 (finish_struct_methods): Fix bogus assertion.
1864 (check_field_decls): Call finish_struct_anon here.
1865 (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES.
1866 (finish_struct_1): Use check_bases_and_members. Reorganize.
1867 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
1868 (build_base_fields): Don't declare.
1869 * tree.c (avoid_overlap): Remove.
1870 (build_base_fields): Likewise.
1872 * optimize.c (struct inline_data): Remove scope_stmt.
1873 (remap_block): Don't use insert_block_after_note. Don't update
1875 (expand_call_inline): Don't update scope_stmt.
1876 (optimize_function): Don't initialize scope_stmt.
1877 * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
1878 NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.
1880 1999-12-15 Mark Mitchell <mark@codesourcery.com>
1882 * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS
1883 out of the class, rather than taking them as parameters.
1884 (build_vbase_pointer_fields): Move here from tree.c.
1885 (build_vtbl_or_vbase_field): New function.
1886 (check_methods): Likewise.
1887 (remove_zero_width_bitfields): Likewise.
1888 (add_virtual_function): Use tree_cons instead of temp_tree_cons.
1889 (delete_duplicate_fields_1): Tidy. Don't delete duplicate
1891 (finish_struct_methods): Handle the case where there are no
1893 (get_basefndecls): Use tree_cons instead of temp_tree_cons.
1894 (check_field_decls): Call delete_duplicate_fields here.
1895 (finish_struct_1): Tidy. Use check_methods and
1896 remove_zero_width_bitfields.
1897 * cp-tree.h (build_vbase_pointer_fields): Remove.
1898 * decl.c (grokdeclarator): Use tree_cons instead of
1900 * decl2.c (qualified_lookup_using_namespace): Use tree_cons
1901 instead of temp_tree_cons.
1902 * lex.c (cons_up_default_function): Remove dead code.
1903 * method.c (fixup_pending_inline): New function, split out from ...
1904 (do_inline_function_hair): ... here.
1905 * tree.c (build_vbase_pointer_fields): Remove.
1907 1999-12-15 Jason Merrill <jason@casey.cygnus.com>
1909 * tree.c (walk_tree): Walk operand subtrees in forward order.
1910 * optimize.c (expand_call_inline): Likewise.
1911 (optimize_function): Initialize id->scope_stmt to something useful.
1912 (remap_block): Assume id->scope_stmt has a useful value.
1914 1999-12-15 Nathan Sidwell <nathan@acm.org>
1916 * typeck.c (build_c_cast): Expand warning message. Move pointer
1917 alignment warning to after the cast. Don't warn about pointer
1918 alignment when given a pointer to incomplete.
1920 1999-12-15 Richard Henderson <rth@cygnus.com>
1922 * cp-tree.h (make_aggr_type): Declare.
1923 * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
1924 (make_aggr_type): New.
1926 * decl.c (build_typename_type, init_decl_processing): Use it.
1927 (build_ptrmemfunc_type, xref_tag): Likewise.
1928 * except.c (call_eh_info): Likewise.
1929 * init.c (init_init_processing): Likewise.
1930 * pt.c (process_template_parm, lookup_template_class): Likewise.
1931 * rtti.c (expand_class_desc): Likewise.
1932 * semantics.c (begin_class_definition, finish_typeof): Likewise.
1933 * tree.c (copy_template_template_parm): Likewise.
1935 1999-12-15 Jason Merrill <jason@yorick.cygnus.com>
1937 * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
1938 sizeof (struct tree_common).
1940 1999-12-14 Jason Merrill <jason@casey.cygnus.com>
1942 * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the
1943 outermost block to point to the inlined function decl.
1945 * error.c (dump_decl): operator==, not operator ==.
1946 (op_to_string): Likewise.
1948 * decl.c (compute_array_index_type): Handle null name.
1950 * decl2.c (ambiguous_decl): Fix to match comment.
1951 (lookup_using_namespace): Adjust.
1953 * decl2.c (import_export_class): Don't ignore dllimport.
1955 1999-12-14 Mark Mitchell <mark@codesourcery.com>
1957 * class.c (check_field_decls): Split out from ...
1958 (finish_struct_1): ... here. Use it. Tidy.
1960 * cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
1961 * optimize.c (copy_body_r): Pass it.
1962 * tree.c (remap_save_expr): Clear walk_subtrees for an
1963 already-handled SAVE_EXPR.
1964 (cp_unsave_r): Pass walk_subtrees to remap_save_expr.
1966 * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
1967 * ir.texi (DECL_NAMESPACE_ALIAS): Document it.
1969 * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION.
1971 1999-12-14 Mumit Khan <khan@xraylith.wisc.edu>
1973 * class.c (finish_base_struct): Allow multiple COM base classes
1974 as well as non-COM bases as long as it's not the leftmost.
1976 1999-12-13 Mumit Khan <khan@xraylith.wisc.edu>
1978 * lex.c (saving_parse_to_obstack): New global.
1979 (reinit_parse_for_block): Use.
1980 (reinit_parse_for_expr): Use.
1981 (check_newline): Use.
1983 1999-12-13 Mark Mitchell <mark@codesourcery.com>
1985 * optimize.c (initialize_inlined_parameters): Take FN to which the
1986 parameters belong as an argument.
1987 (expand_call_inline): Expand calls into the parameter
1988 initializations before pushing the function onto the list of
1989 functions we are presently expanding.
1991 1999-12-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1993 * class.c (get_vtable_name): Use a literal format string and
1994 VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT.
1995 (prepare_fresh_vtable): Likewise.
1997 * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of
2000 * decl.c (make_rtl_for_local_static): Remove unused variable `type'.
2002 * init.c (build_vec_init): Initialize variable `try_body'.
2004 * lex.c (yyerror): Don't call a variadic function with a
2005 non-literal format string.
2007 * optimize.c (optimize_function): Call memset, not bzero.
2009 * pt.c (for_each_template_parm_r): Add static prototype.
2011 1999-12-09 Andreas Jaeger <aj@suse.de>
2013 * except.c (expand_throw): Add static attribute to match
2016 * Makefile.in (semantics.o): Add dependency on output.h.
2017 * semantics.c: Include output.h for declaration of
2020 1999-12-09 Mark Mitchell <mark@codesourcery.com>
2022 * decl.c (init_decl_processing): Reenable inlining on trees.
2023 (finish_function): Likewise.
2024 * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
2025 * semantics.c (simplify_aggr_init_exprs): New function.
2026 (expand_body): Use it.
2027 * tree.c (walk_tree): Special-case TARGET_EXPRs since they
2028 sometimes present the same sub-tree twice.
2030 * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not
2033 * semantics.c (finish_switch_cond): Do conversions here, not ...
2034 * typeck.c (c_expand_start_case): Here.
2036 * semantics.c (do_poplevel): Remove unused variable.
2038 1999-12-06 Mark Mitchell <mark@codesourcery.com>
2040 * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
2041 unless we're declaring the variable in question.
2043 1999-12-06 Mark Mitchell <mark@codesourcery.com>
2045 * decl.c (init_decl_processing): #if 0 last patch.
2046 (finish_function): Likewise.
2048 1999-12-05 Mark Mitchell <mark@codesourcery.com>
2050 * decl.c (init_decl_processing): Set flag_inline_trees if
2053 * cp-tree.h (calls_setjmp_p): Declare.
2054 * decl.c (finish_function): Mark functions that call setjmp as
2056 * optimize.c (calls_setjmp_r): New function.
2057 (calls_setjmp_p): Likewise.
2059 1999-12-04 Mark Mitchell <mark@codesourcery.com>
2061 * optimize.c (expand_call_inline): Wrap the expanded call in an
2062 EXPR_WITH_FILE_LOCATION node to get correct line numbers for
2065 * optimize.c (inline_data): Remove fns_top. Add scope_stmt. Add
2066 in_target_cleanup_p.
2067 (remap_decl): New function.
2068 (remap_block): Likewise.
2069 (copy_scope_stmt): Likewise.
2070 (copy_body_r): Use remap_decl and copy_scope_stmt.
2071 (copy_body): Use VARRAY_TOP_TREE.
2072 (initialize_inlined_parameters): Likewise.
2073 (declare_return_variable): Likewise.
2074 (inlinable_function_p): Check flag_inline_trees.
2075 (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
2076 specially. Use VARRAY_PUSH_TREE. Create a BLOCK for the
2077 parameters of the inlined function.
2078 (optimize_function): Prevent recursion into partially complete
2081 * cp-tree.def (SCOPE_STMT): Take one operand.
2082 * cp-tree.h (SCOPE_STMT_BLOCK): New macro.
2083 (SCOPE_NULLIFIED_P): Redefine.
2084 (SCOPE_NO_CLEANUPS_P): New macro.
2085 (add_scope_stmt): Change prototype.
2086 * decl.c (poplevel): Tidy. Warn about unused variables here.
2087 Record SCOPE_STMT_BLOCKs.
2088 (finish_function): Keep DECL_INITIAL for functions that might be
2090 * ir.texi: Document SCOPE_NO_CLEANUPS_P.
2091 * semantics.c: Include rtl.h.
2092 (add_scope_stmt): Return the new scope statement and, for an
2093 end-of-scope statement, its matching begin statement. Don't set
2095 (do_pushlevel): Simplify, now that we are always
2097 (do_poplevel): Likewise. Record SCOPE_STMT_BLOCKs.
2098 (expand_stmt): Don't call expand_start_bindings or
2099 expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
2100 * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
2102 * Makefile.in (semantics.o): Depend on RTL_H.
2104 * decl2.c (pending_statics_used): Make it a macro.
2105 (saved_inlines_used): Likewise.
2106 (finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
2107 (mark_inline_for_output): Likewise.
2108 (ssdf_decls_used): Remove.
2109 (start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
2110 (generate_ctor_or_dtor_function): Adjust accordingly.
2112 1999-11-24 Geoffrey Keating <geoffk@cygnus.com>
2113 Greg McGary <gkm@gnu.org>
2115 * decl.c (duplicate_decls): Merge
2116 DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
2117 DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
2119 1999-12-02 Mike Stump <mrs@wrs.com>
2121 * init.c (perform_member_init): Handle parse errors better.
2123 1999-12-01 Mark Mitchell <mark@codesourcery.com>
2125 * cp-tree.h (min_tree_cons): Remove.
2126 (scratch_ovl_cons): Likewise.
2127 * decl.c (saveable_obstack): Don't declare.
2128 (duplicate_decls): Tweak error-message.
2129 (initialize_local_var): Explicitly mark the definition as static.
2130 (finish_function): Call permanent_allocation, just so
2131 that the middle-end sees the obstacks it expects.
2132 (mark_cp_function_context): Likewise.
2133 * init.c (build_new): Don't use min_tree_cons.
2134 * lex.c (permanent_obstack): Don't declare.
2135 (current_obstack, saveable_obstack): Likewise.
2136 * spew.c (current_obstack, saveable_obstack): Likewise.
2137 * tree.c (current_obstack, saveable_obstack): Likewise.
2138 (scratch_ovl_cons): Remove.
2139 (build_min_nt): Don't mess with obstacks.
2140 (build_min): Likewise.
2141 (min_tree_cons): Remove
2142 * typeck.c (build_component_ref): Don't use scratch_ovl_cons.
2143 (build_x_function_call): Likewise.
2144 (build_c_cast): Don't use min_tree_cons.
2146 1999-11-29 Mark Mitchell <mark@codesourcery.com>
2148 * pt.c (tsubst_decl): Robustify.
2150 1999-11-27 Mark Mitchell <mark@codesourcery.com>
2152 * decl2.c (finish_file): Call expand_body for inline functions
2153 that will be written out but that do not yet have RTL.
2154 * semantics.c (expand_body): Do not generate RTL For inline
2155 functions that do not yet need to be written out.
2157 1999-11-25 Mark Mitchell <mark@codesourcery.com>
2159 * Make-lang.in (CXX_SRCS): Add optimize.c.
2160 * Makefile.in (CXX_OBJS): Add optimize.o.
2161 (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
2162 (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
2163 (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
2164 (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
2165 (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
2167 (optimize.o): New target.
2168 * class.c: Don't include splay-tree.h.
2169 * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.
2170 * cp-tree.h: Include splay-tree.h.
2171 (DECL_UNINLINABLE): New macro.
2172 (CTOR_BEGIN_P, CTOR_END_P): New macros.
2173 (flag_inline_trees): New variable.
2174 (local_variable_p): New function.
2175 (nonstatic_local_decl_p): Likewise.
2176 (optimize_function): Likewise.
2177 (cplus_unsave_expr_now): Remove.
2178 (copy_tree_r): Declare.
2179 (remap_save_expr): Likewise.
2180 * decl.c (local_variable_p): Don't
2182 (local_variable_p_walkfn): New function.
2183 (make_rtl_for_local_static): Remove code to try to avoid writing
2184 out static constants.
2185 (emit_local_var): Fix indentation.
2186 (nonstatic_local_decl_p): New function.
2187 (check_default_argument): Use local_variable_p_walkfn, not
2188 local_variable_p, when walking the tree.
2189 (start_function): Set the DECL_CONTEXT for automatically generated
2191 (finish_constructor_body): Use CTOR_STMT to mark the end of a
2193 * decl2.c: Don't include splay-tree.h.
2194 (flag_inline_trees): Define.
2195 * dump.c: Don't include
2197 * except.c (expand_end_catch_block): Fix comment formatting.
2198 (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
2199 (expand_throw): Tidy comment.
2200 * init.c (build_vec_delete_1): Use create_temporary_var.
2201 * lex.c (cplus_tree_code_type): Make it static.
2202 (cplus_tree_code_length): Likewise.
2203 (cplus_tree_code_name): Likewise.
2204 * optimize.c: New file.
2205 * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
2206 with computed gotos.
2207 (setup_vtbl_ptr): Mark the beginnings of constructors with
2209 (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
2210 (expand_body): Call optimize_function. Save bodies if we're doing
2212 * tree.c: Don't include splay-tree.h. Include insn-config.h and
2214 (copy_tree_r): Make it public.
2215 (statement_code_p): New function.
2216 (mark_local_for_remap_r): Likewise.
2217 (cp_usave_r): Likewise.
2218 (cp_unsave): Likewise.
2219 (build_cplus_new): Set DECL_CONTEXT for temporary variables.
2220 (walk_tree): Walk into `s' class nodes. Walk statement chains.
2221 (copy_tree_r): Handle 's' class nodes. Restore chains for
2222 statements. Nullify scopes. Don't copy types.
2223 (init_tree): Set lang_unsave to cp_unsave.
2224 (remap_save_expr): Define.
2225 * ir.texi: Document CTOR_STMT.
2227 1999-11-24 Jason Merrill <jason@casey.cygnus.com>
2229 * search.c (note_debug_info_needed): Do perform this optimization
2231 (maybe_suppress_debug_info): Likewise. Start by clearing
2232 TYPE_DECL_SUPPRESS_DEBUG.
2234 1999-11-24 Mark Mitchell <mark@codesourcery.com>
2236 * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
2238 * decl2.c (finish_vtable_vardecl): Don't prune vtables here.
2240 1999-11-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2242 * decl.c (pushdecl, grokdeclarator): Don't call a variadic
2243 function with a non-literal format string.
2245 * lex.c (do_identifier): Likewise.
2247 * typeck.c (build_unary_op): Likewise.
2249 1999-11-23 Mark Mitchell <mark@codesourcery.com>
2251 * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
2253 1999-11-22 Mark Mitchell <mark@codesourcery.com>
2255 * cp-tree.def (CTOR_COMPLETE): New tree node.
2256 * decl.c (finish_constructor_body): Add it, to mark the end of the
2258 (finish_function): Don't call end_protect_partials here.
2259 * ir.texi (CTOR_COMPLETE): Document it.
2260 * semantics.c (expand_stmt): Handle it.
2262 * cp-tree.def (FUNCTION_NAME): New tree node.
2263 * cp-tree.h (current_function_name_declared): Tweak documentation.
2264 (lang_decl_flags): Add pretty_function_p, adjust dummy.
2265 (DECL_PRETTY_FUNCTION_P): New macro.
2266 * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
2267 etc., in a template function. Use at_function_scope_p instead of
2268 expanding it inline.
2269 * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
2271 (tsubst): Handle FUNCTION_NAME.
2272 (tsubst_copy): Likewise.
2273 (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
2274 etc. in instantiation.
2275 * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
2276 even in template functions.
2277 (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
2278 conditional scope at the top of a destructor.
2280 * error.c (dump_function_decl): Use `[ with ... ]' syntax for
2281 specializations too.
2283 1999-11-22 Nathan Sidwell <nathan@acm.org>
2285 * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
2286 when actually negative.
2288 * typeck.c (convert_for_assignment): Expand comment about
2289 strange NULL check, moved from ...
2290 (convert_for_initialization): ... here. Remove unneeded
2293 1999-11-21 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
2295 * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
2296 * init.c (build_vec_delete, build_vec_delete_1): Likewise.
2297 Always destruct virtual bases of array components, but never
2299 (build_vec_init): Adjust invocations.
2300 (build_delete): Likewise.
2301 * decl2.c (delete_sanity): Likewise.
2303 1999-11-19 Nathan Sidwell <nathan@acm.org>
2305 * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
2306 * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
2307 * decl2.c (grok_method_quals): Accept `restrict' as applying to
2308 the object pointer. Return such qualifiers.
2309 (grokclassfn): Apply this pointer qualifiers. Cleanup unused
2312 1999-11-18 Mark Mitchell <mark@codesourcery.com>
2314 * except.c (expand_end_catch_block): Fix typo.
2315 (expand_exception_blocks): Simplify. Don't call
2316 expand_leftover_cleanups.
2318 1999-11-15 Jason Merrill <jason@casey.cygnus.com>
2320 * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
2321 * pt.c (tsubst, case INTEGER_TYPE): Call it.
2322 Check uses_template_parms.
2324 * class.c (finish_struct): If we're a local class in a template
2325 function, add a TAG_DEFN.
2326 * pt.c (lookup_template_class): If this is a local class in a
2327 template function, call pushtag.
2328 (tsubst_expr, case TAG_DEFN): Handle classes, too.
2330 Emit debug info with the vtable.
2331 * search.c (maybe_suppress_debug_info): New function...
2332 * class.c (finish_struct_1): ...split out from here.
2333 * cp-tree.h: Declare it.
2334 * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
2335 if we're writing out the vtable.
2336 * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p,
2337 note_debug_info_needed): #if 0 out.
2339 1999-11-14 Mark Mitchell <mark@codesourcery.com>
2341 * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
2342 * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
2344 * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
2345 * decl2.c (lookup_arg_dependent): Use it.
2347 * cp-tree.h (cp_finish_decl): Change prototype.
2348 (finish_static_data_member_decl): Likewise.
2349 (push_permanent_obstack): Remove declaration.
2350 (push_expression_obstack): Likewise.
2351 (push_scratch_obstack): Likewise.
2352 (DECL_TEMPLATE_PARM_P): Robustify.
2353 (SET_DECL_TEMPLATE_PARM_P): New macro.
2354 * class.c (add_method): Don't manipulate obstacks.
2355 (finish_vtbls): Likewise.
2356 * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
2357 * decl.c (binding_for_name): Don't manipulate obstacks.
2358 (maybe_push_to_top_level): Likewise.
2359 (pop_from_top_level): Likewise.
2360 (duplicate_decls): Likewise.
2361 (pushdecl): Likewise.
2362 (implicitly_declare): Likewise.
2363 (build_typename_type): Likewise.
2364 (start_decl): Likewise.
2365 (cp_finish_decl): Likewise.
2366 (finish_decl): Likewise.
2367 (destroy_local_static): Likewise.
2368 (expand_static_init): Likewise.
2369 (complete_array_type): Likewise.
2370 (grokvardecl): Likewise.
2371 (build_ptrmemfnc_type): Likewise.
2372 (grokdeclarator): Likewise.
2373 (xref_tag): Likewise.
2374 (xref_basetypes): Likewise.
2375 (start_enum): Likewise.
2376 (finish_enum): Likewise.
2377 (start_function): Likewise.
2378 (finish_function): Likewise.
2379 (start_method): Adjust call to cp_finish_decl.
2380 * decl2.c (finish_static_data_member_decl): Don't manipulate
2382 (grokfield): Likewise.
2383 (grokbitfield): Likewise.
2384 (get_temp_name): Likewise.
2385 (get_sentry): Likewise.
2386 (fnish_file): Likewise.
2387 (lookup_arg_dependent): Likewise.
2388 * except.c (call_eh_info): Likewise.
2389 (push_eh_info): Likewise.
2390 (do_pop_exception): Likewise.
2391 (initialize_handler_parm): Likewise.
2392 (expand_end_eh_spec): Likewise.
2393 (alloc_eh_object): Likewise.
2394 (expand_throw): Likewise.
2395 * expr.c (extract_scalar_init): Likewise.
2396 * init.c (build_java_class_ref): Likewise.
2397 * lex.c (get_time_identifier): Likewise.
2398 (snarf_defarg): Likewise.
2399 (add_defarg_fn): Likewise.
2400 (is_global): Simplify.
2401 (do_identifier): Don't check TREE_PERMANENT.
2402 * method.c (emit_thunk): Don't manipulate obstacks.
2403 * parse.y (condition): Adjust call to cp_finish_decl.
2404 (primary): Likewise.
2405 (initdcl): Likewise.
2406 (initdcl0_innards): Likewise.
2407 (nomods_initdcl0): Likewise.
2408 * pt.c (push_inline_template_parms_recursive): Use
2409 SET_DECL_TEMPLATE_PARM_P.
2410 (process_template_parm): Likewise.
2411 (lookup_template_class): Don't manipulate obstacks.
2412 (instantiate_class_template): Adjust call to
2413 finish_static_data_member_decl.
2414 (tsubst_decl): Don't manipulate obstacks.
2415 (tsubst_expr): Likewise.
2416 (instantiate_template): Likewise.
2417 (instantiate_decl): Adjust calls to cp_finish_decl.
2418 * rtti.c (call_void_fn): Don't manipulate obstacks.
2419 (get_tinfo_var): Likewise.
2420 (get_tinfo_fn_unused): Likewise.
2421 (build_dynamic_cast_1): Likewise.
2422 (expand_si_desc): Likewise.
2423 (expand_class_desc): Likewise.
2424 (expand_ptr_desc): Likewise.
2425 (expand_attr_desc): Likewise.
2426 (expand_generic_desc): Likewise.
2427 (synthesize_tinfo_fn): Likewise.
2428 * search.c (expand_upcast_fixups): Likewise.
2429 * semantics.c (finish_asm_stmt): Likewise.
2430 (finish_named_return_value): Likewise.
2431 (begin_class_definition): Likewise.
2432 (finish_class_definition): Likewise.
2433 (finish_typeof): Likewise.
2434 * tree.c (build_cplus_method_type): Likewise.
2435 (reverse_path): Likewise.
2436 (copy_template_template_parm): Likewise.
2437 (build_expr_ptr_wrapper): Likewise.
2438 (push_expression_obstack): Remove.
2439 (push_permanent_obstack): Likewise.
2440 * typeck.c (mark_addressable): Likewise.
2442 1999-11-13 Mark Mitchell <mark@codesourcery.com>
2444 * call.c (build_conditional_expr): Use build_target_expr_with_type.
2445 (convert_like): Likewise.
2446 (build_over_call): Likewise.
2447 * cp-tree.h (build_target_expr): Remove.
2448 (build_target_expr_with_type): New function.
2449 * cvt.c (build_up_reference): Use get_target_expr.
2450 * decl.c (build_target_expr): Move to ...
2451 * tree.c (build_target_expr): Here. Make it static.
2452 (build_target_expr_with_type): New function. Set DECL_CONTEXT on
2453 the temporary VAR_DECLs.
2454 (get_target_expr): Use it.
2456 1999-11-13 Jason Merrill <jason@yorick.cygnus.com>
2458 * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
2459 * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
2460 * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
2461 * class.c (set_rtti_entry): Use it.
2463 1999-11-12 Mark Mitchell <mark@codesourcery.com>
2465 * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
2467 * semantics.c (finish_expr_stmt): Call it here instead. Move
2468 default_conversion logic to semantic-analysis time.
2470 1999-11-12 Jason Merrill <jason@yorick.cygnus.com>
2472 * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
2474 Fri Nov 12 12:56:32 MST 1999 Diego Novillo <dnovillo@cygnus.com>
2476 * init.c (init_init_processing): Re-instated Nov 11 patch after
2479 Fri Nov 12 10:42:02 MST 1999 Diego Novillo <dnovillo@cygnus.com>
2481 * init.c (init_init_processing): Undo patch from Nov 11, 1999.
2482 Patch had not been approved yet.
2484 1999-11-12 Mark Mitchell <mark@codesourcery.com>
2486 * decl.c (compute_array_index_type): New function, split out from
2488 (create_array_type_for_decl): Likewise.
2489 (grokdeclarator): Use them.
2491 * semantics.c (expand_stmt): Don't suspend_momentary or
2494 Thu Nov 11 12:42:11 MST 1999 Diego Novillo <dnovillo@cygnus.com>
2496 * init.c (init_init_processing): Header information for
2497 arrays allocated via `new' should have the same alignment used by
2500 1999-11-10 Mark Mitchell <mark@codesourcery.com>
2502 * error.c (dump_function_name): Don't crash if given a friend
2503 pseudo-instantiation.
2505 * cp-tree.h (build_enumerator): Change prototype.
2506 * decl.c (enum_next_value): Remove.
2507 (enum_overflow): Likewise.
2508 (init_decl_processing): Don't register enum_next_value as a root.
2509 (start_enum): Clear TYPE_VALUES for a redefined enum.
2510 (finish_enum): Reset the type of enumeration constants.
2511 (build_enumerator): Fix indentation. Don't copy CONST_DECLs when
2512 we don't need to. Maintain the TYPE_VALUES list and look there
2513 for the previously defined enumeration constant. Let enumeration
2514 constants have the type of their values until the enumeration type
2516 * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
2518 * parse.c: Regenerated.
2519 * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
2521 Wed Nov 10 12:43:21 1999 Philippe De Muyter <phdm@macqel.be>
2522 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2524 * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
2526 1999-11-09 Mark Mitchell <mark@codesourcery.com>
2528 * cp-tree.h (language_function): Remove x_last_dtor_insn and
2529 x_last_parm_cleanup_insn.
2530 * decl.c (last_dtor_insn): Remove.
2531 (last_parm_cleanup_insn): Likewise.
2532 (expand_start_early_try_stmts): Don't set them.
2533 (store_parm_decls): Likewise.
2534 (save_function_data): Or save them.
2535 (mark_lang_function): Or mark them.
2537 1999-11-08 Mark Mitchell <mark@codesourcery.com>
2539 * decl.c (store_parm_decls): Generate cleanup code at
2540 semantic-analysis time. Destroy objects in the correct order.
2542 1999-11-07 Mark Mitchell <mark@codesourcery.com>
2544 * cp-tree.h (begin_new_placement): Remove.
2545 (finish_new_placement): Likewise.
2546 * class.c (finish_struct_1): Don't suspend_momentary or
2548 * decl.c (grokdeclarator): Likewise.
2549 (maybe_build_cleanup_1): Likewise.
2550 * except.c (push_eh_cleanup): Likewise.
2551 (build_terminate_handler): Likewise.
2552 * init.c (build_new_1): Likewise.
2553 * parse.y (parse_decl): Change prototype.
2554 (initdecls, notype_initdecls, initdcl): Don't return int.
2555 (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
2556 (.begin_new_placement): Remove.
2557 (.finish_new_placement): Likewise.
2558 (nonmomentary_expr): Likewise.
2559 (suspend_mom): Likewise.
2560 (condition): Don't suspend_momentary, resume_momentary, or keep
2561 track of need to resume.
2562 (unary_expr): Likewise.
2563 (new_placement): Likewise.
2565 (structsp): Likewise.
2566 (new_type_id): Likewise.
2567 (maybe_parmlist): Likewise.
2568 (direct_after_type_declaration): Likewise.
2569 (direct_new_declarator): Likewise.
2570 (direct_abstract_declaration): Likewise.
2571 * parse.c: Regenerated.
2572 * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
2573 * semantics.c (begin_new_placement): Remove.
2574 (finish_new_placement): Likewise.
2576 1999-11-05 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2578 * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
2579 (DECL_TEMPLATE_INFO): Use it.
2580 * decl.c (warn_extern_redeclared_static): Do nothing for
2582 * decl2.c (mark_used): Explicitly check for function or variable.
2583 * semantics.c (finish_unary_op_expr): Check whether result is also
2586 1999-11-05 Mark Mitchell <mark@codesourcery.com>
2588 * Makefile.in (typeck2.o): Depend on output.h.
2589 * typeck2.c: Include output.h.
2591 * decl.c (flag_ansi): Remove declaration.
2593 * pt.c (tinst_level_tick): Make it static.
2594 (last_template_error_tick): Likewise.
2596 * cp-tree.h (mapcar): Remove declaration.
2597 (search_tree): Likewise.
2598 (walk_tree_fn): New typedef.
2599 (walk_tree): New function.
2600 * tree.c (bot_manip): Change prototype. Adjust to be called via
2602 (bot_replace): Likewise.
2603 (no_linkage_helper): Likewise.
2604 (copy_tree_r): New function.
2605 (search_tree): Rename, and adjust, to become ...
2606 (walk_tree): New function.
2608 (target_remap): Remove.
2609 (target_remap_count): Likewise.
2610 (break_out_target_exprs): Use walk_tree.
2611 * decl.c (local_variable_p): Change prototype.
2612 (check_default_argument): Use walk_tree.
2613 * pt.c (for_each_template_parm_r): New function, split out from ...
2614 (for_each_template_parm): Here. Use it, via walk_tree.
2616 1999-11-03 Mark Mitchell <mark@codesourcery.com>
2618 * class.c (check_bitfield_decl): New function, split out from
2620 (check_field_decl): Likewise. Recursively examine members of
2622 (finish_struct_1): Use them.
2623 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
2625 1999-11-02 Mark Mitchell <mark@codesourcery.com>
2627 * decl.c (grokfndecl): Remove dead code.
2629 * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
2631 1999-11-02 Scott Snyder <snyder@fnal.gov>
2633 * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
2635 * pt.c (tsubst_copy): Likewise.
2637 1999-11-01 Jason Merrill <jason@yorick.cygnus.com>
2639 * decl2.c (maybe_make_one_only): Always make things comdat on
2642 1999-10-31 Mark Mitchell <mark@codesourcery.com>
2644 * decl.c (finish_function): Call free_after_parsing for functions
2645 we are not immediately turning into RTL.
2647 1999-10-31 Brendan Kehoe <brendan@cygnus.com>
2649 * cp-tree.h (flag_dump_translation_unit): Add decl.
2651 Sat Oct 30 22:42:50 1999 Stephen L Moshier <moshier@mediaone.net>
2653 * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
2655 1999-10-30 Mark Mitchell <mark@codesourcery.com>
2657 * decl.c (pop_cp_function_context): Don't call free on a NULL
2659 * semantics.c: Include ggc.h.
2660 (expand_body): Do garbage-collection after processing a template
2661 function. Clear DECL_SAVED_TREE after generating RTL for a
2663 * Makefile.in (semantics.o): Depend on ggc.h.
2665 1999-10-29 Mark Mitchell <mark@codesourcery.com>
2667 * cp-tree.h (make_typename_type): Change prototype.
2668 * decl.c (make_typename_type): Only complain if so requested.
2669 * parse.y (nested_name_specifier): Adjust calls.
2670 (typename_sub0): Likewise.
2671 (typename_sub1): Likewise.
2672 * parse.c: Regenerated.
2673 * pt.c (convert_template_argument): Pass complain to
2677 1999-10-28 Mark Mitchell <mark@codesourcery.com>
2679 * semantics.c (finish_handler): End the scope of the handler
2680 before attaching it to the statement-tree.
2682 1999-10-28 Ian Lance Taylor <ian@zembu.com>
2684 * rtti.c (build_dynamic_cast_1): Give a better error message for
2685 an attempt to dynamic_cast from a non-polymorphic type.
2687 1999-10-27 Mark Mitchell <mark@codesourcery.com>
2689 * cp-tree.h (make_temp_vec): Remove.
2690 (make_scratch_vec): Likewise.
2691 * call.c (add_function_candidate): Use make_tree_vec.
2692 (add_conv_candidate): Likewise.
2693 (build_builtin_candidate): Likewise.
2694 (add_template_candidate_real): Likewise.
2695 * class.c (resolve_address_of_overloaded_function): Likewise.
2696 * decl.c (start_function): Don't fool with the momentary obstack.
2697 (finish_function): Likewise.
2698 * init.c (expand_direct_vtbls_init): Likewise.
2699 (begin_init_stmts): Likewise.
2700 (finish_init_stmts): Likewise.
2701 * pt.c (add_to_template_args): Use make_tree_vec.
2702 (check_explicit_specialization): Likewise.
2703 (coerce_template_parms): Likewise.
2704 (lookup_template_class): Don't fool with the momentary obstack.
2705 (instantiate_class_template): Likewise.
2706 (tsubst_template_arg_vector): Use make_tree_vec.
2707 (tsubst_aggr_type): Don't fool with the momentary obstack.
2708 (tsubst_decl): Likewise. Use make_tree_vec.
2709 (try_one_overload): Likewise.
2710 (try_class_unification): Don't fool with the momentary obstack.
2711 (get_bindings_real): Use make_tree_vec.
2712 (set_mangled_name_for_template_decl): Likewise.
2713 * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
2714 * semantics.c (finish_expr_stmt): Likewise.
2715 (finish_do_stmt): Likewise.
2716 (finish_for_expr): Likewise.
2717 (finish_switch_cond): Likewise.
2718 (do_pushlevel): Likewise.
2719 (do_poplevel): Likewise.
2720 * tree.c (make_temp_vec): Remove.
2722 * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs. Dump
2723 CLEANUP_P for a TRY_BLOCK.
2724 * ir.texi: Document SAVE_EXPR.
2726 Tue Oct 26 23:29:56 1999 Jeffrey A Law (law@cygnus.com)
2728 * call.c (build_over_call): Check that the built-in function is
2729 of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
2730 * typeck.c (build_function_call_real): Similarly.
2732 1999-10-26 Mark Mitchell <mark@codesourcery.com>
2734 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS. Don't call
2737 1999-10-24 Mark Mitchell <mark@codesourcery.com>
2739 * decl.c (push_overloaded_decl_1): Use pushdecl.
2741 * decl.c (auto_function): Replace #ifdef'd __inline with just
2743 * lex.c (my_get_run_time): Likeise.
2744 (yyprint): Likewise.
2745 (identifier_type): Likewise.
2746 * method.c (start_squangling): Likewise.
2747 (end_squangling): Likewise.
2749 (old_backref_index): Likewise.
2750 (flush_repeats): Likewise.
2751 (issue_ktype): Likewise.
2752 * parse.y (empty_parms): Likewise.
2753 * parse.c: Regenerated.
2755 1999-10-21 Mark Mitchell <mark@codesourcery.com>
2757 * dump.c (dequeue_and_dump): Replace several uses of
2758 queue_and_dump_index with dump_child.
2760 1999-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2762 * expr.c: Include tm_p.h.
2764 1999-10-21 Mark Mitchell <mark@codesourcery.com>
2766 * cp-tree.h (SCOPE_PARTIAL_P): New macro.
2767 (pushlevel_temporary): Remove.
2768 (add_scope_stmt): New function.
2769 * decl.c (pushlevel_temporary): Remove.
2770 (poplevel): Use add_scope_stmt.
2771 (start_decl_1): Likewise.
2772 * semantics.c (add_scope_stmt): New function.
2773 (do_pushlevel): Use it.
2774 (do_poplevel): Use it.
2775 (expand_stmt): Check SCOPE_PARTIAL_P.
2777 * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
2778 * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
2779 * expr.c (cplus_expand_expr): Expand it.
2780 * ir.texi: Document EMPTY_CLASS_EXPR.
2782 1999-10-20 Mark Mitchell <mark@codesourcery.com>
2784 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
2785 parameters as having namespace scope.
2787 1999-10-19 Mark Mitchell <mark@codesourcery.com>
2789 * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
2790 (mangling_flags): New type.
2791 (build_overload_int): Change prototype.
2792 (build_overload_value): Likewise.
2793 (numeric_output_need_bar): Improve comment.
2794 (mangle_expression): New function, broken out from ...
2795 (build_overload_int): Here.
2796 (build_overload_value): Adjust for use of mangling flags. Don't
2797 warn about real-valued template parameters here. Do handle
2798 complex expressions involving real-valued template parameters.
2799 (build_template_parm_names): Encase non-type template parameters
2800 in underscores, if necessary.
2801 (process_overload_item): Remove conditional on
2802 PARM_CAN_BE_ARRAY_TYPE.
2804 1999-10-17 Mark Mitchell <mark@codesourcery.com>
2806 * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
2808 * ir.texi: Clean up documentation of RETURN_INIT.
2810 1999-10-15 Greg McGary <gkm@gnu.org>
2812 * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
2813 (lang_init): Set default for flag_bounds_check if still "unspecified".
2815 1999-10-13 Andrew Haley <aph@cygnus.com>
2817 * class.c (finish_struct_1): Force alignment of non-bitfields to
2820 Wed Oct 13 22:01:35 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
2822 * typeck2.c (process_init_constructor): Handle empty constructors.
2824 1999-10-13 Jason Merrill <jason@yorick.cygnus.com>
2826 * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
2828 * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
2831 1999-10-13 Mark Mitchell <mark@codesourcery.com>
2833 * decl.c (make_rtl_for_local_static): Don't create register RTL
2834 for addressable constants.
2836 1999-10-13 Nathan Sidwell <nathan@acm.org>
2838 * cp-tree.h (build_x_va_arg): Prototype new function.
2839 * call.c (build_x_va_arg): Define it.
2840 * parse.y (unary_expr): Call build_x_va_arg.
2842 * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
2843 * call.c (convert_type_from_ellipsis): Define it.
2844 * decl.c (init_decl_processing): Set lang_type_promotes_to.
2846 * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
2848 1999-10-11 Jason Merrill <jason@yorick.cygnus.com>
2850 * class.c (fixed_type_or_null): Always set *nonnull.
2852 1999-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2854 * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
2855 __GNUC__ and __GNUC_MINOR__.
2857 1999-10-09 Mark Mitchell <mark@codesourcery.com>
2859 * cp-tree.h (make_rtl_for_local_static): New function.
2860 * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
2862 (make_rtl_for_local_static): Here.
2863 * semantics.c (expand_stmt): Use make_rtl_for_local_static.
2865 1999-10-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2867 * method.c: Include tm_p.h.
2869 1999-10-7 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
2871 * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
2872 * lex.c (cp_make_lake_type): Likewise.
2873 * tree.c (init_tree): Init make_lang_type_fn.
2875 1999-10-07 Mark Mitchell <mark@codesourcery.com>
2877 * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
2880 * semantics.c (expand_stmt): Don't pretend to have asmspecs for
2881 local statics if we don't really have them.
2883 * ir.texi: Improve documentation for STMT_EXPR. Describe
2886 1999-10-07 Jason Merrill <jason@yorick.cygnus.com>
2888 * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
2890 1999-10-07 Greg McGary <gkm@gnu.org>
2892 * class.c (finish_struct_1): Use simpler method of
2893 removing elements of a singly-linked list which doesn't
2894 lose for classes without data members.
2896 1999-10-07 Mark Mitchell <mark@codesourcery.com>
2898 * friend.c (make_friend_class): Robustify.
2900 * semantics.c (finish_object_call_expr): Reject calls to template
2903 1999-10-06 Mark Mitchell <mark@codesourcery.com>
2905 * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
2907 * cp-tree.h (CLASSTYPE_VFIELD): Remove.
2908 * call.c (build_vfield_ref): Use TYPE_VFIELD, not
2910 * class.c (get_vfield_offset): Likewise.
2911 (finish_base_struct): Likewise.
2912 (modify_one_vtable): Likewise.
2913 (fixup_vtable_deltas): Likewise.
2914 (finish_struct_1): Likewise.
2915 * init.c (expand_virtual_init): Likewise.
2916 * search.c (lookup_field_1): Likewise.
2917 (expand_upcast_fixups): Likewise.
2918 * typeck.c (build_component_ref): Likewise.
2919 (build_binary_op_nodefault): Likewise.
2921 * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
2922 * ir.texi: Document TYPE_VFIELD.
2924 1999-10-06 Brendan Kehoe <brendan@cygnus.com>
2926 * decl.c (grokdeclarator): Only warn about non-zero arrays if
2927 !in_system_header (linux socketbits.h can give this for
2928 __cmsg_data, which is using a GNU extension).
2930 1999-10-05 Mark Mitchell <mark@codesourcery.com>
2932 * decl2.c (start_static_storage_duration_function): Push the
2933 function declaration so it ends up in namespace scope.
2935 * dump.c (DUMP_CHILDREN): Remove.
2936 (DUMP_BINFO): Adjust.
2937 (struct dump_node_info): Remove dump_children_p.
2938 (queue_and_dump_type): Remove dump_children_p parameter.
2939 (queue): Don't set dump_children_p.
2940 (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
2941 queue_and_dump_index.
2942 (dequeue_and_dump): Unconditionally print children. Adjust calls
2943 to functions mentioned above.
2944 (dump_node): Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
2946 * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
2947 * dump.c (dequeue_and_dump): Dump them.
2949 * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
2951 * decl.c (start_function): Set current_in_charge_parm for
2952 constructors, too, where appropriate.
2953 * search.c (fixup_all_virtual_upcast_offsets): New function.
2954 (expand_indirect_vtbls_init): Use it.
2956 1999-10-04 Nathan Sidwell <nathan@acm.org>
2958 * decl2.c (grok_alignof): Don't decay lvalues.
2960 * init.c (build_new): Remove unused variable.
2962 1999-10-04 Mark Mitchell <mark@codesourcery.com>
2964 * cp-tree.h (struct language_function): Remove static_labelno.
2965 (static_labelno): Remove macro.
2966 * method.c (build_overload_nested_name): Make static_labelno
2969 * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
2970 to decide whether or not a function is defined.
2972 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
2973 situations where make_node will do it automatically.
2974 * decl.c (grok_reference_init): Likewise.
2975 (expand_static_init): Likewise.
2976 (do_static_initialization): Likewise.
2977 * init.c (perform_member_init): Likewise.
2978 (expand_aggr_init_1): Likewise.
2979 (build_new_1): Likewise.
2980 * method.c (do_build_copy_constructor): Likewise.
2981 (do_build_assign_ref): Likewise.
2982 * search.c (expand_upcast_fixups): Likewise.
2983 * semantics.c (finish_stmt_expr): Likewise.
2984 * typeck.c (build_unary_op): Likewise.
2985 (check_return_expr): Likewise.
2987 1999-10-04 Jason Merrill <jason@yorick.cygnus.com>
2989 * init.c (build_vec_delete_1): Fold COND_EXPRs.
2991 1999-10-03 Mark Mitchell <mark@codesourcery.com>
2993 * cp-tree.def (VEC_INIT_EXPR): Remove.
2994 * cp-tree.h (struct stmt_tree): New type.
2995 (struct saved_scope): Remove firstobj. Add x_saved_tree,
2997 (class_cache_firstobj): Remove.
2998 (struct language_function): Remove stmts_are_full_exprs_p,
2999 x_last_tree, and x_last_expr_type. Add x_stmt_tree.
3000 (current_stmt_tree): New macro.
3001 (last_tree): Adjust.
3002 (last_expr_type): Likewise.
3003 (doing_semantic_analysis_p): Simplify.
3004 (stmts_are_full_exprs_p): Adjust.
3005 (begin_tree): Remove prototype.
3006 (end_tree): Likewise.
3007 (begin_stmt_tree): Change prototype.
3008 (finish_stmt_tree): Likewise.
3009 (building_stmt_tree): Simplify.
3010 * decl.c (mark_stmt_tree): New function.
3011 (mark_saved_scope): Use it.
3012 (start_function): Rearrange slightly to call begin_stmt_tree
3014 (save_function_data): Tweak.
3015 (finish_function): Adjust call to finish_stmt_tree.
3016 (mark_lang_function): Use mark_stmt_tree.
3017 * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
3018 * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
3019 (build_vec_init): Remove creation of stand-in intializer.
3020 * pt.c (begin_tree): Remove.
3021 (end_tree): Likewise.
3022 * semantics.c (SET_LAST_STMT): New macro. Use it throughout.
3023 (begin_compound_stmt): Handle a compound-statement outside of a
3025 (begin_stmt_expr): Handle a statement-expression outsidef of a
3027 (finish_stmt_expr): Likewise.
3028 (begin_class_definition): Don't call begin_tree.
3029 (finish_inline_definitions): Don't call end_tree.
3030 (begin_stmt_tree): Take a pointer to tree, not a function as input.
3031 (finish_stmt_tree): Likewise.
3032 * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
3035 * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
3036 * parse.c: Regenerated.
3038 * dump.c (dqueue_and_dump): Dump bitfieldness.
3040 * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
3041 bitfields, rather than DECL_BIT_FIELD.
3042 * ir.texi: Document how to tell whether or not a field is a
3045 * lex.c (make_lang_type): Fix typo in comment.
3047 1999-10-01 Jason Merrill <jason@yorick.cygnus.com>
3049 * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
3051 1999-10-01 Mark Mitchell <mark@codesourcery.com>
3053 * pt.c (tsubst_decl): If the type of a template instantiation is
3054 bogus, so is the whole instantiation.
3056 1999-09-30 Mark Mitchell <mark@codesourcery.com>
3058 * decl.c (initialize_local_var): Handle static variables here.
3059 (cp_finish_decl): Tweak handling of function-scope static
3061 * semantics.c (expand_stmt): Handle DECL_STMTs for static
3064 * method.c (emit_thunk): Don't crash when -fsyntax-only.
3066 * cp-tree.h (lang_decl_flags): Add global_ctor_p and
3067 global_dtor_p. Add init_priority.
3068 (DECL_ACCESS): Adjust accordingly.
3069 (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
3070 (GLOBAL_INIT_PRIORITY): Likewise.
3071 * decl.c (lang_mark_tree): Adjust accordingly.
3072 (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P,
3073 and GLOBAL_INIT_PRIORITY.
3074 * dump.c (dequeue_and_dump): Print them.
3075 * ir.texi: Document them.
3077 * decl2.c (struct priority_info_s): Remove initialization_sequence
3078 and destruction_sequence.
3079 (start_static_storage_duration_function): Return the body of the
3080 function. Convert for function-at-a-time mode.
3081 (generate_inits_for_priority): Remove.
3082 (finish_static_storage_duration_function): Change prototype.
3083 Adjust for function-at-a-time mode.
3084 (do_static_initialization): Likewise.
3085 (do_static_destruction): Likewise.
3086 (do_static_initialization_and_destruction): Remove.
3087 (start_static_initialization_or_destruction): New function.
3088 (finish_static_initialization_or_destruction): Likewise.
3089 (get_priority_info): Don't manipulation initialization_sequence or
3090 destruction_sequence.
3091 (prune_vars_needing_no_initialization): New function.
3092 (write_out_vars): Likewise.
3093 (finish_file): Use the various new functions instead of the old.
3095 Thu Sep 30 00:13:27 1999 Dirk Zoller <duz@rtsffm.com>
3097 * cp-tree.h (warn_float_equal): Declare.
3098 * decl2.c (warn_float_equal): Define.
3099 (lang_decode_option): Recognize -W[no-]float-equal.
3100 * typeck.c (build_binary_op_nodefault): Conditionally warn
3101 about equality tests of floating point types.
3103 1999-09-29 Jason Merrill <jason@yorick.cygnus.com>
3105 Support normal type_info-based EH mechanisms with -fno-rtti.
3106 * except.c (build_eh_type_type): Remove special -fno-rtti handling.
3107 (build_eh_type_type_ref): Likewise.
3108 (build_eh_type): Remove.
3109 (expand_throw): Call build_eh_type_type, not build_eh_type.
3110 * decl2.c (import_export_decl): Don't associate the tinfo fn with
3111 the vtable if -fno-rtti.
3112 * decl.c (init_decl_processing): Always init_rtti_processing.
3114 * rtti.c (get_typeid): Don't complain about -fno-rtti.
3116 * class.c (class_cache_obstack, class_obstack): Remove.
3117 (init_class_processing): Don't initialize class_obstack.
3118 (push_cache_obstack): Remove.
3119 (pushclass): Don't call it.
3120 * cp-tree.h: Remove prototype for push_cache_obstack.
3121 * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
3122 (pushlevel_class): Don't push_decl_level.
3123 (poplevel_class): Don't pop_stack_level.
3124 (push_class_level_binding): Don't push_cache_obstack.
3125 (init_decl_processing): Don't intialize decl_obstack.
3126 * search.c (push_class_decls): Don't push_cache_obstack.
3127 * tree.c (list_hash_add): Put hash node on permanent_obstack.
3128 (hash_tree_cons): Don't mess with obstacks.
3129 (print_lang_statistics): Don't print stats for class_obstack and
3132 1999-09-29 Mark Mitchell <mark@codesourcery.com>
3134 * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
3135 * ir.texi: Document DECL_EXTERNAL.
3137 * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
3138 * ir.texi: Document THUNK_DECLs.
3140 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
3141 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
3142 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
3143 * error.c (dump_template_bindings): Remove unused parameter.
3144 Handle multiple levels of template parameters.
3145 (dump_template_decl): Use `parms', not `args', for template
3146 parameters. Fix thinko.
3147 (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION. Don't pass
3148 flags to dump_template_bindings.
3149 * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
3150 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
3151 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
3152 (tsubst_copy): Clarify variable name.
3153 (most_general_template): Robustify.
3155 1999-09-29 Nathan Sidwell <nathan@acm.org>
3157 * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
3158 to change primary template rendering.
3160 1999-09-29 Mark Mitchell <mark@codesourcery.com>
3162 * cp-tree.h (UPT_TEMPLATE): Remove.
3163 (UPT_PARMS): Likewise.
3164 (DECL_NEEDED_P): New macro.
3165 * decl2.c (finish_vtable_vardecl): Use it.
3166 (finish_objects): Don't crash with -fsyntax-only.
3167 (finish_file): Use DECL_NEEDED_P. Don't prune vtables when
3169 * pt.c (tsubst_friend_function): Remove FIXME that talks about
3171 (tsubst_expr): Correct handling of function try-blocks.
3172 * semantics.c: Include flags.h.
3173 (expand_body): Don't do RTL generation if -fsyntax-only.
3174 * Makefile.in (semantics.o): Depends on flags.h.
3176 1999-09-28 Gabriel Dos Reis <gdr@codesourcery.com>
3178 * pt.c (most_general_template): Adjust declaration.
3180 * cp-tree.h: (most_general_template): Declare.
3182 * error.c (dump_template_value): Rename to ...
3183 (dump_template_argument): This.
3184 (dump_template_argument_list): New function.
3185 (dump_type): Use it.
3186 (dump_template_parameter): New function.
3187 (dump_template_decl): Use it.
3188 (dump_template_bindings): New function.
3189 (dump_function_decl): Use it. Pretty print function template
3192 1999-09-28 Nathan Sidwell <nathan@acm.org>
3194 * decl.c (grokdeclarator): Distinguish parameter context for
3195 diagnostics. Tidy up missing type diagnostic.
3196 Diagnose `explicit' in one place. Diagnose `mutable' in one place.
3198 1999-09-28 Mark Mitchell <mark@codesourcery.com>
3200 * ir.texi: Improve documentation for TARGET_EXPR.
3202 1999-09-27 Nathan Sidwell <nathan@acm.org>
3204 Augment stringification of trees.
3205 * cp-tree.h (tree_string_flags): New error stringifying enumeration.
3206 (fndecl_as_string, type_as_string_real, args_as_string,
3207 code_as_string, language_as_string, parm_as_string,
3208 op_as_string, assop_as_string, cv_as_string): Remove.
3209 (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
3210 (context_as_string): Declare new function.
3211 * error.c (cp_printers): Move definition.
3213 (OB_END_TEMPLATE_ID): Adjust.
3214 (interesting_scope_p): Remove.
3215 (dump_scope): New static function.
3216 (dump_qualifiers): Adjust prototype, reimplement.
3217 (dump_template_value): Use tree_string_flags.
3218 (dump_type_real): Move back to dump_type.
3219 (dump_type): Adjust prototype. Use tree_string_flags.
3220 (dump_aggr_type): Likewise. Use dump_template_parms.
3221 (dump_type_prefix): Adjust prototype. Use tree_string_flags.
3223 (dump_type_suffix): Adjust prototype. Use tree_string_flags.
3224 (dump_simple_decl): Likewise.
3225 (dump_decl): Likewise. Use dump_template_decl.
3226 (dump_template_decl): New static function broken out of dump_decl.
3227 (dump_function_decl): Adjust prototype. Use tree_string_flags.
3228 (dump_parameters): Likewise. Prefix space.
3229 (dump_exception_spec): Adjust prototype. Use tree_string_flags.
3230 (dump_function_name): Likewise. Use dump_template_parms.
3231 (dump_template_parms): New static function broken out of
3233 (dump_expr_list): Adjust prototype. Use tree_string_flags.
3234 (dump_expr): Likewise.
3235 (fndecl_as_string): Removed
3236 (type_as_string_real): Removed
3237 (dump_binary_op): Adjust prototype. Use tree_string_flags.
3238 (dump_unary_op): Likewise.
3239 (type_as_string): Likewise.
3240 (expr_as_string): Likewise.
3241 (decl_as_string): Likewise.
3242 (context_as_string): New function.
3243 (lang_decl_name): Adjust.
3244 (decl_to_string): New static print callback.
3245 (expr_to_string): Likewise.
3246 (fndecl_to_string): Likewise.
3247 (code_as_string): Renamed to ...
3248 (code_to_string): ... here. Adjust.
3249 (language_as_string): Renamed to ...
3250 (language_to_string): ... here. Adjust.
3251 (parm_as_string): Renamed to ...
3252 (parm_to_string): ... here.
3253 (op_as_string): Renamed to ...
3254 (op_to_string): ... here.
3255 (assop_as_string): Renamed to ...
3256 (assop_to_string): ... here.
3257 (type_to_string): New static print callback.
3258 (args_as_string): Renamed to ...
3259 (args_to_string): ... here. Adjust.
3260 (cv_as_string): Renamed to ...
3261 (cv_to_string): ... here. Adjust.
3262 * pt.c (mangle_class_name_for_template): Use tree_string_flags.
3263 (print_template_context): Likewise.
3265 1999-09-26 Mark Mitchell <mark@codesourcery.com>
3267 * cp-tree.h (expand_throw): Remove prototype.
3268 * except.c (expand_throw): Make it static. Use tree-generation
3269 functions, rather than RTL-generation functions.
3270 (build_throw): Use it.
3271 * expr.c: Include except.h.
3272 (cplus_expand_expr): Don't call expand_throw here.
3273 * Makefile.in (expr.o): Depend on except.h.
3274 * ir.texi: Update documentation for THROW_EXPR.
3276 * decl.c (start_function): Set x_dont_save_pending_sizes rather
3277 than calling get_pending_sizes.
3278 * init.c (build_new): Don't save and restore
3279 immediate_size_expand; instead, assert that it has the expected
3282 1999-09-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3284 * lex.c (compiler_error): Add missing call to va_end().
3286 1999-09-25 Mark Mitchell <mark@codesourcery.com>
3288 * dump.c (dequeue_and_dump): Handle RESULT_DECL.
3289 * ir.texi: Document RESULT_DECL and DECL_RESULT.
3291 * cp-tree.h (check_return_expr): New function.
3292 * decl.c (finish_constructor_body): New function.
3293 (pushdecl): Put global friend functions in namespace binding
3294 level, not the class binding level.
3295 (finish_destructor_body): Make sure the dtor_label is always
3296 defined. Fix typo in comment.
3297 (finish_function): Move generation of constructor-termination code
3298 to semantic-analysis time. Move generation of implicit `main'
3299 return value to semantic-analysis time.
3300 * semantics.c (finish_return_stmt): Generate goto's to
3301 ctor_label/dtor_label here. Use check_return_expr to do semantic
3302 analysis on the returned expression.
3303 * typeck.c (maybe_warn_about_returning_address_of_local): New
3304 function split out from c_expand_return.
3305 (check_return_expr): Likewise.
3306 (c_expand_return): Just generate the RTL for the return.
3308 1999-09-24 Mark Mitchell <mark@codesourcery.com>
3310 * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
3311 (cleanup_type): Likewise.
3312 (search_tree): Change prototype.
3313 * decl.c (local_variable_p): Adjust for new interface to
3315 (check_default_argument): Likewise.
3316 * error.c (dump_expr): Handle INIT_EXPR.
3317 * except.c (expand_throw): Don't make cleanup_type a local static.
3318 * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
3319 * init.c (build_new): Call build_new_1 directly, rather than
3320 building a NEW_EXPR.
3321 (build_new_1): Tidy. Don't build a VEC_INIT_EXPR except when
3322 processing file-scope initializers.
3323 * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
3324 * tree.c: Include splay-tree.h
3325 (no_linkage_helper): Adjust for new interface to search_tree.
3326 (search_tree): Pass around pointers to tree nodes, rather than the
3327 nodes themselves. Handle VEC_INIT_EXPR.
3328 (no_linkage_check): Adjust for new interface to search_tree.
3329 (mapcar): Handle VEC_INIT_EXPR.
3330 (target_remap): New variable.
3331 (bot_manip): Use it.
3332 (bot_replace): New function.
3333 (break_out_target_exprs): Use it to remap all variables used in a
3334 default argument expression.
3335 * typeck.c (build_modify_expr): Don't crash when outside a
3336 function and presented with an INIT_EXPR assignment
3337 * Makefile.in (tree.o): Depend on splay-tree.h.
3339 Fri Sep 24 10:48:10 1999 Bernd Schmidt <bernds@cygnus.co.uk>
3341 * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
3343 (builtin_function): New arg CLASS. Arg CODE now of type int. All
3345 Set the builtin's DECL_BUILT_IN_CLASS.
3347 1999-09-24 Mark Mitchell <mark@codesourcery.com>
3349 * decl.c (pushdecl): Don't make local declarations of extern
3350 variables give the variable a DECL_CONTEXT for the function.
3351 (make_rtl_for_nonlocal_decl): Don't fuss with obstacks. Simplify.
3352 Don't accidentally make RTL for local declarations.
3353 (emit_local_var): Handle declarations with asm-specifiers here.
3355 1999-09-23 Mark Mitchell <mark@codesourcery.com>
3357 * ir.texi: Improve documentation for TARGET_EXPRs. Discuss
3358 STMT_IS_FULL_EXPR_P.
3360 * cp-tree.h (language_function): Add cannot_inline.
3361 * decl.c (start_function): Restore current_function_cannot_inline
3362 from the saved value.
3363 (save_function_data): Save current_function_cannot_inline.
3364 * decl2.c (start_objects): Change prototype. Build the function
3365 in function-at-a-time mode.
3366 (finish_objects): Likewise.
3367 (generate_ctor_or_dtor_function): Adjust accordingly.
3369 * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
3370 * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
3371 Don't call expand_anon_union_decl here
3372 * semantics.c (exapnd_stmt): Call it here, instead.
3373 * typeck.c (mark_addressable): Addressed variables are implicitly
3376 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3378 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
3379 (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
3380 (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
3381 * cp-tree.h: Add tree checking macros to various tree access
3383 * ptree.c (print_lang_decl): Test for function or variable
3384 before accessing template info.
3386 1999-09-23 Jason Merrill <jason@yorick.cygnus.com>
3388 * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
3389 * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
3390 * decl2.c (lang_f_options): Add -fshort-wchar.
3391 * cp-tree.h: Declare flag_short_wchar.
3392 * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned
3395 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3397 * ir.texi: Fix formatting errors and typos.
3399 1999-09-22 Mark Mitchell <mark@codesourcery.com>
3401 * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
3403 * decl.c (pushdecl): Do create a binding for extern "C" functions,
3404 but not for their DECL_ASSEMBLER_NAMEs.
3405 (lookup_name_current_level): Fix formatting.
3406 (xref_tag): Likewise.
3407 * decl2.c (start_objects): Mark static constructors and
3408 destructors as used.
3410 1999-09-22 Jason Merrill <jason@yorick.cygnus.com>
3412 * decl.c (define_case_label): Don't crash if we're not in a switch.
3414 * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
3415 * lang-options.h: Restore -fthis-is-variable. Remove help strings
3416 for unsupported flags.
3418 1999-09-21 Jason Merrill <jason@yorick.cygnus.com>
3420 * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
3421 Accept and warn about -fthis-is-variable.
3423 1999-09-21 Mark Mitchell <mark@codesourcery.com>
3425 * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
3426 CLEANUP_STMT, and SCOPE_STMT.
3428 * decl2.c (lang_decode_option): Adjust, in the wake of recent
3429 changes to option processing.
3431 1999-09-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3433 * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
3434 function pointer from pmfs with no object given.
3435 (convert_for_assignment): Do not return error when converting
3438 1999-09-21 Alex Samuel <samuel@codesourcery.com>
3440 * lex.c (internal_filename): New variable.
3441 (INTERNAL_FILENAME): New macro.
3442 (init_parse): Allocate internal_filename and mark as root. Use it
3443 instead of a string constant.
3445 1999-09-21 Nathan Sidwell <nathan@acm.org>
3447 Reimplement dynamic cast and catch matching.
3448 * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
3449 * search.c (dynamic_cast_base_recurse): New function.
3450 (get_dynamic_cast_base_type): New function for dynamic cast.
3451 * rtti.c (build_dynamic_cast_1): Determine source and target
3452 class relationship. Call __dynamic_cast_2.
3453 * tinfo.h (__user_type_info::upcast): New catch dispatcher.
3454 (__user_type_info::dyncast): New dynamic cast dispatcher.
3455 (__user_type_info::sub_kind): New nested enumeration.
3456 (__user_type_info::contained_p): sub_kind predicate.
3457 (__user_type_info::contained_public_p): Likewise.
3458 (__user_type_info::contained_nonpublic_p): Likewise.
3459 (__user_type_info::contained_nonvirtual_p: Likewise.
3460 (__user_type_info::upcast_result): New nested struct.
3461 (__user_type_info::dyncast_result): New nested struct.
3462 (*::do_upcast): New catch function.
3463 (*::do_dyncast): New dynamic cast function.
3464 (__user_type_info::find_public_subobj): New dynamic cast
3466 (*::do_find_public_subobj): New dynamic cast helper function.
3467 * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
3468 (__user_type_info::dyncast): Define dynamic cast dispatcher.
3469 (*::do_upcast): Define catch function.
3470 (*::do_dyncast): Define dynamic cast function.
3471 (*::do_find_public_subobj): Define dynamic cast helper function.
3472 * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
3473 (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
3474 (__dynamic_cast_2): New dynamic cast runtime.
3476 1999-09-20 Mark Mitchell <mark@codesourcery.com>
3478 * cp-tree.h (finish_stmt_expr): Change prototype.
3479 * expr.c (cplus_expand_expr): Adjust call accordingly.
3480 * init.c (finish_init_stmts): Likewise.
3481 * parse.y (primary): Likewise.
3482 * pt.c (tsubst_copy): Likewise.
3483 * semantics.c (finish_stmt_expr): Don't take two parameters.
3484 Don't remove generated BLOCKs from the block-tree.
3486 Remove support for assigning to `this'.
3487 * NEWS: Note that fact.
3488 * class.c (build_vbase_path): Don't check flag_this_is_variable.
3489 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
3490 (language_function): Remove assigns_this, just_assigned_this, and
3491 x_base_init_expr. Add x_vcalls_possible_p. Add vtbls_set_up_p.
3492 (base_init_expr): Remove.
3493 (current_vcalls_possible_p): New macro.
3494 (vtbls_set_up_p): Likewise.
3495 (emit_base_init): Change prototype.
3496 * decl.c (finish_destructor_body): New function, split out from
3498 (current_function_assigns_this): Remove.
3499 (current_function_just_assigned_this): Likewise.
3500 (start_function): Don't set them.
3501 (finish_function): Don't check them. Don't emit
3502 base-initialization code here. Generate code for destructors when
3503 doing semantic analysis.
3504 (finish_stmt): Don't check current_function_just_assigned_this.
3505 * decl2.c (lang_f_options): Remove this-is-variable.
3506 (lang_decode_option): Likewise.
3507 (grokclassfn): Don't check flag_this_is_variable.
3508 * init.c (emit_base_init): Return the expression generated.
3509 (construct_virtual_bases): Don't push/pop obstacks. Fix
3511 (build_new_1): Don't check flag_this_is_variable.
3512 (get_temp_regvar): Don't set DECL_REGISTER.
3513 (build_vec_init): Don't call use_variable.
3514 * lang-options.h: Remove "-fthis-is-variable" and
3515 "-fno-this-is-variable".
3516 * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
3517 * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
3519 * semantics.c (finish_expr_stmt_real): Rename to ...
3520 (finish_expr_stmt): This. Remove assigned_this parameter.
3521 (begin_if_stmt): Call do_pushlevel before starting the statement.
3522 (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
3524 (setup_vtbl_ptr): Emit initialization code for bases and members
3525 at semantic-analysis time. Emit code to initialize vtables in
3527 (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
3528 Don't handle CTOR_INITIALIZER any more.
3529 * typeck.c (build_modify_expr): Don't check for assignments to
3531 (c_expand_return): Don't suggest assigning to `this'.
3533 * Makefile.in (decl.o): Depend on RTL_H.
3534 (decl2.o): Likewise.
3535 (class.o): Likewise.
3537 (method.o): Likewise.
3538 (search.o): Likewise.
3542 * decl.c (duplicate_decls): When a builtin function is redeclared
3543 as static, make sure it is mangled correctly.
3545 * ir.texi (CTOR_INITIALIZER): Remove mention. Fix typo. Add
3546 detail about the statement-tree.
3548 1999-09-20 Nathan Sidwell <nathan@acm.org>
3550 * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
3552 1999-09-20 Nick Clifton <nickc@cygnus.com>
3554 * decl2.c (lang_decode_option): Extend comment.
3556 Mon Sep 20 10:49:05 1999 Bernd Schmidt <bernds@cygnus.co.uk>
3558 * typeck.c: Include "tm_p.h".
3560 1999-09-19 Mark Mitchell <mark@codesourcery.com>
3562 * ir.texi: New file.
3564 1999-09-19 Paul Burchard <burchard@pobox.com>
3566 * semantics.c (expand_stmt): Initialize return value.
3568 1999-09-18 Paul Burchard <burchard@pobox.com>
3570 * gxxint.texi: G++ now implements namespaces.
3572 1999-09-18 Mark Mitchell <mark@codesourcery.com>
3574 * decl.c (pop_label): Don't warn about unused labels more than
3576 * semantics.c (finish_goto_stmt): Always marked used labels as
3579 * decl.c (layout_var_decl): Change prototype. Call layout_decl
3580 even when the declaration is external.
3581 (cp_finish_decl): Adjust call to layout_var_decl.
3582 * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
3584 1999-09-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
3586 * typeck.c (get_member_function_from_ptrfunc): Always consider
3587 virtuality inside member pointer.
3589 1999-09-17 Mark Mitchell <mark@codesourcery.com>
3591 Turn on function-at-a-time processing.
3592 * cp-tree.h (doing_semantic_analysis_p): New macro.
3593 (SF_DEFAULT): Define to zero, not SF_EXPAND.
3594 (start_handler_parms): Change prototype.
3595 (expand_start_catch_block): Likewise.
3596 (expand_end_catch_block): Likewise.
3597 (expand_start_eh_spec): Likewise.
3598 (expand_end_eh_spec): Declare.
3599 (finish_handler_parms): Change prototype.
3600 (begin_catch_block): Declare.
3601 (finish_handler): Change prototype.
3602 (do_pushlevel): Declare.
3603 (do_poplevel): Likewise.
3604 * decl.c (pushlevel): Don't create
3605 binding levels when not doing semantic analysis.
3606 (poplevel): Don't pop them.
3607 (pushdecl): Assert that we are never called when not doing
3609 (pushdecl_top_level): Use push_to_top_level.
3610 (make_label_decl): Don't fiddle with obstacks. Make RTL For the
3611 label when expanding.
3612 (cp_finish_decl): Only inject for-scope variables when doing
3613 semantic analysis. Add comments.
3614 (start_handler_parms): Return the handler parm.
3615 (start_function): Reorganize. Don't clear DECL_INITIAL if it is
3616 already set. Reinitialize from saved function data if available.
3617 Don't pushlevel when not doing semantic analysis.
3618 (store_parm_decls): Only generate RTL when expanding. Only
3619 pushdecl when doing semantic analysis. Set
3620 current_eh_spec_try_block if appropriate.
3621 (finish_function): Simplify. Use do_pushlevel and do_poplevel.
3622 Combine common code. Don't poplevel when not doing semantic
3624 (push_cp_function_context): Don't expand functions without an
3625 explicit call to expand_body.
3626 (mark_lang_function): Make eh_spec_try_block and
3628 * except.c (expand_end_eh_spec): Don't
3630 (process_start_catch_block): Likewise.
3631 (push_eh_cleanup): Use finish_decl_cleanup.
3632 (initialize_handler_parm): New function.
3633 (expand_start_catch_block): Use it.
3634 (expand_end_catch_block): Use tree-generation functions, not
3635 RTL-generation functions.
3636 (expand_start_eh_spec): Likewise.
3637 (expand_end_eh_spec): Likewise.
3638 (expand_exception_blocks): Simplify.
3639 (start_anon_func): Use do_pushlevel.
3640 (end_anon_func): Use do_poplvel. Call expand_body for the
3642 * expr.c (do_case): Don't call define_case_label.
3643 * init.c (create_temporary_var): Set DECL_CONTEXT for local
3645 * method.c (emit_thunk): Call expand_body for the
3647 (sythesize_method): Likewise.
3648 * parse.y (handler_args): Give it ttype.
3649 (eat_saved_input): Call expand_body.
3650 (base_init): Use do_pushlevel.
3651 (pending_inline): Call expand_body.
3652 (handler): Adjust calls to finish_handler_parms and
3654 (handler_args): Don't call expand_start_catch_block. Return the
3655 catch parameter. * pt.c (tsubst_expr): Adjust HANDLER handling.
3656 * parse.c: Regenerated.
3657 * rtti.c (synthesize_tinfo_fn): Call finish_function.
3658 * semantics.c (do_pushlevel): Give it external linkage. Build
3660 (do_poplevel): Likewise.
3661 (finish_case_label): Call define_case_label when doing semantic
3663 (finish_goto_stmt): Create RTL for labels.
3664 (finish_function_try_block): Set in_function_try_handler
3666 (finish_function_handler_sequence): Unset it.
3667 (finish_handler_parms): Use expand_start_catch_block even when
3668 building a statement-tree.
3669 (begin_catch_block): New function.
3670 (finish_handler): Move a little RTL-generation logic here.
3671 (finish_decl_cleanup): Allow cleanups for empty declarations.
3672 (finish_named_return_value): Don't pushdecl when not doing
3674 (expand_stmt): Don't do semantic analysis for variable
3675 declarations. Handle START_CATCH_STMT. Call expand_label
3676 directly for a LABEL_STMT. Tweak handling of GOTO_STMT. Adjust
3677 HANDLERs. Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
3678 (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
3679 RETURN_INIT and function try blocks.
3681 * cp-tree.h (language_function): Add x_eh_spec_try_block. Add
3682 x_scope_stmt_stack. Add x_in_charge_parm.
3683 (current_eh_spec_try_block): New macro.
3684 (current_scope_stmt_stack): Likewise.
3685 (current_in_charge_parm): Likewise.
3686 * decl.c (start_function): Initialize current_in_charge_parm.
3687 (finish_function): Use current_in_charge_parm rather than looking
3689 * search.c (expand_indirect_vtbls_init): Likewise.
3691 * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
3692 (TRY_BLOCK): Likewise.
3693 (HANDLER): Likewise.
3694 (START_CATCH_STMT): New tree node.
3695 (SCOPE_STMT): Likewise.
3696 * cp-tree.h (SCOPE_BEGIN_P): New macro.
3697 (SCOPE_NULLIFIED_P): Likewise.
3698 (struct lang_decl_flags): Add pending_inline_p. Adjust dummy.
3699 (struct lang_decl): Add saved_language_function.
3700 (DECL_PENDING_INLINE_INFO): Adjust documentation.
3701 (DECL_PENDING_INLINE_P): New macro.
3702 (TYPE_TI_ARGS): Fix typo in comment.
3703 (DECL_SAVED_TREE): Add to documentation.
3704 (DECL_SAVED_FUNCTION_DATA): New macro.
3705 (START_CATCH_TYPE): Likewise.
3706 (SCOPE_END_P): New macro.
3707 (declare_parm_level): Don't declare.
3708 * decl.c (mark_lang_function): New function, split out from
3709 mark_cp_function_context.
3710 (save_function_data): New function.
3711 (declare_parm_level): Remove.
3712 (finish_function): Use save_function_data to squirrel away
3713 important stuff for later use.
3714 (mark_cp_function_context): Use mark_function_data.
3715 (lang_mark_tree): Likewise.
3716 * lex.c (begin_definition_of_inclass_inline): Set
3717 DECL_PENDING_INLINE_P.
3718 (store_pending_inline): Clear it.
3719 * pt.c (tsubst_decl): Likewise.
3721 1999-09-17 Nathan Sidwell <nathan@acm.org>
3723 * call.c (perform_implicit_conversion): Deal with error_mark_node.
3725 1999-09-17 Mark Mitchell <mark@codesourcery.com>
3727 * decl.c (warn_extern_redeclared_static): Don't get confused by
3728 static member functions.
3729 (duplicate_decls): Merge DECL_THIS_STATIC.
3731 * decl.c (expand_static_init): Make sure assignments to local
3732 statics actually occur.
3734 1999-09-17 Mark Mitchell <mark@codesourcery.com>
3736 * cp-tree.h (poplevel_class): Declare.
3737 * class.c (popclass): Use poplevel_class, not poplevel.
3738 * decl.c (poplevel_class): Don't make it static. Don't return a
3740 (poplevel): Don't call poplevel_class; abort in a class
3741 binding level is seen.
3742 * semantics.c (finish_translation_unit): Use pop_everything.
3743 * parse.y (member_init): Allow errors.
3744 (pending_inline): Call finish_function.
3745 * parse.c: Regenerated.
3746 * Makefile.in (CONFLICTS): Adjust.
3748 1999-09-17 Gabriel Dos Reis <gdr@codesourcery.com>
3750 * error.c: Reduce code duplication.
3751 (dump_template_value): New function.
3752 (dump_type_real): Use it.
3753 (dump_decl): Likewise.
3754 (dump_function_name): Likewise.
3755 (dump_function_decl): Don't be too talkative about function return
3758 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3760 * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
3762 * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
3764 1999-09-16 Jason Merrill <jason@yorick.cygnus.com>
3766 * decl2.c (finish_file): Also call check_global_declarations for
3767 the pending_statics list.
3769 1999-09-15 Jason Merrill <jason@yorick.cygnus.com>
3771 * lex.c (cp_pragma_implementation): Allow #pragma implementation
3774 1999-09-15 Richard Henderson <rth@cygnus.com>
3776 * lex.c (mark_impl_file_chain): Follow the next chain.
3778 1999-09-15 Mark Mitchell <mark@codesourcery.com>
3780 * decl.c (warn_extern_redeclared_static): Simplify. Catch
3781 problems with extern "C" functions redeclared as static.
3782 (duplicate_decls): When a builtin is redeclared static, make the
3783 new function have internal linkage.
3785 1999-09-15 Mark Mitchell <mark@codesourcery.com>
3787 * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
3788 * pt.c (tsubst_copy): Likewise.
3789 * tree.c (search_tree): Likewise.
3792 1999-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3794 * typeck2.c (ack): Don't declare progname.
3796 1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
3798 * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
3799 filenames with ggc_alloc_string.
3801 1999-09-14 Mark Mitchell <mark@codesourcery.com>
3803 * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the
3805 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
3807 * cvt.c (build_up_reference): Likewise.
3808 * tree.c (build_cplus_new): Likewise.
3809 (get_target_expr): Likewise.
3811 Tue Sep 14 01:45:10 1999 Marc Espie <espie@cvs.openbsd.org>
3813 * Makefile.in: Prepend $(SHELL) to move-if-change calls.
3815 1999-09-13 Mark Mitchell <mark@codesourcery.com>
3817 * cp-tree.h (build_target_expr): New function.
3818 * call.c (build_conditional_expr): Use build_target_expr.
3819 (convert_like): Likewise.
3820 (build_over_call): Likewise.
3821 * cvt.c (build_up_reference): Likewise.
3822 * decl.c (build_cleanup_on_safe_obstack): Fold into ...
3823 (destroy_local_var): Here.
3824 (build_target_expr): New function.
3825 * tree.c (build_cplus_new): Use it.
3826 (get_target_expr): Likewise.
3828 1999-09-13 Nathan Sidwell <nathan@acm.org>
3830 * typeck.c (expr_sizeof): Don't decay arrays and functions.
3831 Remove misleading comment.
3832 (build_compound_expr): Don't decay arrays.
3834 1999-09-13 Jason Merrill <jason@yorick.cygnus.com>
3836 * call.c (build_conditional_expr): Always use a TARGET_EXPR for
3837 class rvalues again.
3839 Sun Sep 12 23:29:07 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3841 * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
3843 * g++spec.c: Include gcc.h.
3844 (lang_specific_driver): Constify a char*. Call xcalloc, not
3845 xmalloc/bzero. All calls to the function pointer parameter now
3846 explicitly call `fatal'.
3848 1999-09-12 Mark Mitchell <mark@codesourcery.com>
3850 * call.c (implicit_conversion): Robustify. Handle OFFSET_REFs.
3851 * cvt.c (ocp_convert): Complete the from and destination types.
3852 Adjust warning about functions always being `true' in conditionals.
3853 * decl.c (duplicate_decls): Don't play funny games with abort.
3854 * error.c (dump_expr): Handle OVERLOADs.
3855 * spew.c (probe_obstack): Remove.
3856 * typeck.c (condition_conversion): Use perform_implicit_conversion.
3858 1999-09-12 Bernd Schmidt <bernds@cygnus.co.uk>
3860 * cp-tree.h (auto_function, define_function): Adjust prototypes.
3861 * decl.c (define_function): Lose FUNCTION_CODE arg. All callers
3863 (auto_function): Likewise, for CODE arg.
3864 Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
3865 (builtin_function): ... here.
3867 1999-09-11 Mark Mitchell <mark@codesourcery.com>
3869 * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
3870 (init_decl_processing): Don't set TREE_PERMANENT for the
3872 (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
3873 (grokdeclarator): Likewise.
3874 (grokparms): Don't check TREE_PERMANENT when building up lists.
3875 * decl2.c (grokfield): Don't assert TREE_PERMANENT.
3876 (mark_inline_for_output): Likewise.
3877 * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
3878 * init.c (build_offset_ref): Don't check TREE_PERMANENT.
3879 * lex.c (check_newline): Don't check ggc_p; it is always one.
3880 * pt.c (process_template_parm): Don't check TREE_PERMANENT.
3881 * spew.c (yylex): Don't copy_node or probe_obstacks for
3882 non-permanent CONSTANTs and STRINGs.
3883 * tree.c (build_cplus_array_type_1): Don't fuss with
3884 TREE_PERMANENT on ARRAY_TYPEs.
3886 * cp-tree.def (CLEANUP_STMT): New node.
3887 * cp-tree.h (language_function): Add name_declared.
3888 (current_function_name_declared): New macro.
3889 (CLEANUP_DECL): New macro.
3890 (CLEANUP_EXPR): Likewise.
3891 (emit_local_var): Likewise.
3892 (finish_decl_cleanup): New function.
3893 * cvt.c (build_up_reference): Simplify.
3894 (ocp_convert): Remove dead code.
3895 * decl.c (start_decl): Remove call to add_decl_stmt.
3896 (grok_reference_init): Adjust, to handle bindings temporaries to
3897 references. Remove dead code.
3898 (initialize_local_var): Don't generate RTL for
3899 declarations here, or build cleanups here. Don't fuss with
3900 obstacks. Replace expand_start_target_temps calls with explicit
3901 setting of stms_are_full_exprs_p.
3902 (destroy_local_var): New function.
3903 (emit_local_var): Likewise.
3904 (cp_finish_decl): Use them, as appropriate.
3905 (start_function): Announce template functions.
3906 (store_parm_decls): Don't call declare_function_name here.
3907 (finish_stmt): Don't start emit base-initialization code when just
3908 building the statement-tree.
3909 * init.c (create_temporary_var): Move add_decl_stmt call ...
3910 (get_temp_regvar): Here.
3911 * pt.c (tsubst_expr): Make DECL_INITIAL look like what
3912 cp_finish_decl would expect. Don't call add_decl_stmt.
3913 * semantics.c (begin_compound_stmt): Call declare_function_name,
3915 (finish_decl_cleanup): New function.
3916 (expand_stmt): Use emit_local_var to output variables.
3917 (expand_body): Set current_funtion_name_declared.
3919 1999-09-10 Mark Mitchell <mark@codesourcery.com>
3921 * cp-tree.h (finish_cleanup_try_block): New function.
3922 * semantics.c (finish_cleanup_try_block): Add comment.
3924 Fri Sep 10 10:32:32 1999 Bernd Schmidt <bernds@cygnus.co.uk>
3926 * cp-tree.h: Delete declarations for all tree nodes now moved to
3928 * decl.c: Delete their definitions.
3929 (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
3930 FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
3932 (init_decl_processing): Call build_common_tree_nodes and
3933 build_common_tree_nodes_2 instead of building their nodes here.
3934 Don't add gc roots for them.
3936 1999-09-10 Mark Mitchell <mark@codesourcery.com>
3938 * cp-tree.h (language_function): Rename expanding_p to
3939 x_expanding_p. Rename named_label_uses to x_named_label_uses.
3940 (expanding_p): Adjust accordingly.
3941 (TREE_VIA_PRIVATE): Fix typo in comment.
3942 (DECL_REFERENCE_SLOT): Remove.
3943 (SET_DECL_REFERENCE_SLOT): Likewise.
3944 * decl.c (named_label_uses): Adjust. Remove chicken comment.
3945 (push_overloaded_decl): Don't truncate the chain of bindings when
3946 adding an overloaded function.
3947 (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
3948 (initialize_local_var): Fix typo in comment.
3949 (store_parm_decls): Don't set DECL_REFERENCE_SLOT. Tidy up.
3950 * decl2.c (start_objects): Make the fact that we are expanding
3951 the generated function right away explicit.
3952 (start_static_storage_duration_function): Likewise.
3953 (finish_file): Fix typo in comment.
3954 * init.c (build_vec_init): Correct bugs in handling cleanups.
3955 * semantics.c (maybe_convert_cond): New function.
3956 (FINISH_COND): Always store the condition, even if there's
3958 (finish_if_stmt_cond): Use maybe_convert_cond.
3959 (finish_while_stmt_cond): Likewise.
3960 (finish_do_stmt): Likewise.
3961 (finish_for_cond): Likewise.
3962 (expand_cond): Adjust.
3964 * cp-tree.h (FN_TRY_BLOCK_P): New macro.
3965 * init.c (perform_member_init): Remove obstack machinations.
3966 (expand_cleanup_for_base): Likewise.
3967 (finish_init_stmts): Mark the statement-expression as used.
3968 * method.c (emit_thunk): Use tree-generating functions, not
3970 (do_build_copy_constructor): Likewise.
3971 (do_build_assign_ref): Likewise.
3972 (synthesize_method): Likewise. Keep track of line numbers.
3973 * pt.c (tsubst_expr): Handle various kinds of try blocks.
3974 * semantics.c (expand_stmts): Remove.
3975 (begin_function_try_block): Set FN_TRY_BLOCK_P.
3976 (finish_function_try_block): Be careful rechaining
3977 function try blocks.
3978 (expand_stmt): Loop through all the statements at a given level.
3979 (exapnd_body): Be careful with line-numbers here too. Prepare for
3980 being called directly from the parser.
3982 * cp-tree.h (finish_function): Adjust prototype.
3983 * decl.c (finish_function): Return the function compiled.
3984 * pt.c (instantiate_decl): Don't play games with obstacks.
3985 * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
3986 (search_tree): Likewise.
3987 * typeck.c: Fix typo in comment.
3988 * typeck2.c (store_init_value): Add comment.
3990 * cp-tree.h (CPTI_ATEXIT): New macro.
3991 (atexit_node): Likewise.
3992 * decl.c (destroy_local_static): New function, broken out from ...
3993 (expand_static_init): Here.
3995 * rtti.c (get_tinfo_var): These should always be global
3996 (expand_si_desc): Use tree, not RTL, functions to generate code.
3997 (expand_class_desc): Likewise.
3998 (expand_ptr_desc): Likewise.
3999 (expand_attr_desc): Likewise.
4000 (expand_generic_desc): Likewise.
4001 (synthesize_tinfo_fn): Likewise.
4003 1999-09-09 Mark Mitchell <mark@codesourcery.com>
4005 * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
4006 (RECHAIN_STMTS_FROM_LAST): Remove. Replace all uses with
4008 (RECHAIN_STMST_FROM_CHAIN): Likewise.
4010 * parse.y (simple_stmt): Fix typo in last change.
4012 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
4013 (STMT_IS_FULL_EXPR_P): Likewise.
4014 (STMT_LINENO_FOR_FN_P): Likewise.
4015 (prep_stmt): New function.
4016 (building_stmt_tree): Tweak for safety.
4017 * pt.c (tsubst_expr): Use prep_stmt throughout.
4018 (add_tree): Move it to semantics.c
4019 * semantics.c (add_tree): Move it here.
4020 (finish_expr_stmt_real): New function.
4021 (finish_expr_stmt): Use it.
4022 (finish_if_stmt_cond): Use FINISH_COND.
4023 (finish_while_stmt_cond): Likewise.
4024 (finish_for_cond): Likewise.
4025 (finish_stmt_tree): Tweak line-number handling.
4026 (prep_stmt): New function.
4027 (expand_stmt): Use it.
4029 * cp-tree.h (begin_switch_stmt): Adjust prototype.
4030 (finish_switch_cond): Likewise.
4031 * parse.y (simple_stmt): Adjust accordingly.
4032 * parse.c: Regenerated.
4033 * pt.c (tsubst_expr): Adjust accordingly.
4034 * semantics.c (expand_cond): New function.
4035 (FINISH_COND): New macro.
4036 (begin_switch_stmt): Build the SWITCH_STMT here.
4037 (finish_switch_stmt_cond): Not here.
4038 (expand_stmt): Adjust calls to begin_switch_stmt and
4039 finish_switch_cond. Use expand_cond throughout.
4041 * dump.c (dequeue_and_dump): Dump types for constants.
4042 Describe DECL_ARG_TYPE more intuitively.
4045 * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
4046 (lang_cleanup_tree): Remove.
4047 * lex.c (make_lang_type): Use ggc_alloc to allocate
4050 Reorganize per-function data.
4051 * cp-tree.h (saved_scope): Add function_decl, bindings.
4052 (language_function): Rename binding_level to bindings.
4053 (cp_function_chain): Use the current_function, not the
4054 outer_function_chain.
4055 (current_class_ptr): Make it work, even when there's no
4057 (current_class_ref): Likewise.
4058 (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New
4060 (clear_temp_name): Remove.
4061 * decl.c (check_function_type): New function, broken out from
4063 (current_binding_level): Adjust definition.
4064 (pushlevel): Simplify.
4065 (poplevel): Don't use named_label_uses when we're outside
4067 (mark_saved_scope): Mark function_decl and bindings.
4068 (maybe_push_to_top_level): Don't unconditionally push a new
4069 function context. Save bindings and the current_function_decl.
4070 Don't clear named_labels.
4071 (pop_from_top_level): Pop function context if appropriate.
4072 (init_decl_processing): Set init_lang_status and free_lang_status,
4073 rather than save_lang_status and restore_lang_status.
4074 (start_function): Take SF_* flags. Don't clear per-function data.
4075 Reorder and simplify to use new per-function data code. Add
4077 (store_parm_decls): Don't call init_function_start here.
4078 (finish_function): Adjust for new handling of per-function data.
4079 (push_cp_function_context): Simplify.
4080 (mark_cp_function_context): Change binding_level to bindings.
4081 * decl2.c (clear_temp_name): Remove.
4082 (start_objects): Use SF flags to start_function.
4083 (start_static_storage_duration_function): Likewise.
4084 * except.c (start_anon_func): Remove redundant calls to
4085 push_function_context_to. Use SF flags to start function.
4086 (end_anon_func): Remove redundant call to pop_function_context
4088 * lex.c (reinit_parse_for_function): Don't initialize per-function
4090 * method.c (emit_thunk): Clear current_function after calling
4091 assemble_end_function. Use SF flags for start_function.
4092 (synthesize_method): Use SF flags for start_function.
4093 * parse.c: Regenerated.
4094 * parse.y (fn.defpen): Likewise.
4095 (pending_inline): Clear current_function, even if something goes
4097 * pt.c (instantiate_decl): Use SF flags to start_function.
4098 Don't save and restore expanding_p.
4099 (add_tree): Handle the case where we are outside any function.
4100 (end_tree): Likewise.
4101 * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
4102 * semantics.c (begin_function_definition): Likewise.
4103 (expand_body): Likewise.
4105 1999-09-09 Nathan Sidwell <nathan@acm.org>
4107 * cp-tree.h (convert_to_void): Prototype new function.
4108 (require_complete_type_in_void): Remove prototype.
4109 * cvt.c (convert_to_void): New function.
4110 (ocp_convert): Use convert_to_void.
4111 * decl.c (cplus_expand_expr_stmt): Likewise, for complete
4113 * typeck.c (require_complete_type_in_void): Remove function.
4114 (build_compound_expr): Use convert_to_void.
4115 (build_static_cast): Likewise.
4116 (build_c_cast): Likewise.
4117 * semantics.c (finish_expr_stmt): Do not decay full expressions.
4119 * typeck.c (build_x_compound_expr): Add FIXME.
4121 1999-09-08 Mark Mitchell <mark@codesourcery.com>
4123 * cp-tree.h (scratch_tree_cons): Remove.
4124 * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
4125 and perm_tree_cons with plain tree_cons.
4126 * class.c: Likewise.
4128 * decl2.c: Likewise.
4129 * except.c: Likewise.
4133 * method.c: Likewise.
4134 * parse.y: Likewise.
4138 * search.c: Likewise.
4139 * typeck.c: Likewise.
4140 * parse.c: Regenerated.
4141 * tree.c (build_srcloc): Simplify.
4143 1999-09-08 Bruce Korb autogen@linuxbox.com
4145 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
4147 1999-09-08 Mark Mitchell <mark@codesourcery.com>
4149 * cp-tree.h (lang_decl_flags): Remove permanent_attr.
4151 (LANG_DECL_PERMANENT): Remove.
4152 * decl.c (duplicate_decls): Don't mess about with obstacks trying
4154 (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
4155 * lex.c (free_lang_decl_chain): Remove.
4156 (build_lang_decl): Don't use obstacks.
4157 (retrofit_lang_decl): Likewise.
4158 (copy_lang_decl): Likewise.
4160 * cp-tree.h (saved_scope): Remove old_binding_level and
4161 function_decl. Tidy up.
4162 * decl.c (mark_saved_scope): Don't set them.
4163 (maybe_push_to_top_level): Clear memory.
4165 * decl.c (layout_var_decl): Change prototype. Don't complete
4166 types for external objects.
4167 (check_initializer): Likewise. Tidy.
4168 (initialize_local_var): Complete types here.
4169 (cp_finish_decl): Not here. Reorganize a little.
4170 (grokvardecl): Don't complete types here.
4172 * decl.c (start_function): Clear last_dtor_insn and
4173 last_parm_cleanup_insn.
4174 (push_cp_function_context): Just copy over a little of
4175 the old context, not all of it.
4177 * cp-tree.h (copy_to_permanent): Remove.
4178 (permanent_p): Likewise.
4179 * decl.c (building_typename_type): Don't use copy_to_permanent.
4180 (start_decl): Likewise.
4181 (grok_reference_init): Likewise.
4182 (cp_finish_decl): Likewise.
4183 * init.c (build_new_1): Don't use mapcar.
4184 (build_vec_delete_1): Don't use copy_to_permanent.
4185 (build_vec_init): Likewise.
4186 * parse.y (primary): Likewise.
4187 * parse.c: Regenerated.
4188 * pt.c (push_template_decl_real): Don't use copy_to_permanent.
4189 (lookup_template_class): Likewise.
4190 (tsubst_friend_function): Likewise.
4191 (instantiate_class_template): Likewise.
4192 (tsubst_decl): Likewise.
4194 (instantiate_template): Likewise.
4196 * rtti.c (get_tinfo_fn): Likewise.
4197 (build_dynamic_cast): Likewise.
4198 * semantics.c (finish_if_stmt_cond): Likewise.
4199 (finish_while_stmt_cond): Likewise.
4200 (finish_do_stmt): Likewise.
4201 (finish_for_cond): Likewise.
4202 (finish_for_expr): Likewise.
4203 (finish_cleanup): Likewise.
4204 (add_decl_stmt): Likewise.
4205 (finish_named_return_value): Likewise.
4206 (finish_qualified_call_expr): Likewise.
4207 * tree.c (perm_manip): Remove.
4208 (build_exception_variant): Don't use copy_to_permanent.
4209 (permanent_p): Remove.
4210 (copy_to_permament): Remove.
4211 (build_min_nt): Don't use copy_to_permanent.
4212 (build_min): Likewise.
4213 (min_tree_cons): Likewise.
4214 * typeckc.c (build_static_cast): Likewise.
4215 (build_reinterpret_cast): Likewise.
4216 (build_const_cast): Likewise.
4218 1999-09-07 Mark Mitchell <mark@codesourcery.com>
4220 * decl.c (ggc_p): Set it to 1.
4221 (mark_saved_scope): Add prototype.
4223 1999-09-07 Richard Henderson <rth@cygnus.com>
4225 * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
4226 * typeck.c (self_promoting_args_p): Delete.
4228 1999-09-07 Jason Merrill <jason@yorick.cygnus.com>
4230 * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
4231 (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
4233 1999-09-07 Mark Mitchell <mark@codesourcery.com>
4235 * Makefile.in (tree.o): Depend on ggc.h.
4236 * class.c (make_method_vec): Remove.
4237 (free_method_vec): Likewise.
4238 (free_method_vecs): Remove.
4239 (add_method): Don't use them.
4240 * cp-tree.def (PTRMEM_CST): Make it longer.
4241 (TEMPLATE_PARM_INDEX): Make it shorter.
4242 * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
4243 (template_parm_index): Remove RTL field.
4244 (ptrmem_cst): Add RTL field.
4245 (finish_function): Removed parameter.
4246 (process_next_inline): Change prototype.
4247 (init_cplus_unsave): Rename to init_tree.
4248 (binding_init): Remove.
4249 * decl.c (free_binding_nodes): Remove.
4250 (push_binding): Don't use them. Set BINDING_HAS_LEVEL_P.
4251 (pop_binding): Don't use free_binding_nodes.
4252 (free_binding_vecs): Remove.
4253 (store_bindings): Don't use them.
4254 (pop_from_top_level): Likewise.
4255 (lookup_namespace_name): Simplify.
4256 (build_typename_type): Don't use obstack_free.
4257 (unqualified_namespace_lookup): Simplify.
4258 (lookup_name_real): Simplify.
4259 (start_function): Remove comment about leaks.
4260 (finish_function): Removed nested parameter. Call
4261 expand_end_bindings even when building_stmt_tree.
4262 Call ggc_push_context and ggc_pop_context around
4263 rest_of_compilation, if necessary.
4264 (mark_cp_function_context): Handle a NULL language-context.
4265 (lang_mark_false_label_stack): Fix typo.
4266 (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
4267 TEMPLATE_PARM_INDEX. Handle the funny TYPE_LANG_SPECIFIC on
4268 pointer to method types.
4269 (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
4270 * decl2.c (finish_objects): Adjust call to finish_function.
4271 (finish_static_store_duration_function): Likewise.
4272 (do_nonmember_using_decl): Remove call to binding_init.
4273 * except.c (end_anon_func): Adjust call to finish_function.
4274 * lex.c (mark_impl_file_chain): New function.
4275 (init_parse): Call init_tree, not init_cplus_unsave.
4277 (cp_pramga_interface): Use xmalloc, not permalloc.
4278 (cp_pragma_implementation): Likewise.
4279 (begin_definition_of_inclass_inline): Simplify.
4280 (process_next_inline): Adjust prototype.
4281 (do_scoped_id): Don't call binding_init.
4282 (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
4283 * method.c (emit_thunk): Adjust call to finish_function.
4284 (synthesize_method): Likewise.
4285 * parse.y (%union): Add a new `pi' variant.
4286 (PRE_PARSED_FUNCTION_DECL): Use it.
4287 (fn.defpen): Likewise.
4288 (fndef): Adjust call to finish_function.
4289 * pt.c (instantiate_decl): Likewise.
4290 * rtti.c (syntheisze_tinfo_fn): Likewise.
4291 * semantics.c (expand_body): Likewise.
4292 * tree.c: Include ggc.h.
4293 (mark_list_hash): New function.
4294 (binding_init): Remove.
4295 (init_cplus_unsave): Rename to ...
4296 (init_tree): This. Add GC roots.
4298 1999-09-05 Mark Mitchell <mark@codesourcery.com>
4300 Get ready for garbage collection.
4301 * Makefile.in (CXX_TREE_H): Add varray.h
4302 (lex.o): Depend on ggc.h.
4304 (decl2.o): Likewise.
4305 (method.o): Likewise.
4306 (search.o): Likewise.
4309 * class.c: Include ggc.h.
4310 (current_class_name): Remove.
4311 (current_class_type): Likewise.
4312 (current_access_specifier): Likewise.
4313 (previous_class_type): Likewise.
4314 (previous_class_values): Likewise.
4315 (class_cache_firstobj): Likewise.
4316 (current_lang_base): Likewise.
4317 (current_lang_stack): Likewise.
4318 (current_lang_stacksize): Likewise.
4319 (lang_name_c): Likewise.
4320 (lang_name_cplusplus): Likewise.
4321 (lang_name_java): Likewise.
4322 (current_lang_name): Likewise.
4323 (base_layout_decl): Likewise.
4324 (access_default_node): Likewise.
4325 (access_public_node): Likewise.
4326 (access_protected_node): Likewise.
4327 (access_private_node): Likewise.
4328 (access_default_virtual_node): Likewise.
4329 (access_public_virtual_node): Likewise.
4330 (access_protected_virtual_node): Likewise.
4331 (access_private_virtual_node): Likewise.
4332 (signed_zero_node): Likewise.
4333 (init_class_processing): Don't build base_layout_decl.
4334 (push_lang_context): Adjust now that current_lang_base is a varray.
4335 (pop_lang_context): Likewise.
4336 * cp-tree.h: Include varray.h.
4337 (cp_global_trees): Add access_default, access_public,
4338 access_protected, access_private, access_default_virtual,
4339 access_public_virtual, access_protected_virtual,
4340 access_private_virtual, ctor_identifier, delta2_identifier,
4341 delta_identifier, dtor_identifier, in_charge_identifier,
4342 index_identifier, nelts_identifier, this_identifier,
4343 pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
4344 lang_name_c, lang_name_cplusplus, lang_name_java,
4345 empty_except_spec, null, jclass, minus_one, terminate.
4346 (saved_scope): Move here from decl.c. Define globals in terms of
4347 saved_scope: current_namespace, current_class_name,
4348 current_class_type, current_access_specifier, current_lang_stack,
4349 current_lang_base, current_lang_name, current_function_parms,
4350 current_template_parms, processing_template_decl,
4351 processing_specialization, processing_explicit_instantiation,
4352 previous_class_type, previous_class_values, class_cache_firstobj.
4353 (scope_chain): New variable.
4354 (init_pt): New function.
4355 * decl.c (current_namespace): Remove.
4356 (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
4357 (dtor_identifier, pfn_identifier, index_identifier): Likewise.
4358 (delta_identifier, delta2_identifier): Likewise.
4359 (pfn_or_delta2_identifier, tag_identifier): Likewise
4360 (vt_off_identifier, empty_except_spec, null_node): Likewise.
4361 (current_function_parms, current_lang_base): Remove.
4362 (current_lang_stack, previous_class_values): Remove.
4363 (class_binding_level): Macroize.
4364 (saved_scope): Remove.
4365 (current_saved_scope): Rename to scope_chain.
4366 (mark_saved_scope): Adjust for new scope structure.
4367 (maybe_push_to_top_level): Likewise.
4368 (pop_from_top_level): Likewise.
4369 (duplicate_decls): Adjust now that current_lang_base is a varray.
4370 (build_typename_type): Call ggc_add_tree_hash_table_root.
4371 (init_decl_processing): Call init_pt. Call push_to_top_level to
4372 set up globals. Add GC roots.
4373 (xref_basetypes): Adjust now that current_lang_base is a varray.
4374 * decl.h (this_identifier): Remove.
4375 (in_charge_identifier): Likewise.
4376 * decl2.c: Don't include varray.h.
4377 (current_namespace): Remove.
4378 (init_decl2): Add GC roots.
4379 * except.c (Terminate): Remove.
4380 (init_exception_processing): Use terminate_node instead.
4381 (build_terminate_handler): Likewise.
4382 * init.c (nc_nelts_field_id): Remove.
4383 (minus_one): Likewise.
4384 (init_init_processing): Use minus_one_node and nelts_identifier
4385 instead. Add GC roots.
4386 (jclass_node): Remove.
4387 (build_new_1): Use nelts_identifier.
4388 (build_vec_init): Likewise.
4389 (build_vec_delete): Likewise.
4390 * lex.c: Include ggc.h.
4391 (defarg_fn): Move declaration early.
4392 (defarg_parms): Likewise.
4393 (init_parse): Add GC roots.
4394 (handle_cp_pragma): Remove redundant declaration of
4396 * method.c: Include ggc.h.
4397 (btypelist): Make it a varray. All uses changed.
4398 (ktypelist): Likewise.
4399 (init_method): Add GC roots.
4400 * pt.c: Don't include varray.h. Include ggc.h.
4401 (current_template_parms): Remove.
4402 (processing_template_decl): Likewise.
4403 (processing_specialization): Likewise.
4404 (processing_explicit_instantiation): Likewise.
4405 (init_pt): New function.
4406 * repo.c: Include ggc.h.
4407 (init_repo): Add GC roots.
4408 * search.c: Don't include varray.h.
4409 (_vptr_name): Remove.
4410 (lookup_field_1): Use vtpr_identifier instead.
4411 (expand_indirect_vtbls_init): Remove redundant declaration of
4412 in_charge_identifier.
4413 (init_search_processing): Use vptr_identifier.
4415 1999-09-05 Richard Henderson <rth@cygnus.com>
4416 Bernd Schmidt <bernds@cygnus.co.uk>
4417 Mark Mitchell <mark@codesourcery.com>
4419 * Makefile.in (parse.o): Depend on ggc.h.
4420 (decl2.o): Depend on ggc.h.
4421 (init.o): Depend on ggc.h.
4422 * cp-tree.h (init_decl2): Declare.
4423 (cp_parse_init): Likewise.
4424 * decl.c (ggc_p): Define to zero.
4425 (mark_saved_scope): New function.
4426 (init_decl_processing): Call cp_parse_init, and cp_decl2.
4428 (expand_static_init): Add GC roots.
4429 * decl2.c: Include ggc.h.
4430 (init_decl2): New function.
4431 * init.c: Include ggc.h.
4432 (init_init_processing): Add GC roots.
4433 * parse.y: Include ggc.h.
4434 (cp_parse_init): New function.
4436 1999-09-04 Mark Mitchell <mark@codesourcery.com>
4438 * decl.c (init_decl_processing): Set mark_lang_status.
4439 (lang_mark_false_label_stack): Adjust prototype.
4440 * decl2.c (grok_function_init): Remove extraneous declaration of
4443 * Make-lang.in (cc1plus): Remove dependency on GGC.
4444 * Makefile.in (OBJS): Don't mention ggc-simple.o.
4445 (OBJDEPS): Don't mention ggc-simple.o.
4447 * Make-lang.in (cc1plus): Depend on $(GGC).
4448 * Makefile.in (OBJS): Add ggc-simple.o.
4449 (OBJDEPS): Likewise.
4450 * cp-tree.h (language_function): Rename members to `x_' versions;
4451 we now have x_named_labels, x_ctor_label, x_dtor_label,
4452 x_base_init_list, x_member_init_list, x_base_init_expr,
4453 x_current_class_ptr, x_current_class_ref, x_last_tree,
4454 x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
4456 (dtor_label, ctor_label, current_base_init_list,
4457 current_member_init_list, base_init_expr, current_class_ptr,
4458 current_class_ref, last_tree, last_expr_type): Adjust accordingly.
4459 * decl.c: Include ggc.h.
4460 (last_dtor_insn): Adjust to use x_ names.
4461 (last_parm_cleanup_insn): Likewise.
4462 (original_result_rtx): Likewise.
4463 (named_labels): Likewise.
4464 (mark_binding_level): New function.
4465 (mark_cp_function_context): Likewise.
4466 (mark_false_label_stack): Likewise.
4467 (lang_mark_tree): Likewise.
4468 (lang_cleanup_tree): Likewise.
4470 1999-09-03 Mark Mitchell <mark@codesourcery.com>
4472 * Makefile.in (CXX_TREE_H): Include function.h.
4473 (decl.o): Don't depend on function.h.
4474 (decl2.o): Likewise.
4475 (typeck.o): Likewise.
4477 (method.o): Likewise.
4478 * cp-tree.h: Include function.h.
4479 (cp_function): Rename to language_function. Remove next.
4480 (cp_function_chain): Make it a macro, not a variable.
4481 (push_cp_function_context): Don't declare.
4482 (pop_cp_function_context): Likewise.
4483 * decl.c: Don't include function.h.
4484 (push_cp_function_context): Make it static. Make it suitable for
4485 a save_lang_status callback.
4486 (pop_cp_function_context): Likewise.
4487 (maybe_push_to_top_level): Call push_function_context_to, not
4488 push_cp_function_context.
4489 (pop_from_top_level): Call pop_function_context_from, not
4490 pop_cp_function_context.
4491 (init_decl_processing): Set save_lang_status and
4492 restore_lang_status. Call push_function_context_to, not
4493 push_cp_function_context.
4494 (cp_function_chain): Remove.
4495 * decl2.c: Don't include function.h.
4496 * except.c: Don't include function.h.
4497 (start_anon_func): Call push_function_context_to, not
4498 push_cp_function_context.
4499 (end_anon_func): Call pop_function_context_from, not
4500 pop_cp_function_context.
4501 * init.c: Don't include function.h.
4502 * lex.c (begin_definition_of_inclass_inline): Call
4503 push_function_context_to, not push_cp_function_context.
4504 (process_next_inline): Call pop_function_context_from, not
4505 pop_cp_function_context.
4506 * method.c: Don't include function.h.
4507 (synthesize_method): Call push_function_context_to, not
4508 push_cp_function_context. Call pop_function_context_from, not
4509 pop_cp_function_context.
4510 * typeck.c: Don't include function.h.
4512 * decl.c (expand_static_init): Tweak handling of static
4513 initializations for objects without constructors.
4515 1999-09-03 Nathan Sidwell <nathan@acm.org>
4517 * typeck.c (build_indirect_ref): Reject dereference of pointer to
4520 1999-09-02 Mark Mitchell <mark@codesourcery.com>
4522 * cp-tree.h (cp_function): Move here, from decl.c.
4523 (cp_function_chain): Declare.
4524 (dtor_label): New macro, instead of variable.
4525 (ctor_label): Likewise.
4526 (current_base_init_list): Likewise.
4527 (current_member_init_list): Likewise.
4528 (base_init_expr): Likewise.
4529 (current_class_ptr): Likewise.
4530 (current_class_ref): Likewise.
4531 (last_tree): Likewise.
4532 (last_expr_type): Likewise.
4533 (current_function_returns_value): Likewise.
4534 (current_function_returns_null): Likewise.
4535 (current_function_just_assigned_this): Likewise.
4536 (current_function_parms_stored): Likewise.
4537 (temp_name_counter): Likewise.
4538 (static_labelno): Likewise.
4539 (expanding_p): Likewise.
4540 (stmts_are_full_exprs_p): Likewise.
4541 (in_function_try_handler): Likewise.
4542 (lang_type): Remove nested type_flags. All uses changed.
4543 * call.c (ctor_label): Remove.
4544 (dtor_label): Likewise.
4545 * class.c (current_class_ptr): Remove.
4546 (current_class_ref): Likewise.
4547 * decl.c (static_labelno): Remove.
4548 (dtor_label): Likewise.
4549 (last_dtor_insn): New macro, instead of variable.
4550 (last_parm_cleanup_insn): Likewise.
4551 (original_result_rtx): Likewise.
4552 (in_function_try_handler): Remove.
4553 (named_label_uses): New macro, instead of variable.
4554 (named_labels): Likewise.
4555 (current_function_returns_value): Remove.
4556 (current_function_returns_null): Likewise.
4557 (current_function_assigns_this): New macro, instead of variable.
4558 (current_function_just_assigned_this): Likewise.
4559 (current_binding_level): Likewise.
4560 (init_decl_processing): Call push_cp_function_context.
4561 (cp_function): Move to cp-tree.h
4562 (cp_function_chain): Make it global.
4563 (temp_name_counter): Remove.
4564 (push_cp_function_context): Simplify.
4565 (pop_cp_function_context): Likewise.
4566 * decl2.c (temp_name_counter): Remove.
4567 * init_c (current_base_init_list): Likewise.
4568 (current_member_init_list): Likewise.
4569 (base_init_expr): Likewise.
4570 * method.c (static_labelno): Likewise.
4571 * pt.c (last_tree): Likewise.
4572 * semantics.c (expanding_p): Likewise.
4573 (stmts_are_full_exprs_p): Likewise.
4574 (last_expr_type): Likewise.
4575 * typeck.c (dtor_label): Likewise.
4576 (ctor_label): Likewise.
4578 1999-09-01 Alex Samuel <samuel@codesourcery.com>
4580 * decl2.c (arg_assoc_template_arg): New prototype. New function.
4581 (arg_assoc_class): Use arg_assoc_template_arg for template
4583 (arg_assoc): Likewise.
4584 * pt.c (mangle_class_name_for_template): Allow member template
4587 1999-09-02 Nathan Sidwell <nathan@acm.org>
4589 * call.c (build_conditional_expr): Warn on enum mismatches.
4590 (convert_arg_to_ellipsis): Move non-pod check to after
4593 1999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4595 * gxx.gperf (hash, is_reserved_word): Add prototypes.
4597 * init.c (build_vec_init): Initialize variable `try_block'.
4599 * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
4600 Likewise for bzero/memset.
4601 (token_getch, token_put_back): Add static prototypes. Remove
4602 `inline' from the definitions.
4603 (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
4605 1999-09-01 Mark Mitchell <mark@codesourcery.com>
4607 * cp-tree.h (lang_type): Move align into type_flags.
4608 (CLASSTYPE_ALIGN): Adjust accordingly.
4609 * call.c (direct_reference_binding): Remove misleading comment.
4611 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4613 * parse.y (language_string): Constify.
4615 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4617 * repo.c (getpwd): Don't prototype.
4618 * xref.c (getpwd): Likewise
4620 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4622 * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
4623 Remove hacks for stuff which now comes from libiberty.
4625 1999-08-30 Jason Merrill <jason@yorick.cygnus.com>
4627 * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
4629 1999-08-30 Mark Mitchell <mark@codesourcery.com>
4631 * cp-tree.h (begin_init_stmts): Declare.
4632 (finish_init_stmts): Likewise.
4633 * cvt.c (build_up_reference): Wrap the declaration of a temporary
4634 in a statement-expression so that we will see it when expanding
4635 tree structure later.
4636 * init.c (begin_init_stmts): Don't make it static.
4637 (finish_init_stmts): Likewise.
4639 * cp-tree.h (start_handler_parms): New function.
4640 (expand_start_catch_block): Take only one parameter.
4641 (start_handler_parms): New function.
4642 * decl.c (start_handler_parms): Define it.
4643 * except.c (process_start_catch_block): Take only one parameter.
4644 Don't call grokdeclarator here.
4645 (expand_start_catch_block): Don't call grokdeclarator here,
4647 * parse.y (handler_args): Adjust call to
4648 expand_start_catch_block. Use start_handler_parms.
4649 * pt.c (push_template_decl_real): Make permanent lists have
4651 (tsubst_expr): Adjust calls to expand_start_catch_block
4653 * semantics.c (expand_stmt): Likewise.
4655 1999-08-29 Alex Samuel <samuel@codesourcery.com>
4657 * pt.c (push_template_decl_real): Use template declaration from
4658 class type if it exists.
4660 1999-08-29 Mark Mitchell <mark@codesourcery.com>
4662 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
4663 (maybe_inject_for_scope_var): Declare it.
4664 (initialize_local_var): Likewise.
4665 * decl.c (maybe_inject_for_scope_var): Make it global.
4666 (initialize_local_var): Likewise. Move cleanup handling here,
4667 from cp_finish_decl.
4668 (make_rtl_for_nonlocal_decl): Use
4669 push_obstacks_nochange/pop_obstacks, rather than
4670 end_temporary_allocation/resume_temporary_allocation.
4671 (cp_finish_decl): Try to complete the type of a variable when it
4672 is declared. Move cleanup-handling to initialize_local_var.
4673 (expand_static_init): Use tree-building code, rather than
4675 * decl2.c (get_temp_name): Assert non-initializedness of
4677 * init.c (create_temporary_var): Move RTL-assigning code to ...
4678 (get_temp_regvar): Here.
4679 * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here.
4680 * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just
4681 call initialize_local_var to generate initialization code.
4683 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4685 * cp-tree.h (fndecl_as_string, type_as_string,
4686 type_as_string_real, args_as_string, decl_as_string,
4687 expr_as_string, code_as_string, language_as_string,
4688 parm_as_string, op_as_string, assop_as_string, cv_as_string,
4689 lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
4691 * errfn.c (cp_printer): Likewise.
4693 * error.c (cp_printer, fndecl_as_string, type_as_string_real,
4694 type_as_string, expr_as_string, decl_as_string, lang_decl_name,
4695 cp_file_of, code_as_string, language_as_string, parm_as_string,
4696 op_as_string, assop_as_string, args_as_string, cv_as_string):
4699 * tree.c (lang_printable_name): Likewise.
4701 1999-08-28 Richard Henderson <rth@cygnus.com>
4703 * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
4705 1999-08-28 Mark Mitchell <mark@codesourcery.com>
4707 * cp-tree.h (strip_array_types): New function.
4708 * decl.c (maybe_deduce_size_from_array_init): New function, split
4709 out from cp_finish_decl.
4710 (layout_var_decl): Likewise.
4711 (maybe_commonize_var): Likewise.
4712 (maybe_inject_for_scope_var): Likewise.
4713 (initialize_local_var): Likewise.
4714 (build_cleanup_on_safe_obstack): Likewise.
4715 (check_initializer): Likewise.
4716 (make_rtl_for_nonlocal_decl): Likewise.
4717 (cp_finish_decl): Use them.
4718 * typeck.c (strip_array_types): New function.
4720 * cp-tree.def (LABEL_STMT): New tree node.
4721 * cp-tree.h (LABEL_STMT_LABEL): New macro.
4722 (shadow_label): Remove.
4723 (declare_local_label): New function.
4724 (finish_label_decl): Likewise.
4725 * decl.c (make_label_decl): New function, split out from
4727 (shadowed_labels): Remove.
4728 (binding_level): Add shadowed_labels.
4729 (clear_binding_level): Remove.
4730 (push_binding_level): Just bzero the new binding level.
4731 (pushlevel): Fix indentation.
4732 (pop_label): New function.
4733 (pop_labels): Likewise, split out from poplevel.
4734 (poplevel): Pop local labels. Use pop_labels.
4735 (maybe_push_to_top_level): Don't clear shadowed_labels.
4736 (lookup_label): Use make_label_decl.
4737 (shadow_label): Remove.
4738 (declare_local_label): New function.
4739 (define_label): Simplify.
4740 (start_function): Don't clear shadowed_labels.
4741 (cp_function): Remove shadowed_labels.
4742 (push_cp_function_context): Don't save shadowed_labels.
4743 (pop_cp_function_context): Don't restore it.
4744 * dump.c (dequeue_and_dump): Handle LABEL_STMT.
4745 * parse.y (label_decl): Use finish_label_decl.
4746 * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
4748 * semantics.c (finish_label_stmt): Add a LABEL_STMT when
4750 (finish_label_decl): New function.
4751 (expand_stmt): Handle LABEL_STMTs and local label declarations.
4753 1999-08-26 Mark Mitchell <mark@codesourcery.com>
4755 * decl.c (lookup_label): Build labels on the permanent obstack
4756 when building statement trees. Don't build RTL for labels when
4757 building statement trees.
4758 * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
4759 building statement trees.
4760 (finish_label_stmt): Likewise.
4761 (expand_stmt): Adjust accordingly.
4762 * pt.c (tsubst_expr); Likewise.
4763 (do_decl_instantiation): Robustify.
4765 * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
4766 * tree.c (build_cplus_new): Set it.
4767 * expr.c (cplus_expand_expr): Use it.
4768 * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
4770 * decl.c (store_parm_decls): Reset immediate_size_expand.
4771 (finish_function): Likewise.
4773 * tree.c (cplus_unsave_expr_now): Don't return a value.
4775 * semantics.c (do_poplevel): Always initialize the return value.
4777 1999-08-26 Gavin Romig-Koch <gavin@cygnus.com>
4779 * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
4780 * tree.h (cplus_unsave_expr_now) : Same.
4782 1999-08-25 Mark Mitchell <mark@codesourcery.com>
4784 * decl.c (grokdeclarator): Amend comment.
4785 * except.c (expand_start_catch_block): Call push_template_decl for
4786 catch-block parameters.
4787 * method.c (synthesize_method): Build an empty compound statement
4788 for the body of a constructor.
4790 1999-08-25 Jason Merrill <jason@yorick.cygnus.com>
4792 * tree.c (cp_build_qualified_type_real): If we're asking for the
4793 same quals we already have, just return.
4795 1999-08-25 Mark Mitchell <mark@codesourcery.com>
4797 * cp-tree.def (SUBOBJECT): New tree node.
4798 * cp-tree.h (CLEANUP_P): New macro.
4799 (SUBOBJECT_CLEANUP): Likewise.
4800 (keep_next_level): Add parameter.
4801 (get_temp_regvar): Don't declare.
4802 (emit_base_init): Remove parameter.
4803 (expand_aggr_init): Rename to build_aggr_init.
4804 (expand_vec_init): Rename to build_vec_init.
4805 (do_pushlevel): Remove.
4806 (do_poplevel): Likewise.
4807 (finish_cleanup): New function.
4808 (finish_subobject): Likewise.
4809 (stmts_are_full_exprs_p): New variable.
4810 * decl.c (keep_next_level): Add parameter.
4811 (cp_finish_decl): Use build_aggr_init, not
4812 expand_aggr_init. Use finish_expr_stmt to expand the code.
4813 (expand_static_init): Use tree-generating, not RTL-generating,
4814 functions to handle the initialization.
4815 (start_function): Remove dead code. Always have a momentary
4816 obstack inside the function, even before hitting the first curly
4818 (cplus_expand_expr_stmt): Move calls to
4819 expand_{start,end}_target_temps into semantics.c.
4820 (cp_function): Add stmts_are_full_exprs_p.
4821 (push_cp_function_context): Save it.
4822 (pop_cp_function_context): Restore it.
4823 * decl2.c (get_temp_regvar): Move to init.c.
4824 (do_static_initialization): Use build_{aggr,vec}_init.
4825 (do_static_destruction): Fix typo in comment.
4826 * dump.c (dequeue_and_dump): Handle INIT_EXPR.
4827 * except.c (expand_throw): Use create_temporary_var.
4828 * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
4829 * init.c (expand_vec_init_try_block): Remove.
4830 (expand_vec_init_catch_clause): Likewise.
4831 (get_temp_regvar): New function.
4832 (begin_init_stmts): Likewise.
4833 (finish_init_stmts): Likewise.
4834 (perform_member_init): Use build_{aggr,vec}_init. Build up tree
4836 (emit_base_init): Likewise. Remove unused parameter.
4837 (expand_virtual_init): Likewise.
4838 (expand_cleanup_for_base): Use finish_subobject.
4839 (expand_aggr_vbase_init_1): Simplify.
4840 (construct_virtual_bases): Use tree-generating functions to build
4842 (expand_aggr_init): Likewise. Rename to build_aggr_init.
4843 (expand_default_init): Likewise.
4844 (expand_aggr_init_1): Likewise.
4845 (expand_vec_init): Rename to build_vec_init.
4846 * method.c (do_build_copy_constructor): Use tree-generating
4847 functions. Don't call clear_last_expr.
4848 (do_build_assign_ref): Likewise.
4849 (synthesize_method): Call clear_last_expr here.
4850 * parse.y (base_init): Don't call clear_last_expr here.
4851 (nodecls): Likewise.
4852 * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
4853 * semantics.c (do_pushlevel): Move to here.
4854 (do_poplevel): Likewise.
4855 (stmts_are_full_exprs_p): New variable.
4856 (finish_expr_stmt): Handle logic for temoprary cleanup here.
4857 (finish_for_stmt): Use finish_expr_stmt.
4858 (finish_cleanup): New function.
4859 (finish_function_try_block): Fix indentation.
4860 (finish_subobject): New function.
4861 (setup_vtbl_ptr): Call keep_next_level here.
4862 (finish_stmt_expr): Handle a block with no scope inside the
4863 statement-expression.
4864 (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle
4866 * tree.c (search_tree): Handle INIT_EXPR.
4868 * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
4869 * typeck2.c (store_init_value): Change expand_aggr_init to
4870 build_aggr_init in comment.
4872 1999-08-25 Mark Mitchell <mark@codesourcery.com>
4874 * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
4876 1999-08-25 Nathan Sidwell <nathan@acm.org>
4878 * decl2.c (handle_class_head): Be graceful about additional
4879 scope qualifiers. Adjust comments to reflect reality.
4881 1999-08-24 Jason Merrill <jason@yorick.cygnus.com>
4883 * call.c (build_conditional_expr): Fix typo.
4884 * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
4885 lvalue before trying to mess with the sides.
4887 * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
4889 Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu>
4891 * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
4893 1999-08-23 Jason Merrill <jason@yorick.cygnus.com>
4895 * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
4896 Return arbitrary pointer or NULL.
4897 (check_eh_spec): Call __throw_type_match_rtti_2.
4898 * tinfo.h (*::dcast): Return int. Add valp parm.
4899 * tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers.
4900 * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
4901 (__throw_type_match_rtti): Now just a wrapper.
4903 * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
4904 (init_exception_processing): Don't initialize them.
4906 1999-08-23 Paul Burchard <burchard@pobox.com>
4908 * decl.c (check_default_argument): Fix typo.
4910 1999-08-22 Mark Mitchell <mark@codesourcery.com>
4912 * cp-tree.def (STMT_EXPR): Fix typo in node name.
4914 * dump.c (dump_next_stmt): New function.
4915 (dequeue_and_dump): Use it.
4917 * pt.c (tsubst_copy): Make sure to initialize return value for a
4918 STMT_EXPR, even when processing_template_decl.
4919 * semantics.c (finish_stmt_expr): A statement-expression whose
4920 last statement is not an expression-statement has type `void'.
4922 1999-08-20 Mark Mitchell <mark@codesourcery.com>
4924 * semantics.c (finish_stmt_expr): Fix typo in comment.
4925 * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
4927 * init.c (build_vec_delete_1): Make the children of a permanent
4928 BIND_EXPR permanent.
4929 * pt.c (register_specialization): Don't register a specialization
4932 1999-08-18 Andrew Haley <aph@cygnus.com>
4934 * method.c (process_overload_item): Call build_mangled_C9x_name ()
4935 for all integer parameter types larger than long long.
4937 1999-08-19 Mark Mitchell <mark@codesourcery.com>
4939 * pt.c (redeclare_class_template): Merge default template
4940 arguments in both directions.
4942 * typeck.c (common_type): Undo 1999-08-18 change. Remove
4943 compiler_error message.
4945 1999-08-19 Jason Merrill <jason@yorick.cygnus.com>
4947 * cp-tree.h: Declare flag_use_repository.
4948 * pt.c (do_decl_instantiation): Don't complain about duplicate
4949 instantiation with -frepo.
4950 (do_type_instantiation): Likewise.
4952 * pt.c (push_template_decl_real): Complain about everything
4953 that isn't a valid template.
4955 * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
4958 1999-08-19 Mark Mitchell <mark@codesourcery.com>
4960 * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
4961 * decl2.c (build_expr_from_tree): Handle it.
4962 * error.c (dump_expr): Likewise.
4963 * pt.c (for_each_template_parm): Likewise.
4964 (tsubst_copy): Likewise.
4965 * tree.c (search_tree): Likewise.
4966 * semantics.c (finish_pseudo_destructor_call): Create it.
4968 1999-08-18 Mark Mitchell <mark@codesourcery.com>
4970 * search.c (setup_class_bindings): Robustify.
4971 * typeck.c (common_type): Use same_type_p, not pointer equality,
4974 * cp-tree.h (build_lang_field_decl): Remove.
4975 * class.c (build_vtable): Replace calls to build_lang_field_decl
4976 with build_lang_decl.
4977 (prepare_fresh_vtable): Likewise.
4978 (finish_struct_1): Likewise.
4979 (init_class_processing): Likewise.
4980 * decl.c (push_using_decl): Likewise.
4981 (init_decl_processsing): Likewise.
4982 (grokvardecl): Likewise.
4983 (build_ptrmemfunc_type): Likewise.
4984 (grokdeclarator): Likewise.
4985 (build_enumerator): Likewise.
4986 * decl2.c (grok_x_components): Likewise.
4987 (do_class_using_decl): Likewise.
4988 * except.c (call_eh_info): Likewise.
4989 * init.c (init_init_processing): Likewise.
4990 * rtti.c (expand_class_decl): Likewise.
4991 * tree.c (build_base_fields): Likewise.
4992 (build_vbase_pointer_fields): Likewise.
4993 * lex.c (build_lang_decl): Build declarations on the permanent
4994 obstack if we're building statmeent trees.
4995 (retrofit_lang_decl): Handle both the full lang_decl and also the
4996 smaller lang_decl_flags here.
4997 (build_lang_field_decl): Remove.
4998 * pt.c (push_template_decl_real): Issue errors for variable
4999 declarations that are not static members.
5001 1999-08-18 Richard Henderson <rth@cygnus.com>
5003 * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
5006 1999-08-17 Mark Mitchell <mark@codesourcery.com>
5008 * cp-tree.h (back_end_hook): New variable.
5009 * decl2.c (back_end_hook): Define it.
5010 (finish_file): If it's non-NULL, call it.
5012 * decl.c (add_decl_to_level): New function.
5013 (push_local_binding): Use it.
5014 (find_binding): Fix typo in comment.
5015 (pushdecl): Use add_decl_to_level. Put templates on the
5016 corresponding namespace-scope binding levels.
5017 * dump.c (dequeue_and_dump): Print the specializations of a
5019 * pt.c (push_template_decl_real): Don't push a template multiple
5022 1999-08-17 Mark Mitchell <mark@codesourcery.com>
5024 * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
5025 (CALL_DECLARATOR_QUALS): Likewise.
5026 (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
5027 * decl.c (grokdeclarator): Adjust to use them.
5028 * decl2.c (grokfield): Likewise.
5029 (reparse_absdcl_as_casts): Likewise.
5030 * lex.c (make_call_declarator): Likewise.
5031 (set_quals_and_spec): Likewise.
5032 * pt.c (tsubst): Likewise.
5033 * tree.c (mapcar): Remove special hack to handle third operand of
5036 1999-08-16 Mark Mitchell <mark@codesourcery.com>
5038 * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
5039 * class.c (build_vtable): Use build_lang_field_decl to build the
5040 VAR_DECLs for vtables.
5041 (prepare_fresh_vtable): Likewise.
5042 * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
5043 CAN_HAVE_FULL_LANG_DECL_P.
5044 (push_using_decl): Use build_lang_decl to build USING_DECLs.
5045 (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
5046 * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
5047 (build_lang_field_decl): Likewise.
5048 (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
5051 * cp-tree.def (STMT_EXPR): New tree node.
5052 * cp-tree.h (STMT_EXPR_STMT): New macro.
5053 (store_return_init): Change prototype.
5054 (finish_named_return_value): New function.
5055 (expand_stmt): Likewise.
5056 (expand_body): Likewise.
5057 (begin_stmt_tree): Likewise.
5058 (finish_stmt_tree): Likewise.
5059 (expanding_p): New variable.
5060 (last_expr_type): Likewise.
5061 (building_stmt_tree): New macro.
5062 * decl.c (start_function): Use building_stmt_tree, not
5063 processing_template_decl, where appropriate.
5064 (store_parm_decls): Likewise.
5065 (store_return_init): Move most of the body to semantics.c.
5066 (finish_function): Use building_stmt_tree.
5067 (finish_stmt): Clear last_expr_type here.
5068 (cp_function): Add expanding_p, last_tree, last_expr_type.
5069 (push_cp_function_context): Save them.
5070 (pop_cp_function_context): Restore them.
5071 * decl2.c (setup_vtbl_ptr): Move to semantics.c.
5072 * error.c (dump_expr): Handle STMT_EXPR.
5073 * except.c (expand_start_catch_block): Use building_stmt_tree.
5075 * expr.c (cplus_expand_expr): Handle STMT_EXPR.
5076 (do_case): Move add_tree call to semantics.c.
5077 * parse.y (return_init): Use finish_named_return_value.
5078 (for.init.statement): Use finish_expr_stmt.
5079 * parse.c: Regenerated.
5080 * pt.c (do_pushlevel): Move to semantics.c.
5081 (do_poplevel): Likewise.
5082 (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
5083 (tsubst_expr): Don't expand all the way to RTL here. Handle
5084 RETURN_INIT and CTOR_INITIALIZER.
5085 (instantiate_decl): Call expand_body after tsubst'ing into
5087 * semantics.c (expand_stmts): New function.
5088 (expanding_p): New variable.
5089 (last_expr_type): Likewise.
5090 (finish_expr_stmt): Use building_stmt_tree.
5091 (begin_if_stmt): Likewise.
5092 (finish_if_stmt_cond): Likewise.
5093 (finish_then_clause): Likewise.
5094 (begin_else_clause): Likewise.
5095 (finish_else_clause): Likewise.
5096 (begin_while_stmt): Likewise.
5097 (finish_while_stmt_cond): Likewise.
5098 (finish_while_stmt): Likewise.
5099 (finish_do_body): Likewise.
5100 (finish_do_stmt): Likewise.
5101 (finish_return_stmt): Likewise.
5102 (begin_for_stmt): Likewise.
5103 (fnish_for_init_stmt): Likewise.
5104 (finish_for_cond): Likewise.
5105 (finish_for_expr): Likewise.
5106 (finish_for_stmt): Likewise.
5107 (finish_break_stmt): Likewise.
5108 (finish_continue_stmt): Likewise.
5109 (finish_switch_cond): Likewise.
5110 (finish_switch_stmt): Likewise.
5111 (finish_case_label): Call add_tree here if necessary.
5112 (finish_goto_statement): Use building_stmt_tree.
5113 (begin_try_block): Likewise.
5114 (begin_function_try_block): Likewise.
5115 (finish_try_block): Likewise.
5116 (finish_function_try_block): Likewise.
5117 (finish_handler_sequence): Likewise.
5118 (finish_function_handler_sequence): Likewise.
5119 (begin_handler): Likewise.
5120 (finish_handler_parms): Likewise.
5121 (finish_handler): Likewise.
5122 (begin_compound_stmt): Likewise.
5123 (finish_compound_stmt): Likewise.
5124 (finish_asm_stmt): Likewise.
5125 (finish_label_stmt): Likewise.
5126 (finish_named_return_value): New function.
5127 (setup_vtbl_ptr): Moved here from decl2.c.
5128 (do_pushlevel): Moved here from pt.c.
5129 (do_poplevel): Likewise.
5130 (begin_stmt_expr): Use building_stmt_tree.
5131 (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR,
5132 when building_stmt_tree.
5133 (begin_stmt_tree): New function.
5134 (finish_stmt_tree): Likewise.
5135 (expand_stmt): Likewise.
5136 (expand_body): Likewise.
5137 * tree.c (build_cplus_method_type): Make sure the argument types
5138 end up on the same obstack as the METHOD_TYPE.
5139 (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
5140 THROW_EXPR, STMT_EXPR.
5141 (mapcar): Break out common cases. Handle COMPOUND_EXPR,
5142 MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than
5143 sorry, if an unsupported node is encountered.
5144 * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
5145 (c_expand_return): Don't call add_tree here.
5147 1999-08-15 Mark Mitchell <mark@codesourcery.com>
5149 * pt.c (check_default_tmpl_args): Don't check in local scopes.
5150 (tsubst_decl): Make sure the declaration is on a saveable
5151 obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
5153 (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
5155 1999-08-14 Jason Merrill <jason@yorick.cygnus.com>
5157 Speed up Koenig lookup.
5158 * decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm
5159 to return namespaces we've looked at.
5160 * decl2.c (lookup_using_namespace): Likewise.
5161 (add_function): Don't call ovl_member.
5162 (lookup_arg_dependent): Initialize k.namespaces to the list of
5163 namespaces seen in unqualified lookup.
5164 * call.c (equal_functions): Move here from tree.c.
5165 (joust): Use it to handle duplicate candidates.
5166 * tree.c (ovl_member): Use ==.
5168 1999-08-13 Mark Mitchell <mark@codesourcery.com>
5170 * cp-tree.def (DECL_STMT): Make it smaller.
5171 * cp-tree.h (lang_decl_flags): Move saved_tree to ...
5172 (lang_decl): ... here. Add next.
5173 (DECL_SAVED_TREE): Adjust accordingly.
5174 (DECL_IMPLICIT_TYPEDEF_P): New macro.
5175 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
5176 (DECL_STMT_DECL): Likewise.
5177 (create_implicit_typedef): New function.
5178 (maybe_push_decl): Likewise.
5179 (tsubst_default_argument): New function.
5180 (at_function_scope_p): Likewise.
5181 (add_decl_stmt): Likewise.
5182 (push_permanent_obstack): Likewise.
5183 * call.c (convert_default_arg): Use tsubst_default_argument.
5184 * class.c (add_method): Use push_permanent_obstack.
5185 (build_self_reference): Create a TEMPLATE_DECL for the
5186 self-reference, if necessary.
5187 * decl.c (pseudo_global_level_p): Only look at the current binding
5189 (push_binding): Use push_permanent_obstack.
5190 (create_implicit_typedef): New function.
5192 (duplicate_decls): Use push_permanent_obstack.
5193 (maybe_push_decl): New function.
5194 (start_decl): Use it. Remove dead code. Use add_decl_stmt.
5195 (start_decl_1): Remove dead code.
5196 (cp_finish_decl): Remove DECL_STMT handling here. Don't use
5197 pseudo_global_level_p.
5198 (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
5200 (grokdeclarator): Likewise, for TYPE_DECLs. Don't use
5201 pseudo_global_level_p.
5202 * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
5204 (get_sentry): Use push_permanent_obstack.
5205 * dump.c (dequeue_and_dump): Enable DECL_STMT.
5206 * except.c (call_eh_info): Use push_permanent_obstack.
5207 (build_eh_type_ref): Likewise.
5208 (do_pop_exception): Likewise.
5209 (expand_eh_spec): Likewise.
5210 (alloc_eh_object): Likewise.
5211 (expand_throw): Likewise.
5212 * init.c (build_java_class_ref): Likewise.
5213 * lex.c (get_time_identifier): Likewise.
5214 (free_lang_decl_chain): Correct type.
5215 (retrofit_lang_decl): Adjust accordingly.
5216 (build_lang_field_decl): Likewise.
5217 * lex.h (free_lang_decl_chain): Likewise.
5218 * parse.y (lang_extdef): Don't use pseudo_global_level_p.
5219 * parse.c: Regenerated.
5220 * pt.c (tsubst_default_arguments): New function.
5221 (retrieve_local_specialization): Likewise.
5222 (register_local_specialization): Likewise.
5223 (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use
5224 pseudo_global_level_p to determine whether or not a template is
5226 (lookup_template_class): Likewise. Use create_implicit_typedef.
5227 (instantiate_class_template): Call tsubst_default_arguments for
5228 member functions, if appropriate.
5229 (tsubst_default_argument): New function.
5230 (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs.
5231 * search.c (at_function_scope_p): New function.
5232 * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
5233 (finish_label_stmt): Likewise.
5234 (add_decl_stmt): New function.
5235 (begin_class_definition): Likewise.
5236 (finish_typeof): Likewise.
5237 * tree.c (copy_template_template_parm): Likewise.
5238 (copy_to_permanent): Likewise.
5239 (push_permanent_obstack): Define.
5240 (mark_addressable): Use it.
5241 * typeck.c (mark_addressable): Likewise.
5243 1999-08-13 Gavin Romig-Koch <gavin@cygnus.com>
5245 * cp-tree.h (init_cplus_unsave): New.
5246 (cplus_unsave_expr_now): New.
5247 * lex.c (init_parse): Call init_cplus_unsave.
5248 * tree.c (init_cplus_unsave): New.
5249 (cplus_unsave_expr_now): New.
5251 1999-08-13 Mark Mitchell <mark@codesourcery.com>
5253 * pt.c (tsubst): Back out 1999-08-06 patch. Use fold and
5254 decl_constant_value to simplify array bounds.
5256 1999-08-11 Jason Merrill <jason@yorick.cygnus.com>
5258 * lang-options.h: Add -fms-extensions.
5259 * cp-tree.h: Declare flag_ms_extensions.
5260 * decl2.c: Define it.
5261 * class.c (instantiate_type): Don't complain about taking the address
5262 of a bound member function if -fms-extensions.
5263 * typeck.c (build_unary_op): Likewise.
5264 * decl.c (grokdeclarator): Or about implicit int.
5265 * init.c (resolve_offset_ref): Or about implicit '&'.
5267 1999-08-11 Mark Mitchell <mark@codesourcery.com>
5269 * cp-tree.h (minimal_parse_mode): Remove.
5270 (finish_label_stmt): New function.
5271 * decl.c (saved_scope): Remove minimal parse mode.
5272 (maybe_push_to_top_level): Don't save it.
5273 (pop_from_top_level): Don't restore it.
5274 (define_label): Split out template-handling code to semantics.c.
5275 (start_decl): Don't use minimal_parse_mode.
5276 (cp_finish_decl): Likewise.
5277 (start_function): Don't increment it.
5278 (store_return_init): Don't use it.
5279 (finish_function): Don't decrement it.
5280 * parse.y (label_colon): Use finish_label_stmt throughout.
5281 * parse.c: Regenerated.
5282 * pt.c (minimal_parse_mode): Don't define it.
5283 (tsubst_expr): Use finish_label_stmt.
5284 * semantics.c (finish_label_stmt): New function.
5286 * dump.c (queue): Be careful when computing bitmasks.
5287 (dequeue_and_dump): Describe binfos as binfos, not as
5290 * parse.y (pedantic): Give it itype. Adjust usage accordingly
5292 * parse.c: Regenerated.
5294 * Make-lang.in (CXX_SRCS): Remove sig.c.
5295 * Makefile.in (CXX_OBJS): Remove sig.o.
5297 * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
5298 (CPTI_SIGNATURE_TYPE): Likewise.
5299 (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
5300 (opaque_type_node): Likewise.
5301 (signature_type_node): Likewise.
5302 (sigtable_entry_type): Likewise.
5303 (flag_handle_signatures): Likewise.
5304 (lang_type): Remove is_signature, is_signature_pointer,
5305 is_signature_reference, has_opaque_typedecls,
5306 sigtables_has_been_generated. Adjust dummy. Remove signature,
5307 signature_pointer_to, signature_reference_to.
5308 (IS_SIGNATURE): Remove.
5309 (SET_SIGNATURE): Remove.
5310 (CLEAR_SIGNATURE): Remove.
5311 (IS_SIGNATURE_POINTER): Remove.
5312 (IS_SIGNATURE_REFERENCE): Remove.
5313 (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
5314 (SIGTABLE_HAS_BEEN_GENERATED): Remove.
5315 (CLASSTYPE_SIGNATURE): Remove.
5316 (SIGNATURE_TYPE): Remove.
5317 (SIGNATURE_METHOD_VEC): Remove.
5318 (SIGNATURE_POINTER_TO): Remove.
5319 (SIGNATURE_REFERENCE_TO): Remove.
5320 (lang_decl_flags): Remove is_default_implementation. Rename
5321 memfunc_pointer_to to saved_tree.
5322 (IS_DEFAULT_IMPLEMENTATION): Remove.
5323 (DECL_MEMFUNC_POINTER_TO): Remove.
5324 (DECL_MEMFUNC_POINTING_TO): Remove.
5325 (DECL_SAVED_TREE): Adjust definition.
5326 (tag_types): Remove signature_type_node.
5327 (SIGNATURE_FIELD_NAME): Remove.
5328 (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
5329 (SIGNATURE_OPTR_NAME): Likewise.
5330 (SIGNATURE_SPTR_NAME): Likewise.
5331 (SIGNATURE_POINTER_NAME): Likewise.
5332 (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
5333 (SIGNATURE_REFERENCE_NAME): Likewise.
5334 (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
5335 (SIGTABLE_PTR_TYPE): Likewise.
5336 (SIGTABLE_NAME_FORMAT): Likewise.
5337 (SIGTABLE_NAME_FORMAT_LONG): Likewise.
5338 (SIGTABLE_TAG_NAME): Likewise.
5339 (SIGTABLE_VB_OFF_NAME): Likewise.
5340 (SIGTABLE_VT_OFF_NAME): Likewise.
5341 (finish_base_specifiers): Change prototype.
5342 (build_signature_pointer_type): Remove.
5343 (build_signature_reference_type): Remove.
5344 (build_signature_pointer_constructor): Remove.
5345 (build_signature_method_call): Remove.
5346 (build_optr_ref): Likewise.
5347 (append_signature_fields): Likewise.
5348 (signature_error): Likewise.
5349 * call.c (build_this): Remove signature support.
5350 (build_over_call): Likewise.
5351 (build_new_method_call): Likewise.
5352 * class.c (add_implicitly_declared_members): Likewise.
5353 (finish_struct_1): Likewise.
5354 (finish_struct): Likewise.
5355 * cvt.c (cp_convert_to_pointer): Likewise.
5356 (convert_to_pointer_force): Likewise.
5357 (ocp_convert): Likewise.
5358 * decl.c (sigtable_decl_p): Remove.
5359 (init_decl_processing): Remove support for signatures.
5360 (cp_finish_decl): Likewise.
5361 (grokdeclarator): Likewise.
5362 (grokparms): Likewise.
5363 (xref_tag): Likewise.
5364 (start_function): Likewise.
5365 (start_method): Likewise.
5366 * decl2.c (finish_sigtable_vardecl): Remove.
5367 (flag_handle_signatures): Remove.
5368 (lang_f_options): Remove handle-signatures.
5369 (grokfield): Remove support for signatures.
5370 (grokbitfield): Likewise.
5371 (finish_file): Likewise.
5372 (reparse_absdcl_as_casts): Likewise.
5373 * error.c (dump_type_real): Likewise.
5374 (dump_function_decl): Likewise.
5375 * friend.c (make_friend_class): Likewise.
5376 * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
5377 * hash.h: Regenerated.
5378 * init.c (build_new_1): Remove support for signatures.
5379 * lang-options.h: Remove -fhandle-signatures,
5380 -fno-handle-signatures.
5381 * lex.c (init_parse): Remove support for signatures.
5382 (yyprint): Likewise.
5383 * lex.h (rid): Remove RID_SIGNATURE.
5384 * method.c (build_decl_overload_real): Remove support for
5386 (hack_identifier): Likewise.
5387 * parse.y (base_class): Likewise.
5388 (base_class.1): Likewise.
5389 (access_specifier): Likewise.
5390 * search.c (lookup_member): Likewise.
5391 * semantics.c (finish_qualified_object_call_expr): Likewise.
5392 (finish_template_type_parm): Likewise.
5393 (begin_class_definition): Likewise.
5394 (finish_base_specifier): Likewise.
5396 * tree.c (build_cplus_method_type): Remove support for signatures.
5397 * typeck.c (require_complete_type): Likewise.
5398 (c_sizeof): Likewise.
5399 (c_alignof): Likewise.
5400 (build_object_ref): Likewise.
5401 (build_component_ref): Likewise.
5402 (build_indirect_ref): Likewise.
5403 (build_c_cast): Likewise.
5404 (build_modify_expr): Likewise.
5405 (convert_for_initialization): Likewise.
5406 * typeck2.c (signature_error): Remove.
5407 (store_init_value): Remove support for signatures.
5408 (digest_init): Likewise.
5409 (build_x_arrow): Likewise.
5410 (build_functional_cast): Likewise.
5411 * xref.c (GNU_xref_decl): Likewise.
5413 1999-08-10 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
5415 * lex.c (do_identifier): Remove unnecessary lookup of class field.
5417 1999-08-09 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
5419 * decl2.c (set_decl_namespace): Do not complain about non-matching
5420 decls if processing a template.
5422 1999-08-09 Mark Mitchell <mark@codesourcery.com>
5424 * decl.c (build_ptrmemfunc_type): Handle qualified
5425 pointer-to-member types here.
5426 * tree.c (cp_build_qualified_type_real): Simplify handling here.
5428 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5430 * lex.c (lang_identify): Likewise.
5432 1999-08-09 Bernd Schmidt <bernds@cygnus.co.uk>
5434 * Makefile.in: Update dependencies.
5435 * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
5437 * decl.c: Include "function.h"
5438 (cleanup_label, return_label): Delete declarations.
5439 (store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX.
5440 (finish_function): Rename last_parm_insn variable to
5441 fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX.
5442 * decl2.c: Include "function.h".
5443 (rtl_expr_chain): Delete declaration.
5444 * method.c: Include "function.h"
5445 * tree.c (build_vbase_pointer_fields): Don't initialize
5446 DECL_SAVED_INSNS with NULL_RTX.
5447 * typeck.c: Include "function.h"
5449 1999-08-09 Jason Merrill <jason@yorick.cygnus.com>
5451 * semantics.c (begin_function_try_block, finish_function_try_block,
5452 finish_function_handler_sequence): New fns.
5453 * parse.y (function_try_block): Use them.
5454 * pt.c (instantiate_decl): Likewise.
5456 * cp-tree.h: Declare in_function_try_handler.
5457 * decl.c: Define it.
5458 (start_function): Clear it.
5459 (struct cp_function, push_cp_function_context): Save it.
5460 (pop_cp_function_context): Restore it.
5461 * parse.y (function_try_block): Set and clear it.
5462 * except.c (expand_end_catch_block): Rethrow if we reach the end
5463 of a function-try-block handler in a ctor or dtor.
5464 * typeck.c (c_expand_return): Complain about returning from a
5465 function-try-block handler of a ctor.
5467 * parse.y (function_try_block): Call end_protect_partials
5468 before expand_start_all_catch.
5470 1999-08-08 Jason Merrill <jason@yorick.cygnus.com>
5472 * decl.c (struct binding_level): Add eh_region field.
5473 (push_binding_level): Set it.
5474 (define_label): Complain about jumping into an EH block.
5476 * ptree.c (print_lang_type): Print the real type of a PMF.
5477 Print what exceptions a fn type throws.
5479 1999-08-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5481 * class.c (count_fields, add_fields_to_vec): Add static prototype.
5483 * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
5484 get_id_2, composite_pointer_type, dump_node_to_file): Constify a
5487 * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
5490 * decl2.c (finish_static_data_member_decl, grokfield): Constify a
5493 * dump.c (queue_and_dump_index, dump_int, dump_string,
5494 dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
5496 (dump_stmt): Add static prototype.
5498 * errfn.c (cp_thing): Constify a char*.
5500 * error.c (dump_unary_op, dump_binary_op, aggr_variety,
5501 dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
5502 dump_expr): Constify a char*.
5504 * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
5505 read_line_number): Add static prototype.
5506 (opname_tab, assignop_tab, operator_name_string): Constify a char*.
5507 (real_yylex): Move label `letter' into the scope where it is used.
5509 * method.c (build_mangled_template_parm_index, build_overload_int,
5510 build_decl_overload_real, get_id_2): Constify a char*.
5512 * search.c (check_final_overrider): Make static.
5514 * typeck.c (composite_pointer_type): Constify a char*.
5516 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
5518 * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
5519 we're looking at a class.
5521 * decl.c (lookup_name_real): Set the complain flag if we're
5522 looking for a namespace member.
5524 * lex.c (real_yylex): We can have a number with no digits.
5526 * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
5528 * search.c (binfo_from_vbase): New fn.
5529 * cp-tree.h: Declare it.
5530 * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
5531 from pointer to member of virtual base.
5532 * typeck.c (get_delta_difference): Likewise.
5534 1999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br>
5536 * pt.c (tsubst): Use build_index_type to build in-template array
5537 index type. Fixes g++.oliva/dwarf1.C.
5538 * decl.c (grokdeclarator): Likewise, just for consistency, as it
5539 doesn't seem to trigger the bug without it.
5541 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
5543 * typeck2.c (add_exception_specifier): Use complete_type.
5545 1999-08-06 Mark Mitchell <mark@codesourcery.com>
5547 * error.c (dump_expr): Handle EXACT_DIV_EXPR.
5548 (dump_binary_op): Bulletproof.
5549 * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
5550 * tree.c (search_tree): Don't enumerate all the nodes of classes
5551 `1', `2', and `<'; handle them generically. Don't be sorry about
5552 "unrecognized tree codes"; just abort.
5553 (no_linkage_check): Don't do linkage checks for templates.
5555 * tree.c (cp_build_qualified_type_real): Handle
5556 pointer-to-member-function types correctly.
5558 1999-08-05 Jason Merrill <jason@yorick.cygnus.com>
5560 * decl.c (pushdecl): Only give an error for shadowing a parm
5561 from *this* function.
5563 Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com)
5565 * typeck2.c: Update URLs and mail addresses.
5567 1999-08-04 Nathan Sidwell <nathan@acm.org>
5569 * cp-tree.h (empty_except_spec): New global var.
5570 (compexcepttypes): Remove prototype.
5571 (comp_except_specs): Prototype new global function.
5572 (add_exception_specifier): Prototype new global function.
5573 * decl.c (empty_except_spec): Define new global var.
5574 (duplicate_decls): Use comp_except_specs, reword error message.
5575 (init_decl_processing): Initialize empty_except_spec.
5576 Adjust build_exception_variant calls.
5577 * parse.y (exception_specification_opt): Use empty_except_spec.
5578 (ansi_raise_identifier): Call check_for_new_type.
5579 (ansi_raise_identifiers): Use add_exception_specifier.
5580 * pt.c (tsubst): Use add_exception_specifier to build exception
5582 * search.c (check_final_overrider): New static function, broken
5583 out of get_matching_virtual. Check throw specifiers, reword
5585 (get_matching_virtual): Use check_final_overrider.
5586 * tree.c (build_exception_variant): Use comp_except_specs.
5587 * typeck.c (compexcepttypes): Remove.
5588 (comp_except_types): New static function, helper for
5589 comp_except_specs. Compare two types as exception specifiers.
5590 (comp_except_specs): New global function, compare two exception
5592 (comptypes): Adjust for comp_except_specs.
5593 * typeck2.c (add_exception_specifier): New global function.
5595 * class.c (check_for_override): Reword error message.
5597 1999-08-03 Nathan Sidwell <nathan@acm.org>
5599 * call.c (convert_arg_to_ellipsis): Use pod_type_p.
5600 * cp-tree.h (struct lang_type): Added non_pod_class flag.
5601 (CLASSTYPE_NON_POD_P): New macro to access it.
5602 * class.c (finish_struct_1): Determine non-PODness.
5603 Check for arrays of pointers (-Weffc++).
5604 Remove array inspection duplicated code.
5605 * tree.c (pod_type_p): Detect non-pod non-aggregate types.
5606 Use CLASSTYPE_NON_POD_P.
5608 1999-08-03 Nathan Sidwell <nathan@acm.org>
5610 * class.c (duplicate_tag_error): Preserve template information.
5612 1999-08-03 Nathan Sidwell <nathan@acm.org>
5614 * decl.c (start_enum): Show location of previous definition.
5615 * parse.y (enumlist_opt): New reduction.
5616 (structsp): Simplify enum rules to use enumlist_opt.
5618 1999-08-03 Jason Merrill <jason@yorick.cygnus.com>
5620 * lex.c (yyprint): Handle PFUNCNAME.
5622 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
5623 build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
5625 1999-08-03 Mumit Khan <khan@xraylith.wisc.edu>
5627 * decl.c (start_decl): Set attributes before duplicate_decls call.
5629 1999-08-02 Mark Mitchell <mark@codesourcery.com>
5631 * Make-lang.in (CXX_SRCS): Add dump.c.
5632 * Makefile.in (CXX_OBJS): Add dump.o.
5633 (dump.o): New target.
5634 * cp-tree.h (DECL_CONV_FN_P): Document.
5635 (DECL_OVERLOADED_OPERATOR_P): New function.
5636 (TYPE_PTRMEM_CLASS_TYPE): New macro.
5637 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
5638 (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
5639 (ASM_VOLATILE_P): New macro.
5640 (STMT_LINENO): Likewise.
5641 (cp_namespace_decls): New function.
5642 (dump_node_to_file): New function.
5643 * decl.c (cp_namespace_decls): New function.
5644 (walk_namespaces_r): Use it.
5645 (wrapup_globals_for_namespace): Likewise.
5646 * decl2.c (flag_dump_translation_unit): New variable.
5647 (lang_decode_option): Handle -fdump-translation-unit.
5648 (finish_file): If flag_dump_translation_unit is set, dump the
5651 * lang-options.h: Add -fdump-translation-unit.
5652 * pt.c (tsubst_template_parms): Robustify.
5653 (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
5654 (tsubst_expr): Use STMT_LINENO.
5655 * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check
5656 for invalid cv-qualifiers even while building templates.
5658 1999-08-02 Richard Henderson <rth@cygnus.com>
5660 * call.c: Include defaults.h instead of expr.h.
5663 * typeck.c: Include defaults.h.
5665 1999-08-02 Mark Mitchell <mark@codesourcery.com>
5667 * lex.c (errorcount, sorrycount): Don't declare.
5668 * repo.c (errorcount, sorrycount): Likewise.
5669 * typeck2.c (errorcount, sorrycount): Likewise.
5671 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
5673 * call.c (convert_default_arg, build_over_call): Change all uses of
5674 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
5675 Ensure expr.h is included.
5676 * decl.c (grokparams): Ditto.
5677 * pt.c (tsubst_decl): Ditto.
5678 * typeck.c (convert_arguments): Ditto.
5680 1999-08-02 Jason Merrill <jason@yorick.cygnus.com>
5682 * class.c (mark_overriders): Fix order of args to overrides.
5683 (warn_hidden): Likewise. Fix for having virtual and non-virtual
5684 functions with the same name.
5686 1999-08-02 Richard Henderson <rth@cygnus.com>
5688 * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
5690 1999-08-01 Mark Mitchell <mark@codesourcery.com>
5692 * call.c (build_conditional_expr): Fix typo in comment.
5694 1999-08-01 Bernd Schmidt <bernds@cygnus.co.uk>
5696 * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
5697 case_stack; use in_control_zone_p.
5698 * typeck.c (c_expand_return): Likewise.
5700 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
5702 * except.c (catch_clauses): Delete declaration.
5704 1999-07-30 Mark Mitchell <mark@codesourcery.com>
5706 * call.c (build_conditional_expr): Call convert_from_reference to
5707 avoid reference/non-reference type confusion. Fix typo.
5709 1999-07-30 Richard Henderson <rth@cygnus.com>
5711 * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
5712 * cp-tree.h (initializer_constant_valid_p): Remove.
5714 1999-07-28 Mark Mitchell <mark@codesourcery.com>
5716 * call.c (conditional_conversion): Don't build BASE_CONVs for
5717 conversions between things that have the same type.
5718 (build_conditional_expr): Tweak.
5719 (convert_like): Some BASE_CONVs really do require the generation
5722 * init.c (perform_member_init): Don't go through build_modify_expr
5723 for simple initializations.
5725 1999-07-27 Jason Merrill <jason@yorick.cygnus.com>
5727 * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
5728 * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
5729 virtual functions and MI. Simplify.
5731 * method.c: Remove prototype for largest_union_member.
5732 * pt.c (determine_specialization): Fix uninitialized warning.
5733 * lex.c (real_yylex): Likewise.
5735 1999-07-27 Mark Mitchell <mark@codesourcery.com>
5737 * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
5740 * cp-tree.h (BINFO_VIRTUALS): Document new format.
5741 * class.c (modify_one_vtable): Change prototype accordingly.
5742 (modify_all_vtables): Likewise.
5743 (modify_all_direct_vtables): Likewise.
5744 (modify_all_indirect_vtables): Likewise.
5745 (build_vtable_entry_for_fn): New function.
5746 (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
5747 (modify_vtable_entry): Likewise.
5748 (add_virtual_function): Likewise.
5749 (build_vtbl_initializer): New function.
5750 (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
5751 (fixup_vtable_deltas1): Likewise.
5752 (fixup_vtable_deltas): Likewise.
5753 (override_one_vtable): Likewise.
5754 (finish_struct_1): Likewise.
5756 * error.c (dump_expr): Likewise.
5757 * search.c (get_abstract_virtuals_1): Likewise.
5758 (get_abstract_virtuals): Likewise.
5759 (expand_upcast_fixups): Likewise.
5760 * tree.c (debug_binfo): Likewise.
5761 * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
5762 __pure_virtual here.
5764 1999-07-26 Mark Mitchell <mark@codesourcery.com>
5766 * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
5767 as per 1999-07-26 change.
5769 * typeck.c (c_sizeof): Don't allow non-static data members.
5770 (expr_sizeof): Likewise.
5772 1999-07-26 Jason Merrill <jason@yorick.cygnus.com>
5774 * input.c (feed_input): Only touch lineno and input_filename
5775 if !USE_CPPLIB. Save the old values before setting the new ones.
5777 * input.c (feed_input): Add file, line parms.
5778 * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
5779 (real_yylex): Check linemode before input_redirected().
5781 * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
5782 from op new to warning.
5784 1999-07-26 Mark Mitchell <mark@codesourcery.com>
5786 * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
5787 * call.c: All uses changed.
5788 * typeck.c: Likewise.
5790 1999-07-26 Nathan Sidwell <nathan@acm.org>
5792 * exception.cc (__cplus_type_matcher): Match __eh_matcher
5795 1999-07-26 Mark Mitchell <mark@codesourcery.com>
5797 * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
5798 (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
5799 (strip_top_quals): Declare.
5800 (ncp_convert): Likewise.
5801 (type_after_usual_arithmetic_converions): Likewise.
5802 (composite_pointer_type): Likewise.
5803 * call.c (strip_top_quals): Don't make it static.
5804 (promoted_arithmetic_type_p): New function.
5805 (conditional_conversion): Likewise.
5806 (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
5807 (standard_conversion): Use same_type_p. Don't build BASE_CONVs
5808 for converting a type to itself.
5809 (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
5810 (implicit_conversion): Make sure the from and to types are
5812 (add_builtin_candidate): Correct handling of ?: operator.
5813 (add_builtin_candidates): Improve documentation.
5814 (build_conditional_expr): New function.
5815 (can_convert): Implement in terms of can_convert_arg.
5816 (ncp_convert): New function.
5817 * typeck.c (type_after_usual_arithmetic_conversions): New
5818 function, split out from common_type.
5819 (composite_pointer_type): New function, split out from
5820 build_conditional_expr.
5821 (common_type): Use type_after_usual_arithmetic_conversions.
5822 Remove redundant attribute merging.
5823 (comptypes): Tidy. Handle COMPLEX_TYPE.
5824 (build_binary_op_nodefault): Use null_ptr_cst_p.
5825 (build_conditional_expr): Remove.
5826 (convert_for_assignment): Use new conversion functions.
5828 * cp-tree.h (abstract_virtuals_error): Change declaration.
5829 * typeck2.c (abstract_virtuals_error): Check to see if an error
5830 ocurred, and return a boolean value accordingly.
5831 (build_functional_cast): Adjust accordingly.
5832 * class.c (finish_struct_1): Likewise.
5833 * cvt.c (ocp_convert): Likewise.
5834 * decl.c (cp_finish_decl): Likewise.
5835 (grokparams): Likewise.
5836 (grok_op_properties): Likewise.
5837 (start_function): Likewise.
5838 * init.c (build_new_1): Likewise.
5840 * pt.c (unify): Don't get confused by pointers-to-member functions.
5842 * search.c (build_cplus_new): Robustify.
5844 1999-07-24 Richard Henderson <rth@cygnus.com>
5846 * gxx.gperf (__builtin_va_arg): New.
5847 * parse.y (VA_ARG): New token.
5848 (unary_expr): Recognize it.
5850 Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com)
5852 * g++FAQ.texi: Deleted per Joe Buck's request.
5853 * Makefile.in: Corresponding changes.
5855 1999-07-23 Jason Merrill <jason@yorick.cygnus.com>
5857 * lex.c: Sync with C frontend.
5858 (whitespace_cr): New fn.
5859 (skip_white_space): Use it.
5860 (init_parse): Reorder.
5861 (yyprint): Support CONSTANT.
5862 (pragma_getc, pragma_ungetc): Bring back.
5863 (read_line_number): Change in_system_header directly.
5864 (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
5865 (parse_float): Update to C version.
5866 (yylex): Handle '$' under the letter case.
5867 Remove looking_for_typename handling.
5868 Support hex floating point constants.
5869 Follow C's lead for choosing type of integer constants.
5870 Rearrange stuff to match C frontend.
5871 (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
5872 * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
5874 1999-07-23 Mark Mitchell <mark@codesourcery.com>
5876 * call.c (reference_binding): Tweak.
5877 (mayble_handle_implicit_object): Use direct_reference_binding to
5878 create the right implicit conversion sequence.
5880 1999-07-22 Mark Mitchell <mark@codesourcery.com>
5882 * pt.c (convert_nontype_argument): Don't call decl_constant_value
5883 if we're converting to a reference type.
5885 * call.c (NEED_TEMPORARY_P): New macro.
5886 (standard_conversion): Set it, for derived-to-base conversions.
5887 (reference_related_p): New function.
5888 (reference_compatible_p): Likewise.
5889 (convert_class_to_reference): Likewise.
5890 (direct_reference_binding): Likewise.
5891 (reference_binding): Rework for standards-compliance.
5892 (convert_like): Adjust accordingly.
5893 (maybe_handle_ref_bind): Simplify; the right conversion sequences
5894 are now built up in reference_binding.
5895 (initialize_reference): New function.
5896 * cp-tree.h (ICS_USER_FLAG): Document.
5897 (ICS_THIS_FLAG): Likewise.
5898 (ICS_BAD_FLAG): Likewise.
5899 (NEED_TEMPORARY_P): Likewise.
5900 (cp_lvalue_kind): New type.
5901 (real_lvalue_p): Return it.
5902 * error.c (dump_expr): Provide more accurate representation for
5904 * init.c (expand_default_init): Do not try to perform implicit
5905 conversions for a brace-enclosed initializer.
5906 * search.c (lookup_conversions): Document.
5907 * tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate
5909 (real_lvalue_p): Adjust accordingly.
5910 (lvalue_p): Likewise.
5911 (build_cplus_new): Don't allow the creation of an abstract class.
5912 * typeck.c (convert_for_initialization): Use initialize_reference.
5914 1999-07-21 Gavin Romig-Koch <gavin@cygnus.com>
5916 * lex.c (real_yylex) : Correct the test for overflow when lexing
5919 1999-07-20 Jason Merrill <jason@yorick.cygnus.com>
5921 * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
5922 not DECL_BUILT_IN, to determine if a function is internally declared.
5923 (duplicate_decls): Likewise. Improve handling of builtins.
5924 (push_overloaded_decl): Remove special handling of builtins.
5926 * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
5928 * decl.c (grokdeclarator): Pull out decl_constant_value in
5931 * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
5932 * cp-tree.h, pt.c, semantics.c: Adjust.
5933 * method.c (largest_union_member): Remove.
5935 * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
5937 * lex.c (token_getch, token_put_back): New fns.
5938 (real_yylex): Use them.
5940 * lex.c (lang_init): Generalize.
5941 (lang_init_options): Tell cpplib this is C++.
5942 (nextchar): Remove. Replace uses with put_back.
5943 (skip_white_space): Handle linemode here. Optimize for cpplib.
5944 (extend_token_buffer_to): New fn.
5945 (extend_token_buffer): Use it.
5946 (read_line_number, check_newline): Just deal with tokens.
5947 (real_yylex): More cpplib optimizations. Simplify. Don't produce
5948 EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
5949 * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
5950 * parse.y (PAREN_STAR_PAREN): Remove.
5951 * input.c: Don't use the putback machinery with cpplib.
5952 (sub_getch): Fold back into getch.
5953 (getch): Don't handle linemode here.
5954 (feed_input): Unget any text in the token buffer.
5956 * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
5957 nextyychar, nextyylval): Remove.
5959 1999-07-20 Michael Tiemann <tiemann@holodeck.cygnus.com>
5960 Jason Merrill <jason@yorick.cygnus.com>
5962 * lex.c (indent_level): New variable.
5963 (init_parse): Set cpp_token to CPP_DIRECTIVE.
5964 (consume_string): Make this smart about USE_CPPLIB.
5965 (yyungetc): Use put_back function.
5966 (pragma_getc, pragma_ungetc): Functions deleted.
5967 (check_newline): Rewrite to be intelligent about USE_CPPLIB.
5968 Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
5970 (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
5971 Also, clean up cases where we redundantly set token_buffer[0].
5972 (read_line_number): New fn.
5973 * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
5974 (end_input): Call cpp_pop_buffer if USE_CPPLIB.
5975 (sub_getch): Conditionalize out code that's not appropriate if
5977 (put_back): Rewrite in case USE_CPPLIB is defined.
5978 (input_redirected): Ditto.
5980 Tue Jul 20 11:24:19 1999 Bernd Schmidt <bernds@cygnus.co.uk>
5982 * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
5983 c_global_trees and accessor macros defined in c-common.h.
5984 (cp_tree_index): New enumeration.
5985 (cp_global_trees): Declare new array. Add accessor macros for it, and
5986 delete declarations of tree nodes replaced by it.
5987 (builtin_function): Delete macro, add declaration for new function.
5989 * decl.c: Delete definitions for tree nodes that were replaced by
5990 cp_global_trees and c_global_trees.
5991 (init_decl_processing): Call c_common_nodes_and_builtins; delete code
5992 to generate the common builtins here.
5993 (builtin_function): New function.
5994 * decl2.c (abort_fndecl): Delete declaration.
5995 * except.c (expand_builtin_return_address): Delete declaration.
5996 (builtin_return_address_fndecl): Delete variable.
5997 (const_ptr_type_node): Delete declaration.
5998 * lex.c (cons_up_default_function): Delete declaration of
6000 * parse.y (void_list_node): Delete declaration.
6001 * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
6003 (const_string_type_node): Delete declaration.
6004 * search.c (abort_fndecl): Delete declaration.
6005 * Makefile.in: Update dependencies.
6007 1999-07-19 Mark Mitchell <mark@codesourcery.com>
6009 * pt.c (check_default_tmpl_args): Move test for missing default
6010 arguments here, from ...
6011 (end_template_parm_list): Here.
6013 1999-07-18 Mark Mitchell <mark@codesourcery.com>
6015 * decl.c (lookup_nested_type): Remove.
6016 (pushtag): Don't call it.
6018 Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com)
6020 * Makefile.in (INTERFACE): Bump to 2.
6022 1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
6024 * typeck2.c (my_friendly_abort): Updated URL with bug reporting
6025 instructions to gcc.gnu.org. Removed e-mail address.
6027 1999-07-17 Mark Mitchell <mark@codesourcery.com>
6029 * pt.c (determine_specialization): Tighten error-checking.
6030 (end_template_parm_list): Likewise.
6032 1999-07-14 Mark Mitchell <mark@codesourcery.com>
6034 * pt.c (check_default_tmpl_args): Handle friends defined in the
6035 class just like member functions defined in the class.
6037 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
6038 Jason Merrill <jason@yorick.cygnus.com>
6040 * cp-tree.h (struct lang_decl): Added field for storing sorted
6041 FIELD_DECLs (used in TYPE_DECLs).
6042 (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
6043 (DECL_SORTED_FIELDS): New macro.
6044 * class.c (method_name_cmp): New function.
6045 (finish_struct_methods): Modified to support sorting and searching
6047 (finish_struct_anon): Changed code in inner loop to use ELT rather
6048 than UELT (which required an extra indirection for every reference).
6049 (field_decl_cmp): New function to support sorting FIELD_DECLs.
6050 (finish_struct_1): Sort fields.
6051 * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
6052 (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
6053 Also, switch to using array indexing rather than a changing pointer.
6054 * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
6057 1999-07-09 Jason Merrill <jason@yorick.cygnus.com>
6059 * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
6060 casts in system headers or extern "C" blocks.
6062 * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
6065 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
6067 * decl2.c (write_virtuals): Deleted declaration.
6068 * cp-tree.h (write_virtuals): Deleted extern declaration.
6069 * class.c (finish_struct_1): Removed #if 0'd code that mentions
6071 * semantics.c (begin_class_definition): Rewrite code to not depend
6074 * lex.c (cp_pragma_interface): New function.
6075 (cp_pragma_implementation): Likewise.
6076 (handle_cp_pragma): Call them.
6078 * typeck.c (comptypes): Simplify C code in look_hard.
6080 * xref.c (PALLOC): Use xcalloc, not calloc.
6081 (SALLOC): Use xmalloc, not malloc.
6083 * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
6085 * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
6088 * decl.c (duplicate_decls): If a redeclaration doesn't match the
6089 initial declaration, then don't save the inline info and by all
6090 means don't mark the function as a builtin function.
6092 * decl.c (lookup_name_real): Set NONCLASS to 1 if
6093 CURRENT_CLASS_TYPE is 0.
6095 * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
6098 * ptree.c (print_lang_type): Added vtable-needs-writing.
6100 Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
6102 * decl2.c (mark_vtable_entries): Fix check for rtti offset.
6104 1999-07-06 Gavin Romig-Koch <gavin@cygnus.com>
6106 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
6107 Merged into c-common.
6109 1999-07-05 Dave Brolley <brolley@cygnus.com>
6111 * lex.c (errorcount): Declare it.
6112 (finish_parse): Update errorcount for when using CPPLIB.
6114 1999-07-05 Mark Mitchell <mark@codesourcery.com>
6116 * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
6118 (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
6119 * decl.c (push_class_binding): Use it.
6120 (lookup_name_real): Likewise.
6122 1999-07-02 Gavin Romig-Koch <gavin@cygnus.com>
6124 * cp-tree.h (widest_integer_literal_type_node,
6125 widest_unsigned_literal_type) : New.
6126 * decl.c (widest_integer_literal_type_node,
6127 widest_unsigned_literal_type) : New.
6128 (init_decl_processing): Handle/use the two new types.
6129 * lex.c (real_yylex): Same.
6130 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
6133 1999-07-01 Mark Mitchell <mark@codesourcery.com>
6135 * decl.c (grokdeclarator): Don't give names "for linkage purposes"
6136 to anonymous cv-qualified types.
6138 1999-07-01 Gavin Romig-Koch <gavin@cygnus.com>
6140 * lex.c (real_yylex) : Change integer literal overflow handling to
6143 * lex.c (real_yylex): Improve 'integer constant out of range' messages.
6145 1999-06-28 Richard Henderson <rth@cygnus.com>
6147 * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
6149 1999-06-28 Jason Merrill <jason@yorick.cygnus.com>
6151 * error.c (dump_type_real): Handle TREE_LIST again.
6153 * typeck.c (comp_target_parms): Don't complain about
6154 converting from () to (...) if !flag_strict_prototype.
6156 * decl.c (grokdeclarator): Update the names of all variants when
6159 1999-06-21 Mark Mitchell <mark@codesourcery.com>
6161 * init.c (expand_aggr_vbase_init): Rename to
6162 construct_virtual_bases. Conditionalize construction here,
6164 (emit_base_init): Here.
6166 1999-06-19 Mark Mitchell <mark@codesourcery.com>
6168 * semantics.c (finish_asm_stmt): Apply decay conversions to
6171 * decl.c (expand_static_init): When building an anonymous function
6172 for use with atexit, compute its body before and after entering
6175 * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
6178 1999-06-18 Mark Mitchell <mark@codesourcery.com>
6180 * init.c (expand_aggr_vbase_init): Add flag parameter.
6181 (build_partial_cleanup_for): Remove, inlining into ..
6182 (expand_cleanup_for_base): ... here. Take flag parameter.
6183 (emit_base_init): Pass the in_chrg parameter to
6184 emit_aggr_vbase_init.
6185 (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
6187 1999-06-16 Mark Mitchell <mark@codesourcery.com>
6189 * decl2.c (import_export_decl): Use same_type_p, rather than
6190 relying on pointer-equality for types.
6192 * method.c (do_build_copy_constructor): Simplify.
6194 * call.c (build_method_call): Remove bogus code for two-argument
6196 * init.c (build_new_1): Expand on comment, and remove dead code.
6198 * init.c (expand_cleanup_for_base): New function, split out
6200 (emit_base_init): Here.
6201 (expand_aggr_vbase_init): Use it.
6203 1999-06-15 Mark Mitchell <mark@codesourcery.com>
6205 * cp-tree.h (class_cache_firstobj): Declare.
6206 (maybe_push_cache_obstack): Rename to push_cache_obstack.
6207 * class.c (permanent_obstack): Remove declaration.
6208 (class_cache_firstobj): Make it global.
6209 (add_method): Don't use permanent_obstack directly.
6210 (pushclass): Only free the class_cache_obstack if we know how far
6212 (maybe_push_cache_obstack): Rename to push_cache_obstack.
6213 * decl.c: Remove dead comment.
6214 (saved_scope): Add class_cache_firstobj.
6215 (push_to_top_level): Save it.
6216 (pop_from_top_level): Restore it.
6217 (push_class_level_binding): Use push_cache_obstack, not
6218 maybe_push_cache_obstack.
6219 * search.c (push_class_decls): Likewise.
6221 1999-06-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
6223 * pt.c (tsubst_friend_function): Push into namespace of friend
6224 function before pushdecl'ing it.
6226 1999-06-14 Nathan Sidwell <nathan@acm.org>
6228 * call.c (build_new_op): Remove REF_BIND from all operands.
6230 1999-06-13 Alexandre Oliva <oliva@dcc.unicamp.br>
6232 * init.c (build_new_1): Look up operator delete even if there was
6233 no explicit new placement.
6235 1999-06-08 Nathan Sidwell <nathan@acm.org>
6237 * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
6239 (build_throw): ... here. Call it.
6240 (process_start_catch_block): Call it.
6242 1999-06-07 Mark Mitchell <mark@codesourcery.com>
6244 * search.c (convert_pointer_to_single_level): Reimplement without
6247 1999-06-06 Mark Mitchell <mark@codesourcery.com>
6249 * method.c (is_back_referenceable_type): Back-reference bools when
6252 1999-06-07 Dave Brolley <brolley@cygnus.com>
6254 * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
6255 * input.c (putback_buffer): New structure type.
6256 (putback): Replaces putback_char member.
6257 (putback): Replaces putback_char static variable.
6258 (feed_input): Use putback.
6259 (end_input): Use putback.
6260 (sub_getch): Use putback.
6261 (put_back): Use putback.
6263 1999-06-05 Mark Mitchell <mark@codesourcery.com>
6265 * decl.c (grokdeclarator): Fix typo in last change.
6267 1999-06-04 Jason Merrill <jason@yorick.cygnus.com>
6269 * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
6270 (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
6272 1999-06-04 Nathan Sidwell <nathan@acm.org>
6274 * except.c (build_throw): Check throw expression validity.
6276 1999-06-03 Mark Mitchell <mark@codesourcery.com>
6278 * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
6279 just because flag_signed_bitfields is false.
6281 1999-06-03 Nathan Sidwell <nathan@acm.org>
6283 * semantics.c (begin_class_definition): Update the struct's
6285 * class.c (finish_struct): ... rather than here.
6287 * decl.c (make_typename_type): Don't rely on uninitialized
6290 1999-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6292 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
6294 1999-05-31 Mark Mitchell <mark@codesourcery.com>
6296 * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
6297 and friends rather than messing with current_obstack directly.
6298 (cp_build_qualified_type_real): Rework ARRAY_TYPE
6299 allocation to match practice throughout the rest of the
6302 1999-05-30 Mark Mitchell <mark@codesourcery.com>
6304 * lex.c (make_lang_type): Create TYPE_BINFO for
6305 TEMPLATE_TYPE_PARMs just like for non-template types.
6307 * decl.c (start_decl): Move checks on initialization to ...
6308 (cp_finish_decl): Here. Tidy formatting slightly.
6310 1999-05-28 Mark Mitchell <mark@codesourcery.com>
6312 * decl.c (add_binding): Don't complain about a redeclaration of a
6313 semantically identical typedef in a local scope.
6315 1999-05-28 Nathan Sidwell <nathan@acm.org>
6317 * decl.c (complete_array_type): Allocate off same obstack. Fix
6318 DO_DEFAULT comment to match reality.
6320 * friend.c (make_friend_class): Fix diagnostic typo.
6322 1999-05-28 Mark Mitchell <mark@codesourcery.com>
6324 * decl.c (lookup_namespace_name): Handle getting a
6326 (expand_static_init): Don't call pushdecl for implicitly declared
6327 `atexit' used to register destructors.
6329 1999-05-25 Mark Mitchell <mark@codesourcery.com>
6331 * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
6334 * cp-tree.h (NAMESPACE_LEVEL): Reformat.
6335 (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes
6336 by combining TEMPLATE_INFO and LEVEL into a single union.
6337 (DECL_TEMPLATE_INFO): Reformat.
6338 (DECL_SAVED_TREE): Document.
6339 (DECL_TEMPLATE_INJECT): Remove.
6340 * class.c (finish_struct): Remove code to deal with
6341 DECL_TEMPLATE_INJECT.
6343 * decl.c (maybe_process_template_type_declaration): Handle all new
6344 types in templates uniformly.
6345 * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
6347 * pt.c (lookup_template_class): Inject template instantiations of
6348 forward-declarations.
6349 (instantiate_class_template): Remove code processing
6350 DECL_TEMPLATE_INJECT.
6352 * pt.c (lookup_template_class): Tweak lookup to find member
6355 * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
6357 * semantics.c (finish_asm_stmt): Make strings permanent if they're
6360 1999-05-25 Jason Merrill <jason@yorick.cygnus.com>
6362 * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
6363 parts of pointer to data member types.
6365 1999-05-24 Mark Mitchell <mark@codesourcery.com>
6367 * decl2.c (mark_vtable_entries): Don't make a copy of a function,
6368 and then make it look like `abort'. Just use `abort' instead.
6370 * typeck.c (build_static_cast): Don't allow static_casts that cast
6372 (casts_away_constness_r): New function.
6373 (casts_away_constness): Likewise.
6375 * decl.c (lookup_tag): Remove code no longer needed after
6376 name-lookup improvements.
6377 * decl2.c (handle_class_head): Make error-recovery more robust.
6378 * friend.c (make_friend_class): Reject templated typename types.
6379 * lex.c (is_global): A template parameter isn't global.
6380 * parse.y (class_head): Robustify.
6381 * parse.c: Regenerated.
6383 1999-05-22 Mark Mitchell <mark@codesourcery.com>
6385 * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
6386 INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs.
6388 * cp-tree.h (push_nested_namespace): Declare.
6389 (pop_nested_namespace): Likewise.
6390 * decl.c (push_nested_namespace): New function.
6391 (pop_nested_namespace): Likewise.
6392 * pt.c (instantiate_class_template): Use them.
6394 * tree.c (mapcar): Handle NON_LVALUE_EXPR.
6396 * cp-tree.h (cplus_expand_constant): Declare.
6397 * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
6398 converted from one pointer-to-object type to another.
6399 * expr.c (cplus_expand_constant): Don't make it static.
6400 * typeck.c (build_component_ref): Don't crash when presented with
6401 a component which is a TEMPLATE_DECL.
6402 (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a
6403 cast from a pointer-to-member constant to its own type does not
6404 result in a valid non-type template argument.
6406 1999-05-21 Mark Mitchell <mark@codesourcery.com>
6407 Nathan Sidwell <nathan@acm.org>
6409 * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
6410 * cp-tree.h: Fix typo in documentation on pointers-to-members.
6411 (cp_build_qualified_type): Make it a macro.
6412 (cp_build_qualified_type_real): Declare.
6413 * decl.c (grokdeclarator): Remove misleading comment. Avoid
6414 problem with template parameters and restrict-qualification.
6415 * gxx.gperf: Replace NORID with RID_UNUSED throughout.
6416 * hash.h: Regenerated.
6417 * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
6419 (NORID): Remove definition.
6420 * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
6421 (tsubst): Likewise. Remove special handling for FUNCTION_TYPEs.
6422 (fn_type_unification): Check that the function type resulting from
6423 the deduction is legal.
6424 (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
6425 (unify): Use cp_build_qualified_type_real.
6426 * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
6427 (cp_build_qualified_type): Rename to ...
6428 (cp_build_qualified_type_real): Add additional COMPLAIN parameter
6429 and modify appropriately.
6431 * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
6432 reveal optimization opportunities.
6434 * pt.c (tsubst): Don't issue error messages when we're not
6435 complaining, even if we see a qualified function type.
6436 (check_cv_quals_for_unify): Don't allow a qualified function
6439 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
6441 * class.c (instantiate_type): Downgrade errors for object-dependent
6442 memfn refs to pedwarn.
6444 1999-05-20 Mark Mitchell <mark@codesourcery.com>
6446 * decl.c (grokdeclarator): Don't treat [] as indicating a
6447 zero-sized array in a typedef.
6449 * call.c (build_object_call): Don't look at DECL_NAME for a type.
6450 (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
6451 (typeck.c): Or TYPE_MAIN_VARIANT for a type.
6453 * pt.c (for_each_template_parm): Rework to match documentation.
6454 Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
6456 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
6458 * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
6460 * class.c (finish_base_struct): Allow non-COM bases for COM classes
6461 except at the leftmost position.
6462 (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
6463 Pass the binfo's class, not the most derived, to skip_rtti_stuff.
6464 * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
6466 * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
6467 (build_cplus_new): Make sure that what we return is of the right type.
6469 1999-05-20 Mark Mitchell <mark@codesourcery.com>
6471 * cp-tree.h (make_ptrmem_cst): New function.
6472 * expr.c (cplus_expand_constant): Split out from ...
6473 (cplus_expand_expr): Here. Use cplus_expand_constant.
6474 (init_cplus_expand): Set lang_expand_constant.
6475 * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
6477 * tree.c (make_ptrmem_cst): Define.
6478 * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
6479 * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
6481 1999-05-19 Mark Mitchell <mark@codesourcery.com>
6483 * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
6485 * decl2.c (start_static_storage_duration_function): Fix comment.
6486 (finish_file): Create static storage duration functions lazily.
6488 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
6490 Implement anonymous structs.
6491 * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
6492 * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
6493 * class.c (finish_struct_1): Remove redundant check for anon struct.
6494 * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
6495 (check_tag_decl): Check for anonymous struct here.
6496 * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
6497 * init.c (sort_member_init, emit_base_init): Handle getting fields
6498 as well as names in current_member_init_list.
6499 (perform_member_init): Handle getting an anon aggr.
6500 * method.c (do_build_assign_ref): Don't descend into anon aggrs.
6501 (do_build_copy_constructor): Likewise.
6503 1999-05-19 Mark Mitchell <mark@codesourcery.com>
6505 * tree.c (cp_build_qualified_type): Don't allow qualified function
6508 Wed May 19 02:50:53 1999 Arvind Sankar <arvinds@mit.edu>
6510 * gxxint.texi: Fix typo.
6512 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
6514 * call.c (find_scoped_type, resolve_scope_to_name): Lose.
6515 * class.c (finish_struct_1): Use CLASS_TYPE_P.
6516 * ptree.c (print_lang_type): Likewise.
6517 * typeck.c (build_modify_expr, c_expand_asm_operands): Use
6519 * typeck2.c (digest_init): Likewise.
6521 1999-05-18 Jason Merrill <jason@yorick.cygnus.com>
6523 * call.c (joust): Compare the types of the conv ops, not the
6524 target types of the conversions.
6526 Tue May 18 00:21:34 1999 Zack Weinberg <zack@rabi.phys.columbia.edu>
6528 * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
6531 1999-05-17 Mark Mitchell <mark@codesourcery.com>
6533 * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
6534 * decl.c (grokfndecl): Don't allow inline declarations of friend
6535 template specializations, or friend template specializations with
6537 * pt.c (tsubst): Handle substitution into array types that does
6538 not yield a fixed upper bound, even when not processing a
6540 (tsubst_copy): Deal with the fact that the second operand to a
6541 TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
6542 * search.c (marked_pushdecls_p): Don't descend into
6543 TEMPLATE_TYPE_PARMs and the like.
6544 (unmarked_pushdecls_p): Likewise.
6546 * call.c (build_over_call): Don't throw away
6547 initializations/copies of empty classes; use MODIFY_EXPR and
6548 INIT_EXPR as for non-empty classes.
6549 * class.c (finish_struct_1): Put the padding byte for an empty
6550 class on the TYPE_NONCOPIED_PARTS list for the class.
6552 1999-05-16 Mark Mitchell <mark@codesourcery.com>
6554 * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
6555 indicate a reference to a field that is a qualified name.
6557 1999-05-16 Jason Merrill <jason@yorick.cygnus.com>
6559 * decl2.c (finish_objects): Don't use .?tors.* if we don't have
6560 ASM_OUTPUT_CONSTRUCTOR.
6562 * friend.c (do_friend): Add attrlist arg. Remove support for
6563 getting a non-decl as 'decl'.
6564 * decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or
6566 (grokdeclarator): Adjust.
6567 * cp-tree.h: Adjust.
6569 1999-05-16 Mark Mitchell <mark@codesourcery.com>
6571 * cp-tree.h (permanent_p): New function.
6572 * init.c (build_new_1): Use mapcar, not copy_node, to copy a
6573 possibly complex tree node.
6574 * tree.c (mapcar): Adjust comments, and follow coding standards in
6576 (permanent_p): New function.
6578 1999-05-13 Per Bothner <bothner@cygnus.com>
6580 * class.c (push_lang_context): Turn off DECL_IGNORED_P for
6581 primitive Java types, if we actually see `extern "Java"'.
6583 1999-05-10 18:21 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
6585 * lang-specs.h: Pass -$ to the preprocessor.
6587 1999-05-10 Jason Merrill <jason@yorick.cygnus.com>
6589 * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
6590 Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
6591 (resolve_offset_ref): Don't handle a raw baselink.
6592 * cvt.c (build_expr_type_conversion): Likewise.
6593 * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
6594 convert_for_initialization): Likewise.
6595 * class.c (instantiate_type): Handle seeing a baselink under an
6597 * error.c (dump_expr): Likewise.
6598 * pt.c (for_each_template_parm): Likewise.
6599 (resolve_overloaded_unification): Likewise.
6600 * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
6601 * typeck.c (expr_sizeof): Also complain about other permutations
6602 of overloaded functions.
6604 1999-05-07 Jason Merrill <jason@yorick.cygnus.com>
6606 * init.c (resolve_offset_ref): Don't return a raw method.
6608 * typeck.c (decay_conversion): Don't handle a raw method.
6609 Resolve all OFFSET_REFs.
6610 (get_member_function_from_ptrfunc): 0 is a valid vtable index.
6611 (build_binary_op_nodefault): Handle resolving overloaded fns. Use
6612 same_type_p for pmf bits. Don't use build_binary_op to compare
6613 raw pointers to methods.
6614 (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
6615 to decide when to call resolve_offset_ref.
6616 (build_c_cast, convert_for_initialization): Likewise.
6617 * cvt.c (build_expr_type_conversion): Likewise.
6619 1999-05-06 Nathan Sidwell <nathan@acm.org>
6621 * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
6623 1999-05-05 Mark Mitchell <mark@codesourcery.com>
6625 * decl2.c (start_objects): Don't let static constructors and
6626 destructors get inlined.
6628 * parse.y (nested_name_specifier): Make sure ordinary types are
6629 complete, just like template types.
6630 * parse.c: Regenerated.
6632 * pt.c (check_explicit_specialization): Improve error messages.
6634 1999-05-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
6636 * typeck.c (string_conv_p): Use same_type_p to check whether we
6637 try to convert between char and wchar_t.
6639 1999-05-03 Mark Mitchell <mark@codesourcery.com>
6641 * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
6642 lookup to error_mark_node here.
6643 (lookup_member): Revise documentation. Add comments. Don't set
6644 the TREE_TYPE to error_mark_node here, and don't build up an extra
6645 TREE_LIST for ambiguous lookups.
6646 (setup_class_bindings): Adjust accordingly.
6647 (push_class_decls): Revise out-of-date comments.
6649 * typeck.c (build_const_cast): Tighten checks for legality.
6651 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
6653 * init.c (build_member_call): Lookup names coming from
6654 namespace-scoped LOOKUP_EXPR.
6656 1999-05-03 Jim Blandy <jimb@zwingli.cygnus.com>
6658 * gxxint.texi: Add documentation for 'I'.
6660 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
6662 * tinfo.cc (operator==): Qualify type_info with std::.
6664 1999-05-02 Mark Mitchell <mark@codesourcery.com>
6666 * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy.
6667 (DECL_COMDAT): Remove definition.
6669 1999-05-01 Mark Mitchell <mark@codesourcery.com>
6671 * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
6674 1999-04-30 Mark Mitchell <mark@codesourcery.com>
6676 * class.c (build_vtable): Use build_lang_decl when building
6677 vtables, not just build_decl.
6678 (prepare_fresh_vtable): Likewise.
6679 * decl.c (wrapup_globals_for_namespace): Mark vtables as
6680 DECL_EXTERNAL when calling wrapup_global_declarations.
6681 * decl2.c (priority_info_s): Add initializations_p and
6682 destructions_p members.
6683 (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
6684 when deciding what vtables to write out.
6685 (ssdf_decls): New variable.
6686 (ssdf_decls_used): Likewise.
6687 (start_static_storage_duration_function): Deal with being called
6688 multiple times. Avoid inlining this function.
6689 (generate_inits_for_priority): Deal with reuse of priority map.
6690 (get_priority_info): Clear initializations_p and destructions_p.
6691 (do_static_initialization): Tweak comment.
6692 (do_static_destruction): Likewise. Fix condition on sentries for
6694 (generate_ctor_or_dtor_function): Call all of the static storage
6696 (generate_ctor_or_dtor_function_for_priority): Check
6697 initializations_p and destructions_p to see what priorities need
6698 initialization functions.
6699 (finish_file): Rework to generate multiple static storage duration
6700 functions, rather than just one.
6702 * typeck.c (build_const_cast): Tweak last change to handle
6703 templates correctly.
6705 * typeck.c (build_const_cast): Disallow use of const_cast to
6706 anything but a pointer or reference type.
6708 1999-04-30 Nathan Sidwell <nathan@acm.org>
6710 * decl.c (cp_finish_decl): Don't permit arrays of abstract or
6713 1999-04-29 Mark Mitchell <mark@codesourcery.com>
6715 * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
6716 (finish_file): Indent comments properly.
6718 1999-04-29 Richard Henderson <rth@cygnus.com>
6720 * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
6721 (do_static_destruction): Likewise.
6723 1999-04-29 Nathan Sidwell <nathan@acm.org>
6725 * cp-tree.h (TYPE_NOTHROW_P): New macro.
6726 * decl2.c (delete_sanity): Warn on deleting void *.
6727 * init.c (build_new_1): Use TYPE_NOTHROW_P.
6728 * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
6729 throwing operator new.
6731 1999-04-28 Nathan Sidwell <nathan@acm.org>
6733 * cp-tree.h (build_component_addr): Remove prototype.
6734 * typeck.c (build_component_addr): Make static. Remove MSG
6736 (build_component_addr): Remove MSG parameter, clean up
6738 (build_x_function_call): Use cp_error.
6739 (build_unary_op): Adjust call of build_component_addr.
6741 1999-04-28 Mark Mitchell <mark@codesourcery.com>
6743 * pt.c (tsubst_friend_class): Check for NULL.
6745 Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
6747 * search.c (binfo_for_vtable): Initialize bfvi.var.
6749 1999-04-27 Nathan Sidwell <nathan@acm.org>
6751 * rtti.c (build_x_typeid): Check rtti is enabled.
6753 1999-04-26 Mark Mitchell <mark@codesourcery.com>
6755 * search.c (is_subobject_of_p): Make sure we're looking at the
6758 1999-04-26 Marc Espie <espie@cvs.openbsd.org>
6760 * Make-lang.in (cplib2.ready): Don't depend on phony targets.
6762 1999-04-23 Mark Mitchell <mark@codesourcery.com>
6764 * decl2.c (finish_file): Tweak handling of extern inlines so that
6765 they are not unnecessarily put out.
6767 * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
6768 such as base classes.
6770 1999-04-22 Brendan Kehoe <brendan@cygnus.com>
6772 * tree.c (build_exception_variant): Fix typo: use the chain of U,
6773 not trying V, while cycling through U.
6775 1999-04-22 Mark Mitchell <mark@codesourcery.com>
6777 * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
6778 preserves_first_arg. Enlarge dummy accordingly.
6779 (DECL_TINFO_FN_P): New macro.
6780 (SET_DECL_TINFO_FN_P): Likeiwse.
6781 (DECL_RETURNS_FIRST_ARG): Remove.
6782 (DECL_PRESERVES_THIS): Likewise.
6783 (DECL_INIT_PRIORITY): New macro.
6784 (finish_struct_1): Change prototype.
6785 (cat_namespace_levels): Remove prototype.
6786 (vtable_decl_p): New prototype.
6787 (vtype_decl_p): Likewise.
6788 (sigtable_decl_p): Likewise.
6789 (walk_globals_pred): New typedef.
6790 (walk_globals_fn): Likewise.
6791 (walk_globals): New prototype.
6792 (walk_namespaces_fn): New typedef.
6793 (walk_namespaces): New prototype.
6794 (wrapup_globals_for_namespace): Likewise.
6795 (walk_vtables): Remove prototype.
6796 (walk_sigtables): Likewise.
6797 (instantiate_pending_templates): New prototype.
6798 * class.c (finish_struct_1): Don't return a value.
6799 * decl.h (pending_statics): Remove declaration.
6800 * decl.c (walk_namespaces_r): New function.
6801 (walk_globals_r): Likewise.
6802 (vtable_decl_p): Likewise.
6803 (vtype_decl_p): Likewise.
6804 (sigtable_decl_p): Likewise.
6805 (walk_namespaces): Likewise.
6806 (walk_globals_data): New type.
6807 (walk_globals): New function.
6808 (wrapup_globals_for_namespace): Likewise.
6809 (expand_static_init): Remove assertion. Remove redundancy in
6810 conditional. Don't put static data members in static_aggregates
6812 (finish_function): Remove redundancy in conditional. Don't set
6813 DECL_RETURNS_FIRST_ARG.
6814 (cat_namespace_levels): Remove.
6815 * decl2.c: Include splay-tree.h and varray.h.
6816 (priority_info_s): New structure.
6817 (finish_vtable_vardecl): Change prototype. Adjust for new calling
6819 (prune_vtable_vardecl): Likewise.
6820 (finish_sigtable_vardecl): Likewise.
6821 (setup_initp): Remove.
6824 (start_static_storage_duration_function): New function.
6825 (generate_inits_for_priority): Likewise.
6826 (finish_static_storage_duration_function): Likewise.
6827 (get_priority_info): Likewise.
6828 (do_static_initialization): Likewise.
6829 (do_static_destruction): Likewise.
6830 (do_static_initialization_and_destruction): Likewise.
6831 (generate_ctor_or_dtor_function): Likewise.
6832 (generate_ctor_and_dtor_functions_for_priority): Likewise.
6833 (pending_statics): Make it a varray.
6834 (pending_statics_used): New variable.
6835 (saved_inlines): Make it a varray.
6836 (saved_inlines_used): New variable.
6837 (finish_static_data_member): Change method of updating
6839 (mark_inline_for_output): Remove #if 0'd code. Change method of
6840 updating saved_inlines.
6841 (walk_vtables): Remove.
6842 (walk_sigtables): Likewise.
6843 (import_export_decl): Use DECL_TINFO_FN_P.
6844 (pending_templates): Remove declaration.
6845 (maybe_templates): Likewise.
6846 (static_aggregates_initp): Likewise.
6847 (setup_initp): Likewise.
6848 (finish_objects): Simplify.
6849 (INITIALIZE_P_IDENTIFIER): New macro.
6850 (PRIORITY_IDENTIFIER): New macro.
6851 (SSDF_IDENTIFIER): New macro.
6852 (initialize_p_decl): New variable.
6853 (priority_decl): Likewise.
6854 (ssdf_decl): Likewise.
6855 (priority_info_map): Likewise.
6856 (finish_file): Recode output of static intializers and other
6857 file-scope finalization tasks.
6858 * error.c (OB_END_TEMPLATE_ID): New macro.
6859 (dump_type_real): Use it.
6860 (dump_decl): Likewise.
6861 (dump_function_name): Likewise.
6862 * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
6864 (check_newline): Use walk_globals, not walk_vtables.
6865 * pt.c (pending_tempalte_expansions): Remove.
6866 (set_vardecl_interface_info): Likewise.
6867 (pending_templates): Make static.
6868 (maybe_templates): Likewise.
6869 (instantiate_class_template): Adjust call to finish_struct_1.
6870 (instantiate_pending_templates): New function.
6871 * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
6872 * tree.c (static_aggregates_initp): Remove.
6873 (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
6875 * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
6877 * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
6878 with the RTL code RETURN.
6879 * hash.h: Regenerated.
6880 * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
6881 * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
6882 * parse.c: Regenerated.
6883 * pt.c: Include varray.h. Include rtl.h since varray.h requires
6885 (inline_parm_levels): New variable.
6886 (inline_parm_levels_used): Likewise.
6887 (maybe_begin_member_template_processing): Update them.
6888 (maybe_end_member_template_processing): Use them, rather than
6889 guessing how many levels to pop.
6891 * decl.c (make_typename_type): Tighten error-checking.
6893 1999-04-20 Mark Mitchell <mark@codesourcery.com>
6895 * cp-tree.h (build_binary_op): Remove unneeded parameter.
6896 * class.c (build_vrable_entry_ref): Adjust call to
6898 * decl.c (expand_static_init): Likewise.
6899 (grokdeclarator): Likewise.
6900 (finish_function): Likewise.
6901 * decl2.c (delete_sanity): Likewise.
6902 (do_dtors): Likewise.
6903 (do_ctors): Likewise.
6904 * error.c (dump_type_suffix): Likewise.
6905 * expr.c (cplus_expand_expr): Likewise.
6906 * init.c (resolve_offset_ref): Likewise.
6907 (build_new): Likewise.
6908 (build_new_1): Likewise.
6909 (build_vec_delete_1): Likewise.
6910 (expand_vec_init_catch_clause): Likewise.
6911 (build_delete): Likewise.
6912 * pt.c (tsubst): Likewise.
6913 * rtti.c (synthesize_tinfo_fn): Likewise.
6914 * search.c (expand_upcast_fixups): Likewise.
6915 (expand_direct_vtbls_init): Likewise.
6916 * typeck.c (get_member_function_from_ptrfunc): Likewise.
6917 (build_binary_op_nodefault): Likewise.
6918 (point_int_sum): Likewise.
6919 (pointer_diff): Likewise.
6920 (build_unary_op): Likewise.
6921 (build_modify_expr): Likewise.
6922 (get_delta_difference): Likewise.
6923 (build_ptrmemfunc): Likewise.
6924 (expand_ptrmemfunc_cst): Likewise.
6926 1999-04-20 Jason Merrill <jason@yorick.cygnus.com>
6928 * decl.c (grokfndecl): Always call cplus_decl_attributes.
6929 * decl2.c (grokfield): Pass attrlist to grokdeclarator.
6931 1999-04-19 Mark Mitchell <mark@codesourcery.com>
6933 * cp-tree.h (finish_static_data_member_decl): New function.
6934 * decl2.c (finish_static_data_member_decl): Split out from ...
6936 * pt.c (instantiate_class_template): Use it here instead of
6938 (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
6939 finish_static_data_member_decl will do that. Explicit set
6940 DECL_EXTERNAL to match non-template processing.
6942 1999-04-18 Mark Mitchell <mark@codesourcery.com>
6944 * cp-tree.h (finish_class_definition): Add parameter.
6945 * parse.y (structsp): Use it. Don't call pop_scope here.
6946 * parse.c: Regenerated.
6947 * semantics.c (finish_class_definition): Pop it here.
6949 1999-04-17 Mark Mitchell <mark@codesourcery.com>
6951 * decl.c (xref_tag): Revise handling of nested template
6953 * pt.c (check_explicit_specialization): Tweak handling of friend
6954 templates in template classes.
6955 (tsubst_friend_class): Handle friend declarations for nested
6956 member template classes.
6958 1999-04-16 Mark Mitchell <mark@codesourcery.com>
6960 * class.c (finish_struct): Remove unused variable.
6961 (pushclass): Likewise.
6962 (invalidate_class_lookup_cache): Likewise.
6963 * cp-tree.def (TYPENAME_TYPE): Improve documentation.
6964 * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
6965 doesn't get obliterated.
6966 (make_typename_type): Handle template classes correctly.
6968 * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
6969 (storetags): Declare.
6970 * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
6971 (pushclass): Likewise. Use storetags to install tag declarations,
6973 (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
6974 * decl.c (storetags): Make it global.
6975 (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
6976 implicit typename declaration.
6977 (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG.
6978 * method.c (hack_identifier): Likewise.
6979 * search.c (lookup_member): Likewise.
6981 * decl.c (warn_about_implicit_typename_lookup): New function.
6982 (lookup_name_real): Use it. Rework handling of implicit typename
6985 1999-04-15 Mark Mitchell <mark@codesourcery.com>
6987 * cp-tree.h (lookup_nested_field): Remove.
6988 * class.c (push_nested_class): Handle UNION_TYPEs.
6989 (pop_nested_class): Likewise.
6990 * decl.c (lookup_name_real): Don't call lookup_nested_field.
6991 (start_decl): Use push_nested_class, not just pushclass.
6992 (cp_finish_decl): Use pop_nested_class, not just popclass.
6993 * search.c (lookup_nested_field): Remove.
6995 * cp-tree.h (lang_type): Add documentation.
6996 * decl2.c (handle_class_head): Create template declarations here,
6998 * parse.y (class_head): Return whether or not we entered a new
6999 scope, as well as the type named.
7000 (named_class_head): Likewise.
7001 (named_complex_class_head_sans_basetype): Likewise.
7002 (structsp): Adjust accordingly. Pop scope when required.
7003 * parse.c: Regenerated.
7004 * pt.c (check_default_tmpl_args): Robustify.
7005 (redeclare_class_template): Likewise.
7006 (instantiate_class_template): An instantiation of an
7007 anonymous union is itself an anonymous union.
7008 * semantics.c (begin_class_definition): Don't create template
7011 1999-04-15 Jason Merrill <jason@yorick.cygnus.com>
7013 * parse.y (after_type_declarator_intern): New nonterminal.
7014 (after_type_declarator): Use it.
7015 (direct_after_type_declarator): Likewise. Move above
7016 nonnested_type to fix reduce/reduce conflict resolution.
7017 (declmods): Reducing from just 'attributes' has EMPTY precedence.
7018 * Makefile.in (CONFLICTS): Update.
7020 * decl.c (define_label): Downgrade error for jumping over a
7021 non-POD decl to pedwarn.
7023 1999-04-14 Mark Mitchell <mark@codesourcery.com>
7025 * cp-tree.h (popclass): Change declaration.
7026 (pop_nested_class): Likewise.
7027 (poplevel_class): Remove declaration.
7028 * call.c (convert_default_argument): Pass no arguments to
7030 * class.c (finish_struct_1): Likewise.
7031 (finish_struct): Likewise.
7032 (popclass): Remove argument. Simplify code accordingly.
7033 (pop_nested_class): Likewise.
7034 * decl.c (poplevel_class): Declare it here, and make it static.
7035 (poplevel): Handle class scopes.
7036 (poplevel_class): Don't take an rgument. Simplify.
7037 (pop_everything): Pass no arguments to pop_nested_class.
7038 (cp_finish_decl): Pass no arguments to popclass.
7039 (grokdeclarator): Pass no arguments to pop_nested_class.
7040 (finish_function): Likewise.
7041 * decl2.c (grokfield): Likewise.
7042 (pop_scope): Pass no arguments to popclass.
7043 * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
7044 * pt.c (instantiate_class_template): Move call to pushclass, and
7045 document. Pass no arguments to popclass.
7046 (regenerate_decl_from_template): Likewise.
7048 1999-04-14 Jason Merrill <jason@yorick.cygnus.com>
7050 * typeck.c (build_unary_op): Handle taking the address of a unique
7051 bound non-static member function.
7053 1999-04-13 Martin von Loewis <loewis@informatik.hu-berlin.de>
7055 * lang-options.h (-Wdeprecated): New flag.
7056 * decl2.c (warn_deprecated): New flag.
7057 (lang_decode_option): Deprecated this-is-variable,
7058 external-templates, alt-external-templates.
7059 Support -Wdeprecated.
7060 * errfn.c (cp_deprecated): New function.
7062 1999-04-13 Jason Merrill <jason@yorick.cygnus.com>
7064 * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
7065 of the decls themselves.
7067 * pt.c (tsubst_function_type): Copy attributes over.
7069 * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority
7071 * cp-tree.h: Add prototype.
7072 * decl.c (init_decl_processing): Set valid_lang_attribute.
7074 1999-04-13 Mark Mitchell <mark@codesourcery.com>
7076 * class.c (finish_struct_1): Look at the const-ness of the field's
7077 type, not the TREE_READONLY-ness of the declaration.
7078 * method.c (synthesize_method): Likewise.
7079 * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
7080 creating new declarations.
7082 1999-04-13 Mike Stump <mrs@wrs.com>
7084 * decl2.c (import_export_decl): Because vtables always reference
7085 virtual functions, even if they are inlined, don't allow
7086 -fno-implement-inlines to not emit them, instead, emit them with
7088 * decl.c (start_function): Likewise.
7090 1999-04-12 Jason Merrill <jason@yorick.cygnus.com>
7092 * cp-tree.h (struct lang_type): Add com_interface.
7093 (CLASSTYPE_COM_INTERFACE): New macro.
7094 * class.c (set_rtti_entry): COM interface classes have no RTTI
7095 entries in their vtables; adjust.
7096 (add_virtual_function, finish_base_struct, skip_rtti_stuff,
7097 modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
7098 finish_struct_1): Likewise.
7099 * decl2.c (mark_vtable_entries): Likewise.
7100 * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
7101 * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
7102 expand_upcast_fixups): Likewise.
7103 * tree.c (debug_binfo): Likewise.
7105 * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
7106 * typeck.c (comptypes): If we get it, ignore attributes.
7107 * class.c (instantiate_type): Use BASELINK_P. Change complain
7108 parameter to flags; 2 means ignore attributes.
7109 * call.c (build_op_delete_call): Pass it.
7111 * decl.c (xref_tag): Only complain once about using a typedef-name
7112 with 'struct'. Downgrade to pedwarn.
7114 * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
7116 * parse.y (absdcl_intern): New nonterminal.
7117 (absdcl, direct_abstract_declarator): Use it.
7119 * pt.c (lookup_template_class): Look through implict typename.
7121 1999-04-11 Mark Mitchell <mark@codesourcery.com>
7123 * friend.c (add_friend): Deal gracefully with error_mark_node.
7124 * method.c (build_overload_value): Handle pointers-to-members as
7125 template parameters.
7127 * decl.c (push_binding): Fix typo in comment.
7129 1999-04-10 Mark Mitchell <mark@codesourcery.com>
7131 * error.c (dump_type_real): If a typename is a template-id, put
7132 out the template arguments.
7133 (dump_expr): Handle TEMPLATE_ID_EXPR.
7134 * pt.c (lookup_template_class): Now that full arguments are
7135 available everywhere, remove code that tried to guess them.
7137 1999-04-09 Mark Mitchell <mark@codesourcery.com>
7139 * decl.c (make_typename_type): Complain if we don't find a type
7140 when trying to make a typename type for a non-template type.
7142 1999-04-09 Jason Merrill <jason@yorick.cygnus.com>
7144 * decl.c (start_decl): Pass attributes to grokdeclarator.
7145 (grokdeclarator): Handle attributes on constructor-syntax
7148 1999-04-08 Mark Mitchell <mark@codesourcery.com>
7150 * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
7153 * search.c (template_self_reference_p): Tweak.
7155 1999-04-07 Mark Mitchell <mark@codesourcery.com>
7157 * init.c (build_offset_ref): Don't build yet another weird data
7158 structure to describe overloaded functions.
7160 1999-04-06 Mark Mitchell <mark@codesourcery.com>
7162 * cp-tree.h (BASELINK_P): New macro.
7163 (SET_BASELINK_P): Likewise.
7164 * init.c (build_member_call): Remove needless assignment in if
7166 * search.c (lookup_field_r): Fix handling when we are looking
7167 specifically for a type; these are not hidden by functions and
7169 (lookup_member): Use SET_BASELINK_P.
7170 * tree.c (is_overloaded_fn): Use BASELINK_P.
7171 (really_overloaed_fn): Likewise.
7172 (get_first_fn): Likewise.
7174 1999-04-05 Mark Mitchell <mark@codesourcery.com>
7176 * decl.c (lookup_name_current_level): Tweak, and improve
7179 * class.c (maybe_fixup_vptrs): Remove declaration.
7180 (build_class_init_list): Likewise.
7181 * decl.c (pushdecl_class_level): Call check_template_shadow here
7183 (push_class_level_binding): ... not here.
7184 * search.c (dfs_push_type_decls): Only avoid
7185 template-self-reference TYPE_DECLs if they are from base classes.
7187 1999-04-04 Mark Mitchell <mark@codesourcery.com>
7189 * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
7192 1999-04-03 Jason Merrill <jason@yorick.cygnus.com>
7194 * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
7195 (finish_struct_1): Don't call build_class_init_list.
7197 1999-04-02 Mark Mitchell <mark@codesourcery.com>
7199 * tinfo.h (__class_type_info): Fix illegal declaration.
7201 * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
7202 * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
7203 (IDENTIFIER_CLASS_VALUE): Improve documentation.
7204 (is_properly_derived_from): Declare.
7205 (invalidate_class_lookup_cache): Likewise.
7206 (maybe_maybe_note_name_used_in_class): Likewise.
7207 (note_name_declared_in_class): Likewise.
7208 (push_using_decl): Remove duplicate declaration.
7209 (id_in_current_class): Remove declaration.
7210 (push_class_binding): Change prototype.
7211 (clear_identitifer_class_values): Declare.
7212 * call.c (is_properly_derived_from): Make it global.
7213 (build_new_function_call): Be careful about updating candidates.
7214 (build_new_method_call): Handle COMPONENT_REFs. Don't crash when
7215 asked to make illegal calls.
7216 * class.c: Include splay-tree.h.
7217 (class_stack_node): Add names_used slot.
7218 (check_member_decl_is_same_in_complete_scope): Remove.
7219 (add_method): Fix comment. Push the declaration into class
7221 (finish_struct_1): When popping the class, pop the bindings too.
7222 Remove check for data member/function member conflict.
7223 (finish_struct): Remove calls to
7224 check_member_decl_is_same_in_complete_scope. Change calls to
7226 (pushclass): Clear names_used in the class stack entry.
7227 Use invalidate_class_lookup_cache to remove cached entries, rather
7228 than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE
7229 before entering a new class. Remove dead code. Don't mess with
7230 current_function_decl when pushing declarations.
7231 (invalidate_class_lookup_cache): New function, split out from ...
7232 (popclass): Here. Clean up names_used on our way out.
7233 (instantiate_type): Adjust.
7234 (build_self_reference): Don't push the declaration here.
7235 (maybe_note_name_used_in_class): New function.
7236 (note_name_declared_in_class): Likewise.
7237 * decl.c (add_binding): Change prototype.
7238 (find_class_binding_level): New function.
7239 (innermost_nonclass_level): Likewise.
7240 (current_binding_level): Update documentation.
7241 (inner_binding_level): Remove. Replace with current_binding_level
7243 (push_binding_level): Remove special handling of
7244 class_binding_level.
7245 (pop_binding_level): Likewise. Use find_class_binding_level.
7246 (suspend_binding_level): Likewise.
7247 (global_bindings_p): Use innermost_nonclass_level.
7248 (toplevel_bindings_p): Likewise.
7249 (namespace_bindings_p): Likewise.
7250 (pseudo_global_level_p): Likewise.
7251 (push_binding): Clear INHERITED_VALUE_BINDING_P.
7252 (add_binding): Check for illegal multiple declarations. Return a
7253 value indicating whether or not the new binding was legal.
7254 (push_local_binding): Skip over class binding levels. Check
7255 return value from add_binding.
7256 (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call
7257 note_name_declared_in_class.
7258 (pushlevel_class): Remove "fake out the rest of the compiler"
7260 (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
7261 (clear_identifier_class_values): New function.
7262 (pop_from_top_level): Use it.
7263 (pop_everything): Tweak.
7264 (maybe_process_template_type_declaration): Don't push the
7265 declaration for the template here.
7266 (pushtag): Don't push tag declarations into class scope here.
7267 (pushdecl): Apply DeMorgan's law for readability.
7268 (pushdecl_class_level): Remove special-case code for
7269 TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions.
7270 (push_class_level_bindng): Deal with inherited bindings.
7271 (lookup_name_real): Remove special-case code for
7272 TYPE_BEING_DEFINED, and some implicit typename magic.
7273 (grokdeclarator): Handle COMPONENT_REF for a template function.
7274 (build_enumerator): Don't call pushdecl_class_level here.
7275 (id_in_current_class): Remove.
7276 * decl2.c (grokfield): Don't call pushdecl_class_level or
7277 check_template_shadow.
7278 * errfn.c (cp_file_of): Don't declare.
7279 (cp_line_of): Likewise.
7280 * error.c (dump_decl): Handle an OVERLOAD.
7281 (cp_file_of): Likewise.
7282 (cp_line_of): Likewise.
7283 * init.c (build_member_call): Handle a COMPONENT_REF.
7284 * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
7285 pushdecl_class_level.
7286 * method.c (hack_identifier): Build COMPONENT_REFs for references
7287 to member templates as well as member functions. Remove dead
7289 * parse.y (left_curly): Remove.
7290 (nonnested_type): Call maybe_note_name_used_in_class, not
7291 pushdecl_class_level.
7292 * parse.c: Regenerated.
7293 (nested_name_specifier_1): Likewise.
7294 * pt.c (check_explicit_specialization): Adjust, for robustness.
7295 (check_template_shadow): Handle OVERLOADs.
7296 (build_template_decl): Set DECL_CONSTRUCTOR_P on the
7297 TEMPLATE_DECL, if appropriate.
7298 * search.c (envelope_add_decl): Remove.
7299 (dfs_pushdecls): Likewise.
7300 (dfs_compress_decls): Likewise.
7301 (dfs_push_decls): New function.
7302 (dfs_push_type_decls): Likewise.
7303 (setup_class_bindings): Likewise.
7304 (template_self_reference_p): Likewise.
7305 (lookup_field_r): Use it.
7306 (looup_member): Remove old comment. Deal with ambiguity.
7307 (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
7308 and remove envelope processing.
7309 * semantics.c (begin_class_definition): Let pushclass push
7310 declarations for base classes.
7311 (finish_member_declaration): Push declarations into class scope.
7312 * typeck.c (build_component_ref): Just put an OVERLOAD into the
7313 COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
7314 (build_x_function_call): Deal with OVERLOAD. Handle template-ids.
7315 * Makefile.in (class.o): Depend on splay-tree.h.
7317 Wed Mar 31 11:30:43 1999 Nathan Sidwell <nathan@acm.org>
7319 * cvt.c (convert_pointer_to_real): Use same_type_p.
7320 * typeck.c (comp_target_types): Use same_type_p.
7322 1999-03-31 Jason Merrill <jason@yorick.cygnus.com>
7324 * semantics.c (begin_inline_definitions,
7325 finish_inline_definitions): Rename from finish_default_args and
7326 begin_inline_definitions, respectively, to something that isn't a
7328 * parse.y (structsp): Adjust.
7330 * tree.c (hash_tree_cons): Remove obsolete via_* parms.
7331 (list_hash_lookup): Likewise.
7332 (hash_tree_chain): Adjust.
7333 * pt.c (tsubst): Adjust.
7334 (tsubst_arg_types): Use plain hash_tree_cons.
7335 * cp-tree.h (hash_tree_cons_simple): Lose.
7336 * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
7338 Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7340 * Makefile.in (hash.h): Generate using gperf language 'C', not
7341 'KR-C', so gperf uses the `const' keyword on strings.
7343 * gxx.gperf (resword): Const-ify a char*.
7345 1999-03-30 Jason Merrill <jason@yorick.cygnus.com>
7347 * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
7348 CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
7349 CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
7350 CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
7351 CLASSTYPE_BINFO_AS_LIST): Remove cruft.
7352 * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
7355 1999-03-29 Jason Merrill <jason@yorick.cygnus.com>
7357 * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
7359 1999-03-28 Jason Merrill <jason@yorick.cygnus.com>
7361 * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
7363 1999-03-27 Mark Mitchell <mark@codesourcery.com>
7365 * cp-tree.h (add_friend): Declare.
7366 (add_friends): Likewise.
7367 * friend.c (add_friend): Make it global. Don't add to
7368 DECL_BEFRIENDING_CLASSES if the befriending class is a template.
7369 (add_friends): Make it global.
7370 (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
7371 befriending class is a template.
7372 * parse.y (component_decl_1): Fix typo in comment.
7373 * parse.c: Regenerated.
7374 * pt.c (instantiate_class_template): Use add_friend and
7375 add_friends rather that duplicating some of their functionality
7378 1999-03-27 Jason Merrill <jason@yorick.cygnus.com>
7380 * call.c (build_field_call): Unify 'this' and non-'this' cases.
7382 * typeck.c (build_indirect_ref): Check for 'this' sooner.
7384 Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7386 * call.c (op_error): Const-ify a char*.
7387 (add_candidate, source_type, add_warning): Add static prototype.
7388 (print_z_candidates): Const-ify a char*.
7390 * class.c (resolve_address_of_overloaded_function,
7391 fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
7392 (get_vtable_name, finish_struct_1): Const-ify a char*.
7394 * cvt.c (convert_to_reference): Likewise.
7396 * decl.c (redeclaration_error_message, record_builtin_type,
7397 record_unknown_type, member_function_or_else, bad_specifiers):
7399 (find_binding, select_decl, unqualified_namespace_lookup,
7400 lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
7401 Add static prototype.
7402 (warn_extern_redeclared_static, duplicate_decls, pushdecl,
7403 implicitly_declare, record_builtin_java_type, define_function,
7404 grok_op_properties, tag_name): Const-ify a char*.
7406 * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
7407 (define_function, finish_builtin_type): Const-ify a char*.
7408 (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
7409 cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
7410 (file_name_nondirectory): Const-ify a char*.
7411 (init_filename_times): Don't prototype.
7412 (compiler_error): Prototype.
7413 (yyerror, init_repo): Const-ify a char*.
7414 (build_srcloc): Don't prototype.
7415 (build_x_indirect_ref, build_indirect_ref, build_component_addr):
7417 (warn_for_assignment): Don't prototype.
7418 (convert_for_initialization, readonly_error, check_for_new_type,
7419 GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
7422 * decl2.c (acceptable_java_type, output_vtable_inherit,
7423 setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
7424 merge_functions, decl_namespace, validate_nonmember_using_decl,
7425 do_nonmember_using_decl): Add static prototype.
7426 (lang_f_options): Const-ify a char*.
7427 (finish_builtin_type): Likewise.
7428 (add_function, arg_assoc_namespace, arg_assoc_class): Add static
7431 * errfn.c: Include cp-tree.h.
7432 (cp_thing): Add static prototype.
7433 (compiler_error): Don't protoptype.
7434 (cp_compiler_error): Cast `compiler_error' to `errorfn' before
7435 passing it to `cp_thing'.
7437 * error.c (interesting_scope_p): Add static prototype.
7439 * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
7442 * init.c (compiler_error): Don't prototype.
7443 (member_init_ok_or_else): Const-ify a char*.
7444 (build_java_class_ref): Add static prototype.
7446 * lex.c (compiler_error): Don't prototype.
7447 (get_time_identifier, interface_strcmp, extend_token_buffer,
7448 handle_cp_pragma): Const-ify a char*.
7449 (is_global, init_filename_times): Add static prototype.
7450 (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
7451 (compiler_error): Change from fixed args to variable args.
7452 (yyerror): Const-ify a char*.
7454 * parse.y (cond_stmt_keyword): Const-ify a char*.
7455 (parse_decl): Add static prototype.
7457 * pt.c (template_args_equal, print_template_context): Likewise.
7458 (print_candidates, check_default_tmpl_args): Const-ify a char*.
7459 (instantiate_class_template): Likewise.
7461 * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
7463 * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
7464 expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
7466 * search.c (lookup_field_info, lookup_member): Likewise.
7467 (lookup_member): Cast the first argument of `bzero' to a PTR.
7469 * sig.c (compiler_error): Don't prototype.
7470 (build_signature_pointer_or_reference_nam): Const-ify a char*.
7471 (get_sigtable_name, build_member_function_pointer): Likewise.
7473 * tree.c (compiler_error): Don't prototype.
7474 (no_linkage_helper, build_srcloc): Add static prototype.
7475 (build_vbase_pointer_fields): Const-ify a char*.
7476 (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
7478 * typeck.c (compiler_error): Don't prototype.
7479 (convert_for_assignment): Const-ify a char*.
7480 (comp_cv_target_types): Add static prototype.
7481 (build_x_indirect_ref, build_indirect_ref, convert_arguments,
7482 build_component_addr, build_unary_op, convert_for_initialization):
7485 * typeck2.c (ack): Add static prototype and change from fixed args
7487 (readonly_error, check_for_new_type): Const-ify a char*.
7489 * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
7490 fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
7491 (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'.
7492 (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
7493 gen_assign, GNU_xref_member): Const-ify a char*.
7495 1999-03-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
7497 * gxxint.texi: Remove old discussion on copying virtual bases.
7499 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
7501 * Make-lang.in: Remove all references to g++.o/g++.c.
7502 Link g++ from gcc.o.
7504 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
7506 * decl2.c (comdat_linkage): Treat vtables like functions.
7508 1999-03-25 Mark Mitchell <mark@codesourcery.com>
7510 * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
7512 1999-03-25 Nathan Sidwell <nathan@acm.org>
7514 * decl.c (init_decl_processing): Add `signed' type as a synonym
7517 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
7519 * typeck.c (common_type): Handle cv-qual unification for pointers
7522 * decl.c (unqualified_namespace_lookup): Return error_mark_node
7524 (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
7525 * lex.c (do_identifier): If we got error_mark_node, call
7528 1999-03-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
7530 * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
7533 1999-03-24 Jason Merrill <jason@yorick.cygnus.com>
7535 * decl.c (lookup_name_real): Do nested field lookup regardless of
7538 1999-03-24 Mark Mitchell <mark@codesourcery.com>
7540 * cp-tree.h (lang_type): Remove has_assignment and
7541 has_real_assignment. Add befriending_classes.
7542 (TYPE_HAS_ASSIGNMENT): Remove.
7543 (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
7544 (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
7545 (lang_decl): Document.
7546 (DECL_BEFRIENDING_CLASSES): New macro.
7547 (FRIEND_NAME): Move declaration to more obvious location.
7548 (FRIEND_DECLS): Likewise.
7549 * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
7550 * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
7551 (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
7552 (grok_op_properties): Likewise.
7553 * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
7554 (add_friend): Likewise. Don't do weird things with assignment
7555 operators. Update DECL_BEFRIENDING_CLASSES.
7556 (add_friends): Don't do weird things with assignment operators.
7557 (make_friend_class): Likewise. Update
7558 CLASSTYPE_BEFRIENDING_CLASSES.
7559 * pt.c (instantiate_class_template): Don't set
7560 TYPE_HAS_ASSIGNMENT.
7561 (tsubst_copy): Substitute the TREE_TYPE for more unary
7563 * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
7564 * search.c (protected_accessible_p): New function.
7565 (friend_accessible_p): Likewise.
7566 (accessible_p): Use them.
7568 1999-03-23 Mark Mitchell <mark@codesourcery.com>
7570 * pt.c (convert_nontype_argument): Don't create things that aren't
7571 PTRMEM_CSTs when applying a qualification conversion to a
7574 1999-03-23 Mark Mitchell <mark@codesourcery.com>
7576 * Makefile.in (OBJS): Don't mention hash.o.
7577 (OBJDEPS): Likewise.
7579 1999-03-23 Jason Merrill <jason@yorick.cygnus.com>
7581 * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
7582 * decl.c (expand_static_init): Make sure we don't add any after
7585 * decl.c (cp_finish_decl): Move intelligence about handling
7586 DECL_COMDAT for variables from here...
7587 * decl2.c (comdat_linkage): ...to here.
7588 (maybe_make_one_only): Tweak.
7589 (import_export_decl): Call comdat_linkage for variables, too.
7590 (finish_file): Handle template statics properly.
7592 1999-03-22 Mark Mitchell <mark@codesourcery.com>
7594 * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
7595 Document internals of pointer-to-member-functions.
7596 (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
7597 (PFN_FROM_PTRMEMFUNC): Likewise.
7598 (build_type_conversion): Remove unused parameter.
7599 (build_ptrmemfunc1): Declare.
7600 (expand_ptrmemfunc_cst): New function.
7601 (delta2_from_ptrmemfunc): Likewise.
7602 (pfn_from_ptrmemfunc): Likewise.
7603 * cvt.c (cp_convert_to_pointer): Remove unused parameter to
7604 build_type_conversion. Use TYPE_PTRMEM_P for readability.
7605 (convert_to_reference): Remove unused parameter to
7606 build_type_conversion.
7607 (ocp_convert): Likewise.
7608 (build_user_type_conversion): Likewise.
7609 * error.c (dump_expr): Handle NULL pointer-to-member functions.
7610 * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
7611 * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
7612 open when handling pointer-to-member functions.
7613 * pt.c (convert_nontype_argument): Clean up error messages. Be
7614 more stringent with pointers-to-members.
7615 * typeck.c (build_ptrmemfunc1): Don't declare. Make it global.
7616 (build_unary_op): Tidy ever-so-slightly.
7617 (build_conditional_expr): Remove extra parameter to
7618 build_type_conversion.
7619 (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
7621 (expand_ptrmemfunc_cst): Define.
7622 (delta2_from_ptrmemfunc): Likewise.
7623 (pfn_from_ptrmemfunc): Likewise.
7625 1999-03-19 Mark Mitchell <mark@codesourcery.com>
7627 * init.c (build_member_call): Handle template-id expressions
7629 * typeck.c (build_x_function_call): Likewise.
7631 1999-03-19 Chip Salzenberg <chip@perlsupport.com>
7633 * friend.c (make_friend_class): Avoid core dump when
7634 not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
7636 1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
7638 * decl.c (start_function): Suppress normal linkage heuristics
7639 for #pragma interface under MULTIPLE_SYMBOL_SPACES.
7641 1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br>
7643 * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
7644 ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
7646 1999-03-17 Martin von Löwis <loewis@informatik.hu-berlin.de>
7648 * parse.y (named_complex_class_head_sans_basetype):
7649 Do not push a scope for error_mark_node.
7650 (maybe_base_class_list): Likewise.
7652 * decl.c (start_decl): Check for error_mark_node as a type.
7653 Detected by g++.brendan/array-refs.C.
7654 (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C.
7655 (maybe_build_cleanup_1): Likewise. Detected by
7656 g++.jason/incomplete1.C.
7658 * tree.c (build_dummy_object): Use void_zero_node instead of the
7660 (is_dummy_object): Check for such a node.
7661 Detected by g++.bob/inherit1.C
7663 1999-03-16 Jason Merrill <jason@yorick.cygnus.com>
7665 * method.c (old_backref_index): Split out...
7666 (flush_repeats): From here. Rename back from try_old_backref.
7667 (build_mangled_name): Put back some old-style repeat handling.
7669 Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7671 * lex.c: Don't include setjmp.h.
7672 (parse_float): New static function.
7673 (pf_args): New struct.
7674 (real_yylex): Use them in call to `do_float_handler'.
7676 1999-03-15 Mark Mitchell <mark@markmitchell.com>
7678 * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
7679 * tree.c (layout_basetypes): Not here.
7680 * search.c (dfs_search): Remove; no longer used.
7682 1999-03-12 Mark Mitchell <mark@markmitchell.com>
7684 * decl2.c (validate_nonmember_using_decl): Issue sensible
7685 error-messages on bogus qualifiers.
7687 1999-03-14 Jason Merrill <jason@yorick.cygnus.com>
7689 * call.c (add_function_candidate): Fix uninitialized variable.
7691 * Makefile.in (search.o): Add dependency on varray.h.
7693 1999-03-13 Jason Merrill <jason@yorick.cygnus.com>
7695 * decl.c (duplicate_decls): Use same_type_p.
7696 * method.c (try_old_backref): Renamed from flush_repeats. Use
7697 same_type_p. Don't try to handle repeats. Return success.
7698 (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support
7699 calls from old-style code, too.
7700 (check_ktype): Use same_type_p.
7701 (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT.
7702 (build_qualified_name): Simplify logic.
7703 (process_overload_item): Strip typedefs and quals at the top.
7704 (build_mangled_name_for_type_with_Gcode): Remove call to
7705 type_canonical_variant.
7706 (build_mangled_name): Likewise. Remove support for old-style
7707 repeats, which have been disabled since 2.7.2. Don't mess with
7709 (build_decl_overload_real): Don't mess with TREE_USED.
7711 1999-03-13 Nathan Sidwell <nathan@acm.org>
7713 * error.c (cp_printers): Add 'F' escape character.
7714 (dump_type_real): Remove TREE_LIST (fnargs) printing.
7715 Functionality moved to dump_parameters.
7716 (dump_type_suffix): Use dump_parameters and dump_exception_spec.
7717 (dump_function_decl): Extend meaning of V parameter. Use
7718 dump_parameters and dump_exception_spec.
7719 (dump_parameters): New static function.
7720 (dump_exception_spec): New static function.
7721 (fndecl_as_string): Change argument semantics. Use
7722 dump_function_decl directly.
7724 * sig.c (build_signature_table_constructor): Use cp_error.
7726 1999-03-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
7728 * semantics.c (finish_switch_cond): Handle error cases gracefully.
7729 Detected by g++.law/enum5.C.
7731 * typeck.c (build_modify_expr): Check for errors after resolving
7732 offsets. Detected by g++.brendan/static1.C.
7734 * decl.c (complete_array_type): Ignore initial_value if it is an
7735 error. Detected by g++.benjamin/17930.C.
7737 * typeck2.c (process_init_constructor): Return error if one argument
7738 is in error. Detected by g++.benjamin/13478.C.
7740 1999-03-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
7742 * decl.c (select_decl): Allow class templates when we need types.
7743 * decl2.c (ambiguous_decl): Likewise.
7745 1999-03-12 Mark Mitchell <mark@markmitchell.com>
7747 * lex.c (do_identifier): Correct call to enforce_access.
7748 * search.c (accessible_p): Tweak comment.
7750 1999-03-10 Mark Mitchell <mark@markmitchell.com>
7752 * semantics.c (begin_class_definition): Call build_self_reference.
7753 (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
7755 * search.c (assert_canonical_unmarked): Fix typo in prototype.
7757 * search.c (dfs_canonical_queue): New function.
7758 (dfs_assert_unmarked_p): Likewise.
7759 (assert_canonical_unmarked): Likewise.
7760 (access_in_type): Use it.
7761 (accessible_p): Likewise. Walk the whole tree when umarking.
7763 * sig.c (build_signature_table_constructor): Use accessible_p
7764 instead of compute_access.
7766 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
7768 * call.c (add_builtin_candidates): Handle overloaded conversion ops.
7770 1999-03-09 Mark Mitchell <mark@markmitchell.com>
7772 * cp-tree.h (flag_access_control): Declare.
7773 (TREE_VIA_PPUBLIC): Document.
7774 (DECL_NONSTATIC_MEMBER_P): New macro.
7775 (enforce_access): Return an indication of whether or not access
7777 (build_self_reference): Change prototype.
7778 (compute_access): Replace with ...
7779 (accessible_p): New function.
7780 (dfs_walk): Change prototype.
7781 (dfs_unmark): Likewise.
7782 (markedp): Likewise.
7783 * call.c (enforce_access): Use accessible_p.
7784 * class.c (build_self_reference): Insert the declaration into the
7785 list of members for this type, and make it public.
7786 * decl.c (xref_basetypes): Avoid ill-timed recursion.
7787 * init.c (build_offset_ref): Use lookup_member, not three separate
7788 name-lookups. Call enforce_access rather than checking for
7789 illegal accesses here.
7790 (resolve_offset_ref): Likewise.
7791 * lex.c (do_identifier): Likewise.
7792 * method.c (hack_identifier): Likewise.
7793 * parse.y (self_reference): Remove.
7794 (opt_component_decl_list): Don't use it.
7795 * parse.c: Regenerated.
7796 * pt.c (print_candidates): Generalize to handle lists of
7797 overloaded functions.
7798 (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
7800 (get_template_base): Use new calling convention for dfs_walk.
7801 * search.c: Include varray.h. Add prototypes.
7802 (dfs_walk): Accept a data pointer to pass to the work functions.
7803 All callers changed. All work functions changed.
7804 (breadth_first_search): Rename to bfs_walk, and make consistent
7806 (dfs_walk_real): New function.
7807 (canonical_binfo): New function.
7808 (context_for_name_lookup): Likewise.
7809 (shared_marked_p): Likewise.
7810 (shared_unmarked_p): Likewise.
7811 (lokup_field_queue_p): Likewise.
7812 (lookup_field_r): Generalize to handle both functions and fields.
7813 (lookup_field): Just call lookup_member.
7814 (lookup_fnfields): Likewise.
7815 (lookup_member): Move body of lookup_field here and generalize.
7816 (dfs_accessible_queue_p): Likewise.
7817 (dfs_accessible_p): Likewise.
7818 (dfs_access_in_type): Likewise.
7819 (access_in_type): Likewise.
7820 (compute_access): Remove, and replace with ...
7821 (accessible_p): New function.
7822 (vbase_types): Remove.
7823 (vbase_decl_ptr_intermediate): Likewise.
7824 (vbase_decl_ptr): Likewise.
7825 (vbase_init_result): Likewise.
7826 (closed_envelopes): Likewise.
7827 (bvtable): Likewise.
7829 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
7831 * call.c (add_function_candidate): Check for proper number of args
7832 before checking the validity of those args.
7834 1999-03-06 Jason Merrill <jason@yorick.cygnus.com>
7836 * cp-tree.h (struct lang_type): Add anon_union field.
7837 (ANON_UNION_TYPE_P): Use it instead of examining type.
7838 (SET_ANON_UNION_TYPE_P): New macro.
7839 * decl.c (check_tag_decl): Use it.
7841 * search.c (compute_access): Handle non-type contexts earlier, and
7844 * tree.c (build_exception_variant): Use copy_to_permanent.
7846 * decl2.c (setup_initp): Give statics with no priority the default
7848 (do_dtors, do_ctors, finish_file): Remove special handling of
7849 non-prioritized statics.
7851 1999-03-05 Mark Mitchell <mark@markmitchell.com>
7853 * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
7854 * decl.c (make_typename_type): Don't issue an error if an
7855 immediate lookup fails; it migt be resolved later.
7856 * friend.c (is_friend): Add comment.
7857 * search.c (breadth_first_search): Add POSTFN and DATA
7858 parameters. Tidy. All callers changed.
7859 (lookup_field_queue_p): New function.
7860 (lookup_field_r): Likewise.
7861 (lookup_field_post): Likewise.
7862 (lookup_field): Use them, via breadth_first_search, instead of
7864 (compute_access): Robustify.
7865 (lookup_fnfield_info): New structure.
7867 1999-03-05 Jason Merrill <jason@yorick.cygnus.com>
7869 * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
7871 1999-03-03 Jason Merrill <jason@yorick.cygnus.com>
7873 * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
7876 * decl2.c (import_export_class): Also return if
7877 CLASSTYPE_INTERFACE_ONLY is set.
7879 1999-03-03 Martin von Löwis <loewis@informatik.hu-berlin.de>
7881 * decl.c (push_overloaded_decl): Only overwrite the old binding if
7883 * decl2.c (do_local_using_decl): Fix loop termination.
7885 1999-03-02 Mark Mitchell <mark@markmitchell.com>
7887 * cp-tree.h (determine_specialization): Don't declare.
7888 * pt.c (determine_specialization): Make it static. Eliminate
7889 complain parameter. Note that decl is always non-NULL now, and
7890 simplify accordingly.
7892 * decl.c (maybe_push_to_top_level): Always call
7893 push_cp_function_context.
7894 (pop_from_top_level): Always call pop_cp_function_context.
7896 1999-02-26 Nathan Sidwell <nathan@acm.org>
7898 * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
7900 * cp-tree.h (complete_type_or_else): Added VALUE parameter.
7901 * init.c (build_new_1): Extra arg to complete_type_or_else.
7902 (build_delete): Likewise.
7903 * typeck.c (require_complete_type): Likewise.
7904 (pointer_int_sum): Likewise.
7905 (pointer_diff): Likewise.
7906 (build_component_ref): Likewise.
7908 * typeck2.c (incomplete_type_error): Always use cp_error.
7909 Show declaration of undefined type, if appropriate.
7910 Deal with UNKNOWN_TYPE nodes.
7912 * typeck.c (require_complete_type): Use TYPE_SIZE as
7913 size_zero_node to mean incomplete type.
7914 (require_complete_type_in_void): New function.
7915 (build_compound_expr): Call complete_type_in_void for LHS.
7916 (build_c_cast): Call complete_type_in_void for void cast.
7917 * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
7918 * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
7919 require_complete_type_in_void. Call it.
7920 * cp-tree.h (require_complete_type_in_void): Prototype new function.
7922 * typeck.c (convert_arguments): Use alternative format for
7923 function decls. Don't require_complete_type here. Simplify
7924 diagnostic printing.
7925 (convert_for_initialization): Don't require_complete_type on RHS yet.
7926 * call.c (convert_arg_to_ellipsis): Call require_complete_type.
7928 * call.c (build_over_call): Cope with qualified void return type.
7929 * semantics.c (finish_call_expr): Likewise.
7930 * typeck.c (build_function_call_real): Likewise.
7931 (c_expand_return): Likewise.
7932 * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
7934 * call.c (print_z_candidates): Use alternate print format, to be
7935 consistent with (pt.c) print_candidates.
7936 * method.c (hack_identifier): List candidate members.
7937 * search.c (lookup_field): Build ambiguous list, and show it, if
7940 1999-02-26 Mark Mitchell <mark@markmitchell.com>
7942 * typeck.c (decay_conversion): Don't confuse constant array
7943 variables with their initializers.
7945 * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
7947 * pt.c (regenerate_decl_from_template): Tweak for clarity.
7948 (instantiate_decl): Mark a decl instantiated before regenerating
7949 it to avoid recursion.
7950 * tree.c (mapcar): Don't call decl_constant_value unless we know
7951 something is TREE_READONLY_DECL_P.
7953 * class.c (check_for_override): Don't stop checking when we find
7954 the first overridden function. Delete #if 0'd code.
7955 * search.c (get_matching_virtual): Likewise.
7957 1999-02-25 Richard Henderson <rth@cygnus.com>
7959 * lang-specs.h: Define __FAST_MATH__ when appropriate.
7961 1999-02-24 Mike Stump <mrs@wrs.com>
7963 * typeck.c (convert_for_assignment): Allow boolean integral constant
7964 expressions to convert to null pointer.
7966 1999-02-24 Martin von Loewis <loewis@informatik.hu-berlin.de>
7968 * decl.c (lookup_namespace_name): Resolve namespace aliases.
7970 * class.c (push_nested_class): Allow namespaces.
7972 * decl2.c (set_decl_namespace): Add friendp parameter.
7973 * decl.c (grokfndecl): Pass it.
7974 (grokvardecl): Likewise.
7975 * cp-tree.h: Change declaration.
7977 1999-02-24 Jason Merrill <jason@yorick.cygnus.com>
7979 * pt.c (tsubst): Allow an array of explicit size zero.
7981 1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
7983 * errfn.c: Change varargs code to look like toplev.c.
7985 * method.c (process_modifiers): Don't prepend 'U' for char or
7988 1999-02-20 Craig Burley <craig@jcb-sc.com>
7990 * Make-lang.in (cplib2.ready): Don't consider updating
7991 cplib2 stuff if the current directory isn't writable, as
7992 it won't work (such as during a `make install').
7994 Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
7996 * decl2.c (start_objects): Make file scope constructors and
7997 destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
7998 ASM_OUTPUT_DESTRUCTOR are defined.
8000 1999-02-19 Mark Mitchell <mark@markmitchell.com>
8002 * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
8003 (fn_type_unification): Adjust prototype.
8004 (lookup_fnfields_1): Declare.
8005 * call.c (add_template_candidate_real): Adjust call to
8006 fn_type_unification.
8007 * class.c (add_method): Don't allow duplicate declarations of
8008 constructors or destructors.
8009 (resolve_address_of_overloaded_function): Remove unused variable.
8010 Adjust call to fn_type_unification.
8011 * decl.c (grokfndecl): Be more robust in the face of illegal
8013 * decl2.c (check_classfn): Remove hokey handling of member
8015 * pt.c (determine_specialization): Improve comments. Adjust to
8016 handle template argument deduction as per the standard.
8017 (check_explicit_specialization): Fix comment spacing. Handle
8018 type-conversion operators correctly. Improve error-recovery.
8019 (fn_type_unification): Remove EXTRA_FN_ARG parameter.
8020 (get_bindings_real): Simplify handling of static members.
8021 * search.c (lookup_fnfields_1): Make it have external linkage.
8022 * typeck.c (compparms): Fix comment.
8023 (build_unary_op): Don't try to figure out which template
8024 specialization is being referred to when when the address-of
8025 operator is used with a template function.
8027 Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8029 * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
8030 keyword to match an analogous change at the top level.
8032 * tree.c (lvalue_or_else): Likewise.
8034 1999-02-17 Mark Mitchell <mark@markmitchell.com>
8036 * decl.c (xref_basetypes): Comment.
8037 * pt.c (instantiate_class_template): Use xref_basetypes.
8039 1999-02-16 Mark Mitchell <mark@markmitchell.com>
8041 * cp-tree.h (tsubst): Change prototype.
8042 (tsubst_expr): Likewise.
8043 (tsubst_copy): Likewise.
8044 (type_unification): Remove prototype.
8045 * call.c (convert_default_arg): Adjust call to tsubst_expr.
8046 * class.c (resolve_address_of_overloaded_function): Just use
8047 fn_type_unification.
8048 * decl.c (grokdeclarator): Adjust call to tsubst.
8049 * method.c (build_template_parm_names): Likewise.
8050 * pt.c (GTB_VIA_VIRTUAL): New macro.
8051 (GTB_IGNORE_TYPE): Likewise.
8052 (resolve_overloaded_unification): Add `complain' parameter.
8053 (try_one_overload): Likewise.
8054 (tsubst_template_arg_vector): Likewise.
8055 (tsubst_template_parms): Likewise.
8056 (tsubst_aggr_type): Likewise.
8057 (tsubst_arg_types): Likewise.
8058 (tsubst_call_declarator_parms): Likewise.
8059 (unify): Remove explicit_mask.
8060 (type_unification_real): Likewise.
8061 (get_template_base_recursive): Likewise.
8062 (coerce_template_template_parms): Provide prototype.
8063 (tsubst_function_type): Likewise.
8064 (try_class_unification): New function.
8065 All callers changed to use new complain parameter.
8066 (get_template_base): Use try_class_unification.
8067 (unify): Adjust handling of classes derived from template types.
8068 (fn_type_unification): Substitute explicit arguments before
8071 1999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
8073 * decl.c (pushdecl): Remove dead code.
8075 1999-02-16 Jason Merrill <jason@yorick.cygnus.com>
8077 * decl2.c (finish_objects): Fix code I missed in previous change.
8079 1999-02-13 Jason Merrill <jason@yorick.cygnus.com>
8081 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
8082 (grokdeclarator): Don't expect error_mark_node from grokfndecl.
8084 * pt.c (maybe_process_partial_specialization): Complain about
8085 'template <>' on non-specialization.
8087 1999-02-10 Jason Merrill <jason@yorick.cygnus.com>
8089 * decl.c (grokdeclarator): Catch wierd declarators.
8090 * decl2.c (finish_file): Don't abort because of namespace parsing
8092 (check_decl_namespace): Remove.
8094 1999-02-09 Mark Mitchell <mark@markmitchell.com>
8096 * cp-tree.h (get_template_base): Don't declare.
8097 (dfs_walk): Declare.
8098 (dfs_unmark): Likewise.
8099 (markedp): Likewise.
8100 * pt.c (unify): Remove duplicate declaration. Pass tparms and
8101 targs to get_template_base.
8102 (get_template_base_recursive): Move here from search.c. Check to
8103 see that the base found can be instantiated to form the desired
8105 (get_template_base): Likewise.
8106 (get_class_bindings): Simplify.
8107 * search.c (get_template_base_recursive): Move to pt.c.
8108 (get_template_base): Likewise.
8109 (markedp): Make it global.
8110 (dfs_walk): Likewise.
8111 (dfs_unmark): Likewise.
8113 1999-02-07 Jason Merrill <jason@yorick.cygnus.com>
8115 * pt.c (maybe_process_partial_specialization): Complain about
8116 specialization in wrong namespace.
8117 * tree.c (decl_namespace_context): New fn.
8119 1999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
8121 * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
8122 * pt.c (coerce_template_template_parms): Handle nested
8123 template template parameters.
8125 Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com)
8127 * typeck2.c: Update email addresses.
8129 1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
8131 * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
8134 1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
8136 * lex.c (retrofit_lang_decl): Split out...
8137 (build_lang_decl): From here.
8138 * decl.c (pushdecl): Call it for functions generated by the middle
8139 end that don't have DECL_LANG_SPECIFIC.
8140 * cp-tree.h: Declare it.
8142 * decl2.c: Remove flag_init_priority. Always enable initp stuff.
8143 (start_objects, finish_objects): Only use special
8144 init_priority code if the user specified a priority.
8145 (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
8148 Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
8150 * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
8151 mkstemp.o. Get them from libiberty now.
8152 (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
8154 Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
8156 * decl2.c (lang_decode_option): Use read_integral_parameter.
8158 1999-02-01 Mark Mitchell <mark@markmitchell.com>
8160 * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
8161 before calling complete_type_or_else.
8163 Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8165 * input.c (inline): Don't define, its handled by system.h.
8167 Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
8169 * decl2.c: Don't define flag_no_ident here. Don't process
8171 * cp-tree.h: Don't declare flag_no_ident here.
8172 * lang-specs.h: Map -Qn to -fno-ident.
8174 1999-01-28 Jason Merrill <jason@yorick.cygnus.com>
8176 * cp-tree.h (struct tree_binding): Replace scope field with a union.
8177 (BINDING_SCOPE): Adjust.
8178 * decl.c (BINDING_LEVEL): Adjust.
8180 1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
8182 * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
8185 * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
8188 * tree.c (equal_functions): Fix name in prototype.
8190 * decl.c (push_local_binding): Add FLAGS argument.
8191 (pushdecl, push_overloaded_decl): Pass it.
8192 * decl2.c (do_local_using_decl): Likewise.
8193 * cp-tree.h: Adjust prototype.
8194 * decl.c (poplevel): Fix logic.
8196 * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
8197 (poplevel): Handle that. Fix logic for removing TREE_LISTs.
8198 (cat_namespace_levels): Don't loop forever.
8200 1999-01-25 Richard Henderson <rth@cygnus.com>
8202 * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
8204 1999-01-25 Jason Merrill <jason@yorick.cygnus.com>
8206 * class.c (resolve_address_of_overloaded_function): Mark the
8207 chosen function used.
8209 * call.c (build_call): Make sure that a function coming in has
8210 been marked used already.
8211 * decl.c (expand_static_init): Call mark_used instead of
8213 * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
8214 alloc_eh_object, expand_throw): Likewise.
8215 * init.c (build_builtin_delete_call): Likewise.
8216 * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
8217 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
8218 expand_generic_desc): Likewise.
8220 1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
8222 * tree.c (equal_functions): New function.
8223 (ovl_member): Call it.
8225 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
8227 * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
8229 1999-01-25 Martin von Loewis <loewis@informatik.hu-berlin.de>
8231 * decl.c (decls_match): Return 1 if old and new are identical.
8232 (push_overloaded_decl): Set OVL_USED when PUSH_USING.
8234 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
8236 * decl.c (start_function): Make member functions one_only on windows.
8237 * decl2.c (import_export_decl): Likewise.
8239 * decl.c (grokdeclarator): Don't complain about implicit int in
8240 a system header. Change same-name field check to not complain in
8241 a system header instead of within extern "C".
8243 1999-01-21 Mark Mitchell <mark@markmitchell.com>
8245 * cp-tree.h (PUSH_GLOBAL): New macro.
8246 (PUSH_LOCAL): Likewise.
8247 (PUSH_USING): Likewise.
8248 (namespace_bindings_p): Declare.
8249 (push_overloaded_decl): Likewise.
8250 * decl.c (push_overloaded_decl): Don't make it static. Check for
8251 illegal declarations after using declarations here.
8252 (namespace_bindings_p): Likewise.
8253 (duplicate_decls): Don't consider declarations from different
8254 namespaces to be the same.
8255 (pushdecl): Use symbolic PUSH_ constants in calls to
8256 push_overloaded_decl.
8257 (push_overloaded_decl_1): Likewise.
8258 * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
8259 (do_nonmember_using_decl): Check for illegal using declarations
8260 after ordinary declarations here.
8261 (do_local_using_decl): Call pushdecl to insert declarations.
8263 1999-01-21 Jason Merrill <jason@yorick.cygnus.com>
8265 * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
8267 1999-01-21 Mark Mitchell <mark@markmitchell.com>
8269 * tree.c (build_cplus_array_type_1): Don't call build_array_type
8270 for types involving template parameters.
8272 * cp-tree.h (PARM_DECL_EXPR): Delete.
8273 (convert_default_arg): Change prototype.
8274 (check_default_argument): Declare.
8275 (search_tree): Likewise.
8276 * call.c (convert_default_arg): Take the function to which the
8277 default argument belongs as a parameter, and do any necessary
8278 instantiation here, instead of ...
8279 (build_over_call): Here.
8280 * decl.c (local_variable_p): New function.
8281 (check_default_argument): Likewise, split out and tidied from ...
8283 * error.c (dump_expr): Don't set PARM_DECL_EXPR.
8284 * pt.c (tsubst_call_declarator_parms): New function.
8285 (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing
8286 with CALL_EXPRs, rather than trying to be clever.
8287 (tsubst): Use tsubst_call_declarator_parms.
8288 * tree.c (search_tree): Don't make it static.
8289 * typeck.c (convert_arguments): Use new interface to
8290 convert_default_arg.
8292 1999-01-20 Mark Mitchell <mark@markmitchell.com>
8294 * error.c (dump_function_decl): Don't print the argument types for
8295 a function when the verbosity level is negative.
8297 * call.c (build_over_call): Check format attributes at call-time.
8299 * pt.c (tsubst_copy): Fix comment.
8300 (unify): Don't allow unification with variable-sized arrays.
8302 * semantics.c (finish_stmt_expr): When processing a template make
8303 the BIND_EXPR long-lived.
8305 1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
8307 * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
8308 (import_export_vtable): Not here.
8310 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
8312 * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
8313 non-static member function.
8315 1999-01-18 Nathan Sidwell <nathan@acm.org>
8317 * class.c (instantiate_type): Only diagnose illegal address of member
8318 function if complaining.
8320 * decl.c (lookup_name_real): Remove duplicate code.
8322 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
8324 * tree.c (copy_template_template_parm): Use permanent_obstack.
8326 1999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
8328 * pt.c (unify): Remove restrictions on deduction of argument
8329 of template template parameters.
8331 1999-01-18 Nathan Sidwell <nathan@acm.org>
8333 * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
8335 * class.c (resolve_address_of_overloaded_function): Show list of
8336 all candidates, when none of them match.
8338 1999-01-18 Chip Salzenberg <chip@perlsupport.com>
8340 * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
8341 definition of 'casting away const' in reinterpret_cast<>.
8343 1999-01-18 Graham <grahams@rcp.co.uk>
8345 * cvt.c: Add include for decl.h, remove extern for
8346 static_aggregates which is now provided by decl.h.
8348 * Makefile.in (cvt.o): Add dependency for decl.h and missing
8349 dependencies for convert.h and flags.h.
8351 1999-01-18 Nathan Sidwell <nathan@acm.org>
8353 * decl2.c (do_dtors): Set current location to that of the
8354 decl, for sensible diagnostics and debugging.
8355 (check_classfn): Issue `incomplete type' error, if
8356 class is not defined.
8358 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
8360 * cp-tree.h: Add prototype for bound_pmf_p.
8362 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
8363 Manfred Hollstein <manfred@s-direktnet.de>
8365 * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
8368 1999-01-16 Nathan Sidwell <nathan@acm.org>
8370 * cp-tree.h (struct lang_type): Added has_mutable flag.
8371 (CLASSTYPE_HAS_MUTABLE): New macro to access it.
8372 (TYPE_HAS_MUTABLE_P): New macro to read it.
8373 (cp_has_mutable_p): Prototype for new function.
8374 * class.c (finish_struct_1): Set has_mutable from members.
8375 * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
8376 it contains a mutable.
8377 * typeck.c (cp_has_mutable_p): New function.
8379 1999-01-15 Mark Mitchell <mark@markmitchell.com>
8381 * pt.c (process_template_parm): Ignore top-level qualifiers on
8382 non-type parameters.
8384 * decl.c (start_function): Use current_function_parms in the call
8385 to require_complete_type_for_parms, not the probably empty
8388 1999-01-14 Jason Merrill <jason@yorick.cygnus.com>
8390 * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
8392 * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
8393 that we don't suppress the other copies.
8394 * lex.c (handle_cp_pragma): Likewise.
8396 1999-01-13 Mark Mitchell <mark@markmitchell.com>
8398 * decl.c (grokdeclarator): Undo 1998-12-14 change.
8399 * tree.c (build_cplus_array_type_1): Likewise.
8400 * pt.c (instantiate_class_template): Remove misleading comment.
8401 (tsubst_aggr_type): Substitute if there are template parameters,
8402 regardless of whether or not they use template arguments.
8403 (unify): Likewise, but for unification.
8405 1999-01-12 Richard Henderson <rth@cygnus.com>
8407 * cp-tree.h (flag_permissive): Declare extern.
8409 1999-01-06 Mark Mitchell <mark@markmitchell.com>
8411 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
8413 (lang_type): Add is_partial_instantiation. Decrease width of
8415 (PARTIAL_INSTANTIATION_P): New macro.
8416 (OPERATOR_TYPENAME_P): Remove.
8417 * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
8418 OPERATOR_TYPENAME_P.
8419 (grok_op_properties): Likewise.
8420 * friend.c (do_friend): Handle friends that are member functions
8422 * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
8423 * pt.c (instantiate_class_template): Rework for clarity. Avoid
8424 leaving TYPE_BEING_DEFINED set in obscure cases. Don't do
8425 any more partial instantiation than is absolutely necessary for
8426 implicit typename. Set PARTIAL_INSTANTIATION_P.
8427 (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
8428 * semantics.c (begin_class_definition): Handle partial
8429 specializations of a type that was previously partially
8432 Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
8434 * g++spec.c (LIBSTDCXX): Provide default definition.
8435 (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
8437 Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8439 * Make-lang.in (g++.o): Depend on prefix.h.
8441 1999-01-04 Jason Merrill <jason@yorick.cygnus.com>
8443 * tree.c (bound_pmf_p): New fn.
8444 * typeck.c (build_c_cast): Use it.
8446 * decl.c (grok_op_properties): Use same_type_p.
8448 Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8450 * Makefile.in (cvt.o): Depend on toplev.h.
8452 * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
8454 * cvt.c: Include toplev.h.
8456 * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
8459 * init.c (expand_vec_init): Initialize variable `itype'.
8461 * lex.c (yyerror): Cast the argument passed to a ctype function to
8464 * method.c (build_mangled_C9x_name): Wrap prototype and definition
8465 in "HOST_BITS_PER_WIDE_INT >= 64".
8467 * typeck.c (build_binary_op): Mark parameter `convert_p' with
8470 1998-12-22 Mark Mitchell <mark@markmitchell.com>
8472 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
8473 * tree.c (build_exception_variant): Don't crash on empty throw
8476 1998-12-18 DJ Delorie <dj@cygnus.com>
8478 * cvt.c (convert_to_reference): Check for both error_mark_node
8479 and NULL_NODE after call to convert_for_initialization.
8481 1998-12-17 Jason Merrill <jason@yorick.cygnus.com>
8483 * error.c (interesting_scope_p): New fn.
8484 (dump_simple_decl): Use it.
8485 (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
8486 (dump_expr, case OFFSET_REF): Print ->* if appropriate.
8488 1998-12-16 Mark Mitchell <mark@markmitchell.com>
8490 * class.c (resolve_address_of_overloaded_function): Do conversion
8491 to correct type here, rather than ...
8492 (instantiate_type): Here.
8494 * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
8495 (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
8496 (decl_template_parm_p): Remove.
8497 * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
8499 * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
8500 * pt.c (push_inline_template_parms_recursive): Set it.
8501 (decl_template_parm_p): Remove.
8502 (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
8503 (process_template_parm): Set it.
8505 Wed Dec 16 16:33:58 1998 Dave Brolley <brolley@cygnus.com>
8507 * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
8508 if configured with cpplib.
8510 1998-12-15 Mark Mitchell <mark@markmitchell.com>
8512 * decl.c (poplevel): Make sure ns_binding is initialized.
8514 * decl.c (finish_function): Undo inadvertent change in previous
8517 1998-12-14 Mark Mitchell <mark@markmitchell.com>
8519 * class.c (pushclass): Tweak handling of class-level bindings.
8520 (resolve_address_of_overloaded_function): Update pointer-to-member
8522 (instantiate_type): Likewise.
8523 * cvt.c (cp_convert_to_pointer): Likewise.
8524 * decl.c (pop_binding): Take the DECL to pop, not just the name.
8525 Deal with `struct stat' hack.
8526 (binding_level): Add to documentation.
8527 (push_binding): Clear BINDING_TYPE.
8528 (add_binding): New function.
8529 (push_local_binding): Use it.
8530 (push_class_binding): Likewise.
8531 (poplevel): Adjust calls to pop_binding.
8532 (poplevel_class): Likewise.
8533 (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
8534 declarations to current binding level.
8535 (push_class_level_binding): Likewise.
8536 (push_overloaded_decl): Adjust handling of OVERLOADs in local
8538 (lookup_namespace_name): Don't crash when confronted with a
8540 (lookup_name_real): Do `struct stat' hack in local binding
8542 (build_ptrmemfunc_type): Adjust documentation.
8543 (grokdeclarator): Don't avoid building real array types when
8544 processing templates unless really necessary.
8545 (finish_method): Adjust calls to pop_binding.
8546 * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
8547 not reparse_decl_as_expr.
8548 (build_expr_from_tree): Deal with a template-id as the function to
8549 call in a METHOD_CALL_EXPR.
8550 * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
8551 (maybe_adjust_types_For_deduction): Don't do peculiar things with
8553 (resolve_overloaded_unification): Handle COMPONENT_REFs. Build
8554 pointer-to-member types where necessary.
8555 * tree.c (build_cplus_array_type_1): Don't avoid building real
8556 array types when processing templates unless really necessary.
8557 (build_exception_variant): Compare the exception lists correctly.
8559 1998-12-13 Mark Mitchell <mark@markmitchell.com>
8561 * cp-tree.def (CPLUS_BINDING): Update documentation.
8562 * cp-tree.h (LOCAL_BINDING_P): New macro.
8563 (lang_identifier): Rename local_value to bindings.
8564 (tree_binding): Make `scope' of type `void*', not `tree'.
8565 (BINDING_SCOPE): Update documentation.
8566 (IDENTIFIER_LOCAL_VALUE): Remove.
8567 (IDENTIFIER_CLASS_VALUE): Document.
8568 (IDENTIFIER_BINDING): New macro.
8569 (IDENTIFIER_VALUE): Likewise.
8570 (TIME_IDENTIFIER_TIME): Likewise.
8571 (TIME_IDENTIFIER_FILEINFO): Likewise.
8572 (IMPLICIT_TYPENAME_P): Likewise.
8573 (set_identifier_local_value): Remove.
8574 (push_local_binding): New function.
8575 (push_class_binding): Likewise.
8576 * class.c (pushclass): Update comments; use push_class_binding.
8577 * decl.c (set_identifier_local_value_with_scope): Remove.
8578 (set_identifier_local_value): Likewise.
8579 (push_binding): New function.
8580 (pop_binding): Likewise.
8581 (binding_level): Update documentation. Remove shadowed.
8582 (BINDING_LEVEL): New macro.
8583 (free_binding_nodes): New variable.
8584 (poplevel): Adjust for new name-lookup scheme. Don't mess up
8585 BLOCK_VARs when doing for-scope extension. Remove effectively
8587 (pushlevel_class): Tweak formatting.
8588 (poplevel_class): Adjust for new name-lookup scheme.
8589 (print_binding_level): Likewise.
8590 (store_bindings): Likewise.
8591 (pushdecl): Likewise.
8592 (pushdecl_class_level): Likewise.
8593 (push_class_level_binding): Likewise.
8594 (push_overloaded_decl): Update comments. Adjust for new
8596 (lookup_name_real): Likewise.
8597 (lookup_name_current_level): Likewise.
8598 (cp_finish_decl): Likewise.
8599 (require_complete_types_for_parms): Likewise. Remove misleading
8601 (grok_parms): Likewise. Don't call
8602 require_complete_types_for_parms here.
8603 (grok_ctor_properties): Don't treat templates as copy
8605 (grop_op_properties): Or as assignment operators.
8606 (start_function): Document. Adjust for new name-lookup scheme.
8607 (finish_function): Likewise.
8608 * decl2.c (do_local_using_decl): Use push_local_binding.
8609 * lex.c (begin_definition_of_inclass_inline): New function, split
8611 (do_pending_inlines): Here, and ...
8612 (process_next_inline): Here.
8613 (get_time_identifier): Use TIME_IDENTIFIER_* macros.
8614 (init_filename_times): Likewise.
8615 (extract_interface_info): Likewise.
8616 (ste_typedecl_interface_info): Likewise.
8617 (check_newline): Likewise.
8618 (dump_time_statistics): Likewise.
8619 (handle_cp_pragma): Likewise.
8620 (do_identifier): Adjust for new name-lookup scheme.
8621 * parse.y (function_try_block): Return ctor_initializer_opt value.
8623 (fn.defpen): Pass appropriate values to start_function.
8624 (pending_inline): Use functor_try_block value, and pass
8625 appropriate values to finish_function.
8626 * pt.c (is_member_template): Update documentation; remove handling
8627 of FUNCTION_DECLs. As per name, this function should deal only in
8629 (decl_template_parm_p): Change name of olddecl parameter to decl.
8630 (check_template_shadow): Adjust for new name-lookup scheme.
8631 (lookup_template_class): Likewise.
8632 (tsubst_decl): Tweak so as not to confuse member templates with
8633 copy constructors and assignment operators.
8634 (unify): Handle UNION_TYPEs.
8635 * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
8636 (lang_print_xnode): Adjust for new name-lookup scheme.
8637 * typeck.c (mark_addressable): Likewise.
8638 (c_expand_return): Likewise.
8640 1998-12-08 Jason Merrill <jason@yorick.cygnus.com>
8642 * decl.c (grokdeclarator): Allow field with same name as class
8645 * decl.c (lookup_name_real): Don't limit field lookup to types.
8646 * class.c (check_member_decl_is_same_in_complete_scope): No error
8647 if icv and x are the same.
8648 * lex.c (do_identifier): Tweak error message.
8650 1998-12-10 Mark Mitchell <mark@markmitchell.com>
8652 * decl.c (start_enum): Use push_obstacks, not
8653 end_temporary_allocation.
8654 (finish_enum): Call pop_obstacks.
8656 1998-12-10 Mark Mitchell <mark@markmitchell.com>
8658 * class.c (instantiate_type): Return error_mark_node rather than
8661 1998-12-09 Mark Mitchell <mark@markmitchell.com>
8663 * cp-tree.h (most_specialized_instantiation): New function.
8664 (print_candidates): Likewise.
8665 * class.c (validate_lhs): Remove.
8666 (resolve_address_of_overloaded_function): New function, split out
8667 and then substantially reworked, from ...
8668 (instantiate_type): Use it. Simplify.
8669 * cvt.c (convert_to_reference): Complain when caller has indicated
8670 that's the right thing to do. Don't crash if instantiate_type
8672 * pt.c: Substitute `parameters' for `paramters' throughout.
8673 (print_candidates): Don't make it static.
8674 (most_specialized_instantiation): Split out from ...
8675 (most_specialized): Here.
8677 Wed Dec 9 15:33:01 1998 Dave Brolley <brolley@cygnus.com>
8679 * lex.c (lang_init_options): Initialize cpplib.
8680 * decl2.c (parse_options,cpp_initialized): Removed.
8681 (lang_decode_option): Move initialization of cpplib to
8684 1998-12-09 Mark Mitchell <mark@markmitchell.com>
8686 * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
8687 well as the TYPE_DECL, when a typedef name is assigned to a
8688 previously anonymous type.
8690 1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
8692 * cp/except.c (call_eh_info): Use __start_cp_handler instead of
8693 __cp_eh_info for getting the eh info pointer. Add table_index to
8695 (push_eh_cleanup): Don't increment 'handlers' data field.
8696 (process_start_catch_block): Don't set the 'caught' field.
8698 * cp/exception.cc (CP_EH_INFO): New macro for getting the
8699 exception info pointer within library routines.
8700 (__cp_eh_info): Use CP_EH_INFO.
8701 (__start_cp_handler): Get exception info pointer, set caught field,
8702 and increment the handlers field. Avoids this being done by handlers.
8703 (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
8704 (uncaught_exception): Use CP_EH_INFO macro.
8706 Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com)
8708 * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
8710 Mon Dec 7 17:56:06 1998 Mike Stump <mrs@wrs.com>
8712 * lex.c (check_newline): Add support for \ as `natural'
8713 characters in file names in #line to be consistent with #include
8714 handling. We support escape processing in the # 1 "..." version of
8715 the command. See also support in cp/lex.c.
8717 1998-12-07 Zack Weinberg <zack@rabi.phys.columbia.edu>
8719 * cp/decl2.c: s/data/opts/ when initializing cpp_reader
8722 1998-12-07 Jason Merrill <jason@yorick.cygnus.com>
8724 * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
8726 * error.c (dump_simple_decl): Also print namespace context.
8727 (dump_function_decl): Likewise.
8729 * decl2.c (ambiguous_decl): Don't print old value if it's
8732 * decl.c (lookup_name_real): Fix handling of local types shadowed
8733 by a non-type decl. Remove obsolete code.
8734 * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
8736 * lang-options.h: Add -fpermissive.
8737 * decl2.c: Likewise.
8738 * cp-tree.h: Add flag_permissive.
8739 * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
8740 were specified, set flag_pedantic_errors.
8741 * call.c (build_over_call): Turn dropped qualifier messages
8743 * cvt.c (convert_to_reference): Likewise.
8744 * typeck.c (convert_for_assignment): Likewise.
8746 1998-12-05 Jason Merrill <jason@yorick.cygnus.com>
8748 * decl2.c (coerce_new_type): Use same_type_p.
8749 (coerce_delete_type): Likewise.
8751 * call.c (check_dtor_name): Return 1, not error_mark_node.
8753 1998-12-04 Jason Merrill <jason@yorick.cygnus.com>
8755 * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
8756 if MULTIPLE_SYMBOL_SPACES.
8758 * pt.c (check_template_shadow): New fn.
8759 * decl2.c (grokfield): Use it.
8760 * decl.c (pushdecl): Likewise.
8761 (pushdecl_class_level): Likewise.
8762 (start_method): Likewise.
8763 (xref_tag): Don't try to use 't' if we're defining.
8765 * call.c (check_dtor_name): Just return an error_mark_node.
8766 * pt.c (lookup_template_class): Complain about using non-template here.
8767 * parse.y (apparent_template_type): Not here.
8769 * pt.c (check_explicit_specialization): Complain about specialization
8772 * lang-options.h: Add -f{no-,}implicit-inline-templates.
8774 * pt.c (convert_nontype_argument): Don't assume that any integer
8775 argument is intended to be a constant-expression.
8777 1998-12-03 Mark Mitchell <mark@markmitchell.com>
8779 * class.c (handle_using_decl): Fix comment. Don't lookup
8780 constructors in base classes.
8781 (validate_lhs): Fix typo in comment.
8782 * search.c (lookup_field_1): Don't return a USING_DECL.
8784 * cp-tree.h (DECL_ACCESS): Improve documentation.
8786 * decl.c (expand_static_init): Don't set the initialization-done
8787 flag until the initialization is done.
8789 1998-12-02 Mark Mitchell <mark@markmitchell.com>
8791 * decl2.c (validate_nonmember_using_decl): Complain about using
8792 declarations for class members.
8794 1998-11-29 Jason Merrill <jason@yorick.cygnus.com>
8796 * typeck2.c (process_init_constructor): Use same_type_p.
8798 * decl.c (check_tag_decl): Don't warn about null decl inside a
8801 * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
8803 (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
8804 (resolve_overloaded_unification): Strip baselinks.
8806 Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8808 * g++spec.c: Don't prototype xmalloc.
8810 1998-11-25 Jason Merrill <jason@yorick.cygnus.com>
8812 * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
8814 * decl.c (check_tag_decl): Do complain about null friend decl at
8817 1998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
8819 * lex.c (make_lang_type): Clear the whole struct lang_type, not
8820 only the first multiple of sizeof (int).
8822 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
8824 * decl.c (start_decl): An explicit specialization of a static data
8825 member is only a definition if it has an initializer.
8827 * except.c (expand_throw): Use cp_finish_decl for the throw temp.
8828 * cvt.c (build_up_reference): Pass DIRECT_BIND down into
8830 * init.c (expand_default_init): Check for DIRECT_BIND instead of
8833 * call.c (build_over_call): Use build_decl.
8835 * except.c (expand_throw): Just use convert, not
8836 build_reinterpret_cast.
8838 * lex.c (handle_generic_pragma): Use token_buffer.
8840 * decl.c (check_tag_decl): Don't complain about null friend decl.
8842 1998-11-24 Dave Pitts <dpitts@cozx.com>
8844 * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
8846 * lex.c (check_newline): Use ISALPHA.
8847 (readescape): Use ISGRAPH.
8848 (yyerror): Use ISGRAPH.
8850 1998-11-24 Nathan Sidwell <nathan@acm.org>
8852 * search.c (get_abstract_virtuals): Do not use initial
8853 CLASSTYPE_ABSTRACT_VIRTUALS.
8854 * typeck2.c (abstract_virtuals_error): Show location of abstract
8856 * call.c (build_new_method_call): Use
8857 CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
8858 * class.c (finish_struct_bits): Don't bother working out whether
8859 get_abstract_virtuals will do anything, just do it.
8861 1998-11-24 Graham <grahams@rcp.co.uk>
8863 * typeck.c (build_component_ref): Remove unused statement.
8865 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
8867 * class.c (add_method): Catch invalid overloads.
8869 * class.c (add_method): Build up OVERLOADs properly for conversion ops.
8870 * search.c (lookup_conversions): Handle getting real OVERLOADs.
8871 (add_conversions): Likewise. Revert last change.
8872 * call.c (add_conv_candidate): Pass totype to add_candidate instead
8873 of fn. Don't add a new candidate if the last one was for the same
8875 (print_z_candidates): Handle getting a type as a function.
8876 (joust): If we got two conversion candidates to the same type,
8878 (build_object_call): Lose 'templates'.
8879 (build_user_type_conversion_1): Handle getting real OVERLOADs.
8881 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
8883 * typeck2.c (process_init_constructor): If there are elements
8884 that don't have initializers and they need to have constructors
8885 run, supply them with initializers.
8887 * class.c (finish_struct_1): A class with a 0-width bitfield is
8890 1998-11-23 Mark Mitchell <mark@markmitchell.com>
8892 * pt.c (instantiate_class_template): Don't try to figure out what
8893 specialization to use for a partial instantiation. Correct
8894 typos in a couple of comments. Avoid calling uses_template_parms
8897 1998-11-23 Benjamin Kosnik <bkoz@cygnus.com>
8899 * method.c (process_overload_item): Add call to
8900 build_mangled_C9x_name for intTI_type_nodes.
8901 (build_mangled_C9x_name): Add prototype, define.
8902 * decl.c (init_decl_processing): Add names for
8905 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
8907 * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
8909 * class.c (finish_struct_1): Set things up for 0-width bitfields
8910 like we do for others.
8912 * decl.c (check_tag_decl): New fn.
8913 (shadow_tag): Split out from here.
8914 * decl2.c (grok_x_components): Call it.
8916 1998-11-22 Jason Merrill <jason@yorick.cygnus.com>
8918 * decl.c: Lose warn_about_return_type.
8919 (grokdeclarator): Always complain about implicit int, except for
8922 * decl.c (tag_name): New fn.
8923 (xref_tag): Complain about using typedef-name after class-key.
8925 * init.c (expand_vec_init): Also keep going if from_array.
8927 * tree.c (is_overloaded_fn): Also handle the output of
8930 * decl.c (grokdeclarator): Use constructor_name when comparing
8931 field name against enclosing class.
8932 * class.c (finish_struct_anon): Likewise.
8934 1998-11-22 Mark Mitchell <mark@markmitchell.com>
8936 * decl.c (poplevel): Remove code to handle KEEP == 2.
8937 (finish_function): Don't confuse BLOCK-order when
8938 processing a destructor.
8940 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
8942 * decl.c (require_complete_types_for_parms): Call layout_decl
8943 after we've completed the type.
8945 1998-11-21 Martin von Löwis <loewis@informatik.hu-berlin.de>
8947 * decl2.c (validate_nonmember_using_decl): Allow using templates
8948 from the global namespace.
8950 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
8952 Handle specifying template args to member function templates.
8953 * tree.c (build_overload): Always create an OVERLOAD for a template.
8954 * search.c (add_conversions): Handle finding an OVERLOAD.
8955 * decl2.c (check_classfn): Likewise.
8956 * lex.c (identifier_type): See through a baselink.
8957 * parse.y (do_id): Don't call do_identifier if we got a baselink.
8958 * class.c (instantiate_type, case TREE_LIST): Recurse.
8960 * decl.c (grokdeclarator): Allow a boolean constant for array
8961 bounds, odd as that sounds.
8963 * pt.c (unify): Be more strict about non-type parms, except for
8965 (UNIFY_ALLOW_INTEGER): New macro.
8967 1998-11-19 Manfred Hollstein <manfred@s-direktnet.de>
8969 * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
8971 1998-11-19 Jason Merrill <jason@yorick.cygnus.com>
8973 * semantics.c (begin_class_definition): Call
8974 maybe_process_partial_specialization before push_template_decl.
8975 Don't call push_template_decl for a specialization.
8976 * search.c (lookup_field): Do return a member template class.
8977 * decl2.c (handle_class_head): Handle member template classes.
8979 * decl.c (grokdeclarator): A parm type need not be complete.
8981 * pt.c (convert_nontype_argument): Fix thinko.
8983 1998-11-18 Mark Mitchell <mark@markmitchell.com>
8985 * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
8986 (global_delete_fndecl): New variable.
8987 * decl.c (global_delete_fndecl): Define it.
8988 (init_decl_processing): Set it.
8989 * init.c (build_builtin_delete_call): Use it.
8990 * tree.c (mapcar): Recursively call mapcar for the type of EXPR
8993 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
8995 * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
8998 * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
8999 * call.c (build_object_call): Also support references to functions.
9000 * typeck.c (convert_for_initialization): Don't decay a function
9001 if the target is a reference to function.
9003 * search.c (add_conversions): Get all the overloads from a class.
9005 * decl.c (grok_ctor_properties): Complain about any constructor
9006 that will take a single arg of the class type by value.
9008 * typeck2.c (build_functional_cast): Can't create objects of
9009 abstract classes this way.
9010 * cvt.c (ocp_convert): Likewise.
9012 * decl.c (grokfndecl): Member functions of local classes are not
9015 1998-11-18 Mark Mitchell <mark@markmitchell.com>
9017 * Make-lang.in (cc1plus): Add dependency on hash.o.
9019 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
9021 * search.c (get_abstract_virtuals): Complain about virtuals with
9023 * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
9024 with no final overrider.
9025 * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
9026 on virtuals with no final overrider.
9028 * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
9030 * class.c (finish_struct_1): Don't remove zero-width bit-fields until
9033 * friend.c (do_friend): Don't set_mangled_name_for_decl.
9035 * class.c (finish_struct_anon): Complain about non-fields.
9036 * decl2.c (build_anon_union_vars): Likewise.
9038 * decl.c (grokdeclarator): Normal data members can't have the same
9039 name as the class, either.
9040 * class.c (finish_struct_anon): Neither can members of an
9043 1998-11-17 Mark Mitchell <mark@markmitchell.com>
9045 * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
9046 (TYPE_BINFO): Likewise.
9047 (IS_AGGR_TYPE): Tweak.
9048 (SET_IS_AGGR_TYPE): New macro.
9049 (CLASS_TYPE_P): Tweak.
9050 (lang_type): Group mark bitfields together. Remove linenum.
9051 (CLASSTYPE_SOURCE_LINE): Remove macro.
9052 (CLASSTYPE_MARKED_N): New macro.
9053 (SET_CLASSTYPE_MARKED_N): Likewise.
9054 (CLEAR_CLASSTYPE_MARKED_N): Likewise.
9055 (CLASS_TYPE_MARKED_*): Use them.
9056 (SET_CLASSTYPE_MARKED_*): Likewise.
9057 (CLEAR_CLASSTYPE_MARKED_*): Likewise.
9058 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
9059 (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
9060 (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
9061 * class.c (class_cache_obstack): New variable.
9062 (class_cache_firstobj): Likewise.
9063 (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
9064 (pushclass): Free the cache, when appropriate.
9066 (maybe_push_cache_obstack): Use class_cache_obstack.
9067 * decl.c (include hash.h).
9068 (typename_hash): New function.
9069 (typename_compare): Likewise.
9070 (build_typename_type): Check the hash table to avoid creating
9072 (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
9073 (grokdeclarator): Use CLASS_TYPE_P.
9074 (xref_basetypes): Likewise.
9075 (start_function): Likewise. Don't put current_class_ref on the
9077 * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
9079 * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
9080 (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
9081 fields for types other than class types. Do clear TYPE_ALIAS_SET
9082 for types other than class types, though.
9083 * method.c (build_overload_identifier): Use CLASS_TYPE_P and
9084 TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9085 * pt.c (process_template_parm): Don't set
9086 CLASSTYPE_GOT_SEMICOLON.
9087 (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9088 Coerce arguments on the momentary obstack.
9089 (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9090 (instantiate_class_template): Calculate template arguments on the
9091 momentary obstack. Tidy.
9092 (tsubst_template_arg_vector): Use make_temp_vec.
9093 (tsubst_aggr_type): Put template arguments on the momentary
9095 (tsubst_decl): Likewise.
9096 (tsubst): Copy the array bounds index to the permanent obstack
9097 before building index types. Use new macros.
9098 (unify): Use new macros.
9099 (do_type_instantiation): Likewise.
9100 * search.c (lookup_fnfields_1): Use new macros.
9101 (dfs_pushdecls): Build envelopes on the cache obstack.
9102 (dfs_compress_decls): Use new macros.
9103 (push_class_decls): Build on the cache obstack.
9104 * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
9105 * sign.c (build_signature_pointer_or_reference_type): Use
9107 * tree.c (make_binfo): Check CLASS_TYPE_P.
9108 (copy_template_template_parm): Adjust.
9109 (make_temp_vec): Use push_expression_obstack.
9110 * typeck.c (complete_type): Use new macros.
9111 (comptypes): Likewise.
9113 1998-11-17 Jason Merrill <jason@yorick.cygnus.com>
9115 * pt.c (tsubst): Add diagnostics for invalid array, reference
9116 and pointer to member types.
9118 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
9120 * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
9122 * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
9125 * parse.y (structsp): Fix cut-and-paste error.
9127 * init.c (build_new): Complain about non-integral size.
9129 * parse.y (unary_expr): Complain about defining types in sizeof.
9131 * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
9133 * rtti.c (build_x_typeid): Complain about typeid without
9134 including <typeinfo>.
9135 (get_typeid): Likewise. Complain about typeid of incomplete type.
9136 (get_tinfo_fn_dynamic): Likewise.
9137 (get_typeid_1): Not static anymore.
9138 * except.c (build_eh_type_type): Use get_typeid_1.
9140 * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
9141 ambiguous or private bases. Fix warning for reference cast.
9143 1998-11-16 Mark Mitchell <mark@markmitchell.com>
9145 * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
9146 * decl.c (duplicate_decls): Remove special-case code to deal with
9147 template friends, and just do the obvious thing.
9148 * pt.c (register_specialization): Tweak for clarity, and also to
9149 clear DECL_INITIAL for an instantiation before it is merged with a
9151 (check_explicit_specialization): Fix indentation.
9152 (tsubst_friend_function): Handle both definitions in friend
9153 declaration and outside friend declarations.
9154 (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
9155 (regenerate_decl_from_template): Tweak accordingly.
9156 (instantiate_decl): Likewise.
9158 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
9160 * decl.c (cplus_expand_expr_stmt): Promote warning about naked
9161 member function reference to error.
9162 * cvt.c (ocp_convert): Complain about converting an overloaded
9165 * init.c (build_offset_ref): Just return a lone static member
9168 * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
9171 * typeck.c (build_binary_op_nodefault): Improve error handling.
9173 * decl.c (grokfndecl): Complain about making 'main' a template.
9175 * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
9177 * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
9178 TYPE_DECL in a template.
9180 1998-11-15 Jason Merrill <jason@yorick.cygnus.com>
9182 * typeck2.c (my_friendly_abort): Add URL in the other case, too.
9184 * decl.c (struct cp_function): Add named_label_uses.
9185 (push_cp_function_context): Save it.
9186 (pop_cp_function_context): Restore it.
9187 (define_label): Also complain about jumping into the scope of
9188 non-POD objects that don't have constructors.
9189 * tree.c (pod_type_p): New fn.
9191 * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
9192 * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
9193 (get_tinfo_fn): Not here.
9194 * repo.c (repo_get_id): Abort if we get called for an incomplete
9197 1998-11-13 Mark Mitchell <mark@markmitchell.com>
9199 * except.c (expand_throw): Make sure first argument to
9200 __cp_push_exception is of type `void*' to avoid spurious error
9203 1998-11-11 Jason Merrill <jason@yorick.cygnus.com>
9205 * pt.c (try_one_overload): Take orig_targs again. Only check for
9206 mismatches against them; we don't care what a previous call found.
9207 (resolve_overloaded_unification): Adjust.
9209 * search.c (lookup_field): Don't return anything for a non-type
9210 field from a dependent type.
9211 * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
9212 in an array declarator.
9213 (start_decl): Push into the class before looking for the field.
9215 1998-11-08 Mark Mitchell <mark@markmitchell.com>
9217 * method.c (build_overload_value): Handle REFERENCE_TYPE.
9219 1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
9221 * decl.c (grokdeclarator): Allow namespace-scoped members if they
9224 1998-11-08 Jason Merrill <jason@yorick.cygnus.com>
9226 * pt.c (tsubst_decl): Don't mess with the global value of an
9227 un-mangled DECL_ASSEMBLER_NAME.
9229 1998-11-03 Christopher Faylor <cgf@cygnus.com>
9231 * decl.c (init_decl_processing): Remove CYGWIN conditional
9232 since CYGWIN is now able to deal with trapping signals.
9234 Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9236 * cp-tree.h: Don't include gansidecl.h.
9237 * exception.cc: Include gansidecl.h (since we don't include config.h)
9238 * g++spec.c: Don't include gansidecl.h.
9240 1998-11-06 Mark Mitchell <mark@markmitchell.com>
9242 * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease
9244 (DECL_DEFINED_IN_CLASS_P): New macro.
9245 (TEMPLATE_PARMS_FOR_INLINE): Document.
9246 (check_static_variable_definition): New function.
9247 * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
9249 (check_static_variable_definition): Split out from ...
9250 (grokdeclarator): Here.
9251 * pt.c (check_default_tmpl_args): New function, split out from ...
9252 (push_template_decl_real): Here.
9253 (instantiate_template): Fix comment.
9255 1998-11-04 Mark Mitchell <mark@markmitchell.com>
9257 * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
9258 (CP_TYPE_VOLATILE_P): Likewise.
9259 (CP_TYPE_RESTRICT_P): Likewise.
9261 1998-11-03 Mark Mitchell <mark@markmitchell.com>
9263 * pt.c (tsubst): Use build_index_type, not build_index_2_type.
9265 1998-11-02 Jason Merrill <jason@yorick.cygnus.com>
9267 * class.c (instantiate_type): Be more helpful.
9269 * decl2.c (import_export_decl): Call import_export_class.
9271 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
9272 * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
9273 * pt.c (tsubst_copy): Likewise.
9275 1998-11-02 Mark Mitchell <mark@markmitchell.com>
9277 * init.c (expand_vec_init): Fix off-by-one error.
9279 1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
9281 * parse.y (apparent_template_type): New type.
9282 (named_complex_class_head_sans_basetype): Use it.
9283 * Makefile.in (CONFLICTS): One new conflict.
9284 * parse.c: Regenerated.
9286 1998-11-01 Mark Mitchell <mark@markmitchell.com>
9288 * cp-tree.h (COMPARE_STRICT): New macro.
9289 (COMPARE_BASE): Likewise.
9290 (COMPARE_RELAXED): Likewise.
9291 (COMPARE_REDECLARATION): Likewise.
9292 (same_type_p): Likewise.
9293 (same_or_base_type_p): Likewise.
9294 * call.c (standard_conversion): Use them, in place of comptypes
9295 with numeric arguments.
9296 (reference_binding): Likewise.
9297 (convert_like): Likewise.
9298 (build_over_call): Likewise.
9299 (is_subseq): Likewise.
9300 (is_properly_derived_from): Likewise.
9301 (compare_ics): Likewise.
9303 * class.c (delete_duplicate_fields_1): Likewise.
9304 (resolves_to_fixed_type_p): Likewise.
9305 (instantiate_type): Likewise. Remove #if 0'd code.
9306 * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here.
9307 (pushdecl): Likewise.
9308 (lookup_name_real): Likewise.
9309 (grokdeclarator): Likewise. Check for illegal array declarations.
9310 (grokparms): Likewise.
9311 (grok_op_properties): Likewise.
9312 * decl2.c (check_classfn): Likewise.
9313 * friend.c (is_friend): Likewise.
9314 (make_friend_class): Likewise.
9315 * init.c (expand_aggr_init): Likewise.
9316 (expand_vec_init): Likewise.
9317 * pt.c (is_member_template_class): Remove declaration.
9318 (is_specialization_of): Use COMPARE_* and new macros.
9319 (comp_template_parms): Likewise.
9320 (convert_nontype_argument): Likewise.
9321 (coerce_template_template_parms): Likewise.
9322 (template_args_equal): Likewise.
9323 (lookup_template_class): Likewise.
9324 (type_unification_real): Likewise.
9326 (get_bindings_real): Likewise.
9327 * search.c (covariant_return_p): Likewise.
9328 (get_matching_virtual): Likewise.
9329 * sig.c (match_method_types): Likewise.
9330 * tree.c (vec_binfo_member): Likewise.
9331 (cp_tree_equal): Likewise.
9332 * typeck.c (common_type): Likewise.
9333 (comp_array_types): Likewise. Get issues involving unknown array
9335 (comptypes): Update comments. Use new flags.
9336 (comp_target_types): Use new macros.
9337 (compparms): Likewise.
9338 (comp_target_parms): Likewise.
9339 (string_conv_p): Likewise.
9340 (build_component_ref): Likewise.
9341 (build_indirect_ref): Likewise.
9342 (build_conditional_expr): Likewise.
9343 (build_static_cast): Likewise.
9344 (build_reinterpret_cast): Likewise.
9345 (build_const_cast): Likewise.
9346 (build_modify_expr): Likewise.
9347 (convert_for_assignment): Likewise.
9348 (comp_ptr_ttypes_real): Likewise.
9349 (ptr_reasonably_similar): Likewise.
9350 (comp_ptr_ttypes_const): Likewise.
9352 1998-10-31 Jason Merrill <jason@yorick.cygnus.com>
9354 * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
9356 1998-10-30 Mark Mitchell <mark@markmitchell.com>
9358 * decl2.c (delete_sanity): Pass integer_zero_node, not
9359 integer_two_node, to build_vec_delete.
9360 * init.c (build_array_eh_cleanup): Remove.
9361 (expand_vec_init_try_block): New function.
9362 (expand_vec_init_catch_clause): Likewise.
9363 (build_vec_delete_1): Don't deal with case that auto_delete_vec
9364 might be integer_two_node anymore.
9365 (expand_vec_init): Rework for initialization-correctness and
9366 exception-correctness.
9367 * typeck2.c (process_init_constructor): Make mutual exclusivity
9368 of cases more obvious.
9370 1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
9372 * decl.c (lookup_name_real): OK, only warn if not lexing.
9373 Simplify suggested fix.
9375 * cp-tree.h (IDENTIFIER_MARKED): New macro.
9376 * search.c (lookup_conversions): Use breadth_first_search.
9377 (add_conversions): Avoid adding two conversions to the same type.
9378 (breadth_first_search): Work with base binfos, rather
9379 than binfos and base indices.
9380 (get_virtual_destructor): Adjust.
9381 (tree_has_any_destructor_p): Adjust.
9382 (get_matching_virtual): Adjust.
9384 * pt.c (push_template_decl_real): Generalize check for incorrect
9385 number of template parms.
9386 (is_member_template_class): #if 0.
9388 1998-10-29 Richard Henderson <rth@cygnus.com>
9390 * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
9393 1998-10-28 Zack Weinberg <zack@rabi.phys.columbia.edu>
9395 * lex.c: Call check_newline from lang_init always. After
9396 calling cpp_start_read, set yy_cur and yy_lim to read from the
9397 cpplib token buffer.
9399 1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
9401 * class.c (instantiate_type): Don't consider templates for a normal
9404 * class.c (finish_struct_1): Don't complain about non-copy
9405 assignment ops in union members.
9407 * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
9408 (prepare_fresh_vtable): Likewise.
9409 (finish_struct_1): Don't call import_export_class.
9410 * decl2.c (finish_vtable_vardecl): Do import/export stuff.
9411 (finish_prevtable_vardecl): Lose.
9412 (finish_file): Don't call it.
9413 * pt.c (instantiate_class_template): Likewise.
9414 * cp-tree.h: Remove it.
9416 * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
9417 * decl.c (finish_function): Not here.
9418 (start_function): Do set DECL_INITIAL.
9420 * pt.c (push_template_decl_real): Complain about default template
9421 args for enclosing classes.
9423 * call.c (add_function_candidate): Treat conversion functions
9424 as coming from the argument's class.
9425 * cp-tree.h (DECL_CONV_FN_P): New fn.
9426 (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
9427 * class.c (add_method): Use DECL_CONV_FN_P.
9428 * decl2.c (check_classfn): Likewise.
9429 * error.c (dump_function_name): Likewise.
9430 (dump_function_decl): Likewise.
9431 * pt.c (fn_type_unification): Likewise.
9432 * search.c (add_conversions): Likewise.
9434 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
9436 * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
9437 * method.c (hack_identifier): Also check for using RESULT_DECL
9440 1998-10-27 Mark Mitchell <mark@markmitchell.com>
9442 * decl.c (grokdeclarator): Use type_quals, rather than constp,
9445 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
9447 * call.c (standard_conversion): instantiate_type here.
9448 (reference_binding): And here.
9449 (implicit_conversion): Not here.
9450 (build_op_delete_call): No need to cons up an OVERLOAD.
9451 * cvt.c (cp_convert_to_pointer): instantiate_type here.
9452 (convert_to_reference): And here.
9453 * decl.c (grok_reference_init): Not here.
9454 (grokparms): Or here.
9455 * typeck2.c (digest_init): Or here.
9456 * typeck.c (decay_conversion): Take the address of overloaded
9458 (require_instantiated_type): Lose.
9459 (convert_arguments): Don't handle unknown types here.
9460 (build_c_cast): Likewise.
9461 (build_binary_op): Gut.
9462 (build_conditional_expr): Don't require_instantiated_type.
9463 (build_modify_expr): Likewise.
9464 (build_static_cast): Don't instantiate_type.
9465 (build_reinterpret_cast): Likewise.
9466 (build_const_cast): Likewise.
9467 (convert_for_initialization): Likewise.
9468 (build_ptrmemfunc): Use type_unknown_p.
9469 (convert_for_assignment): Also do default_conversion on overloaded
9470 functions. Hand them off to ocp_convert.
9472 1998-10-26 Mark Mitchell <mark@markmitchell.com>
9474 * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
9475 VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type.
9477 * class.c (finish_struct_1): Use build_cplus_array_type to build
9479 * decl.c (init_decl_processing): Likewise.
9480 * except.c (expand_end_eh_spec): Likewise.
9481 * search.c (expand_upcast_fixups): Simplify very slightly.
9483 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
9485 * decl.c (grokdeclarator): Complain about a variable using
9486 constructor syntax coming back null from start_decl.
9488 * friend.c (make_friend_class): Complain about trying to make
9489 a non-class type a friend.
9491 * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
9492 (start_function): Not here.
9494 1998-10-26 Brendan Kehoe <brendan@cygnus.com>
9496 * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
9498 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
9500 * typeck2.c (process_init_constructor): Only skip anonymous fields
9501 if they are bitfields.
9503 * cp-tree.def (TYPEOF_TYPE): New code.
9504 * error.c (dump_type_real): Handle it.
9505 * pt.c (tsubst): Likewise.
9506 * tree.c (search_tree): Likewise.
9507 * semantics.c (finish_typeof): New fn.
9508 * parse.y (typespec): Use it.
9509 * cp-tree.h: Declare it.
9511 1998-10-26 Manfred Hollstein <manfred@s-direktnet.de>
9513 * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
9515 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
9517 * typeck.c (convert_arguments): Don't handle pmf references
9520 * init.c (build_member_call): Don't try to convert to the base type
9521 if it's ambiguous or pedantic.
9523 * typeck2.c (check_for_new_type): Only depend on pedantic for
9526 1998-10-25 Mark Mitchell <mark@markmitchell.com>
9528 * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
9529 non-converting constructors.
9531 1998-10-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
9533 * gxxint.texi: Correct documentation for n, N, Q, and B.
9535 1998-10-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
9537 * parse.y (condition): Convert VAR_DECL from reference to indirect
9540 1998-10-23 Andrew MacLeod <amacleod@cygnus.com>
9542 * exception.cc (__cp_pop_exception): Free the original exception
9543 value, not the potentially coerced one.
9545 1998-10-23 Mark Mitchell <mark@markmitchell.com>
9547 * Makefile.in (hash.h): Run gperf when necessary.
9549 * cp-tree.h (CP_TYPE_READONLY): Remove.
9550 (CP_TYPE_VOLATILE): Likewise.
9551 (CP_TYPE_QUALS): New macro.
9552 (CP_TYPE_CONST_P): Likewise.
9553 (CP_TYPE_VOLATILE_P): Likewise.
9554 (CP_TYPE_RESTRICT_P): Likewise.
9555 (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
9556 (cp_build_type_variant): Rename to ...
9557 (cp_build_qualified_type): New function.
9558 (c_apply_type_quals_to_decl): Declare.
9559 (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
9560 (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
9561 (cp_type_qual_from_rid): New function.
9562 (compparms): Remove unused parameter. All callers changed.
9563 (cp_type_quals): New function.
9564 (at_least_as_qualified_p): Likewise.
9565 (more_qualified_p): Likewise.
9567 * call.c (standard_conversion): Replace calls to
9568 cp_build_type_variant with cp_build_qualified_type. Use
9569 CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
9570 compare them. Use CP_TYPE_* macros to check qualifiers.
9571 (reference_binding): Likewise.
9572 (implicit_conversion): Likewise.
9573 (add_builtin_candidates): Likewise.
9574 (build_over_call): Likewise.
9575 * class.c (overrides): Compare all qualifiers, not just `const',
9576 on method declarations.
9577 * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
9578 (convert_pointer_to_real): Likewise.
9579 (type_promotes_to): Likewise.
9580 * decl.c (check_for_uninitialized_const_var): New function.
9581 (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
9582 (cp_finish_decl): Use check_for_uninitialized_const_var.
9583 (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to
9585 (grok_ctor_properties): Likewise.
9586 (grok_op_properties): Likewise.
9587 (start_function): Likewise.
9588 (rever_static_member_fn): Likewise.
9589 * decl2.c (grok_method_quals): Likewise.
9590 (grokfield): Likewise.
9591 * error.c (dump_readonly_or_volatile): Rename to ...
9592 (dump_qualifiers): New function. Handle `restrict'.
9593 (dump_type_real): Use it.
9594 (dump_aggr_type): Likewise.
9595 (dump_type_prefix): Likewise.
9596 (dump_type_suffix): Likewise.
9597 (dump_function_decl): Likewise.
9598 (cv_as_string): Likewise.
9599 * gxx.gperf: Add __restrict and __restrict__.
9600 * gxxint.texi: Document `u' as used for `__restrict', and a few
9601 other previously undocumented codes.
9602 * hash.h: Regenerated.
9603 * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
9604 (build_member_call): Likewise.
9605 (build_new_1): Likewise.
9606 * lex.c (init_parse): Add entry for RID_RESTRICT.
9607 (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
9608 (cp_type_qual_from_rid): Define.
9609 * lex.h (enum rid): Add RID_RESTRICT.
9610 * method.c (process_modifiers): Deal with `restrict'.
9611 * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
9612 * parse.c: Regenerated.
9613 * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
9614 (tsubst_aggr_type): Likewise.
9616 (check_cv_quals_for_unify): Likewise.
9618 * rtti.c (init_rtti_processing): Likewise.
9619 (build_headof): Likewise.
9620 (get_tinfo_var): Likewise.
9621 (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling.
9622 (expand_class_desc): Likewise.
9623 (expand_attr_desc): Likewise.
9624 (synthesize_tinfo_fn): Likewise.
9625 * search.c (covariant_return_p): Likewise. Fix `volatile' handling.
9626 (get_matching_virtual): Likewise.
9627 (expand_upcast_fixups): Likewise.
9628 * sig.c (build_signature_pointer_or_reference_name): Take
9629 type_quals, not constp and volatilep.
9630 (build_signature_pointer_or_reference_type): Likewise.
9631 (match_method_types): More CP_TYPE_QUALS conversion, etc.
9632 (build_signature_pointer_constructor): Likewise.
9633 (build_signature_method_call): Likewise.
9634 * tree.c (build_cplus_array_type): Likewise.
9635 (cp_build_type_variant): Rename to ...
9636 (cp_build_qualified_type): New function. Deal with `__restrict'.
9637 (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
9638 (build_exception_variant): Likewise.
9640 * typeck.c (qualif_type): Likewise.
9641 (common_type): Likewise.
9642 (comptypes): Likewise.
9643 (comp_cv_target_types): Likewise.
9644 (at_least_as_qualified_p): Define.
9645 (more_qualified_p): Likewise.
9646 (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
9647 (compparms): Likewise.
9648 (inline_conversion): Likewise.
9649 (string_conv_p): Likewise.
9650 (build_component_ref): Likewise.
9651 (build_indirect_ref): Likewise.
9652 (build_array_ref): Likewise.
9653 (build_unary_op): Likewise.
9654 (build_conditional_expr): Likewise.
9655 (build_static_cast): Likewise.
9656 (build_c_cast): Likewise.
9657 (build_modify_expr): Likewise.
9658 (convert_For_assignment): Likewise.
9659 (comp_ptr_ttypes_real): Likewise.
9660 (cp_type_quals): New function.
9662 1998-10-23 Jason Merrill <jason@yorick.cygnus.com>
9664 * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
9665 (CP_TYPE_VOLATILE): Likewise.
9666 * decl.c (grokdeclarator): Use them.
9667 * tree.c (canonical_type_variant): Likewise.
9669 1998-10-22 Martin von Löwis <loewis@informatik.hu-berlin.de>
9671 * parse.y (named_class_head): Push into class while parsing the
9673 * decl2.c (push_scope, pop_scope): New functions.
9674 * cp-tree.h: Declare them.
9675 * init.c (build_new_1): Delay cleanup until end of full expression.
9677 1998-10-21 Jason Merrill <jason@yorick.cygnus.com>
9679 * typeck.c (build_component_ref): Use of a type here is an error.
9681 1998-10-19 Jason Merrill <jason@yorick.cygnus.com>
9683 Revamp references to member functions.
9684 * method.c (hack_identifier): Call build_component_ref for a
9685 reference to a member function.
9686 * typeck.c (build_component_ref): Only return a single function
9687 if it's static. Otherwise, return a COMPONENT_REF.
9688 (build_x_function_call): Handle a COMPONENT_REF.
9689 (build_unary_op): Handle all unknown-type things.
9690 * decl2.c (arg_assoc): Handle COMPONENT_REF.
9691 * class.c (instantiate_type): Complain if the function we get is a
9692 nonstatic member function. Remove code for finding "compatible"
9694 * pt.c (tsubst_copy): Handle NOP_EXPR.
9695 * tree.c (build_dummy_object): New fn.
9696 (maybe_dummy_object): New fn.
9697 (is_dummy_object): New fn.
9698 * cp-tree.h: Declare them.
9699 * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
9700 * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
9701 * init.c (build_member_call): Use maybe_dummy_object and
9703 (build_offset_ref): Use maybe_dummy_object.
9704 (resolve_offset_ref): Use is_dummy_object.
9705 * typeck.c (build_x_function_call): Call build_dummy_object.
9706 (unary_complex_lvalue): Call is_dummy_object.
9708 * typeck.c (build_component_addr): Make sure field is a field.
9710 * call.c (build_new_op): Delete obsolete code.
9712 * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
9714 1998-10-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
9716 * decl2.c (validate_nonmember_using_decl): Fix using-directives of
9717 std if std is ignored.
9719 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
9721 * decl.c (grokvardecl): Fix thinko.
9723 * decl.c (grokdeclarator): Embedded attrs bind to the right,
9726 * parse.y (fn.def2): Fix 'attrs' format.
9728 1998-10-18 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
9730 * Makefile.in (CONFLICTS): Update.
9731 * parse.y (expr_or_declarator_intern): New rule.
9732 (expr_or_declarator, direct_notype_declarator, primary,
9733 functional_cast): Use it.
9734 (notype_declarator_intern): New rule.
9735 (notype_declarator, complex_notype_declarator): Use it.
9737 1998-10-17 Jason Merrill <jason@yorick.cygnus.com>
9739 * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
9740 (grokvardecl): Likewise.
9742 Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9744 * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
9745 (add_method): Likewise for arguments 1 & 2 of `bcopy'.
9747 * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
9749 * pt.c (process_partial_specialization): Cast 1st argument of
9752 * tree.c (build_base_fields): Cast `base_align' to (int) when
9753 comparing against one.
9755 1998-10-16 Mark Mitchell <mark@markmitchell.com>
9757 * decl.c (lookup_name_real): Handle template parameters for member
9758 templates where said parameters have the same name as the
9761 * decl.c (expand_static_init): Build cleanups before entering the
9762 anonymous function used to do them to avoid access-checking
9765 * decl.c (grokfndecl): Add back call to cplus_decl_attributes
9766 accidentally removed by previous change, and make DECL_RTL here.
9767 * class.c (add_method): Don't make DECL_RTL here.
9769 * pt.c (for_each_template_parm): Don't examine uninstantiated
9772 1998-10-16 Dave Brolley <brolley@cygnus.com>
9774 * lex.c (real_yylex): Fix unaligned access of wchar_t.
9776 1998-10-16 Mark Mitchell <mark@markmitchell.com>
9778 * class.c (add_method): Fix documentation to reflect previous
9779 changes. Check for duplicate method declarations here.
9780 * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
9781 correctly; such things never match.
9782 (grokfndecl): Don't look for duplicate methods here.
9783 * decl2.c (check_classfn): Don't assume names are mangled.
9784 Don't add bogus member function declarations to a class before the
9785 class type is complete.
9786 (grokfield): Reformat error message.
9787 * method.c (set_mangled_name_for_decl): Don't mangle names while
9788 processing_template_decl.
9790 1998-10-16 Jason Merrill <jason@yorick.cygnus.com>
9792 * typeck.c (build_indirect_ref): Complain about a pointer to data
9794 * typeck2.c (build_m_component_ref): Don't indirect a pointer to
9796 * init.c (resolve_offset_ref): Don't undo the above.
9798 * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
9799 (struct lang_decl_flags): Add `bitfield'.
9800 * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
9802 * decl2.c (grokbitfield, grok_alignof): Likewise.
9803 * init.c (build_offset_ref): Likewise.
9804 * typeck.c (build_component_addr, expr_sizeof): Likewise.
9805 * cvt.c (build_up_reference): Don't crash if taking the address
9806 returns error_mark_node.
9808 * decl.c (grokfndecl): Also check ctype when checking for ::main().
9810 1998-10-15 Jason Merrill <jason@yorick.cygnus.com>
9812 * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
9814 (grokdeclarator): Instead of here.
9815 * friend.c (do_friend): Lose special handling of ::main and
9817 * cp-tree.h (DECL_MAIN_P): Check for C linkage.
9819 * spew.c (yylex): Clear looking_for_typename if we got
9822 1998-10-15 Mark Mitchell <mark@markmitchell.com>
9824 * class.c (maybe_warn_about_overly_private_class): Improve error
9825 messages for class with only private constructors.
9827 * cp-tree.def (TYPENAME_TYPE): Add to documentation.
9828 * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
9829 (build_typename_type): New function.
9830 * decl.c (build_typename_type): Broken out from ...
9831 (make_typename_type): Use it.
9832 * search.c (lookup_field): Likewise.
9834 1998-10-14 Benjamin Kosnik <bkoz@rhino.cygnus.com>
9836 * pt.c (convert_nontype_argument): Check against type_referred_to.
9837 * decl.c (grokvardecl): Check for declarator name before building
9838 DECL_ASSEMBLER_NAME.
9840 1998-10-14 Mark Mitchell <mark@markmitchell.com>
9842 * pt.c (lookup_template_class): Add comment.
9843 (instantiate_class_template): Don't mark the _TYPE node for
9844 member class templates as an instantiation.
9846 1998-10-14 Jason Merrill <jason@yorick.cygnus.com>
9848 * decl.c (grokfndecl): Fix my thinko.
9850 1998-10-13 Jason Merrill <jason@yorick.cygnus.com>
9852 * tinfo2.cc (fast_compare): Remove.
9853 (before): Just use strcmp.
9854 * tinfo.cc (operator==): Just use strcmp.
9856 1998-10-13 Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
9858 * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
9861 1998-10-13 Mark Mitchell <mark@markmitchell.com>
9863 * cp-tree.h (specializations_of_same_template_p): Remove.
9864 * search.c (get_template_base): Don't use it.
9865 (get_template_base_recursive): Likewise.
9866 * pt.c (specializations_of_same_template_p): Remove.
9867 (unify): Don't use it.
9868 (lookup_template_class): Find the correct parent when setting
9869 CLASSTYPE_TI_TEMPLATE.
9871 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
9873 * tinfo.cc (operator==): Always compare names.
9875 1998-10-12 Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
9877 * decl.c (start_function): Fix cut-and-paste error.
9879 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
9881 * inc/typeinfo: Add #pragma interface.
9882 (operator!=): Just call operator==.
9883 * tinfo.cc: Add #pragma implementation.
9884 (operator==): Move from inc/typeinfo and tinfo2.cc.
9885 Check __COMMON_UNRELIABLE instead of _WIN32.
9887 * typeck2.c (my_friendly_abort): Add URL.
9889 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
9891 * decl.c (start_method): Added extra parameter for attributes.
9892 * cp-tree.h (start_method): Update prototype.
9893 * parse.y (fn.def2): Update start_method parameter list.
9895 1998-10-11 Mark Mitchell <mark@markmitchell.com>
9897 * cp-tree.h (specializations_of_same_template_p): Declare.
9898 * pt.c (specializations_of_same_template_p): New function.
9900 * search.c (get_template_base): Use it.
9901 (get_template_base_recursive): Likewise.
9903 1998-10-10 Manfred Hollstein <manfred@s-direktnet.de>
9905 * decl2.c (start_objects): Add new variable `joiner' and
9906 initialize it properly.
9908 1998-10-09 Mark Mitchell <mark@markmitchell.com>
9910 * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
9911 change to vtable types.
9913 * cvt.c (ocp_convert): Avoid infinite recursion caused by
9916 1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
9918 * pt.c (resolve_overloaded_unification): New fn.
9919 (try_one_overload): Likewise.
9920 (unify): Don't fail on unknown type.
9921 (type_unification_real): Likewise. Use resolve_overloaded_unification
9922 to handle an overloaded argument.
9923 (template_args_equal): Split out...
9924 (comp_template_args): From here.
9925 (determine_specialization): Also allow a template with more
9926 parms than were explicitly specified.
9927 * cp-tree.h: Add template_args_equal.
9928 * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
9930 Thu Oct 8 15:58:30 1998 Anthony Green <green@cygnus.com>
9932 * semantics.c (finish_asm_stmt): Revert my 1998-09-28
9935 Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com)
9937 * typeck.c (unsigned_type): Only return TItype nodes when
9938 HOST_BITS_PER_WIDE_INT is >= 64 bits.
9939 (signed_type): Likewise.
9940 * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
9941 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
9942 (init_decl_processing): Only create TItype nodes when
9943 HOST_BITS_PER_WIDE_INT is >= 64 bits.
9944 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
9945 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
9947 Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9949 * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
9950 (gxx.gperf): Update comments describing invocation flags.
9951 (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
9953 1998-10-07 Mark Mitchell <mark@markmitchell.com>
9955 * class.c (finish_struct_1): Add commentary on previous change.
9957 * cp-tree.h (vtbl_ptr_type_node): New variable.
9958 * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
9959 already of the right type.
9960 (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
9961 Simplify code to grow vtable.
9962 * decl.c (vtbl_ptr_type_node): Define.
9963 (init_decl_processing): Initialize it.
9965 1998-10-06 Mark Mitchell <mark@markmitchell.com>
9967 * cp-tree.def (PTRMEM_CST): New tree node.
9968 * cp-tree.h (ptrmem_cst): New type.
9969 (lang_type): Remove local_typedecls.
9970 (dummy): Increase to 12 bits from 11.
9971 (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
9972 (PTRMEM_CST_CLASS): New macro.
9973 (PTRMEM_CST_MEMBER): Likewise.
9974 (current_access_specifier): New variable.
9975 (current_class_type): Remove duplicate declaration.
9976 (finish_struct): Change prototype.
9977 (unreverse_member_declarations): New function.
9978 (pushdecl_class_level): Change prototype.
9979 (grok_enum_decls): Remove.
9980 (fixup_anonymous_union): New function.
9981 (grok_x_components): Change prototype.
9982 (tsubst_chain): Remove.
9983 (finish_member_template_decl): Likewise.
9984 (check_explicit_specialization): Fix indentation.
9985 (finish_class_definition): Change prototype.
9986 (finish_member_class_template): Likewise.
9987 (finish_member_declaration): New function.
9988 (check_multiple_declarators): Likewise.
9989 * class.c (class_stack_node_t): New type.
9990 (current_class_base): Remove.
9991 (current_class_stack): Change type.
9992 (current_access_specifier): New variable.
9993 (grow_method): Remove.
9994 (check_member_decl_is_same_in_complete_scope): Break out from
9996 (make_method_vec): New function.
9997 (free_method_vec): Likewise.
9998 (add_implicitly_declared_members): Break out from finish_struct_1.
9999 (free_method_vecs): New variable.
10000 (add_method): Rework for direct use from parser.
10001 (handle_using_decl): Watch for NULL_TREE while iterating through
10002 CLASSTYPE_METHOD_VEC.
10003 (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
10004 just do some error-checking.
10005 (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
10006 (finish_struct_1): Simplify. Use add_implicitly_declared_members.
10007 (finish_struct): Change prototype. Simplify; fields and methods
10008 are already set up at this point.
10009 (init_class_processing): Set up current_class_stack.
10010 (pushclass): Save current_access_specifier.
10011 (popclass): Restore it.
10012 (currently_open_class): Simplify.
10013 (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
10014 * decl.c (saved_scope): Add access_specifier.
10015 (maybe_push_to_top_level): Save it.
10016 (pop_from_top_level): Restore it.
10017 (maybe_process_template_type_declaration): Use
10018 finish_member_declaration.
10019 (pushtag): Likewise.
10020 (pushdecl_class_level): Don't return a value.
10021 (fixup_anonymous_union): Break out from grok_x_components.
10022 (shadow_tag): Use it.
10023 (xref_tag): Complain about using an elaborated type specifier to
10024 reference a template type parameter or typedef name.
10025 (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
10026 (current_local_enum): Remove.
10027 (build_enumerator): Call finish_member_declaration.
10028 (grok_enum_decls): Remove.
10029 * decl2.c (grok_x_components): Simplify.
10030 (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
10031 (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
10032 (merge_functions): Add to comment.
10033 (arg_assoc_type): Prototype.
10034 (arg_assoc): Pass as many arguments as there are parameters.
10035 * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of
10037 * expr.c (cpls_expand_expr): Remove dead code. Handle
10039 * friend.c (do_friend): Lookup friends when in nested classes.
10041 * init.c (build_offset_ref): Do lookup even for classes that are
10042 only partially defined.
10043 (decl_constant_value): Remove dead code.
10044 * method.c (build_overload_value): Remove hack where by TYPE was
10045 not a TYPE. Handle PTRMEM_CST.
10046 (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
10048 * parse.y (components, notype_components, component_decl,
10049 component_decl_1, component_declarator, component_declarator0):
10050 Now all are itype rather than ttype. Rework to add members to
10051 classes on the fly.
10052 (typesqpecqual_reserved): Use check_multiple_declarators.
10053 (structsp): Update class to finish_class_definition.
10054 (do_xref_defn): Unsplit into named_class_head.
10055 (access_specifier): Set current_access_specifier.
10056 * pt.c (set_current_access_from_decl): New function.
10057 (finish_member_template_decl): Don't take the parameters.
10058 (comp_template_args): Make more robust.
10059 (lookup_template_class): Don't use current_local_enum.
10060 (for_each_template_parm): Handle PTRMEM_CST.
10061 (instantiate_class_template): Use set_current_access_from_decl,
10062 finish_member_declaration and unreverse_member_declarations. Set
10063 lineno/input_filename before generating implicit member functions.
10064 (type_unification_real): Don't assume back-unification happens
10065 only for the last argument.
10066 (regenerate_decl_from_template): Call pushclass a bit earlier.
10067 (tsubst_chain): Remove.
10068 (tsubst_enum): Use set_current_access_from_decl.
10069 (set_mangled_name_for_template_decl): Fix indentation.
10070 * search.c (lookup_fnfields_1): Change iteration through
10071 CLASSTYPE_METHOD_VEC.
10072 (dfs_pushdecls): Likewise.
10073 (dfs_compress_decls): Likewise.
10074 (add_conversions): Likewise.
10075 * semantics.c (finish_class_definition): Don't take components.
10076 Change call to finish_struct.
10077 (finish_member_declaration): New function.
10078 (finish_member_class_template): Don't take template parameters.
10079 Change call to grok_x_components. Call finish_member_template_decl.
10080 (check_multiple_declarators): New function.
10081 * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
10082 a passed in fieldlist.
10083 * tree.c (search_tree): Handle PTRMEM_CST.
10084 (mapcar): Likewise.
10085 * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
10086 INTEGER_CSTs, for pointer-to-data members.
10088 * call.c (resolve_args): Resolve template specializations, if
10091 Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10093 * Makefile.in (spew.o): Depend on toplev.h.
10095 * call.c (compare_ics): Initialize variables `deref_from_type2',
10096 `deref_to_type1' and `deref_to_type2'.
10098 * except.c (get_eh_type): Hide prototype and definition.
10099 (process_start_catch_block_old): Remove unused static prototype.
10101 * pt.c (tsubst_decl): Initialize variable `argvec'.
10103 * spew.c: Include toplev.h.
10105 1998-10-05 Jason Merrill <jason@yorick.cygnus.com>
10107 * pt.c (instantiate_decl): Do save and restore file position.
10109 1998-10-05 Martin von Löwis <loewis@informatik.hu-berlin.de>
10111 * method.c (build_decl_overload_real): Clear
10112 numeric_output_need_bar after __.
10114 1998-10-05 Nathan Sidwell <nathan@acm.org>
10116 * call.c (build_new_method_call): Issue 'incomplete type' error,
10117 if class is not defined.
10119 1998-10-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10121 * call.c (build_object_call): Move declaration of variable
10122 `fn' into the scope where it is used. Don't access variable
10123 `fn' when it is uninitialized, instead use `fns'.
10125 1998-10-04 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10127 * errfn.c (cp_thing): Print buf as a string not as a printf format
10128 to avoid problems with the operator%. Consequently, `%%' sequences
10129 in format are copied as `%' in buf.
10131 1998-10-04 Jason Merrill <jason@yorick.cygnus.com>
10133 * pt.c (pop_tinst_level): Call extract_interface_info.
10134 (instantiate_decl): Don't save and restore file position.
10136 * decl.c (cp_finish_decl): Make statics in extern inlines and
10137 templates common, if possible and the target doesn't support weak
10140 * decl.c (grokdeclarator): Remove redundant calls to
10141 build_type_variant and some duplicated code.
10142 * sig.c (build_signature_reference_type): Only take the type parm.
10143 (build_signature_pointer_type): Likewise.
10144 * tree.c (build_cplus_method_type): Adjust.
10145 * cp-tree.h: Update.
10147 1998-10-04 Mark Mitchell <mark@markmitchell.com>
10149 * call.c (build_over_call): Make pedwarns about dropped qualifiers
10150 into full-fledged errors.
10151 * cvt.c (convert_to_reference): Likewise.
10152 * typeck.c (convert_for_assignment): Likewise.
10154 * search.c (expand_upcast_vtables): In addition to unsetting
10155 TREE_READONLY, remove top-level const type qualifier.
10157 1998-10-03 Mark Mitchell <mark@markmitchell.com>
10159 * class.c (current_class_ptr, current_class_ref): Clarify
10161 * cvt.c (ocp_convert): Don't expect fold to remove all trivial
10162 NOP type conversions.
10163 * decl.c (decls_match): Use comptypes directly; ignore
10164 qualifiers on the DECL.
10165 (duplicate_decls): Remove qualifier checks on DECL.
10166 (grokdeclarator): Make the type built up include top-level
10168 * decl2.c (do_dtors): Fix spelling error.
10169 * error.c (dump_simple_decl): Don't look at qualifiers on the decl
10170 when printing type information.
10171 * init.c (build_new_1): Add documentation. Deal with the fact
10172 that type of allocated memory now contains qualifiers.
10173 * lex.c (is_global): Improve error-recovery.
10174 * sig.c (build_member_function_pointer): Don't cast away const
10175 on fields of sigtable_entry_type.
10176 * tree.c (lvalue_type): Don't look at top-level qualifiers on
10178 * typeck.c (decay_conversion): Likewise.
10179 (build_component_ref): Make sure the type of the COMPONENT_REF
10180 contains top-level qualifiers, as appropriate. Improve
10182 (build_indirect_ref): Simplify. Don't strip top-level qualifiers.
10183 (build_array_ref): Likewise.
10184 (build_unary_op): Improve error-recovery.
10185 (unary_complex_lvalue): Make taking the address a bound member
10186 function an error, not a sorry.
10187 (build_conditional_expr): Look at the type qualifiers, not the
10188 qualifiers on the expression itself.
10190 1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
10192 * decl2.c (merge_functions): Remove duplicates.
10194 * decl2.c: Add -f{no-,}implicit-inline-templates.
10195 (import_export_decl): Check it.
10197 * decl.c (lookup_name_real): Template parms also take precedence
10198 over implicit typename. Only warn if yylex.
10200 * typeck.c (build_conditional_expr): Only fold if ifexp is an
10203 * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
10204 instead of linkage.
10206 1998-10-01 Jason Merrill <jason@yorick.cygnus.com>
10208 * cp-tree.h (FORMAT_VBASE_NAME): New macro.
10209 * class.c (build_vbase_pointer): Use it.
10210 * rtti.c (expand_class_desc): Likewise.
10211 * tree.c (build_vbase_pointer_fields): Likewise.
10213 Thu Oct 1 10:43:45 1998 Nick Clifton <nickc@cygnus.com>
10215 * decl.c (start_decl): Add invocation of
10216 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
10217 (start_function): Add invocation of
10218 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
10220 * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
10221 HANDLE_GENERIC_PRAGMAS.
10223 1998-09-28 Anthony Green <green@cygnus.com>
10225 * semantics.c (finish_asm_stmt): Always permit volatile asms.
10227 1998-09-28 Mark Mitchell <mark@markmitchell.com>
10229 * decl.c (grokdeclarator): Tighten checks for invalid
10230 destructors. Improve error-messages and error-recovery.
10231 * decl2.c (check_classfn): Don't assume that mangled destructor
10232 names contain type information.
10234 1998-09-25 Jason Merrill <jason@yorick.cygnus.com>
10236 * search.c (get_base_distance): Remove assert.
10238 * decl2.c (build_anon_union_vars): Don't process a field with no
10240 (finish_anon_union): Also complain about local anon unions with no
10243 1998-09-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
10245 * decl.c (lookup_namespace_name): If the name is a namespace,
10246 return it immediately.
10248 Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10250 * cp-tree.h (define_case_label): Remove unused parameter.
10251 (check_java_method): Likewise.
10252 (grokclassfn): Likewise.
10253 (expand_aggr_init): Likewise.
10254 (build_x_delete): Likewise.
10255 (maybe_end_member_template_processing): Likewise.
10256 (unshare_base_binfos): Add prototype.
10257 (string_conv_p): Likewise.
10258 (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
10260 * cvt.c (build_up_reference): Remove unused parameter
10261 `checkconst', all callers changed.
10262 (build_type_conversion): Mark parameter `code' with
10264 (build_expr_type_conversion): Initialize variable `conv'.
10266 * decl.c (push_namespace): Initialize variable `d'.
10267 (define_case_label): Remove unused parameter `decl', all callers
10270 * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
10271 `argc' with ATTRIBUTE_UNUSED.
10272 (grokclassfn): Remove unused parameter `cname', all callers
10274 (check_java_method): Likewise for parameter `ctype'.
10275 (copy_assignment_arg_p): Mark parameter `virtualp' with
10277 (finish_prevtable_vardecl): Likewise for parameter `prev'.
10279 * expr.c (extract_init): Likewise for parameters `decl' and `init'.
10281 * init.c (expand_aggr_init_1): Remove unused parameter
10282 `alias_this', all callers changed.
10283 (expand_aggr_init): Likewise.
10284 (expand_default_init): Likewise.
10285 (build_new_1): Initialize variable `susp'.
10286 (build_x_delete): Remove unused parameter `type', all callers
10289 * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
10291 (readescape): Use (unsigned) value in shift.
10292 (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when
10293 comparing to a signed quantity.
10295 * pt.c (maybe_end_member_template_processing): Remove unused
10296 parameter `decl', all callers changed.
10297 (check_explicit_specialization): Add braces around empty body in
10299 (current_template_args): Initialize variable `args'.
10300 (lookup_template_class): Likewise for variable `prev_local_enum'.
10301 (tsubst_decl): Likewise for variable `r'.
10302 (set_mangled_name_for_template_decl): Initialize variable
10305 * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
10306 Likewise for variable `i'.
10307 (yylex): Initialize variable `trrr'.
10309 * typeck.c (compparms): Mark variable `strict' with
10312 * xref.c (simplify_type): Cast argument of ctype function to
10315 1998-09-24 Mark Mitchell <mark@markmitchell.com>
10317 * cp-tree.h (language_lvalue_valid): Remove.
10318 * decl.c (grokdeclarator): Don't disallow references to functions.
10319 * tree.c (lvalue_p_1): New function, combining duplicated
10321 (lvalue_p): Use it.
10322 (real_lvalue_p): Likewise.
10323 * typeck.c (language_lvalue_valid): Remove.
10324 (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
10325 they don't have TREE_READONLY set.
10326 * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
10328 1998-09-24 Benjamin Kosnik <bkoz@loony.cygnus.com>
10330 * spew.c (yylex): Give diagnostic.
10331 * hash.h (is_reserved_word): Add export.
10332 * gxx.gperf: Likewise.
10333 * lex.h (rid): Add RID_EXPORT.
10334 * lex.c (init_parse): Likewise.
10336 Tue Sep 22 21:01:19 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
10338 * friend.c (do_friend): Make warning a full sentence.
10340 1998-09-22 Mark Mitchell <mark@markmitchell.com>
10342 * parse.y (component_decl_list): Improve error-recovery.
10344 1998-09-22 Benjamin Kosnik <bkoz@loony.cygnus.com>
10346 * decl.c (make_typename_type): Move error to point where name
10347 variable can be used by dump_type.
10349 1998-09-22 Mark Mitchell <mark@markmitchell.com>
10351 * decl.c (grokfndecl): Improve error-recovery.
10352 * decl2.c (grokfield): Likewise.
10353 * pt.c (finish_member_template_decl): Likewise.
10355 1998-09-20 Martin von Löwis <loewis@informatik.hu-berlin.de>
10357 * method.c (hack_identifier): Finding multiple members is always
10360 1998-09-21 Per Bothner <bothner@cygnus.com>
10362 * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o.
10364 Mon Sep 21 01:53:05 1998 Felix Lee <flee@cygnus.com>
10366 * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
10368 1998-09-20 Mark Mitchell <mark@markmitchell.com>
10370 * class.c (maybe_warn_about_overly_private_class): Reformat.
10372 1998-09-17 Andrew MacLeod <amacleod@cygnus.com>
10374 * exception.cc (__cplus_type_matcher): Realign some code.
10376 1998-09-16 Mark Mitchell <mark@markmitchell.com>
10378 * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
10379 (tinfo2.o): Likewise.
10380 (exception.o): Likewise.
10382 (opnew.o): Likewise.
10383 (opnewnt.o): Likewise.
10384 (opvnew.o): Likewise.
10385 (opvnewnt.o): Likewise.
10386 (opdel.o): Likewise.
10387 (opdelnt.o): Likewise.
10388 (opvdel.o): Likewise.
10389 (opvdelnt.o): Likewise.
10391 1998-09-16 Richard Henderson <rth@cygnus.com>
10393 * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
10395 1998-09-15 Alexandre Oliva <oliva@dcc.unicamp.br>
10397 * call.c (build_field_call): Handle static data members too.
10399 * typeck.c (comptypes): When comparing pointer types, check
10400 whether referred types match even in strictest modes.
10402 1998-09-15 Mark Mitchell <mark@markmitchell.com>
10404 * cp-tree.h: Revert previous change.
10405 (finish_struct_methods): Remove declaration.
10406 * class.c: Revert previous change.
10407 (maybe_warn_about_overly_private_class): New function.
10408 (finish_struct_methods): Declare here, and make static. Remove
10409 unnecessary parameters. Tidy slightly. Use
10410 maybe_warn_about_overly_private_class.
10411 (finish_struct_1): Adjust. Remove check for private constructors,
10412 now done elsewhere.
10413 (finish_struct): Adjust.
10415 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
10417 * except.c (expand_start_catch_block): No need to check for new
10419 (process_start_catch_block_old): Deleted.
10420 (process_start_catch_block): Add call to start_decl_1().
10421 (expand_end_catch_block): Add call to end_catch_handler().
10422 * exception.cc (__cplus_type_matcher): Only check the exception
10423 language if there is an exception table.
10425 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
10427 * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
10428 as used to prevent conflicts with virtual function tables.
10430 1998-09-14 Mark Mitchell <mark@markmitchell.com>
10432 * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
10433 (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
10434 * class.c (maybe_class_too_private_p): New function.
10435 (finish_struct_methods): Use it.
10436 (finish_struct_1): Likewise.
10437 (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
10440 * pt.c (check_specialization_scope): Fix spelling error.
10441 (check_explicit_specialization): Remove code to handle explicit
10442 specializations in class scope; they are now correctly diagnosed
10445 1998-09-10 Mark Mitchell <mark@markmitchell.com>
10447 * decl.c (pushdecl): Don't copy types if the
10448 DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
10451 1998-09-09 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
10453 * class.c (get_enclosing_class): New function.
10454 (is_base_of_enclosing_class): Likewise.
10455 * cp-tree.h (get_enclosing_class): Declare.
10456 (is_base_of_enclosing_class): Likewise.
10457 * pt.c (coerce_template_parms): Use them.
10459 1998-09-09 Jason Merrill <jason@yorick.cygnus.com>
10461 * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
10462 null to decide whether to use it.
10464 * error.c (dump_type_real): Handle NAMESPACE_DECL.
10465 * parse.y (base_class.1): Avoid crash on error.
10467 1998-09-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
10469 * decl.c (make_typename_type): If context is a namespace, the code
10472 1998-09-08 Mumit Khan <khan@xraylith.wisc.edu>
10474 * parse.y (nomods_initdcl0): Set up the parser stack correctly.
10476 1998-09-08 Mark Mitchell <mark@markmitchell.com>
10478 * cp-tree.h (anonymous_namespace_name): Declare.
10479 * decl.c: Define it.
10480 (push_namespace): Use anonymous_namespace_name, rather than local
10482 * error.c (dump_decl): If a namespace is named
10483 anonymous_namespace_name, call it {anonymous}.
10485 * decl.c (grokparms): Distinguish between references and pointers
10488 1998-09-08 Richard Henderson <rth@cygnus.com>
10489 Mark Mitchell <mark@markmitchell.com>
10491 * pt.c (process_partial_specialization): Consistently allocate
10492 and zero tpd.parms based on ntparms. Use tpd2.parms, not
10493 tpd.parms, where appropriate.
10495 Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com)
10497 * Makefile.in (INCLUDES): Update after recent toplevel gcc
10500 1998-09-05 Mark Mitchell <mark@markmitchell.com>
10502 * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
10503 * class.c (finish_struct): Remove hackery to deal with explicit
10504 specializations in class scope.
10505 * decl.c (grokfndecl): Improve error-recovery.
10506 * decl2.c (grokfield): Likewise.
10507 * pt.c (check_specialization_scope): New function.
10508 (begin_specialization): Call it.
10509 (process_partial_specialization): New function, split out from
10510 push_template_decl. Check partial specializations more
10512 (push_template_decl): Call it.
10513 (check_explicit_specialization): Don't attempt to handle explicit
10514 specializations in class scope.
10515 (template_parm_data): Document. Add current_arg and
10516 arg_uses_template_parms.
10517 (mark_template_parm): Set it.
10518 (tsubst_arg_types): Remove unused variable.
10519 * semantics.c (begin_class_definition): Tweak.
10521 1998-09-04 Mark Mitchell <mark@markmitchell.com>
10523 * inc/typeinfo (type_info::type_info(const char*)): Make
10526 * cp-tree.h (hash_tree_cons_simple): New macro.
10527 * pt.c (tsubst_arg_types): New function. Use hash_tree_cons.
10528 (coerce_template_parms): Use make_temp_vec, instead of
10529 make_tree_vec. Document this behavior.
10530 (lookup_template_class): Likewise.
10531 (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
10532 Remove dead code (and add assertion to check its deadness). Fix
10533 bug w.r.t. exception specifications.
10535 1998-09-03 Jason Merrill <jason@yorick.cygnus.com>
10537 * decl2.c (import_export_vtable): Always make artificials comdat.
10538 (import_export_decl): Likewise.
10539 * pt.c (mark_decl_instantiated): Likewise.
10541 1998-09-03 Mark Mitchell <mark@markmitchell.com>
10543 * cp-tree.h (finish_globally_qualified_member_call_expr):
10545 (finish_qualified_call_expr).
10546 * semantics.c: Likewise.
10547 * parse.y (primary): Use it.
10548 * method.c (hack_identifier): Remove redundant code.
10550 * init.c (resolve_offset_ref): Call convert_from_reference to
10551 handle members of reference type. Improve error recovery.
10553 1998-09-03 Benjamin Kosnik <bkoz@cygnus.com>
10555 * cp-tree.h: Declare warn_nontemplate_friend.
10556 * decl2.c (lang_decode_option): Set.
10557 * lang-options.h: Add -Wnon-template-friend.
10558 * friend.c (do_friend): Use to toggle non-template function warning.
10560 1998-09-03 Mark Mitchell <mark@markmitchell.com>
10562 * decl.c (finish_enum): Don't resolve CONST_DECLs to their
10563 corresponding INTEGER_CSTs when processing_template_decl.
10564 * pt.c (tsubst_enum): Tweak accordingly.
10566 1998-09-03 Benjamin Kosnik <bkoz@rhino.cygnus.com>
10568 * decl.c (pushdecl_class_level): Add warning here.
10571 1998-09-02 Jason Merrill <jason@yorick.cygnus.com>
10573 * cvt.c (convert_pointer_to_real): Tidy.
10574 * search.c (get_base_distance_recursive): Simplify.
10575 (get_base_distance): Likewise.
10577 * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
10580 Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
10582 * lex.c (check_newline): Call HANDLE_PRAGMA before
10583 HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages
10584 if unknown pragmas are encountered.
10585 (handle_sysv_pragma): Interpret return code from
10586 handle_pragma_token (). Return success/failure indication rather
10587 than next unprocessed character.
10588 (pragma_getc): New function: retrieves characters from the
10589 input stream. Defined when HANDLE_PRAGMA is defined.
10590 (pragma_ungetc): New function: replaces characters back into the
10591 input stream. Defined when HANDLE_PRAGMA is defined.
10593 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
10595 * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
10596 * class.c (build_vtable_entry_ref): Likewise.
10598 1998-09-01 Mark Mitchell <mark@markmitchell.com>
10600 * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
10601 * decl2.c (import_export_decl): Likewise.
10602 * pt.c (instantiate_decl): Use it.
10604 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
10606 * decl.c (lookup_name_real): Also do implicit typename thing for
10607 artificial TYPE_DECLs.
10608 * search.c (lookup_field): Likewise.
10609 (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
10610 * semantics.c (begin_constructor_declarator): Use enter_scope_of.
10611 (enter_scope_of): Extract type from implicit typename.
10612 (begin_class_definition): Likewise.
10613 * lex.c (identifier_type): Handle implicit typename when checking
10616 * cp-tree.h: Declare flag_strict_prototype.
10617 * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
10618 -fstrict-prototype.
10619 * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
10620 specified, set it to the value of pedantic.
10622 1998-09-01 Mark Mitchell <mark@markmitchell.com>
10624 * decl2.c (arg_assoc): Handle template-id expressions as arguments.
10626 1998-08-31 Mark Mitchell <mark@markmitchell.com>
10628 * decl.c (finish_enum): Handle member enums of classes declared in
10629 template functions.
10631 * decl2.c (grok_x_components): Strip attributes before calling
10634 1998-08-31 Jason Merrill <jason@yorick.cygnus.com>
10636 * cp-tree.h, decl2.c: Remove support for -fall-virtual,
10637 -fenum-int-equivalence and -fno-nonnull-objects.
10638 * class.c (check_for_override): Remove support for -fall-virtual.
10639 (finish_struct_1): Likewise.
10640 * call.c (build_new_op): Remove support for -fenum-int-equivalence.
10641 * typeck.c (build_binary_op_nodefault): Likewise.
10642 * cvt.c (ocp_convert): Likewise.
10643 * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
10644 * class.c (build_vbase_path): Likewise.
10646 Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org)
10648 * Makefile.in (INTERFACE): New, set to 1.
10650 1998-08-30 Mark Mitchell <mark@markmitchell.com>
10652 * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
10653 comparing with global_namespace.
10654 (dump_aggr_type): Likewise.
10656 * decl.c (grokfndecl): Issue error on declaration of friend
10657 templates with explicit template arguments.
10659 * pt.c (convert_template_argument): New function, split out
10661 (coerce_template_parms): Here.
10662 (tsubst): Attempt better error-recovery.
10664 1998-08-28 Benjamin Kosnik <bkoz@loony.cygnus.com>
10666 * pt.c (decl_template_parm_p): Add checks for
10667 TEMPLATE_TEMPLATE_PARM.
10669 1998-08-28 Mark Mitchell <mark@markmitchell.com>
10671 * lex.c (do_identifier): Fix thinko in previous change.
10673 1998-08-28 Jason Merrill <jason@yorick.cygnus.com>
10675 * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
10676 * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
10678 1998-08-28 Richard Henderson <rth@cygnus.com>
10680 Add support for discarding unused virtual functions.
10681 * lang-options.h: Add -fvtable-gc.
10682 * cp-tree.h: Add flag_vtable_gc.
10683 * decl2.c (output_vtable_inherit): New fn.
10684 (finish_vtable_vardecl): Call it.
10685 * class.c (build_vtable_entry_ref): New fn.
10686 (build_vtbl_ref): Call it.
10688 1998-08-28 Mark Mitchell <mark@markmitchell.com>
10690 * cp-tree.h (build_enumerator): Take the enumeration type as a
10692 * decl.c (finish_enum): Don't set the TREE_TYPE for the
10693 enumeration constant values if we're processing_template_decls.
10694 Don't set the type for the CONST_DECLs either; that's done in
10696 (build_enumerator): Take the enumeration type as a
10698 * lex.c (do_identifier): Don't resolve enumeration constants while
10699 processing template declarations, even if they happen to be
10700 TEMPLATE_PARM_INDEXs.
10702 * parse.y (current_enum_type): New variable.
10703 (primary): Don't allow statement-expression in local classes just
10704 as we don't in global classes.
10705 (structsp): Use current_enum_type.
10706 (enum_list): Likewise.
10707 * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
10708 finish_enum; they no longer occur.
10710 * cp-tree.h (finish_base_specifier): New function.
10711 * parse.y (base_class): Use it.
10712 * semantics.c (finish_base_specifier): Define it.
10714 * parse.y (structsp): Warn on use of typename outside of template
10717 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
10719 * lex.c (handle_cp_pragma): Remove #pragma vtable.
10720 * lang-options.h: Remove +e options.
10721 * decl2.c (lang_decode_option): Likewise.
10722 (import_export_vtable): Don't check write_virtuals.
10723 (finish_vtable_vardecl, finish_file): Likewise.
10724 * search.c (dfs_debug_mark): Likewise.
10725 * semantics.c (begin_class_definition): Likewise.
10726 * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
10728 * call.c (build_over_call): Check flag_elide_constructors.
10729 * decl2.c: flag_elide_constructors defaults to 1.
10730 * typeck.c (convert_arguments): Remove return_loc parm.
10731 (build_function_call_real): Adjust.
10733 * search.c: Tear out all mi_matrix and memoize code.
10734 (lookup_field, lookup_fnfields): Use scratch_tree_cons.
10735 * lang-options.h: Remove documentation for -fhandle-exceptions,
10736 -fmemoize-lookups and -fsave-memoized.
10737 * cp-tree.h: Lose mi_matrix and memoize support.
10738 * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
10739 * class.c: Lose struct class_level.
10740 (pushclass, popclass): Lose memoize support.
10741 * init.c (build_offset_ref): Likewise.
10743 Never change BINFO_INHERITANCE_CHAIN.
10744 * init.c (emit_base_init): Change modification of
10745 BINFO_INHERITANCE_CHAIN to an assert.
10746 * search.c (get_base_distance_recursive): Likewise.
10747 (get_base_distance): Likewise.
10748 (lookup_member): Likewise.
10749 (convert_pointer_to_single_level): Likewise.
10750 (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs.
10751 (lookup_fnfields): Likewise.
10752 * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
10753 (unshare_base_binfos): Don't call propagate_binfo_offsets.
10754 (layout_basetypes): Call propagate_binfo_offsets instead of
10755 unshare_base_binfos.
10756 * decl.c (xref_basetypes): Call unshare_base_binfos.
10757 * pt.c (instantiate_class_template): Likewise.
10758 * tree.c (reverse_path): Remove 'copy' parm; always make a
10760 * class.c (build_vbase_path): Just call it.
10761 * search.c (compute_access): Likewise. Don't re-reverse.
10763 1998-08-27 Mark Mitchell <mark@markmitchell.com>
10765 * class.c (build_vbase_path): Use reverse_path.
10766 (finish_base_struct): Move warnings for inaccessible bases to
10768 (modify_one_vtable): Remove check of TREE_USED (binfo).
10769 (fixup_vtable_deltas1): Likewise.
10770 * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
10771 (xref_tag): Remove binfos parameter.
10772 (make_binfo): Remove chain parameter.
10773 (reverse_path): Add copy parameter.
10774 * decl.c (init_decl_processing): Change calls to xref_tag.
10775 (xref_tag): Remove binfos parameter.
10776 (xref_basetypes): Change calls to make_binfo.
10777 * decl2.c (grok_x_components): Change calls to xref_tag.
10778 (handle_class_head): Likewise.
10779 * friend.c (do_friend): Likewise.
10780 * lex.c (make_lang_type): Change calls to make_binfo.
10781 * parse.y (structsp): Change calls to xref_tag.
10782 (named_complex_class_head_sans_basetype): Likewise.
10783 (named_class_head): Likewise.
10784 * rtti.c (init_rtti_processing): Likewise.
10785 * search.c (compute_access): Change calls to reverse_path.
10786 (dfs_get_vbase_types): Change calls to make_binfo.
10787 (get_vbase_types): Remove dead code.
10788 * tree.c (unshare_base_binfos): Change calls to make_binfo.
10789 (layout_basetypes): Warn here about inaccessible bases.
10790 (make_binfo): Remove chain parameter.
10791 (reverse_path): Add copy parameter.
10793 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
10795 * class.c: #if 0 complete_type_p.
10796 * init.c (build_java_class_ref, build_new_1): Remove unused locals.
10797 * method.c (process_overload_item): Likewise.
10798 * typeck.c (comp_target_types): Likewise.
10800 Stop sharing binfos for indirect virtual bases.
10801 * tree.c (propagate_binfo_offsets): Unshare vbases, too.
10802 (layout_basetypes): Likewise.
10803 (unshare_base_binfos): Copy vbases, too.
10804 * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
10805 BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
10806 (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
10807 CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
10808 * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
10809 reference to BINFO_VIA_PUBLIC.
10810 (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
10811 (push_class_decls): Use them.
10812 (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
10813 (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
10815 1998-08-27 Mark Mitchell <mark@markmitchell.com>
10817 * decl.c (build_enumerator): Set DECL_CONTEXT for the
10820 1998-08-26 Mark Mitchell <mark@markmitchell.com>
10822 * cp-tree.h (finish_enum): Change prototype.
10823 * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
10824 VALUES parameter. Don't try to compute mins/maxs if
10825 processing_template_decl.
10826 * parse.y (structsp): Use new calling sequence for finish_enum.
10827 * pt.c (tsubst_enum): Likewise. Take the new type as input.
10828 (lookup_template_class): Remove unused variables. Tweak.
10829 Register enums on instantiation list before substituting
10830 enumeration constants.
10831 (tsubst_decl): Remove unused variables.
10832 (regenerate_decl_from_template): Likewise.
10834 * decl.c (duplicate_decls): Don't obliterate the
10835 DECL_TEMPLATE_INFO for a template if we're not replacing it with
10838 * lex.c (do_identifier): Fix typo in comment.
10840 Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10842 * errfn.c: Remove stdarg.h/varargs.h.
10843 * tree.c: Likewise.
10845 1998-08-25 Brendan Kehoe <brendan@cygnus.com>
10847 * pt.c (tsubst_copy): Only do typename overloading on an
10848 IDENTIFIER_NODE that happens to look like a typename if it actually
10849 has a type for us to use.
10851 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
10853 * typeck.c (comp_cv_target_types): Split out...
10854 (comp_target_types): From here. Don't allow cv-qual changes under
10855 a pointer if nptrs == 0. Fix OFFSET_TYPE handling.
10856 (build_ptrmemfunc): Pass 1 to nptrs.
10857 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
10859 1998-08-25 Mark Mitchell <mark@markmitchell.com>
10861 * search.c (dependent_base_p): Don't compare a binfo to
10862 current_class_type; use the TREE_TYPE of the binfo instead.
10864 * cp-tree.h (CLASS_TYPE_P): Revise definition.
10866 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
10868 * decl.c (duplicate_decls): Don't complain about different
10869 exceptions from an internal decl even if pedantic.
10871 * typeck.c (convert_for_assignment): Converting from pm of vbase
10872 to derived is an error, not a sorry.
10874 * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
10875 * class.c (fixed_type_or_null): Rename from
10876 resolves_to_fixed_type_p. Return the dynamic type of the
10877 expression, if fixed, or null.
10878 (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type
10879 does not match the static type.
10880 (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use
10881 resolves_to_fixed_type_p again.
10883 1998-08-24 Mark Mitchell <mark@markmitchell.com>
10885 * pt.c (tsubst_decl): Move special case code for dealing with
10886 tricky friend templates here from ...
10887 (regenerate_decl_from_template): Here.
10889 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
10891 * decl.c (start_decl): Remove redundant linkage check.
10893 1998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
10895 * typeck.c (c_expand_return): Handle the case that valtype
10896 is wider than the functions return type.
10898 1998-08-24 Mark Mitchell <mark@markmitchell.com>
10900 * cp-tree.h (CLASS_TYPE_P): New macro.
10901 * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
10902 * pt.c (process_template_parm): Undo previous change.
10904 1998-08-24 Benjamin Kosnik <bkoz@cygnus.com>
10906 * cp-tree.h: Declare.
10907 * pt.c (decl_template_parm_p): New function.
10908 * decl.c (pushdecl): Check decls for redeclaring template parms.
10909 (xref_tag): Make redeclaration an error, print decl.
10910 * decl2.c (grokfield): Check field_decls for redeclaration as well.
10912 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
10914 * parse.y (primary): Fix up the type of string constants.
10916 1998-08-24 Mark Mitchell <mark@markmitchell.com>
10918 * typeck.c (convert_for_initialization): Move check for odd uses
10919 of NULL to avoid duplicate warnings.
10921 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
10923 * tree.c (lvalue_type): Fix for arrays.
10924 * typeck.c (string_conv_p): New fn.
10925 (convert_for_assignment): Use it.
10926 (build_unary_op): Use lvalue_type.
10927 * call.c (standard_conversion, convert_like): Use string_conv_p.
10928 (add_function_candidate): Use lvalue_type.
10929 * cvt.c (convert_to_reference): Likewise.
10930 * decl2.c (lang_decode_option): Ignore -traditional.
10931 * decl.c (init_decl_processing): flag_writable_strings inhibits
10932 flag_const_strings.
10934 1998-08-24 Andrew MacLeod <amacleod@cygnus.com>
10936 * lang-options.h (lang_options): Add fconst-strings to the list
10938 * decl2.c (lang_f_options, lang_decode_option): Likewise.
10940 1998-08-24 Nathan Sidwell <nathan@acm.org>
10942 * lex.c (real_yylex): Don't warn about long long constants if
10943 we're allowing long long.
10945 1998-08-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
10947 * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
10948 accessing bindings directly.
10950 * search.c (my_tree_cons): Reimplement.
10952 * lang-specs.h: Remove __HONOR_STD.
10953 * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
10955 1998-08-23 Mark Mitchell <mark@markmitchell.com>
10957 * decl.c (grokdeclarator): Complain about in-class initialization
10958 of aggregates and/or references.
10959 * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
10960 TEMPLATE_TYPE_PARMs.
10962 * decl2.c (grok_array_decl): Add comment.
10963 (mark_used): Don't instantiate an explicit instantiation.
10964 * friend.c (make_friend_class): Remove bogus comment. Fix check
10965 for partial specializations.
10966 * pt.c (check_explicit_specialization): Don't
10967 SET_DECL_EXPLICIT_INSTANTIATION here.
10968 (mark_decl_instantiated): Or here.
10969 (do_decl_instantiation): Do it here, instead. Add checks for
10970 duplicate explicit instantiations, etc. Tidy.
10971 (do_type_instantiation): Likewise.
10972 (instantiate_decl): Improve comments. Complain about explicit
10973 instantiations where no definition is available.
10975 * cp-tree.h (ansi_null_node): Remove.
10976 * call.c (build_over_call): Warn about converting NULL to an
10978 * cvt.c (build_expr_type_conversion): Likewise. Use
10979 null_ptr_cst_p instead of expanding it inline.
10980 * decl.c (ansi_null_node): Remove.
10981 (init_decl_processing): Make null_node always have integral type.
10982 * except.c (build_throw): Warn about converting NULL to an
10984 * lex.c (init_parse): Remove handling of ansi_null_node.
10985 * pt.c (type_unification_real): Don't convert NULL to void* type.
10986 * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
10987 (convert_for_assignment): Warn about converting NULL to an
10989 (convert_for_initialization): Likewise.
10991 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
10993 * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
10994 * pt.c (coerce_template_parms): Use no_linkage_check.
10995 * decl.c (grokvardecl): Likewise.
10996 (grokfndecl): Likewise. Members of anonymous types have no linkage.
10998 * method.c (process_overload_item): Remove useless code.
11000 1998-08-20 Per Bothner <bothner@cygnus.com>
11002 Handle new'ing of Java classes.
11003 * init.c (build_class_classref): New function.
11004 (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject;
11005 constructor does not return this; don't need to exception-protect.
11007 * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag.
11008 * decl2.c (acceptable_java_type): Handle template-derived types.
11010 1998-08-20 Per Bothner <bothner@cygnus.com>
11012 * decl2.c (import_export_vtable): Suppress vtables for Java classes.
11014 1998-08-20 Mark Mitchell <mark@markmitchell.com>
11016 * decl.c (duplicate_decls): Always merge the old and new patterns
11017 for templates, regardless of whether or not the new one has
11018 DECL_INITIAL. Don't throw away specializations. Merge
11020 * pt.c (tsubst_decl): Use the right pattern when calculating the
11021 complete args for a new template instance.
11022 (do_decl_instantiation): Fix typo in comment.
11023 (regenerate_decl_from_template): Deal with tricky friend template
11025 (instantiate_decl): Likewise.
11027 Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com)
11029 * init.c (build_builtin_delete_call): Add missing assemble_external
11032 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
11034 * parse.y (notype_unqualified_id): Also accept ~A<int>.
11036 1998-08-19 Mark Mitchell <mark@markmitchell.com>
11038 * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
11040 * except.c (build_throw): Warn when NULL is thrown, even with
11041 -ansi. Use ansi_null_node, rather than integer_zero_node, in the
11044 * cp-tree.h (ansi_null_node): New variable.
11045 * decl.c (ansi_null_node): New variable.
11046 (init_decl_processing): Initialize its type.
11047 * lex.c (init_parse): Initialize its value. Use ansi_null_node
11048 for null_node in non-ANSI mode.
11049 * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
11050 place of null_node to avoid spurious errors.
11052 1998-08-17 Mark Mitchell <mark@markmitchell.com>
11054 * cp-tree.h (enter_scope_of): New function.
11055 * parse.y (complex_direct_notype_declarator): Use it.
11056 * semantics.c (enter_scope_of): New function.
11058 1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
11060 * decl.c (grokparms): No, here.
11062 * decl.c (grokdeclarator): Catch parm with pointer to array of
11063 unknown bound here...
11064 * method.c (process_overload_item): ...not here.
11066 * gxxint.texi: Remove obsolete documentation of overloading code.
11068 * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
11069 * class.c (finish_struct_bits): Likewise.
11071 * tree.c (lvalue_type): Fix for arrays.
11072 * typeck.c (build_unary_op): Use lvalue_type.
11073 * call.c (add_function_candidate): Likewise.
11074 * cvt.c (convert_to_reference): Likewise.
11076 * decl2.c (lang_decode_option): Ignore -traditional.
11078 * init.c (build_offset_ref): Don't mess with error_mark_node.
11079 * lex.c (do_scoped_id): Use cp_error.
11081 * rtti.c (get_tinfo_fn): Don't mess with the context for now.
11083 1998-08-17 Benjamin Kosnik <bkoz@loony.cygnus.com>
11085 * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
11087 Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com)
11089 * cp-tree.h (set_identifier_local_value): Provide prototype.
11091 * decl2.c (do_namespace_alias): Remove unused variables `binding'
11094 Fri Aug 14 16:42:27 1998 Nick Clifton <nickc@cygnus.com>
11096 * Makefile.in: Rename BBISON to BISON so that it can be properly
11097 inherited from the parent makefile.
11099 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
11101 * lang-options.h: Add -finit-priority.
11102 * decl2.c: Likewise. Check flag_init_priority instead of
11105 * decl2.c (setup_initp): New fn.
11106 (start_objects, finish_objects, do_ctors): Handle init_priority.
11107 (do_dtors, finish_file): Likewise.
11109 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
11111 * pt.c (tsubst_copy): Hush warning.
11113 * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
11115 1998-08-12 Mark Mitchell <mark@markmitchell.com>
11117 * pt.c (print_template_context): Don't abort when instantiating a
11118 synthesized method.
11120 * decl.c (grokdeclarator): Issue errors on namespace qualified
11121 declarators in parameter lists or in class scope.
11123 1998-08-09 Mark Mitchell <mark@markmitchell.com>
11125 * pt.c (check_explicit_specialization): Don't abort on bogus
11126 explicit instantiations.
11128 1998-08-07 Mark Mitchell <mark@markmitchell.com>
11130 * typeck.c (require_complete_type): Use complete_type_or_else.
11131 (complete_type_or_else): Always return NULL_TREE on failure, as
11134 * pt.c (tsubst_aggr_type): Prototype.
11135 (tsubst_decl): New function, split out from tsubst. Set
11136 input_filename and lineno as appropriate.
11137 (pop_tinst_level): Restore the file and line number saved in
11139 (instantiate_class_template): Set input_filename and lineno as
11141 (tsubst): Move _DECL processing to tsubst_decl. Make sure the
11142 context for a TYPENAME_TYPE is complete.
11144 * decl2.c (grokbitfield): Issue errors on bitfields declared with
11146 (do_dtors): As in do_ctors, pretend to be a member of the same
11147 class as a static data member while generating a call to its
11150 * cvt.c (cp_convert_to_pointer): Handle NULL pointer
11151 conversions, even in complex virtual base class hierarchies.
11153 1998-08-06 Mark Mitchell <mark@markmitchell.com>
11155 * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
11156 (TYPE_TEMPLATE_INFO): Likewise.
11157 (SET_TYPE_TEMPLATE_INFO): Likewise.
11158 (ENUM_TI_TEMPLATE): Likewise.
11159 (ENUM_TI_ARGS): Likewise.
11160 (lookup_nested_type_by_name): Remove.
11161 * decl.c (maybe_process_template_type_declaration): Handle enums.
11162 (start_enum): Don't check for primary-template enum declarations
11164 (finish_enum): Clean up, document. Make sure template enum
11165 constants get the correct type.
11166 (build_enumerator): Copy initializers for template enumerations,
11168 (grok_enum_decls): Document.
11169 * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
11170 better. Build LOOKUP_EXPRs for local variables, even if they are
11172 * pt.c (tsubst_enum): Remove field_chain parameter.
11173 (template_class_depth): Include the depth of surrounding function
11175 (push_template_decl): Check for primary-template enum declarations
11176 here. Deal with enumeration templates.
11177 (lookup_template_class): Likewise.
11178 (for_each_template_parm): Likewise.
11179 (instantiate_class_template): Don't call tsubst_enum directly,
11180 call tsubst instead, to instantiate enums. Deal with all
11181 field_chain issues here, not in tsubst_enum.
11182 (lookup_nested_type_by_name): Remove.
11183 (tsubst_aggr_type): Revise handling of enumeration types.
11184 (tsubst): Likewise.
11185 (tsubst_copy): Likewise.
11186 (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
11188 1998-08-04 Mark Mitchell <mark@markmitchell.com>
11190 * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
11191 uses template parameters.
11192 * method.c (build_template_parm_names): Use the full set of
11193 template arguments for tsubst'ing.
11194 (build_overload_identifier): Pass the full set of template
11195 arguments to build_template_parm_names, not just the
11197 * pt.c (TMPL_ARGS_DEPTH): Define using
11198 TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
11199 (NUM_TMPL_ARGS): New macro.
11200 (add_outermost_template_args): Deal with the case where the outer
11201 args will be completely discarded.
11202 (coerce_template_parms): Use the full set of template arguments
11203 for tsubst'ing. Simplify. Add some asserts. Improve
11205 (lookup_template_class): Pass the full set of template arguments
11206 to coerce_template_parms.
11207 (tsubst): Add assertion.
11208 (do_type_instantiation): Don't instantiate member template
11211 * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
11212 name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
11214 1998-08-03 Jason Merrill <jason@yorick.cygnus.com>
11216 * method.c (set_mangled_name_for_decl): Change return type to void.
11218 * decl.c (lookup_name_real): A namespace-level decl takes priority
11219 over implicit typename. Avoid doing the same lookup twice.
11221 * search.c (dependent_base_p): New fn.
11222 (dfs_pushdecls, dfs_compress_decls): Use it.
11224 * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
11225 virtual functions if the type doesn't have any.
11227 1998-08-03 Mark Mitchell <mark@markmitchell.com>
11229 * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
11230 uses template parameters.
11232 1998-08-02 Mark Mitchell <mark@markmitchell.com>
11234 * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument.
11235 * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
11236 * lex.c (do_identifier): Don't use a second argument, or a type,
11237 when building LOOKUP_EXPRs.
11238 (do_identifier): Likewise.
11239 (do_scoped_id): Likewise.
11240 * method.c (hack_identifier): Improve error message.
11241 * pt.c (lookup_template_function): Don't needlessly call
11242 copy_to_permanent or build_min.
11243 (tsubst_copy): Remove #if 0'd code. tsubst into LOOKUP_EXPRs if
11245 (do_decl_instantiation): Improve error message.
11246 * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
11247 (build_min): Copy the type to the permanent obstack, too.
11249 1998-08-01 Jason Merrill <jason@yorick.cygnus.com>
11251 * init.c (init_init_processing): Remove BI* handling.
11252 (build_builtin_call): Remove.
11253 (build_builtin_delete_call): New fn.
11254 (build_delete): Use it.
11256 1998-07-31 Mark Mitchell <mark@markmitchell.com>
11258 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
11259 (maybe_check_template_type): New function.
11260 * decl.c (maybe_process_template_type_declaration): New function,
11261 split out from pushtag Call maybe_check_template_type.
11262 (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P.
11263 (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
11264 * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
11265 * pt.c (template_class_depth_real): Generalization of ...
11266 (template_class_depth): Use it.
11267 (register_specialization): Use duplicate_decls for duplicate
11268 declarations of specializations.
11269 (maybe_check_template_type): New function.
11270 (push_template_decl_real): Fix comment.
11271 (convert_nontype_argument): Likewise.
11272 (lookup_template_class): Likewise. Avoid an infinite loop on
11274 (tsubst_friend_function): Fix comment.
11275 (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
11276 an IDENTIFIER_NODE.
11277 * semantics.c (begin_function_definition): Use
11278 reset_specialization to note that template headers don't apply
11279 directly to declarations after the opening curly for a function.
11281 1998-07-29 Jason Merrill <jason@yorick.cygnus.com>
11283 * decl.c (push_overloaded_decl): Use current_namespace instead of
11284 DECL_CONTEXT (decl) to determine where we go.
11286 * decl.c (lookup_name_real): Fix typo.
11288 1998-07-28 Mark Mitchell <mark@markmitchell.com>
11290 * friend.c (is_friend): Be lenient with member functions to deal
11291 with nested friends.
11293 1998-07-28 Jason Merrill <jason@yorick.cygnus.com>
11295 * class.c (finish_struct_1): Convert integer_zero_node to
11296 ssizetype before passing it to set_rtti_entry.
11297 * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
11298 of any size to a pointer.
11300 1998-07-27 Mark Mitchell <mark@markmitchell.com>
11302 * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
11303 (build_template_decl_overload): Remove.
11304 (set_mangled_name_for_decl): New function.
11305 (innermost_args): Remove is_spec parameter.
11306 (most_specialized, most_specialized_class): Remove declarations.
11307 (lookup_template_class): Add entering_scope parameter.
11308 (maybe_process_partial_specialization): New function.
11309 (finish_template_decl): Likewise.
11310 (finish_template_type): Likewise.
11311 * class.c (finish_struct): Clean up processing of member template
11313 * decl.c (pushtag): Fix formatting.
11314 (lookup_tag): Improve handling of pseudo-global levels.
11315 (make_typename_type): Adjust call to lookup_template_class.
11316 (shadow_tag): Use maybe_process_partial_specialization.
11317 (xref_tag): Improve handling of member friends.
11318 (start_function): Call push_nested_class before
11319 push_template_decl. Don't call push_template_decl for
11321 * decl2.c (grok_x_components): Don't call xref_tag for
11322 template instantiations. Handle UNION_TYPEs like RECORD_TYPEs.
11323 (grokclassfn): Use set_mangled_name_for_decl.
11324 (arg_assoc_class): Adjust call to innermost_args.
11325 (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
11326 * error.c (dump_function_name): Improve printing of template
11328 * friend.c (is_friend): Don't compare types of decls to determine
11329 friendship, unless flag_guiding_decls.
11330 (make_friend_class): Partial specializations cannot be friends.
11331 (do_friend): Use set_mangled_name_for_decl. Call
11332 push_template_decl_real instead of push_template_decl.
11333 * method.c (build_decl_overload_real): Remove prototype. Give it
11335 (build_overload_identififer): Adjust call to innermost_args.
11336 (build_template_decl_overload): Remove.
11337 (set_mangled_name_for_decl): New function.
11338 * parse.y (.finish_template_type): New non-terminal.
11339 (template_def): Use finish_template_decl. Use template_extdef
11341 (template_extdef, template_datadef): New non-terminals, containing
11342 only those rules for things which can be templates.
11344 (template_type, self_template_type): Use .finish_template_type.
11345 (named_class_head): Use maybe_process_partial_specialization.
11346 * pt.c (mangle_class_name_for_template): Remove context parameter.
11347 (get_class_bindings): Remove outer_args parameter.
11348 (complete_template_args): Remove.
11349 (add_outermost_template_args): New function.
11350 (register_specialization): Return the specialization.
11351 (unregister_specialization): New function.
11352 (tsubst_template_parms): Likewise.
11353 (most_specialized, most_specialized_class): Prototype here as
11355 (original_template): Rename to most_general_template.
11356 (tsubst_template_parms): New function.
11357 (set_mangled_name_for_template_decl): Likewise.
11358 (TMPL_ARGS_DEPTH): New macro.
11359 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
11360 (TMPL_ARGS_LEVEL): New macro.
11361 (SET_TMPL_ARGS_LEVEL): Likewise.
11362 (TMPL_ARG): Likewise.
11363 (SET_TMPL_ARG): Likewise.
11364 (TMPL_ARGS_DEPTH): Likewise.
11365 (finish_member_template_decl): Use finish_template_decl.
11366 (maybe_process_partial_specialization): New function, split out
11368 (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
11369 (maybe_begin_member_template_processing): Use new macros.
11370 (is_member_template): Likewise.
11371 (is_member_template_class): Likewise.
11372 (add_to_template_args): Likewise. Deal with multiple levels of
11374 (maybe_process_partial_specialization): New function.
11375 (retrieve_specialization): Add consistency check.
11376 (determine_specialization): Return full argument list.
11377 (check_explicit_specialization): Tweak friend handling. Use full
11378 argument lists. Simplify.
11379 (current_template_args): Use new macros.
11380 (push_template_decl_real): Change ill-named mainargs to specargs.
11381 Check that a partial specialization actually specializes at least
11382 one parameter. Improve friend handling. Modify for full
11383 template arguments.
11384 (classtype_mangled_name): Don't mangle the names of
11386 (lookup_template_class): Add entering_scope parameter. Use it to
11387 avoid finding a template type when an instantiation is required.
11388 Simplify. Use full template arguments.
11389 (tsubst_friend_function): Use unregister_specialization. Use new
11390 macros. Use full template arguments.
11391 (tsubst_friend_class): Substitute, using tsubst_template_parms,
11392 into the template parameters before passing them to
11393 redeclare_class_template.
11394 (instantiate_class_template): Simplify. Use full template
11395 arguments. Adjust calls to get_class_bindings. Use
11396 SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling.
11397 (innermost_args): Use new macros.
11398 (tsubst_aggr_type): New function, split out from tsubst.
11399 (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
11400 conventions for lookup_template_class. Refine handling of partial
11401 instantiations. Remove calls to complete_template_args.
11402 Simplify. Add consistency checks. Use set_mangled_name_for_decl
11403 and set_mangled_name_for_template_decl.
11404 (tsubst_copy): Use tsubst_aggr_type.
11405 (instantiate_template): Use full template arguments.
11406 (more_specialized): Improve formatting.
11407 (more_specialized_class): Adjust calls to get_class_bindings.
11408 (get_bindings_real): Don't call complete_template_args.
11409 (most_specialized): Don't overwrite input; create a new list.
11410 (most_specialized_class): Use most_general_template.
11411 (regenerate_decl_from_template): Use unregister_specialization.
11412 Use full template arguments.
11413 (instantiate_decl): Use full template arguments.
11414 (set_mangled_name_for_template_decl): New function.
11415 * semantics.c (begin_class_definition): Use
11416 maybe_process_partial_specialization.
11417 (finish_member_class_template): New function.
11418 (finish_template_decl): Likewise.
11419 (finish_template_type): Likewise.
11420 (typeck.c): Don't crash after issuing a compiler_error.
11421 * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
11423 1998-07-27 Jason Merrill <jason@yorick.cygnus.com>
11425 * typeck2.c (build_functional_cast): Handle default-initialization.
11427 * call.c (build_over_call): Pass 1 to popclass.
11429 * parse.y (direct_notype_declarator): Add precedence declaration
11430 to notype_unqualified_id case.
11431 * Makefile.in (EXPECT): Adjust.
11433 * tree.c (ovl_member): Fix for single function in OVL.
11435 1998-07-27 Dave Brolley <brolley@cygnus.com>
11437 * c-lex.c (yylex): Fix boundary conditions in character literal and
11438 string literal loops.
11440 1998-07-24 Jason Merrill <jason@yorick.cygnus.com>
11442 * decl.c (lookup_name_real): OK, do return the from_obj value
11443 unless got_object depends on template parms.
11445 * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
11447 * pt.c (coerce_template_parms): Also complain about local enums.
11449 * cp-tree.h: Add prototype for set_identifier_local_value.
11450 * decl.c (set_identifier_local_value_with_scope): Make static,
11452 * search.c (covariant_return_p): Likewise.
11453 * except.c (build_terminate_handler, alloc_eh_object): Likewise.
11455 * call.c (build_method_call): Only pull out the type of a destructor
11456 if it's a template type parm.
11457 * decl.c (lookup_name_real): Never return the from_obj value.
11459 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
11461 * except.c (process_start_catch_block_old): Call start_decl_1 for
11463 * decl.c (start_decl_1): Avoid duplicate error.
11465 * init.c (expand_default_init): Only perform the initialization if
11466 it will do something.
11468 1998-07-23 H.J. Lu (hjl@gnu.org)
11470 * parse.y (base_class): Check for invalid base class.
11472 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
11474 * decl2.c (import_export_template): Fold in...
11475 (import_export_class): ...to here. Handle dllimport/export.
11477 * class.c (build_vtable): Pass at_eof to import_export_vtable.
11478 (prepare_fresh_vtable): Likewise.
11479 * decl2.c (import_export_class): Split out...
11480 (finish_prevtable_vardecl): From here.
11481 * class.c (finish_struct_1): Call import_export_class if at_eof.
11483 * decl.c (start_function): #if 0 mysterious code I wrote and have
11485 * rtti.c (get_tinfo_fn): If this is for a class type, set
11488 1998-07-22 Jason Merrill <jason@yorick.cygnus.com>
11490 * inc/exception: Change terminate and unexpected to ().
11492 * parse.y (named_class_head_sans_basetype_defn): A
11493 named_class_head_sans_basetype followed by '{' or ':' is a defn.
11495 1998-07-21 Jason Merrill <jason@yorick.cygnus.com>
11497 * tree.c (canonical_type_variant): New fn to handle arrays.
11498 * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
11499 * pt.c (unify, default case): Also fold arg. Fix array bounds case.
11500 * method.c (process_overload_item): Use build_overload_value for
11503 1998-07-20 Dave Brolley <brolley@cygnus.com>
11505 * lex.c (mbchar.h): #include it.
11506 (GET_ENVIRONMENT): New macro.
11507 (init_parse): Set character set based on LANG environment variable.
11508 (real_yylex): Handle multibyte characters in character literals.
11509 (real_yylex): Handle multibyte characters in string literals.
11511 1998-07-19 Jason Merrill <jason@yorick.cygnus.com>
11513 * lex.c (do_identifier): Look for class value even if we don't
11514 have a global value. Do implicit declaration if parsing is 2.
11515 * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
11518 1998-07-19 Mark Mitchell <mark@markmitchell.com>
11520 * decl.c (pushtag): Revert previous change.
11521 * pt.c (lookup_template_class): Don't put out debugging
11522 information for types that use template parameters.
11524 * decl.c (pushtag): Don't put out debugging information for
11525 compiler-generated typedefs.
11527 * error.c (dump_type_real): Don't crash when presented with
11528 intQI_type_node or the like.
11530 * semantics.c (finish_translation_unit): Fix spelling error in
11533 1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
11535 * decl.c (lookup_name_real): Pull out single function here.
11536 (select_decl): Not here.
11537 (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
11539 * decl.c (qualify_lookup): Tweak again.
11541 * pt.c (lookup_template_class): Don't mess with the context of the
11543 * decl2.c (current_decl_namespace): Remove special handling for
11546 * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
11547 a member template specialization.
11549 * tree.c (ovl_member): Use decls_match to compare functions.
11550 * decl.c (decls_match): Check the context of a function.
11552 * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
11553 in Koenig lookup support rules.
11554 * semantics.c (finish_call_expr): Handle the new cases.
11556 * typeck.c (build_x_function_call): Handle overloaded methods.
11558 * decl.c (grokvardecl): Don't call build_static_name for extern "C".
11560 1998-07-16 Mark Mitchell <mark@markmitchell.com>
11562 * semantics.c (finish_object_call_expr): Revert previous change.
11563 * call.c (build_new_method_call): Likewise. Instead, convert
11564 TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
11566 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
11568 * decl.c (qualify_lookup): Handle templates.
11570 * decl2.c (do_using_directive): Don't pass ancestor.
11571 * decl.c (push_using_directive): Calculate ancestor.
11573 * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
11574 * decl.c (pushdecl): Move type shadowing handling from here...
11575 (duplicate_decls): ...to here.
11576 * decl.c (set_identifier_local_value_with_scope): New fn.
11577 (pushdecl): Use it.
11578 (set_identifier_local_value, lookup_type_current_level): New fns.
11579 * decl2.c (do_local_using_decl): Handle types and binding level
11582 * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
11583 * decl.c (select_decl): Extract a lone function from an OVERLOAD.
11584 (lookup_namespace_name): Likewise.
11585 * typeck.c (build_unary_op): Not here anymore.
11587 * decl2.c (do_class_using_decl): Make sure we get an identifier.
11588 * class.c (handle_using_decl): Ignore TYPE_DECLs.
11590 * decl.c (qualify_lookup): New fn.
11591 (lookup_name_real): Use it.
11593 1998-07-16 Martin v. Loewis <loewis@informatik.hu-berlin.de>
11595 * decl2.c (add_using_namespace): When directly using a namespace
11596 that was indirect before, promote it.
11598 * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
11599 LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
11600 LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
11601 * decl.c (select_decl): Replace two flag parameters by one.
11602 (unqualified_namespace_lookup): Likewise, pass flag.
11603 (lookup_flags): New function.
11604 (lookup_name_real): Compute flags, pass them.
11605 (lookup_namespace_name): Call with zero-flag.
11606 * decl2.c (ambiguous_decl): Add flag parameter, complain only
11607 according to flags.
11608 (lookup_using_namespace, qualified_lookup_using_namespace):
11609 Add flag parameter, pass them through.
11610 * lex.c (do_scoped_id): Call with zero-flag.
11612 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
11614 * typeck.c (convert_for_assignment): Use comptypes.
11616 1998-07-16 Mark Mitchell <mark@markmitchell.com>
11618 * semantics.c (finish_object_call_expr): Move test for the
11619 function called being a TYPE_DECL to ...
11620 * call.c (build_new_method_call): Here.
11622 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
11624 * decl2.c (arg_assoc_class): Also look at template arguments, if any.
11625 (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
11627 * lex.c (looking_for_typename): Don't initialize.
11629 * decl2.c (ambiguous_decl): Clarify error message.
11631 * decl.c (push_using_directive): Iterate over namespaces used
11634 1998-07-15 Martin v. Löwis <loewis@informatik.hu-berlin.de>
11636 * decl2.c (add_using_namespace): Iterate over namespaces used
11639 * decl.c (lookup_name_real): Accept namespace aliases as locals.
11640 (cat_namespace_levels): Ignore aliases.
11641 (duplicate_decls): Ignore duplicate aliases.
11642 * decl2.c (do_namespace_alias): Process block level namespace
11643 aliases. Store alias with pushdecl. Remove odr errors.
11644 * parse.y (namespace_alias): New non-terminal.
11647 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
11649 * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
11650 Handle TEMPLATE_TYPE_PARM.
11651 (arg_assoc): Rewrite.
11653 * pt.c (complete_template_args): Don't look at the context unless
11656 * method.c (build_decl_overload_real): Fix namespace handling.
11658 * typeck.c (build_unary_op): Extract a lone function from an
11661 * call.c (build_scoped_method_call): Handle getting a namespace
11662 for basetype in a destructor call.
11663 (check_dtor_name): Handle enums.
11665 * parse.y (using_directive): New nonterminal.
11666 (extdef, simple_stmt): Use it.
11668 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
11670 * decl2.c (add_function): Move error message ...
11671 (arg_assoc_namespace): ... from here.
11673 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
11675 * parse.y (namespace_qualifier): Fix multiple level handling.
11676 * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
11677 (arg_assoc): Don't skip the first argument of a function.
11679 Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com)
11681 * search.c (my_tree_cons): Clean up.
11683 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
11685 * call.c (joust): Don't warn about "confusing" conversions to the
11688 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
11690 * class.c (push_nested_class): Complain about namespaces.
11691 * decl.c (start_decl): Enter the object's namespace.
11692 (cp_finish_decl): Leave it.
11693 (grokdeclarator): Likewise.
11694 * decl2.c (check_decl_namespace): New function.
11695 (finish_file): Call it.
11696 * parse.y (complex_direct_notype_declarator): Set complexity
11697 of namespace-qualified ids to -1, enter the namespace.
11699 * method.c (build_template_decl_overload): Expect _DECL as first
11700 parameter. Put context temporarily into current_namespace.
11701 * pt.c (check_explicit_specialization): Change caller.
11702 (tsubst): Likewise.
11704 * init.c (build_offset_ref): Call mark_used and
11705 convert_from_reference for namespace members.
11707 Mon Jul 13 23:25:28 1998 Martin von Löwis <loewis@informatik.hu-berlin.de>
11709 * search.c (my_tree_cons): The bitfield is at index 2.
11711 Mon Jul 13 17:21:01 1998 Nick Clifton <nickc@cygnus.com>
11713 * lang-options.h: Format changed to work with new --help support
11716 1998-07-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
11718 * decl2.c (build_expr_from_tree): Change calls of do_identifier.
11719 Do Koenig lookup in CALL_EXPR.
11720 (arg_assoc): Handle error_mark.
11721 * lex.c (is_global): New function.
11722 (do_identifier): Expect arguments for Koenig lookup.
11723 * parse.y (primary): Add rules for calls of unqualified function calls.
11724 (do_id): Change call of do_identifier.
11725 * pt.c (finish_stmt_expr): Likewise.
11726 * semantics.c (finish_id_expr): Likewise.
11727 (finish_call_expr): Add integer parameter to indicate
11728 argument-dependent lookup.
11730 * decl.c (struct binding_level): New field using_directives.
11731 (push_using_decl): Not sorry anymore.
11732 (push_using_directive): New function.
11733 (lookup_tag): Use CP_DECL_CONTEXT to iterate.
11734 (unqualified_namespace_lookup): New function, code from ...
11735 (lookup_name_real): ... here.
11736 * decl2.c (lookup_using_namespace): Pass using list instead of
11738 (validate_nonmember_using_decl): New function.
11739 (do_nonmember_using_decl): New function.
11740 (do_toplevel_using_decl): Use them.
11741 (do_local_using_decl): New function.
11742 (do_using_directive): Support block-level directives.
11743 * parse.y (simple_stmt): Support using declarations and
11745 (namespace_qualifier, namespace_using_decl): New non-terminals.
11747 * xref.c (classname): New function.
11748 (GNU_xref_hier): Change class and base parameters to tree.
11749 * decl.c (xref_baseypes): Change caller.
11750 * friend.c (make_friend_class): Likewise.
11752 1998-07-12 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
11754 * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
11757 * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
11758 template template parameter, record its use.
11759 (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
11760 its template arguments if exists.
11762 * pt.c (coerce_template_template_parms): New function equivalent
11763 to coerce_template_parms when IS_TMPL_PARM is true.
11764 (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter,
11765 all callers changed.
11767 (coerce_template_parms): Access ARGLIST properly when creating a
11768 new vector. Only accept implicit TYPE_DECL as valid argument for
11769 a template template parameter when it is a base class of
11770 current_class_type. Don't display error message when COMPLAIN is
11773 1998-07-12 Klaus Kaempf (kkaempf@progis.de)
11775 * repo.c (get_base_filename): Use file_name_nondirectory.
11776 (open_repo_file): Likewise.
11777 * cp-tree.h (file_name_nondirectory): Add prototype.
11779 1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
11781 * friend.c (do_friend): Pull the identifier out of declarator.
11782 Use cp_error and friends.
11783 * decl2.c (qualified_lookup_using_namespace): Fix call to
11785 * decl.c (lookup_name_real): Don't call complete_type on a namespace.
11786 (grokvardecl): Use DECL_CLASS_SCOPE_P.
11787 * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
11788 * class.c (warn_hidden): Fix for OVERLOAD.
11789 From grahams@rcp.co.uk:
11790 * cp-tree.h (DEFARG_NODE_CHECK): New macro.
11791 (DEFARG_LENGTH, DEFARG_POINTER): Use it.
11793 Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com)
11795 * g++.1 (-traditional): Remove duplicated documentation.
11797 1998-07-11 Mark Mitchell <mark@markmitchell.com>
11799 * method.c (flush_repeats): Add nrepeats parameter.
11800 (issue_nrepeats): Likewise.
11801 (is_back_referenceable_type): New function. Don't back-reference
11802 TEMPLATE_TYPE_PARMs as well as simple types like integers.
11803 (build_mangled_name_for_type): Likewise.
11804 (build_mangled_name_for_type_with_Gcode): Likewise.
11805 (lasttype): Remove.
11806 (nrepeats): Likewise.
11807 (Nrepeats): Likewise.
11808 (start_squangling): Don't clear the variables removed above.
11809 (end_squangling): Likewise.
11810 (flush_repeats): Tidy. Use nrepeats parameter rather than
11812 (issue_nrepeats): Likewise, but with nrepeats global. Use
11813 is_backreferenceable_type.
11814 (build_overload_nested_name): Tidy. Add comment. Use
11815 build_mangled_name_for_type.
11816 (build_underscore_int): Comment.
11817 (build_overload_scope_ref): Use build_mangled_name_for_type.
11818 (build_overload_int): Likewise.
11819 (build_template_template_parm_names): Tidy.
11820 (build_template_parm_names): Use build_mangled_name_for_type.
11821 (build_overload_identifier): Add comments.
11822 (build_mangled_name_for_type_with_Gcode): Split out from
11823 build_mangled_name.
11824 (build_mangled_name_for_type): Use it.
11825 (build_mangled_name): Rework to use build_mangled_name_for_type
11826 and to not use global nrepeats/Nrepeats. Tidy.
11827 (process_modifiers): Tidy.
11828 (check_btype): Use is_backreferenceable_type. Add comment.
11829 Rename `node' to `type'.
11830 (process_overload_item): Set numeric_output_need_bar here.
11831 Use build_mangled_name_for_type. Tidy.
11832 (build_decl_overload_real): Tidy. Don't use Nrepeats. Use
11833 build_mangled_name_for_type.
11835 * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
11838 1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com>
11840 * cp-tree.h (warn_long_long): Define.
11841 * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
11842 warning "ANSI C++ does not support `long long'".
11843 * decl2.c (warn_long_long): Define.
11844 (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
11846 1998-07-07 Jason Merrill <jason@yorick.cygnus.com>
11848 * decl.c (xref_tag): Handle attributes between 'class' and name.
11849 * parse.y (aggr): Likewise.
11850 * semantics.c (finish_class_definition): Likewise.
11851 * Makefile.in (EXPECTED): Adjust.
11853 * cp-tree.h: Declare flag_optional_diags and warn_multichar.
11854 * decl2.c: Define them.
11855 (lang_decode_option): Handle them.
11856 * lang-options.h: Add -foptional-diags.
11857 * class.c (finish_struct): Don't complain about multiple meanings of
11858 name if -fno-optional-diags.
11859 * decl.c (pushdecl_class_level): Likewise.
11860 * lex.c (real_yylex): Check warn_multichar.
11862 1998-07-06 Jason Merrill <jason@yorick.cygnus.com>
11864 * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
11866 * tree.c (make_binfo): Fix length.
11868 1998-06-30 Benjamin Kosnik <bkoz@bliss.nabi.net>
11870 * decl2.c (lang_decode_option): Remove warn_template_debugging.
11871 * lang-options.h: Likewise.
11873 Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11875 * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
11876 (process_start_catch_block): Likewise for variables
11877 `false_label_rtx', `call_rtx' and `return_value_rtx'.
11879 1998-06-29 Brendan Kehoe <brendan@cygnus.com>
11881 * tree.c (build_srcloc): Make sure we allocate this node on the
11884 Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com>
11886 * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
11887 (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
11888 (lang_specific_driver): Only add -lm automatically if need_math is
11891 Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com)
11893 * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o
11895 Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11897 * Makefile.in (EXPR_H): New dependency variable.
11898 (decl2.o): Depend on $(EXPR_H).
11899 (typeck.o): Likewise.
11900 (init.o): Likewise.
11901 (expr.o): Likewise.
11903 1998-06-25 Benjamin Kosnik <bkoz@lisa.cygnus.com>
11905 * decl.c (start_enum): Put local enums on permanent_obstack.
11907 1998-06-25 Mark Mitchell <mark@markmitchell.com>
11909 * cp-tree.h (c_get_alias_set): Declare.
11910 * decl.c (init_decl_processing): Set lang_get_alias_set.
11912 1998-06-25 Andrew MacLeod <amacleod@cygnus.com>
11914 * cp-tree.h (mark_all_runtime_matches): Add function prototype.
11915 * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
11916 flag for all function decls which are in the exception table.
11917 * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
11918 * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
11919 code is emitted for any referenced rtti function.
11921 1998-06-25 Dave Brolley <brolley@cygnus.com>
11923 * lang-specs.h: Use new | syntax to eliminate
11924 string concatenation.
11926 1998-06-25 Jason Merrill <jason@yorick.cygnus.com>
11928 * cp-tree.h (CP_DECL_CONTEXT): New macro.
11929 * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
11930 * method.c (build_overload_nested_name): Likewise.
11931 * sig.c (build_signature_pointer_or_reference_type): Don't set
11934 1998-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
11936 Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
11937 * cp-tree.h (FROB_CONTEXT): New macro.
11938 (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
11939 * decl.c (namespace_binding): Replace NULL_TREE with
11941 (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
11942 * decl2.c (is_namespace_ancestor, lookup_using_namespace):
11944 * decl.c (pushtag): Use FROB_CONTEXT.
11945 (pushdecl, make_typename_type, define_function, grokdeclarator):
11947 * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
11948 * pt.c (push_template_decl_real, lookup_template_class, tsubst):
11950 * decl2.c (decl_namespace): Return global_namespace if no context.
11951 * method.c (build_overload_nested_name): Expect null as context.
11952 * pt.c (mangle_class_name_for_template): Do nothing for null
11954 (lookup_template_class): Allow for null id_context.
11956 1998-06-25 Richard Henderson <rth@cygnus.com>
11958 * method.c (emit_thunk): Set current_function_is_thunk for the
11959 ASM_OUTPUT_MI_THUNK case as well.
11961 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
11963 * exception.cc (__cplus_type_matcher): Get a match_info pointer
11964 instead of an exception table entry as a parameter.
11966 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
11968 * parse.y (function_try_block): Don't call start_catch_handler.
11969 * except.c (call_eh_info): Remove coerced field from declaration.
11970 (build_eh_type_type_ref): New function to create an address of a
11971 rtti function for the new style exception tables.
11972 (expand_start_catch_block): Split function, this contains the
11974 (process_start_catch_block_old): New function to perform the rest
11975 of expand_start_catch_block under old style exceptions.
11976 (process_start_catch_block_old): New function to perform the rest
11977 of expand_start_catch_block under new style exceptions.
11978 (expand_end_catch_block): Only pop the false label off the stack under
11979 the old style of exceptions.
11980 * semantics.c (finish_try_block): Don't call start_catch_handler.
11981 * exception.cc (struct cp_eh_info): Add original_value field.
11982 (__cplus_type_matcher): Perform type matching on the original exception
11983 value, and if we have a match, set the current value.
11984 (__cp_push_exception): Set the original exception value.
11986 1998-06-23 Jason Merrill <jason@yorick.cygnus.com>
11988 * call.c (joust): Fix confusing conversion warning.
11990 * call.c (build_op_delete_call): Add placement parm. Check
11991 LOOKUP_SPECULATIVELY.
11992 * cp-tree.h, decl2.c, init.c: Adjust.
11993 * decl.c (finish_function): Use it.
11995 * pt.c (tsubst): Diagnose creating void fields or variables.
11997 Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11999 * call.c (build_scoped_method_call): Remove unused variable `tmp'.
12001 * cp-tree.h (check_dtor_name): Add prototype.
12003 * init.c (expand_member_init): Remove unused variables
12004 `ptr_type_node', `parm' and `rval'.
12006 * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
12007 in call to fprintf.
12008 (lang_print_xnode): Likewise.
12010 * typeck2.c (enum_name_string): Cast argument to sprintf to long
12011 and use %ld specifier.
12013 * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
12014 specifier in call to fprintf.
12015 (GNU_xref_member): Cast argument to sprintf to int.
12017 Fri Jun 19 23:22:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
12019 * typeck2.c (pop_init_level): Warn about implicit zero initialization
12022 Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12024 * cp-tree.h: Prototype function `check_java_method'.
12026 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
12028 * class.c (finish_struct): Make conflicting use of id a pedwarn.
12029 * decl.c (pushdecl_class_level): Likewise.
12031 1998-06-17 Mark Mitchell <mark@markmitchell.com>
12033 * pt.c (convert_nontype_argument): Issue an error when presented
12034 with an integer (real) constant that cannot be simplified to an
12035 INT_CST (REAL_CST).
12037 * cp-tree.h (c_get_alias_set): Remove declaration added in
12038 1998-06-13 change that should never have been checked in.
12040 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
12042 * typeck.c (build_binary_op_nodefault): Change % in format strings
12045 * decl.c (grokvardecl): Don't build_static_name for decls that
12046 aren't at namespace scope.
12048 * init.c (perform_member_init): Catch default-initialization of
12051 1998-06-17 Mark Mitchell <mark@markmitchell.com>
12053 * errfn.c (cp_thing): Handle the `%%' formatting sequence.
12055 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
12057 * method.c (hack_identifier): Complain about getting a namespace
12059 * typeck.c (decay_conversion): Remove check for namespaces.
12060 * typeck2.c (incomplete_type_error): Likewise.
12061 * parse.y (template_arg): Add PTYPENAME expansion.
12063 1998-06-16 Andrew MacLeod <amacleod@cygnus.com>
12065 * decl.c (grokvardecl): Don't build external assembler names for
12066 TYPENAMEs in other namespaces as there is no declarator.
12067 * error.c (cp_file_of, cp_line_of): Don't extract file or line number
12068 info from DECL_CONTEXT if it is NULL.
12070 1998-06-16 Jason Merrill <jason@yorick.cygnus.com>
12072 * call.c (check_dtor_name): Split out.
12073 (build_scoped_method_call): Use it.
12074 (build_method_call): Use it.
12075 * init.c (build_offset_ref): Use it.
12077 * typeck.c (build_static_cast): Fix handling of pointers to members.
12079 * decl.c (finish_function): Just return nothing from a constructor.
12080 * typeck.c (c_expand_return): Complain about returning a void
12081 expression from a destructor.
12083 1998-06-13 Mark Mitchell <mark@markmitchell.com>
12085 * class.c (alter_access): Accept a BINFO explaining how to get
12086 from the entity whose accessed is being altered to the type doing
12088 (handle_using_decl): New function containing code split out from ...
12089 (finish_struct_1): Here.
12091 * cp-tree.h (complete_type_or_else): Declare.
12092 * init.c (build_new_1, build_delete): Use it.
12093 * typeck.c (require_complete_type): Use complete_type, rather than
12094 expanding it inline.
12095 (complete_type_or_else): New function.
12096 (build_component_ref): Use it.
12097 (pointer_int_sum): Make sure the type pointed to is complete.
12098 (pointer_diff): Likewise.
12100 * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
12103 * search.c (get_matching_virtual): Note that member templates
12104 cannot override virtual functions.
12106 1998-06-12 Brendan Kehoe <brendan@cygnus.com>
12108 * pt.c (check_explicit_specialization): If DECLARATOR turned into
12109 an error_mark_node from lookup_template_function, return the same.
12110 (determine_specialization): Also make sure TEMPLATE_ID isn't an
12111 error_mark_node, before we try to read its operands.
12112 * decl.c (grokdeclarator): If we got an error_mark_node from
12113 check_explicit_specialization, just return it right back.
12115 1998-06-12 Mark Mitchell <mark@markmitchell.com>
12117 * class.c (instantiate_type): Don't treat template-ids that don't
12118 specify any template arguments as equivalent to ordinary
12119 identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to
12120 pointer-to-members for member templates. Tidy slightly.
12121 * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
12122 * init.c (build_offset_ref): Handle template-ids like ordinary
12123 identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
12124 offset part of the OFFSET_REF.
12125 * typeck.c (build_unary_op): Change check for unknown types to
12126 look for OFFSET_REFs, not SCOPE_REFs.
12128 1998-06-11 Mark Mitchell <mark@markmitchell.com>
12130 * pt.c (is_member_template_class): New function.
12131 (push_template_decl_real): Use it.
12133 1998-06-11 Benjamin Kosnik <bkoz@elmo.cygnus.com>
12135 * friend.c (do_friend): Add support for nested classes using
12136 member functions of the enclosing class as friends.
12138 1998-06-10 Mark Mitchell <mark@markmitchell.com>
12140 * call.c (convert_default_arg): Make global, not static.
12141 (convert_arg_for_ellipsis): Split out from ...
12142 (build_over_call): Here.
12143 * cp-tree.h (convert_default_arg); Declare.
12144 (convert_arg_to_ellipsis): Likewise.
12145 (do_member_init): Remove.
12146 * init.c (do_member_init): Remove; this code is dead.
12147 (expand_member_init): Remove much of this code; it is dead.
12148 * typeck.c (convert_arguments): Use convert_default_arg and
12149 convert_arg_for_ellipsis, rather than duplicating here.
12151 * call.c (convert_like): Don't fail silently if
12152 build_user_type_conversion fails. Always return error_mark_node
12155 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
12157 * search.c (covariant_return_p): Complain about ambiguous base.
12159 * typeck.c (build_component_ref): Diagnose ref to nested type.
12161 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
12163 * decl.c (grokparms): Check that INIT isn't an error_mark_node
12164 before giving error about invalid type for default arg.
12166 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
12168 * call.c (build_method_call): Fix thinko.
12170 1998-06-10 Dave Brolley <brolley@cygnus.com>
12172 * decl2.c (lang_decode_option): New argc/argv interface.
12173 * cp-tree.h (lang_decode_option): New argc/argv interface.
12174 * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
12175 specified for cpplib-enabled compilers.
12176 * lex.c (lang_init): Don't check_newline for cpplib.
12177 (init_parse): Don't initialize cpplib here.
12179 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
12181 * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
12182 piece before checking DECL_MUTABLE_P.
12184 1998-06-10 John Carr <jfc@mit.edu>
12186 * tree.c (debug_binfo): Make printf format match arguments.
12188 * error.c (OB_PUTI): Make printf format match arguments.
12190 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
12192 * init.c (perform_member_init): Handle default-initialization.
12194 * except.c (build_throw): Handle throwing NULL.
12196 * typeck.c (build_x_function_call): Use resolve_offset_ref.
12198 * search.c (compute_access): Only strip an anonymous union
12201 * call.c (add_builtin_candidates): Tweak.
12203 * cvt.c (build_expr_type_conversion): Restore code for conversion
12205 * decl2.c (delete_sanity): Use it. Clean up.
12207 * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
12209 1998-06-10 Branko Cibej <branko.cibej@hermes.si>
12211 * typeck.c (c_expand_return): Don't warn about void expressions on
12212 return statements in functions returning void.
12214 1998-06-09 Mark Mitchell <mark@markmitchell.com>
12216 * pt.c (fn_type_unification): Revise documentation. Tidy.
12217 (type_unification): Likewise.
12219 1998-06-09 Andrew MacLeod <amacleod@cygnus.com>
12221 * semantics.c (finish_try_block): Rename expand_start_catch, and delete
12223 * parse.y (function_try_block): Rename expand_start_catch, and delete
12225 * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
12228 1998-06-09 Jason Merrill <jason@yorick.cygnus.com>
12230 * search.c (lookup_member): New fn.
12231 * class.c (finish_struct_1): Use it.
12232 * decl.c (lookup_name_real): Use it.
12234 Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12236 * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
12238 * cp-tree.h: Add prototype for `maybe_print_template_context' and
12239 `maybe_make_one_only'.
12241 * decl.c (auto_function): Remove unused variable `decl'.
12243 * decl2.c: Include dwarf2out.h and dwarfout.h.
12245 * lex.c: Remove redundant declarations of `set_float_handler' and
12248 1998-06-08 Andrew MacLeod <amacleod@cygnus.com>
12250 * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
12251 time flag. Call __cp_eh_info instead of __cp_exception_info.
12252 * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
12253 (__cp_exception_info): Return offset into cp_eh_info structure to
12254 match what use to be the start of this structure.
12255 (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
12256 (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
12258 (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
12259 __cp_eh_info instead of __cp_exception_info.
12261 1998-06-08 Jason Merrill <jason@yorick.cygnus.com>
12263 * decl.c (cp_finish_decl): Disable inlining of extern inlines
12264 with static variables.
12266 1998-06-08 Mark Mitchell <mark@markmitchell.com>
12268 * init.c (build_offset_ref): Correct previous change to use build,
12271 1998-06-07 Mark Mitchell <mark@markmitchell.com>
12273 * class.c (instantiate_type): Handle pointer-to-members where the
12274 member is a template.
12275 * init.c (build_offset_ref): Likewise.
12276 * typeck.c (build_unary_op): Likewise.
12278 1998-06-07 Richard Henderson <rth@cygnus.com>
12280 * lex.c (lang_init_options): New function.
12281 (lang_init): Remove flag_exceptions == 2 hack.
12283 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
12285 * search.c (envelope_add_decl): Tweak for implicit typename.
12287 * call.c (joust): Also warn about confusing conversion op/constructor
12288 overload resolution.
12290 * spew.c (yylex): Also return the TYPE_DECL if got_object.
12291 Don't clear got_object after '~'.
12292 * call.c (build_scoped_method_call): Tweak destructor handling.
12293 (build_method_call): Likewise.
12294 * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
12295 TYPE_MAIN_VARIANT for destructors.
12296 * semantics.c (finish_object_call_expr): Complain about calling a
12299 1998-06-05 Per Bothner <bothner@cygnus.com>
12301 * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
12302 Define - update needed by gcc.c change.
12304 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
12306 * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
12308 1998-06-05 Martin v. Loewis <loewis@informatik.hu-berlin.de>
12310 * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
12311 * decl.c (lookup_name_real): Add namespaces_only parameter.
12312 If set, return only NAMESPACE_DECLs.
12313 (select_decl): Likewise.
12314 (identifier_type_value): Give additional parameter.
12315 (lookup_name_nonclass): Likewise.
12316 (lookup_name): Likewise.
12317 (find_binding): Skip namespace aliases.
12318 (binding_for_name): Likewise.
12319 (push_namespace): Check for namespace aliases.
12320 (lookup_name_namespace_only): New function.
12321 (begin_only_namespace_names, end_only_namespace_names): New functions.
12322 * decl2.c (set_decl_namespace): Skip namespace aliases.
12323 (do_using_directive): Likewise.
12324 (do_namespace_alias): Produce namespace aliases, fix alias
12326 * error.c (dump_decl): Support SCOPE_REF.
12327 * parse.y (extdef): Wrap lookup with namespace_only for namespace
12328 aliases and using declarations.
12330 1998-06-04 Jason Merrill <jason@yorick.cygnus.com>
12332 * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
12334 * error.c (dump_expr): Clean up NEW_EXPR case.
12336 1998-06-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
12338 Suggested by Brendan Kehoe
12339 * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
12340 treat it as using ::decl.
12342 * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
12344 * tree.c (mapcar): Support NEW_EXPR.
12346 * error.c (dump_expr): Support NEW_EXPR.
12348 1998-06-03 Jason Merrill <jason@yorick.cygnus.com>
12350 * method.c (make_thunk): Use overload machinery to make name.
12351 * search.c (covariant_return_p): New fn.
12352 (get_matching_virtual): Use it.
12354 * init.c (build_new_1): Fix check for void.
12356 1998-06-01 Per Bothner <bothner@cygnus.com>
12358 * cp-tree.h (TYPE_FOR_JAVA): New macro.
12359 * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
12360 java_int_type_node, java_long_type_node, java_float_type_node,
12361 java_double_type_node, java_char_type_node, java_boolean_type_node):
12362 New "primitive" types, with predefined names __java_byte etc.
12363 (record_builtin_java_type): New function.
12364 (init_decl_processing): Make Java types with record_builtin_java_type.
12365 (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA".
12366 (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class.
12367 (grokfndecl): Call check_java_method for Java classes.
12368 * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA.
12369 (process_overload_item): Match types against specific
12370 java_XX_type_node types, rather than using is_java_type.
12371 * class.c (finish_struct_1): Don't add default copy constructor
12372 or operator= if TYPE_FOR_JAVA.
12373 (pop_lang_conext): Restore strict_prototyp proper if Java.
12374 * decl2.c (acceptable_java_type, check_java_method): New functions.
12375 * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern.
12376 (tsubst): Move common statement after if statement.
12377 * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match.
12379 1998-06-01 Jason Merrill <jason@yorick.cygnus.com>
12381 * pt.c (for_each_template_parm): Use first_rtl_op.
12383 * tree.c (build_cplus_array_type_1): Also check index_type for
12386 1998-05-31 Jason Merrill <jason@yorick.cygnus.com>
12388 * pt.c (tsubst): Always copy BINFO_BASETYPES.
12390 1998-05-29 scott snyder <snyder@d0sgif.fnal.gov>
12392 * tree.c (layout_basetypes): If we change TYPE_SIZE, change
12393 TYPE_SIZE_UNIT too.
12395 1998-05-29 Mark Mitchell <mark@markmitchell.com>
12397 * decl.c (grokdeclarator): Don't complain about in-class
12398 initialization of static consts if we don't really know the type
12401 1998-05-29 Jason Merrill <jason@yorick.cygnus.com>
12403 * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
12404 * method.c (build_destructor_name): New fn.
12405 * decl2.c (maybe_retrofit_in_chrg): Split out...
12406 (grokclassfn): From here. Reorganize.
12407 * decl.c (grok_ctor_properties): Make sure ctors for types with
12408 vbases have the in_chrg parm.
12409 * pt.c (instantiate_class_template): Update
12410 TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call
12412 (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
12414 1998-05-28 Mark Mitchell <mark@markmitchell.com>
12416 * pt.c (instantiate_decl): Make test for whether or not static
12417 variables should be instantiated early match its comment.
12419 1998-05-28 Jason Merrill <jason@yorick.cygnus.com>
12421 * decl.c (start_decl): Always pedwarn about vacuously redeclaring
12423 (start_function): Call check_default_args.
12424 * decl2.c (grokfield): Don't call check_default_args.
12425 (check_default_args): Use cp_error_at.
12426 * lex.c (do_pending_defargs): Call check_default_args.
12428 1998-05-27 Brendan Kehoe <brendan@cygnus.com>
12430 * call.c (build_method_call): Make sure get_type_value returns
12431 something before we try to use its TYPE_MAIN_VARIANT.
12432 (build_scoped_method_call): Likewise.
12434 1998-05-27 Jason Merrill <jason@yorick.cygnus.com>
12436 * typeck2.c (digest_init): Complain about getting a TREE_LIST to
12437 initialize an array.
12439 * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
12442 * friend.c (do_friend): Clarify template warning.
12444 1998-05-27 Mark Mitchell <mark@markmitchell.com>
12446 * decl.c (shadow_label): Don't treat decls as identifiers.
12447 (maybe_push_to_top_level): Clear shadowed_labels.
12449 * pt.c (instantiate_decl): Reset lineno and filename after calling
12450 regenerate_decl_from_template.
12452 * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
12455 1998-05-27 Kevin Buhr <buhr@stat.wisc.edu>
12457 * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
12459 1998-05-26 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
12461 * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
12462 (convert_nontype_argument): Handle cases when nontype template
12463 parameters become classes after substitution.
12465 1998-05-26 Mark Mitchell <mark@markmitchell.com>
12467 * friend.c (is_friend): Use comptypes, rather than == to compare
12468 types. Modify for new representation of template friends.
12469 (make_friend_class): Likewise.
12470 * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak.
12471 (instantiate_class_template): Deal with template friends.
12473 * decl.c (store_parm_decls): Remove redundant call to
12474 expand_main_function.
12476 1998-05-26 Benjamin Kosnik <bkoz@loony.cygnus.com>
12478 * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
12481 1998-05-26 Per Bothner <bothner@cygnus.com>
12483 * language_as_string: Handle lang_java.
12485 1998-05-26 Jason Merrill <jason@yorick.cygnus.com>
12487 * decl.c (pushdecl): Don't copy the type_decl.
12489 1998-05-26 Martin v. Löwis <loewis@informatik.hu-berlin.de>
12491 * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
12492 current_class_type.
12493 * decl.c (grokdeclarator): Put typedefs on the type's obstack.
12495 * parse.y (complex_direct_notype_declarator): Use $1 to access
12496 scope of notype_qualified_id.
12498 1998-05-26 Dave Brolley <brolley@cygnus.com>
12500 * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
12501 (init_parse): Initialize cpplib interface.
12503 * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
12504 empty continuation.
12506 1998-05-26 Mark Mitchell <mark@markmitchell.com>
12508 * decl.c (pushtag): Avoid crashing on erroneous input.
12510 1998-05-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
12512 * decl.c (push_namespace): Only produce one unique name for
12513 anonymous namespaces.
12514 (get_unique_name): Remove.
12516 1998-05-25 Mark Mitchell <mark@markmitchell.com>
12518 * call.c (tourney): Don't do any extra comparisons.
12520 * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
12522 * cp-tree.h (processing_template_parmlist): Declare.
12523 * decl.c (pushtag): Don't call push_template_decl when we
12525 * pt.c (processing_template_parmlist): New variable.
12526 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
12527 (complete_template_args): Use it.
12528 (add_to_template_args): Likewise.
12529 (innermost_args): Likewise.
12530 (tsubst): Likewise.
12531 (begin_template_parm_list): Use processing_template_parmlist.
12532 (end_template_parm_list): Likewise.
12534 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
12535 * decl.c (grokdeclarator): Use it.
12536 * decl2.c (grok_x_components): Likewise.
12537 * init.c (initializing_context): Likewise.
12538 * method.c (do_build_copy_constructor): Likewise.
12539 (do_build_assign_ref): Likewise.
12540 * search.c (compute_access): Likewise.
12541 * typeck.c (build_component_ref): Likewise.
12543 * decl.c (grokdeclarator): Don't give a cv-qualified version of an
12544 unnamed type a typedef name "for linkage purposes".
12546 * pt.c (lookup_template_class): Don't look at
12547 IDENTIFIER_CLASS_VALUE when there's no current_class_type.
12549 * method.c (build_overload_int): Handle error cases gracefully.
12551 * pt.c (instantiate_decl): Handle static member variables
12554 * pt.c (tsubst): Use the tsubst'd type when producing new
12555 TEMPLATE_PARM_INDEX nodes.
12557 1998-05-24 Mark Mitchell <mark@markmitchell.com>
12559 * tree.c (cp_tree_equal): Handle pointers to member functions.
12561 * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make
12562 sure the type of the REF_BIND is a reference type.
12563 (maybe_handle_ref_bind, compare_ics): Rename reference_type to
12564 target_type for clarity.
12566 * parse.y (xcond): Move call to condition_conversion ...
12567 * semantics.c (finish_for_cond): Here.
12568 * parse.c: Regenerated.
12570 1998-05-24 Jason Merrill <jason@yorick.cygnus.com>
12572 * decl.c (push_namespace): Namespaces have type void.
12573 * typeck2.c (incomplete_type_error): Complain about namespace
12574 used as expression.
12575 * typeck.c (decay_conversion): Likewise.
12577 1998-05-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
12579 * error.c (dump_expr): Support namespaces.
12581 1998-05-23 Jason Merrill <jason@yorick.cygnus.com>
12583 * cp-tree.def: Add SRCLOC.
12584 * cp-tree.h: Add struct tree_srcloc and accessor macros.
12585 * tree.c (build_srcloc, build_srcloc_here): New fns.
12586 * pt.c (add_pending_template): Use build_srcloc_here.
12587 (push_tinst_level): Update last_template_error_tick before erroring.
12588 (instantiate_decl): Restore lineno and input_filename before
12589 calling add_pending_template.
12590 * decl2.c (finish_file): Set up lineno and input_filename for
12593 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
12595 * decl.c (lang_print_error_function): New fn.
12596 (init_decl_processing): Set print_error_function to use it.
12597 * errfn.c (cp_thing): Don't call maybe_print_template_context here.
12599 * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
12602 * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
12603 copy-initialization.
12605 * class.c (build_vtable_entry): Use int_fits_type_p.
12606 (build_vtable): Pass a signed offset to build_vtable_entry.
12607 (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
12608 set_rtti_entry): Likewise.
12610 1998-05-22 Per Bothner <bothner@cygnus.com>
12612 * cp-tree.h: Add comments documenting which LANG_FLAGS are used.
12613 (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used.
12615 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
12617 * pt.c (print_template_context): Use fprintf instead of cp_error.
12619 * pt.c (determine_specialization): Just return an error_mark_node.
12620 Also print the decl we want in error messages. If we complain,
12621 return error_mark_node.
12622 (tsubst_friend_function): Set lineno and input_filename so
12623 error messages will be useful.
12624 (instantiate_template): Just return an error_mark_node.
12625 (check_explicit_specialization): Don't mess with a returned
12628 * pt.c (print_template_context): Add new argument.
12629 (maybe_print_template_context): New fn.
12630 (push_tinst_level): Increment tinst_level_tick.
12631 (pop_tinst_level): Likewise.
12632 * errfn.c (cp_thing): Call maybe_print_template_context. Use
12633 xrealloc instead of xmalloc.
12635 * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
12637 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
12639 * pt.c (tsubst_friend_class): Don't call redeclare_class_template
12640 if the template we looked up is the same as the one we already
12643 Thu May 21 11:54:44 1998 Dave Brolley <brolley@cygnus.com>
12645 * lex.c: (handle_sysv_pragma): FILE* parameter not used.
12646 (cpp_reader,parse_in): Add for cpplib.
12647 (check_newline): Call handle_sysv_pragma with new interface.
12648 (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
12650 * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
12651 (sub_getch): Call GETC for cpplib.
12653 * cp-tree.h: (get_directive_line): Different prototype for cpplib.
12654 (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
12656 * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
12658 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
12660 * decl2.c (maybe_make_one_only): New fn.
12661 (import_export_vtable): Use it.
12662 (import_export_decl): Likewise.
12663 * pt.c (mark_decl_instantiated): Likewise.
12665 1998-05-21 Mark Mitchell <mmitchell@usa.net>
12667 * decl2.c (find_representative_member): Rename to ...
12668 (build_anon_union_vars): New function.
12669 (finish_anon_union): Fix stupidity of previous change.
12671 1998-05-20 Jason Merrill <jason@yorick.cygnus.com>
12673 * decl.c (grokfndecl): Handle definition of specialization in
12674 friend declaration.
12676 * error.c (dump_decl): Fix LOOKUP_EXPR handling.
12678 1998-05-20 Mark Mitchell <mmitchell@usa.net>
12680 * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
12681 to look for type declarations.
12682 (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
12683 * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
12684 (finish_member_class_template): Declare.
12685 * decl.c (pushtag): Put member class templates on the
12686 CLASSTYPE_TAGS list, just as for ordinary member classes.
12687 (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
12688 (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
12689 IDENTIFIER_NAMESPACE_VALUEs.
12690 * parse.y (component_decl): Move code to ...
12691 * semantics.c (finish_member_class_template): New function.
12692 Don't put member class templates on the list of components for a
12694 * parse.c: Regenerated.
12695 * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
12696 In fact, don't use DECL_CONTEXT at all here.
12698 1998-05-20 Martin von Loewis <loewis@informatik.hu-berlin.de>
12700 * decl.c (record_unknown_type): New function.
12701 (init_decl_processing): Call it for the unknown and global type
12704 1998-05-20 Mark Mitchell <mmitchell@usa.net>
12706 * decl2.c (find_representative_member): New function.
12707 (finish_anon_union): Use it.
12709 * cp-tree.h (MAIN_NAME_P): New macro.
12710 (DECL_MAIN_P): Likwise.
12711 * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
12712 (grokfndecl): Use the new macros.
12713 (grokdeclarator): Likewise.
12714 (start_function): Likewise.
12715 (store_parm_decls): Likewise.
12716 (finsh_function): Likewise.
12717 * friend.c (do_friend): Likewise.
12718 * typeck.c (build_function_call_real): Likewise.
12719 (build_unary_op): Likewise.
12721 Wed May 20 02:16:01 1998 Jason Merrill <jason@yorick.cygnus.com>
12723 * decl2.c (start_objects, finish_objects, do_dtors,
12724 do_ctors): Split out from...
12725 (finish_file): ...here.
12727 Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com>
12729 * tree.c (is_overloaded_fn): Don't abort on placeholders from
12732 Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com>
12734 * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
12736 * error.c (dump_expr): Handle an ARROW_EXPR.
12738 Tue May 19 15:13:39 1998 Mark Mitchell <mmitchell@usa.net>
12740 * decl.c (saveable_obstack): Declare.
12741 (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
12742 declare, if necessary.
12744 Tue May 19 14:50:27 1998 Mark Mitchell <mmitchell@usa.net>
12746 * call.c (compare_qual): Remove.
12747 (is_subseq): Tweak.
12748 (is_properly_derived_from): New function.
12749 (maybe_handle_ref_bind): Likewise.
12750 (maybe_handle_implicit_object): Likewise.
12751 (compare_ics): Modify substantially to bring into conformance with
12753 * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
12754 (comp_cv_qualification): Declare.
12755 (comp_cv_qual_signature): Likewise.
12756 * typeck.c (comp_cv_qualification): Likewise.
12757 (comp_cv_qual_signature): Likewise.
12759 Tue May 19 10:05:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12761 * Makefile.in (parse.o): Depend on toplev.h.
12763 * class.c (typecode_p): Remove prototype and definition.
12765 * cp-tree.h (currently_open_class, is_empty_class, member_p):
12768 * decl.c (push_overloaded_decl_top_level): Remove prototype and
12771 * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
12772 in call to `cp_thing'.
12773 (cp_warning): Likewise for function pointer `warning'.
12775 * except.c (do_function_call): Remove prototype and definition.
12776 (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
12778 * method.c (is_java_type): Add prototype and make it static.
12780 * parse.y: Include toplev.h.
12782 * pt.c (type_unification): Remove unused variable `arg'.
12783 (instantiate_decl): Likewise for `save_ti'.
12785 * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
12787 Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
12789 * init.c (build_member_call): Handle template_ids.
12790 * parse.y (primary): Add global_scope template_id.
12792 Mon May 18 23:22:52 1998 Jason Merrill <jason@yorick.cygnus.com>
12794 * decl2.c (get_sentry): Use end_temporary_allocation.
12795 Don't declare permanent_obstack.
12797 Mon May 18 12:28:44 1998 Mark Mitchell <mmitchell@usa.net>
12799 * parse.y (.finish_new_placement): New non-terminal.
12800 (unary_expr, new_type_id): Use it.
12801 * parse.c: Regenerated.
12803 Mon May 18 12:20:27 1998 Brendan Kehoe <brendan@cygnus.com>
12805 * pt.c (redeclare_class_template): Say where the original definition
12806 of the template-parameter's default argument appeared.
12808 Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com>
12810 * call.c (build_over_call): Tweak empty class handling.
12812 * decl.c (make_typename_type): Use currently_open_class.
12814 * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
12816 Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
12818 * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
12819 for a type unless it is one.
12821 * class.c (finish_struct_1): Use OVL_CURRENT in error message.
12823 Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com)
12825 * Makefile.in (program_transform_name, objdir): Define.
12827 * Makefile.in (BISON): Use bison from the build tree if it exists.
12830 Sun May 17 14:52:08 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
12832 * typeck.c (type_unknown_p): Return true for TREE_LIST also.
12834 * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
12836 Sun May 17 14:51:41 1998 Jason Merrill <jason@yorick.cygnus.com>
12838 * call.c (build_scoped_method_call): Likewise.
12840 Sun May 17 13:53:48 1998 Mark Mitchell <mmitchell@usa.net>
12842 * init.c (build_new_1): Call suspend_momentary around the creation
12843 of values that must be saved for exception handling.
12844 * parse.y (.build_new_placement): New non-terminal.
12845 (unary_expr, new_placement): Use it.
12846 * parse.c: Regenerated.
12848 Sun May 17 12:32:08 1998 Jason Merrill <jason@yorick.cygnus.com>
12850 * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
12853 * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
12856 * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
12858 Fri May 15 20:28:00 1998 Jason Merrill <jason@yorick.cygnus.com>
12860 * decl.c (start_decl): Revert problem change.
12862 * Makefile.in (CONFLICTS): Fix.
12864 Fri May 15 15:34:02 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12866 * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
12868 Fri May 15 00:46:05 1998 Jason Merrill <jason@yorick.cygnus.com>
12870 * class.c (finish_struct_1): Use BINFO_SIZE.
12872 * decl.c (start_decl): Use 'tem'.
12874 Thu May 14 16:30:47 1998 Andrew MacLeod <amacleod@cygnus.com>
12876 * exception.cc: Include eh-common.h.
12877 (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
12878 (__cplus_type_matcher): First stab at new C++ runtime type matcher.
12879 (__cp_push_exception): Initialize eh_info struct as well.
12880 * except.c: Remove local structs and include eh-common.h.
12881 (init_exception_processing): Set language and version codes.
12882 (call_eh_info): Add presence of eh_info to runtime description of
12884 (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
12885 * semantics.c (finish_try_block): Call start_catch_block() and
12887 * parse.y (function_try_block): Call start_catch_block() and
12890 Thu May 14 12:27:34 1998 Brendan Kehoe <brendan@cygnus.com>
12892 * typeck.c (original_type): New function.
12893 (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
12894 to see if they're actually the same.
12895 * cp-tree.h (original_type): Declare.
12897 Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12899 * Makefile.in (lex.o): Depend on output.h.
12901 * call.c (add_function_candidate): Remove unused variable `cand'.
12902 (add_conv_candidate): Likewise.
12903 (build_builtin_candidate): Likewise.
12905 * cp-tree.h: Add prototype for `types_overlap_p'.
12907 * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
12909 * decl2.c (merge_functions): Remove unused variables `tmp' and
12912 * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
12913 (code_as_string): Likewise.
12914 (language_as_string): Likewise.
12915 (parm_as_string): Likewise.
12916 (op_as_string): Likewise.
12917 (assop_as_string): Likewise.
12918 (cv_as_string): Likewise.
12920 * lex.c: Include output.h.
12922 * pt.c (type_unification): Cast first argument of `bzero' to a char*.
12924 * search.c (dfs_no_overlap_yet): Mark parameter `t' with
12927 * tinfo.cc (__class_type_info::dcast): Change the type of variable
12928 `i' from int to size_t.
12930 * typeck.c (language_lvalue_valid): Mark parameter `exp' with
12933 Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
12935 * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
12936 DECL_NAMESPACE_SCOPE_P.
12937 (lang_decl_name): Likewise.
12938 * pt.c (tsubst_friend_function, tsubst): Likewise.
12939 * decl.c (pushdecl, redeclaration_error_message, start_decl,
12940 cp_finish_decl, start_function): Likewise.
12941 * class.c (finish_struct_1): Likewise.
12942 * call.c (build_over_call): Likewise.
12943 (compare_ics): Use DERIVED_FROM_P.
12945 Tue May 12 07:24:18 1998 Mark Mitchell <mmitchell@usa.net>
12947 * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
12948 * method.c (build_mangled_name): Use it.
12949 (build_decl_overload_real): Likewise.
12951 * error.c (dump_simple_decl): New function, broken out from ...
12952 (dump_decl): Use it.
12954 Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
12956 * ptree.c (lang_print_xnode): Add missing `break'.
12958 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
12960 * call.c (add_template_candidate): Adjust for changes to
12961 fn_type_unification.
12962 (add_template_candidate_real): Likewise.
12963 (add_template_conv_candidate): Likewise.
12964 (build_user_type_conversion_1): Likewise.
12965 (build_new_function_call): Likewise.
12966 (build_object_call): Likewise.
12967 (build_new_op): Likewise.
12968 (build_new_method_call): Likewise.
12969 * class.c (instantiate_type): Likewise.
12970 * cp-tree.h (unification_kind_t): New type.
12971 (fn_type_unification): Adjust prototype.
12972 (type_unificaiton): Likewise.
12973 * pt.c (UNIFY_ALLOW_NONE): New macro.
12974 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
12975 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
12976 (UNIFY_ALLOW_DERIVED): Likewise.
12977 (unify): Change prototype.
12978 (maybe_adjust_types_for_deduction): New function.
12979 (check_cv_quals_for_unify): Likewise.
12980 (determine_specialization): Adjust.
12981 (fn_type_unification): Likewise.
12982 (type_unification): Likewise.
12983 (type_unification_real): Likewise. Use
12984 maybe_adjust_types_for_deduction. Fix mishandling of
12985 back-unification of template functions passed as arguments. Pass
12986 appropriate combination of UNIFY_ALLOW_* to unify.
12987 (unify): Remove unused NTPARMS parameter. Use
12988 check_cv_quals_for_unify. Remove bogus code that allowed
12989 too-generous unification in order to adhere more closely to standard.
12990 (get_bindings_real): Adjust.
12991 (get_class_bindings): Likewise.
12993 * method.c (build_overload_identifier): Only use the innermost
12994 template arguments when mangling.
12995 * pt.c (tsubst_template_argument_vector): New function.
12996 (complete_template_args): Deal with the situation where the
12997 extra_args contain more than one level of arguments.
12998 (lookup_template_class): Deal with member template classes, which
12999 may have more than one level of arguments.
13000 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
13001 Improve handling of member template classes. Use
13002 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
13003 tsubst_template_argument_vector where appropriate.
13004 (regenerate_decl_from_template): Break out from ...
13005 (instantiate_decl): Here.
13007 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
13008 * parse.h: Regenerated.
13009 * parse.c: Really regenerated.
13011 * cp-tree.h (finish_unary_op_expr): New function.
13012 (finish_id_expr): Likewise.
13013 (begin_new_placement): Likewise.
13014 (finish_new_placement): Likewise.
13015 (finish_declarator): Likewise.
13016 (finish_translation_unit): Likewise.
13017 (finish_parmlist): Likewise.
13018 (begin_class_definition): Likewise.
13019 (finish_class_definition): Likewise.
13020 (finish_default_args): Likewise.
13021 (finish_inline_definitions): Likewise.
13022 * parse.y (GCC_ASM_KEYWORD): Remove.
13023 (TYPENAME_ELLIPSIS): Likewise.
13024 * parse.c: Regenerated.
13025 Use new functions in semantics.c in the actions for many rules.
13026 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
13027 * hash.h: Regenerated.
13028 * semantics.c (finish_expr_stmt): Allow NULL expr.
13029 (finish_unary_op_expr): New function, containing
13030 code previously in parse.y.
13031 (finish_id_expr): Likewise.
13032 (begin_new_placement): Likewise.
13033 (finish_new_placement): Likewise.
13034 (finish_declarator): Likewise.
13035 (finish_translation_unit): Likewise.
13036 (finish_parmlist): Likewise.
13037 (begin_class_definition): Likewise.
13038 (finish_class_definition): Likewise.
13039 (finish_default_args): Likewise.
13040 (finish_inline_definitions): Likewise.
13042 Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
13044 * typeck.c (build_c_cast): Don't decay arrays and functions to
13045 pointer type when converting to a class type.
13047 Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
13049 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
13050 (DECL_CLASS_SCOPE_P): Likewise.
13052 Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
13054 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
13055 * decl2.c (constructor_name_full): Likewise.
13057 Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
13059 * tree.c (mapcar): Add OVERLOAD support.
13061 * init.c (resolve_offset_ref): We must use basetype_path before we
13062 destroy it with a call to convert_pointer_to.
13064 Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
13066 * class.c (currently_open_class): New fn.
13067 * decl.c (lookup_name_real): Use it.
13068 * search.c (lookup_field): Likewise.
13070 Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
13072 * cp-tree.def (OVERLOAD): New node.
13073 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
13074 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
13075 (NAMESPACE_BINDING): Remove.
13076 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
13078 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
13080 (tree_overload): New struct.
13081 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
13082 (REAL_IDENTIFIER_TYPE_VALUE): Define.
13083 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
13084 (lang_decl_flags): Remove in_namespace.
13085 (lang_decl): Remove chain.
13086 (DECL_CHAIN, DECL_NAMESPACE): Remove.
13087 (flag_honor_std): Declare extern.
13088 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
13089 namespace_binding, set_namespace_binding,
13090 lookup_function_nonclass, cat_namespace_levels,
13091 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
13092 scratch_ovl_cons, ovl_member, build_overload): Declare.
13093 (decl_list_length, get_namespace_id, current_namespace_id,
13094 overloaded_globals_p): Remove.
13095 (lookup_using_namespace, qualified_lookup_using_namespace): Change
13097 (push_scratch_obstack): New macro.
13098 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
13099 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
13101 (build_new_function_call): Iterate using OVL_CHAIN.
13102 Print DECL_NAME in when reporting ambiguities.
13103 (build_object_call): Iterate using OVL_NEXT for fns, convs.
13104 (build_new_op): Call lookup_function_nonclass.
13105 Iterate using OVL_NEXT.
13106 (build_op_delete_call): Change detection of members.
13107 Do not wrap TREE_LIST around fields and single global functions.
13108 (build_over_call): Don't push a class level if the context is a
13110 (build_new_method_call): Iterate using OVL_NEXT.
13111 * class.c (add_method): Chain overloaded members using
13112 build_overload. Remove copying of method.
13113 (grow_method): When iterating through the obstack, expect OVERLOAD
13114 nodes. Chain overload members.
13115 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
13116 nodes in call to get_baselinks.
13117 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
13118 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
13119 fdecls that are OVERLOAD nodes.
13120 (validate_lhs): New function.
13121 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
13122 code. Use DECL_NAME in error messages. Split code between global
13123 and member function processing.
13124 * decl.c (global_type_node): New static variable.
13125 (in_std): New global.
13126 (struct binding_level): New field usings.
13127 (resume_binding_level): Assert that we are not in a class.
13128 (toplevel_bindings_p): Just check for namespace_p or
13130 (resume_level): Remove.
13131 (find_binding): New function.
13132 (binding_for_name): Call it.
13133 (namespace_binding, set_namespace_binding): New functions.
13134 (push_namespace): Associate binding level with new namespace,
13135 resume_binding_level for existing namespace. Remove old code.
13136 Fake std by counting.
13137 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
13138 (maybe_push_to_top_level): Save current namespace.
13139 (pop_from_top_level): Restore saved namespace.
13140 (pop_namespace): Call suspend_binding_level. Remove old code.
13141 (cat_namespace_levels): New function.
13142 (set_identifier_type_value_with_scope): For namespace bindings,
13143 set BINDING_TYPE, and use global_type_node.
13144 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
13145 (identifier_type_value): New function.
13146 (pushtag): If no context, use current_namespace.
13147 (duplicate_decls): Don't process DECL_CHAIN.
13148 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
13149 already set. Never reset it to NULL_TREE. Lookup global variables
13150 in their namespace. Push overloaded templates if they are on
13152 (pushdecl_namespace_level): New function.
13153 (pushdecl_top_level): Implement using pushdecl_namespace_level.
13154 (pushdecl_using_decl): New function.
13155 (overloaded_globals_p): Remove.
13156 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
13157 them. Use namespace_binding and set_namespace_value.
13158 (redeclaration_error_message): Complain if the declarations come
13159 from different namespaces.
13160 (lookup_tag): On namespace level, look in the BINDING_TYPE.
13161 (lookup_namespace_name): Pass tree_bindings from stack. Remove
13163 (select_decl): New function.
13164 (lookup_name_real): Call it for qualified and unqualified lookup.
13165 Pass tree_bindings from the stack.
13166 If prefer_type is 1, also accept namespaces.
13167 (lookup_function_nonclass): New function.
13168 (init_decl_processing): Set the binding level of the global
13169 namespace to global_binding_level.
13170 Build a proper type list for __builtin_apply.
13171 Initialize std_node to "fake std" if flag_honor_std is set.
13172 Initialize global_type_node.
13173 Allocated bad_alloc in namespace std if flag_honor_std.
13174 (define_function): Set the DECL_CONTEXT to the current_namespace.
13175 (start_decl): A namespace is not considered as a context here. If
13176 the DECL_CONTEXT is a namespace, push the decl.
13177 (cp_finish_decl): Check for namespaces used as initializers.
13178 (grokfndecl): Add namespace parameter. Remove processing of
13180 (grokvardecl): Add namespace parameter.
13181 (grokdeclarator): Process SCOPEs that are namespaces. For
13182 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
13183 (start_function): Check for contexts that are namespaces.
13184 Set context for declarations that have not been pushed.
13185 (store_parm_decls): Check for ::main only.
13186 (finish_function): Likewise.
13187 (start_method): Check for contexts that are namespaces.
13188 (start_method): Remove DECL_CHAIN processing.
13189 * decl2.c (flag_honor_std): Declare.
13190 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
13191 (decl_namespace_list): New static global.
13192 (grok_x_components): Ignore namespaces as type contexts.
13193 (check_classfn): Expect OVERLOAD nodes.
13194 (grokfield): Remove DECL_CHAIN processing.
13195 (finish_file): Call cat_namespace_levels.
13196 (merge_functions): New function.
13197 (ambiguous_decl): Rewrite.
13198 (lookup_using_namespace): Produce tree_bindings.
13199 (qualified_lookup_using_namespace): Likewise.
13200 (set_decl_namespace, decl_namespace, current_decl_namespace,
13201 push_decl_namespace, pop_decl_namespace): New functions.
13202 (arg_lookup): New struct.
13203 (add_function, arg_assoc_namespace, arg_assoc_class,
13204 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
13206 (get_namespace_id, current_namespace_id): Remove.
13207 (do_toplevel_using_decl): Rewrite.
13208 (do_class_using_decl): Complain about namespace qualifiers.
13209 (do_using_directive): Sorry if not on namespace level. Complain
13210 about unknown namespaces.
13211 * error.c (dump_aggr_type): Check for namespace contexts.
13212 * except.c (init_exception_processing): Push terminate into std.
13213 * friend.c (is_friend): A namespace is not a context, here.
13214 * init.c (expand_member_init): Remove DECL_CHAIN processing.
13215 (build_offset_ref): Process OVERLOAD nodes.
13216 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
13217 * lex.c (identifier_type): Loop using OVL_CHAIN.
13218 (see_typename): Set looking_for_typename to 2.
13219 (real_yylex): Likewise.
13220 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
13221 (do_scoped_id): Expect OVERLOAD nodes.
13222 Change calling convention for qualified_lookup_using_namespace.
13223 (build_lang_decl): Don't set in_namespace anymore.
13224 * method.c (typevec_size): New global.
13225 (build_overload_nested_name): Return if global_namespace.
13226 Otherwise, always expect a declaration context.
13227 (build_qualified_name): Likewise.
13228 Make sure we don't write beyond typevec_size.
13229 (build_decl_overload_real): Likewise.
13230 Allocate one extra slot for the namespace.
13231 (hack_identifier): Mark code dead.
13232 Process OVERLOAD and NAMESPACE_DECL nodes.
13233 * parse.y (program): Pop namespaces until in global namespace.
13234 (extdef): In a using-declaration, don't discard the identifier if
13235 there is no declaration.
13236 (left_curly): Ignore type contexts which are namespaces.
13237 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
13239 * pt.c (template_class_depth): Expect types to be namespaces.
13240 (determine_specialization): Simplify by expecting OVERLOAD nodes.
13241 (push_template_decl): Push into namespace level.
13242 Reset ctx if it is a namespace.
13243 Set DECL_CONTEXT to current_namespace if not set already.
13244 Ignore real contexts that are namespaces.
13245 (mangle_class_name_for_template): Skip global_namespace.
13246 Mangle other namespaces as declarations.
13247 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
13248 (lookup_template_class): Push into namespace of context.
13249 If the context is a namespace, set it to global_namespace.
13250 Use id_context for mangling.
13251 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
13252 (tsubst_friend_function): Ignore namespace contexts.
13253 Push into namespace level.
13254 (tsubst): Handle NAMESPACE_DECL nodes.
13255 Remove DECL_CHAIN processing.
13256 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
13257 * ptree.c (print_lang_identifier): Print bindings.
13258 (lang_print_xnode): Print OVERLOAD nodes.
13259 * rtti.c (init_rtti_processing): Push type_info into std.
13260 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
13261 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
13262 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
13263 lookup_fnfields_here): Likewise.
13264 Process all nodes, instead of going through TREE_CHAIN.
13265 * sig.c (build_signature_pointer_or_reference_type): Set context
13266 to global_namespace.
13267 (build_signature_table_constructor): Expect OVERLOAD nodes.
13268 * spew.c (yylex): Save old setting of looking_for_typename.
13269 * tree.c (decl_list_length): Remove.
13270 (binding_init): New function.
13271 (count_functions): Rewrite.
13272 (is_overloaded_fn): Expect OVERLOAD nodes.
13273 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
13274 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
13275 ovl_member): New functions.
13276 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
13277 (type_unknown_p): Likewise.
13278 (require_instantiated_type): Likewise.
13279 (build_component_ref): Declare code dead.
13280 (build_x_function_call): Create and expect OVERLOAD nodes.
13281 (build_function_call_real): Check for ::main only.
13282 (build_unary_op): Likewise. Expect OVERLOAD nodes.
13283 (convert_for_assignment): Check for TREE_LIST before accessing
13285 * decl.c (duplicate_decls): Check for namespace bindings instead
13286 of global bindings.
13287 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
13288 lookup_name_current_level, start_decl, xref_tag,
13289 finish_enum): Likewise.
13290 * init.c (build_offset_ref): Likewise.
13291 * search.c (lookup_field): Likewise.
13292 (lookup_fnfields): Likewise.
13293 (dfs_debug_mark): Likewise.
13294 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
13295 (poplevel_class, pop_from_top_level): Likewise.
13296 * decl2.c (finish_method): Likewise.
13297 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
13298 * decl.c (record_builtin_type): Likewise.
13299 (init_decl_processing, grokfndecl): Likewise.
13300 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
13301 (make_lang_type): Likewise.
13302 * parse.y (make_thunk): Likewise.
13303 * pt.c (tsubst): Likewise.
13304 * tree.c (debug_binfo): Likewise.
13305 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
13306 tinfo2.cc, inc/new.h: Add std qualifications.
13307 * inc/new: Wrap with namespace std if __HONOR_STD.
13308 * inc/typeinfo: Likewise.
13310 Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
13312 * call.c (build_user_type_conversion_1): Handle second_conv
13313 properly for templates.
13315 Thu May 7 17:09:25 1998 Andrew MacLeod <amacleod@cygnus.com>
13317 * method.c (build_decl_overload_real): Set TREE_USED flag to
13318 zero for build_type_variants nodes as well.
13320 Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
13322 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
13324 Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
13326 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
13327 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
13328 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
13329 xref.o): Add toplev.h dependencies.
13331 Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
13333 * errfn.c (cp_error, cp_warning): Remove declarations for
13334 error and warning respectively.
13336 Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13338 * error.c: Convert to using ctype macros defined in system.h.
13339 * method.c: Likewise.
13340 * xref.c: Likewise.
13341 * lex.c: Likewise. Also remove redundant system header stuff.
13343 Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
13345 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
13346 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
13347 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
13348 xref.c: Add include of toplev.h.
13350 Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
13352 * tree.c (perm_manip): Also regenerate the RTL of an extern.
13353 (copy_to_permanent): Use end_temporary_allocation.
13355 Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
13357 * init.c (expand_vec_init): The initialization of each array
13358 element is a full-expression.
13360 Tue May 5 18:24:13 1998 Andrew MacLeod <amacleod@cygnus.com>
13362 * method.c (build_mangled_name): Add a call to build_type_variant
13363 to get the right type.
13365 Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
13367 * Makefile.in: Add .SUFFIXES.
13369 * cp-tree.def: Remove NAMESPACE_DECL.
13371 Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
13373 * call.c (build_over_call): Do evaluate arg even if it has empty
13375 * decl.c (start_function): Don't push a member function.
13377 Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
13379 * Makefile.in (g++FAQ.info): Put -o option before input file.
13381 Thu Apr 30 13:05:33 1998 Andrew MacLeod <amacleod@cygnus.com>
13383 * gxxint.texi: Add info for squangling codes K and B.
13385 Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
13387 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
13388 the expression in templates.
13389 (finish_stmt_expr): Likewise.
13391 1998-04-28 Brendan Kehoe <brendan@cygnus.com>
13393 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
13395 Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
13397 * decl.c (maybe_push_to_top_level): Always clear
13398 current_template_parms and processing_template_decl.
13399 (pushtag): Remove check of current_class_type and some comments,
13400 since maybe_push_to_top_level no longer creates confusion.
13402 Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
13404 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
13405 (DECL_CLASS_TEMPLATE_P): Likewise.
13406 (DECL_PRIMARY_TEMPLATE): Likewise.
13407 (PRIMARY_TEMPLATE_P): Use it.
13408 (push_template_decl_real): New function.
13409 (redeclare_class_template): Take new template parameters as
13411 (is_specialization_of): New function.
13412 (comp_template_args): Declare.
13413 * decl.c (pushtag): Handle friend template classes.
13414 (xref_tag): Likewise. Use new calling convention for
13415 redeclare_class_template.
13416 * decl2.c (grok_x_components): Handle friend templates.
13417 * friend.c (is_friend): Use is_specialization_of where
13418 appropriate. Deal with friend class templates.
13419 (make_friend_class): Let a class template be friends with itself.
13420 * pt.c (comp_template_args): Remove declaration.
13421 (tsubst_friend_class): New function.
13422 (push_template_decl_real): New function.
13423 (push_template_decl): Use it.
13424 (redeclare_class_template): Adjust for new calling convention.
13425 (comp_template_args): Give it external linkage.
13426 (instantiate_class_type): Use tsubst_friend_class to deal
13427 with friend templates.
13428 * typeck.c (comptypes): Use comp_template_args, rather than
13429 expanding it inline.
13430 * parse.y (component_decl): Handle a nested template type
13431 like other component type declarations.
13433 * pt.c (check_explicit_specialization): Handle overloaded
13434 constructors correctly.
13436 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
13437 (lookup_template_class): Use it.
13439 Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
13441 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
13442 * cp-tree.h: Add WRAPPER support.
13443 * call.c (add_candidate): Split out from add_*_candidate fns.
13444 (build_over_call): Take the candidate instead of function and args.
13445 Enforce access control here. Emit overload warnings here.
13446 (add_warning): New fn.
13447 (joust): Add WARN parm. If not set, call add_warning instead of
13448 printing a warning. Re-enable some warnings.
13449 (tourney): Pass it.
13450 (convert_like): Adjust.
13451 (build_new_op): Adjust.
13452 (build_new_function_call): Adjust.
13453 (build_user_type_conversion_1): Adjust.
13454 (USER_CONV_FN): Adjust.
13455 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
13456 build_int_wrapper): New fns.
13458 Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
13460 * pt.c (unify): Fix typo in previous change.
13462 Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
13464 * error.c (dump_type_real): Declare canonical_name.
13466 * typeck.c (comp_target_types): Fix PMFs.
13468 Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
13470 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
13471 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
13474 * pt.c (tsubst): Decrease the template-level of
13475 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
13476 TEMPLATE_PARM_INDEX.
13477 (template_decl_level): New function.
13478 (unify): Make sure to record unifications for template
13479 parameters, even when the parameters exactly match the arguments.
13480 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
13481 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
13482 aren't from the level we're currently working on.
13484 Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
13486 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
13488 * decl2.c (check_member_template): Set DECL_IGNORED for member
13489 class templates, too.
13491 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
13493 Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
13495 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
13497 Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
13499 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
13500 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
13501 (init_decl_processing): Handle TI types.
13502 * typeck.c (unsigned_type, signed_type): Handle TI types.
13504 Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
13506 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
13507 New local added_libraries. Increment count when add library to
13510 Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
13512 * cp-tree.h (type_as_string_real): New function.
13513 * pt.c (mangle_class_name_for_template): Use it.
13514 * error.c (dump_aggr_type): Change prototype.
13515 (dump_type_prefix): Likewise.
13516 (dump_type_suffix): Likewise.
13517 (dump_type_real): Convert from dump_type. If desired, the
13518 "canonica" name of a typedef, i.e., the name of the underlying
13519 type, can be printed.
13520 (dump_type): Call dump_type_real.
13522 Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
13524 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
13526 * typeck.c (comp_target_types): Tweak pedantic case.
13527 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
13528 Return -1 or 1 instead of 1 or 2.
13529 (compparms): Remove STRICT handling.
13530 (convert_for_assignment): Fix handling of pmfs.
13532 Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
13534 * typeck.c (comp_target_types): Handle references like pointers.
13535 (comp_target_parms): Note that return code from comp_target_types
13536 can be negative to indicate failure.
13538 Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
13540 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
13541 which requires a working target compiler to build.
13543 Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
13545 * tree.c (avoid_overlap): Add prototype.
13547 * spew.c (num_tokens): Add prototype.
13548 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
13550 * search.c (dfs_check_overlap): Add prototype.
13551 (dfs_no_overlap_yet): Likewise.
13553 * pt.c (original_template): Add prototype.
13554 (inline_needs_template_parms): Likewise.
13555 (push_inline_template_parms_recursive): Likewise.
13556 (retrieve_specialization, register_specialization): Likewise.
13557 (print_candidates, reduce_template_parm_level): Likewise.
13558 (build_template_decl, mark_template_parm): Likewise.
13559 (tsubst_friend_function, get_bindings_real): Likewise.
13561 * method.c (start_squangling): Add prototype.
13562 (end_squangling, check_ktype, issue_ktype): Likewise.
13563 (build_overloaded_scope_ref, check_btype): Likewise.
13564 (build_mangled_template_parm_index): Likewise.
13566 * lex.c (init_cpp_parse): Add prototype.
13567 (handle_cp_pragma, handle_sysv_pragma): Likewise.
13568 (reduce_cmp, token_cmp): Likewise.
13570 * except.c (call_eh_info): Add prototype.
13571 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
13572 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
13574 * decl2.c (is_namespace_ancestor): Add prototype.
13575 (namespace_ancestor, add_using_namespace): Likewise.
13576 (ambiguous_decl): Likewise.
13578 * decl.c (indent): Add prototype.
13580 * call.c (add_template_candidate_real): Add prototype.
13582 Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
13584 * decl2.c (build_expr_from_tree): Just return a PMF.
13586 Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
13588 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
13589 when doing initializations.
13591 * pt.c (unify): Use comptypes to compare type args.
13593 Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
13595 * decl.c (duplicate_decls): Fix check for when it's safe to free
13598 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
13601 Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
13603 * pt.c (build_template_parm_index): Add prototype.
13605 * search.c (my_tree_cons): Don't clear words outside the
13606 newly allocated node.
13608 Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
13610 * lex.c (init_parse): Now returns char* containing the filename.
13612 Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
13613 Jeff Law <law@cygnus.com>
13615 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
13618 Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13620 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
13622 Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
13624 * decl.c (duplicate_decls): Don't warn for redundant decls if
13625 friend: let add_friend take care of it.
13627 Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
13629 * sig.c (build_signature_pointer_constructor): Don't set
13630 TREE_HAS_CONSTRUCTOR for a signature pointer.
13631 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
13632 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
13634 * typeck.c (build_unary_op): Only allow taking the address of a
13636 * typeck2.c (digest_init): Simplify.
13637 (store_init_value): Don't pedwarn about using { } for pmfs.
13639 Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
13641 * cp-tree.h (start_decl): Update prototype.
13642 * decl.c (start_decl): Like the C version, new parameters
13643 for the attributes. Call cplus_decl_attributes here,
13644 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
13645 (grokdeclarator): Pass NULL for new start_decl arguments.
13646 * pt.c (tsubst_expr): Likewise.
13647 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
13648 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
13649 * lex.c (build_lang_decl): Add lang_name_java.
13650 * class.c (push_lang_context): Add lang_name_java.
13651 * method.c (build_mangled_name): Check for is_java_type.
13653 Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
13655 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
13656 * call.c (build_scoped_method_call): Check for TREE_CODE for
13657 VOID_TYPE instead of type == void_type_node.
13658 (build_method_call): Likewise.
13659 * decl.c (lookup_name_real): Likewise.
13660 (grokdeclarator): Likewise.
13661 (start_decl): Likewise.
13662 (grokparms): Likewise.
13663 (start_function): Likewise.
13664 (finish_function): Likewise.
13665 (start_method): Likewise.
13667 Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
13669 * lex.c (finput): New variable.
13670 (init_cpp_parse): Renamed from init_parse.
13671 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
13672 (finish_parse): New function.
13673 * cp-tree.h (init_lex, init_parse): Remove declarations.
13675 Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
13677 * call.c (build_call): Still evaluate the actual argument.
13678 * class.c (is_empty_class): Update for -fnew-abi.
13680 * decl2.c: -fnew-abi implies -fsquangle.
13682 * method.c (do_build_assign_ref): Don't do anything to copy
13684 (do_build_copy_constructor): Likewise.
13685 * call.c (build_over_call): Likewise.
13687 Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
13689 * tree.c (avoid_overlap): Return a value.
13691 Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
13693 * method.c (check_btype): Add missing argument to xrealloc.
13694 (check_ktype): Likewise.
13696 Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
13698 Implement empty base optimization.
13699 * class.c (finish_struct_1): Add vbase fields earlier. Set
13700 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
13701 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
13702 (types_overlap_p): New fn.
13703 * tree.c (avoid_overlap): New fn.
13704 (build_base_fields): Use it to avoid overlapping empty bases.
13705 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
13707 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
13709 Re-implement allocation of base class subobjects.
13710 * tree.c (unshare_base_binfos): New fn.
13711 (layout_basetypes): Use it. Now handles offsets of both virtual and
13712 non-virtual bases, after layout_type.
13713 (layout_vbasetypes): Remove.
13714 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
13715 (build_vbase_pointer_fields): Split out from old layout_basetypes.
13716 * class.c (finish_base_struct): Lose offset handling code.
13717 Move nonvdtor warning here. Don't mess with t_binfo anymore.
13718 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
13719 * cp-tree.h: Adjust.
13721 Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
13723 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
13724 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
13725 * class.c (duplicate_tag_error): Likewise.
13726 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
13727 * tree.c (layout_vbasetypes): Update from layout_record, remove
13728 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
13729 (layout_basetypes): Likewise.
13731 Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
13733 * class.c, Make sure system.h is included just after config.h.
13734 Delete lingering stdio and errno references too.
13735 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
13737 Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
13739 * friend.c (is_friend): Fix access control for local classes.
13741 * class.c (is_empty_class): New fn.
13742 * call.c (build_call): Don't pass empty class objects to a function.
13744 Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
13746 * call.c (build_over_call): Do name resolution for default
13747 arguments of function templates in the scope of the templates.
13749 Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
13751 * call.c: Include system.h. Remove includes, declarations and
13752 defines provided by system.h.
13753 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
13754 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
13755 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
13756 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
13757 * typeck2.c, xref.c: Likewise.
13758 * Makefile.in: Dependencies updated as appropriate.
13759 * Make-lang.in: Likewise.
13761 Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
13763 * pt.c (fn_type_unification): Allow incomplete unification without
13764 an immediate error message.
13766 Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
13768 * tree.c (member_p): New fn.
13769 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
13770 initializing class members.
13772 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
13773 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
13775 * call.c (build_method_call): Handle non-scoped destructors, too.
13776 * pt.c (tsubst_copy): Likewise.
13778 * pt.c (print_template_context): Split out...
13779 (push_tinst_level): ...from here.
13781 * friend.c (is_friend): Don't pass a type to decl_function_context.
13783 * typeck.c (convert_for_initialization): Always hand off
13784 conversions to class type.
13786 Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
13788 * friend.c (is_friend): Local classes have the same access as the
13789 enclosing function.
13791 Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
13793 * typeck.c (expand_target_expr): Delete dead function.
13795 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
13797 * repo.c (save_string): Delete dead function.
13799 * method.c (thunk_printable_name): Delete dead function.
13801 * lex.c (yynextch): Delete dead function.
13803 * expr.c (tree_extract_aggr_init): #if 0 out.
13805 * except.c (do_unwind): Delete dead function.
13806 (easy_expand_asm): Likewise.
13808 * cvt.c (build_conversion_type_1): Delete dead function.
13810 * cp-tree.h (push_expression_obstack): Declare.
13812 * call.c (source_type): #if 0 out.
13814 * class.c (alter_access): Remove unused label. Add braces
13815 around empty else clause.
13817 * lex.c (yyprint): Fix argument to printf.
13819 Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
13821 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
13823 * pt.c (instantiate_class_template): Make sure template
13824 arguments are permanent.
13825 * init.c (resolve_offset_ref): Don't go looking around in
13828 * semantics.c: Add routines to handle expressions, and some
13829 declaration processing.
13830 * parse.y: Use them.
13831 (current_class_depth): Move declaration to cp-tree.h.
13832 * parse.c: Regenerated.
13833 * cp-tree.h: Use them.
13834 (current_class_depth): Declare.
13835 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
13837 Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
13839 * error.c (dump_decl): Be a bit more explicit with template
13840 type arguments, when verbose.
13842 Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
13844 * inc/exception: Reorder closing braces.
13846 Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
13848 * pt.c (redeclare_class_template): New function.
13849 * cp_tree.h (redeclare_class_template): Declare it.
13850 * decl.c (xref_tag): Use it.
13852 Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
13854 * call.c (build_over_call): Check IS_AGGR_TYPE, not
13855 TYPE_LANG_SPECIFIC.
13856 * typeck.c (convert_arguments): Likewise.
13858 * decl.c (grokdeclarator): Remove const and volatile from type after
13859 setting constp and volatilep.
13861 * class.c (finish_struct_1): Don't warn about bool bitfield larger
13864 Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
13866 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
13868 Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
13870 * call.c (build_object_call): Complain about ambiguous operator(),
13871 rather that crashing.
13872 (build_new_op): Likewise.
13873 (build_op_delete_call): Likewise.
13875 Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
13877 * cvt.c (perform_qualification_conversions): Use comp_target_types
13878 instead of comp_ptr_ttypes.
13880 Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
13882 * cp-tree.h (enforce_access): Declare.
13883 * call.c (enforce_access): Make it extern, not static.
13884 * class.c (alter_access): Use enforce_access; modify code for ISO
13885 compliance, rather than ARM rules.
13887 Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13889 * cp-tree.h: Fix typo.
13891 Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
13893 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
13894 if (aggregate_value_p (type)).
13896 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
13898 Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
13900 * tree.c (mapcar): When dealing with a DECL, use it's constant
13902 * pt.c (lookup_template_class): Don't mangle the names of template
13903 classes whose arguments are unknown.
13905 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
13907 Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
13909 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
13911 Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
13913 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
13914 boolean_type_node to 1.
13916 Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
13918 * error.c (dump_expr): Remove unused variable `l'.
13920 * pt.c (for_each_template_parm): New function, created by
13921 converting uses_template_parms.
13922 (tree_fn_t): New typedef.
13923 (uses_template_parms): Use it.
13924 (mark_template_parm): New function.
13925 (push_template_decl): Check that the argument list of a partial
13926 specialization uses all the template parameters.
13928 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
13929 with it; we might want it for debugging.
13930 * cp-tree.h (type_unification): Change interface.
13931 * class.c (finish_struct_1): Skip nested template types, just like
13932 ordinary nested types.
13933 (instantiate_type): Use new interface to type_unification.
13934 * lex.c (init_lex): Add __sz as opname for sizeof.
13935 * method.c (build_overload_scope_ref): New function.
13936 (build_overload_int): Handle complex expressions. Set
13937 numeric_output_need_bar if necessary.
13938 (build_overload_value): Handle non-PARM_DECL nodes; this
13939 routine is now used by build_overload_int. Remove some
13940 assignments to numeric_output_need_bar. Use
13941 build_overload_scope_ref.
13942 (build_qualified_name): Note that some template mangled names end
13943 with digits, and set numeric_output_need_bar appropriately. Use
13944 build_underscore_int.
13945 * pt.c (unify): Change interface.
13946 (type_unification_real): Likewise.
13947 (determine_specialization): Use new interfaces.
13948 (tsubst): Deal gracefully with situations in which the argument
13949 vector is not fully filled.
13950 (fn_type_unification): Use new interfaces.
13951 (type_unification): Likewise. Remove NOP_EXPR hack.
13952 (type_unification_real): Likewise.
13953 (unify): Likewise. Deal with unification of complex expressions.
13955 Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
13957 * pt.c (complete_template_args): Initialize skip properly.
13959 * decl.c (make_typename_type): Revert.
13960 (make_implicit_typename): Remove.
13961 (lookup_name_real): Don't call it. Call lookup_field if we see a
13962 TYPE_DECL from a template base.
13963 * search.c (lookup_field): Do implicit typename stuff.
13965 Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
13966 Geoff Noer <noer@cygnus.com>
13968 * Makefile.in: Various fixes for building cygwin32 native toolchains.
13969 * Make-lang.in: Likewise.
13971 Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13973 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
13975 Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
13977 * decl.c (make_implicit_typename): Rewrite removed code.
13978 (make_typename_type): Call it if the type we look up comes from
13979 a base that uses template parms.
13981 * pt.c (complete_template_args): Rewrite.
13982 (tsubst, FUNCTION_DECL): Use it.
13984 Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
13986 * semantics.c (finish_asm_stmt): Fix combine strings. Call
13987 c_expand_asm_operands () if output_operands, input_operands or
13988 clobbers is not NULL_TREE.
13990 Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13992 * pt.c (complete_template_args): New function.
13993 (get_bindings): Deal with specializations of function templates
13994 with return type containing parameters from outer class
13996 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
13997 substitute arguments and compose a new type.
13999 Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
14001 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
14004 Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
14006 * decl.c (make_implicit_typename): Lose useless code.
14008 * call.c (standard_conversion): Handle A* -> const A* properly.
14010 * pt.c (get_bindings_real): Rename from get_bindings. Add
14011 check_rettype parm.
14012 (get_bindings): Pass 1.
14013 (get_bindings_overload): Pass 0.
14015 Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
14017 * pt.c (check_explicit_specialization): When reverting a static
14018 member function, also remove the `this' parameter from
14019 last_function_parms.
14021 Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
14023 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
14024 a function context.
14026 * decl.c (store_bindings): Use free_binding_vecs.
14027 (pop_from_top_level): Likewise.
14029 Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
14031 * decl.c (make_implicit_typename): Only change the type of a
14034 Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
14036 * semantics.c: New file, containing routines to perform the
14037 semantic phase of parsing.
14039 * pt.c (tsubst_expr): Likewise.
14040 * cp-tree.h: Declare the various functions in semantics.c.
14041 Provide macros to access _STMT tree nodes.
14042 * cp-tree.def: Add ASM_STMT tree node.
14043 * Makefile.in, Make-lang.in: Add dependencies on and for
14046 Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
14048 * pt.c (push_template_decl): Only check primary templates.
14050 * pt.c (check_explicit_specialization): Complain about default args
14051 in explicit specialization.
14053 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
14054 constructor_declarator.
14056 Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
14058 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
14059 has no overloaded operator ->.
14061 * call.c (build_field_call): Don't crash when presented with a
14062 field that is actually a nested type.
14064 * decl.c (pushtag): Deal with friend class injection in local
14067 * call.c (build_object_call): Don't crash if OBJ is a
14068 pointer-to-member-function.
14070 Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
14072 * pt.c (push_template_decl): Complain about template with C linkage,
14073 anonymous template class.
14075 Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
14077 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
14078 * search.c: Likewise.
14080 * lex.c (do_pending_defargs): Only call
14081 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
14083 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
14085 Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
14087 * parse.y: Deal with CONSTRUCTORS in new_initializers.
14089 Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
14091 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
14092 closely mimics the behavior in parse.y.
14093 (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
14094 into a compound statement.
14096 Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
14098 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
14099 * pt.c (inline_needs_template_parms): New fn.
14100 (original_template): New fn.
14101 (push_inline_template_parms_recursive): New fn.
14102 (maybe_begin_member_template_processing): Use them.
14103 (maybe_end_member_template_processing): Likewise.
14104 (is_member_or_friend_template): Rename to is_member_template.
14105 Member functions of local classes are never member templates.
14107 Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14109 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
14110 added in the class scope to catch redefinition error.
14112 * pt.c (reduce_template_parm_level): Also copy
14113 the DECL_TEMPLATE_PARMS field.
14115 Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
14117 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
14118 reduced-level template type parameter.
14120 Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
14122 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
14123 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
14124 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
14125 * decl.c (duplicate_decls): Propagate it.
14126 * typeck2.c (abstract_virtuals_error): Use two loops to emit
14127 abstract virtual functions and virtual functions which need a
14128 final overrider separately.
14130 Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
14132 * lang-specs.h: Properly put brackets around array elements in
14135 * typeck.c (build_binary_op_nodefault): Correctly place parens around
14136 && and || in expression.
14138 Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
14140 * call.c (default_parm_conversions): Remove prototype definition.
14141 (build_method_call): Remove unused variable result.
14143 * cvt.c (ocp_convert): Remove unused variable conversion.
14145 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
14147 * except.c (do_unwind): #if 0 definition of unused variables fcall
14150 * expr.c (extract_scalar_init): #if 0 prototype and function
14153 * init.c (expand_aggr_init_1): Remove unused variable init_type.
14154 (build_new_1): Remove unused variable t.
14156 * pt.c (instantiate_class_template): Remove unused variable newtag;
14157 cast called function return value to void.
14158 (do_decl_instantiation): Remove unused variables name and fn.
14160 * tree.c (get_type_decl): Add default return to shut up compiler from
14161 complaining control reaches end of non-void function.
14163 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
14165 Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
14167 * call.c (default_parm_conversions): Remove prototype definition.
14168 (build_method_call): Remove unused variable result.
14169 (build_over_call): Add default case in enumeration switch.
14171 Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
14173 * decl2.c (lang_decode_option): Change j's type to size_t.
14175 * tree.c (layout_vbasetypes): record_align and desired_align are of
14176 type unsigned int; const_size and nonvirtual_const_size likewise.
14178 Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
14180 * parse.y (new_initializer): Make sure all initializers are
14183 Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
14185 * decl2.c (import_export_decl): Mark tinfo functions for
14186 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
14188 Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
14190 * method.c: Fix typo.
14192 Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14194 * method.c: Include "system.h" to get stdlib.h, stdio.h,
14195 ctype.h, string.h, etc.
14196 (issue_nrepeats): Add default case in enumeration switch.
14197 (check_btype): Likewise.
14198 (process_overload_item): Likewise.
14200 * Makefile.in (method.o): Depend on system.h.
14202 Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
14204 * lex.c (do_scoped_id): Fix parenthesizing.
14206 Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
14208 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
14209 FLAG_RTTI is unset, initialize type info machinery and continue
14210 with FLAG_RTTI enabled.
14211 (get_typeid): Likewise.
14213 Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
14215 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
14218 Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
14220 * pt.c (finish_member_template_decl): Deal more gracefully with
14221 invalid declarations.
14223 Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
14225 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
14226 cp-tree.h: Clean up more old overloading code, old RTTI code, and
14227 some formatting quirks.
14229 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
14230 method.c, pt.c, ptree.c, typeck.c: Remove support for
14231 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
14233 * Makefile.in: Adjust.
14235 * pt.c (unify): Don't allow reduced cv-quals when strict.
14237 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
14238 *type_unification* and unify.
14240 Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
14242 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
14243 (nested_name_specifier): And add it before this use.
14244 (typename_sub0): And this use. Also add use without the keyword.
14245 (typename_sub1): Likewise.
14246 * pt.c (instantiate_class_template): Don't actually instantiate
14247 anything if our type uses template parms.
14249 Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
14251 * decl.c (start_function): Don't call temporary_allocation for a
14254 Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
14256 * pt.c (instantiate_class_template): Don't mess with friends if
14257 our type uses template parms.
14259 Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
14261 * parse.y (nested_name_specifier): Use explicit_template_type.
14262 (typename_sub): Allow a template_type, an explicit_template_type,
14263 or an implicit template type at the end.
14264 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
14265 * decl.c (make_typename_type): Handle template-id where the name
14266 is a TEMPLATE_DECL.
14267 * call.c (build_scoped_method_call): Handle member template
14269 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
14270 destructor is represented by the type.
14272 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
14273 * parse.y (nested_name_specifier): Add 'template' case.
14274 (explicit_template_type): New rule.
14275 (typename_sub): Use it.
14276 * decl.c (make_typename_type): Handle getting a template-id for NAME.
14277 * pt.c (tsubst): Likewise.
14279 Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
14281 * pt.c (add_to_template_args): Fix thinko.
14282 (instantiate_class_template): Call it later.
14284 * pt.c (get_class_bindings): Add outer_args parm.
14285 (most_specialized_class): Likewise.
14286 (instantiate_class_template): Pass it.
14287 (more_specialized_class): Likewise.
14288 (lookup_template_class): Get context from template if none
14290 (finish_member_template_decl): Don't do anything with a
14291 partial specialization.
14292 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
14294 * class.c (finish_struct): Member class templates have already been
14295 checked for name clashes.
14296 * decl.c (pushdecl_with_scope): Handle pushing at class level.
14298 Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
14300 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
14301 (tsubst, *_PARM): Support multiple levels of template classes.
14302 (instantiate_class_template): Look up the pattern from the
14304 (lookup_template_class): Handle getting a template for d1.
14305 (push_template_decl): Correct setting of 'primary'.
14306 (reduce_template_parm_level): Add 'levels' parm.
14307 (finish_member_template_decl): Support member class templates.
14308 (template_class_depth): Handle multiple levels.
14309 * parse.y (component_decl_1, fn.def2): Remove member template case.
14310 (component_decl): Add member template cases.
14311 * decl2.c (check_member_template): We now handle member template
14313 * decl.c (pushtag): Handle member templates.
14314 * method.c (do_inline_function_hair): Don't touch
14315 IDENTIFIER_GLOBAL_VALUE.
14316 * init.c (build_offset_ref): If name isn't an identifier, just
14318 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
14320 * typeck.c (get_delta_difference): Do adjust for conversions to
14321 and from virtual base.
14323 Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
14325 * typeck.c (get_delta_difference): Give hard error for conversion
14328 * cp-tree.h: Tweak formatting.
14330 Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
14332 * decl.c (push_namespace): Handle redeclaration error.
14334 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
14335 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
14336 (NAMESPACE_BINDING): New macro.
14337 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
14340 * pt.c (push_template_decl): Use innermost_args.
14342 * decl.c (get_unique_name): Tweak from earlier in the name.
14344 Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
14346 * cp-tree.def: Add CPLUS_BINDING node.
14347 * cp-tree.h (tree_binding): New struct.
14348 (BINDING_SCOPE, BINDING_VALUE): New macros.
14349 (current_namespace, global_namespace): Declare extern.
14350 (struct lang_decl_flags): New field in_namespace.
14351 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
14352 (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
14353 (TREE_INDIRECT_USING): New macro.
14354 * decl2.c (current_namespace, global_namespace): Declare. The
14355 value is a NAMESPACE_DECL now, not a TREE_LIST.
14356 (is_namespace_ancestor, namespace_ancestor): New static functions.
14357 (add_using_namespace, ambiguous_decl): Likewise.
14358 (lookup_using_namespace): New support function for lookup_name.
14359 (qualified_lookup_using_namespace): New support function for
14360 do_scoped_id and lookup_namespace_name.
14361 (get_namespace_id): Mark as obsolete.
14362 (current_namespace_id): Likewise.
14363 (do_namespace_alias): Implement.
14364 (do_using_directive): Implement as call to add_using_namespace.
14365 * decl.c (binding_for_name): New function.
14366 (push_namespace, pop_namespace): Implement.
14367 (push_decl): Don't install a FUNCTION_DECL in the global branch.
14368 (lookup_namespace_name): Implement using qualified lookup.
14369 (lookup_name_real): For global scoping, lookup in
14370 global_namespace. For namespace scoping, lookup in given
14371 namespace. For unscoped lookup, iterate over namespace,
14372 considering using directives.
14373 (init_decl_processing): Initialize global_namespace.
14374 (grokvardecl): Build assembler name as static name for globals.
14375 (grokdeclarator): Remove old namespace mangling.
14376 (xref_tag): When installing a global binding for the
14377 tag, make sure we have an identifier.
14378 * method.c (build_overload_nested_name): Mangle namespaces.
14379 (build_qualified_name): Likewise.
14380 (build_decl_overload_real): Likewise.
14381 * lex.c (build_lang_decl): Set namespace for new declaration to
14383 (do_scoped_id): Find global names in global or current
14384 namespace, or using qualified namespace lookup, depending on
14386 * init.c (build_member_call): When scope is namespace, use
14387 build_x_function_call instead.
14388 (build_offset_ref): When scope is namespace, collapse processing
14389 to lookup_namespace_name instead.
14390 * error.c (dump_decl): Support NAMESPACE_DECL.
14391 * decl.c (pushdecl): Bind globals to current namespace.
14392 (push_overloaded_decl): Likewise.
14393 (lookup_tag): Likewise.
14394 (lookup_name_current_level): Likewise.
14395 (xref_tag): Likewise.
14396 (start_function): Likewise.
14397 * lex.c (do_identifier): Likewise.
14398 (identifier_typedecl_value): Likewise.
14399 (real_yylex): Likewise.
14400 * method.c (do_inline_function_hair): Likewise.
14401 * parse.y (unscoped): Likewise.
14402 * pt.c (check_explicit_specialization): Likewise.
14403 (lookup_template_class): Likewise.
14404 * rtti.c (call_void_fn): Likewise.
14405 * sig.c (build_sigtable): Likewise.
14406 * ptree.c (lang_print_xnode): New function.
14408 Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
14410 * pt.c (instantiate_class_template): Don't instantiate if pedantic
14411 and the args use template parms.
14413 * pt.c (push_tinst_level): If the instantiation uses template parms,
14415 * decl.c (xref_basetypes): Do call complete_type for basetypes
14416 that involve template parameters.
14418 Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
14420 * typeck2.c (process_init_constructor): Fix labeled init check.
14422 Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
14424 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
14425 argument to tsubst and friends.
14427 * pt.c (tsubst, FUNCTION_DECL): Tidy.
14429 * typeck.c (build_x_function_call): Handle static member function
14430 templates like non-templates. Handle friend templates like normal
14431 function templates.
14432 * pt.c (tsubst, *_PARM): Don't use orig_level.
14433 (get_bindings): Don't call add_to_template_args.
14434 (instantiate_template): Likewise.
14435 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
14436 * ptree.c (print_lang_type): Print index/level for template parms.
14438 Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
14440 * Make-lang.in (cc1plus): Note that cc1plus depends on
14441 cp/cp-tree.h and cp/cp-tree.def.
14443 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
14444 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
14445 position in a template parameter list.
14446 * cp-tree.h (template_parm_index): New structure, used as the tree
14447 structure for a TEMPLATE_PARM_INDEX.
14448 (TEMPLATE_PARM_IDX): New macro.
14449 (TEMPLATE_PARM_LEVEL): Likewise.
14450 (TEMPLATE_PARM_DESCENDANTS): Likewise.
14451 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
14452 (TEMPLATE_PARM_DECL): Likewise.
14453 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
14454 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
14455 (TEMPLATE_TYPE_DECL): Likewise.
14456 (TEMPLATE_CONST_IDX): Remove.
14457 (TEMPLATE_CONST_LEVEL): Likewise.
14458 (TEMPLATE_CONST_SET_INFO): Likewise.
14459 (TEMPLATE_TYPE_SET_INFO): Likewise.
14460 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
14462 (TEMPLATE_TYPE_LEVEL): Likewise.
14463 * decl.c (decls_match): Call comp_template_parms, rather than
14464 expanding it inline.
14465 (duplicate_decls): If two template declarations are being merged,
14466 then their TEMPLATE_INFOs should be merged as well.
14467 (grokfndecl): Save template-id information when declaring a friend
14468 with explicit template arguments. Pass arguments to
14469 check_explicit_specialization via correct convention; at some
14470 point check_explicit_specialization changed, but these call-sites
14472 (grokdeclarator): Tidy up slightly.
14473 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
14474 two template functions with the same DECL_ASSEMBLER_NAME the same,
14475 since the names are not yet mangled.
14476 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
14477 TEMPLATE_CONST_PARM.
14478 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
14479 decl for a non-type parameter, rather than printing `<tparm ...>'.
14480 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
14481 (do_friend): Deal with template friends.
14482 * lex.c (do_pending_inlines): Call
14483 maybe_begin_member_template_processing, rather than
14484 conditionally calling begin_member_template_processing.
14485 (process_next_inline): Likewise. Call
14486 maybe_end_member_template_processing, rather than
14487 conditionally calling end_member_template_processing.
14488 (do_pending_defargs): Likewise.
14489 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
14490 TEMPLATE_CONST_PARM.
14491 * method.c (build_mangled_template_parm_index): New function.
14492 (build_overload_value): Use it.
14493 (build_overload_name): Likewise.
14494 * pt.c (finish_member_template_decl): Allow friend declarations.
14495 (template_class_depth): New function.
14496 (is_member_template): Rename, and modify, to become...
14497 (is_member_or_friend_template): New function.
14498 (end_member_template_processing): Rename, and modify, to become...
14499 (maybe_end_member_template_processing).
14500 (build_template_parm_index): New function.
14501 (reduce_template_parm_level): New function.
14502 (process_template_parm): Modify to use build_template_parm_index.
14503 (push_template_decl): Deal with friend templates.
14504 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
14505 TEMPLATE_CONST_PARM.
14506 (tsubst_friend_function): New function.
14507 (instantiate_class_template): Generate the DECL_FRIENDLIST
14508 for a new instantiation by using tsubst_friend_function rather
14510 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
14511 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
14512 appropriate new macros. Use reduce_template_parm_level to
14513 generate lower-level template parameters. Handle tsubst'ing into
14514 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
14515 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
14516 templates. Similarly for the template parameters for a new
14518 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
14519 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
14520 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
14521 (get_bindings): Call add_to_template_args if necessary.
14522 (instantiate_decl): Handle instantiations of friend templates.
14523 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
14524 TEMPLATE_TYPE_PARM as a list of fields; it's not!
14525 * spew.c (yylex): Do a little manual constant propagation to
14528 Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
14530 * error.c: Include sys/types.h.
14532 Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
14534 * method.c (build_mangled_name): Start CPP directives in column zero.
14536 Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
14538 * typeck2.c (process_init_constructor): Sorry about non-trivial
14539 labeled initializers.
14540 * parse.y (initlist): Re-enable labeled initializers.
14542 Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14544 * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
14545 all callers changed. Rely on the new parameter instead of arg
14546 being a TREE_LIST when determine whether we are working inside
14547 template template parameter. Clean up is_type test.
14549 Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
14551 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
14552 * typeck2.c (initializer_constant_valid_p): Allow conversions
14553 between pointers and references.
14555 1998-02-19 Brendan Kehoe <brendan@cygnus.com>
14557 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
14558 if pedantic || warn_pointer_arith.
14560 Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14562 * pt.c (unify): Handle TEMPLATE_DECL.
14564 1998-02-18 Brendan Kehoe <brendan@cygnus.com>
14566 * cp-tree.h (strip_attrs): Remove decl.
14568 1998-02-18 Doug Evans <devans@cygnus.com>
14570 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
14571 Update olddecl's attributes too.
14572 (strip_attrs): Remove function.
14573 * typeck.c (common_type): Call merge_machine_type_attributes.
14575 Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
14577 * parse.y (initdcl0_innards): New grammar symbol.
14578 (nomods_initdecls, nomods_initdcl0): Change type from itype to
14579 none, since the resulting value is never used.
14580 (parse_decl): New function.
14581 (datadef): Remove redundant actions.
14582 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
14583 * parse.c: Regenerated.
14585 Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
14587 * parse.y (simple_stmt): Use getdecls() to check for decl.
14589 Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
14591 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
14593 (c++.install-common): Install c++filt properly as native or as cross
14595 (c++.uninstall): Add c++filt.
14597 Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
14599 * call.c (standard_conversion): Fix multi-level ptr conversions.
14601 Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
14603 * init.c (build_new): Propagate error_mark_node up.
14605 Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
14607 * parse.y (simple_stmt): If the condition isn't a declaration,
14608 start the controlled block after the test.
14610 Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
14612 * call.c (build_over_call): Convert builtin abs, labs and fabs to
14614 * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
14617 Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
14619 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
14621 Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
14623 * cp-tree.h: Add access_protected_virtual_node.
14624 * class.c (init_class_processing): Initialize it.
14625 * decl.c (xref_basetypes): Use it.
14626 * parse.y (base_class_access_list): Likewise.
14628 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
14629 (c++.install-common): Install c++filt.
14631 Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
14633 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
14635 Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
14637 * call.c (reference_binding): Use comptypes when comparing
14638 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
14640 Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
14642 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
14643 (really_overloaded_fn): Move check here from is_overloaded_fn.
14644 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
14646 Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
14648 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
14651 Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
14653 * cp-tree.h (push_template_decl): Return the decl passed in, or an
14654 equivalent duplicate.
14655 * decl.c (pushtag): Use the return value from push_template_decl.
14656 (duplicate_decls): When duplicating a template declaration, merge
14657 the DECL_TEMPLATE_RESULTs as well.
14658 (make_implicit_typename): Don't try to dive into typename types to
14659 find a context for making a new implicit typename.
14660 (start_decl): Use the return value from push_template_decl.
14661 (grokdeclarator): Complain about declarations list `const operator
14662 int'. Since we don't correctly handle in-class initializations of
14663 non-static data members, complain about this (now illegal)
14664 practice. Issue an error for initializations of non-const statics
14665 since that is illegal as well, and since we don't handle that case
14667 (start_function): Use the return value from push_template_decl.
14668 (start_method): Likewise.
14669 * decl2.c (grokfield): Likewise. Since the change to
14670 grokdeclarator ensures that all initialized fields are in fact
14671 static, remove a redundant test for TREE_PUBLIC.
14672 * parse.y (initlist): Disable labeled initializers since they do
14673 not work as per the documentation, and since they do not use the
14674 same syntax as the C front end.
14675 * pt.c (push_template_decl): Return the decl passed in, or an
14676 equivalent duplicate.
14677 (lookup_template_class): When searching in a nested context,
14678 use the right arguments.
14679 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
14680 * typeck.c (build_component_ref): Assign the correct type to the
14681 result of build_vfn_ref.
14683 Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
14685 * pt.c (convert_nontype_argument): Fix typo.
14686 (check_explicit_specialization): Allow old-style specialization
14687 of class template members.
14689 Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
14690 Manfred Hollstein <manfred@s-direktnet.de>
14692 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
14693 when deciding to override DECL_ASSEMBLER_NAME.
14695 Tue Feb 10 15:30:55 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
14697 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
14698 * cp-tree.h (flag_do_squangling): Add declaration.
14699 * lang-options.h: Add -fsquangle and -fno-squangle.
14700 * method.c: Add macros and static variables for squangling.
14701 (build_overload_name): Rename to build_mangled_name, add logic for B
14702 compression, and split into process_modifiers and
14703 process_overload_item.
14704 (process_modifiers): New function, to handle constant, reference,
14706 (process_overload_item): New function, handles issue of type codes.
14707 (build_overload_name): New function, start squangling and call
14708 build_mangled_name.
14709 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
14710 (start_squangling): New function to initialize squangling structs.
14711 (end_squangling): New function to destroy squangling structs.
14712 (nrepeats): Rename variable to Nrepeats.
14713 (issue_nrepeats): New function for issuing 'n' type repeats.
14714 (check_ktype): New function to check for type K name compression.
14715 (build_overload_nested_name): Add a check for K name compression.
14716 (build_qualified_name): Add a check for K name compression and don't
14717 use DECL_ASSEMBLER_NAME when squangling is on.
14718 (check_btype): New function, checks for B type compression.
14719 (build_static_name, build_decl_overload_real): Initiate squangling.
14720 (build_typename_overload, build_overload_with_type): Initiate
14723 Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
14725 * method.c (make_thunk): Avoid name buffer overflow.
14727 Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
14729 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
14730 don't define them yet.
14732 * parse.y (nomods_initdcl0): Add constructor_declarator case.
14734 Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14736 * config-lang.in (diff_excludes): Use basename only.
14738 Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
14740 * tinfo2.cc: Add tinfo for signed char.
14742 Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
14744 * search.c (compute_access): Handle protected constructors in derived
14745 classes as accessible.
14747 Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
14749 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
14750 Call convert_from_reference sooner.
14752 Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
14754 * cvt.c (ocp_convert): Obtain the constant values from constant
14755 decls even if the destination type is the same as the type of the
14758 * decl2.c (finish_file): Make sure that static inlines with
14759 definitions are not marked DECL_EXTERNAL before returning.
14761 Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
14763 * decl.c: Lose arg_looking_for_template.
14764 (lookup_name_real): Likewise.
14765 * parse.y: Lose processing_template_arg, template_arg1.
14766 (primary): Likewise.
14767 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
14769 Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14771 * error.c (dump_decl): Fix type of default arguments for template
14772 template parameters and nontype template parameters.
14773 * parse.y (template_parm): Handle invalid default template
14774 template arguments here.
14776 * parse.y (template_parm): Use template_arg instead of PTYPENAME
14777 for default template template argument.
14778 * pt.c (coerce_template_parms): Merge default template argument
14779 codes. Can treat RECORD_TYPE as template name if it is implicitly
14780 created. Fix argument index in error message.
14781 * typeck.c (comptypes): Merge template argument comparison codes in
14782 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
14784 Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
14786 * lex.c (file_name_nondirectory): Also check for '/'.
14788 Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
14790 * parse.y (primary): Deal with statement-expressions in
14792 * pt.c (tsubst_copy): Handle BIND_EXPR.
14793 * tree.c (mapcar): Likewise.
14795 * call.c (add_template_candidate_real): Pass extra parameter to
14796 fn_type_unification.
14797 * cp-tree.h (fn_type_unification): Add parameter.
14798 * pt.c (fn_type_unification): Add additional parameter to deal with
14799 static member functions.
14800 (get_bindings): Deal with static member functions.
14802 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
14803 (revert_static_member_fn): Declare.
14804 * decl.c (revert_static_member_fn): Remove declaration. Change
14805 linkage from internal to external.
14806 (cp_finish_decl): Deal with virtual functions in classes local to
14807 template functions.
14808 * decl2.c (finish_file): Don't forget to emit increment/decrement
14809 expressions in initializers for file-scope variables.
14810 * parse.y (typename_sub2): If the typename doesn't names a
14811 template, rather than a type, issue an error message.
14812 * pt.c (check_explicit_specialization): Handle specializations of
14813 static member functions.
14814 (coerce_template_parms): Handle offset references to lists of
14816 * search.c (note_debug_info_needed): Don't crash when handed a
14817 type which is being defined.
14818 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
14819 that can happen with some illegal code.
14821 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14823 * call.c (user_harshness): Initialize `code' to 0.
14824 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
14825 (null_ptr_cst_p): Add parentheses around && within ||.
14826 (standard_conversion): Likewise.
14827 (z_candidate): Likewise.
14828 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
14829 (build_object_call): Likewise for `mem_args'.
14830 (build_new_op): Likewise for `mem_arglist'. Add `return' from
14831 default case in enumeration switch.
14833 * class.c (build_vtable_entry): Add explicit braces to avoid
14835 (build_class_init_list): Likewise.
14836 (finish_struct_1): Initialize `width' to 0.
14837 (instantiate_type): Initialize `name' to NULL_TREE. Add
14838 explicit braces to avoid ambiguous `else'.
14840 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
14843 * decl.c (grok_reference_init): Eliminate unused parameter, all
14845 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
14846 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
14847 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
14848 (grokdeclarator): Add parentheses around && within ||. Add
14849 explicit braces to avoid ambiguous `else'.
14850 (grokparms): Initialize `type' to NULL_TREE.
14851 (xref_tag): Remove unused label `just_return'.
14852 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
14853 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
14854 (hack_incomplete_structures): Add parentheses around assignment
14855 used as truth value.
14857 * decl2.c (coerce_delete_type): Hide definition of `e3'.
14859 * error.c: Include <stdlib.h>.
14860 (dump_expr): Change the type of `i' to size_t. Remove unused
14863 * except.c (init_exception_processing): Remove unused variable `d'.
14864 (expand_throw): Likewise for `label'.
14866 * friend.c (add_friends): Add explicit braces to avoid ambiguous
14869 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
14870 (sort_base_init): Likewise for `binfo'.
14871 (expand_member_init): Likewise for `rval'.
14872 (build_member_call): Add parentheses around assignment used as
14874 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
14875 (build_new): Initialize `nelts' to NULL_TREE. Initialize
14876 `old_immediate_size_expand' to 0.
14877 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
14878 (build_vec_delete_1): Remove unused variable `block'.
14879 (expand_vec_init): Initialize `itype' to NULL_TREE.
14881 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
14882 declaration of `index' and `rindex' with autoconf macros.
14883 (reinit_parse_for_expr): Remove unused variables
14884 `look_for_semicolon' and `look_for_lbrac'.
14885 (cons_up_default_function): Initialize `args' to NULL_TREE.
14886 (readescape): Initialize `firstdig' to 0.
14887 (real_yylex): Add parentheses around assignment used as truth value.
14889 * method.c: Include <strings.h> if we don't have <string.h>.
14890 Protect declaration of `index' with autoconf macro.
14892 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
14893 Initialize `type' to NULL_TREE.
14894 (structsp): Remove unused variable `id'.
14896 * pt.c (coerce_template_parms): Add explicit braces to avoid
14898 (lookup_template_class): Initialize `template' to NULL_TREE.
14899 (instantiate_class_template): Remove unused variable `name' and `e'.
14900 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
14901 (do_poplevel): Initialize `saved_warn_unused' to 0.
14902 (type_unification): Remove unused varable `parm'.
14903 (unify): Likewise for `j'.
14905 * repo.c (init_repo): Add parentheses around assignment used as
14907 (finish_repo): Remove unused varable `p'.
14909 * search.c (get_binfo): Initialize `type' to NULL_TREE.
14910 (get_base_distance): Likewise.
14911 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
14912 and `new_v' to NULL_TREE.
14913 (lookup_fnfields): Likewise for `rval_binfo_h'.
14914 (breadth_first_search): Add parentheses around assignment used as
14916 (get_template_base): Initialize `type' to NULL_TREE.
14918 * sig.c (append_signature_fields): Initialize `last_mfptr' to
14920 (build_signature_table_constructor): Likewise for
14921 `last_rhs_field', `pfn' and `vt_off'.
14922 (build_sigtable): Likewise for `init'.
14924 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
14925 (propagate_binfo_offsets): Likewise for `delta'.
14926 (hash_tree_cons): Initialize hashcode to 0.
14927 (can_free): Likewise for `size'.
14928 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
14930 * typeck.c (convert_sequence): Hide prototype.
14931 (common_type): Add explicit braces to avoid ambiguous `else'.
14932 (comp_target_types): Likewise.
14933 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
14934 (build_function_call_real): Add explicit braces to avoid ambiguous
14936 (convert_arguments): Initialize `called_thing' to 0.
14937 (convert_for_initialization): Initialize `savew' and `savee' to 0.
14939 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
14940 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
14941 (build_x_arrow): Likewise for `last_rval'.
14943 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
14945 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
14947 * decl.c (init_decl_processing): Use set_sizetype.
14948 * decl2.c (sizetype): Don't declare.
14949 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
14950 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
14951 (build_component_addr, unary_complex_lvalue): Likewise.
14952 * rtti.c (expand_class_desc): Likewise.
14953 * class.c (get_vfield_offset): Likewise.
14955 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
14957 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
14958 early to avoid bogus error. Handle overloaded function
14959 names provided as template arguments correctly.
14960 (coerce_template_parms): Don't mishandle overloaded functions when
14961 dealing with template template parameters.
14962 (lookup_template_class): Issue an error message, rather than
14963 crashing, when the TYPE_DECL provided is not a template type.
14965 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
14967 * class.c (instantiate_type): Don't just return a known type if
14970 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
14972 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
14973 since that code could never be reached.
14975 * error.c (dump_decl): Avoid aborting in the midst of printing an
14976 error message about an illegal template declaration.
14978 * parse.y (structsp): Print an error message, rather than crashing,
14979 when a class-head does not name a class.
14981 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
14982 template arguments as a g++ extension.
14984 * cp-tree.def (ALIGNOF_EXPR): New tree code.
14985 * decl2.c (grok_alignof): If processing_template_decl, just store
14987 * typeck.c (c_alignof): Likewise.
14988 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
14989 * error.c (dump_expr): Likewise.
14990 * pt.c (tsubst_copy): Likewise.
14991 * tree.c (cp_tree_equal): Likewise.
14992 * pt.c (uses_template_parms): Correctly determine whether or not a
14993 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
14994 folding can be done.
14996 * cp-tree.h (grok_enum_decls): Remove type parameter.
14997 * decl.c (grok_enum_decls): Likewise.
14998 * decl2.c (grok_x_components): Call grok_enum_decls
14999 unconditionally, since it will do nothing if there is no
15000 current_local_enum. Use the new calling sequence.
15001 * pt.c (tsubst_enum): Use the new calling sequence for
15004 * decl.c (start_function): Make member functions of local classes
15005 in extern inline functions have comdat linkage here...
15006 (grokdeclarator): Rather than here.
15008 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
15010 * pt.c (convert_nontype_argument): Use decl_constant_value.
15012 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
15014 * call.c (add_template_candidate_real): New function.
15015 (add_template_candidate): Use it.
15016 (add_template_conv_candidate): Likewise.
15017 (joust): Pass extra argument to more_specialized.
15018 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
15019 (is_local_class): Remove.
15020 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
15021 * cp-tree.h (is_local_class): Remove.
15022 (perform_array_to_pointer_conversion): Likewise.
15023 (finish_member_template_decl): Add.
15024 (check_explicit_specialization): Return a tree, not an int.
15025 (more_specialized): Take additional argument.
15026 (get_bindings): Likewise.
15027 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
15028 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
15029 (perform_array_to_pointer_conversion): Remove.
15030 * decl.c (saved_scope): Add processing_specialization,
15031 processing_explicit_instantiation fields.
15032 (maybe_push_to_top_level): Save them.
15033 (pop_from_top_level): Restore them.
15034 (grokfndecl): Use new return value from
15035 check_explicit_specialization.
15036 (start_decl): Don't check flag_guiding_decls before pushing
15038 (cp_finish_decl): Remove previous (bogus) change.
15039 (grok_declarator): Use decl_function_context rather than
15041 * decl2.c (finish_file): Pass extra argument to get_bindings.
15042 (build_expr_from_tree): Let build_x_component_ref check
15043 validity of arguments rather than doing it here.
15044 * lex.c (cons_up_default_function): Remove code fooling with
15045 processing_specialization, processing_explicit_instantiation
15046 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
15047 * method.c (build_overload_identifier): Mangle local classes in
15048 template functions correctly.
15049 * parse.y (finish_member_template_decl): Move to pt.c.
15050 * pt.c (finish_member_template_decl): Moved here from parse.y.
15051 (print_candidates): New function.
15052 (determine_specialization): Change interface. Properly look for
15053 most specialized versions of template candidates.
15054 (check_explicit_specialization): Fully process explicit
15056 (push_template_decl): Avoid looking at CLASSTYPE fields in
15058 (determine_overloaded_function): Remove.
15059 (convert_nontype_argument): Change name from
15060 convert_nontype_parameter. Use determine_overloaded_function
15061 instead of instantiate_type.
15062 (mangle_class_name_for_template): Handle type contexts as well as
15064 (classtype_mangled_name): Likewise.
15065 (lookup_template_class): Likewise.
15066 (tsubst): Likewise.
15067 (more_specialized): Take explict template arguments as a
15069 (most_specialized): Likewise.
15070 (get_bindings): Likewise. Check that return types match before
15071 proclaiming a function a match.
15072 (do_decl_instantiation): Remove code searching for function to
15073 instantiate; that is now done in check_explicit_specialization.
15074 (add_maybe_template): Pass extra argument to get_bindings.
15075 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
15077 * typeck.c (build_component_ref): Check for invalid arguments.
15079 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
15081 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
15082 return_target and call_target are equivalent.
15084 * pt.c (type_unification_real): Just accept function parms that
15085 don't use any template parms.
15087 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
15089 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
15090 unset DECL_NOT_REALLY_EXTERN.
15092 * parse.y (typename_sub*): Fix std::.
15094 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
15096 * error.c (dump_decl): Fix type default template args.
15097 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
15099 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
15101 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
15102 (file_name_nondirectory): Use.
15104 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
15106 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
15107 that are not really present. Substitute default arguments in
15108 template template arguments. Correctly convert TEMPLATE_DECL to
15109 TEMPLATE_TEMPLATE_PARM.
15110 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
15111 are no longer treated specially here.
15112 * parse.y (template_template_parm): Fix copy error.
15113 * decl.c (grokdeclarator): Warn about missing `typename' for nested
15114 type created from template template parameters.
15115 * parse.y (bad_parm): Likewise
15117 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
15118 (push_nested_class): Likewise.
15119 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
15120 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
15121 (copy_template_template_parm): Declare.
15122 * decl.c (arg_looking_for_template): New variable.
15123 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
15124 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
15125 node if arg_looking_for_template is nonzero.
15126 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
15127 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
15128 (grokdeclarator): Handle TEMPLATE_DECL.
15129 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
15130 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
15131 (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
15132 (dump_decl): Handle unnamed template type parameters.
15133 Handle template template parameters.
15134 (dump_function_name): Handle template template parameters.
15135 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
15136 Handle TEMPLATE_TEMPLATE_PARM.
15137 * method.c (build_template_template_parm_names): New function.
15138 (build_template_parm_names): Handle TEMPLATE_DECL.
15139 (build_overload_nested_name, build_overload_name):
15140 Handle TEMPLATE_TEMPLATE_PARM.
15141 * parse.y (maybe_identifier): New nonterminal.
15142 (template_type_parm): Use it.
15143 (template_template_parm, template_arg1): New nonterminal.
15144 (template_parm): Add template_template_parm rules.
15145 (template_arg): Set processing_template_arg.
15146 (template_arg1): Rules moved from template_arg.
15147 (primary, nonnested_type): Set arg_looking_for_template if we are
15148 processing template arguments.
15149 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
15150 (process_template_parm): Handle template template parameters.
15151 (coerce_template_parms, comp_template_args): Likewise.
15152 (mangle_class_name_for_template, lookup_template_class): Likewise.
15153 (uses_template_parms): Handle TEMPLATE_DECL and
15154 TEMPLATE_TEMPLATE_PARM.
15155 (current_template_args): Handle TEMPLATE_DECL.
15156 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
15157 * search.c (dfs_walk, dfs_record_inheritance):
15158 Handle TEMPLATE_TEMPLATE_PARM.
15159 * tree.c (copy_template_template_parm): New function.
15160 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
15161 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
15163 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
15165 * decl.c (start_decl): Don't allow duplicate definitions of static
15168 * call.c (build_user_type_conversion_1): Handle user-defined
15169 template conversion operators correctly.
15171 * decl2.c (build_expr_from_tree): Issue an error message if the
15172 object in a COMPONENT_REF is a TEMPLATE_DECL.
15174 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
15176 * class.c (is_local_class): New function.
15177 * cp-tree.h (is_local_class): Declare it.
15178 (last_tree): Likewise.
15179 (begin_tree): Likewise.
15180 (end_tree): Likewise.
15181 (lookup_template_class): Change prototype.
15182 * decl.c (cp_finish_decl): Check for NULL where necessary.
15183 Consider FUNCTION_DECLS to declare objects with top-level binding,
15184 when calling make_decl_rtl.
15185 (grokdeclarator): Give members of local classes internal linkage.
15186 (start_function): Remove declaration of last_tree.
15187 (finish_function): Set flag_keep_inline_functions around call to
15188 rest_of_compilation if we are processing a member function in a
15190 (start_method): Call push_template_decl for member functions of
15191 local classes in template functions.
15192 * decl2.c (import_export_decl): Don't give external linkage to
15193 instantiations of templates with internal linkage.
15194 * parse.y (last_tree): Remove declaration.
15195 (template_type): Pass extra parameter to lookup_template_class.
15196 (self_template_type): Likewise.
15197 (structsp): Move call to reset_specialization into left_curly.
15198 (left_curly): Call reset_specialization, and begin_tree.
15199 * pt.c (saved_trees): New variable.
15200 (mangle_class_name_for_template): Change prototype. Use
15201 additional function context to name local classes in templates
15203 (classtype_mangled_name): Pass the context.
15204 (push_template_decl): Handle local classes and templates, and
15205 member functions for such classes.
15206 (convert_nontype_parameter): Fix handling of pointer-to-member
15208 (lookup_template_class): Handle local classes in templates.
15209 (tsubst): Likewise. Don't assume that template instantiations
15210 have external linkage; pay attention to the template declaration.
15211 (mark_decl_instantiated): Likewise.
15212 (begin_tree): New function.
15213 (end_tree): Likewise.
15215 * decl.c (xref_basetypes): Don't call complete_type for basetypes
15216 that involve template parameters; that can lead to infinite
15217 recursion unnecessarily.
15219 * pt.c (register_specialization): Do not register specializations
15220 that aren't ready to be registered yet.
15221 (check_explicit_specialization): Handle explicit specialization of
15222 constructors and destructors.
15223 (build_template_decl): New function.
15224 (push_template_delc): Handle out-of-class specializations of
15227 * pt.c (check_explicit_specialization): Set up the template
15228 information before registering the specialization.
15229 (coerce_template_parms): Fix thinko.
15230 (tsubst): Handle specializations of member templates correctly.
15232 * class.c (finish_struct_methods): Remove calls to
15233 check_explicit_specialization from here.
15234 (finish_struct): And insert them here.
15235 * cp-tree.h (perform_qualification_conversions): New function.
15236 (perform_array_to_pointer_conversion): Likewise.
15237 (begin_explicit_instantiation): Likewise.
15238 (end_explicit_instantiation): Likewise.
15239 (determine_specialization): Renamed from
15240 determine_explicit_specialization.
15241 (comp_template_parms): New function.
15242 (processing_explicit_instantiation): New variable.
15243 * cvt.c (perform_qualification_conversions): New function.
15244 (perform_array_to_pointer_conversion): Likewise.
15245 * decl.c (duplicate_decls): Don't consider template functions
15246 alike unless they have the same parameters. Refine handling of
15247 instantiation/specialization mismatches.
15248 (start_decl): Don't call pushdecl for template specializations,
15249 since they don't affect overloading.
15250 (start_function): Likewise.
15251 (grokfndecl): Call check_explicit_specialization a little later.
15252 Don't call duplicate_decls for memberm template specializations.
15253 (grokdeclarator): Don't update template_count for classes that are
15254 themselves specializations. Remove use of `2' as parameter to
15255 grokfndecl since that value isn't used.
15256 * lex.c (cons_up_default_function): Save and restore
15257 processing_explicit_instantiation around calls to grokfield.
15258 * parse.y (finish_member_template_decl): New function.
15259 (component_decl_1): Use it.
15260 (fn.def2): Likewise.
15261 (template_arg_list_opt): New nonterminal.
15262 (template_type): Use it.
15263 (self_template_type): Likewise.
15264 (template_id): Likewise.
15265 (object_template_id): Likewise.
15266 (notype_template_declarator): Likwise.
15267 (begin_explicit_instantiation): Likewise.
15268 (end_explicit_instantiation): Likewise.
15269 (explicit_instantiation): Use them.
15270 * pt.c (coerce_template_parms): Add parameters.
15271 (processing_explicit_instantiation): New variable.
15272 (convert_nontype_parameter): New function.
15273 (determine_overloaded_function): Likewise.
15274 (begin_explicit_instantiation): Likewise.
15275 (end_explicit_instantiation): Likewise.
15276 (retrieve_specialization): Likewise.
15277 (register_specialization): Likewise.
15278 (processing_explicit_specialization): Removed.
15279 (determine_specialization): Handle specializations of member
15280 functions of template class instantiations.
15281 (check_explicit_specialization): Refine to conform to standard.
15282 (comp_template_parms): New function.
15283 (coerce_template_parms): Call convert_nontype_parameter.
15284 (tsubst): Refine handling of member templates. Use
15285 register_specialization.
15286 (instantiate_template): Use retrieve_specialization.
15287 (do_decl_instantiation): Likewise.
15288 (instantiate_decl): Likewise.
15289 (type_unification): Improve handling of explict template
15291 * tree.c (mapcar): Return error_mark_node, rather than aborting,
15292 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
15293 * typeck.c (build_unary_op): Call determine_specialization, rather
15294 than determine_explicit_specialization.
15296 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
15298 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
15300 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
15302 * error.c (dump_decl): For enum tags, output the tag, not its value.
15304 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
15306 * decl.c (init_decl_processing): Only call init_rtti_processing
15309 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
15311 * init.c (build_new_1): Split out from build_new.
15312 (build_new): Just return a NEW_EXPR.
15313 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
15315 * decl2.c (get_temp_regvar): Tweak.
15317 * cp-tree.h (TREE_CALLS_NEW): Comment out.
15318 * class.c (resolves_to_fixed_type_p): Remove use.
15319 * method.c (build_opfncall): Likewise.
15320 * call.c (build_new_op): Likewise.
15322 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
15324 * exception.cc (__eh_alloc, __eh_free): New fns.
15325 (__cp_push_exception, __cp_pop_exception): Use them.
15326 (__uncatch_exception): Call terminate here if no exception.
15327 * except.c (build_terminate_handler): New fn.
15328 (expand_start_catch_block): Use it.
15329 (expand_exception_blocks): Likewise.
15330 (alloc_eh_object): New fn.
15331 (expand_throw): Use it. Protect exception init with terminate.
15332 * typeck.c (build_modify_expr): Remove code that ignores trivial
15335 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15337 * call.c (add_builtin_candidate): Add default case in enumeration
15339 (build_new_op): Likewise.
15340 (convert_like): Likewise.
15341 * cvt.c (build_expr_type_conversion): Likewise.
15342 * tree.c (real_lvalue_p): Likewise.
15343 (lvalue_p): Likewise.
15344 (cp_tree_equal): Likewise.
15345 * typeck.c (comptypes): Likewise.
15346 (build_component_ref): Likewise.
15347 (build_function_call_real): Likewise.
15348 (build_binary_op_nodefault): Likewise.
15349 (build_unary_op): Likewise.
15350 (build_modify_expr): Likewise.
15351 * typeck2.c (initializer_constant_valid_p): Likewise.
15353 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
15355 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
15357 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
15359 * pt.c (coerce_template_parms): Make sure to digest_init if
15362 * decl.c (duplicate_decls): Make the newdecl virtual if the
15363 olddecl was, just as is done with other attributes of olddecl.
15365 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
15367 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
15368 address of an OFFSET_REF.
15370 * cp-tree.def: Add AGGR_INIT_EXPR.
15371 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
15372 AGGR_INIT_EXPR where appropriate.
15373 * expr.c (cplus_expand_expr): Likewise. Simplify.
15375 * decl2.c (finish_file): Remove call to register_exception_table.
15377 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15379 * pt.c (instantiate_class_template): Don't do injection when
15380 processing_template_decl is true, as pollutes current_binding_level
15383 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
15385 * pt.c (maybe_fold_nontype_arg): Add prototype.
15387 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
15389 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
15390 * error.c (dump_expr): Likewise.
15392 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
15394 * typeck.c (build_function_call_real): Remove "inline called before
15395 definition" pedwarn.
15397 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
15399 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
15401 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
15403 * pt.c (type_unification_real): Change __null to type void* with
15406 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
15408 * call.c (implicit_conversion): Don't call
15409 build_user_type_conversion_1 with a NULL expr, since it will
15412 * pt.c (unify): Don't try to unify array bounds if either array is
15415 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
15417 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
15418 Replace extern decls with casts.
15420 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
15421 Update last_parm_cleanup_insn.
15422 (store_after_parms): Remove.
15423 * cp-tree.h: Adjust.
15425 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
15427 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
15428 (finish_file): Check DECL_COMDAT instead of weak|one_only.
15429 (import_export_vtable): Use make_decl_one_only instead of
15430 comdat_linkage for win32 tweak.
15431 (import_export_decl): Likewise.
15432 * pt.c (mark_decl_instantiated): Likewise.
15434 * decl2.c (finish_file): Lose handling of templates in pending_statics.
15436 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
15438 * decl2.c (finish_file): Lose call to expand_builtin_throw.
15439 * except.c (expand_builtin_throw): Remove.
15440 * cp-tree.h: Remove ptr_ptr_type_node.
15441 * decl.c: Likewise.
15443 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
15445 * decl.c (ptr_ptr_type_node): Define.
15446 (init_decl_processing): Initialize it.
15447 * cp-tree.h: Declare it.
15448 * exception.cc (__cp_exception_info): Use __get_eh_info.
15449 (__cp_push_exception): Likewise.
15450 (__cp_pop_exception): Likewise.
15452 From Scott Snyder <snyder@d0sgif.fnal.gov>:
15453 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
15455 (init_exception_processing): Removed saved_pc initialization.
15457 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
15459 * pt.c (instantiate_decl): Defer all templates but inline functions.
15461 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
15463 * init.c (expand_vec_init): Don't fold a list of parameters.
15465 * decl.c (copy_args_p): Handle copy elision for types with virtual
15467 * call.c (build_over_call): Likewise.
15469 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
15471 * pt.c (lookup_template_function): Copy the template arguments,
15472 not just the list containing them, to the permanent obstack.
15474 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
15476 * except.c (expand_start_catch_block): suspend_momentary for the
15479 * error.c (dump_decl): Handle LOOKUP_EXPR.
15481 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
15483 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
15484 permanent obstack if we are processing a template decl.
15485 * typeck.c (build_static_cast): Likewise.
15486 (build_const_cast): Likewise.
15487 (build_reinterpret_cast): Likewise.
15489 * pt.c (coerce_template_parms): Coerce some expressions, even
15490 when processing_template_decl.
15492 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
15494 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
15495 handling of pointer difference expressions.
15497 * typeck.c (comp_target_types): Comparison of function/method types
15498 is independent of nptrs.
15500 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
15502 * pt.c (tsubst): Avoid creating pointer to reference and
15503 reference to reference types.
15505 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
15507 * parse.y (do_id): New nonterminal.
15508 (template_id): Use it.
15510 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
15512 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
15513 * spew.c (yylex): Don't do_identifier here.
15514 * decl2.c (build_expr_from_tree): Revert last change.
15516 * decl2.c (build_expr_from_tree): Expand the name for a method call.
15517 * parse.y (object_template_id): Don't try to take the DECL_NAME.
15519 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
15521 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
15523 * call.c (build_op_delete_call): Adjust.
15525 * except.c (expand_end_catch_block): Lose rethrow region.
15526 (expand_start_catch_block): Likewise.
15527 (expand_end_catch_block): Don't expand_leftover_cleanups.
15529 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15531 * pt.c (tsubst): Remove tree_cons call (places redundant info into
15532 DECL_TEMPLATE_INSTANTIATION).
15534 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
15536 * tree.c (is_overloaded_fn): Handle getting a fn template.
15537 (really_overloaded_fn): Likewise.
15538 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
15539 * pt.c (check_explicit_specialization): Tweak.
15540 (determine_explicit_specialization): Tweak.
15542 * tree.c, cp-tree.h (get_target_expr): New fn.
15544 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
15546 * pt.c (check_explicit_specialization): Fix misspelling in
15547 diagnostic: `preceeded'.
15548 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
15551 1997-12-02 Mark Mitchell <mmitchell@usa.net>
15553 * pt.c (determine_explicit_specialization): Avoid an internal
15554 error for bad specializations.
15556 * method.c (build_overload_value): Handle SCOPE_REF.
15558 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
15560 * class.c (prepare_fresh_vtable): Enable even more complex MI
15563 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
15565 * exception.cc (__check_eh_spec): Optimize a bit.
15567 * exception.cc (__cp_pop_exception): Lose handler arg.
15568 * except.c (do_pop_exception): Likewise.
15569 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
15570 (expand_end_catch_block): Likewise.
15572 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
15574 * pt.c (check_explicit_specialization): Complain about using a
15575 template-id for a non-specialization.
15577 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
15579 * repo.c: Prototype rindex only if needed.
15580 * xref.c: Likewise.
15582 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
15584 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
15586 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
15588 * typeck.c (build_const_cast): Handle references here instead of
15589 handing off to convert_to_reference.
15591 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
15592 TerminateFunctionCall.
15593 (init_exception_processing): Likewise. Terminate et al are now
15594 the fns, not ADDR_EXPRs.
15595 (various): Lose redundant assemble_external calls.
15596 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
15598 * cp-tree.h (struct lang_decl_flags): Add comdat.
15599 (DECL_COMDAT): New macro.
15600 * decl.c (duplicate_decls): Propagate it.
15601 (cp_finish_decl): Handle it.
15602 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
15604 * class.c: Remove static pending_hard_virtuals.
15605 (add_virtual_function): Take pointers to pending_virtuals
15606 and pending_hard_virtuals.
15607 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
15609 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
15611 * decl2.c (import_export_vtable): If we support one_only but not
15612 weak symbols, mark instantiated template vtables one_only.
15613 (import_export_decl): Likewise for tinfo functions.
15614 (finish_vtable_vardecl): Also write out vtables from explicitly
15615 instantiated template classes.
15616 * pt.c (mark_class_instantiated): Revert last change.
15618 * except.c (expand_throw): Call mark_used on the destructor.
15620 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
15622 * lex.c (lang_init): Enable flag_exceptions by default if no
15623 command line switch was specified.
15625 1997-11-26 Mark Mitchell <mmitchell@usa.net>
15627 * pt.c (unify): Handle `void' template parameters in
15630 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
15632 * rtti.c (build_dynamic_cast): Handle template case here.
15633 (build_dynamic_cast_1): Not here.
15635 * typeck2.c (digest_init): Make copies where appropriate.
15637 * decl2.c (delete_sanity): resolve_offset_ref.
15639 * except.c: Call terminate without caching so many bits.
15641 * except.c (expand_start_catch_block): Fix catching a reference
15644 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
15646 * init.c (build_new): Copy size to the saveable obstack.
15648 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
15649 TRY_CATCH_EXPR for now.
15651 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
15653 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
15654 has DECL_LANG_SPECIFIC.
15656 * exception.cc (struct cp_eh_info): Add handlers field.
15657 (__cp_push_exception): Initialize it.
15658 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
15659 (__throw_bad_exception): Remove.
15660 * except.c (call_eh_info): Add handlers field.
15661 (get_eh_handlers): New fn.
15662 (push_eh_cleanup): Increment handlers.
15664 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
15666 * except.c (expand_start_eh_spec): Use the try/catch code.
15667 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
15668 doing everything inline.
15669 (init_exception_processing): throw_type_match now takes
15670 const void pointers.
15671 * exception.cc (__check_eh_spec): New fn.
15672 * inc/exception: Neither terminate nor unexpected return.
15673 * decl.c: Make const_ptr_type_node public.
15674 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
15676 * except.c (expand_start_catch_block): We only need the rethrow
15677 region for non-sjlj exceptions.
15678 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
15680 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
15682 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
15683 (various.o): Likewise.
15684 * inc/new: Add placement deletes. Add throw specs for default new.
15685 * new.cc (set_new_handler): Move here from libgcc2.
15686 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
15687 (new): Move from libgcc2. Throw bad_alloc.
15688 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
15689 * decl.c (init_decl_processing): Update exception specs on new and
15692 * method.c (build_decl_overload_real): Don't mess with global
15695 * init.c (build_new): Check for null throw spec, not nothrow_t.
15697 * decl.c (duplicate_decls): Don't complain about different exceptions
15698 from an internal declaration.
15700 * call.c (build_op_delete_call): Fix check for member fns again.
15702 * decl2.c (import_export_decl): Interface hackery affects
15703 virtual synthesized methods.
15705 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
15707 * decl.c (start_decl): Don't just complain about a mismatched
15710 * decl.c (make_implicit_typename): Handle case where t is not
15711 actually from context.
15712 * tree.c (get_type_decl): Lose identifier case.
15713 * spew.c (yylex): Lose useless call to identifier_typedecl_value.
15714 * parse.y (nonnested_type): Just use lookup_name.
15715 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
15717 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
15719 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
15720 T was built in C language context (for example, by
15721 output_func_start_profiler).
15723 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
15725 * decl.c (make_implicit_typename): New fn.
15726 (lookup_name_real): Use it. Use current_class_type as the context.
15728 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
15730 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
15732 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
15734 * friend.c (do_friend): Warn about non-template friends in templates.
15736 * call.c (build_op_delete_call): Fix handling of inherited delete.
15738 * search.c (dfs_record_inheritance): Ignore template type parms.
15740 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
15742 * call.c (build_new_op): Fix copy error.
15743 (build_op_new_call): New fn.
15744 (build_op_delete_call): New fn.
15745 * cp-tree.h: Declare them.
15746 * init.c (build_new): Use them. Support placement delete.
15747 (build_x_delete): Use build_op_delete_call.
15748 (build_delete): Likewise.
15749 * decl2.c (delete_sanity): Likewise.
15750 (coerce_delete_type): Don't complain about placement delete.
15752 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
15754 * call.c (build_new_function_call): Remove unused 'obj' parm.
15755 * cp-tree.h, typeck.c: Adjust.
15757 * init.c (build_new): Make the cleanup last longer.
15758 (expand_vec_init): Call do_pending_stack_adjust.
15760 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
15762 * pt.c (do_type_instantiation): Fix typo.
15763 (mark_class_instantiated): If we support one_only but not weak
15764 symbols, don't mark this as known.
15766 * init.c (build_new): Handle vec delete in EH cleanup.
15768 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15770 * call.c (build_method_call): Call complete_type before checking
15773 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
15775 * decl.c (add_block_current_level): Delete.
15776 * init.c (build_vec_delete_1): Delete build_block and
15777 add_block_current_level calls.
15779 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
15781 * init.c (build_new): Handle freeing allocated memory when the
15782 constructor throws.
15784 * call.c (build_new_method_call): Fix flags arg.
15786 * pt.c (do_type_instantiation): Don't try to instantiate
15788 (mark_decl_instantiated): If we support one_only but not
15789 weak symbols, mark this one_only.
15790 * decl2.c (import_export_vtable): Don't defer handling of vtables
15791 if MULTIPLE_SYMBOL_SPACES.
15793 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
15795 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
15797 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
15799 * except.c (do_pop_exception): Return a value.
15801 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
15803 * call.c (build_new_method_call): Handle getting a
15804 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
15805 if we got template parms.
15806 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
15808 * decl2.c (build_expr_from_tree): Tweak last change.
15809 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
15810 (maybe_fold_nontype_arg): Split out from tsubst_copy.
15811 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
15813 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
15815 * pt.c (tsubst_copy): Handle explicit template arguments in
15817 * typeck.c (build_x_function_call): Likewise.
15818 * decl2.c (build_expr_from_tree): Lookup function name if it
15821 * pt.c (tsubst): Instantiate template functions properly when
15822 template parameter does not appear in function arguments and return
15824 (comp_template_args): Handle member templates required by tsubst.
15826 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
15828 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
15831 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
15833 * pt.c (coerce_template_parms): Tweak error message.
15835 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
15836 return type defaults to `int', even if there are storage-class
15839 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
15841 Complete nested exception support.
15842 * except.c (do_pop_exception): Split out...
15843 (push_eh_cleanup): From here. Handle the EH region by hand.
15844 (expand_start_catch_block): Add a new level for the catch parm.
15845 Move the rethrow region outside the two cleanup regions.
15846 Protect the initializer for the catch parm with terminate.
15847 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
15848 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
15849 popping off the middle of the stack.
15850 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
15851 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
15852 (build_cplus_new): Only wrap CALL_EXPRs.
15853 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
15854 the constructor call.
15856 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15858 * Make-lang.in (c++.distdir): Make inc subdirectory.
15860 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
15862 * decl2.c (finish_file): Put back some code.
15864 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
15866 * decl2.c (finish_file): Remove redundant code.
15867 * method.c (emit_thunk): Don't let the backend defer generic thunks.
15869 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
15871 * except.c (call_eh_info): Split out...
15872 (push_eh_info): From here.
15873 (expand_builtin_throw): Use it.
15874 (expand_start_catch_block): Move region start back.
15876 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
15878 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
15879 (real_yylex): Record wide strings using target endianness, not host.
15881 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
15883 * repo.c (rindex): Add decl unconditionally.
15884 (get_base_filename, open_repo_file): Don't cast rindex.
15885 * xref.c (rindex): Add decl unconditionally.
15886 (index): Remove unused decl.
15887 (open_xref_file): Don't cast rindex.
15889 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
15891 * class.c (build_vbase_path): Propagate the result type properly.
15893 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
15895 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
15896 remaining use of saved_throw_type with a call to get_eh_type.
15898 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
15900 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
15901 (file_name_nondirectory): New function, doing the same as the macro.
15902 (set_typedecl_interface_info): Use it instead of the macro.
15903 (check_newline): Likewise.
15904 (handle_cp_pragma): Likewise.
15906 * repo.c (get_base_filename): Cast result of rindex to char*.
15907 (open_repo_file): Likewise.
15908 * xref.c (open_xref_file): Likewise.
15909 * error.c (dump_char): Make its arg int, not char.
15911 * except.c (push_eh_info): Pass the number of fields - 1 down, not
15912 the exact number of fields.
15914 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
15916 Support for nested exceptions.
15917 * tinfo2.cc (__is_pointer): New fn.
15918 * exception.cc (struct cp_eh_info): Define.
15919 (__cp_exception_info, __uncatch_exception): New fns.
15920 (__cp_push_exception, __cp_pop_exception): New fns.
15921 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
15923 (init_exception_processing): Likewise. __eh_pc is now external.
15924 (push_eh_info): New fn.
15925 (get_eh_{info,value,type,caught}): New fns.
15926 (push_eh_cleanup): Just call __cp_pop_exception.
15927 (expand_start_catch_block): Use push_eh_info. Start the eh region
15929 (expand_end_eh_spec): Use push_eh_info.
15930 (expand_throw): Call __cp_push_exception to set up the exception info.
15931 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
15933 (expand_builtin_throw): Don't refer to empty_fndecl.
15935 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
15937 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
15939 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
15941 * method.c (build_template_parm_names, build_decl_overload_real):
15942 Add static to definitions.
15943 * pt.c (add_to_template_args, note_template_header,
15944 processing_explicit_specialization, type_unification_real): Likewise.
15945 ({determine,check}_explicit_specialization): Use a single string for
15948 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
15950 * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
15951 (expand_end_catch_block): Likewise.
15952 (expand_end_eh_spec): Likewise.
15954 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
15956 * decl.c (duplicate_decls): Handle template specializations
15958 * error.c (dump_function_name): Fix printing of specializations of
15959 member functions that are not member templates.
15960 * cp-tree.h (processing_specialization): Make global.
15961 * pt.c (processing_specialization): Likewise.
15962 * lex.c (cons_up_default_function): Save and restore
15963 processing_specialization to avoid confusion.
15965 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
15967 * decl.c (init_decl_processing): Give null_node unknown* type.
15968 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
15969 (common_type): Likewise.
15970 * error.c (args_as_string): Recognize null_node.
15972 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15974 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
15975 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
15977 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
15979 * Make-lang.in (g++): Include prefix.o.
15981 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
15983 * pt.c (determine_explicit_specialization): Initialize "dummy"
15984 to keep Purify quiet.
15986 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
15988 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
15989 (build_overload_int): Not here.
15991 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
15993 * class.c (build_type_pathname): Remove.
15994 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
15996 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
15998 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
15999 &&label GNU extension.
16001 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
16003 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
16004 so as to avoid incorrect manglings.
16005 * method.c (build_decl_overload_real): Don't mangle return types
16008 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
16010 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
16011 scratch_tree_cons): Define as macros for now.
16012 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
16013 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
16014 typeck2.c: Use them and the expression_obstack variants.
16016 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
16018 * decl.c (store_return_init): Allow classes with explicit ctors to
16019 be used with the named return values extension.
16021 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
16023 * pt.c (instantiate_decl): Fix previous change.
16025 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
16027 * pt.c (tsubst): Fix thinko.
16028 (instantiate_decl): Really use the original template.
16030 * call.c (build_new_method_call): Use simple constructor_name for
16033 Wed Oct 8 22:44:42 1997 Jeffrey A Law <law@cygnus.com>
16035 * method.c (build_underscore_int): Don't use ANSI specific
16038 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
16040 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
16041 for our key method; it might have been inlined by -O3.
16043 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
16045 * decl.c (make_typename_type): Do not try to call lookup_field for
16046 non-aggregate types.
16048 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
16050 * typeck.c (build_reinterpret_cast): Tweak.
16052 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
16054 * typeck.c (build_reinterpret_cast): Converting a void pointer
16055 to function pointer with a reinterpret_cast produces a warning
16056 if -pedantic is issued.
16058 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
16060 * typeck.c (c_expand_return): Don't warn about returning a
16061 reference-type variable as a reference.
16063 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
16065 * method.c (build_static_name): Fix typo.
16067 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
16069 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
16070 OLDDECL before we try to do DECL_USE_TEMPLATE.
16072 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
16074 * decl.c (duplicate_decls): Don't warn about template instances.
16076 * typeck.c (mark_addressable): Lose ancient code that unsets
16079 * pt.c (do_decl_instantiation): Lose support for instantiating
16082 * call.c (build_new_function_call): Fix handling of null explicit
16084 (build_new_method_call): Likewise.
16086 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
16088 * method.c (build_underscore_int): Fix typo.
16090 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
16092 * tree.c (print_lang_statistics): #if 0 call to
16093 print_inline_obstack_statistics until its definition is checked in.
16095 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
16097 * decl2.c (finish_file): Move dump_tree_statistics to end.
16099 * pt.c (instantiate_decl): Look for the original template.
16100 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
16101 of member templates.
16103 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
16105 * Makefile.in (g++FAQ.*): New rules.
16106 (CONFLICTS): Update.
16107 * g++FAQ.texi: Moved from libg++.
16109 * parse.y (PFUNCNAME): Only specify the type once.
16111 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
16113 * lex.c (real_yylex): Clean up the code to fully behave the way
16114 the c-lex.c parser does for complex and real numbers.
16116 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
16118 * method.c (build_decl_overload_real): Reformat.
16120 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
16122 * method.c (synthesize_method): If at_eof, determine our linkage.
16124 1997-09-29 Paul Eggert <eggert@twinsun.com>
16126 * lex.c (real_yylex): Treat `$' just like `_', except issue a
16127 diagnostic if !dollars_in_ident or if pedantic.
16129 * lang-specs.h (@c++): -ansi no longer implies -$.
16131 * decl2.c (lang_decode_option):
16132 -traditional and -ansi now do not mess with
16135 Mon Sep 29 19:57:51 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
16137 * Makefile.in (parse.o, decl.o): Also depend on
16138 $(srcdir)/../except.h $(srcdir)/../output.h.
16139 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
16140 $(srcdir)/../except.h $(srcdir)/../output.h.
16141 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
16144 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
16146 * expr.c (cplus_expand_expr): Make it static.
16148 * decl2.c, init.c, typeck.c: Include "expr.h".
16149 (expand_expr): Use proper values when calling the function.
16151 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
16153 * lang-options.h: New -Wold-style-cast flag.
16154 * cp-tree.h (warn_old_style_cast): New variable.
16155 * decl2.c (warn_old_style_cast): Likewise.
16156 (lang_decode_option): Support -Wold-style-cast.
16157 (reparse_absdcl_as_casts): Produce old-style-cast warning.
16159 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
16161 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
16162 TREE_USED, reset value based on already_used.
16164 * init.c (expand_member_init): Revert change.
16166 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
16168 * cp-tree.h, decl.c, decl2.c, pt.c:
16169 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
16171 * decl2.c (lang_decode_option): Add missing ;.
16173 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
16175 * friend.c (do_friend): Disable injection for all template-derived
16177 * decl2.c (lang_decode_option): Handle -fguiding-decls.
16178 * parse.y (notype_template_declarator): New nonterminal.
16179 (direct_notype_declarator): Use it.
16180 (complex_direct_notype_declarator): Likewise.
16181 (object_template_id): Accept any kind of identifier after TEMPLATE.
16182 (notype_qualified_id): Don't add template declarators here.
16184 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
16186 * call.c (add_template_candidate): Add explicit_targs parameter.
16187 (build_scoped_method_call): Use it.
16188 (build_overload_call_real): Likewise.
16189 (build_user_type_conversion_1): Likewise.
16190 (build_new_function_call): Likewise.
16191 (build_object_call): Likewise.
16192 (build_new_op): Likewise.
16193 (build_new_method_call): Likewise.
16194 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
16195 (build_new_method_call): Likewise.
16197 * class.c (finish_struct_methods): Add specialization pass to
16198 determine which methods were specializing which other methods.
16199 (instantiate_type): Handle TEMPLATE_ID_EXPR.
16201 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
16203 * cp-tree.h (name_mangling_version): New variable.
16204 (flag_guiding_decls): Likewise.
16205 (build_template_decl_overload): New function.
16206 (begin_specialization): Likewise.
16207 (reset_specialization): Likewise.
16208 (end_specialization): Likewise.
16209 (determine_explicit_specialization): Likewise.
16210 (check_explicit_specialization): Likewise.
16211 (lookup_template_function): Likewise.
16212 (fn_type_unification): Add explicit_targs parameter.
16213 (type_unification): Likewise.
16215 * decl.c (duplicate_decls): Add smarts for explicit
16217 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
16219 (grokfndecl): Call check_explicit_specialization.
16221 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
16222 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
16223 (check_classfn): Handle specializations.
16225 * error.c (dump_function_name): Print specialization arguments.
16227 * friend.c (do_friend): Don't call pushdecl for template
16230 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
16232 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
16233 and -fno-guiding-decls.
16235 * lex.c (identifier_type): Return PFUNCNAME for template function
16238 * method.c (build_decl_overload_real): New function.
16239 (build_template_parm_names): New function.
16240 (build_overload_identifier): Use it.
16241 (build_underscore_int): New function.
16242 (build_overload_int): Use it. Add levels for template
16244 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
16245 (build_overload_nested_names): Handle template type parameters.
16246 (build_template_decl_overload): New function.
16248 * parse.y (YYSTYPE): New ntype member.
16249 (nested_name_specifier): Use it.
16250 (nested_name_specifier_1): Likewise.
16251 (PFUNCNAME): New token.
16252 (template_id, object_template_id): New non-terminals.
16253 (template_parm_list): Note specializations.
16254 (template_def): Likewise.
16255 (structsp): Likewise.
16256 (fn.def2): Handle member template specializations.
16257 (component_decl_1): Likewise.
16258 (direct_notype_declarator): Handle template-ids.
16259 (component_decl_1): Likewise.
16260 (direct_notype_declarator): Handle template-ids.
16261 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
16263 * pt.c (processing_specializations): New variable.
16264 (template_header_count): Likewise.
16265 (type_unification_real): New function.
16266 (processing_explicit_specialization): Likewise.
16267 (note_template_header): Likewise.
16268 (is_member_template): Handle specializations.
16269 (end_template_decl): Call reset_specialization.
16270 (push_template_decl): Handle member template specializations.
16271 (tsubst): Likewise.
16272 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
16273 (instantiate_template): Handle specializations.
16274 (instantiate_decl): Likewise.
16275 (fn_type_unification): Handle explicit_targs.
16276 (type_unification): Likewise. Allow incomplete unification
16277 without an error message, if allow_incomplete.
16278 (get_bindings): Use new calling sequence for fn_type_unification.
16280 * spew.c (yylex): Handle PFUNCNAME.
16282 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
16283 (really_overloaded_fn): Likewise.
16284 (get_first_fn): Handle function templates.
16286 * typeck.c (build_x_function_call): Use really_overloaded_fn.
16287 Handle TEMPLATE_ID_EXPR.
16288 (build_x_unary_op): Likewise.
16289 (build_unary_op): Likewise.
16290 (mark_addressable): Templates whose address is taken are marked
16293 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
16295 * decl.c (init_decl_processing): Declare __builtin_constant_p as
16296 accepting any kind of type, not only int.
16298 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
16300 * search.c (get_matching_virtual): Notice virtual bases when sorrying
16301 about covariant returns.
16303 * parse.y (member_init): Also imply typename here. Remove ancient
16304 extension for initializing base members.
16306 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
16308 Handle multi-level typenames and implicit typename in base list.
16309 * parse.y (typename_sub{,[0-2]}): New rules.
16310 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
16311 (nonnested_type): New rule.
16312 (complete_type_name): Use it.
16313 (base_class.1): Use typename_sub and nonnested_type.
16314 (nested_name_specifier): Don't elide std:: here.
16315 * decl.c (make_typename_type): Handle getting a type for NAME.
16316 (lookup_name_real): Turn std:: into :: here.
16318 Rvalue conversions were removed in London.
16319 * call.c (is_subseq): Don't consider lvalue transformations.
16320 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
16321 (joust): Re-enable ?: kludge.
16323 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
16325 * decl.c (start_function): Up warning of no return type to be a
16328 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
16330 * init.c (expand_member_init): Don't set TREE_USED.
16331 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
16332 set,don't clear TREE_USED wholesale.
16334 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
16336 * call.c (build_over_call): Do require_complete_type before
16339 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
16341 * search.c (lookup_field): Call complete_type in all cases.
16343 * decl.c (finish_function): Just warn about flowing off the end.
16345 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
16347 * decl.c (grokparms): Don't bash a permanent list node if we're
16350 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
16352 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
16354 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
16356 * call.c (build_new_op): Give better error for syntactically
16357 correct, but semantically invalid, use of undeclared template.
16359 * call.c (compare_qual): Handle pmfs.
16361 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
16362 after the exception spec.
16364 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
16366 * call.c (null_ptr_cst_p): Integer type, not integral type.
16368 * call.c (joust): Disable warnings until they can be moved to the
16371 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
16373 * Makefile.in, config-lang.in: Convert to autoconf.
16375 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
16377 * decl.c (lookup_name_real): Add implicit 'typename' to types from
16380 * pt.c (most_specialized_class): Fix typo.
16381 (tsubst): Move constant folding to TREE_VEC case.
16383 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
16385 * pt.c (do_poplevel): Don't warn about unused local variables
16386 while processing_template_decl since we don't always know whether
16387 or not they will need constructing/destructing.
16389 * pt.c (uses_template_parms): Check the values of an enumeration
16390 type to make sure they don't depend on template parms.
16392 * decl.c (make_typename_type): Don't lookup the field if the
16393 context uses template parms, even if we're not
16394 processing_template_decl at the moment.
16396 * pt.c (coerce_template_parms): Avoid looking at the
16397 TYPE_LANG_DECL portion of a typename type, since there won't be
16399 (tsubst): Do constant folding as necessary to make sure that
16400 arguments passed to lookup_template_class really are constants.
16402 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
16404 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
16405 * decl2.c (finish_file): Only register exception tables if we
16408 * decl.c (init_decl_processing): Add __builtin_[fs]p.
16410 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
16412 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
16414 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
16416 * error.c (dump_decl): Avoid crashing when presented with a
16417 uninitialized constant, as can occur with a template parameter.
16418 (dump_expr): Make sure that there are enough levels of
16419 current_template_parms before we start diving through them.
16421 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
16423 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
16426 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
16428 * except.c (expand_throw): Call build_delete for all
16429 exception types, not just objects with destructors.
16431 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
16433 * decl.c (current_local_enum): Remove static.
16434 * pt.c (tsubst_enum): Save and restore value of current_local_enum
16435 in case template is expanded in enum decl.
16436 (instantiate_class_template): Use new tsubst_enum signature.
16437 (tsubst_expr): Likewise.
16439 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
16441 * pt.c (begin_member_template_processing): Take a function as
16442 argument, not a set of template arguments. Use the template
16443 parameters, rather than the arguments. Handle non-type parameters
16444 correctly. Push a binding level for the parameters so that multiple
16445 member templates using the same parameter names can be declared.
16446 (end_member_template_processing): Pop the binding level.
16447 (push_template_decl): Mark member templates as static when
16450 * lex.c (do_pending_inlines): Pass the function, not its template
16451 arguments, to begin_member_template_processing.
16452 (process_next_inline): Likewise.
16453 (do_pending_defargs): Likewise.
16455 * error.c (dump_expr): Obtain the correct declaration for a
16456 TEMPLATE_CONST_PARM.
16458 * call.c (add_template_conv_candidate): New function.
16459 (build_object_call): Handle member templates, as done in the other
16462 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
16464 * decl.c (replace_defag): Undo previous change.
16465 * lex.c (do_pending_defargs): Deal with member templates.
16467 * pt.c (is_member_template): Avoid crashing when passed a
16468 non-function argument.
16470 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
16472 * class.c (grow_method): Remove check for redeclaration.
16474 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
16476 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
16477 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
16478 (PRIMARY_TEMPLATE_P): Use it.
16479 * call.c (build_overload_call_real): Use it.
16480 * class.c (instantiate_type): Likewise.
16481 * decl.c (decls_match): Likewise.
16482 * method.c (build_overload_identifier): Likewise.
16483 * pt.c (push_template_decl): Likewise.
16484 (classtype_mangled_name): Likewise.
16485 (lookup_template_class): Likewise.
16487 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
16488 DECL_NTPARMS to conform to usage elsewhere.
16489 * call.c (add_template_candidate): Likewise.
16490 * class.c (instantiate_type): Likewise.
16491 * pt.c (instantiate_template): Likewise.
16492 (get_bindings): Likewise.
16494 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
16495 is_member_template.
16497 * pt.c (unify): Undo changes to allow multiple levels of template
16499 (type_unification): Likewise.
16500 (fn_type_unification): Likewise.
16501 (get_class_bindings): Likewise.
16502 * cp-tree.h (Likewise).
16504 * decl.c (replace_defarg): Check that the type of the default
16505 parameter does not invlove a template type before complaining
16506 about the initialization.
16508 * error.c (dump_expr): Deal with template constant parameters in
16509 member templates correctly.
16511 * pt.c (is_member_template): Deal with class specializations
16513 (tsubst): Handle "partial instantiation" of member templates
16516 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
16518 * pt.c (type_unification): Change calling sequence to allow for
16519 multiple levels of template parameters.
16520 (tsubst_expr): Likewise.
16521 (tsubst): Likewise.
16522 (tsubst_copy): Likewise.
16523 (instantiate_template): Likewise.
16525 * call.c (build_overload_call_real): Use it.
16526 (add_builtin_candidate): Use it.
16527 (build_new_method_call): Use it.
16528 * class.c (instantiate_type): Use it.
16529 * decl.c (grokdeclarator): Use it.
16530 * decl2.c (finish_file): Use it.
16531 * method.c (build_overload_identifier): Use it.
16533 * call.c (add_template_candidate): Add additional parameter for
16534 the function return type. Call fn_type_unification istead of
16536 (build_user_type_conversion_1): Handle member templates.
16537 (build_new_function_call): Likewise.
16538 (build_new_op): Likewise.
16539 (build_new_method_call): Likewise.
16541 * class.c (grow_method): Don't give an error message indicating
16542 that two member templates with the same name are ambiguous.
16543 (finish_struct): Treat member template functions just like member
16546 * cp-tree.h (check_member_template): Add declaration.
16547 (begin_member_template_processing): Likewise.
16548 (end_member_template_processing): Likewise.
16549 (fn_type_unification): Likewise.
16550 (is_member_template): Likewise.
16551 (tsubst): Change prototype.
16552 (tsubst_expr): Likewise.
16553 (tsubst_copy): Likewise.
16554 (instantiate_template): Likewise.
16555 (get_bindings): Likewise.
16557 * decl.c (decls_match): Handle multiple levels of template
16559 (pushdecl): Handle template type params just like other type
16561 (push_class_level_binding): Return immediately if the
16562 class_binding_level is NULL.
16563 (grokfndecl): If check_classfn() returns a member_template, use
16564 the result of the template, not the template itself.
16566 * decl2.c (check_member_template): New function. Check to see
16567 that the entity declared to be a member template can be one.
16568 (check_classfn): Allow redeclaration of member template functions
16569 with different types; the new functions can be specializations or
16570 explicit instantiations.
16572 * error.c (dump_decl): Handle multiple levels of template
16574 (dump_function_decl): Update to handle function templates.
16576 * lex.c (do_pending_inlines): Set up template parameter context
16577 for member templates.
16578 (process_next_inline): Likewise.
16580 * method.c (build_overload_identifier): Adjust for multiple levels
16581 of template parameters.
16583 * parse.y (fn.def2): Add member templates.
16584 (component_decl_1): Likewise.
16586 * pt.c (begin_member_template_processing): New function.
16587 (end_member_template_processing): Likewise.
16588 (is_member_template): Likewise.
16589 (fn_type_unification): Likewise.
16590 (current_template_parms): Return a vector of all the template
16591 parms, not just the innermost level of parms.
16592 (push_template_decl): Deal with the possibility of member
16594 (lookup_template_class): Likewise.
16595 (uses_template_parms): Likewise.
16596 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
16597 TEMPLATE_CONST_PARM to deal with multiple levels of template
16598 arguments. Add processing of TEMPLATE_DECL to produce new
16599 TEMPLATE_DECLs from old ones.
16600 (do_decl_instantiation): Handle member templates.
16602 * search.c (lookup_fnfields_1): Handle member template conversion
16605 * tree.c (cp_tree_equal): Check the levels, as well as the
16606 indices, of TEMPLATE_CONST_PARMs.
16608 * typeck.c (comptypes): Check the levels, as well as the indices,
16609 fo TEMPLATE_TYPE_PARMs.
16610 (build_x_function_call): Treat member templates like member
16613 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
16615 * typeck.c (c_expand_return): Always convert_for_initialization
16616 before checking for returning a pointer to local.
16618 * pt.c (type_unification): If strict and the function parm doesn't
16619 use template parms, just compare types.
16621 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
16623 * method.c (build_overloaded_value): Replace direct call
16624 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
16626 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
16628 * typeck.c (convert_arguments): Don't arbitrarily choose the first
16629 of a set of overloaded functions.
16631 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
16633 * lex.c (real_yylex): Don't elide __FUNCTION__.
16635 * method.c (build_overload_value): Add in_template parm.
16636 (build_overload_int): Likewise.
16637 (build_overload_identifier): Pass it.
16639 * decl.c (duplicate_decls): Don't bash a previous template
16640 definition with a redeclaration.
16642 * pt.c (unify): float doesn't match double.
16644 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
16645 TYPE_DECL. Handle getting non-template types.
16646 * parse.y (explicit_instantiation): Use typespec instead of
16647 aggr template_type.
16649 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
16651 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
16653 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
16655 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
16656 (compare_ics): Likewise.
16658 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
16660 * call.c (joust): Warn about choosing one conversion op over
16661 another because of 'this' argument when the other return type is
16663 (source_type): New fn.
16665 * call.c (build_new_op): Strip leading REF_BIND from first operand
16666 to builtin operator.
16668 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
16671 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
16673 * call.c (null_ptr_cst_p): Remove support for (void*)0.
16675 Wed Aug 27 02:03:34 1997 Jeffrey A Law <law@cygnus.com>
16677 * typeck.c (expand_target_expr): Make definition match declaration.
16679 * class.c (get_basefndecls): Make definition match declaration.
16681 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
16683 * input.c (sub_getch): Eventually give up and release the input file.
16685 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
16688 * call.c (joust): Tweak message.
16690 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
16692 * error.c (type_as_string): Put const/volatile on template type
16693 parameters where appropriate.
16695 Sat Aug 23 17:47:22 1997 Jeffrey A Law <law@cygnus.com>
16697 * call.c (strictly_better): Make arguments unsigned ints.
16699 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
16701 * lex.c (real_yylex): Refer to __complex instead of complex.
16703 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
16705 * lex.c (real_yylex): Don't use getc directly.
16707 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
16709 * call.c (is_subseq): Don't try to be clever.
16711 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
16713 * parse.y, pt.c: Include "except.h".
16714 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
16715 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
16716 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
16717 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
16720 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
16722 * decl2.c (mark_vtable_entries): Instead of replacing pure
16723 virtuals with a reference to __pure_virtual, copy the decl and
16726 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
16728 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
16730 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
16732 * pt.c (instantiate_class_template): Call repo_template_used
16733 before finish_prevtable_vardecl.
16735 * call.c (is_subseq): New fn.
16736 (compare_ics): Use it.
16738 * repo.c (finish_repo): Don't crash on no args.
16740 * parse.y (named_complex_class_head_sans_basetype): Handle
16741 explicit global scope.
16742 * decl2.c (handle_class_head): New fn.
16744 * pt.c (unify): Add CONST_DECL case.
16746 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
16748 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
16750 * cp-tree.h (report_type_mismatch): Add prototype.
16751 * call.c (build_overload_call_real): Remove erroneous fourth
16752 argument to report_type_mismatch.
16753 (build_user_type_conversion_1): Remove erroneous second arg to
16755 (build_new_function_call): Likewise.
16756 (build_object_call): Likewise.
16757 (build_new_op): Likewise.
16758 (build_new_method_call): Likewise.
16760 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
16762 * error.c (dump_decl): Don't bother processing a function with no
16763 DECL_LANG_SPECIFIC.
16765 * method.c (emit_thunk): Call init_function_start in the macro case.
16767 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
16769 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
16770 defined and used to set flag_vtable_thunks.
16772 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
16774 * parse.y: Don't clear the inlines from their obstack until they've
16775 all been processed.
16777 * decl.c (duplicate_decls): Don't complain about exception
16778 specification mismatch if flag_exceptions is off.
16780 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
16782 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
16784 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
16786 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
16787 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
16788 Include <stdio.h> before include files that formerly used STDIO_PROTO.
16790 * decl.c, g++spec.c, lex.c, method.c, repo.c:
16791 Include "config.h" first, as per autoconf manual.
16793 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
16795 * decl.c (duplicate_decls): Tweak wording.
16796 * lex.c (do_pending_defargs): Don't die if we see a default arg
16797 that isn't a DEFAULT_ARG.
16798 * error.c (dump_expr): Handle DEFAULT_ARG.
16800 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
16801 * lang-options.h: Add -fhandle-exceptions.
16803 * class.c (build_vtable): Vtables are artificial.
16804 (prepare_fresh_vtable): Likewise.
16806 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
16808 * cvt.c (ocp_convert): After converting to the target type, set
16809 LOOKUP_NO_CONVERSION.
16811 * call.c (joust): Warn about potentially confusing promotion rules
16813 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
16815 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
16817 * exception.cc: Declare __terminate_func with noreturn attribute.
16819 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
16821 * parse.y: Break out eat_saved_input, handle errors.
16822 (function_try_block): Use compstmt instead of compstmt_or_error.
16824 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
16826 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
16828 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
16830 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
16831 existence of cc1plus check whether $(LANGUAGES) contains C++.
16833 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
16835 * method.c (do_build_copy_constructor): When copying an anonymous
16836 union member loop around to handle nested anonymous unions. Use
16837 the offset of the member relative to the outer structure, not the
16840 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
16842 * call.c (resolve_args): New fn.
16843 (build_new_function_call): Use it.
16844 (build_object_call): Likewise.
16845 (build_new_method_call): Likewise.
16847 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
16849 * call.c (build_over_call): tsubst all default parms from templates.
16851 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
16853 * decl.c (struct cp_function): Add static_labelno.
16854 (push_cp_function_context): Save it.
16855 (pop_cp_function_context): Restore it.
16857 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
16859 * typeck.c (build_component_ref_1): Convert from reference.
16861 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
16863 * parse.y (current_declspecs, prefix_attributes): Initialize to
16866 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
16867 before we try to force it to be a TREE_LIST.
16868 (decl): Make sure $1.t is non-nil.
16870 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
16872 * pt.c (uses_template_parms): Handle template first-parse codes.
16874 * decl.c (cp_finish_decl): Only warn about user-defined statics.
16876 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
16878 * pt.c (unify): Handle BOOLEAN_TYPE.
16880 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
16881 * pt.c (tsubst): Don't set it.
16882 * call.c (build_over_call): Use uses_template_parms.
16884 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
16886 * method.c (build_overload_nested_name): Use static_labelno
16887 instead of var_labelno.
16888 (build_qualified_name): New fn.
16889 (build_overload_name): Split out from here.
16890 (build_static_name): Use build_qualified_name.
16891 * decl.c (cp_finish_decl): Statics in extern inline functions
16892 have comdat linkage.
16893 (start_function): Initialize static_labelno.
16895 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
16897 * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
16898 before "all member functions in class [] are private".
16900 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
16902 * lex.c (do_scoped_id): convert_from_reference.
16903 * init.c (build_offset_ref): Likewise.
16905 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
16907 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
16909 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
16911 * typeck.c (get_member_function_from_ptrfunc): Promote index
16914 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
16916 * tree.c (layout_basetypes): Move non-virtual destructor warning.
16917 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
16919 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
16921 * decl.c (grokdeclarator): Call add_defarg_fn for the function
16923 * lex.c (add_defarg_fn): Adjust.
16924 (do_pending_defargs): Adjust. Don't skip the first parm.
16926 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
16928 * decl.c (build_enumerator): Global enumerators are also readonly.
16930 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
16931 (build_dynamic_cast): Call it and convert_from_reference.
16933 * lex.c (add_defarg_fn): New fn.
16934 (snarf_defarg): Don't add to defarg_types.
16935 (do_pending_defargs): Lose defarg_types. All fns we process now
16937 * decl.c (grokfndecl): Call add_defarg_fn.
16939 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
16940 * cp-tree.def: Add DEFAULT_ARG.
16941 * spew.c (yylex): Call snarf_defarg as appropriate.
16942 * parse.y: New tokens DEFARG and DEFARG_MARKER.
16943 (defarg_again, pending_defargs, defarg, defarg1): New rules.
16944 (structsp): Use pending_defargs.
16945 (parms, full_parm): Use defarg.
16946 * lex.c (init_lex): Initialize inline_text_firstobj.
16947 (do_pending_inlines): Never pass the obstack to feed_input.
16948 (process_next_inline): Call end_input instead of restore_pending_input.
16949 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
16950 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
16951 * input.c (end_input): New fn.
16952 (sub_getch): At the end of some fed input, just keep returning EOF
16953 until someone calls end_input.
16954 Remove 'obstack' field from struct input_source.
16955 * decl.c (grokparms): Handle DEFAULT_ARG.
16956 (replace_defarg): New fn.
16957 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
16959 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
16961 * call.c (implicit_conversion): If nothing else works, try binding
16962 an rvalue to a reference.
16964 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
16966 * decl.c (init_decl_processing): Fix Jun 30 patch -- move
16967 ifndef for Cygwin32 to include SIGSEGV.
16969 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
16971 * class.c (finish_struct_1): Only complain about pointers without
16972 copy stuff if there are any constructors.
16974 * rtti.c (build_dynamic_cast): Call complete_type on the types.
16976 * decl.c (grokfndecl): If the function we chose doesn't actually
16979 * decl2.c (grokclassfn): Don't specify 'const int' for the
16980 artificial destructor parm.
16982 * pt.c (type_unification): If we are called recursively, nothing
16985 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
16987 * decl.c (init_decl_processing): Stop trying to catch signals
16988 other than SIGABRT since the Cygwin32 library doesn't support
16989 them correctly yet. This fixes a situation in which g++ causes
16990 a hang on SIGSEGVs and other such signals in our Win32-hosted
16993 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
16995 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
16997 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
16999 * typeck2.c (store_init_value): Always return the value if our
17000 type needs constructing.
17002 * method.c (hack_identifier): Convert class statics from
17005 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
17007 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
17009 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
17011 * typeck.c (c_expand_return): Make sure we clean up temporaries at
17012 the end of return x;
17014 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17016 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
17018 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
17020 * except.c (expand_builtin_throw): Add support
17021 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
17023 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
17025 * repo.c (extract_string): Null-terminate.
17027 * cp-tree.h (TI_SPEC_INFO): New macro.
17028 (CLASSTYPE_TI_SPEC_INFO): New macro.
17029 * pt.c (push_template_decl): Correctly determine # of template parms
17032 * call.c (compare_ics): Really fix 'this' conversions.
17034 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
17037 * pt.c (push_template_decl): Complain about mismatch in # of
17038 template parms between a class template and a member template.
17040 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
17042 * method.c (synthesize_method): You can't call
17043 function_cannot_inline_p after finish_function.
17044 * decl.c (finish_function): Turn on flag_inline_functions and turn
17045 off DECL_INLINE before handing a synthesized method to the
17048 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
17050 * method.c (synthesize_method): Remove July 30 change to never set
17051 DECL_INLINE if at_eof.
17053 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
17055 * xref.c (GNU_xref_member): Ensure that the node has a
17056 decl_lang_specific part before checking DECL_FRIEND_P.
17058 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
17060 * pt.c (instantiate_class_template): Diagnose non-class types used
17063 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
17065 * typeck.c (build_conditional_expr): Use convert_for_initialization
17066 instead of convert_and_check.
17068 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17070 * parse.y (typespec): Don't pedwarn for typeof.
17072 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
17074 * repo.c (finish_repo): Only check changes if we would write a
17077 * call.c (compare_ics): Fix handling of 'this' conversions.
17079 * pt.c (do_decl_instantiation): Support static data too. Rename
17080 from do_function_instantiation.
17081 * cp-tree.h: Adjust.
17084 * repo.c (extract_string): New fn.
17085 (get_base_filename): Use it.
17086 (init_repo): Compare old args with current args.
17088 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
17090 * Makefile.in, Make-lang.in: Protect C-ls with a comment
17091 character, idea from Paul Eggert <eggert@twinsun.com>.
17093 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
17095 * typeck.c (c_expand_return): Be more persistent in looking for
17098 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
17099 pointer to reference.
17101 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
17103 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
17105 * init.c (build_member_call, build_offset_ref):
17106 Use do_scoped_id instead of do_identifier.
17108 * cvt.c (convert): Remove bogosity.
17110 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17112 * cvt.c (build_up_reference): Do checks of ARGTYPE and
17113 TARGET_TYPE before trying to use get_binfo.
17115 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
17117 * cvt.c (build_up_reference): Call get_binfo to get access control.
17119 * decl2.c (import_export_decl): If we don't support weaks, leave
17122 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
17124 * except.c (expand_builtin_throw): Add support for machines that
17125 cannot access globals after throw's epilogue when
17126 -fno-sjlj-exceptions is used.
17128 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
17130 * parse.y: 'std::' becomes '::'.
17131 * lex.c (real_yylex): Remove 'namespace' warning.
17132 * init.c (build_member_call): Ignore 'std::'.
17133 (build_offset_ref): Likewise.
17134 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
17135 (do_toplevel_using_decl): Ignore 'using std::whatever'.
17136 * decl.c (push_namespace): Just sorry.
17137 (pop_namespace): Nop.
17138 (init_decl_processing): Declare std namespace.
17140 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
17142 * search.c (push_class_decls): A name which ambiguously refers to
17143 several instantiations of the same template just refers to the
17146 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
17148 * decl.c (build_enumerator): Fix problem with unsigned long
17149 enumerated values being smashed to ints, causing overflow
17150 when computing next enumerated value (for enum values around
17153 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
17155 * typeck.c (build_component_ref): Only call mark_used on a decl.
17157 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17159 * typeck.c (build_c_cast): Make the check for a ptr to function
17160 more specific before possible default_conversion call.
17162 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
17164 * except.c (expand_exception_blocks): Simplify and fix and make
17165 sure we don't end a region in a sequence, as expand_end_bindings
17168 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
17170 * except.c (init_exception_processing): Mark terminate as not
17171 returning so that the optimizer can optimize better.
17173 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
17175 * cvt.c (convert): Don't do any extra work, if we can avoid it
17178 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
17180 * *.[chy]: Change cp_convert to ocp_convert, change convert to
17181 cp_convert. convert is now reserved for the backend, and doesn't
17182 have the semantics a frontend person should ever want.
17184 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
17186 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
17187 Lose -traditional support.
17189 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
17191 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
17193 * parse.y (self_reference): Do it for templates, too.
17194 * class.c (pushclass): Don't overload_template_name; the alias
17195 generated by build_self_reference serves the same purpose.
17197 * tree.c (list_hash): Make static, take more args.
17198 (list_hash_lookup): Likewise.
17199 (list_hash_add): Make static.
17200 (list_hash_canon): Lose.
17201 (hash_tree_cons): Only build a new node if one isn't already in the
17203 (hash_tree_chain): Use hash_tree_cons.
17204 * cp-tree.h: Adjust.
17205 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
17206 of calling lookup_name.
17208 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
17210 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
17211 doesn't refer to the CONST_DECLs.
17213 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
17215 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
17217 (expand_class_desc): Convert the last argument to a sizetype.
17219 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17221 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
17222 __real__): Add reswords.
17223 * hash.h: Regenerate.
17224 * lex.h (rid): Add RID_COMPLEX.
17225 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
17226 * lex.c (init_lex): Add building of RID_COMPLEX.
17227 (real_yylex): General cleanup in line with what c-lex.c also has,
17228 sans the cruft for traditional; add handling of SPEC_IMAG, complex
17229 types, and imaginary numeric constants.
17230 * parse.y (REALPART, IMAGPART): Add tokens.
17231 (unary_expr): Add REALPART and IMAGPART rules.
17232 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
17233 * decl.c (complex_{integer,float,double,long}_type_node): Define
17235 (init_decl_processing): Set up the types.
17236 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
17237 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
17238 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
17239 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
17240 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
17242 * method.c (build_overload_name): Add handling of the different
17243 COMPLEX_TYPEs, prefixing them with `J'.
17244 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
17245 as a template parm.
17246 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
17247 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
17248 (mapcar): Handle COMPLEX_CST.
17249 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
17250 (common_type): Add code for complex types.
17251 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
17252 (convert_for_assignment): Likewise.
17253 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
17255 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
17257 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
17258 tsubst_expr, as it might try to do overload resolution.
17260 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
17262 * pt.c (instantiate_class_template): Oops.
17264 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
17266 * cp-tree.def: Add TAG_DEFN.
17267 * pt.c (tsubst_enum): New fn.
17268 (instantiate_class_template): Use it.
17269 (tsubst_expr): Support TAG_DEFN.
17270 (tsubst): Support local enums.
17271 (tsubst_copy): Likewise.
17272 * decl.c (finish_enum): Likewise.
17273 (start_enum): If this is a local enum, switch to permanent_obstack.
17275 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
17277 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
17278 (finish_function): Put the base init code for constructors just
17279 after the parm cleanup insns.
17280 (struct cp_function): Add last_parm_cleanup_insn.
17281 (push_cp_function_context): Likewise.
17282 (pop_cp_function_context): Likewise.
17284 Tue May 13 15:51:20 1997 Jason Merrill <jason@yorick.cygnus.com>
17286 * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
17288 Wed May 7 11:17:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17290 * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
17291 for THUNK_FNDECL before we switch to temporary allocation.
17293 Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
17295 * call.c (build_new_op): Handle null arg2 for ?:.
17297 Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
17299 * except.c (expand_exception_blocks): Ensure that we flow through
17300 the end of the exception region for the exception specification.
17301 Move exception region for the exception specification in, so that
17302 it doesn't protect the parm cleanup. Remove some obsolete code.
17303 * decl.c (store_parm_decls): Likewise.
17304 (finish_function): Likewise.
17306 Tue Apr 29 15:38:54 1997 Jason Merrill <jason@yorick.cygnus.com>
17308 * init.c (build_new): Fix nothrow handling.
17310 Tue Apr 29 14:29:50 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17312 * init.c (emit_base_init): Don't warn about the initialization
17313 list for an artificial member.
17315 Fri Apr 25 17:47:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17317 * expr.c (do_case): Handle !START case for the error msg.
17319 Fri Apr 25 11:55:23 1997 Jason Merrill <jason@yorick.cygnus.com>
17321 * decl2.c, lang-options.h: New option -Weffc++.
17322 * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
17325 * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
17326 to MULTIPLE_SYMBOL_SPACES.
17328 Wed Apr 23 18:06:50 1997 Jason Merrill <jason@yorick.cygnus.com>
17330 * method.c (emit_thunk, generic case): Set current_function_is_thunk.
17332 * method.c (emit_thunk, macro case): Set up DECL_RESULT.
17334 * typeck.c (c_expand_return): Don't complain about returning void
17335 to void in an artificial function.
17336 * method.c (make_thunk): Change settings of READONLY/VOLATILE,
17337 don't set DECL_RESULT, set DECL_ARTIFICIAL.
17338 (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
17340 Wed Apr 23 14:43:06 1997 Mike Stump <mrs@cygnus.com>
17342 * init.c (init_decl_processing): Add support for setjmp/longjmp based
17343 exception handling.
17344 * except.c (init_exception_processing): Likewise.
17345 (expand_end_catch_block): Likewise.
17346 (expand_exception_blocks): Likewise.
17347 (expand_throw): Likewise.
17348 * exception.cc (__default_terminate): Likewise.
17350 * init.c (perform_member_init): Use new method of expr level
17351 cleanups, instead of cleanups_this_call and friends.
17352 (emit_base_init): Likewise.
17353 (expand_aggr_vbase_init_1): Likewise.
17354 (expand_vec_init): Likewise.
17355 * decl.c (cp_finish_decl): Likewise.
17356 (expand_static_init): Likewise.
17357 (store_parm_decls): Likewise.
17358 (cplus_expand_expr_stmt): Likewise.
17359 * decl2.c (finish_file): Likewise.
17361 * Make-lang.in (exception.o): Ok to compile with -O now.
17363 * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
17364 we know it will be done later by the backend.
17366 * decl2.c (lang_f_options): Remove support for short temps.
17367 * lang-options.h: Likewise.
17369 Wed Apr 23 04:12:06 1997 Jason Merrill <jason@yorick.cygnus.com>
17371 * tree.c (varargs_function_p): New fn.
17372 * method.c (emit_thunk): Replace broken generic code with code to
17373 generate a heavyweight thunk function.
17375 Tue Apr 22 02:45:18 1997 Jason Merrill <jason@yorick.cygnus.com>
17377 * pt.c (process_template_parm): pedwarn about floating-point parms.
17379 * decl.c (grokdeclarator): inline no longer implies static.
17381 * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
17383 Mon Apr 21 15:42:27 1997 Jason Merrill <jason@yorick.cygnus.com>
17385 * class.c (check_for_override): The signature of an overriding
17386 function is not changed.
17388 * call.c (build_over_call): Move setting of conv into the loop.
17389 Note: this change, along with the related changes of the 18th thru
17390 the 20th of April, fix an infinite loop problem in conversions.
17392 Sun Apr 20 16:24:29 1997 Jason Merrill <jason@yorick.cygnus.com>
17394 * call.c (build_user_type_conversion_1): Really ignore rvalue
17395 conversions when looking for a REFERENCE_TYPE.
17397 * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
17398 * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
17399 * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
17400 (build_unary_op): Likewise.
17401 * call.c (build_over_call): See through a CONVERT_EXPR around the
17402 ADDR_EXPR for on a temporary.
17403 * typeck.c (c_expand_return): See through a CONVERT_EXPR around
17404 the ADDR_EXPR for a local variable.
17406 Fri Apr 18 12:11:33 1997 Jason Merrill <jason@yorick.cygnus.com>
17408 * call.c (build_user_type_conversion_1): If we're trying to
17409 convert to a REFERENCE_TYPE, only consider lvalue conversions.
17410 (build_new_function_call): Print candidates.
17411 (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
17412 (reference_binding): Binding a temporary of a reference-related type
17415 Thu Apr 17 14:37:22 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17417 * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
17418 * tinfo2.cc (type_info::before): Likewise.
17420 Mon Apr 14 12:38:17 1997 Jason Merrill <jason@yorick.cygnus.com>
17422 * call.c (implicit_conversion): Oops.
17424 Fri Apr 11 02:18:30 1997 Jason Merrill <jason@yorick.cygnus.com>
17426 * call.c (implicit_conversion): Try to find a reference conversion
17427 before binding a const reference to a temporary.
17429 Wed Apr 2 12:51:36 1997 Mike Stump <mrs@cygnus.com>
17431 * exception.cc (__default_unexpected): Call terminate by default,
17432 so that if the user overrides terminate, the correct function will
17435 Wed Mar 19 14:14:45 1997 Mike Stump <mrs@cygnus.com>
17437 * parse.y (left_curly): Avoid trying to use any fields of
17438 error_mark_node, as there aren't any.
17440 Thu Mar 13 16:33:22 1997 Jason Merrill <jason@yorick.cygnus.com>
17442 * lex.c (do_identifier): Avoid breaking on overloaded methods
17443 as default arguments.
17445 Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se>
17447 * call.c (add_template_candidate): Initialize the variable "dummy".
17449 Mon Mar 10 15:13:14 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
17451 * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
17452 before we try to use TYPE_SIZE and TREE_CONSTANT on it.
17454 Fri Mar 7 13:19:36 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17456 * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
17457 (debug_binfo): Delete decl, not needed.
17459 * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
17460 promotes_to_aggr_type): Delete fns.
17461 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
17462 SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
17463 PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
17465 * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
17467 * friend.c (is_friend_type): Delete fn.
17468 * cp-tree.h (is_friend_type): Delete decl.
17470 * decl.c (original_result_rtx, double_ftype_double,
17471 double_ftype_double_double, int_ftype_int, long_ftype_long,
17472 float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
17473 * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
17475 * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
17477 * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
17479 * decl.c (pushdecl_nonclass_level): #if 0, unused.
17480 * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
17482 * lex.c (reinit_lang_specific): #if 0, unused.
17483 * cp-tree.h (reinit_lang_specific): #if 0 decl.
17485 * decl.c (revert_static_member_fn): Make static, adding fwd decl.
17486 * cp-tree.h (revert_static_member_fn): Delete decl.
17488 * class.c (root_lang_context_p): Delete fn.
17489 * cp-tree.h (root_lang_context_p): Delete decl.
17491 * decl.c (set_current_level_tags_transparency): #if 0, unused.
17492 * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
17494 * lex.c (set_vardecl_interface_info): Make static.
17495 * cp-tree.h (set_vardecl_interface_info): Delete decl.
17497 * call.c (find_scoped_type): Make static.
17498 * cp-tree.h (find_scoped_type): Delete decl.
17500 * search.c (convert_pointer_to_vbase): Make static.
17501 * cp-tree.h (convert_pointer_to_vbase): Delete decl.
17503 * decl.c (const_ptr_type_node): Likewise.
17504 * cp-tree.h (const_ptr_type_node): Delete decl.
17506 * typeck.c (common_base_type): Make static.
17507 * cp-tree.h (common_base_types): Delete erroneous decl.
17509 * pt.c (classtype_mangled_name): Make static.
17510 * cp-tree.h (classtype_mangled_name): Delete decl.
17512 * lex.c (check_newline): Make static.
17513 * cp-tree.h (check_newline): Delete decl.
17515 * typeck.c (build_x_array_ref): Delete fn, same idea as
17517 * cp-tree.h (build_x_array_ref): Delete decl.
17519 * lex.c (copy_decl_lang_specific): Delete fn, same idea as
17521 * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
17523 * class.c (build_vtable_entry): Make static.
17524 * cp-tree.h (build_vtable_entry): Delete decl.
17526 * class.c (build_vbase_pointer): Make static.
17527 * cp-tree.h (build_vbase_pointer): Delete decl.
17529 * sig.c (build_sptr_ref): Add forward decl and make static.
17530 * cp-tree.h (build_sptr_ref): Delete decl.
17532 * call.c (build_new_method_call): Add forward decl and make static.
17533 * cp-tree.h (build_new_method_call): Delete decl.
17535 * call.c (build_object_call): Make static.
17536 * class.c (check_for_override, complete_type_p, mark_overriders):
17538 * decl.c (cp_function_chain): Likewise.
17539 * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
17541 * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
17543 * tree.c (build_cplus_array_type_1): Likewise.
17544 * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
17545 (comp_target_parms): Likewise.
17547 * init.c (build_builtin_call): Make static.
17548 * cp-tree.h (build_builtin_call): Delete decl.
17550 * typeck.c (binary_op_error): Delete decl.
17551 * cp-tree.h (binary_op_error): Likewise.
17553 Thu Mar 6 16:13:52 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17555 * call.c (build_method_call): Compare against error_mark_node
17556 directly, rather than the ERROR_MARK tree code.
17557 * cvt.c (cp_convert): Likewise.
17558 * decl.c (print_binding_level): Likewise.
17559 (duplicate_decls): Likewise.
17560 (grokdeclarator): Likewise.
17561 (grokdeclarator): Likewise.
17562 * init.c (expand_aggr_init_1): Likewise.
17563 (decl_constant_value): Likewise.
17564 * method.c (build_opfncall): Likewise.
17565 (hack_identifier): Likewise.
17566 * typeck.c (build_modify_expr): Likewise.
17568 * typeck.c (build_c_cast): Don't decl TYPE as register tree.
17570 Sun Mar 2 02:54:36 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
17572 * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
17574 * pt.c (coerce_template_parms): Add new error message.
17576 * method.c (build_overload_value): Implement name mangling for
17577 floating-point template arguments.
17579 * method.c (build_overload_int, icat, dicat): Fix mangling of template
17580 arguments whose absolute value doesn't fit in a signed word.
17582 Mon Mar 3 12:14:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17584 * friend.c: New file; put all of the friend stuff in here.
17585 * init.c: Instead of here.
17586 * Makefile.in (CXX_OBJS): Add friend.o.
17587 (friend.o): Add dependencies.
17588 * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
17590 Sun Mar 2 11:04:43 1997 Jason Merrill <jason@yorick.cygnus.com>
17592 * call.c (build_scoped_method_call): Complain if the scope isn't a
17595 Wed Feb 26 11:31:06 1997 Jason Merrill <jason@yorick.cygnus.com>
17597 * parse.y (left_curly): Don't crash on erroneous type.
17599 * init.c (build_delete): Fix type of ref.
17601 Tue Feb 25 12:41:48 1997 Jason Merrill <jason@yorick.cygnus.com>
17603 * search.c (get_vbase_1): Renamed from get_vbase.
17604 (get_vbase): Wrapper, now non-static.
17605 (convert_pointer_to_vbase): Now static.
17607 * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
17608 * init.c (build_delete): Pass one.
17609 (build_partial_cleanup_for): Use build_scoped_method_call.
17610 * decl.c (finish_function): Pass a binfo.
17612 Mon Feb 24 15:00:12 1997 Jason Merrill <jason@yorick.cygnus.com>
17614 * call.c (build_over_call): Only synthesize non-trivial copy ctors.
17616 * typeck.c (build_c_cast): Lose other reference to flag.
17618 * call.c (build_field_call): Don't look for [cd]tor_identifier.
17619 * decl2.c (delete_sanity): Remove meaningless use of
17620 LOOKUP_HAS_IN_CHARGE.
17621 * decl.c (finish_function): Use build_scoped_method_call instead
17622 of build_delete for running vbase dtors.
17623 * init.c (build_delete): Call overload resolution code instead of
17624 duplicating it badly.
17626 Thu Feb 20 15:12:15 1997 Jason Merrill <jason@yorick.cygnus.com>
17628 * call.c (build_over_call): Call mark_used before trying to elide
17631 * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
17633 Wed Feb 19 11:18:53 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17635 * typeck.c (build_modify_expr): Always pedwarn for a cast to
17636 non-reference used as an lvalue.
17638 Wed Feb 19 10:35:37 1997 Jason Merrill <jason@yorick.cygnus.com>
17640 * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
17642 Tue Feb 18 15:40:57 1997 Jason Merrill <jason@yorick.cygnus.com>
17644 * parse.y (handler): Fix template typo.
17646 Sun Feb 16 02:12:28 1997 Jason Merrill <jason@yorick.cygnus.com>
17648 * error.c (lang_decl_name): New fn.
17649 * tree.c (lang_printable_name): Use it.
17651 Fri Feb 14 16:57:05 1997 Mike Stump <mrs@cygnus.com>
17653 * g++spec.c: Include config.h so that we can catch bzero #defines
17654 from the config file.
17656 Tue Feb 11 13:50:48 1997 Mike Stump <mrs@cygnus.com>
17658 * new1.cc: Include a declaration for malloc, to avoid warning, and
17659 avoid lossing on systems that require one (ones that define malloc
17662 Mon Feb 10 22:51:13 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
17664 * decl2.c (max_tinst_depth): New variable.
17665 (lang_decode_option): Parse "-ftemplate-depth-NN" command line
17667 * pt.c (max_tinst_depth): Variable moved.
17668 * lang-options.h: Declare "-ftemplate-depth-NN" command line option
17671 Fri Feb 7 15:43:34 1997 Jason Merrill <jason@yorick.cygnus.com>
17673 * decl.c (xref_basetypes): Allow a base class that depends on
17674 template parms to be incomplete.
17676 * decl2.c (build_expr_from_tree): Support typeid(type).
17677 * rtti.c (get_typeid): Support templates.
17678 (expand_si_desc, expand_class_desc): Fix string length.
17679 (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
17681 Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
17683 * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
17685 * pt.c (tsubst): Put it back for -fno-ansi-overloading.
17687 Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
17689 * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
17690 smashes together template and non-template decls of the same
17693 Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
17695 * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
17697 Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17699 * decl.c (duplicate_decls): Next route, pedwarn about different
17700 exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
17702 Tue Jan 28 20:43:29 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17704 * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
17705 (struct lang_type): Delete has_default_implementation member.
17706 Increase dummy to 21.
17707 * decl.c (start_method): Delete usage.
17709 * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
17710 store_after_parms, start_decl_1, auto_function): Add decls.
17711 (get_arglist_len_in_bytes, declare_implicit_exception,
17712 have_exceptions_p, make_type_decl, typedecl_for_tag,
17713 store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
17714 build_component_type_expr, cplus_exception_name,
17715 {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
17716 * call.c (build_this): Make static.
17717 (is_complete): Likewise.
17718 (implicit_conversion): Likewise.
17719 (reference_binding): Likewise.
17720 (standard_conversion): Likewise.
17721 (strip_top_quals): Likewise.
17722 (non_reference): Likewise.
17723 (build_conv): Likewise.
17724 (user_harshness): Likewise.
17725 (rank_for_ideal): Likewise.
17726 * decl.c (start_decl_1): Delete forward decl.
17727 (push_decl_level): Make static.
17728 (resume_binding_level): Make static.
17729 (namespace_bindings_p): Make static.
17730 (declare_namespace_level): Make static.
17731 (lookup_name_real): Make static.
17732 (duplicate_decls): Make static. Take register off NEWDECL and
17733 OLDDECL parm decls.
17734 * decl2.c (get_sentry): Make static.
17735 (temp_name_p): Delete fn.
17736 * except.c (auto_function): Delete decl.
17737 * lex.c (handle_{cp,sysv}_pragma): Make static.
17738 (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
17739 * method.c (do_build_{copy_constructor,assign_ref}): Make static.
17740 * pt.c (tsubst_expr_values): Make static.
17741 * rtti.c (combine_strings): Delete decl.
17743 Tue Jan 28 16:40:40 1997 Jason Merrill <jason@yorick.cygnus.com>
17745 * pt.c (push_template_decl): Handle getting a typedef.
17747 * call.c (build_new_function_call): Complain about void arg.
17749 Tue Jan 28 15:25:09 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17751 * decl.c (duplicate_decls): Give pedwarn of different exceptions
17752 if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
17754 Mon Jan 27 19:21:29 1997 Mike Stump <mrs@cygnus.com>
17756 * except.c (expand_throw): Don't expand the cleanup tree here,
17757 since we are not going to write the rtl out. Fixes problem with
17760 Mon Jan 27 16:24:35 1997 Sean McNeil <sean@mcneil.com>
17762 * Make-lang.in: Add $(exeext) as necessary.
17764 Mon Jan 27 13:20:39 1997 Mike Stump <mrs@cygnus.com>
17766 * parse.y (handler_seq): Must have at least one catch clause.
17768 Sat Jan 25 12:00:05 1997 Jason Merrill <jason@yorick.cygnus.com>
17770 * call.c (add_builtin_candidate): Restore ?: hack.
17772 * decl.c (grok_op_properties): More warnings.
17774 Sat Jan 25 08:50:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17776 * decl.c (duplicate_decls): On second thought, do it as a pedwarn
17777 still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
17779 * decl.c (duplicate_decls): Scale back to a warning, and only do
17782 Fri Jan 24 17:52:54 1997 Mike Stump <mrs@cygnus.com>
17784 * decl.c (duplicate_decls): pedwarn mismatched exception
17787 Thu Jan 23 18:18:54 1997 Mike Stump <mrs@cygnus.com>
17789 * call.c (build_new_method_call): Don't display the invisible
17790 argument for controlling virtual bases.
17792 Thu Jan 23 16:48:10 1997 Mike Stump <mrs@cygnus.com>
17794 * new: Add nothrow new and delete, bad_alloc and throw specifications
17796 * decl.c (init_decl_processing): Add throw specification for delete.
17797 * new.cc (nothrow): Define.
17798 * lex.c (real_yylex): Removing warning that throw and friends are
17800 * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
17801 * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
17802 * Make-lang.in: Add new{1,2}.{cc,o}.
17804 Thu Jan 23 16:39:06 1997 Jason Merrill <jason@yorick.cygnus.com>
17806 * lex.c (cons_up_default_function): Fix return type of synth op=.
17808 * init.c (emit_base_init): Add warnings for uninitialized members
17811 * decl.c (xref_basetypes): Add warning for non-polymorphic type
17812 with destructor used as base type.
17814 * decl.c (grok_op_properties): Add warning for op= returning void.
17815 * typeck.c (c_expand_return): Add warning for op= returning anything
17818 * class.c (finish_struct_1): Add warning for class with pointers
17819 but not copy ctor or copy op=.
17821 * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
17822 * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
17823 (instantiate_template): If -fexternal-templates, add this
17824 instantiation to pending_templates.
17826 * decl2.c (copy_assignment_arg_p): Disable old hack to support
17829 Tue Jan 21 18:32:04 1997 Mike Stump <mrs@cygnus.com>
17831 * cvt.c (cp_convert): pedwarn enum to pointer conversions.
17833 Mon Jan 20 17:59:51 1997 Jason Merrill <jason@yorick.cygnus.com>
17835 * call.c (standard_conversion): Handle getting references. Tack
17836 on RVALUE_CONV here. Do it for non-class types, too.
17837 (reference_binding): Pass references to standard_conversion.
17838 (implicit_conversion): Likewise.
17839 (add_builtin_candidate): Disable one ?: kludge.
17840 (convert_like): Handle RVALUE_CONVs for non-class types.
17841 (joust): Disable the other ?: kludge.
17843 Mon Jan 20 14:53:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17845 * decl.c (init_decl_processing): Add code to build up common
17846 function types beforehand, to avoid creation then removal of
17847 things already in the hash table.
17849 Mon Jan 20 14:43:49 1997 Jason Merrill <jason@yorick.cygnus.com>
17851 * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
17854 * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
17855 current_template_parms.
17857 Fri Jan 17 10:25:42 1997 Jason Merrill <jason@yorick.cygnus.com>
17859 * search.c (lookup_field): Don't return a function, check want_type.
17861 Thu Jan 16 18:14:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17863 * init.c (build_new): Make sure PLACEMENT has a type.
17865 Thu Jan 16 17:40:28 1997 Jason Merrill <jason@yorick.cygnus.com>
17867 * init.c (build_new): Support new (nothrow).
17869 Wed Jan 15 12:38:14 1997 Jason Merrill <jason@yorick.cygnus.com>
17871 * pt.c (instantiate_decl): Also do push_to_top_level before setting
17874 * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
17875 * pt.c (tsubst): Defer instantiation of default args.
17876 * call.c (build_over_call): Until here.
17878 Wed Jan 15 10:08:10 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17880 * search.c (lookup_field): Make sure we have an
17881 IDENTIFIER_CLASS_VALUE before we try to return it.
17883 Thu Jan 9 07:19:01 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17885 * call.c (build_method_call): Delete unused var PARM.
17886 (build_overload_call_real): Likewise.
17887 (build_object_call): Delete unused var P.
17888 (build_new_op): Likewise.
17889 * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
17890 var definitions, which are never used.
17891 (shadow_tag): Delete unused var FN.
17892 * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
17893 * init.c (build_new): Delete unused var ALLOC_TEMP.
17894 * method.c (hack_identifier): Delete unused var CONTEXT.
17895 (do_build_copy_constructor): Delete unused var NAME.
17896 (synthesize_method): Delete unused var BASE.
17897 * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
17898 * rtti.c (build_headof): Delete unused var VPTR.
17899 (get_typeid): Delete unused var T.
17900 * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
17902 (build_ptrmemfunc): Delete unused vars U and NINDEX.
17903 * typeck2.c (build_functional_cast): Delete unused var BINFO.
17905 Wed Jan 8 13:09:54 1997 Jason Merrill <jason@yorick.cygnus.com>
17907 * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
17908 things in a type being defined.
17909 * decl.c (finish_enum): Reverse the values so that they are in
17912 * pt.c (instantiate_class_template): Don't initialize
17913 BINFO_BASETYPES until the vector is filled out.
17914 (unify): Don't abort on conflicting bindings, just fail.
17915 (instantiate_decl): Do push_tinst_level before any tsubsting.
17917 * method.c (build_overload_value): Handle getting a
17918 TEMPLATE_CONST_PARM for a pointer.
17920 Tue Jan 7 14:00:58 1997 Jason Merrill <jason@yorick.cygnus.com>
17922 * init.c (expand_member_init): Don't give 'not a base' error for
17925 * pt.c (instantiate_decl): Call import_export_decl later.
17927 * pt.c (instantiate_class_template): Return a value.
17929 * parse.y (extension): New rule for __extension__.
17930 (extdef, unary_expr, decl, component_decl): Use it.
17932 Tue Jan 7 09:20:28 1997 Mike Stump <mrs@cygnus.com>
17934 * class.c (base_binfo): Remove unused base_has_virtual member.
17935 (finish_base_struct): Likewise.
17936 (finish_struct_1): Likewise.
17938 Tue Dec 31 20:25:50 1996 Mike Stump <mrs@cygnus.com>
17940 * search.c (expand_upcast_fixups): Fix bogus code generation
17941 problem where the generated code uses the wrong index into the
17942 runtime built vtable on the stack. Old code could clobber random
17945 Tue Dec 31 15:16:56 1996 Mike Stump <mrs@cygnus.com>
17947 * init.c (perform_member_init): Make sure the partial EH cleanups
17948 live on the function_obstack.
17950 Fri Dec 27 10:31:40 1996 Paul Eggert <eggert@twinsun.com>
17952 * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
17953 this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
17955 Tue Dec 24 10:24:03 1996 Jeffrey A Law <law@cygnus.com>
17957 * decl.c (grokvardecl): Avoid ANSI style initialization.
17959 Sun Dec 22 04:22:06 1996 Jason Merrill <jason@yorick.cygnus.com>
17961 * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
17963 Fri Dec 20 17:09:25 1996 Jason Merrill <jason@yorick.cygnus.com>
17965 * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
17967 Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17969 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
17970 arguments we compare against. Start the count of I at 1, not 0,
17971 since argv[0] is still the command.
17973 Thu Dec 19 11:53:57 1996 Stan Shebs <shebs@andros.cygnus.com>
17975 * lang-specs.h: Accept .cp as an C++ extension.
17977 Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17979 * cp-tree.h (ptr_reasonably_similar): Add decl.
17981 Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17983 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
17984 pointer. New local SPECBITS with the parm's value.
17985 (grokdeclarator): Pass &specbits down.
17987 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
17988 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
17990 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
17991 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
17993 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
17994 not an error_mark_node.
17996 Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
17998 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
17999 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
18001 Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
18003 * decl.c (grokdeclarator): When giving an anonymous struct a name,
18004 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
18007 * typeck2.c (build_m_component_ref): If component is a pointer
18008 to data member, resolve the OFFSET_REF now.
18010 * call.c (convert_like): Don't go into infinite recursion.
18012 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
18014 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
18015 * tree.c (layout_basetypes): And on the vbase ptr.
18017 Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
18019 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
18020 CHAR_TYPE_SIZE so bool is always the same size as another type.
18022 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
18024 Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
18026 * decl2.c (grok_x_components): Remove synthesized methods from
18027 TYPE_METHODS of an anonymous union, complain about member
18029 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
18031 (finish_function): Just clear the DECL_RTL of our arguments.
18033 Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
18035 * decl2.c (finish_file): Emit DWARF debugging info for static data
18038 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
18040 Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
18042 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
18045 Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
18047 * Make-lang.in (g++-cross$(exeext)): Fix typo.
18049 Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18051 Make the g++ driver now be a standalone program, rather than one
18052 that tries to run the gcc driver after munging up the options.
18053 * Make-lang.in (g++.c, g++spec.o): New rules.
18054 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
18056 (g++$(exeext)): New rule, based on xgcc rule.
18057 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
18058 * g++spec.c: New file.
18059 * g++.c: Removed file.
18061 Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
18063 * cvt.c (build_up_reference): Arrange for any temporary values
18064 that have been keep in registers until now to be put into memory.
18066 Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18068 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
18069 that make -j3 bootstrap works better.
18071 Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
18073 * decl.c (pushtag): Do pushdecl for anon tags.
18075 Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
18077 * typeck.c (c_expand_return): Fix logic.
18078 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
18080 Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
18082 * g++.c (main): Make sure arglist has a final NULL entry. Add
18083 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
18084 stdin/stdout of the invoked program are redirected to
18087 Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
18089 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
18091 Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
18093 * init.c (resolve_offset_ref): Handle obj.vfn better.
18094 * typeck.c (build_component_ref): Set TREE_TYPE on result from
18097 Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
18099 * typeck.c (convert_for_assignment): Also handle anachronistic
18100 implicit conversions from (::*)() to cv void*.
18101 * cvt.c (cp_convert_to_pointer): Likewise.
18103 Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
18105 * lex.c (handle_cp_pragma): Fix bogus warning.
18107 Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
18109 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
18110 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
18112 Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
18114 * class.c (finish_struct_1): Support DWARF2_DEBUG.
18115 * search.c (dfs_debug_mark): Likewise.
18116 * decl2.c (finish_vtable_vardecl): Likewise.
18117 * decl.c (pushtag, finish_enum): Likewise.
18118 * lex.c (check_newline): Use debug_* instead of calling *out
18119 functions directly.
18121 Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18123 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
18124 on some picky hosts.
18126 Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
18128 * class.c (finish_struct_1): A class has a non-trivial copy
18129 constructor if it has virtual functions.
18131 * cvt.c (cp_convert): Always call a constructor.
18133 * call.c (reference_binding): Still tack on a REF_BIND
18134 for bad conversions.
18135 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
18137 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
18138 (c_expand_return): Likewise.
18139 * typeck2.c (digest_init): Likewise for { }.
18140 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
18141 * cvt.c (cp_convert): Handle failure better.
18143 Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18145 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
18146 of GCC be path-relative.
18148 Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
18150 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
18151 it does need choose-temp.o and pexecute.o.
18153 Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18155 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
18156 that we still use it.
18157 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
18159 Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
18161 * init.c (expand_default_init): Avoid calling constructors to
18162 initialize reference temps.
18164 * cvt.c (convert_to_reference): Fix.
18166 Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
18168 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
18169 (convert_to_reference): Likewise.
18170 * typeck.c (convert_for_initialization): Likewise.
18171 * init.c (expand_default_init): Likewise.
18172 (expand_aggr_init_1): Likewise.
18173 * cp-tree.h (CONV_NONCONVERTING): Lose.
18174 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
18176 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
18178 Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
18180 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
18182 Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
18184 * init.c (expand_aggr_init_1): Don't crash on non-constructor
18187 Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18189 * g++.c: Include gansidecl.h.
18190 (VPROTO, PVPROTO, VA_START): Delete.
18191 (choose_temp_base_try, choose_temp_base, perror_exec,
18192 run_dos) [__MSDOS__]: Delete fns.
18193 (pfatal_with_name): Delete fn.
18194 (temp_filename): Declare like in gcc.c.
18195 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
18196 (error_count, signal_count): Define.
18197 (error): Delete both definitions.
18198 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
18199 (pfatal_pexecute): Add fn from gcc.c.
18200 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
18201 code to use the pexecute stuff also used by gcc.c.
18202 (MIN_FATAL_STATUS): Define.
18203 * Make-lang.in (g++): Add dependency on and linking with
18204 choose-temp.o and pexecute.o.
18206 * cp-tree.h: Include gansidecl.h.
18207 (STDIO_PROTO): Delete #undef/#define.
18208 * cvt.c (NULL): Delete #undef/#define.
18209 * expr.c (NULL): Likewise.
18210 * init.c (NULL): Likewise.
18211 * rtti.c (NULL): Likewise.
18212 * xref.c (NULL): Likewise.
18214 * cp-tree.h (build_user_type_conversion): Add prototype.
18215 * call.c (build_user_type_conversion): Delete prototype. Correct
18216 decl of FLAGS arg to be an int.
18217 * cvt.c (build_user_type_conversion): Likewise.
18219 Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
18221 * cp-tree.def: Add TRY_BLOCK and HANDLER.
18222 * except.c (expand_start_catch_block): Support templates.
18223 * parse.y (try_block, handler_seq): Likewise.
18224 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
18226 Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
18228 * pt.c (current_template_args): New fn.
18229 (push_template_decl): Use it.
18230 * decl.c (grokdeclarator): Use it.
18232 * decl2.c (build_expr_from_tree): Dereference ref vars.
18234 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
18235 the decl-specifier-seq.
18237 * decl.c (grok_op_properties): Don't force the type of a conversion
18238 op to be complete. Don't warn about converting to the same type
18239 for template instantiations.
18241 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
18244 Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
18246 * typeck.c (get_delta_difference): Remove previous bogusness.
18247 Don't give errors if force is set.
18249 Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
18251 * decl2.c (finish_file): Don't emit debug info.
18252 * decl.c (pushdecl): Lose obsolete code.
18253 (grokdeclarator): Still do the long long thing after complaining.
18254 * search.c (note_debug_info_needed): Don't do anything if we're in a
18256 * method.c (synthesize_method): For non-local classes,
18257 push_to_top_level first.
18259 Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
18261 * typeck.c (get_delta_difference): Add no_error parameter.
18262 (build_ptrmemfunc): Call get_delta_difference with no_error set;
18263 we don't want error messages when converting unrelated
18264 pointer-to-member functions.
18266 Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
18268 * error.c (dump_expr): Improve the wording on error messages that
18269 involve pointer to member functions.
18271 Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
18273 * cvt.c (cp_convert_to_pointer): Move code for conversions from
18274 (::*)() to void* or (*)() up a bit, so that we can convert from
18275 METHOD_TYPEs as well.
18277 Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
18279 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
18280 There are no 'member' types.
18281 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
18282 (build_x_typeid): Handle errors.
18284 Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
18286 * typeck.c (convert_for_assignment): Handle anachronistic implicit
18287 conversions from (::*)() to void* or (*)().
18288 * cvt.c (cp_convert_to_pointer): Likewise.
18289 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
18290 conversions from here.
18291 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
18292 * lang-options.h: Likewise.
18293 * decl2.c (warn_pmf2ptr): Define.
18294 * cp-tree.h: Declare it.
18295 * typeck2.c (digest_init): Allow pmfs down into
18296 convert_for_initialization.
18298 Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
18300 * typeck.c (c_expand_return): Fix for returning overloaded fn.
18302 Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
18304 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
18305 * decl.c (grok_reference_init): Pass DIRECT_BIND.
18306 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
18308 * call.c (convert_like): Don't pass INDIRECT_BIND.
18309 * typeck.c (convert_arguments): Likewise.
18310 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
18312 Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
18314 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
18315 similar code in build_up_ref.
18316 * cvt.c (build_up_reference): Drastically simplify.
18318 Mon Oct 28 12:45:05 1996 Jeffrey A Law <law@cygnus.com>
18320 * typeck.c (signed_or_unsigned_type): If the given type already
18321 as the correct signedness, then just return it.
18323 * typeck.c ({un,}signed_type): If can't do anything, call
18324 signed_or_unsigned_type.
18326 Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
18328 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
18329 current_class_type is NULL.
18331 Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
18333 * class.c (finish_struct_1): Avoid empty structs by adding a field
18334 so layout_type gets the mode right.
18336 * typeck.c (c_expand_return): Drastically simplify.
18338 Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
18340 * typeck.c (decay_conversion): Handle overloaded methods.
18342 Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
18344 * call.c (build_over_call): A TARGET_EXPR has side-effects.
18346 Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
18348 * cvt.c (convert_to_pointer_force): Add code to support pointer to
18349 member function to pointer to function conversions.
18350 * init.c (resolve_offset_ref): Add code to allow faked up objects,
18351 ignoring them if they are not used, and giving an error, if they
18353 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
18354 code, and so that we can give an error, if we needed an object,
18355 and one was not provided.
18356 (build_c_cast): Don't call default_conversion when we want to
18357 convert to pointer to function from a METHOD_TYPE.
18359 Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
18361 * Make-lang.in (cplib2.ready): Fix logic.
18363 * decl.c (shadow_tag): Only complain about non-artificial function
18366 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
18368 Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
18370 * expr.c (cplus_expand_expr): Pre-tweak call_target like
18371 expand_inline_function would.
18373 * pt.c (mark_decl_instantiated): If extern_p, call
18374 mark_inline_for_output.
18376 Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
18378 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
18381 * typeck.c (get_delta_difference): Fix wording, as we can be used
18382 for pointer to data members.
18384 Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
18386 * pt.c (tsubst): If the function decl isn't a member of this
18387 template, return a copy of the decl (including copying the
18388 lang-specific part) so we don't hose ourselves later.
18390 Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
18392 * class.c (finish_struct): Remove DWARF-specific tag handling.
18393 * decl.c (pushtag): Likewise.
18394 (finish_function): Always clear DECL_ARGUMENTS on function decls with
18396 * decl2.c (finish_file): Emit DWARF debugging info for static data
18399 Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
18401 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
18402 isn't the same as the new one before we whack it.
18404 Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
18406 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
18407 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
18408 warn_traditional and warn_strict_prototypes; remove ancient
18409 'overload' code; remove references to flag_traditional.
18411 Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
18413 * input.c (sub_getch): Handle 8-bit characters in string literals.
18415 Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
18417 * tree.c (mapcar): Handle CONSTRUCTORs.
18418 (copy_to_permanent): Handle expression_obstack properly.
18420 * Make-lang.in (cplib2.txt): Also depend on the headers.
18422 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
18424 (expand_class_desc): Use USItype for offset field.
18425 * tinfo.h (struct __class_type_info): Likewise.
18427 * method.c (build_overload_int): TYPE_PRECISION should be applied
18430 Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
18432 * call.c (build_new_op): A COND_EXPR involving void must be a
18435 Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
18437 * typeck.c (build_x_component_ref): New fn.
18438 (build_object_ref): Use it.
18439 * parse.y (primary): Use it.
18440 * decl2.c (build_expr_from_tree): Use it.
18441 * cp-tree.h: Declare it.
18443 * decl.c (start_decl): Variable-sized arrays cannot be initialized.
18444 * error.c (dump_type_suffix): Handle variable arrays.
18446 Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18448 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
18450 Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
18452 * decl.c (lookup_name_real): Don't try to look up anything in a
18455 * tinfo2.cc (__throw_type_match_rtti): Oops.
18457 Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18459 * Make-lang.in (exception.o): Use -fno-PIC for now.
18461 Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
18463 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
18465 (get_tinfo_fn_dynamic): Extracted from build_typeid.
18466 * tinfo2.cc (__dynamic_cast): Adjust.
18468 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
18469 (build_x_typeid): Likewise.
18471 * parse.y: Call build_x_typeid instead of build_typeid.
18472 * cp-tree.def: Add TYPEID_EXPR.
18473 * pt.c (tsubst_copy): Handle typeid.
18474 * decl2.c (build_expr_from_tree): Likewise.
18475 * rtti.c (build_x_typeid): Throw bad_typeid from here.
18476 (build_typeid): Not here.
18477 * cp-tree.h: Declare build_x_typeid.
18479 Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
18481 * call.c (convert_like): Pull out constant values.
18483 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
18485 Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
18487 * decl.c (init_decl_processing): Create short int types before
18488 creating size_t in case a machine description needs to use
18489 unsigned short for size_t.
18491 Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
18493 * Make-lang.in (exception.o): Turn off pic.
18495 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
18496 type, multi-level ptr conversions.
18498 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
18499 (throw_bad_cast): Use it.
18500 (throw_bad_typeid): New fn.
18501 (build_typeid): Throw bad_typeid as needed.
18503 (synthesize_tinfo_fn): Handle functions and arrays before checking
18506 * Remove .h from standard C++ headers, add new.h, move into inc
18509 * exception*: Remove pointer from object, constructors. Add
18510 default exception::what that uses type_info::name. Add
18511 __throw_bad_typeid.
18513 * init.c (build_new): Don't add a cookie to new (void *) T[2].
18515 Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
18517 * Make-lang.in: Building C++ code depends on cc1plus.
18519 Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18521 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
18522 a HOST_WIDE_INT, not a tree.
18524 Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
18526 * exception.cc: Don't include <stdlib.h>.
18528 * Make-lang.in (c++.clean): Remove cplib2.*.
18530 Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
18532 * parse.y (component_decl_1, component_costructor_declarator case):
18533 Pass attributes/prefix_attributes in tree list.
18535 Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
18537 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
18539 Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
18541 * lex.c (do_identifier): Don't do deferred lookup in a template
18544 * typeck2.c (store_init_value): Oops.
18546 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
18547 New files for C++ lang-support library.
18548 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
18549 (CXX_LIB2FUNCS): Define.
18550 And rules for building the C++ lang-support code.
18551 * config-lang.in (headers): Define.
18552 (lib2funcs): Define.
18554 Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
18556 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
18558 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
18559 * typeck2.c (store_init_value): Check for initializing pmf with { }
18561 (process_init_constructor): Not here.
18563 Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
18565 * pt.c (begin_template_parm_list): Increment
18566 processing_template_decl here.
18567 (end_template_parm_list): Not here.
18568 (process_template_parm): No need to add 1 to it now.
18569 * *.c: Use processing_template_decl instead of current_template_parms
18570 to check for being in a template.
18572 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
18573 (tsubst_copy): Handle CONSTRUCTOR.
18574 (instantiate_decl): Set up context properly for variables.
18575 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
18576 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
18578 Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18580 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
18582 Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
18584 * method.c (make_thunk): Call comdat_linkage before setting the
18587 * decl2.c (comdat_linkage): Use make_decl_one_only.
18588 (import_export_decl): Likewise.
18589 * decl.c (init_decl_processing): Check supports_one_only instead of
18592 Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
18594 * decl2.c (grokfield): Tighten checking for access decls.
18596 * decl.c (make_typename_type): Resolve references to
18597 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
18598 (lookup_name_real): Types that depend on a template parameter get
18599 an implicit 'typename' unless they're in the current scope.
18600 (start_decl_1): We don't care about incomplete types that depend
18601 on a template parm.
18602 (grokdeclarator): Resolve 'typename's in the type specifier that
18603 refer to members of the current scope.
18605 * call.c (build_over_call): Remove 'inline called before
18606 definition' diagnostic.
18607 (build_method_call): Likewise.
18608 * decl.c (duplicate_decls): Downgrade 'used before declared
18609 inline' to a warning, only with -Winline.
18611 Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
18613 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
18615 Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
18617 * call.c (build_method_call): When calling a signature
18618 default implementation, as in other cases, let instance_ptr simply
18621 Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
18623 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
18625 Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
18627 * except.c (expand_start_catch_block): Add a pushlevel so that -g
18628 works on hppa and SPARC.
18630 Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18632 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
18634 Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
18636 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
18637 before testing whether it's a signature.
18639 Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
18641 * call.c (build_new_method_call): Don't complain about signature
18642 pointers and references not being an aggr type.
18643 (build_this): If a signature pointer or reference was passed in,
18645 (build_new_method_call): If instance is a signature pointer, set
18646 basetype to the signature type of instance.
18647 * sig.c (build_signature_method_call): Deleted basetype and
18648 instance parameters, they can be found as the DECL_CONTEXT of
18649 function and as the first argument passed in.
18650 * cp-tree.h: Changed declaration of build_signature_method_call.
18651 * call.c (build_method_call): Deleted first two arguments in call
18652 of build_signature_method_call.
18653 (build_over_call): Added call to build_signature_method_call.
18655 Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
18657 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
18660 Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18662 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
18664 Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
18666 * except.c (expand_start_try_stmts): Move to except.c in the backend.
18667 (expand_end_try_stmts): Remove.
18669 * init.c (perform_member_init): Use add_partial_entry () instead
18670 of directly manipulating lists.
18671 (emit_base_init): Likewise.
18673 Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
18675 * except.c (expand_exception_blocks): Always make sure USE and
18676 CLOBBER insns that came at the end still do, the backend relies
18679 Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
18681 * call.c (build_over_call): We can only use a TARGET_EXPR of the
18684 Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
18686 * cvt.c (convert_to_reference): Revert last change, don't complain
18687 about temp without target decl.
18689 Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
18691 * decl.c (grokdeclarator): Don't core dump when void() is given.
18693 Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
18695 * decl.c (copy_args_p): Don't crash.
18697 Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
18699 * pt.c (tsubst): And support template args inside the exception
18702 * pt.c (tsubst): Add support for exception specifications in
18703 template functions.
18705 Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
18707 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
18709 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
18710 (start_function): Likewise.
18711 (start_method): Likewise.
18712 (grokfield): Likewise.
18713 (make_call_declarator): Add throw spec parameter.
18714 (set_quals_and_spec): Add routine.
18715 * lex.c (set_quals_and_spec): Likewise.
18716 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
18717 * decl.c (shadow_tag): Eliminate the throw spec parameter to
18719 (groktypename): Likewise.
18720 (start_decl): Eliminate the throw spec parameter. Eliminate the
18721 throw spec parameter to grokdeclarator. Eliminate the throw spec
18722 field in DECL_STMT.
18723 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
18724 (grokfndecl): Remove useless set of raises.
18725 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
18726 the throw spec parameter to start_decl. Pull the throw spec out
18727 of the call declarator.
18728 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
18729 (start_function): Eliminate the throw spec parameter. Eliminate
18730 the throw spec parameter to grokdeclarator.
18731 (start_method): Likewise.
18732 * decl2.c (grokfield): Likewise.
18733 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
18734 (grokoptypename): Likewise.
18735 (finish_file): Eliminate the throw spec parameter to
18736 start_function. Add throw spec to make_call_declarator.
18737 * except.c (init_exception_processing): Add throw spec to
18738 make_call_declarator. Eliminate the throw spec parameter to
18740 (expand_start_catch_block): Eliminate the throw spec parameter to
18742 (expand_builtin_throw): Add throw spec to make_call_declarator.
18743 Eliminate the throw spec parameter to start_function.
18744 (start_anon_func): Likewise.
18745 * lex.c (make_call_declarator): Add throw spec parameter.
18746 (set_quals_and_spec): New routine.
18747 (cons_up_default_function): Add throw spec to make_call_declarator.
18748 Eliminate the throw spec parameter to grokfield.
18749 * method.c (synthesize_method): Eliminate the throw spec parameter
18751 * pt.c (process_template_parm): Eliminate the throw spec parameter
18753 (tsubst): Add throw spec to make_call_declarator.
18754 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
18755 (do_function_instantiation): Eliminate the throw spec parameter to
18756 grokdeclarator. Eliminate the throw spec parameter to
18758 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
18760 * parse.y (datadef): Remove non-winning optimization.
18762 (fndef): Remove ambiguous error productions uncovered by grammar
18764 (constructor_declarator): Add exception_specification_opt here.
18765 (component_constructor_declarator): Likewise.
18766 (direct_after_type_declarator): Likewise.
18767 (complex_direct_notype_declarator): Likewise.
18768 (direct_abstract_declarator): Likewise.
18769 (fn.def1): Remove exception_specification_opt.
18770 (fn.def2): Likewise.
18771 (condition): Likewise.
18772 (initdcl0): Likewise.
18773 (initdcl): Likewise.
18774 (notype_initdcl0): Likewise.
18775 (nomods_initdcl0): Likewise.
18776 (component_decl_1): Likewise.
18777 (component_declarator): Likewise.
18778 (after_type_component_declarator0): Likewise.
18779 (after_type_component_declarator): Likewise.
18780 (notype_component_declarator): Likewise.
18782 Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
18784 * call.c (build_over_call): Also use an INIT_EXPR when
18785 initializing anything from an rvalue.
18787 * call.c (build_over_call): Call stabilize_reference when building
18788 an INIT_EXPR instead of calling the copy ctor.
18790 * call.c (joust): Extend the previous change to all comparisons.
18792 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
18793 NO_LINKAGE_HEURISTICS.
18795 * decl2.c (finish_file): Emit any statics that weren't already.
18797 * typeck.c (build_static_cast): Implement.
18798 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
18799 * decl.c (grokparms): Use can_convert_arg instead of
18800 implicit_conversion directly.
18801 (copy_args_p): New fn.
18802 * cvt.c (convert_to_reference): Don't complain about temp with
18804 (build_up_reference): Handle TARGET_EXPRs.
18805 * call.c (build_over_call): Elide unnecessary temps.
18806 (can_convert*): Use new overloading code.
18808 Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
18810 * call.c: Move TYPE_PTR*_MACROS ...
18811 * cp-tree.h: To here.
18812 * typeck.c (build_reinterpret_cast): Implement.
18814 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
18816 (joust): If we're comparing a function to a builtin and the worst
18817 conversion for the builtin is worse than the worst conversion for the
18818 function, take the function.
18820 * typeck.c (build_const_cast): Implement.
18821 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
18822 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
18824 Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
18826 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
18827 too early. Make sure we explode if exprtype turns out to be a
18828 NULL_TREE when it shouldn't be.
18830 Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
18832 * cp-tree.h: New routine make_call_declarator.
18833 * lex.c (make_call_declarator): Define it.
18834 * except.c (init_exception_processing): Use it.
18835 (expand_builtin_throw): Likewise.
18836 (start_anon_func): Likewise.
18837 * decl2.c (finish_file): Likewise.
18838 * lex.c (cons_up_default_function): Likewise.
18839 * parse.y: Likewise.
18840 * pt.c (tsubst): Likewise.
18842 Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
18844 * decl2.c (groktypefield): Remove unused code.
18846 Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
18848 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
18849 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
18850 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
18851 nonempty_cv_qualifiers.
18854 * lex.c (make_pointer_declarator): Change type_quals into
18856 (make_reference_declarator): Likewise.
18858 Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
18860 * decl.c (start_function): Only check interface_* for templates
18861 with flag_alt_external_templates.
18863 * call.c (build_new_op): Check for comparison of different enum types.
18864 (build_over_call): Fix arg # output.
18866 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
18868 Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
18870 * call.c (build_new_op): Check for erroneous args.
18872 * call.c (build_new_method_call): Add missing args to cp_error.
18874 * tree.c (error_type): Don't print reference-to-array.
18876 * typeck.c (convert_for_assignment): Don't say contravariance for
18879 Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
18881 * call.c (build_over_call): Diagnose bad convs for `this'.
18883 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
18886 * call.c (convert_like): Handle bad convs.
18887 (build_over_call): Handle bad convs better.
18889 * decl2.c: -fansi-overloading is now the default.
18891 * call.c (build_new_method_call): Check for erroneous args.
18893 * pt.c (instantiate_class_template): Propagate
18894 TYPE_USES_MULTIPLE_INHERITANCE.
18896 Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
18898 * call.c (enforce_access): Add static to routine.
18900 Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
18902 * call.c (build_user_type_conversion_1): Fix bad handling.
18903 (compare_ics): Likewise.
18905 Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
18907 * call.c (standard_conversion): Oops.
18909 Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
18911 * g++.c: Update test for win32 (&& ! cygwin32).
18913 Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
18915 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
18916 (ptr_reasonably_similar): New fn.
18917 * call.c (BAD_RANK): New rank.
18918 (ICS_BAD_FLAG): New macro.
18919 (standard_conversion): Handle almost-right pointer conversions.
18920 (reference_binding): Handle bad rvalue bindings.
18921 (add_*_candidate): Stuff.
18922 (build_over_call): Pass bad conversions to convert_for_initialization.
18923 (compare_ics): Handle bad convs.
18926 Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
18928 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
18929 integer_type_node when computing pointer offsets.
18931 Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
18933 * tree.c (lvalue_type): New fn.
18934 (error_type): New fn.
18935 * call.c (op_error): Use error_type.
18936 (add_conv_candidate): Use lvalue_type.
18937 (add_builtin_candidates): Likewise.
18938 * error.c (args_as_string): Use error_type.
18940 Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
18942 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
18943 (tsubst): Not here.
18945 * decl.c (init_decl_processing): With -ansi, __null's type is the
18946 signed integral type with the same number of bits as a pointer.
18947 Introduce a new variable null_node for it.
18948 * cp-tree.h: Adjust.
18949 * call.c (null_ptr_cst_p): Adjust.
18951 Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
18953 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
18956 Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
18958 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
18959 fns of classes without virtual functions.
18961 * call.c (add_function_candidate): Handle `this' specially.
18962 (compare_ics): Likewise.
18964 Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
18966 * typeck.c (build_conditional_expr): Fix handling of __null.
18968 * decl2.c (comdat_linkage): New fn.
18969 (import_export_vtable): Use it.
18970 (import_export_decl): Use it.
18971 * method.c (make_thunk): Use it.
18973 Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
18975 * pt.c (end_template_decl): If we don't actually have parms, return.
18976 * parse.y (template_header): Accept 'template <>'.
18978 * errfn.c: Allow 5 args.
18980 Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
18982 * tree.c (make_temp_vec): New fn.
18983 * pt.c (push_template_decl): Handle partial specs.
18984 (instantiate_class_template): Likewise.
18985 (more_specialized): Use get_bindings.
18986 (more_specialized_class): New fn.
18987 (get_class_bindings): New fn.
18988 (most_specialized_class): New fn.
18989 (do_function_instantiation): List candidates for ambiguous case.
18990 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
18991 (shadow_tag): Call push_template_decl for partial specializations.
18992 * parse.y: Likewise.
18993 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
18994 DECL_TEMPLATE_MEMBERS.
18995 * call.c (print_z_candidates): Reduce duplication.
18997 Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
18999 * decl2.c (lang_decode_option): Allow -fansi-overloading.
19001 Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
19003 * pt.c (get_bindings): New fn.
19004 (most_specialized): Likewise.
19005 (do_function_instantiation): Use them.
19006 (add_maybe_template): New fn.
19007 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
19008 * call.c (build_new_op): Handle guiding decls.
19009 (build_new_function_call): Likewise.
19010 * decl2.c (finish_file): Likewise.
19012 * decl2.c (mark_used): Do synthesis here.
19013 * call.c (build_method_call): Not here.
19014 (build_over_call): Or here.
19015 * typeck.c (build_function_call_real): Or here.
19016 * tree.c (bot_manip): Call mark_used on functions used in default
19019 Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
19021 * decl2.c (import_export_vtable): Delete code that disabled vtable
19022 heuristic on systems with ASM_OUTPUT_EXTERNAL.
19024 Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
19026 * typeck.c (build_x_function_call): Handle static call context
19029 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
19030 the function, not its outer block.
19032 * call.c (build_field_call): Pass fields on to build_opfncall
19033 regardless of TYPE_OVERLOADS_CALL_EXPR.
19034 (build_method_call): Pass on to build_new_method_call sooner.
19036 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
19038 * class.c (instantiate_type): Don't put a POINTER_TYPE to
19039 METHOD_TYPE on an expression. Also make a copy of rhs instead of
19042 Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
19044 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
19045 (add_builtin_candidate): Don't take enums for ++.
19046 (build_new_method_call): Handle non-aggregates and field calls.
19047 Move new overloading code from...
19050 * decl.c (grokparms): Don't check default args in templates.
19052 Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
19054 * cvt.c (build_new_op): Fix args to build_unary_op.
19055 (add_builtin_candidates): Don't call type_promotes_to on float.
19057 * decl.c (grokparms): Check the type of the default arg.
19059 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
19060 returning NULL_TREE.
19062 * typeck.c (build_x_binary_op): Avoid doing extra work.
19063 (build_x_unary_op): Likewise.
19064 (build_x_conditional_expr): Likewise.
19065 * cvt.c (build_over_call): Return.
19066 (add_builtin_candidate): Fix MEMBER_REF.
19067 (build_new_op): Likewise.
19069 Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
19071 * method.c (build_overload_name): Put bug fix into code but leave
19072 disabled for now so we can be bug compatible with older releases
19073 that do repeats incorrectly. In the future, we can enable it.
19075 Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
19077 * cvt.c (convert_like): Don't call build_cplus_new twice.
19079 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
19080 Control new overloading code with -fansi-overloading.
19082 Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
19084 * cvt.c (build_over_call): Call build_cplus_new.
19085 * call.c (build_method_call): Likewise.
19086 * typeck.c (build_function_call_real): Likewise.
19087 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
19088 the COND_EXPR in a TARGET_EXPR so they use the same slot.
19090 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
19092 * typeck.c (complete_type): Propagate
19093 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
19095 Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
19097 * cvt.c (joust): More ?: kludging. Sigh.
19098 (build_over_call): Don't try to synthesize global fns.
19100 * search.c (lookup_conversions): Use binfo marking.
19102 Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
19104 * search.c (build_mi_matrix): Use the correct value of cid
19105 when determining the new mi_size.
19107 Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
19109 * cvt.c (add_builtin_candidates): Do consider type conversion ops
19110 for the first parms of += et al.
19111 (strip_top_quals): New fn.
19112 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
19113 (implicit_conversion): Likewise.
19114 (add_builtin_candidates): Be careful about arrays.
19115 (build_new_method_call): Handle vtable optimization.
19117 Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
19119 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
19120 * cvt.c (reference_binding): Use it.
19121 (implicit_conversion): Use it.
19122 (add_builtin_candidate, COND_EXPR): Use it.
19124 * cvt.c (build_new_function_call): Check for error args.
19126 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
19128 * gxx.gperf: Add __null.
19129 * hash.h: Regenerate.
19130 * lex.h: Add RID_NULL.
19131 * lex.c (init_lex): Create null_pointer_node here, stick it in
19133 * decl.c (init_decl_processing): Still set its type here.
19134 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
19135 (convert_to_pointer_force): Likewise.
19136 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
19138 * call.c (convert_harshness): Use null_ptr_cst_p.
19139 * typeck.c (convert_for_assignment): Likewise. Don't produce
19142 * error.c (args_as_string): Handle lists of actual args, too.
19143 * cvt.c (null_ptr_cst): Support (void*)0 for now.
19144 (build_user_type_conversion_1): Improve diagnostics.
19145 (build_new_function_call): Likewise.
19146 (build_object_call): Likewise.
19147 (build_new_method_call): Likewise. Move call before def diagnostic...
19148 (build_over_call): Here.
19150 * cvt.c (build_new_method_call): Don't complain about no match if
19151 LOOKUP_SPECULATIVELY.
19152 (build_over_call): Fix 'this' for virtual fn.
19153 (build_new_method_call): Add diagnostic.
19155 Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
19157 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
19158 constructors to be passed in.
19159 (build_over_call): Likewise.
19160 (build_user_type_conversion_1): Pass them in.
19161 (convert_like): Likewise.
19162 (build_object_call): Handle overloaded conversions.
19163 (build_over_call): Pass the right args to build_vfn_ref.
19164 (standard_conversion): Fix pmf convs.
19165 (joust): Handle comparing statics and non-statics.
19166 (build_new_method_call): New fn.
19167 * call.c (build_method_call): Call it if NEW_OVER.
19169 Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
19171 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
19174 Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
19176 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
19177 instead of just maybe_build_cleanup so that we deallocate the
19180 Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19182 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
19183 * cp-tree.h (finish_prevtable_vardecl): Add decl.
19185 Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
19187 * pt.c (instantiate_class_template): Call complete_type. Also, if
19188 we're at the end of the file and we just instantiated a template
19189 class with a vtable, call finish_prevtable_vardecl.
19191 * error.c (dump_decl): Don't explode (or explode more gracefully
19192 as appropriate) if the object being dumped has a null type.
19193 (dump_expr): Likewise.
19195 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
19196 by counting the number of nodes that we'll need before allocating
19198 (lookup_fnfields): Fix comment.
19199 (breadth_first_search): Fix comment.
19201 Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
19203 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
19205 * class.c (finish_struct): Call cplus_decl_attributes here.
19206 (finish_struct_1): Not here.
19207 * cp-tree.h: Adjust.
19209 * pt.c (type_unification): New parameter STRICT.
19210 (unify): If STRICT, don't allow cv addition or base deduction.
19211 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
19213 Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
19215 * search.c (get_template_base{_recursive}): New fns.
19216 * pt.c (more_specialized): New fn.
19217 (do_function_instantiation): Use it.
19218 (unify): Handle base deduction.
19219 * cvt.c (joust): Use more_specialized.
19220 Don't arbitrarily choose between non-builtin candidates.
19221 (build_over_call): Call require_complete_type.
19223 * decl.c (start_function): Statics are static even in a #pragma
19226 * decl2.c (import_export_vtable): Disable vtable heuristic on
19227 systems with ASM_OUTPUT_EXTERNAL.
19229 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
19230 (standard_conversion): No std conv to enum type.
19232 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
19235 * cvt.c (reference_binding): Bind directly to a base subobject of
19238 * cvt.c (build_new_op): Enforce access control.
19240 Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
19242 * typeck2.c (process_init_constructor): When scanning the
19243 union for a named field, skip things that aren't FIELD_DECLs.
19245 * method.c (synthesize_method): Don't scan fndecl's rtl if
19246 we're at the end of the file; just assume the function can't
19249 Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
19251 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
19254 * cvt.c (build_user_type_conversion_1): Handle overloaded
19257 * cvt.c (add_builtin_candidates): Don't consider type conversion
19258 operators for the first parameter of operator=.
19260 Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
19262 * typeck.c (complete_type): Only call layout_type if we're not
19263 expanding a template.
19265 Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
19267 * cvt.c (compare_ics): Oops.
19269 * cvt.c (op_error): Oops.
19271 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
19272 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
19273 (build_conv): Use them.
19274 (implicit_conversion): Use them.
19275 (convert_like): Handle them.
19276 (build_new_op): Handle builtin COND_EXPR again.
19277 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
19278 in lists of types for COND_EXPR.
19279 (add_builtin_candidate): Add enum candidates for COND_EXPR.
19281 Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
19283 * typeck.c (build_modify_expr): Always attempt to build a call to
19284 the assignment operator, even if we're using a default one.
19285 (convert_for_initialization): Call complete_type.
19287 Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
19289 * cvt.c (reference_binding): A REF_BIND gets the reference type.
19290 (implicit_conversion): Likewise.
19291 (convert_like): Likewise.
19292 (compare_ics): Likewise.
19293 (compare_qual): Likewise.
19294 (print_z_candidates): Handle no candidates.
19295 (build_new_op): Don't handle builtin COND_EXPR for now.
19297 Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
19299 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
19301 Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
19303 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
19305 * cvt.c (build_builtin_candidate): Oops.
19306 (build_new_op): Oops.
19308 * method.c (build_opfncall): Pass COND_EXPR on.
19309 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
19310 (add_builtin_candidate{,s}): Likewise.
19311 (add_builtin_candidates): Likewise.
19312 (print_z_candidates, op_error, build_new_op): Likewise.
19313 (type_decays_to): New fn.
19314 * lex.c (init_lex): Just say ?: for COND_EXPR.
19316 Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
19318 * typeck.c (complete_type): Call layout_type rather than building
19321 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
19322 only use ptrdiff_t.
19324 Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
19326 * cvt.c: Always compile the new overloading code (but don't use it).
19327 (implicit_conversion): Add a BASE_CONV when converting to
19328 the same class type.
19329 (convert_like): Handle BASE_CONV.
19331 Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
19333 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
19334 (add_builtin_candidate): Likewise.
19337 * typeck.c (build_x_function_call): Try an operator function
19338 whenever we call an object of class type.
19339 * method.c (build_opfncall): Pass CALL_EXPRs through.
19340 * cvt.c (implicit_conversion): Do const-ref case first.
19341 (add_conv_candidate, build_object_call, op_error): New fns.
19342 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
19343 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
19344 builtin candidates.
19345 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
19346 Fall back on preincrement handling. Use op_error.
19348 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
19349 an error_mark_node.
19350 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
19353 Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
19355 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
19357 Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
19359 * typeck.c (build_component_ref_1): Use build_component_ref
19360 instead of open coding it here.
19362 Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
19364 * g++.c (main): Don't link with -lg++.
19367 * cvt.c (convert_to_reference): Don't use convert_from_reference on
19368 result of build_type_conversion.
19369 (cp_convert): Only call build_method_call for ctors if
19370 build_type_conversion failed.
19371 (ptr_complete_ob): New function.
19372 (TYPE_PTR{,OB,MEM}_P): New macros.
19373 ({add,build}_builtin_candidate{,s}): New functions.
19374 (print_z_candidates): Handle builtins.
19375 (build_user_type_conversion_1): Don't use conversion fns for
19376 converting to a base type.
19377 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
19378 (build_user_type_conversion): Use convert_from_reference.
19379 (build_new_op): New function.
19380 (build_over_call): Fix handling of methods.
19381 (compare_ics): Handle AMBIG_CONV properly.
19382 * typeck2.c: Increment abort count.
19383 * method.c (build_opfncall): Forward most requests to build_new_op.
19384 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
19386 Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19388 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
19389 invalid second argument to dump_expr_list.
19391 Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
19393 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
19395 Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
19397 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
19400 Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
19402 * typeck2.c (process_init_constructor): New pedwarn for using { }
19403 to initialize a pointer to member function.
19404 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
19405 we can avoid the new error.
19407 Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
19409 * typeck.c (build_ptrmemfunc1): New function to hide details of
19410 pointer to member functions better.
19412 Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
19414 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
19415 methods into the actual method, as we know the implied object is
19418 Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19420 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
19421 inside a system header.
19423 Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
19425 * call.c (build_method_call): Call complete_type on the
19428 Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
19430 * typeck.c (build_component_ref): Always build up an OFFSET_REF
19431 for obj_ptr->func so that we can know which object to use in a
19434 Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
19436 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
19437 around things. Also improve maintainability.
19439 Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
19441 * decl.c (grokdeclarator): Check for overflow when evaluating an
19444 Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
19446 * cvt.c (cp_convert): Don't check for ambiguity with constructor
19449 * typeck.c (build_x_function_call): Pass function overload
19450 questions to new overloading code if NEW_OVER.
19451 * init.c (expand_aggr_init_1): Only check for type conversion ops
19452 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
19453 Don't check for ambiguity with constructor if NEW_OVER.
19454 * cvt.c (convert_to_reference): Dereference the result of a type
19455 conversion operator.
19456 (build_conv): Propagate ICS_USER_FLAG.
19457 (implicit_conversion): Call instantiate_type.
19458 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
19459 (add_function_candidate): Fix cv-quals on argtype.
19460 (print_z_candidates): New function.
19461 (build_new_function_call): Call it.
19462 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
19463 consider non-converting constructors.
19464 Call print_z_candidates.
19465 Return an AMBIG_CONV for an ambiguous conversion.
19466 (build_user_type_conversion): Handle AMBIG_CONV.
19467 (convert_like): Fix test for building TARGET_EXPR.
19468 Call instantiate_type.
19469 Handle AMBIG_CONV and LVALUE_CONV.
19470 (build_over_call): Handle 0 args and ellipsis.
19471 * cp-tree.def: Add AMBIG_CONV.
19473 Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
19475 * decl.c (lookup_name_real): If we find mem in obj when parsing
19476 `obj->mem', make sure we return the right value.
19478 Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
19480 * search.c (get_base_distance): Call complete_type.
19482 Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
19484 * decl.c (store_bindings): Make static.
19486 Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
19488 * init.c (expand_aggr_init_1): Don't check type conversions if
19491 * cvt.c (z_candidate): Put back template field.
19492 (add_function_candidate): Set it.
19493 (add_template_candidate): Likewise.
19495 (compare_qual): Handle references and pointers to members.
19496 (compare_ics): Handle reference bindings.
19498 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
19500 Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
19502 * call.c (compute_conversion_costs): Call complete_type.
19504 * tree.c (vec_binfo_member): Use comptypes instead of comparing
19505 pointers, so we can handle template parameters.
19507 Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
19509 * cvt.c (cp_convert_to_pointer): We have to call complete_type
19510 here; let's make it explicit instead of a side effect of an
19513 Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
19515 * cvt.c (z_candidate): Remove template field.
19516 (reference_binding): Handle binding to temporary.
19517 (implicit_conversion): Likewise.
19518 (add_function_candidate): Handle artificial constructor parms.
19519 Handle functions with too few parms.
19520 (add_template_candidate): New function.
19521 (build_user_type_conversion_1): Handle constructors.
19522 (convert_like): Likewise.
19523 (build_over_call): Likewise.
19524 (build_new_function_call): Support templates.
19525 (compare_ics): Fix reference, inheritance handling.
19527 Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
19529 * decl.c: Add signed_size_zero_node.
19530 (init_decl_processing): Build it.
19531 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
19532 when we're trying to make a negative delta.
19534 Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19536 Stop doing this damn index==strchr variable name confusion.
19537 * class.c (add_virtual_function): Change local var INDEX to be
19539 (add_method): Likewise.
19540 * lex.c (print_parse_statistics): Likewise.
19541 * search.c (make_memoized_table_entry): Likewise.
19542 (lookup_fnfields_here): Likewise.
19543 (lookup_field): Likewise.
19544 (lookup_fnfields): Likewise.
19545 (get_baselinks): Likewise.
19546 * sig.c (build_signature_table_constructor): Likewise.
19547 (build_signature_method_call): Likewise.
19548 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
19549 (get_member_function_from_ptrfunc): Likewise.
19550 (build_ptrmemfunc): Change local var INDEX to be IDX.
19551 (c_expand_start_case): Likewise.
19553 Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
19555 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
19556 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
19557 (convert_to_reference): Use build_type_conversion to convert to
19558 the reference type directly.
19559 (standard_conversion): Fix void* case, non-conversions.
19560 (reference_binding): Fix expr == 0 case, non-conversions.
19561 (convert_like): Support REF_BIND.
19562 (compare_qual): Split out from compare_ics.
19563 (compare_ics): Use it, handle icses with only a qual_conv.
19565 * init.c (expand_vec_init): Don't crash if decl is NULL.
19567 Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
19569 * mpw-config.in: New file, configury for Mac MPW.
19570 * mpw-make.sed: New file, makefile editing for MPW.
19572 Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
19574 * pt.c (instantiate_class_template): Call repo_template_used.
19576 * search.c (lookup_conversions): Only lookup conversions in
19579 Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19581 * cp-tree.def: Renamed from tree.def, to avoid confusion with
19583 * cp-tree.h, lex.c: Include cp-tree.def.
19584 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
19586 Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
19588 * init.c (build_vec_delete_1): Call complete_type.
19590 Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
19592 * except.c (start_anon_func): Make sure anonymous functions are
19595 Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
19597 * decl.c (finish_function): If function_depth > 1, set nested.
19599 * decl2.c (grokbitfield): Revert Bob's change.
19600 * class.c (finish_struct_1): Fix handling of named bitfield widths.
19602 Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
19604 * pt.c (add_pending_template): Handle types.
19605 (lookup_template_class): With -fexternal-templates, just add the class
19606 to pending_templates instead of instantiating it now.
19607 * decl2.c (finish_file): Handle types in pending_templates.
19609 Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
19611 * decl2.c (grokbitfield): Handle constant decls appropriately.
19612 Give an appropriate error message now instead of spewing core
19615 Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
19617 * decl2.c: Don't turn on thunks by default for now.
19619 Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
19621 * typeck.c (complete_type): Handle error_mark_node.
19622 (common_type, OFFSET_TYPE): Handle template_type_parms.
19624 Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
19626 * pt.c (instantiate_decl): If at_eof, call import_export_decl
19627 regardless of DECL_INLINE.
19629 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
19631 * class.c (finish_struct_bits): Copy TYPE_SIZE.
19633 * rtti.c (build_dynamic_cast): Support templates.
19634 * tree.def: Support DYNAMIC_CAST_EXPR.
19635 * pt.c (tsubst_copy): Likewise.
19636 * decl2.c (build_expr_from_tree): Likewise.
19638 Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
19640 * typeck.c (build_static_cast): Support templates.
19641 (build_const_cast): Likewise.
19642 * tree.def: Support CONST/STATIC_CAST_EXPR.
19643 * pt.c (tsubst_copy): Likewise.
19644 * decl2.c (build_expr_from_tree): Likewise.
19646 Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
19648 * decl2.c (finish_vtable_vardecl): Don't trust
19649 TREE_SYMBOL_REFERENCED for vtables of local classes.
19651 Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
19653 * pt.c (tsubst_copy): Handle operator T.
19655 Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19657 * init.c (build_delete): Move creation of PARMS inside test of
19658 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
19660 Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
19662 * typeck.c (build_conditional_expr): Don't assume that
19663 the arguments to ?: are always pointers or records.
19665 Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
19667 * decl2.c (import_export_decl): Still emit static/weak/comdat
19668 copies of inline template functions with -fno-implicit-templates.
19670 Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
19672 * init.c (build_delete): Determine the complete basetype
19673 path to the destructor we're calling.
19675 Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
19677 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
19678 initialize the enum, because we really and truly don't know where
19680 (start_enum): Don't copy integer_zero_node because
19681 build_enumerator will do it.
19683 Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
19685 * decl.c (finish_function): Do access control on base destructors.
19687 * pt.c (tsubst, case FUNCTION_DECL): Set up
19688 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
19691 Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
19693 * cvt.c (build_up_reference): If we have already extended the
19694 lifetime of the temporary, don't try it again.
19695 * typeck.c (c_expand_return): Don't try and convert the return
19696 value twice when we want a reference, once is enough.
19698 Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
19700 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
19701 LOOKUP_ONLYCONVERTING at all for now.
19703 * search.c (add_conversions): Put the conversion function in
19704 TREE_VALUE, the basetype in TREE_PURPOSE.
19705 * cvt.c (build_type_conversion): Adjust.
19706 * cvt.c (build_expr_type_conversion): Adjust.
19707 * call.c (user_harshness): Adjust.
19709 Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
19711 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
19714 Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
19716 * except.c (expand_start_catch_block): Add a dummy region, if we
19717 get an error, so that we can avoid core dumping later.
19719 Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
19721 * cp-tree.h (OFFSET_REF): Remove.
19722 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
19723 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
19724 * init.c (expand_aggr_init_1): Likewise.
19725 (build_new): Likewise.
19726 * typeck.c (expand_target_expr): Likewise.
19728 Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
19730 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
19733 Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
19735 * cvt.c (build_up_reference): Redo how and when temporaries are
19737 * decl.c (grok_reference_init): Don't try and be smart about
19740 Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
19742 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
19743 (TARGET_EXPR...), now that it has 4 arguments.
19744 * tree.c (build_cplus_new): Likewise.
19746 Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
19748 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
19750 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
19751 * decl.c (struct saved_scope): Remove named_labels,
19752 {base,member}_init_list.
19753 (maybe_push_to_top_level): Don't set them. Call
19754 push_cp_function_context if appropriate.
19755 (pop_from_top_level): Likewise.
19757 * method.c (do_build_assign_ref): Remove obsolete check of
19758 TYPE_HAS_ASSIGN_REF (basetype).
19760 * decl.c (grokfndecl): Diagnose user definition of
19761 implicitly-declared methods.
19763 Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
19765 * method.c (do_build_copy_constructor): Add code to give
19766 meaningful error messages instead of crashing.
19767 (do_build_assign_ref): Don't synthesize assignment operators for
19768 classes containing reference or const members.
19770 * class.c (struct base_info): Remove cant_synth_copy_ctor
19771 and cant_synth_asn_ref.
19772 (finish_base_struct): Remove the code that tries to conditionalize
19773 synthesis of copy constructors & assignment operators based on
19774 access permissions. Instead, let it fail when it tries to
19775 synthesize the copy constructor. This will give meaningful error
19776 messages instead of silently generating code to perform a bitcopy.
19778 Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
19780 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
19781 determining types for constant values.
19783 * decl.c (struct named_label_list): Use instead of stuffing
19784 random items into a TREE_LIST node.
19785 (named_label_uses): Use the new struct.
19786 (poplevel): Likewise.
19787 (lookup_label): Likewise.
19788 (define_label): Add an error message to tell the user the line
19789 where the goto is located in addition to the destination of the
19791 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
19793 (finish_function): Likewise.
19795 (start_decl): Complain about defining a static data member
19796 in a different type from which it was declared.
19798 Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
19800 * cvt.c (build_expr_type_conversion): Adjust.
19802 Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
19804 * call.c (build_method_call): Always convert 'this' to the
19807 * search.c (add_conversions): Put the conversion function in
19808 TREE_VALUE, the type in TREE_PURPOSE.
19809 * cvt.c (build_type_conversion): Adjust.
19810 * call.c (user_harshness): Adjust.
19812 * method.c (emit_thunk): Call temporary_allocation and
19813 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
19815 * tree.c (build_cplus_array_type): Handle tweaking of
19816 TYPE_MAIN_VARIANT here.
19817 * typeck.c (common_type): Not here.
19819 * typeck.c (complete_type): Only try to complete an array type if
19822 Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
19824 * decl.c (grokvardecl): Call complete_type.
19825 (grokdeclarator): Call complete_type for PARM_DECLs.
19827 Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
19829 * pt.c (instantiate_class_template): Re-set
19830 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
19832 Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
19834 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
19835 smart enough to do it right.
19836 * tree.c (cp_expand_decl_cleanup): Likewise.
19837 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
19838 cp_expand_decl_cleanup.
19839 (store_parm_decls): Likewise.
19840 (hack_incomplete_structures): Likewise.
19841 * except.c (push_eh_cleanup): Likewise.
19843 Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
19845 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
19846 frontend to the backend where it belongs.
19847 * tree.c (unsave_expr): Likewise.
19848 (unsave_expr_now): Likewise.
19849 * tree.def (UNSAVE_EXPR): Likewise.
19850 * cp-tree.h (unsave_expr): Likewise.
19851 (unsave_expr_now): Likewise.
19853 Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
19855 * init.c (emit_base_init): Make sure the partial EH cleanups live
19856 on the function_obstack.
19858 Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
19860 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
19861 when checking for pointer types.
19863 Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
19865 * pt.c (instantiate_class_template): Remove obsolete check for
19866 access declarations.
19868 Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
19870 * call.c (build_overload_call): Simplify calls to
19871 build_overload_call by removing last parameter.
19872 (build_method_call): Likewise.
19873 * cp-tree.h: Likewise.
19874 * method.c (build_opfncall): Likewise.
19875 * typeck.c (build_x_function_call): Likewise.
19877 Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
19879 * call.c (default_parm_conversions): Factor out common code.
19880 (build_method_call): Use it.
19881 (build_overload_call_real): Use it.
19883 Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
19885 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
19886 but pedwarn as the code is bogus.
19887 * typeck.c (decay_conversion): Likewise.
19888 (build_function_call_real): Use build_addr_func instead of
19889 default_conversion. Don't allow pointer-to-method functions down
19891 (build_unary_op): Use real pointer-to-member functions instead of
19893 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
19894 (convert_for_assignment): Removed some obsolete code.
19895 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
19896 build_x_function_call instead of current_class_ptr. Only call
19897 digest_init once on an initializer, we do this just checking
19899 (build_expr_from_tree): Pass current_class_ref to
19900 build_x_function_call instead of current_class_ptr.
19901 * init.c (build_member_call): Likewise.
19902 * pase.y: Likewise.
19903 * error.c (dump_expr): Handle OFFSET_REFs better.
19904 * pt.c (unify): Handle pointer-to-member functions better.
19905 * decl.c (finish_function): Clear out current_class_ref just like
19906 we do for current_class_ptr.
19908 * typeck.c (get_delta_difference): Handle virtual bases better.
19910 Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
19912 * sig.c (build_signature_table_constructor): Use the delta for
19913 the original basetype for this virtual function with thunks.
19914 (build_signature_method_call): We still need to adjust 'this'
19917 Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
19919 * call.c (build_addr_func): New routine. Used to get the `real'
19920 address of a function or a method. Needed to avoid getting a
19921 pointer-to-member function.
19922 (build_call): New routine to build CALL_EXPRs.
19923 (build_method_call): Use it.
19924 * cvt.c (convert_to_aggr): Likewise.
19925 * typeck.c (build_function_call_real): Likewise.
19926 * sig.c (build_signature_table_constructor): Use build_addr_func.
19927 * cp-tree.h (build_call, build_addr_func): Declare them.
19929 Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
19931 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
19932 * parse.y: Remove uses of LOOKUP_AGGR.
19934 Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
19936 * *.[chy]: Rename current_class_decl to current_class_ptr, and
19937 C_C_D to current_class_ref.
19939 Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
19941 * call.c (convert_harshness): Tighten up pointer conversions.
19943 Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
19945 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
19946 (finish_file): Likewise.
19948 Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
19950 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
19952 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
19955 Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
19957 * decl2.c: Turn on thunks by default where supported.
19959 Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
19961 * cp-tree.h (build_overload_call_maybe): Removed.
19962 * call.c (build_overload_call_real): Invert meaning of last arg to
19963 be require_complete.
19964 (build_overload_call): Likewise.
19965 * typeck.c (build_x_function_call): Use build_overload_call_real
19966 instead of build_overload_call_maybe.
19968 Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
19970 * decl2.c (finish_file): Don't try to emit functions that haven't
19973 Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
19975 * decl2.c (finish_vtable_vardecl): Oops.
19977 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
19978 Also store the bindings from previous_class_values.
19979 (pop_from_top_level): Restore them.
19981 Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
19983 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
19984 symbol has been referenced.
19985 (finish_file): Re-join synthesis/vtable loop with inline emission
19986 loop, disable inlining when an inline is output.
19988 Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
19990 * except.c (init_exception_processing): Setup saved_in_catch.
19991 (push_eh_cleanup): Reset __eh_in_catch.
19992 (expand_start_catch_block): Set __eh_in_catch.
19994 Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
19996 * except.c (push_eh_cleanup): Add tracking for whether or not we
19997 have an active exception object.
19998 (expand_builtin_throw): Use it to make sure a rethrow without an
19999 exception object is caught.
20001 Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
20003 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
20006 Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
20008 * decl2.c (finish_file): Also use sentries for vars with
20009 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
20012 * lex.c (handle_cp_pragma): Disable #pragma
20013 interface/implementation if SUPPORTS_ONE_ONLY > 1.
20015 Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
20017 * method.c (emit_thunk): Wrap default case in
20018 temporary/permanent_allocation.
20020 * method.c (make_thunk): Use DECL_ONE_ONLY.
20021 (emit_thunk): Call assemble_end_function.
20023 Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
20025 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
20026 (import_export_decl): Likewise.
20027 (finish_prevtable_vardecl): Disable vtable hack if
20028 SUPPORTS_ONE_ONLY > 1.
20030 Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
20032 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
20033 PREDECREMENT_EXPRs take two arguments, not one.
20035 Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
20037 * class.c (build_vtable_entry): Don't build thunks for abstract
20040 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
20043 Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
20045 * class.c (set_rtti_entry): Use size_zero_node.
20046 (build_vtable): Likewise.
20048 Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
20050 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
20051 (prepare_fresh_vtable): Likewise.
20053 Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
20055 * method.c (emit_thunk): Call mark_used on the target function.
20057 * call.c (build_method_call): Don't warn about pending templates.
20059 Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
20061 * decl2.c (finish_file): Fix list walking logic.
20063 * typeck2.c (check_for_new_type): Only warn if -pedantic.
20065 Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
20067 * class.c (finish_struct_1): Remove old code for
20068 dont_allow_type_definitions.
20069 * cp-tree.h: Likewise.
20070 * spew.c: Make sure cp-tree.h is included before parse.h, so the
20071 definition of flagged_type_tree is found before it is used.
20073 * parse.y: Added the ftype member to the type union, and changed a
20074 number of rules to use it instead of ttype. Added calls to
20075 check_for_new_type() as appropriate.
20076 * typeck2.c (check_for_new_type): New function for checking
20077 if a newly defined type appears in the specified tree.
20078 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
20079 for check_for_new_type().
20081 Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
20083 * decl2.c (finish_file): Only use a sentry if the decl is public.
20085 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
20086 don't pass LOOKUP_ONLYCONVERTING.
20088 Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
20090 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
20091 properly keeps track of const and volatile type modifiers.
20093 Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
20095 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
20096 * pt.c (comp_template_args): Use it.
20098 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
20099 assemble_external for artificial function decls.
20101 * decl.c (cp_finish_decl): Oops.
20103 Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
20105 * decl2.c (import_export_decl): Put static data member templates
20106 into common storage, or make them weak, depending on whether they
20107 are dynamically or statically initialized.
20108 (get_sentry): New function.
20109 (finish_file): Do import_export_decl for static data members before
20110 building the init/fini functions. Don't init/fini a variable that's
20111 EXTERNAL. Use a sentry for variables in common. Fix mismatching
20112 push/pop_temp_slots.
20113 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
20114 expand_static_init thang.
20115 * method.c (get_id_2): New function.
20117 Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
20119 * parse.y (empty_parms): Make sure we use C++-style prototypes
20120 when we're declaring member functions.
20122 Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
20124 * Makefile.in (CONFLICTS): 16 s/r conflicts.
20125 * parse.y (self_template_type): New nonterminal.
20127 Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
20129 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
20131 * parse.y (base_class.1): Allow 'typename foo::bar'.
20133 * lex.c (check_newline): Remove #pragma code that plays with the
20134 input stream, since we now deal with tokens. Clear nextchar when
20136 (handle_cp_pragma): Use real_yylex.
20137 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
20140 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
20142 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
20144 Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
20146 * parse.y: New token SELFNAME for potential constructor.
20147 * spew.c (yylex): Handle it.
20148 * lex.c (identifier_type): Produce it.
20150 * parse.y (complete_type_name): In :: case, don't push class binding.
20151 (complex_type_name): Likewise.
20153 Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
20155 * typeck.c (build_reinterpret_cast): Handle pointer to member
20158 Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20160 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
20162 (check_newline): Put the vtable/unit/implementation/interface pragma
20163 code into handle_cp_pragma, replacing it with a call.
20164 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
20165 args. Get the next token after handling the pragma token.
20167 Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
20169 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
20170 (convert_to_pointer_force): Likewise.
20172 * init.c (build_new): Fix array new without -fcheck-new.
20174 Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
20176 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
20177 tree.c: Lose TYPE_NESTED_NAME.
20179 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
20182 * tree.def: Add VEC_INIT_EXPR.
20183 * expr.c (cplus_expand_expr): Handle it.
20184 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
20185 the extra file-scope symbol nastiness.
20187 Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
20189 * method.c (make_thunk): Thunks are static.
20190 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
20192 * decl2.c (mark_vtable_entries): Emit thunks as needed.
20193 (finish_file): Don't emit them here.
20195 Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
20197 * rtti.c (build_dynamic_cast): Handle null pointers.
20198 (ifnonnull): New function.
20200 Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
20202 * call.c (build_method_call): Remember the original basetype we
20203 were called with. Give an error message instead of trying
20204 (incorrectly) to call a non-static member function through a
20205 non-inherited class.
20207 * search.c (expand_upcast_fixups): Mark the new fixup as
20210 Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
20212 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
20214 * class.c (set_rtti_entry): Fix for thunks.
20216 * decl2.c (import_export_decl): Still emit typeinfo fns for
20217 cv-variants of builtin types.
20219 * rtti.c (expand_class_desc): Set up base_info_type_node here.
20220 (init_rtti_processing): Instead of here.
20222 Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
20224 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
20225 (build_typeid): Only complain about taking dynamic typeid without
20228 * decl2.c: flag_rtti defaults to 1.
20230 * rtti.c (get_tinfo_var): The general class case is now smaller.
20231 (init_rtti_processing): Pack the latter three fields of base_info
20234 Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
20236 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
20238 Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
20240 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
20241 (push_memoized_context): Split out code to undefer pop_type_level to
20242 (clear_memoized_cache): here.
20243 (pop_memoized_context): We can only handle one layer of deferral of
20244 pop_type_level so clear the cache, if there was a previous level.
20246 Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
20248 * rtti.c (init_rtti_processing): Build up base_info_type_node.
20249 (expand_class_desc): Use one pointer to an array of base_info
20250 structs, passed using a CONSTRUCTOR.
20252 Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
20254 * class.c (build_vbase_path): Remove block extern for
20255 flag_assume_nonnull_objects here.
20256 (build_vfn_ref): Split out functionality into build_vtbl_ref.
20257 (build_vtbl_ref): New routine.
20258 (build_vtable): Set up rtti info here.
20259 (add_virtual_function): Note in CLASSTYPE_RTTI the best
20260 place where we can get the rtti pointers from to avoid having to
20261 search around for a place.
20262 (finish_base_struct): Likewise.
20263 (finish_struct_1): Likewise. Never create totally new vtables
20264 with totally new vtable pointers for rtti. Disable code to layout
20265 vtable pointers better until we want to break binary
20267 * rtti.c (build_headof_sub): New routine to convert down to a
20268 sub-object that has an rtti pointer in the vtable.
20269 (build_headof): Use it. Also, use build_vtbl_ref now to be more
20271 (build_dynamic_cast): Make sure we have saved it, if we need to.
20272 * search.c (dfs_init_vbase_pointers): Disable code that deals with
20273 a more efficient vtable layout, enable later.
20274 * call.c (flag_assume_nonnull_objects): Moved declaration to
20275 * cp-tree.h: here. Declare build_vtbl_ref.
20276 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
20277 function calls that want a tree.
20279 Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
20281 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
20282 other X subobjects in the most derived type. Ack.
20284 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
20285 get_typeid will do it for us.
20286 (get_typeid_1): Break out call-building for expand_*_desc to use.
20287 (get_typeid): Call it.
20288 (expand_*_desc): Likewise.
20289 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
20291 (init_decl_processing): Lose builtin_type_tdescs lossage.
20292 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
20294 Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
20296 * pt.c (tsubst): When calling set_nested_typename, use
20297 TYPE_NESTED_NAME (current_class_type) instead of
20298 current_class_name.
20300 * decl.c (pushdecl): Likewise.
20301 (pushdecl_class_level): Likewise.
20302 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
20303 set_nested_typename.
20305 Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
20307 * rtti.c (synthesize_tinfo_fn): Handle arrays.
20309 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
20311 Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
20313 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
20314 (init_rtti_processing): Lose bad_cast_type.
20315 (build_dynamic_cast): Use throw_bad_cast.
20317 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
20319 * decl2.c (finish_file): Don't synthesize artificial functions
20320 that are external and not inline.
20322 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
20324 * decl2.c (finish_file): Handle having new inlines added to
20325 saved_inlines by synthesis.
20327 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
20329 Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
20331 RTTI rewrite to initialize nodes as needed, not require that
20332 users #include <typeinfo>, complete functionality and reduce wasted
20334 * rtti.c (init_rtti_processing): New fn.
20335 (build_typeid): The vtable entry is now a function.
20336 (get_tinfo_var): New fn.
20337 (get_tinfo_fn): Likewise.
20338 (get_typeid): Use it.
20339 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
20340 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
20342 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
20343 (synthesize_tinfo_fn): New fn.
20344 * method.c (build_t_desc_overload): Lose.
20345 (build_overload_with_type): More generic.
20346 * decl.c (init_decl_processing): Call init_rtti_processing.
20347 * class.c (set_rtti_entry): Use get_tinfo_fn.
20348 * decl2.c (mark_vtable_entries): Mark the rtti function.
20349 (finish_prevtable_vardecl): Don't build_t_desc.
20350 (import_export_decl): Handle tinfo functions.
20351 (finish_file): Likewise.
20352 * typeck.c (inline_conversion): New fn.
20353 (build_function_call_real): Use it.
20354 * cp-tree.h: Add decls.
20356 * method.c (hack_identifier): Also convert component_refs from
20359 * lex.c (cons_up_default_function): Use the type, not the name, in
20362 * decl2.c (import_export_vtable): Fix weak vtables.
20364 Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
20366 * search.c (get_base_distance_recursive): Fix access checks for
20369 Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20371 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
20373 (convert_harshness): Add prototypes wrapped by PROTO.
20374 * decl2.c (grok_function_init): Likewise.
20375 (do_toplevel_using_decl): Change to void return type.
20376 * class.c (build_vtable_entry): Remove decl of make_thunk.
20377 (merge_overrides): Fix order of arg definitions.
20378 (finish_vtbls): Likewise.
20379 (fixup_vtable_deltas): Likewise.
20380 (modify_all_direct_vtables): Likewise.
20381 (modify_all_indirect_vtables): Likewise.
20382 * search.c (get_base_distance_recursive): Likewise.
20383 (get_abstract_virtuals_1): Likewise.
20384 (fixup_virtual_upcast_offsets): Likewise.
20385 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
20386 * init.c (perform_member_init): Fix order of arg definitions.
20387 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
20388 * cp-tree.h (make_thunk): Add decl.
20389 (overload_template_name, push_template_decl): Add decls.
20390 (do_toplevel_using_decl): Change to void return type.
20391 (vec_binfo_member): Add decl.
20393 Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20395 * typeck.c (mark_addressable, convert_for_assignment,
20396 convert_for_initialization, pointer_int_sum, pointer_diff,
20397 unary_complex_lvalue): Add prototypes wrapped by PROTO.
20398 (convert_sequence): #if 0 fn decl, since definition also is.
20400 Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
20402 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
20403 cast to pointer types for type searching.
20405 Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20407 * typeck.c (get_delta_difference): Use cp_error, not error, in the
20408 case where BINFO == 0.
20410 Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
20412 * call.c (build_method_call): Fix wording of error messages so
20413 constructors come out right.
20415 Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
20417 * decl.c (push_overloaded_decl): Don't warn about hidden
20418 constructors when both the type and the function are declared
20419 in a system header file.
20421 Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
20423 * class.c (finish_struct_1): Propagate the TYPE_PACKED
20424 flag for the type to the type's fields.
20426 Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20428 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
20430 Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
20432 * class.c (base_info, finish_base_struct): Replace
20433 needs_virtual_dtor with base_has_virtual.
20435 (finish_struct_1): Remove the old code that tried to make default
20436 destructors virtual. Use base_has_virtual when checking if we need
20437 to add a vtable entry for the rtti code.
20439 Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
20441 * pt.c (push_template_decl): Complain about template decl with
20442 inappropriate declaration.
20444 Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
20446 * typeck.c (build_x_unary_op): Remove bogus check for taking
20447 the address of a member function.
20449 Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
20451 * parse.y (constructor_declarator): Only push the class if
20452 we are not already in the class.
20454 Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
20456 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
20457 Add additional argument to INIT_CUMULATIVE_ARGS.
20459 Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
20461 * decl.c (shadow_tag): Fix error about anon union with methods.
20463 * parse.y (self_reference): Only generate a self-reference if this
20464 is a non-template class.
20465 (opt.component_decl_list): Only use it if it was generated.
20467 * parse.y (component_decl_1): Use constructor_declarator.
20468 (fn.def2): Likewise.
20469 (notype_component_declarator0): Likewise.
20471 Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
20473 * typeck.c (build_x_unary_op): Add checks for taking the address
20474 of a TARGET_EXPR or of a member function, and give appropriate
20477 Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
20479 * pt.c (process_template_parm): Allow template type parms to be
20480 used as types for template const parms.
20482 Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
20484 * init.c (expand_vec_init): Ensure the eh cleanups are on the
20487 Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
20489 * decl.c (lookup_name_real): Be even more picky about the
20490 ambiguous lookup warning.
20491 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
20492 * parse.y (constructor_declarator): Rather than here.
20494 * parse.y (constructor_declarator): New nonterminal.
20496 (explicit_instantiation): Likewise.
20498 Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
20500 Add implicit declaration of class name at class scope.
20501 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
20502 * parse.y (self_reference): New nonterminal.
20503 (opt.component_decl_list): Use it.
20504 (fn.def1): Add nested_name_specifier type_name cases.
20505 * class.c (build_self_reference): New function.
20506 (finish_struct): Handle access_default later, move self-reference
20508 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
20509 * cp-tree.h: Adjust.
20511 * pt.c (do_function_instantiation): Separate handling of member
20512 functions and non-member functions properly.
20514 Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
20516 * pt.c (process_template_parm): Improve error for 'volatile class K'.
20518 * class.c (finish_struct_1): Check the right slot for destructors.
20520 * decl.c (start_enum): Complain about enum templates.
20522 Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
20524 * init.c (resolve_offset_ref): Offset pointers to member data by one.
20525 * typeck.c (unary_complex_lvalue): Likewise.
20527 Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
20529 * typeck.c (c_expand_return): Check for a returned local
20530 array name, similar to the check for an ADDR_EXPR.
20532 Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
20534 * decl.c (cp_finish_decl): Don't build cleanups for static
20537 Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
20539 * typeck.c (build_modify_expr): Fix error messages to be more
20541 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
20542 assignment operators.
20543 * error.c (assop_as_string): Likewise. Add support for `%Q' for
20544 assignment operators.
20546 Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
20548 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
20549 give an error if initialized. pedwarn about nested type with the
20550 same name as its enclosing class.
20552 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
20554 * typeck.c (require_complete_type): Be sure to instantiate the
20555 MAIN_VARIANT of the type.
20557 * decl2.c (finish_file): Instantiate pending templates before
20558 processing static constructors and destructors.
20560 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
20563 Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
20565 * decl2.c (delete_sanity): If error_mark_node is passed
20566 in as an expression, quit while we're ahead.
20568 * decl.c (grokdeclarator): Give an error message if `friend'
20569 is combined with any storage class specifiers.
20571 Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
20573 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
20574 definition of nonexistent nested type.
20576 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
20577 not to say 'typedef'.
20579 Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20581 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
20582 * search.c (dfs_walk, dfs_init_vbase_pointers,
20583 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
20584 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
20586 Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
20588 * except.c (build_throw): Support minimal parse.
20589 * pt.c (tsubst_copy): Support THROW_EXPR.
20590 * decl2.c (build_expr_from_tree): Likewise.
20592 * pt.c (mangle_class_name_for_template): Always allocate
20595 Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
20597 * cvt.c (cp_convert_to_pointer): Give an appropriate error
20598 when trying to cast from an incomplete type.
20600 Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
20602 * pt.c (instantiate_class_template): Don't bother setting up
20603 CLASSTYPE_TAGS explicitly, as the nested types will add
20606 Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
20608 * decl.c (shadow_tag): Remove old error check for usage of
20609 an enum without a previous declaration.
20610 (xref_tag): Add error message about usage of enums without a
20611 previous declaration.
20613 Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
20615 * lex.c (do_identifier): Only do name consistency check if we're
20618 * pt.c (push_template_decl): Don't crash if we get a member defn
20619 that doesn't match.
20621 * decl.c (xref_tag_from_type): New function to do an xref without
20622 always having to figure out code_type_node.
20623 * cp-tree.h: Declare it.
20624 * pt.c (instantiate_class_template): Use it for friend classes.
20625 (lookup_template_class): Use it.
20627 * typeck2.c (build_functional_cast): Pull out a single parm before
20628 passing it to build_c_cast.
20630 Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
20632 * expr.c (do_case): Give an error message if a pointer is
20633 given as a case value.
20635 Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
20637 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
20640 * lex.c (cons_up_default_function): Really, now, interface hackery
20641 does not apply to synthesized methods.
20643 Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
20645 * call.c (build_method_call): Ctors and dtors now have special names
20646 with respect to lookups.
20647 * class.c (add_method): Likewise.
20648 (grow_method): Likewise.
20649 (finish_struct_methods): Likewise.
20650 (warn_hidden): Likewise.
20651 (finish_struct_1): Likewise.
20652 * cvt.c (convert_to_reference): Likewise.
20653 (convert_to_aggr): Likewise.
20654 (cp_convert): Likewise.
20655 * decl2.c (check_classfn): Likewise.
20656 * init.c (expand_member_init): Likewise.
20657 (expand_default_init): Likewise.
20658 (expand_aggr_init_1): Likewise.
20659 (build_offset_ref): Likewise.
20660 (build_new): Likewise.
20661 (build_delete): Likewise.
20662 * lex.c (do_inline_function_hair): Likewise.
20663 * search.c (lookup_field_1): Likewise.
20664 (lookup_fnfields_here): Likewise.
20665 (lookup_field): Likewise.
20666 (lookup_fnfields): Likewise.
20667 (get_virtual_destructor): Likewise.
20668 (dfs_debug_mark): Likewise.
20669 (dfs_pushdecls): Likewise.
20670 (dfs_compress_decls): Likewise.
20671 * tree.c (layout_basetypes): Likewise.
20672 * typeck.c (build_component_ref): Likewise.
20673 (build_x_function_call): Likewise.
20674 (build_modify_expr): Likewise.
20675 (convert_for_initialization): Likewise.
20676 (build_functional_cast): Likewise.
20677 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
20680 * decl.c (ctor_identifier): New.
20681 (dtor_identifier): New.
20682 (init_decl_processing): Set them.
20684 Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
20686 * typeck.c (build_component_ref): Don't get confused by fields whose
20687 context has no type name, like pointer to member functions.
20689 Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
20691 * decl.c (grokdeclarator): Handle typedef without declarator.
20693 * pt.c (tsubst): Handle SCOPE_REF in declarator.
20695 * parse.y (bad_parm): Catch another case of missing `typename'.
20697 * lex.c (yyprint): Handle TYPE_DECLs.
20699 * decl.c (start_function): Don't try to be clever.
20701 * lex.c: Lose compiler_error_with_decl.
20702 * typeck2.c: Lose error_with_aggr_type.
20703 (incomplete_type_error): Use cp_* instead of old functions.
20704 (readonly_error): Likewise.
20705 * typeck.c (convert_arguments): Likewise.
20706 * search.c (lookup_nested_field): Likewise.
20707 * method.c (make_thunk): Likewise.
20708 * decl.c (grokparms): Likewise.
20709 * cp-tree.h: Update.
20711 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
20714 Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
20716 * method.c (build_opfncall): When deleting a pointer to an
20717 array, build a new pointer to the tree past any ARRAY_TYPE
20720 Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20722 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
20724 Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
20726 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
20729 * decl.c (finish_function): Don't set nested based on
20730 hack_decl_function_context.
20731 * parse.y (function_try_block): Check for nested function.
20732 (pending_inlines): Likewise.
20734 * decl2.c (build_expr_from_tree): If a unary op already has a
20735 type, just return it.
20737 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
20739 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
20740 (finish_file): Check the return value of walk_vtables.
20741 (finish_prevtable_vardecl): Return int.
20742 (finish_vtable_vardecl): Likewise.
20743 (prune_vtable_vardecl): Likewise.
20744 * lex.c (set_vardecl_interface_info): Likewise.
20745 * cp-tree.h: Adjust return types.
20747 * class.c (delete_duplicate_fields_1): Don't complain about
20748 duplicate nested types if they're the same type.
20749 (finish_struct): Remove check for duplicate.
20750 * decl2.c (grokfield): Don't check for typedef of anonymous type.
20752 Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
20754 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
20756 * decl.c (grokdeclarator): Lose special handling of class-level
20757 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
20758 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
20760 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
20762 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
20764 * search.c (compute_access): Fix handling of anonymous union
20766 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
20767 from anonymous unions to their members.
20769 * typeck.c (build_x_function_call): For static member functions,
20770 hand off to build_member_call.
20772 Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
20774 * typeck.c (build_component_ref): Handle OFFSET_REFs.
20776 * init.c (expand_vec_init): Fix init == 0 case.
20778 Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
20780 * init.c (build_new): pedwarn about init and array new.
20781 (expand_vec_init): Handle lists, use convert_for_initialization.
20783 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
20784 when converting to an aggregate type.
20785 * cvt.c (cp_convert): Pass it through.
20787 * typeck.c (build_conditional_expr): Handle user-defined
20788 conversions to slightly different types.
20790 * decl.c (grokdeclarator): Force an array type in a parm to be
20793 * decl2.c (do_using_directive): Sorry.
20794 (do_namespace_alias): Likewise.
20795 * lex.c (real_yylex): Warn about using the `namespace' keyword.
20797 Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
20799 * parse.y (datadef): Move call to note_list_got_semicolon up.
20801 Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
20803 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
20805 Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
20807 * decl.c (cp_finish_decl): The exception regions have to be
20808 nested, not overlapping. We start the exception region for a
20809 decl, after it has been fully built, and all temporaries for it
20810 have been cleaned up.
20812 Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
20814 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
20816 Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
20818 * tree.def: Add RETURN_INIT.
20819 * pt.c (instantiate_decl): Handle RETURN_INIT.
20820 * decl.c (store_return_init): Handle minimal_parse_mode.
20822 * tree.c (cp_build_type_variant): Just return an error_mark_node.
20823 * decl.c (make_typename_type): Don't try to get the file and line
20825 * typeck.c (comptypes): Handle TYPENAME_TYPE.
20827 Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
20829 * decl.c (poplevel): Make sure we clear out and restore old local
20830 non-VAR_DECL values by default when they go out of scope.
20832 Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
20834 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
20835 referring to addresses of variables and functions.
20837 * error.c (dump_expr): Support SIZEOF_EXPR.
20839 * init.c (do_friend): Use the return value of check_classfn.
20841 * typeck.c (convert_arguments): Call complete_type.
20843 * method.c (hack_identifier): After giving an error, set value to
20846 Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
20848 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
20849 lossage for local classes.
20850 * cp-tree.h: Declare it.
20851 * decl.c (lookup_name_real): Evil, painful hack for local classes.
20852 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
20853 Use hack_decl_function_context.
20854 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
20855 (start_function): Use hack_decl_function_context.
20856 (finish_function): Likewise.
20857 * method.c (synthesize_method): Likewise.
20858 * lex.c (process_next_inline): Likewise.
20859 (do_pending_inlines): Likewise.
20860 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
20863 Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
20865 * sig.c (build_signature_pointer_or_reference_type): Align
20866 signature pointers/references on 8-byte boundaries so they can be
20867 grabbed 2 words at a time on a Sparc.
20869 Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
20871 * method.c (hack_identifier): Requiring a static chain is now a
20873 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
20876 Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
20878 * init.c (build_offset_ref): Call complete_type.
20880 * decl.c (pop_from_top_level): Always pop previous_class_type.
20882 * parse.y: Handle multiple decls in a for-init-statement.
20883 * pt.c (tsubst_expr): Likewise.
20885 * pt.c (tsubst): Use tsubst_expr for the second operand of an
20888 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
20889 (poplevel_class): Set it here.
20890 (pop_from_top_level): Pop it here if we're returning to class scope.
20891 * class.c (pushclass): Don't set it here.
20893 * decl.c (maybe_push_to_top_level): Save current_template_parms,
20894 and clear it if !pseudo.
20895 (pop_from_top_level): Restore it.
20897 * decl2.c (finish_file): Push the dummy each time we walk the list
20900 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
20901 something for CAST_EXPR.
20903 Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
20905 * cvt.c (cp_convert): Warn about implicit conversion of the
20906 address of a function to bool, as it is always true.
20908 Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
20910 * typeck.c (c_expand_return): Fix warning for local externs returned.
20912 Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
20914 * tree.c (mapcar): Propagate const and volatile properly.
20916 * typeck.c (complete_type): Be sure to instantiate the
20917 MAIN_VARIANT of the type.
20919 * method.c (synthesize_method): Class interface hackery does not
20920 apply to synthesized methods.
20922 Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
20924 * pt.c (comp_template_args): Use comptypes rather than just
20925 checking for TEMPLATE_TYPE_PARM equivalence.
20927 * typeck.c (build_x_function_call): Call complete_type before
20928 checking TYPE_OVERLOADS_CALL_EXPR.
20930 Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
20932 * g++.c (main): Check also for new define ALT_LIBM.
20934 Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
20936 * pt.c (instantiate_class_template): If we don't have a pattern
20938 (coerce_template_parms): If we see a local class, bail.
20940 * decl.c (grok_reference_init): Make sure there's a type before
20943 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
20944 (push_template_decl): Likewise.
20946 * parse.y (named_class_head): Set
20947 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
20949 * decl.c (xref_tag): Diagnose redeclaration of template
20950 type-parameter name.
20952 * error.c (dump_type): Handle anonymous template type parms.
20954 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
20956 (coerce_template_parms): Likewise.
20958 Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
20960 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
20961 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
20963 Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
20965 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
20966 before trying to get its STUB_DECL.
20967 (coerce_template_parms): Likewise.
20969 * parse.y (template_type_parm): If they didn't use 'class',
20970 pretend they did after giving an error.
20972 * pt.c (coerce_template_parms): Diagnose use of local class.
20974 * decl.c (grok_reference_init): Use instantiate_type.
20976 * error.c (dump_expr): Handle TEMPLATE_DECLs.
20978 * parse.y (named_class_head): Diagnose mismatching types and tags.
20980 * decl.c (pushdecl): Type decls and class templates clash with
20981 artificial type decls, not hide them.
20983 * decl.c (redeclaration_error_message): Diagnose redefinition of
20984 templates properly.
20985 (duplicate_decls): Diagnose disallowed overloads for template
20988 * decl.c (start_decl): Call complete_type before checking for a
20991 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
20993 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
20995 Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
20997 * decl.c (grok_op_properties): Don't check for operator++(int) in
21000 * tree.c (perm_manip): Return a copy of variable and function
21001 decls with external linkage.
21003 * tree.def: Change some of the min tree codes to type "1".
21004 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
21005 * method.c (build_overload_int): Emit something arbitrary for
21006 anything but an INTEGER_CST if we're in a template.
21008 * decl.c (cp_finish_decl): Call complete_type before deciding
21009 whether or not to lay out the decl.
21011 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
21013 Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
21015 * typeck2.c (build_x_arrow): Call complete_type.
21017 * pt.c (add_pending_template): Broken out.
21018 (lookup_template_class): If -fexternal-templates, call it for all
21019 the methods of implemented types.
21020 (instantiate_class_template): Instead of instantiating them here.
21021 (instantiate_decl): Handle -fexternal-templates earlier.
21023 Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21025 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
21026 memoized lookup stuff inside GATHER_STATISTICS.
21028 Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
21030 * decl.c (start_decl): Complain about array of incomplete type
21032 (grokdeclarator): Not here.
21034 * parse.y (template_parm): Expand full_parm inline so we can set
21035 the rule's precedence.
21037 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
21038 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
21039 * decl2.c (grokbitfield): Don't check for integer constant here.
21040 * class.c (finish_struct_1): Check here.
21042 * decl.c (define_label): Make the min decl go on permanent_obstack.
21044 * pt.c (unify): Don't handle CONST_DECLs.
21045 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
21046 (tsubst_copy): Likewise.
21048 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
21049 CONST_DECL for a template parm.
21051 Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
21053 * decl.c (grokdeclarator): Complain about array of incomplete type
21055 (start_decl_1): Not here.
21057 * pt.c (tsubst): Handle pointer-to-function declarators.
21059 * method.c (hack_identifier): If pedantic, diagnose local class
21060 methods that require a static chain.
21062 * decl.c (grok_op_properties): No longer static.
21063 * cp-tree.h: Declare it.
21064 * pt.c (tsubst): Call it for operators.
21065 Use tsubst_copy for TREE_VECs.
21067 * parse.y (template_arg): The expr has precedence like '>'.
21069 Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
21071 * pt.c (coerce_template_parms): Don't coerce an expression using
21073 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
21074 (tsubst): Don't use build_index_2_type if the max_value uses template
21076 * method.c (build_overload_int): Emit something arbitrary for an
21077 expression using template parms.
21079 * parse.y (template_close_bracket): New non-terminal to catch use
21080 of '>>' instead of '> >' in template class names.
21081 (template_type): Use it.
21082 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
21084 * tree.def: Add CAST_EXPR.
21085 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
21086 CONVERT_EXPR for minimal_parse_mode.
21087 * typeck.c (build_c_cast): Likewise.
21088 * pt.c (tsubst_copy): Likewise.
21089 * decl2.c (build_expr_from_tree): Likewise.
21090 * error.c (dump_expr): Likewise.
21092 Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21094 * except.c (SetTerminate, SetUnexpected): Put back global vars.
21095 (init_exception_processing): Put back decl/init of
21096 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
21097 fns from libstdc++.
21099 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
21100 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
21102 * cp-tree.h (declare_uninstantiated_type_level,
21103 uninstantiated_type_level_p): Delete prototypes.
21105 Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
21107 * pt.c (tsubst_expr): Add default return.
21109 Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21111 * error.c (fndecl_as_string): Delete unused arg CNAME.
21112 * sig.c (build_signature_table_constructor,
21113 build_signature_method_call): Fix calls.
21115 * class.c (the_null_vtable_entry): Delete var definition.
21116 (init_class_processing): Delete tree the_null_vtable_entry init.
21117 * decl.c (no_print_{functions, builtins}): Declare as static.
21118 (__tp_desc_type_node): #if 0 var definition.
21119 (init_type_desc): #if 0 init of __tp_desc_type_node.
21120 (vb_off_identifier): Move var decl into init_decl_processing.
21121 (current_function_assigns_this): Declare as static.
21122 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
21123 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
21124 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
21125 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
21126 * init.c (BI_header_type, BI_header_size): Declare as static.
21127 * pt.c (template_classes): Delete unused var.
21128 (add_pending_template): Delete decl for non-existent fn.
21129 (lookup_template_class): Delete vars CODE and TAG_CODE.
21130 (instantiate_template): Delete unused var TARGS.
21131 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
21133 (__tp_desc_type_node): #if 0 var decl.
21134 (fndecl_as_string): Fix prototype.
21136 Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
21138 * tree.def: Add GOTO_STMT.
21139 * pt.c (tsubst_expr): Support goto and labels.
21140 * decl.c (define_label): Support minimal parsing.
21141 * parse.y (simple_stmt): Likewise.
21143 Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21145 * xref.c (GNU_xref_member): Only define/set var I if
21146 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
21148 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
21149 (GNU_xref_end): Fix call.
21150 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
21151 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
21153 * tree.c (build_exception_variant): Delete unused vars I, A, T,
21155 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
21156 (mapcar): Delete unused var CODE.
21157 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
21158 (break_out_cleanups): Fix call.
21159 (bot_manip): Likewise.
21160 * call.c (build_method_call): Likewise.
21161 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
21163 * typeck.c (unary_complex_lvalue, build_modify_expr,
21164 convert_for_initialization): Likewise.
21165 * typeck2.c (build_functional_cast): Likewise.
21166 * cp-tree.h (build_cplus_new): Fix prototype.
21168 * repo.c (open_repo_file): Delete unused var Q.
21169 (repo_compile_flags, repo_template_declared,
21170 repo_template_defined, repo_class_defined, repo_inline_used,
21171 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
21172 (repo_get_id, repo_vtable_used): Declare as static.
21173 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
21176 Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
21178 * parse.y (pending_inlines): Add function_try_block case.
21180 * pt.c (unify): Fix for template const parms.
21182 Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21184 * lex.c (extract_interface_info): Delete forward decl.
21185 (default_copy_constructor_body, default_assign_ref_body): Delete
21186 decls for non-existent functions.
21187 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
21188 (init_lex): Delete setting them.
21189 (cons_up_default_function): Delete unused vars FUNC_BUF,
21190 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
21191 #if 0'd synth code.
21192 (toplevel, expression_obstack): Delete unused extern decls.
21193 (tree_node_kind): Delete unused enum.
21194 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
21196 (tree_node_kind_names): Delete unused extern decl.
21197 (synth_obstack): Delete unused var.
21198 (init_lex): Don't set it.
21199 (init_parse): Add decl before use.
21200 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
21201 (current_unit_{name, language}): Delete unused vars.
21202 (check_newline): Don't bother setting them, just accept the #pragma.
21203 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
21204 (current_unit_{name, language}): Delete decls.
21206 * search.c: Wrap all of the memoized functions, macros, and
21207 variables inside #ifdef GATHER_STATISTICS.
21208 (lookup_field, lookup_fnfields): Likewise.
21209 (init_search_processing): Likewise.
21210 (reinit_search_statistics): Wrap whole function.
21211 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
21213 * decl.c (finish_function): Only call pop_memoized_context if
21214 GATHER_STATISTICS is defined.
21215 (start_function): Likewise for push_memoized_context.
21216 * class.c (pushclass, popclass): Likewise.
21218 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
21219 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
21221 * cvt.c (cp_convert): Delete unused local var FORM.
21222 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
21225 Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
21227 * pt.c (do_poplevel): Oops; really return what we get from
21228 poplevel this time.
21230 Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21232 * cp-tree.h (is_aggr_type): Add prototype.
21234 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
21235 * method.c ({push,pop}_cp_function_context): Delete decls.
21236 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
21237 (SetUnexpected, SetTerminate): Delete unused vars.
21238 (init_exception_processing): Don't set SetUnexpected or
21239 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
21240 (output_exception_table_entry): Delete unused array LABEL.
21241 (expand_internal_throw): Delete unused var PARAMS.
21242 (expand_start_catch_block): Delete unused var CLEANUP.
21243 (emit_exception_table): Delete unused var EH_NODE_DECL.
21244 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
21245 GOTO_UNWIND_AND_THROW. Don't set them.
21246 (end_eh_unwinder): Add top decl.
21247 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
21248 (exception_section, push_rtl_perm, do_function_call,
21249 lang_interim_eh, push_eh_cleanup, eh_outer_context,
21250 expand_end_eh_spec, end_eh_unwinder): Declare as static.
21251 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
21252 throw_used): Likewise.
21253 * cp-tree.h (expand_end_eh_spec): Delete prototype.
21255 * search.c (dfs_mark, dfs_mark_vtable_path,
21256 dfs_unmark_vtable_path, dfs_mark_new_vtable,
21257 dfs_unmark_new_vtable, dfs_clear_search_slot,
21258 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
21259 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
21260 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
21262 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
21263 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
21264 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
21265 Only define #ifdef GATHER_STATISTICS.
21266 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
21268 (vbase_decl): Delete var definition.
21269 (init_search): Delete old decl.
21270 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
21271 never actually used.
21272 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
21273 (get_base_distance_recursive): Delete unused fourth arg
21274 BASETYPE_PATH. Fix call .
21275 (get_base_distance): Fix call.
21276 (push_class_decls): Delete unused var ID.
21277 (make_memoized_table_entry): Declare as static.
21278 (breadth_first_search): Declare as static.
21279 (tree_has_any_destructor_p): Declare as static.
21280 (pop_class_decls): Delete unused arg pop_class_decls.
21281 * class.c (popclass): Fix call to pop_class_decls.
21282 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
21283 tree_has_any_destructor_p): Delete prototypes.
21285 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
21286 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
21287 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
21288 (build_user_desc): Delete unused var T.
21289 (build_class_desc): Delete unused vars T and OFF.
21290 (build_t_desc): Delete unused var NAME_STRING.
21291 (build_headof): Make static.
21292 (get_bad_cast_node): Likewise.
21293 (get_def_to_follow): Likewise.
21294 * cp-tree.h (init_type_desc): Add prototype.
21295 (build_headof): Remove prototype.
21297 Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
21299 * pt.c (tsubst): Only look for matching decls at file scope for
21300 non-member functions.
21302 * call.c (build_scoped_method_call): Handle scoped destructor
21303 calls in templates.
21305 * decl.c (*_top_level): Also save previous_class_values.
21307 * pt.c (tsubst_expr): Support do {} while loops.
21308 * parse.y (simple_stmt): Likewise.
21309 * tree.def: Likewise.
21311 * method.c (build_overload_identifier): For a class nested in a
21312 template class, don't mangle in the template parms from our
21315 * lex.c, cp-tree.h: Remove support for template instantiations in
21316 the pending_inlines code.
21317 * pt.c: Remove dead functions and unused arguments.
21318 (uses_template_parms): TYPENAME_TYPEs always use template parms.
21319 * parse.y: Stop passing anything to end_template_decl.
21320 * tree.c (print_lang_statistics): Only print tinst info #ifdef
21323 Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21325 * init.c (expand_recursive_init{,_1}): Delete decls.
21326 (sort_member_init): Delete unused var INIT.
21327 (emit_base_init): Delete unused var X.
21328 (build_offset_ref): Delete unused var CNAME.
21329 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
21330 (emit_base_init): Delete unused local var BASE. Delete extern
21331 decl of IN_CHARGE_IDENTIFIER.
21332 (build_delete): Delete unused local var VIRTUAL_SIZE.
21334 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
21335 (build_delete): Fix call.
21336 * decl2.c (delete_sanity): Likewise.
21337 * cp-tree.h (build_vec_delete): Update prototype.
21339 * typeck.c (common_base_type): Delete unused var TMP.
21340 (build_binary_op): Delete local var ARGS_SAVE.
21341 (build_array_ref): Delete unused var ITYPE.
21342 (c_expand_return): Delete unused var USE_TEMP.
21344 * typeck.c (compexcepttypes): Delete unused arg STRICT.
21345 (comptypes): Fix calls.
21346 * decl.c (duplicate_decls): Likewise.
21347 * cp-tree.h (compexcepttypes): Delete extra arg.
21349 * decl2.c (check_classfn): Delete unused second arg CNAME.
21350 * decl.c (start_decl, grokfndecl): Fix calls.
21351 * init.c (do_friend): Likewise.
21352 * cp-tree.h (check_classfn): Update prototype.
21354 * cp-tree.h (signature_error, import_export_vtable,
21355 append_signature_fields, id_in_current_class, mark_used,
21356 copy_assignment_arg_p): Add decls.
21357 * decl2.c (mark_used): Delete decl.
21359 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
21361 * class.c (get_vtable_entry): Disable unused function.
21362 (doing_hard_virtuals): Delete unused static global var.
21363 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
21364 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
21365 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
21366 (modify_one_vtable): Delete unused var OLD_RTTI.
21367 (finish_struct_anon): Delete unused vars OFFSET and X.
21368 (finish_struct_bits): Delete unused var METHOD_VEC.
21369 (get_basefndecls): Delete unused var PURPOSE. Delete unused
21370 for-scope local variable METHODS.
21372 * call.c (user_harshness): Delete unused/unneeded arg PARM.
21373 (ideal_candidate): Delete unused args BASETYPE and PARMS.
21374 (build_method_call): Delete unused args passed into ideal_candidate.
21375 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
21376 * cp-tree.h (synthesize_method): Add decl.
21378 * decl.c (note_level_for_for): Give void return type.
21379 (pushdecl_nonclass_level): Likewise.
21380 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
21381 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
21382 (suspend_binding_level): Delete unused var LEVEL.
21383 (duplicate_decls): Delete unused var CTYPE.
21384 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
21385 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
21387 (grokdeclarator): Delete unused var C.
21388 (grokdeclarator): Delete unused var SIZE_VARIES.
21389 (grokparms): Delete unused var SAW_VOID.
21390 (start_function): Delete unused var OLDDECL.
21391 (cplus_expand_expr_stmt): Delete unused var
21392 REMOVE_IMPLICIT_IMMEDIATELY.
21394 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
21396 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
21398 Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
21400 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
21401 (build_min_nt): Likewise.
21402 * pt.c (do_pushlevel): Emit line note.
21403 (do_poplevel): Return what we get from poplevel.
21404 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
21405 * parse.y: Use do_pushlevel and do_poplevel.
21406 * cp-tree.h: Declare do_poplevel.
21408 * cp-tree.h: Declare at_eof.
21409 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
21410 * decl2.c (import_export_decl): Renamed from import_export_inline.
21411 (finish_file): Call it to do interface handling for statics.
21412 * pt.c (tsubst_copy): Call mark_used on variables and functions
21415 * decl2.c (finish_file): Don't emit statics we can't generate.
21416 * pt.c (instantiate_decl): Don't set interface on instantiations
21419 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
21420 * tree.c (print_lang_statistics): Print max template depth.
21421 * pt.c (push_tinst_level): Dump entire instantiation context.
21422 (instantiate_class_template): Use it and pop_tinst_level.
21423 (instantiate_decl): Likewise.
21425 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
21426 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
21428 Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
21430 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
21431 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
21432 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
21433 the new template implementation.
21435 Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21437 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
21439 Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
21441 * decl.c (cp_finish_decl): Delay emitting the debug information for
21442 a typedef that has been installed as the canonical typedef, if the
21443 type has not yet been defined.
21445 Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
21447 * decl2.c (grokfield): Still call pop_nested_class for access decls.
21449 Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21451 * decl.c (lookup_label): Call label_rtx.
21453 * decl.c (make_binding_level): New function.
21454 (pushlevel, pushlevel_class): Call it instead of explicit
21455 duplicate calls to xmalloc.
21457 * decl.c (init_decl_processing): Delete useless build_pointer_type
21460 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
21461 (sizet_ftype_string): Delete variable.
21462 (init_decl_processing): Add built-in functions fabsf, fabsl,
21463 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
21464 variable strlen_ftype, used for strlen.
21466 Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
21468 * decl.c (push_to_top_level): Start from current_binding_level
21469 again for now; the stl hacks depend on g++ being broken in this
21470 way, and it'll be fixed in the template rewrite.
21472 * tree.def: Add USING_DECL.
21473 * decl2.c (do_class_using_decl): Implement.
21474 (grokfield): Pass access decls off to do_class_using_decl instead of
21476 * error.c (dump_decl): Handle USING_DECLs.
21477 * decl.c (grokdeclarator): Remove code for handling access decls.
21478 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
21479 as access decls for now.
21480 (finish_struct): Don't check USING_DECLs for other uses of the name.
21482 * search.c (get_matching_virtual): Use cp_error_at.
21484 Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21486 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
21488 (self_promoting_args_p): Move the check that TYPE is non-nil
21489 before trying to look at its main variant.
21490 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
21492 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
21494 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
21495 (do_friend): Delete call to xref_friend.
21496 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
21498 * typeck.c (convert_sequence): #if 0 unused function.
21500 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
21501 be in decl_in_memory_p.
21502 (decl_in_memory_p): Delete decl.
21503 * expr.c (decl_in_memory_p): Delete fn.
21504 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
21506 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
21508 Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
21510 * class.c (finish_struct_1): Check for a pure-specifier on a
21511 non-virtual function here.
21513 * decl2.c (grok_function_init): Don't check whether the function
21515 (grokfield): Don't call check_for_override here.
21517 * decl.c (push_to_top_level): Start from inner_binding_level,
21518 check class_shadowed in class levels.
21520 Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
21522 * decl.c (resume_level): Ignore things that don't have names, instead
21525 Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21527 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
21529 Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
21531 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
21534 * parse.y (complete_type_name): Bind global_scope earlier.
21535 (complex_type_name): Likewise.
21536 (qualified_type_name): Remove.
21538 Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
21540 * decl.c (grokfndecl): Move code that looks for virtuals in base
21542 * class.c (check_for_override): ... to a new function.
21543 (finish_struct_1): Call it.
21545 * cp-tree.h: Declare warn_sign_compare.
21547 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
21548 rather than extra_warnings to decide whether to warn about
21549 comparison of signed and unsigned.
21551 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
21552 implies -Wsign-compare. -Wall doesn't imply -W.
21554 Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
21556 * typeck.c (build_component_ref): Fix to handle anon unions in base
21559 Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21561 * class.c (resolves_to_fixed_type_p): Delete code dealing with
21562 a WITH_CLEANUP_EXPR, since we don't generate them any more.
21563 * cvt.c (build_up_reference): Likewise.
21564 * decl.c (grok_reference_init): Likewise.
21565 (cp_finish_decl): Likewise.
21566 * error.c (dump_expr): Likewise.
21567 * tree.c (real_lvalue_p): Likewise.
21568 (lvalue_p): Likewise.
21569 (build_cplus_new): Likewise.
21570 (unsave_expr_now): Likewise.
21571 * typeck.c (unary_complex_lvalue, build_modify_expr,
21572 c_expand_return): Likewise.
21574 Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21576 Make the C++ front-end pay attention to attributes for structures.
21577 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
21579 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
21580 Take out old round_up_size use and setting the DECL_ALIGN possibly
21581 using it. Take out setting of TYPE_ALIGN to round_up_size, which
21582 can override what the attribute set.
21583 * cp-tree.h (finish_struct): Update prototype.
21584 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
21585 attributes to finish_struct.
21586 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
21587 value down into finish_struct.
21588 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
21590 Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
21592 * decl.c (poplevel): Re-word dead for local handling.
21593 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
21594 (cp_finish_decl): If is_for_scope, check for duplicates so
21595 we can disable is_for_scope. Otherwise, preserve_temp_slots.
21597 * lex.c (do_identifier): Use global binding in preference of
21598 dead for local variable.
21600 Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
21602 * init.c (initializing_context): Handle anon union changes, the
21603 context where fields of anon unions can be initialized now has to be
21604 found by walking up the TYPE_CONTEXT chain.
21606 Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
21608 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
21609 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
21610 (obscure_complex_init): If bss is supported, always set
21611 DECL_INITIAL to error_mark_node.
21613 Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21615 * init.c (is_friend): Make sure there's a context before we see if
21618 Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
21620 * init.c (is_friend): Classes are not friendly with nested classes.
21622 Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
21624 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
21625 and record its result.
21627 Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
21629 * class.c (finish_struct_anon): Switch around code to not move anon
21630 union elements around, nor mess up their contexts, nor offsets,
21631 instead we now build up the right number of COMPONENT_REFs for all
21632 the anon unions that may be present at build_component_ref time.
21633 * typeck.c (lookup_anon_field): New routine to handle field lookup
21634 on fields without names. We find them, based upon their unique type
21636 * typeck.c (build_component_ref): Allow FIELD_DECL components.
21637 Handle finding components in anonymous unions, and ensure that a
21638 COMPONENT_REF is built for each level as necessary.
21640 Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
21642 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
21643 code that ensures that copy ctors are used if appropriate.
21645 Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21647 * init.c (build_vec_delete): Only give an error if base isn't an
21650 Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
21652 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
21653 (yylex): If we see `new', keep slurping.
21655 Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
21657 * class.c (finish_struct_1): Move code for handling anon unions...
21658 (finish_struct_anon): to here. Fixup so that we do the offset
21659 calculations right, and so that the fields are physically moved to
21660 the containers's chain.
21662 Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21664 * decl.c (grokdeclarator): Avoid trying to get an operand off an
21667 Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
21669 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
21670 POINTER_SIZE to agree with expr.c.
21672 Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
21674 * search.c (lookup_field): Don't report ambiguities if protect is 0,
21675 instead return NULL_TREE.
21677 Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
21679 * class.c (finish_struct_1): Call warn_hidden if we want warnings
21680 about overloaded virtual functions.
21681 (warn_hidden): New routine to warn of virtual functions that are
21682 hidden by other virtual functions, that are not overridden.
21683 (get_basefndecls): New routine, used by warn_hidden.
21684 (mark_overriders): New routine, used by warn_hidden.
21685 * search.c (get_matching_virtual): Remove old warning that just
21688 Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21690 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
21692 * typeck.c (null_ptr_cst_p): Delete unused fn.
21693 (build_function_call_maybe): Delete unused fn.
21695 * expr.c (extract_init): #if 0 the code after unconditional return 0
21698 Delete old cadillac code.
21699 * edsel.c: Remove file.
21700 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
21701 * Makefile.in (CXX_OBJS): Delete edsel.o.
21702 (edsel.o): Delete rule.
21703 * cp-tree.h (flag_cadillac): Delete var decl.
21704 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
21705 * decl2.c (flag_cadillac): Delete var definition.
21706 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
21707 (grokfield): Delete code depending on flag_cadillac.
21708 (finish_anon_union): Likewise.
21709 * class.c (finish_struct_1): Likewise.
21710 (pushclass): Likewise.
21711 (popclass): Likewise.
21712 (push_lang_context): Likewise.
21713 (pop_lang_context): Likewise.
21714 * decl.c (init_decl_processing): Likewise.
21715 (start_decl): Likewise.
21716 (cp_finish_decl): Likewise.
21717 (xref_tag): Likewise.
21718 (finish_enum): Likewise.
21719 (start_function): Likewise.
21720 (finish_function): Likewise.
21721 (finish_stmt): Likewise.
21722 * lex.c (lang_init): Likewise.
21723 (check_newline): Likewise.
21725 * lex.c (do_pending_inlines): Delete synthesized method kludge.
21727 Delete defunct, ancient garbage collection implementation.
21728 * rtti.c: New file with the RTTI stuff from gc.c.
21729 * gc.c: Removed file (moved the remaining stuff into rtti.c).
21730 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
21731 (rtti.o): New rule, replacing gc.o.
21732 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
21733 * cp-tree.h: Delete gc-related fn decls.
21734 (DECL_GC_OFFSET): Delete macro.
21735 (flag_gc): Delete extern decl.
21736 * decl.c (current_function_obstack_index): Delete var decl.
21737 (current_function_obstack_usage): Delete var decl.
21738 (start_function): Delete clearing of current_function_obstack_index
21739 and current_function_obstack_usage.
21740 (init_decl_processing): Delete code relying on -fgc.
21741 Delete call to init_gc_processing.
21742 (cp_finish_decl): Delete calls to build_static_gc_entry and
21743 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
21744 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
21745 and to expand_expr of a __gc_main call.
21746 (maybe_gc_cleanup): Delete var decl.
21747 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
21748 * decl2.c (flag_gc): Delete var decl.
21749 (lang_f_options): Delete offering of -fgc.
21750 (lang_decode_option): Delete -fgc and -fno-gc handling.
21751 (get_temp_regvar): Delete gc code.
21752 * init.c (build_new): Delete gc code.
21753 * lex.c (init_lex): Delete checking of flag_gc.
21755 * typeck.c (convert_arguments): Delete gc code.
21756 (build_component_addr): Delete -fgc warning.
21757 (build_modify_expr): Delete gc code.
21759 * decl2.c (build_push_scope): Delete fn.
21760 * cp-tree.h (build_push_scope): Delete decl.
21762 * search.c (clear_search_slots): Delete fn.
21763 * cp-tree.h (clear_search_slots): Delete decl.
21765 * search.c (tree_needs_constructor_p): Delete fn.
21766 * cp-tree.h (tree_needs_constructor_p): Delete decl.
21768 * tree.c (id_cmp): Delete fn.
21770 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
21771 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
21773 * tree.c (decl_value_member): Delete fn.
21774 * cp-tree.h (decl_value_member): Delete decl.
21776 * tree.c (list_hash_lookup_or_cons): Delete fn.
21777 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
21779 * method.c (cplus_exception_name): Delete fn.
21780 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
21782 * spew.c (shift_tokens): Delete fn.
21784 Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
21786 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
21788 * parse.y: Likewise.
21790 Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21792 * tree.c (build_cplus_staticfn_type): Delete function definition;
21794 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
21796 * tree.c (virtual_member): Delete function definition; never used.
21797 * cp-tree.h (virtual_member): Delete decl.
21799 Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
21801 * typeck.c (build_component_ref): Handle getting vbase pointers
21802 out of complex multiple inheritance better.
21804 Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
21806 * typeck.c (build_object_ref): Make sure we use the real type, not
21807 any reference type.
21809 Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
21811 * tree.c (build_exception_variant): Don't create new types if we
21812 don't have to, also build new types on the right obstack.
21814 Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
21816 * decl.c (store_bindings): Split out from push_to_top_level.
21817 (push_to_top_level): Call it for b->type_shadowed on class binding
21820 Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
21822 * search.c (expand_upcast_fixups): Fix so that offsets stored in
21823 vbase_offsets are always right. Fixes a problem where virtual base
21824 upcasting and downcasting could be wrong during conversions on this
21825 during virtual function dispatch at ctor/dtor time when dynamic
21826 vtable fixups for deltas are needed. This only sounds easier than
21828 (fixup_virtual_upcast_offsets): Change to reflect new calling
21829 convention for expand_upcast_fixups.
21831 Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21833 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
21834 check that it's usable as the bitfield width.
21836 Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21838 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
21839 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
21840 only ever used for functions in it.
21842 Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
21844 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
21845 (nested_type): Likewise.
21846 (nested_name_specifier): Use lastiddecl.
21848 * decl.c (grokdeclarator): Adjust accordingly.
21849 * init.c (expand_member_init): Likewise.
21850 * parse.y (base_class): Likewise.
21851 * typeck2.c (build_functional_cast): Likewise.
21853 * typeck2.c (build_functional_cast): Fill in name after we've
21854 checked for non-aggr type.
21856 Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
21858 * decl2.c (warn_pointer_arith): Default to on.
21860 Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
21862 * lex.c (is_rid): New function.
21863 * decl.c (grokdeclarator): Diagnose reserved words used as
21866 Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
21868 * tree.c (get_decl_list): Don't lose cv-quals.
21870 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
21871 typespecs used as declarator-ids.
21873 Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
21875 * decl.c (poplevel): When poping a level, don't give a warning for
21876 any subblocks that already exist.
21878 Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
21880 * typeck.c (build_object_ref): Finish what I started.
21882 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
21884 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
21886 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
21889 Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
21891 * decl.c (xref_tag): Handle passing a type in directly.
21893 * parse.y (qualified_type_name): Pull out the type.
21894 (nested_type): Likewise.
21895 Take types directly instead of as identifiers.
21896 * call.c (build_scoped_method_call): Take types directly instead of
21898 * decl.c (xref_basetypes): Likewise.
21899 * init.c (expand_member_init): Likewise.
21900 (build_member_call): Likewise.
21901 (build_offset_ref): Likewise.
21902 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
21903 * method.c (do_build_assign_ref): Likewise.
21904 * decl.c (grokdeclarator): Handle a type appearing as the
21905 declarator-id for constructors.
21906 * method.c (do_build_copy_constructor): current_base_init_list now
21907 uses the types directly, not their names.
21908 * init.c (sort_base_init): Likewise.
21909 (expand_member_init): Likewise.
21910 * init.c (is_aggr_type): New function, like is_aggr_typedef.
21912 Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
21914 * tree.c (layout_basetypes): Call build_lang_field_decl instead
21915 of build_lang_decl if first arg is a FIELD_DECL.
21917 Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21919 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
21921 * except.c (expand_start_catch_block): Set TREE_USED to avoid
21922 warnings about the catch handler.
21924 Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
21926 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
21927 expand_target_expr.
21929 Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21931 Fix access control to use trees rather than integers.
21932 * class.c (access_{default, public, protected, private,
21933 default_virtual, public_virtual, private_virtual}_node): Add
21935 (init_class_processing): Do creation of those nodes.
21936 * cp-tree.h (access_type): Delete enum decl.
21937 (access_{default, public, protected, private, default_virtual,
21938 public_virtual, private_virtual}_node): Add decls.
21939 (compute_access): Change return type.
21940 * search.c (compute_access): Have tree return type, instead of enum.
21941 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
21942 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
21943 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
21944 * parse.y (VISSPEC): Make ttype rather than itype.
21945 (base_class_access_list): Likewise.
21946 * *.[cy]: Change all refs of `access_public' to `access_public_node',
21948 * call.c (build_method_call): Make ACCESS be a tree.
21949 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
21950 * cvt.c (convert_to_aggr): Likewise.
21951 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
21953 * method.c (hack_identifier): Likewise.
21954 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
21956 Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
21958 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
21959 frontend, and make it more consistent with respect to
21960 warn_pointer_arith.
21962 Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
21964 * decl.c (pushdecl): Check for duplicate parameter names.
21966 Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
21968 * decl.c (expand_static_init): Call assemble_external for atexit.
21970 Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
21972 * except.c (do_unwind): Remove some generated dead code.
21973 (eh_outer_context): New routine, factor out some common code from
21974 expand_builtin_throw and end_eh_unwinder. Add code to do return
21975 address masking for the PA.
21976 (expand_builtin_throw): Use eh_outer_context instead of open coding
21978 (end_eh_unwinder): Likewise.
21980 Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
21982 * except.c (expand_throw): Call assemble_external for __empty, if we
21985 Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
21987 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
21988 NORMAL_RETURN_ADDR_OFFSET.
21989 (end_eh_unwinder): Likewise.
21991 Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
21993 * gc.c (build_dynamic_cast): Make sure we don't cast away const
21994 when dealing with references, and make sure we handle dynamic
21995 casting to a cv qualified reference.
21997 Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
21999 * except.c (struct eh_context): New structure top hold eh context
22001 (push_eh_context): New routine.
22002 (pop_eh_context): Likewise.
22003 * decl.c (push_cp_function_context): Use them.
22004 (pop_cp_function_context): Likewise.
22006 Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
22008 * decl2.c (finish_file): Also prune uninteresting functions in the
22009 inline emission loop.
22011 Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
22013 * sig.c (build_signature_table_constructor): Mark functions
22014 in the signature as referenced.
22016 Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
22018 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
22019 the inline emission stuff.
22021 Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
22023 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
22025 * lang-options.h: Add -f{no-,}weak.
22026 * decl.c (init_decl_processing): If the target does not support weak
22027 symbols, don't use them.
22028 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
22030 Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
22032 * init.c (expand_member_init): warning for base init after members.
22034 Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
22036 * cvt.c (build_expr_type_conversion): Don't convert to a reference
22039 Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
22041 * method.c (report_type_mismatch): Improve wording for volatile
22044 Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
22046 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
22047 expand_assignment, as the later doesn't handle things that have
22048 copy constructors well. The compiler would do bitwise copying,
22049 instead of ctor calling in some cases.
22051 Wed Dec 13 17:05:54 1995 Paul Eggert <eggert@twinsun.com>
22053 * g++.c (my_strerror): Return "cannot access" if errno is 0.
22054 (pfatal_with_name, perror_exec): Don't assume that
22055 the returned value from my_strerror contains no '%'s.
22057 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
22059 Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
22061 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
22062 TYPE_METHODS/TREE_CHAIN mean what they used to.
22063 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
22064 instead of TYPE_METHODS.
22065 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
22066 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
22067 * cp-tree.h (CLASSTYPE_METHODS): Lose.
22068 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
22070 (struct lang_decl): Lose next_method field.
22071 (DECL_NEXT_METHOD): Lose.
22072 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
22073 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
22075 (finish_struct_methods): Don't mess with the TREE_CHAINs in
22078 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
22081 * call.c (build_method_call): Synthesize here even when not inlining.
22082 * typeck.c (build_function_call_real): Likewise.
22084 Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
22086 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
22087 == DBX_DEBUG, call dbxout_start_new_source_file and
22088 dbxout_resume_previous_source_file when appropriate.
22090 Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
22092 * except.c (start_anon_func): Push to the top level.
22093 (end_anon_func): Pop from the top level.
22095 Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
22097 * cp-tree.h (build_cleanup): New routine to build cleanups.
22098 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
22099 call at ctor time and use atexit to run it later.
22100 * decl2.c (build_cleanup): New routine, taken from finish_file.
22101 (finish_file): Use build_cleanup instead, and don't put function
22102 local statics in global dtor list.
22104 Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
22106 * except.c (expand_throw): Ensure that we have cleanups, if we try
22107 and expand cleanups.
22109 Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
22111 * except.c (expand_throw): Add logic to manage dynamic cleanups for
22113 (expand_end_catch_block): Use the magic of expand_goto, instead of
22114 emit_jump so that we get the cleanup for any catch clause parameter
22115 and the cleanup for the exception object. Update to reflect label
22117 (push_eh_cleanup): New routine to register a cleanup for an
22119 (empty_fndecl): Used to default cleanup actions to
22121 (init_exception_processing): Setup empty_fndecl. Setup
22123 (expand_start_catch_block): Update to reflect label changes. Call
22124 push_eh_object to register the cleanup for the EH object.
22125 (start_anon_func): New routine to start building lambda expressions
22127 (end_anon_func): New routine to end them.
22128 (struct labelNode): Change so that we can use tree labels, or rtx
22130 (saved_cleanup): Object to check for dynamic cleanups for the
22131 exception handling object.
22132 (push_label_entry): Change so that we can use tree labels, or rtx
22134 (pop_label_entry): Likewise.
22135 (top_label_entry): Likewise.
22136 (expand_start_all_catch): Use tree label instead of rtx label, so
22137 that we can get the magic of expand_goto.
22138 (expand_end_all_catch): Update to reflect label changes.
22140 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
22142 * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
22143 building_cleanup logic, as we now use UNSAVE_EXPRs.
22144 * cp-tree.h (unsave_expr): Declare it.
22145 * decl.c (building_cleanup): Remove.
22146 (maybe_build_cleanup): Remove building_cleanup logic, and use
22147 UNSAVE_EXPR instead.
22149 Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
22151 * gc.c (build_t_desc): Update error message to say <typeinfo>.
22153 Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
22155 * decl.c (pushdecl): Only warn about shadowing a local variable if
22156 warn_shadow is true.
22158 Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
22160 * typeck.c (build_binary_op_nodefault): Added warning about
22161 comparisons between different enum types with -Wall, unless
22162 -fenum-int-equiv set.
22164 Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
22166 * class.c (finish_struct_1): Skip down to the inner type in
22167 multidimensional arrays. Ensures ctors will be made for types that
22170 Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
22172 * decl.c (last_dtor_insn): New to track the last compiler generated
22174 (store_parm_decls): Set it.
22175 (finish_function): Use it to see if the dtor is empty. Avoid doing
22176 vtable setup all the time, if we can.
22177 (struct cp_function): Add last_dtor_insn.
22178 (push_cp_function_context): Save it.
22179 (pop_cp_function_context): Restore it.
22181 Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
22183 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
22186 Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
22188 * typeck.c (expand_target_expr): Make sure targets get put into the
22189 current temp_slot_level, so that the free_temp_slots call will reuse
22192 Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
22194 * class.c (finish_struct_1): Delay delta fixups for virtual bases
22195 until after we have done the hard virtuals, to avoid a bogus `every
22196 virtual function must have a unique final overrider' for virtual
22197 functions that are only overridden by hard virtuals.
22199 Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
22201 * pt.c (do_function_instantiation): Don't try to find a file-scope
22202 template for a member function.
22204 Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
22206 * g++.c (main): Add handling of -nodefaultlibs.
22208 Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
22210 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
22211 distinguish between direct bindings of reference variables, and
22212 indirect bindings of reference variables.
22213 * cvt.c (build_up_reference): Use it.
22214 * typeck.c (convert_arguments): Use it to indicate this is an
22216 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
22217 as they are unused.
22218 (expand_static_init): Likewise.
22219 (cplus_expand_expr_stmt): Likewise.
22220 * decl2.c (finish_file): Likewise.
22221 * init.c (perform_member_init): Likewise.
22222 (emit_base_init): Likewise.
22223 (expand_aggr_vbase_init_1): Likewise.
22225 Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
22227 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
22228 get a DECL_LANG_SPECIFIC node.
22229 * cp-tree.h (lang_decl_flags): Add new member `level'.
22230 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
22231 decl_flags level member.
22233 Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
22235 * call.c (build_method_call): Make sure instance has a
22236 TYPE_LANG_SPECIFIC node before we dive into it.
22238 Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
22240 * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
22242 Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
22244 * decl.c (duplicate_decls): When smashing decls, smash staticness in
22247 Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
22249 * decl.c (poplevel): Handle the merging of subblocks of cleanups
22250 when finishing blocks that have already been created (usually due to
22251 the fixup goto code). Fixes bad debugging information.
22253 Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
22255 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
22256 that's not a list of overloaded functions.
22258 Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
22260 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
22261 before trying to use DECL_ABSTRACT_VIRTUAL_P.
22263 Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
22265 * decl2.c (mark_used): New function for hooking into setting of
22266 TREE_USED on decls.
22267 * call.c (build_method_call): Use it.
22268 * class.c (instantiate_type): Likewise.
22269 * init.c (build_offset_ref): Likewise. Don't call assemble_external
22270 for all like-named functions.
22271 * method.c (hack_identifier): Likewise.
22272 (emit_thunk): Don't call assemble_external.
22273 (make_thunk): Create thunk as a FUNCTION_DECL so that it
22274 gets the right mode and ENCODE_SECTION_INFO works.
22276 * parse.y: Use mark_used. Pass operator names to do_identifier.
22277 * lex.c (do_identifier): Handle operator names.
22279 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
22281 Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
22283 * errfn.c: Include stdio.h.
22284 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
22286 Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
22288 * typeck2.c (digest_init): Always convert initializers to the
22291 Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
22293 * init.c (member_init_ok_or_else): Don't allow member initializers
22294 for indirect members, as it is invalid.
22296 Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
22298 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
22300 Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
22302 * parse.y (for.init.statement): Catch compound statements inside for
22303 initializations, if we're being pedantic.
22305 Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
22307 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
22310 Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
22312 * error.c (dump_expr): Don't core dump when a boolean expression is
22313 used as a default argument.
22315 Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
22317 * class.c (finish_struct_bits): Check aggregate_value_p instead of
22320 Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
22322 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
22323 BLKmode type that would otherwise be returned in registers.
22325 Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
22327 * g++.c (WITHLIBC): New macro.
22328 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
22329 saw_libc and pass it at the end if it was set.
22331 Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
22333 * parse.y (fn.def1): Call split_specs_attrs in
22334 declmods notype_declarator case.