]> gcc.gnu.org Git - gcc.git/blob - gcc/cp/ChangeLog
cp-tree.h: Tweak documentation.
[gcc.git] / gcc / cp / ChangeLog
1 2000-03-14 Mark Mitchell <mark@codesourcery.com>
2
3 * cp-tree.h: Tweak documentation.
4 * class.c (build_vbase_pointer_fields): Layout the fields, too.
5 (avoid_overlap): Remove.
6 (get_binfo_offset_as_int): New function.
7 (dfs_serach_base_offsets): Likewise.
8 (layout_nonempty_base_or_field): Likewise.
9 (build_base_field): Layout fields here. Avoid placing two objects
10 of the same type at the same address, under the new ABI.
11 (build_base_fields): Adjust accordingly.
12 (create_vtable_ptr): Return the new field, but don't attach it to
13 TYPE_FIELDS.
14 (remove_base_field): Remove.
15 (remove_base_fields): Remove.
16 (layout_basetypes): Adjust accordingly.
17 (layout_class_type): Call layout_field for each field, rather than
18 just making a wholesale call to layout_type.
19
20 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
21
22 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
23
24 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
25
26 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
27
28 * except.c (dtor_nothrow): New fn.
29 (do_pop_exception): Use it. Take type parm.
30 (push_eh_cleanup): Take type parm.
31 (expand_start_catch_block): Pass it.
32 (build_eh_type_type_ref): Accept null type.
33
34 2000-03-12 Mark Mitchell <mark@codesourcery.com>
35
36 * cp-tree.h (revert_static_member_fn): Change prototype.
37 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
38 (grok_op_properties): Likewise.
39 (start_function): Likewise.
40 (revert_static_member_fn): Simplify.
41 * pt.c (check_explicit_specialization): Adjust call to
42 revert_static_member_fn.
43
44 2000-03-11 Mark Mitchell <mark@codesourcery.com>
45
46 * cp-tree.h (scope_kind): New type.
47 (tmpl_spec_kind): Likewise.
48 (declare_pseudo_global_level): Remove.
49 (pseudo_global_level_p): Rename to template_parm_scope_p.
50 (pushlevel): Remove declaration.
51 (begin_scope): New function.
52 (finish_scope): Likewise.
53 (current_tmpl_spec_kind): Likewise.
54 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
55 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
56 Add template_spec_p.
57 (toplevel_bindings_p): Adjust.
58 (declare_pseudo_global_level): Remove.
59 (pseudo_global_level_p): Rename to template_parm_scope_p.
60 (current_tmpl_spec_kind): New function.
61 (begin_scope): Likewise.
62 (finish_scope): Likewise.
63 (maybe_push_to_top_level): Adjust.
64 (maybe_process_template_type_declaration): Likewise.
65 (pushtag): Likewise.
66 (pushdecl_nonclass_level): Likewise.
67 (lookup_tag): Likewise.
68 (grokfndecl): Handle member template specializations. Share
69 constructor and non-constructor code.
70 * decl2.c (check_classfn): Handle member template specializations.
71 * pt.c (begin_template_parm_list): Use begin_scope.
72 (begin_specialization): Likewise.
73 (end_specialization): Likewise.
74 (check_explicit_specialization): Use current_tmpl_spec_kind.
75 Handle member template specializations.
76 (end_template_decl): Use finish_scope. Remove call to
77 get_pending_sizes.
78 (push_template_decl_real): Remove bogus error message.
79 (tsubst_decl): Fix typo in code contained in comment.
80 (instantiate_template): Handle member template specializations.
81 (most_general_template): Likewise.
82
83 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
84
85 * lex.c (whitespace_cr): Compress consecutive calls to warning().
86 (do_identifier): Ditto for error().
87
88 * pt.c (convert_nontype_argument): Ditto for cp_error().
89 (convert_template_argument): Ditto for cp_pedwarn().
90
91 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
92
93 * exception.cc (__check_null_eh_spec): New fn.
94 * except.c (expand_end_eh_spec): Call it if the spec is throw().
95
96 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
97
98 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
99 * except.c (expand_end_eh_spec): Add the return type.
100 * rtti.c (throw_bad_cast): Add the parmtypes.
101 (throw_bad_typeid): Likewise.
102
103 * semantics.c (expand_stmt): Only leave out rtl for unused
104 artificials, and set DECL_IGNORED_P on them as well.
105 * decl.c (wrapup_globals_for_namespace): Likewise.
106
107 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
108
109 * decl.c (maybe_commonize_var): Skip all artificial decls.
110 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
111
112 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
113
114 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
115 * cp-tree.h: Declare flag_enforce_eh_specs.
116 * decl.c (store_parm_decls, finish_function): Check it.
117
118 C library functions don't throw.
119 * Makefile.in (cfns.h): New target.
120 (except.o): Depend on it.
121 * Make-lang.in (cc1plus): Depend on cfns.gperf.
122 * cfns.gperf: New file.
123 * cfns.h: Generated.
124 * except.c: Include it.
125 (nothrow_libfn_p): New fn.
126 * decl.c (grokfndecl): Use it.
127 * cp-tree.h: Declare it.
128
129 * decl.c (push_overloaded_decl_1, auto_function,
130 define_function): Lose.
131 (build_library_fn_1): New static fn.
132 (builtin_function): Use it.
133 (get_atexit_node): Use build_library_fn_ptr.
134 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
135 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
136 push_void_library_fn, push_throw_library_fn): New fns.
137 * cp-tree.h: Declare them.
138 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
139 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
140 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
141 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
142 * rtti.c (build_runtime_decl): Lose.
143 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
144 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
145 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
146
147 * call.c (build_call): Remove result_type parm.
148 Call mark_used on unused artificial fns.
149 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
150
151 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
152
153 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
154 appropriate.
155 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
156 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
157 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
158 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
159 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
160 expand_generic_desc): Likewise.
161
162 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
163
164 * exception.cc (__cp_pop_exception): Cleanup the original object.
165
166 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
167
168 * decl.c (grok_op_properties): Merge conversion to void warning
169 with other silly op warnings.
170
171 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
172
173 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
174 array CONSTRUCTOR elements. Don't use expr_tree_cons.
175
176 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
177
178 * decl.c (cp_make_fname_decl): New function.
179 (wrapup_globals_for_namespace): Don't emit unused static vars.
180 (init_decl_processing): Remove comment about use of
181 array_domain_type. Set make_fname_decl.
182 (cp_finish_decl): Remove __FUNCTION__ nadgering.
183 * semantics.c (begin_compound_stmt): Remove
184 current_function_name_declared flagging.
185 (expand_stmt): Don't emit unused local statics.
186 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
187 specially.
188
189 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
190
191 * typeck.c (convert_for_assignment): Don't look at array
192 initializer.
193 * call.c (convert_like_real): Likewise.
194
195 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
196
197 Add initial support for '\uNNNN' specifier.
198 * lex.c (read_ucs): New fn.
199 (readescape, skip_white_space): Call it.
200 (is_extended_char, is_extended_char_1): New fns.
201 (utf8_extend_token): New fn, #if 0'd out.
202 (real_yylex): Treat extended chars like letters.
203
204 * search.c (note_debug_info_needed): Walk the bases even if we
205 weren't deferring the type itself.
206
207 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
208
209 * decl2.c (finish_objects): Constify a char*.
210
211 * method.c (emit_thunk): Likewise.
212
213 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
214
215 * typeck.c (dubious_conversion_warnings): Look through
216 REFERENCE_TYPE.
217
218 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
219
220 * class.c (dfs_modify_vtables): I is now unsigned.
221 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
222 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
223 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
224 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
225 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
226 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
227 Call integer_all_onesp.
228 * typeck2.c (process_init_constructor): Use compare_tree_int.
229
230 * lang-specs.h (as): Don't call if -syntax-only.
231
232 2000-03-06 Mark Mitchell <mark@codesourcery.com>
233
234 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
235 RTL_EXPR_HAS_NO_SCOPE after all.
236
237 2000-03-05 Mark Mitchell <mark@codesourcery.com>
238
239 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
240 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
241 RTL_EXPR_HAS_NO_SCOPE.
242
243 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
244 later.
245
246 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
247
248 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
249
250 * call.c (convert_like): Macrofy.
251 (convert_like_with_context): New macro.
252 (convert_like_real): Renamed from convert_like. Add calling
253 context parameters, for diagnostics. Add recursive flag. Call
254 dubious_conversion_warnings for outer conversion.
255 (build_user_type_conversion): Use convert_like_with_context.
256 (build_over_call): Likewise. Don't warn about dubious
257 conversions here. Adjust convert_default_arg calls.
258 (convert_default_arg): Add context parameters for diagnostics.
259 Pass throught to convert_like_with_context.
260 * cp-tree.h (convert_default_arg): Add context parameters.
261 (dubious_conversion_warnings): Prototype new function.
262 * typeck.c (convert_arguments): Adjust convert_default_arg call.
263 (dubious_conversion_warnings): New function, broken
264 out of convert_for_assignment.
265 (convert_for_assignment): Adjust.
266
267 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
268
269 * decl2.c (key_method): Break out from...
270 (import_export_vtable, import_export_class): ...here.
271
272 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
273 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
274
275 * search.c (note_debug_info_needed, dfs_debug_mark,
276 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
277 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
278
279 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
280
281 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
282 typos.
283
284 2000-03-02 Mark Mitchell <mark@codesourcery.com>
285
286 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
287 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
288 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
289 (lang_type): Split gets_new into has_new and has_array_new.
290 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
291 (TYPE_GETS_NEW): Split into ...
292 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
293 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
294 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
295 (build_op_new_call): Don't declare.
296 (build_new_1): Likewise.
297 * call.c (build_op_new_call): Remove.
298 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
299 instead of TYPE_NEEDS_DESTRUCTOR.
300 (finish_struct_bits): Likewise.
301 (add_implicitly_declared_members): Likewise.
302 (check_field_decl): Likewise.
303 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
304 correctly under the new ABI.
305 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
306 instead of TYPE_NEEDS_DESTRUCTOR.
307 (initialize_local_var): Likewise.
308 (destroy_local_var): Likewise.
309 (cp_finish_decl): Likewise.
310 (register_dtor_fn): Likewise.
311 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
312 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
313 TYPE_VEC_DELETE_TAKES_SIZE here.
314 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
315 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
316 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
317 (finish_destructor_body): Likewise.
318 (maybe_build_cleanup_1): Likewise.
319 * decl2.c (do_static_destruction): Likewise.
320 * init.c (build_new_1): Make it static.
321 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
322 (expand_cleanup_for_base): Likewise.
323 (get_cookie_size): New function.
324 (build_new_1): Handle array-new cookies correctly under the new
325 ABI.
326 (build_vec_delete_1): Likewise.
327 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
328 (build_delete): Likewise.
329 (build_vec_delete): Handle array-new cookies correctly under the new
330 ABI.
331 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
332 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
333 TYPE_HAS_ARRAY_NEW_OPERATOR.
334 * ptree.c (print_lang_type): Check them.
335 * search.c (context_for_name_lookup): Fix typo in comment.
336 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
337 * tree.c (break_out_cleanups): Likewise.
338 (build_cplus_array_test_1): Likewise.
339 (cp_build_qualified_type_real): Likewise.
340 * typeck.c (complete_type): Likewise.
341
342 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
343 the command-line, not the end.
344
345 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
346
347 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
348
349 2000-03-02 Tom Tromey <tromey@cygnus.com>
350
351 * cp-tree.h (build_java_class_ref): Declare.
352 * init.c (build_java_class_ref): No longer static.
353 * except.c (expand_throw): Generate a Java-style `throw' if the
354 thrown object is a "Java" object.
355 (initialize_handler_parm): Generate a Java-style lookup of
356 exception info if the caught object is a "Java" object.
357 (catch_language, catch_language_init): New globals.
358 (decl_is_java_type): New function.
359 (expand_start_catch_block): Don't call push_eh_info() or
360 push_eh_cleanup() when handling a Java-style "catch". Pass Java
361 class reference to build_catch_block.
362
363 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
364
365 * typeck.c (comptypes): Treat sizetype like its language equivalent.
366
367 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
368
369 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
370 to merge reference/pointer code and fix incorrect warnings.
371
372 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
373
374 * search.c (protected_accessible_p): Use context_for_name_lookup.
375
376 * init.c (construct_virtual_bases): Fix thinko.
377 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
378
379 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
380
381 * decl.c (current_function_decl): Move to toplev.c.
382
383 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
384
385 * pt.c (fn_type_unification): Unify return type, whenever
386 provided.
387 (get_bindings_real): Only pass return type when necessary.
388 Remove explicit return type check.
389 * class.c (resolve_address_of_overloaded_function): Pass desired
390 return type to fn_type_unification.
391
392 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
393
394 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
395 DECL_FIELD_SIZE.
396 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
397 DECL_FIELD_SIZE.
398 * rtti.c (expand_class_desc): Likewise.
399 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
400 (THUNK_VCALL_OFFSET): Likewise.
401 (THUNK_DELTA): Reflect changes in ../tree.h.
402
403 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
404
405 * search.c (protected_accessible_p): Also allow the access if
406 the member is public in DERIVED. Lose TYPE parm.
407 (friend_accessible_p): Lose TYPE parm.
408 (accessible_p): Adjust.
409
410 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
411
412 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
413 on things that are not sizes; ssize_binop deleted.
414 Call size_diffop when appropriate.
415 (dfs_build_vcall_offset_vtbl_entries): Likewise.
416 (build_primary_vtable, build_secondary_vtable): Likewise.
417 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
418 Variable I is HOST_WIDE_INT.
419 (get_vfield_offset): Pass proper types to size_binop.
420 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
421 (finish_struct_1): Likewise.
422 (skip_rtti_stuff): Arg N is now pointer to signed.
423 (layout_class_type): Use size_zero_node.
424 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
425 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
426 * decl.c (complete_arry_type): Pass proper types to size_binop.
427 (xref_basetypes): BINFO_OFFSET is sizetype.
428 * error.c (dump_expr): Don't use size_binop non-sizes.
429 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
430 * init.c (construct_virtual_bases): Fix type error.
431 (build_vec_delete_1): Pass proper type to size_binop and don't
432 fold result.
433 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
434 * rtti.c (get_base_offset): Pass proper type to size_binop.
435 * search.c (dfs_find_vbases): Fix type error.
436 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
437 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
438 * tree.c (debug_binfo): Variable N is signed.
439 Use HOST_WIDE_INT_PRINT_DEC.
440 * typeck.c (comptypes): sizetype is same as equivalent integer type.
441 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
442 size_one_node and size_zero_node.
443 (c_alignof): Use size_one_node.
444 (build_component_addr): Pass proper types to size_binop.
445 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
446
447 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
448
449 Implement class scope using-declarations for functions.
450 * class.c (handle_using_decl): Call add_method for used functions.
451 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
452 (add_method): Used functions are hidden by local functions.
453 (check_bases_and_members): Handle using-decls before finalizing
454 CLASSTYPE_METHOD_VEC.
455 * call.c (add_function_candidate): Add ctype parm; if non-zero,
456 override the type of 'this' accordingly.
457 (add_template_candidate, add_template_candidate_real): Add ctype parm.
458 (convert_class_to_reference, build_user_type_conversion_1,
459 build_new_function_call, build_object_call, build_new_op,
460 build_new_method_call): Pass ctype parm.
461
462 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
463 the baselink.
464 * call.c (convert_class_to_reference, build_user_type_conversion_1,
465 build_new_function_call, build_object_call, build_new_op,
466 build_new_method_call, build_op_delete_call): Don't get basetype_path
467 from a baselink.
468 * typeck.c (build_component_ref): Likewise.
469 * init.c (build_offset_ref): Likewise.
470 (resolve_offset_ref): Don't call enforce_access.
471 Call build_scoped_ref.
472 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
473 would cause an error or if -pedantic.
474 * class.c (alter_access): Lose binfo parm.
475
476 2000-02-26 Mark Mitchell <mark@codesourcery.com>
477
478 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
479 types.
480
481 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
482
483 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
484 pseudo_type_info creation into the std namespace
485
486 2000-02-26 Mark Mitchell <mark@codesourcery.com>
487
488 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
489 (import_export_class): Remove declaration.
490 * decl2.c (import_export_class): Make it static.
491 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
492 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
493 EXPR_WITH_FILE_LOCATION.
494 * lex.c (check_newline): Tweak filename/lineno setting.
495 * semantics.c (begin_while_stmt): Fix typo in comment.
496
497 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
498
499 * lang-options.h (-fmessage-length=): Add missing option.
500
501 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
502
503 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
504
505 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
506
507 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
508
509 * optimize.c (expand_call_inline): Emit the return label before
510 evaluating the return value.
511
512 2000-02-24 Mark Mitchell <mark@codesourcery.com>
513
514 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
515 than duplicating functionality here.
516 * optimize.c: Include input.h.
517 (expand_call_inline): Use push_srcloc and pop_srcloc.
518 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
519 * parse.c: Regenerated.
520 * Makefile.in (lex.o): Depend on input.h.
521 (optimize.o): Likewise.
522
523 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
524
525 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
526 function type, rather than ICE.
527
528 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
529
530 * decl.c (grokdeclarator): Call decl_type_access_control.
531 * parse.y (parse_end_decl): Don't call decl_type_access_control if
532 decl is null.
533
534 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
535
536 * decl.c (decls_match): Remove obsolete static member nadgering.
537
538 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
539
540 * decl.c (grokdeclarator): Change ANSI to ISO.
541 * lex.c (consume_string, readescape, do_identifier): Likewise.
542 (parse_float, real_yylex): Likewise.
543 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
544 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
545 new_type_id, maybe_label_decls, simple_stmt,
546 for.init.statement): Likewise.
547 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
548 * semantics.c (finish_named_return_value): Likewise.
549 * parse.c: Regenerate.
550
551 2000-02-21 Mark Mitchell <mark@codesourcery.com>
552
553 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
554 (CPTI_CLASS_STAR_TYPE): Remove.
555 (vtable_index_type): Likewise.
556 (class_star_type_node): Remove.
557 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
558 (build_binary_op_nodefault): Remove.
559 * call.c (build_new_op): Use build_binary_op instead of
560 build_binary_op_nodefault.
561 * decl.c (init_decl_processing): Remove class_star_type_node
562 initialization. Make delta_type_node ptrdiff_type_node under the
563 new ABI. Initialize vtable_index_type.
564 (build_ptrmemfunc_type): Build different structures for the new
565 ABI.
566 (build_enumerator): Use build_binary_op instead of
567 build_binary_op_nodefault.
568 * method.c (build_overload_value): Mangle pointers-to-members
569 appropriately under the new ABI.
570 * typeck.c (build_array_ref): Use build_binary_op instead of
571 build_binary_op_nodefault.
572 (get_member_function_from_ptrfunc): Adjust for the new ABI.
573 (build_binary_op_nodefault): Rename to ...
574 (build_binary_op): ... this. Remove old version. Adjust for
575 pointer-to-member comparisons under the new ABI.
576 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
577 (build_ptrmemfunc): Adjust for the new ABI.
578 (expand_ptrmemfunc_cst): Likewise.
579 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
580 (pfn_from_ptrmemfunc): Adjust for the new ABI.
581
582 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
583
584 * call.c (build_object_call): Compress consecutive calls to
585 cp_error.
586 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
587 (build_op_delete_call): Adjust message formatting.
588
589 * class.c (check_bases): Compress consecutive calls to
590 cp_pedwarn.
591 (finish_struct_anon): Say 'ISO C++'.
592
593 * decl.c (start_decl): Same here.
594 (grok_reference_init): Likewise.
595 (grokfndecl): Correct message formatting.
596 (grokfndecl): Improve diagnostic.
597 (check_static_variable_definition): Likewise. Say 'ISO C++'
598 (compute_array_index_type): Say 'ISO C++'
599 (create_array_type_for_decl): Compress consecutive calls to
600 cp_error.
601 (grokdeclarator): Say 'ISO C++'
602 (grok_op_properties): Likewise.
603
604 * decl2.c (delete_sanity): Clairify diagnostic.
605 (check_member_template): Same here.
606 (grok_function_init): Use consistent terminology.
607
608 * expr.c (do_case): Say 'ISO C++'
609
610 * friend.c (do_friend): Compress consecutive calls to warning.
611
612 2000-02-20 Mark Mitchell <mark@codesourcery.com>
613
614 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
615 * class.c (build_secondary_vtable): Reorganize. Don't create a
616 new vtable under the new ABI.
617 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
618 computing the size.
619 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
620 the initializing elements.
621 (initialize_vtable): New function.
622 (dfs_finish_vtbls): Use it.
623 (dfs_accumulate_vtbl_inits): New function.
624 (finish_vtbls): Merge primary and secondary vtables under the new
625 ABI.
626 (finish_struct_1): Remove redundant call to layout_vtable_decl.
627 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
628 aren't VAR_DECLs.
629
630 * class.c (build_vtable): New function, split out from ...
631 (get_vtable_decl): ... here, and ...
632 (build_secondary_vtable): ... here.
633
634 * pt.c (tsubst_decl): Fix formatting.
635
636 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
637
638 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
639 (avoid_overlap, build_base_field): Likewise.
640 (build_base_field, build_base_fields, is_empty_class):
641 Test DECL_SIZE with integer_zero.
642 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
643 * cp-tree.h (struct lang_type): New field size_unit.
644 (CLASSTYPE_SIZE_UNIT): New macro.
645 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
646 (cp_finish_decl): Delete -Wlarger-than processing.
647 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
648 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
649 * tree.c (make_binfo): binfo vector is one entry longer.
650 (walk_tree): Walk DECL_SIZE_UNIT.
651
652 2000-02-19 Mark Mitchell <mark@codesourcery.com>
653
654 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
655 comment.
656 (build_vtable_entry): Don't assume all vtable entries are
657 functions.
658 (build_vtbl_initializer): Adjust accordingly.
659 (get_vtable_decl): Fix formatting.
660
661 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
662
663 * semantics.c (deferred_type_access_control): Walk the entire
664 type_lookups list.
665 (save_type_access_control): Rename from
666 initial_deferred_type_access_control. Just remember the value.
667 (decl_type_access_control): New fn.
668 (begin_function_definition): Use deferred_type_access_control, after
669 we've started the function. Set type_lookups to error_mark_node.
670 * parse.y (frob_specs, fn.def1): Adjust.
671 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
672 (parse_end_decl, parse_bitfield0, parse_method): New fns.
673 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
674 (after_type_component_declarator0): Likewise.
675 (after_type_component_declarator): Likewise.
676 (notype_component_declarator): Likewise.
677 * cp-tree.h: Adjust.
678
679 * decl.c (redeclaration_error_message): Allow redeclaration of
680 namespace-scope decls.
681
682 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
683
684 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
685
686 2000-02-17 Mark Mitchell <mark@codesourcery.com>
687
688 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
689 * decl2.c (grokclassfn): Likewise.
690
691 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
692
693 * decl2.c (lang_decode_option): Don't set default message length
694 here.
695 * lex.c (lang_init_options): Set it here.
696
697 2000-02-16 Mark Mitchell <mark@codesourcery.com>
698
699 Make DECL_CONTEXT mean the class in which a member function was
700 declared, even for a virtual function.
701 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
702 (DECL_FRIEND_CONTEXT): New macro.
703 (DECL_REAL_CONTEXT): Remove.
704 (SET_DECL_FRIEND_CONTEXT): Likewise.
705 (DECL_VIRTUAL_CONTEXT): Adjust.
706 (DECL_CLASS_SCOPE_P): Use TYPE_P.
707 (add_friends): Remove.
708 (hack_decl_function_context): Likewise.
709 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
710 CP_DECL_CONTEXT.
711 (build_over_call): Fix indentation. Use DECL_CONTEXT
712 instead of DECL_CLASS_CONTEXT.
713 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
714 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
715 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
716 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
717 (build_base_field): Likewise.
718 (finish_struct_1): Likewise.
719 (build_self_reference): Likewise.
720 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
721 DECL_REAL_CONTEXT.
722 (pushtag): Use decl_function_context, not
723 hack_decl_function_context.
724 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
725 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
726 (pushdecl): Remove bogus code.
727 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
728 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
729 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
730 Use decl_function_context, nothack_decl_function_context.
731 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
732 (grokdeclarator): Likewise. Use decl_function_context, not
733 hack_decl_function_context.
734 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
735 (start_function): Use DECL_FRIEND_CONTEXT, not
736 DECL_CLASS_CONTEXT. Use decl_function_context, not
737 hack_decl_function_context.
738 (finish_function): Use decl_function_context, not
739 hack_decl_function_context.
740 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
741 DECL_CLASS_CONTEXT.
742 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
743 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
744 (grokfield): Likewise.
745 (finish_builtin_type): Likewise.
746 (finish_vtable_vardec): Use decl_function_context, not
747 hack_decl_function_context.
748 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
749 (start_static_initialization_or_destruction): Likewise.
750 (finish_static_initialization_or_destruction): Likewise.
751 (mark_used): Adjust logic for deciding when to synthesize methods.
752 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
753 DECL_REAL_CONTEXT.
754 * error.c (dump_function_decl): Use DECL_CONTEXT, not
755 DECL_CLASS_CONTEXT.
756 * friend.c (is_friend): Likewise.
757 (add_friends): Remove.
758 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
759 * lex.c (begin_definition_of_inclass_inline): Use
760 decl_function_context, not hack_decl_function_context.
761 (process_next_inline): Likewise.
762 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
763 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
764 DECL_CLASSS_CONTEXT.
765 (hack_identifier): Likewise.
766 (synthesize_method): Use decl_function_context, not
767 hack_decl_function_context.
768 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
769 DECL_REAL_CONTEXT.
770 (is_member_template): Use decl_function_context, not
771 hack_decl_function_context. Use DECL_CONTEXT, not
772 DECL_CLASS_CONTEXT.
773 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
774 DECL_CLASS_CONTEXT.
775 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
776 DECL_REAL_CONTEXT.
777 (push_template_decl_real): Likewise.
778 (instantiate_class_template): Don't call add_friends.
779 (tsubst_default_argument): Use DECL_CONTEXT, not
780 DECL_REAL_CONTEXT.
781 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
782 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
783 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
784 DECL_CLASS_CONTEXT.
785 * repo.c (repo_inline_used): Likewise.
786 * search.c (current_scope): Adjust for new _CONTEXT macros.
787 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
788 DECL_REAL_CONTEXT.
789 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
790 (lookup_fnfields_here):Likewise.
791 (check_final_overrider): Likewise.
792 (init_vbase_pointers): Likewise.
793 (virtual_context): Likewise.
794 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
795 (expand_body): Use decl_function_context, not
796 hack_decl_function_context.
797 * tree.c (hack_decl_function_context): Remove.
798 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
799 DECL_CLASS_CONTEXT.
800 * typeck2.c (error_not_base_type): Likewise.
801
802 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
803
804 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
805
806 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
807
808 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
809
810 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
811
812 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
813
814 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
815
816 * decl2.c (lang_decode_option): Enable automatic line wrapping.
817
818 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
819
820 * parse.y (frob_specs): Split out...
821 (parse_decl): From here.
822 (fn.def2): Call initial_deferred_type_access_control.
823 (after_type_component_declarator0): Call frob_specs.
824 (notype_component_declarator0): Likewise.
825 * search.c (friend_accessible_p): Nested classes are friends of their
826 enclosing classes.
827
828 2000-02-10 Mark Mitchell <mark@codesourcery.com>
829
830 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
831 used to create an implicit temporary.
832
833 * class.c (dfs_modify_vtables): Tweak calculation of functions to
834 override.
835
836 2000-02-08 Nathan Sidwell <nathan@acm.org>
837
838 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
839 strip array element qualifiers too.
840
841 2000-02-07 Mark Mitchell <mark@codesourcery.com>
842
843 * decl.c (store_parm_decls): Don't build cleanups for parameters
844 while processing_template_decl.
845
846 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
847
848 * cp-tree.h (struct saved_scope): Add incomplete field.
849 (namespace_scope_incomplete): New macro.
850 * decl.c (pushdecl): Use it.
851 (hack_incomplete_structures): Use it. See through artificial
852 binding levels.
853 (mark_saved_scope): Mark it.
854
855 Implement access control for nested types.
856 * search.c (type_access_control): New fn.
857 (accessible_p): Now we do perform access control for types.
858 * semantics.c (deferred_type_access_control): New fn.
859 (initial_deferred_type_access_control): New fn.
860 (begin_function_definition): Call it. Add lookups parm.
861 * decl.c (struct binding_level): Add this_class field.
862 (pushlevel_class): Set it.
863 (mark_binding_level): Mark it.
864 (lookup_name_real): Use it. Call type_access_control.
865 (mark_saved_scope): Mark lookups field.
866 * cp-tree.h (flagged_type_tree): Add lookups field.
867 (struct saved_scope): Add lookups field.
868 (type_lookups): New macro.
869 * parse.y (declmods): Now <ftype>.
870 (parse_decl): Add lookups parm. Call
871 initial_deferred_type_access_control.
872 (lang_extdef): Clear type_lookups.
873 (typed_declspecs, declmods, typespec): Set lookups field.
874 (initdcl): Call deferred_type_access_control.
875 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
876 component_decl_1, named_parm): Adjust.
877 * friend.c (is_friend): Nested classes are friends of their
878 enclosing classes.
879
880 * class.c (currently_open_derived_class): New fn.
881 * method.c (hack_identifier): Use it.
882
883 * lex.c (do_identifier): Remove obsolete code.
884
885 * parse.y (typed_typespecs): Propagate new_type_flag properly.
886
887 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
888
889 * tinfo.h: Remove apostrophes from C++ comment (xgettext
890 thinks this file is plain C).
891
892 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
893
894 * Makefile.in (call.o): Depend on $(EXPR_H).
895
896 * call.c: Include "expr.h".
897
898 * class.c (dump_class_hierarchy): Add prototype.
899
900 * search.c (dfs_get_pure_virtuals): Likewise.
901
902 2000-02-1 Ulrich Drepper <drepper@redhat.com>
903
904 * parse.y (simple_stmt): Allow :: token in asm parameter list.
905 * parse.c: Rebuilt.
906
907 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
908
909 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
910 Store it in DECL_FCONTEXT.
911 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
912
913 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
914
915 * tinfo.h (old abi): #include "tconfig.h".
916 * tinfo.cc (convert_to_base): Move into old abi section.
917
918 2000-01-31 Mark Mitchell <mark@codesourcery.com>
919
920 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
921 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
922 (BINFO_PRIMARY_BINFO): New macro.
923 (BF_DELTA): Rename to ...
924 (BV_DELTA): ... this.
925 (BF_VCALL_INDEX): Rename to ...
926 (BV_VCALL_INDEX): ... this.
927 (BF_FN): Rename to ...
928 (BV_FN): ... this.
929 * class.c (build_vbase_path): Adjust for changes to reverse_path.
930 (set_rtti_entry): Rename BF_ macros to BV_ variants.
931 (modify_vtable_entry): Simplify.
932 (add_virtual_function): Rename BF_ macros to BV_ variants.
933 (build_vtable_initializer): Likewise.
934 (get_class_offset_1): Remove.
935 (dfs_get_class_offset): Likewise.
936 (get_class_offset): Likewise.
937 (dfs_find_final_overrider): New function.
938 (find_final_overrider): Likewise.
939 (modify_one_vtable): Remove.
940 (dfs_find_base): New function.
941 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
942 find_final_overrider.
943 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
944 virtuals.
945 (dfs_fixup_vtable_deltas): Remove.
946 (override_one_vtable): Remove.
947 (merge_overrides): Likewise.
948 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
949 unreal chilren of virtual bases.
950 (finish_struct_1): Don't use merge_overrides. Don't use
951 dfs_fixup_vtable_deltas.
952 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
953 BINFOs.
954
955 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
956 Jason Merrill <jason@yorick.cygnus.com>
957
958 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
959
960 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
961
962 * exception.cc (__throw_bad_typeid): Add missing std::.
963
964 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
965
966 * cp-tree.h (make_thunk): PROTO -> PARAMS.
967
968 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
969
970 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
971
972 Runtime support for new-abi rtti.
973 * inc/typeinfo (type_info::operator!=): Define in class.
974 (type_info::before, type_info::name, type_info::operator==,
975 type_info::operator!=): Define new ABI implementations.
976 (type_info::is_pointer_p, type_info::is_function_p): Declare
977 new virtual functions.
978 (type_info::do_catch, type_info::do_upcast): Likewise.
979
980 * tinfo.h (__base_class_info): Define new class.
981 (__class_type_info): Likewise.
982 (__si_class_type_info): Likewise.
983 (__vmi_class_type_info): Likewise.
984 (__dynamic_cast): Prototype.
985
986 * tinfo.cc: Conditionalize old and new rtti mechanisms.
987 (type_info::is_pointer_p): Define new function.
988 (type_info::is_function_p): Likewise.
989 (type_info::do_catch): Likewise.
990 (type_info::do_upcast): Likewise.
991 (vtable_prefix): New structure for vtable access.
992 (adjust_pointer): Define new template function.
993 (contained_p, public_p, virtual_p, contained_public_p,
994 contained_nonpublic_p, contained_nonvirtual_p): Define new
995 functions.
996 (nonvirtual_base_type): New local variable.
997 (__class_type_info::~__class_type_info): Define.
998 (__si_class_type_info::~__si_class_type_info): Likewise.
999 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
1000 (__class_type_info::do_catch): Define new function.
1001 (__class_type_info::do_upcast): Likewise.
1002 (__class_type_info::find_public_src): Likewise.
1003 (__class_type_info::do_find_public_src): Likewise.
1004 (__si_class_type_info::do_find_public_src): Likewise.
1005 (__vmi_class_type_info::do_find_public_src): Likewise.
1006 (__class_type_info::do_dyncast): Likewise.
1007 (__si_class_type_info::do_dyncast): Likewise.
1008 (__vmi_class_type_info::do_dyncast): Likewise.
1009 (__class_type_info::do_upcast): Likewise.
1010 (__si_class_type_info::do_upcast): Likewise.
1011 (__vmi_class_type_info::do_upcast): Likewise.
1012 (__dynamic_cast): Likewise.
1013
1014 * tinfo2.cc (__fundamental_type_info): Define new class.
1015 (__pointer_type_info): Likewise.
1016 (__reference_type_info): Likewise.
1017 (__array_type_info): Likewise.
1018 (__function_type_info): Likewise.
1019 (__enum_type_info): Likewise.
1020 (__ptr_to_member_type_info): Likewise.
1021 (__fundamental_type_info::~__fundamental_type_info): Define.
1022 (__pointer_type_info::~__pointer_type_info): Likewise.
1023 (__reference_type_info::~__reference_type_info): Likewise.
1024 (__array_type_info::~__array_type_info): Likewise.
1025 (__function_type_info::~__function_type_info): Likewise.
1026 (__enum_type_info::~__enum_type_info): Likewise.
1027 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
1028 (__pointer_type_info::do_catch): Define new function.
1029 (__ptr_to_member_type_info::do_catch): Define new function.
1030
1031 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
1032 (__is_pointer): Likewise.
1033
1034 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
1035
1036 2000-01-30 Mark Mitchell <mark@codesourcery.com>
1037
1038 * cp/class.c (build_vtable): Rename to build_primary_vtable.
1039 (prepare_fresh_vtable): Rename to build_secondary_vtable.
1040 (make_new_vtable): New function.
1041 (modify_vtable_entry): Handle generation of new vtables correctly.
1042 (modify_one_vtable): Remove unused parameter.
1043 (dfs_fixup_vtable_deltas): Likewise.
1044 (override_one_vtable): Use build_secondary_vtable.
1045 (finish_struct_1): Use build_primary_vtable and
1046 build_secondary_vtable.
1047
1048 2000-01-28 Ulrich Drepper <drepper@redhat.com>
1049
1050 * cp/decl.c: Adjust variable names, comments, help strings.
1051
1052 2000-01-29 Nathan Sidwell <nathan@acm.org>
1053
1054 * new2.cc (operator delete[]): Use operator delete, don't assume
1055 implementation.
1056
1057 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
1058
1059 * class.c (build_vtbl_initializer): Add argument to
1060 build_vtable_entry call.
1061
1062 2000-01-27 Mark Mitchell <mark@codesourcery.com>
1063
1064 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
1065 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
1066 (BF_DELTA): New macro.
1067 (BF_VCALL_INDEX): Likewise.
1068 (BF_FN): Likewise.
1069 (THUNK_VCALL_OFFSET): Likewise.
1070 (make_thunk): Change prototype.
1071 * class.c (build_vtable_entry): Integrate
1072 build_vtable_entry_for_fn. Handle vcall indices.
1073 (build_vtable_entry_for_fn): Remove.
1074 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
1075 BF_VCALL_INDEX, BF_FN.
1076 (modify_vtable_entry): Integrate common code from
1077 modify_one_vtable and dfs_fixup_vtable_deltas.
1078 (add_virtual_function): Set BF_VCALL_INDEX.
1079 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
1080 and BF_FN.
1081 (modify_one_vtable): Simplify.
1082 (dfs_fixup_vtable_deltas): Likewise.
1083 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
1084 * method.c (make_thunk): Handle vcall indices.
1085
1086 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
1087
1088 Compiler side new abi rtti (not enabled).
1089 * cp-tree.h (new_abi_rtti_p): New macro.
1090 (emit_support_tinfos): Prototype new function.
1091 (tinfo_decl_p): Likewise.
1092 (emit_tinfo_decl): Likwise.
1093 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
1094 macros.
1095 (doing_runtime): New local static.
1096 (init_rtti_processing): Add new-abi initializer.
1097 (get_tinfo_decl): Add new-abi logic.
1098 (tinfo_from_decl): Likewise.
1099 (build_dynamic_cast_1): Likewise.
1100 (qualifier_flags): New static function.
1101 (tinfo_base_init): Likewise.
1102 (generic_initializer): Likewise.
1103 (ptr_ref_initializer): Likewise.
1104 (ptmd_initializer): Likewise.
1105 (class_hint_flags): Likewise.
1106 (class_initializer): Likewise.
1107 (synthesize_tinfo_var): Likewise.
1108 (create_real_tinfo_var): Likewise.
1109 (create_pseudo_type_info): Likewise.
1110 (get_vmi_pseudo_type_info): Likewise.
1111 (create_tinfo_types): Likewise.
1112 (emit_support_tinfos): New global function.
1113 (tinfo_decl_p): New global predicate.
1114 (emit_tinfo_decl): New global function.
1115 * class.c (set_rtti_entry): Generalize for old and new rtti.
1116 (build_vtbl_initializer): Likewise.
1117 * decl2.c (finish_file): Likewise.
1118
1119 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
1120
1121 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
1122 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
1123
1124 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
1125
1126 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
1127 for scopes.
1128
1129 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
1130
1131 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
1132
1133 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
1134
1135 * optimize.c (calls_setjmp_r): Supply new argument
1136 to special_function_p.
1137
1138 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1139
1140 * call.c: PROTO -> PARAMS.
1141 * class.c: Likewise.
1142 * cp-tree.h: Likewise.
1143 * cvt.c: Likewise.
1144 * decl.c: Likewise.
1145 * decl.h: Likewise.
1146 * decl2.c: Likewise.
1147 * dump.c: Likewise.
1148 * errfn.c: Likewise.
1149 * error.c: Likewise.
1150 * except.c: Likewise.
1151 * expr.c: Likewise.
1152 * init.c: Likewise.
1153 * input.c: Likewise.
1154 * lex.c: Likewise.
1155 * lex.h: Likewise.
1156 * method.c: Likewise.
1157 * optimize.c: Likewise.
1158 * parse.y: Likewise.
1159 * pt.c: Likewise.
1160 * repo.c: Likewise.
1161 * rtti.c: Likewise.
1162 * search.c: Likewise.
1163 * semantics.c: Likewise.
1164 * spew.c: Likewise.
1165 * tree.c: Likewise.
1166 * typeck.c: Likewise.
1167 * typeck2.c: Likewise.
1168 * xref.c: Likewise.
1169
1170 2000-01-25 Richard Henderson <rth@cygnus.com>
1171
1172 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
1173
1174 2000-01-25 Mark Mitchell <mark@codesourcery.com>
1175
1176 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
1177 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
1178 (struct vcall_offset_data_s): New type.
1179 (dfs_vcall_offset_queue_p): New function.
1180 (dfs_build_vcall_offset_vtbl_entries): Likewise.
1181 (build_vcall_offset_vtbl_entries): Likewise.
1182 (layout_vtable_decl): Likewise.
1183 (num_vfun_entries): Likewise.
1184 (num_extra_vtbl_entries): Add the entries for vcall offsets.
1185 (build_vtbl_initializer): Likewise.
1186 (dfs_finish_vtabls): Use layout_vtable_decl.
1187 (modify_one_vtables): Always duplicate vtables under the new ABI.
1188 (finish_struct_1): Use layout_vtable_decl.
1189
1190 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1191
1192 * decl.c (member_function_or_else): Change third arg from a format
1193 specifier to an `enum overload_flags'. Callers changed.
1194
1195 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
1196
1197 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
1198 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
1199 build_const_cast, get_delta_difference, check_return_expr): Avoid
1200 ANSI string concatenation usage.
1201
1202 2000-01-24 Mark Mitchell <mark@codesourcery.com>
1203
1204 * class.c (layout_class_type): Put the fields required to make a
1205 class non-empty at the end, not the beginning, of the TYPE_FIELDs
1206 list.
1207
1208 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
1209
1210 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
1211 template.
1212
1213 * decl2.c (mark_used): Do instantiate inlines that have been
1214 explicitly instantiated.
1215
1216 2000-01-24 Richard Henderson <rth@cygnus.com>
1217
1218 * call.c (build_over_call): Use expand_tree_builtin.
1219 * typeck.c (build_function_call_real): Likewise.
1220 (build_binary_op_nodefault): Handle unordered compares.
1221
1222 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
1223
1224 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
1225 cp_tree_index values.
1226 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
1227 New global node #defines for them.
1228 * rtti.c (call_void_fn): Replace with ...
1229 (build_runtime_decl): ... new static function.
1230 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
1231 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
1232 (build_dynamic_cast_1): Always produce correctly typed result.
1233 Explicitly produce type_info addresses. Use dynamic_cast_node.
1234 * exception.cc (__throw_bad_cast): Return `void *'.
1235 (__throw_bad_typeid): Return `const type_info &'.
1236
1237 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
1238
1239 * cp-tree.h (get_vtable_decl): Prototype new function.
1240 * class.c (get_vtable_decl): New function. Broken out from ...
1241 (build_vtable): ... here. Use it.
1242 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
1243 by get_vtable_decl.
1244
1245 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
1246
1247 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
1248 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
1249 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
1250 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
1251 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
1252 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
1253 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
1254 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
1255 (CPTI_TINFO_VAR_ID): New enumeration.
1256 (__tp_desc_type_node, __access_mode_type_node,
1257 __bltn_desc_type_node, __user_desc_type_node,
1258 __class_desc_type_node, __ptr_desc_type_node,
1259 __attr_desc_type_node, __func_desc_type_node,
1260 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
1261 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
1262 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
1263 enum_desc_type_node, class_desc_type_node,
1264 si_class_desc_type_node, vmi_class_desc_type_node,
1265 ptmd_desc_type_node, base_desc_type_node): New #defines.
1266 (tinfo_fn_id, tinfo_fn_type): Rename to ...
1267 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
1268 (tinfo_var_id): New enumeration.
1269 (DECL_TINFO_FN_P): Augment comment.
1270 * decl.c (cp_global_trees): Adjust documentation.
1271 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
1272 tinfo_decl_type and tinfo_var_id.
1273 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
1274 (build_typeid): Remove unused variable.
1275 (get_tinfo_var): Use tinfo_var_id.
1276 (tinfo_name): New static function.
1277 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
1278 (tinfo_from_decl): Likewise.
1279 (get_base_offset): New static function, broken out of
1280 expand_class_desc.
1281 (expand_si_desc): Use tinfo_name.
1282 (expand_class_desc): Likewise. Lose local static variable.
1283 Use base_desc_type_node. Use get_base_offset.
1284 (expand_ptr_desc): Use tinfo_name.
1285 (expand_attr_desc): Likewise.
1286 (expand_generic_desc): Likewise.
1287
1288 * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
1289 * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
1290
1291 2000-01-23 Mark Mitchell <mark@codesourcery.com>
1292
1293 * cp-tree.h (__eprintf): Remove declaration.
1294 * tree.c (__eprintf): Remove definition.
1295
1296 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
1297 Mark Mitchell <mark@codesourcery.com>
1298
1299 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
1300 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
1301
1302 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
1303
1304 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
1305
1306 2000-01-23 Mark Mitchell <mark@codesourcery.com>
1307
1308 * cp-tree.h (register_dtor_fn): New function.
1309 * decl.c (destroy_local_static): Rename to ...
1310 (register_dtor_fn): ... this. Give it external linkage.
1311 (expand_static_init): Use it.
1312 * decl2.c (do_static_initialization): Likewise, if using
1313 __cxa_atexit.
1314 (do_static_destruction): Check that __cxa_atexit is not in use.
1315 (finish_file): Don't call do_static_destruction if using
1316 __cxa_atexit.
1317
1318 * typeck.c (convert_arguments): Restore two-message error
1319 reporting.
1320
1321 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
1322
1323 Remap dynamic cast hint values to be consistent across ABIs.
1324 * search.c (dynamic_cast_base_recurse): Remap generated value.
1325 (get_dynamic_cast_base_type): Adjust documentation.
1326 * tinfo.h (__user_type_info::dyncast): Likewise.
1327 (__user_type_info::find_public_subobj): Remap BOFF meaning.
1328 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
1329 (__class_type_info::do_dyncast): Likewise.
1330 (__class_type_info::do_find_public_subobj): Likewise.
1331 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
1332
1333 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
1334
1335 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
1336
1337 * typeck2.c (incomplete_type_error): Restore previous
1338 cp_error and cp_error_at call sequence.
1339
1340 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
1341
1342 * class.c (dump_class_hierarchy): Make format agree with argument;
1343 cast pointer to unsigned long and print with %lx.
1344
1345 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
1346
1347 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
1348
1349 * typeck.c (composite_pointer_type, common_type,
1350 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
1351 build_function_call_real, convert_arguments,
1352 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
1353 build_unary_op, mark_addressable, build_compound_expr,
1354 build_static_cast, build_reinterpret_cast, build_const_cast,
1355 build_c_cast, build_modify_expr, get_delta_difference,
1356 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
1357 'ISO C++'. Fusion consecutive calls to diagnotic message routines
1358 into a single one.
1359 * typeck2.c (readonly_error, abstract_virtuals_error,
1360 process_init_constructor, check_for_new_type): Likewise.
1361
1362 2000-01-19 Mark Mitchell <mark@codesourcery.com>
1363
1364 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
1365 VAR_DECLs.
1366
1367 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
1368
1369 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
1370 (build_x_typeid): Likewise.
1371 (get_tinfo_fn): Likewise.
1372 (get_tinfo_fn_unused): Rename to ...
1373 (get_tinfo_decl): ... here.
1374 * rtti.c (build_headof): Replace logic error with assertion.
1375 (get_tinfo_fn_dynamic): Rename to ...
1376 (get_tinfo_decl_dynamic): ... here. Make static. Use
1377 complete_type_or_else.
1378 (build_x_typeid): Move into ...
1379 (build_typeid): ... here. Adjust call to
1380 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
1381 throw_bad_typeid expression.
1382 (get_tinfo_fn_unused): Rename to ...
1383 (get_tinfo_decl): ... here. Adjust comment.
1384 (get_tinfo_fn): Delete.
1385 (tinfo_from_decl): New static function.
1386 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
1387 (get_typeid): Use complete_type_or_else.
1388 (build_dynamic_cast_1): Adjust calls to
1389 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
1390 * parse.y (primary): Adjust call to build_typeid.
1391 * except.c (build_eh_type_type_ref): Adjust call to
1392 get_tinfo_decl. Mark as used.
1393 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
1394 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
1395 * parse.c: Regenerated.
1396
1397 2000-01-17 Mark Mitchell <mark@codesourcery.com>
1398
1399 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
1400 calling convention.
1401 (resolves_to_fixed_type_p): Document calling convention.
1402 * rtti.c (build_x_typeid): Initialize NONNULL.
1403
1404 * cp-tree.h (build_shared_int_cst): New function.
1405 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
1406 * class.c (modify_vtable_entry): Likewise.
1407 (add_virtual_function): Split out code to generated shared
1408 INTEGER_CSTs to build_share_int_cst.
1409 (modify_all_vtables): Handle all the overridden functions here.
1410 Add overridden functions from non-primary virtual bases to the
1411 primary vtable.
1412 (finish_struct_1): Adjust call to modify_all_vtables. Add
1413 overridden functions from non-primary bases to the vtable.
1414 * tree.c (build_shared_int_cst): New function.
1415
1416 * cp-tree.h (scratchalloc): Remove.
1417 (build_scratch_list): Likewise.
1418 * call.c (convert_class_to_reference): Replace build_scratch_list
1419 and build_expr_list with build_tree_list.
1420 (add_candidate): Replace scratchalloc with expralloc. Note memory
1421 leak.
1422 (build_user_type_conversion_1): Replace build_scratch_list
1423 and build_expr_list with build_tree_list.
1424 (build_new_op): Likewise.
1425 (build_op_delete_call): Likewise.
1426 (convert_like): Likewise.
1427 * cvt.c (ocp_convert): Likewise.
1428 * decl.c (start_decl): Likewise.
1429 (start_function): Likewise.
1430 (finish_destructor_body): Likewise.
1431 (maybe_build_cleanup_1): Likewise.
1432 * decl2.c (reparse_decl_as_expr): Likewise.
1433 * init.c (perform_member_init): Likewise.
1434 (expand_cleanup_for_base): Likewise.
1435 (build_builtin_delete_call): Likewise.
1436 (build_new_1): Likewise.
1437 (build_delete): Likewise.
1438 * method.c (do_build_assign_ref): Likewise.
1439 * parse.y (already_scoped_stmt): Likewise.
1440 (nontrivial_exprlist): Likewise.
1441 (net_initializer): Likewise.
1442 (initlist): Likewise.
1443 * parse.c: Regenerated.
1444 * rtti.c (build_x_typeid): Likewise.
1445 (build_dynamic_cast_1): Likewise.
1446 * typeck.c (build_x_compound_expr): Likewise.
1447 (build_static_cast): Likewise.
1448 (build_modify_expr): Likewise.
1449
1450 * cp-tree.h (DECL_VINDEX): Add documentation.
1451 * class.c (build_vtable_entry): Likewise.
1452 (start_vtable): Add comment.
1453 (add_virtual_function): Replace pending_hard_virtuals with
1454 overridden_virtuals and pending_virtuals with new_virtuals.
1455 Replace redundant assignments with assertions.
1456 (check_for_override): Add comment.
1457 (check_bases_and_members): Replace pending_hard_virtuals with
1458 overridden_virtuals and pending_virtuals with new_virtuals.
1459 (create_vtbl_ptr): Likewise.
1460 (layout_class_type): Likewise.
1461 (finish_struct_1): Likewise. Add comments.
1462
1463 2000-01-16 Mark Mitchell <mark@codesourcery.com>
1464
1465 * class.c (finish_struct_1): Replace redundant code with
1466 assertions.
1467
1468 * cp-tree.h (flag_new_abi): Move.
1469 (flag_use_cxa_atexit): Likewise.
1470 (flag_honor_std): Likewise.
1471 (flag_rtti): Likewise.
1472 (vbase_offsets_in_vtable_p): Define.
1473 (vptrs_present_everywhere_p): Likewise.
1474 (TYPE_CONTAINS_VPTR_P): Likewise.
1475 (dfs_walk_real): Declare.
1476 * class.c (build_vbase_pointer_fields): Check
1477 vbase_offsets_in_vtable_p.
1478 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
1479 BINFO_VPTR_FIELD.
1480 (build_vbase_offset_vtbl_entries): Simplify.
1481 (build_vbase_offset_vtbl_entries): Adjust.
1482 (build_vbase_pointer): Add ability to look up vbase offsets in
1483 vtable.
1484 (start_vtable): New function.
1485 (add_virtual_function): Use it.
1486 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
1487 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
1488 (build_vtbl_initializer): Take the type of the complete object as
1489 input. Use it to correctly calculate vbase offsets.
1490 (dfs_finish_vtbls): Pass the complete type to
1491 build_vtbl_initializer.
1492 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
1493 (create_vtable_ptr): Create a vtable even if there are no
1494 new virtual functions, under the new ABI.
1495 (finish_struct_1): Likewise.
1496 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
1497 * decl.c (exapnd_static_init): Remove call to
1498 preserve_initializer.
1499 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
1500 vtables.
1501 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
1502 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
1503 (construct_virtual_bases): Don't initialize virtual base pointers
1504 under the new ABI.
1505 (build_aggr_init): Clean up comment.
1506 (expand_aggr_init_1): Likewise.
1507 * rtti.c (expand_class_desc): Store the virtual function table
1508 index where the vbase offset lives in the offset field.
1509 * search.c (dfs_walk_real): Make it global.
1510 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
1511 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
1512
1513 * tinfo.h (USItype): Make it signed under the new ABI.
1514 * tinfo.cc (convert_to_base): New function. Encapsulate base
1515 conversion logic here.
1516 (__class_type_info::do_upcast): Use it.
1517 (__class_type_info::do_dyncast): Likewise.
1518 (__class_type_info::do_find_public_subobj): Likewise.
1519
1520 * init.c (construct_virtual_bases): Don't look up the addresses of
1521 virtual bases at run-time.
1522
1523 * class.c (build_vbase_pointer): Relocate.
1524 (build_vbase_pointer_fields): Likewise.
1525 (dfs_build_vbase_offset_vtbl_entries): Likewise.
1526 (build_vbase_offset_vtbl_entries): Likewise.
1527
1528 * decl.c (init_decl_processing): Complain if -fnew-abi
1529 -fno-vtable-thunks is used.
1530
1531 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
1532 flag_new_abi.
1533
1534 2000-01-15 Mark Mitchell <mark@codesourcery.com>
1535
1536 * cp-tree.h (num_extra_vtbl_entries): New function.
1537 (size_extra_vtbl_entries): Likewise.
1538 (dfs_vtable_path_unmark): Likewise.
1539 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
1540 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
1541 * class.c (num_extra_vtbl_entries): New function.
1542 (size_extra_vtbl_entries): Likewise.
1543 (dfs_build_vbase_offset_vtbl_entries): New function.
1544 (build_vbase_offset_vtbl_entries): Likewise.
1545 (build_vtbl_initializer): Use it.
1546 (finish_struct_1): Adjust vtable sizes (using
1547 num_extra_vtbl_entries).
1548 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
1549 THUNK_DECL is non-NULL before expanding it.
1550 * init.c (expand_virtual_init): Adjust the vtable pointer by
1551 size_extra_vtbl_entries before storing it.
1552 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
1553 Handle TREE_LIST parameters here, not in the dfs_* functions.
1554 (dfs_unmarked_real_bases_queue_p): Adjust.
1555 (dfs_marked_real_bases_queue_p): Likewise.
1556 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
1557 (dfs_vtable_path_marked_real_bases_queue_p): New function.
1558 (dfs_vtable_path_unmark): Likewise.
1559
1560 2000-01-14 Mark Mitchell <mark@codesourcery.com>
1561
1562 * optimize.c (copy_body_r): Clear the operand three of a
1563 TARGET_EXPR when copying it.
1564
1565 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1566
1567 * method.c (build_decl_overload_real): Check whether we are in ::
1568 before returning __builtin_new/delete.
1569
1570 2000-01-13 Mark Mitchell <mark@codesourcery.com>
1571
1572 * pt.c (tsubst_friend_function): Improve comment.
1573 (instantiate_decl): Avoid crashing when a "nested" function is
1574 instantiated from the top level.
1575
1576 * dump.c (dqeueue_and_dump): Dump
1577 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
1578
1579 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1580
1581 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
1582
1583 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
1584
1585 * g++spec.c (lang_specific_driver): Add -fnew-abi if
1586 ENABLE_NEW_GXX_ABI defined.
1587 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
1588 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
1589 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
1590
1591 2000-01-12 Mark Mitchell <mark@codesourcery.com>
1592
1593 * decl.c (start_cleanup_fn): Call pushdecl.
1594
1595 * call.c (convert_class_to_reference): Fix typos.
1596 (build_conditional_expr): Handle errors gracefully.
1597 * class.c (push_nested_class): Likewise.
1598 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
1599 (DECL_THIS_EXTERN): Use it.
1600 (DECL_THIS_STATIC): Likewise.
1601 * cvt.c (convert_to_void): Handle errors gracefully.
1602 (build_expr_type_conversion): Likewise.
1603 * decl.c (maybe_push_decl): Likewise.
1604 (start_decl_1): Likewise.
1605 (require_complete_types_for_parms): Likewise.
1606 * parse.y (structsp): Likewise.
1607 (base_class): Likewise.
1608 * parse.c: Regenerated.
1609 * pt.c (finish_member_template_decl): Likewise.
1610 * typeck.c (decay_conversion): Likewise.
1611
1612 * cp-tree.h (dfs_skip_vbases): New function.
1613 (find_vbase_instance): Likewise.
1614 * class.c (determine_primary_base): Allow a nearly empty base to
1615 serve as a primary base class under the new ABI.
1616 (get_class_offset_1): Rename to ...
1617 (dfs_get_class_offset): ... this. Simplify. Don't issue error
1618 messages here.
1619 (get_class_offset): Use it. Issue error messages here.
1620 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
1621 find the right copies of virtual bases.
1622 (fixup_vtable_deltas1): Rename to ...
1623 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
1624 bases as primary bases.
1625 (fixup_vtable_deltas): Remove.
1626 (override_one_vtable): Handle virtual bases as primary bases.
1627 (merge_overrides): Likewise.
1628 (finish_struct_1): Likewise.
1629 (dump_class_hierarchy): Dump primary-ness of bases as well.
1630 * search.c (mark_primary_bases): Use a pre-order traversal to
1631 handle primary virtual bases.
1632 (dfs_skip_vbases): New fiunction.
1633 (expand_upcast_fixups): Adjust to handle primary virtual bases.
1634 (fixup_virtual_upcast_offsets): Likewise.
1635 (fixup_all_virtual_upcast_offsets): Likewise.
1636 (dfs_find_vbase_instances): New function.
1637 (find_vbase_instance): Likewise.
1638
1639 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
1640
1641 * lex.c (DIR_SEPARATOR): Delete macro.
1642
1643 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
1644
1645 * decl2.c (lang_decode_option): Handle automatic line wrapping
1646 option.
1647
1648 2000-01-11 Mark Mitchell <mark@codesourcery.com>
1649
1650 * friend.c (do_friend): Don't resolve scopes when processing
1651 template declarations, even if the qualifying scope doesn't
1652 involve template parameters.
1653
1654 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
1655
1656 * class.c (dfs_modify_vtables_queue_p): Remove.
1657 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
1658 and dfs_marked_real_bases_queue_p instead of
1659 dfs_modify_vtables_queue_p.
1660
1661 * class.c (build_vbase_path): Simplify.
1662 (dfs_propagate_binfo_offsets): New function.
1663 (propagate_binfo_offsets): Use it.
1664 (remove_base_field): Simplify.
1665 (dfs_set_offset_for_vbases): Remove.
1666 (dfs_set_offset_for_shared_vbases): New function.
1667 (dfs_set_offset_for_unshared_vbases): Likewise.
1668 (layout_virtual_bases): Use them.
1669 (layout_basetypes): Don't call propagate_binfo_offsets.
1670 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
1671 for the vbases.
1672
1673 * class.c (build_base_field): New function, split out from ...
1674 (build_base_fields): ... here. Use it. Allocate primary bases
1675 first, under the new ABI.
1676 (get_vtable_entry): Remove.
1677 (remove_base_field): New function, split out from ...
1678 (remove_base_fields): ... here. Adjust since primary bases come
1679 first under the new ABI.
1680
1681 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
1682 (initialize_vtbl_ptrs): New function.
1683 (expand_indirect_vtbls_init): Change prototype.
1684 (convert_pointer_to_vbase): Declare.
1685 * init.c (expand_direct_vtbls_init): Remove.
1686 (dfs_initialize_vtbl_ptrs): New function.
1687 (initialize_vtbl_ptrs): Likewise.
1688 (emit_base_init): Use initialize_vtbl_ptrs.
1689 * search.c (convert_pointer_to_vbase): Make it global.
1690 (expand_indirect_vtbls_init): Remove vtable initialization code.
1691 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
1692
1693 * class.c (dfs_finish_vtbls): New function.
1694 (finish_vtbls): Use it.
1695 (dump_class_hierarchy): New function.
1696
1697 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
1698 (BINFO_VBASE_PRIMARY_P): New macro.
1699 (BINFO_VIRTUALS): Add to documentation.
1700 (SET_BINFO_PRIMARY_MARKED_P): Remove.
1701 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
1702 (dfs_mark_primary_bases_queue_p): Likewise.
1703 (dfs_unmarked_real_bases_queue_p): New function.
1704 (dfs_marked_real_bases_queue_p): Likewise.
1705 * search.c (dfs_mark_primary_bases): Adjust.
1706 (mark_primary_bases): Likewise.
1707 (get_shared_vbase_if_not_primary): New function.
1708 (dfs_unmarked_real_bases_queue_p): Likewise.
1709 (dfs_marked_real_bases_queue_p): Likewise.
1710 (dfs_get_pure_virtuals): Simplify.
1711 (get_pure_virtuals): Likewise.
1712
1713 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1714
1715 * lex.c: Include tm_p.h.
1716
1717 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
1718
1719 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
1720
1721 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
1722
1723 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
1724 * pt.c (instantiate_decl): Defer comdat templates that might not be
1725 needed.
1726
1727 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
1728 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
1729 (finish_file): Likewise.
1730
1731 * decl2.c (import_export_class): Undo 12/14 change.
1732
1733 * error.c (dump_decl): operator new, not operatornew.
1734
1735 * class.c (field_decl_cmp): A nontype is "greater" than a type.
1736 * search.c (lookup_field_1): Look for the last field with the
1737 desired name.
1738
1739 2000-01-05 Nathan Sidwell <nathan@acm.org>
1740
1741 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
1742 FUNCTION_DECL.
1743
1744 2000-01-05 Nathan Sidwell <nathan@acm.org>
1745
1746 * typeck.c (build_static_cast): Don't strip target qualifiers
1747 when casting from a class.
1748
1749 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1750
1751 * class.c (warn_hidden): Initialize variable `fndecl'.
1752
1753 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
1754
1755 * decl.c (flag_isoc9x): New variable to be able to use code in
1756 c-common.c. For now always zero.
1757
1758 2000-01-03 Mark Mitchell <mark@codesourcery.com>
1759
1760 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
1761 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
1762 or unshare_base_binfos for virtual bases here.
1763 * search.c (dfs_get_vbase_types): Do it here.
1764 (get_vbase_types): Adjust.
1765
1766 2000-01-02 Mark Mitchell <mark@codesourcery.com>
1767
1768 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
1769 (BINFO_PRIMARY_MARKED_P): Use flag 5.
1770 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
1771 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
1772 (unmark_primary_bases): Remove declaration.
1773 (unmarkedp): Declare.
1774 (dfs_vbase_unmark): Likewise.
1775 * class.c (determine_primary_base): Return immediately if there
1776 are no base classes. Call mark_primary_bases here.
1777 (modify_all_direct_vtables): Remove.
1778 (modify_all_indirect_vtables): Remove.
1779 (dfs_modify_vtables_queue_p): New function.
1780 (dfs_modify_vtables): New function.
1781 (modify_all_vtables): Use them.
1782 (build_base_fields): Build FIELD_DECLs for primary virtual base
1783 classes.
1784 (create_vtable_ptr): Don't call determine_primary_base here.
1785 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
1786 (dfs_set_offset_for_vbases): ... this.
1787 (layout_virtual_bases): Use it.
1788 (layout_class_type): Call determine_primary_base here.
1789 * search.c (unmarkedp): Make it global.
1790 (shared_marked_p): Simplify.
1791 (shared_unmarked_p): Likewise.
1792 (dfs_primary_bases_queue_p): Remove.
1793 (dfs_unmark_primary_bases): Likewise.
1794 (unmark_primary_bases): Likewise.
1795 (mark_primary_bases): Simplify.
1796 (get_pure_virtuals): Don't call mark_primary_bases here.
1797 (dfs_vbase_unmark): New function.
1798 (get_vbase_types): Simplify.
1799
1800 * class.c (struct base_info): Remove.
1801 (determine_primary_base): Take has_virtual_p rather than a
1802 base_info as input. Don't calculate max_has_virtual.
1803 (finish_struct_bits): Remove max_has_virtual argument.
1804 (create_vtable_ptr): Remove max_has_virtual_p argument.
1805 (layout_virtual_bases): Remove max argument.
1806 (layout_basetypes): Likewise.
1807 (layout_class_type): Remove max_has_virtual_p argument.
1808 (finish_struct_1): Remove max_has_virtual.
1809
1810 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
1811 (layout_basetypes): Remove.
1812 * class.c (propagate_binfo_offsets): Moved here from tree.c.
1813 Update to handle primary virtual bases.
1814 (remove_base_fields): New function, split out from
1815 layout_basetypes.
1816 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
1817 (layout_virtual_bases): New function, split out from
1818 layout_basetypes. Update to handle primary virtual bases.
1819 (layout_basetypes): Moved here from tree.c. Use
1820 remove_base_fields and layout_virtual_bases.
1821 * search.c (dfs_mark_primary_bases_queue_p): New function.
1822 (mark_primary_bases): Use it.
1823 * tree.c (CEIL): Remove.
1824 (propagate_binfo_offsets): Remove.
1825 (layout_basetypes): Remove.
1826
1827 2000-01-01 Mark Mitchell <mark@codesourcery.com>
1828
1829 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
1830 (BINFO_PRIMARY_MARKED_P): New macro.
1831 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
1832 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
1833 (mark_primary_bases): New function.
1834 (unmark_primary_bases): Likewise.
1835 * search.c (get_abstract_virtuals_1): Remove.
1836 (dfs_mark_primary_bases): New function.
1837 (mark_primary_bases): Likewise.
1838 (dfs_unmark_primary_bases): Likewise.
1839 (unmark_primary_bases): Likewise.
1840 (dfs_get_pure_virtuals): Likewise.
1841
1842 2000-01-01 Mark Mitchell <mark@codesourcery.com>
1843
1844 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
1845 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
1846 (modify_one_vtable): Adjust.
1847 (fixup_vtable_deltas1): Likewise.
1848 (override_one_vtable): Likewise.
1849 * search.c (get_abstract_virtuals_1): Likewise.
1850 (get_pure_virtuals): Likewise.
1851 (expand_upcast_fixups): Likewise.
1852 * tree.c (debug_binfo): Likewise.
1853
1854 * class.c (build_vtable): Don't return a value. Don't rebuild
1855 vtables for bases that have already been handled.
1856 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
1857 already been handled.
1858 (modify_one_vtable): Adjust accordingly.
1859 (fixup_vtable_deltas1): Likewise.
1860 (finish_struct_1): Likewise.
1861
1862 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1863
1864 * call.c (build_new_method_call): Also check destructors.
1865
1866 1999-12-31 Mark Mitchell <mark@codesourcery.com>
1867
1868 * cp-tree.h (VF_NORMAL_VALUE): Remove.
1869 * class.c (struct base_info): Remove vfield, vfields, and rtti.
1870 (set_primary_base): New function, split out from ...
1871 (finish_base_struct): ... here. Rename to ...
1872 (determine_primary_base): ... this. Simplify.
1873 (create_vtable_ptr): Tweak accordingly.
1874 (finish_struct_1): Simplify.
1875
1876 * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation.
1877 (CLASSTYPE_N_BASECLASSES): Likewise.
1878 (BINFO_FOR_VBASE): New macro.
1879 (get_vbase_types): Change prototype.
1880 * class.c (build_vbase_path): Use BINFO_FOR_VBASE.
1881 (prepare_fresh_vtable): Likewise.
1882 (finish_vtbls): Likewise.
1883 (get_class_offset_1): Likewise.
1884 (modify_all_indirect_vtables): Likewise.
1885 (build_vbase_pointer_fields): Likewise.
1886 * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here.
1887 * init.c (sort_base_init): Use BINFO_FOR_VBASE.
1888 (expand_member_init): Likewise.
1889 * search.c (get_base_distance): Likewise.
1890 (lookup_field_queue_p): Likewise.
1891 (virtual_context): Likewise.
1892 (get_vbase_types): Don't return a value. Set
1893 CLASSTYPE_VBASECLASSES here.
1894 * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE.
1895
1896 1999-12-30 Mark Mitchell <mark@codesourcery.com>
1897
1898 * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS.
1899
1900 1999-12-29 Mark Mitchell <mark@codesourcery.com>
1901
1902 * class.c (create_vtable_ptr): Put the vtable at the beginning of
1903 the class, not the end, in the new ABI.
1904 * tree.c (propagate_binfo_offsets): Do the right thing for the new
1905 ABI.
1906
1907 1999-12-29 Mark Mitchell <mark@codesourcery.com>
1908
1909 * cp-tree.h (lang_type): Add nearly_empty_p. Adjust dummy.
1910 (CLASSTYPE_NEARLY_EMPTY_P): New macro.
1911 * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P.
1912 (check_field_decls): Likewise.
1913 (check_bases_and_members): Likewise.
1914
1915 1999-12-28 Mark Mitchell <mark@codesourcery.com>
1916
1917 * cp-tree.h (do_inline_function_hair): Remove.
1918 * class.c (layout_class_type): New function, split out from
1919 finish_struct_1.
1920 (fixup_pending_inline): Likewise.
1921 (fixup_inline_methods): New function.
1922 * method.c (fixup_pending_inline): Remove.
1923 (do_inline_function_hair): Likewise.
1924
1925 * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
1926 new ABI.
1927
1928 * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals.
1929 (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ...
1930 (CLASSTYPE_PURE_VIRTUALS): ... this.
1931 (lang_decl_flags): Replace abstract_virtual with pure_virtual.
1932 (DECL_ABSTRACT_VIRTUAL_P): Rename to ...
1933 (DECL_PURE_VIRTUAL_P): ... this.
1934 (get_abstract_virtuals): Rename to ...
1935 (get_pure_virtuals): ... this.
1936 * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with
1937 DECL_ABSTRACT_VIRTUAL_P. Replace CLASSTYPE_ABSTRACT_VIRTUALS with
1938 CLASSTYPE_PURE_VIRTUALS.
1939 * class.c (build_vtable_entry): Likewise.
1940 (finish_struct_bits): Likewise. Call get_pure_virtuals, not
1941 get_abstract_virtuals.
1942 (build_vtbl_initializer): Likewise.
1943 (override_one_vtable): Likewise.
1944 (check_methods): Likewise.
1945 * decl.c (duplicate_decls): Likewise.
1946 (redeclaration_error_message): Likewise.
1947 (lang_mark_tree): Likewise.
1948 * decl2.c (grok_function_init): Likewise.
1949 (import_export_vtable): Likewise.
1950 (import_expor_class): Likewise.
1951 * typeck2.c (abstract_virtuals_error): Likewise.
1952 * xref.c (GNU_xref_member): Likewise.
1953 * search.c (get_abstract_virtuals): Rename to get_pure_virtuals.
1954
1955 1999-12-26 Zack Weinberg <zack@wolery.cumb.org>
1956
1957 * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
1958 throughout.
1959
1960 1999-12-26 Mark Mitchell <mark@codesourcery.com>
1961
1962 * decl.c (store_return_init): Use mode of old RTL generated for
1963 DECL_RESULT, not the mode of DECL_RESULT itself.
1964 * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE
1965 for functions that used named return values.
1966
1967 1999-12-24 Mark Mitchell <mark@codesourcery.com>
1968
1969 * semantics.c (expand_body): Use
1970 note_deferral_of_defined_inline_function.
1971
1972 1999-12-22 Mark Mitchell <mark@codesourcery.com>
1973
1974 * dump.c (dequeue_and_dump): Handle CTOR_STMTs.
1975
1976 1999-12-22 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
1977
1978 * error.c (dump_decl): Support named return values.
1979
1980 1999-12-20 Mark Mitchell <mark@codesourcery.com>
1981
1982 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments.
1983 (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro.
1984 (CLASSTYPE_PRIMARY_BINFO): Likewise.
1985 * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF,
1986 TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here.
1987 (check_bases_and_members): Set them here instead.
1988 (create_vtable_ptr): New function, split out from ...
1989 (finish_struct_1): ... here. Use it. Tidy. Use
1990 CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO.
1991 * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as
1992 the first field in the class.
1993 * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES. Handle
1994 seeing TYPE_VFIELD as the first field in the class.
1995
1996 * cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
1997 (TYPE_POLYMORPHIC_P): ... this.
1998 (TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
1999 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
2000 (TREE_CALLS_NEW): Remove.
2001 (TREE_MANGLED): Likewise.
2002 * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
2003 and TYPE_POLYMORPHIC_P.
2004 * class.c (check_bases): Likewise.
2005 (finish_base_struct): Likewise.
2006 (finish_struct_bits): Likewise.
2007 (check_for_override): Likewise.
2008 (finish_struct_1): Likewise.
2009 (get_vfield_name): Likewise.
2010 * decl.c (xref_basetypes): Likewise.
2011 * decl2.c (import_export_class): Likewise.
2012 (import_export_decl): Likewise.
2013 * error.c (dump_function_decl): Likewise.
2014 * pt.c (instantiate_class_template): Likewise.
2015 * repo.c (repo_inline_used): Likewise.
2016 * rtti.c (build_headof): Likewise.
2017 (get_tinfo_fn_dynamic): Likewise.
2018 (build_x_typeid): Likewise.
2019 (get_tinfo_var): Likewise.
2020 (build_dynamic_cast_1): Likewise.
2021 (synthesize_tinfo_fn): Likewise.
2022 * search.c (lookup_field_1): Likewise.
2023 (dfs_debug_mark): Likewise.
2024 (maybe_suppress_debug_info): Likewise.
2025 * typeck.c (build_component_ref): Likewise.
2026 (build_component_addr): Likewise.
2027 * typeck2.c (process_init_constructor): Likewise.
2028
2029 1999-12-20 Nathan Sidwell <nathan@acm.org>
2030
2031 * typeck.c (strip_all_pointer_quals): New static function.
2032 (build_static_cast): Use it. Don't use at_least_as_qualified_p.
2033
2034 1999-12-16 Mark Mitchell <mark@codesourcery.com>
2035
2036 * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE.
2037 (dso_handle_node): New macro.
2038 (flag_use_cxa_atexit): New variable.
2039 (declare_global_var): New function.
2040 (start_anon_func): Remove declaration.
2041 (end_anon_func): Likewise.
2042 * decl.c (get_atexit_node): New function, split out from
2043 destroy_local_static. Handle flag_use_cxa_atexit.
2044 (get_dso_handle_node): Likewise.
2045 (start_cleanup_fn): Renamed from start_anon_func. Moved here from
2046 except.c. Handle flag_use_cxa_atexit.
2047 (end_cleanup_fn): Renamed from end_anon_func. Moved here from
2048 except.c.
2049 (declare_global_var): New variable.
2050 (destroy_local_static): Handle flag_use_cxa_atexit.
2051 * decl2.c (flag_use_cxa_atexit): New variable.
2052 (lang_f_options): Likewise.
2053 * except.c (start_anon_func): Remove.
2054 (end_anon_func): Liekwise.
2055 * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit.
2056 * rtti.c (get_tinfo_var): Use declare_global_var.
2057
2058 1999-12-16 Mark Mitchell <mark@codesourcery.com>
2059
2060 * class.c (check_field_decls): Don't return a value.
2061 (avoid_overlap): Moved here from tree.c.
2062 (build_base_fields): Likewise.
2063 (check_bases): New function, split out from finish_base_struct.
2064 (check_bases_and_members): New function, split out from
2065 finish_struct_1.
2066 (struct base_info): Remove cant_have_default_ctor,
2067 cant_have_const_ctor, cant_have_asn_ref.
2068 (finish_base_struct): Split semantic analysis into check_bases.
2069 (finish_struct_methods): Fix bogus assertion.
2070 (check_field_decls): Call finish_struct_anon here.
2071 (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES.
2072 (finish_struct_1): Use check_bases_and_members. Reorganize.
2073 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
2074 (build_base_fields): Don't declare.
2075 * tree.c (avoid_overlap): Remove.
2076 (build_base_fields): Likewise.
2077
2078 * optimize.c (struct inline_data): Remove scope_stmt.
2079 (remap_block): Don't use insert_block_after_note. Don't update
2080 scope_stmt.
2081 (expand_call_inline): Don't update scope_stmt.
2082 (optimize_function): Don't initialize scope_stmt.
2083 * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
2084 NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.
2085
2086 1999-12-15 Mark Mitchell <mark@codesourcery.com>
2087
2088 * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS
2089 out of the class, rather than taking them as parameters.
2090 (build_vbase_pointer_fields): Move here from tree.c.
2091 (build_vtbl_or_vbase_field): New function.
2092 (check_methods): Likewise.
2093 (remove_zero_width_bitfields): Likewise.
2094 (add_virtual_function): Use tree_cons instead of temp_tree_cons.
2095 (delete_duplicate_fields_1): Tidy. Don't delete duplicate
2096 USING_DECLs here.
2097 (finish_struct_methods): Handle the case where there are no
2098 methods here.
2099 (get_basefndecls): Use tree_cons instead of temp_tree_cons.
2100 (check_field_decls): Call delete_duplicate_fields here.
2101 (finish_struct_1): Tidy. Use check_methods and
2102 remove_zero_width_bitfields.
2103 * cp-tree.h (build_vbase_pointer_fields): Remove.
2104 * decl.c (grokdeclarator): Use tree_cons instead of
2105 temp_tree_cons.
2106 * decl2.c (qualified_lookup_using_namespace): Use tree_cons
2107 instead of temp_tree_cons.
2108 * lex.c (cons_up_default_function): Remove dead code.
2109 * method.c (fixup_pending_inline): New function, split out from ...
2110 (do_inline_function_hair): ... here.
2111 * tree.c (build_vbase_pointer_fields): Remove.
2112
2113 1999-12-15 Jason Merrill <jason@casey.cygnus.com>
2114
2115 * tree.c (walk_tree): Walk operand subtrees in forward order.
2116 * optimize.c (expand_call_inline): Likewise.
2117 (optimize_function): Initialize id->scope_stmt to something useful.
2118 (remap_block): Assume id->scope_stmt has a useful value.
2119
2120 1999-12-15 Nathan Sidwell <nathan@acm.org>
2121
2122 * typeck.c (build_c_cast): Expand warning message. Move pointer
2123 alignment warning to after the cast. Don't warn about pointer
2124 alignment when given a pointer to incomplete.
2125
2126 1999-12-15 Richard Henderson <rth@cygnus.com>
2127
2128 * cp-tree.h (make_aggr_type): Declare.
2129 * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
2130 (make_aggr_type): New.
2131
2132 * decl.c (build_typename_type, init_decl_processing): Use it.
2133 (build_ptrmemfunc_type, xref_tag): Likewise.
2134 * except.c (call_eh_info): Likewise.
2135 * init.c (init_init_processing): Likewise.
2136 * pt.c (process_template_parm, lookup_template_class): Likewise.
2137 * rtti.c (expand_class_desc): Likewise.
2138 * semantics.c (begin_class_definition, finish_typeof): Likewise.
2139 * tree.c (copy_template_template_parm): Likewise.
2140
2141 1999-12-15 Jason Merrill <jason@yorick.cygnus.com>
2142
2143 * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
2144 sizeof (struct tree_common).
2145
2146 1999-12-14 Jason Merrill <jason@casey.cygnus.com>
2147
2148 * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the
2149 outermost block to point to the inlined function decl.
2150
2151 * error.c (dump_decl): operator==, not operator ==.
2152 (op_to_string): Likewise.
2153
2154 * decl.c (compute_array_index_type): Handle null name.
2155
2156 * decl2.c (ambiguous_decl): Fix to match comment.
2157 (lookup_using_namespace): Adjust.
2158
2159 * decl2.c (import_export_class): Don't ignore dllimport.
2160
2161 1999-12-14 Mark Mitchell <mark@codesourcery.com>
2162
2163 * class.c (check_field_decls): Split out from ...
2164 (finish_struct_1): ... here. Use it. Tidy.
2165
2166 * cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
2167 * optimize.c (copy_body_r): Pass it.
2168 * tree.c (remap_save_expr): Clear walk_subtrees for an
2169 already-handled SAVE_EXPR.
2170 (cp_unsave_r): Pass walk_subtrees to remap_save_expr.
2171
2172 * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
2173 * ir.texi (DECL_NAMESPACE_ALIAS): Document it.
2174
2175 * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION.
2176
2177 1999-12-14 Mumit Khan <khan@xraylith.wisc.edu>
2178
2179 * class.c (finish_base_struct): Allow multiple COM base classes
2180 as well as non-COM bases as long as it's not the leftmost.
2181
2182 1999-12-13 Mumit Khan <khan@xraylith.wisc.edu>
2183
2184 * lex.c (saving_parse_to_obstack): New global.
2185 (reinit_parse_for_block): Use.
2186 (reinit_parse_for_expr): Use.
2187 (check_newline): Use.
2188
2189 1999-12-13 Mark Mitchell <mark@codesourcery.com>
2190
2191 * optimize.c (initialize_inlined_parameters): Take FN to which the
2192 parameters belong as an argument.
2193 (expand_call_inline): Expand calls into the parameter
2194 initializations before pushing the function onto the list of
2195 functions we are presently expanding.
2196
2197 1999-12-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2198
2199 * class.c (get_vtable_name): Use a literal format string and
2200 VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT.
2201 (prepare_fresh_vtable): Likewise.
2202
2203 * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of
2204 VTABLE_NAME_FORMAT.
2205
2206 * decl.c (make_rtl_for_local_static): Remove unused variable `type'.
2207
2208 * init.c (build_vec_init): Initialize variable `try_body'.
2209
2210 * lex.c (yyerror): Don't call a variadic function with a
2211 non-literal format string.
2212
2213 * optimize.c (optimize_function): Call memset, not bzero.
2214
2215 * pt.c (for_each_template_parm_r): Add static prototype.
2216
2217 1999-12-09 Andreas Jaeger <aj@suse.de>
2218
2219 * except.c (expand_throw): Add static attribute to match
2220 prototype.
2221
2222 * Makefile.in (semantics.o): Add dependency on output.h.
2223 * semantics.c: Include output.h for declaration of
2224 make_function_rtl.
2225
2226 1999-12-09 Mark Mitchell <mark@codesourcery.com>
2227
2228 * decl.c (init_decl_processing): Reenable inlining on trees.
2229 (finish_function): Likewise.
2230 * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
2231 * semantics.c (simplify_aggr_init_exprs): New function.
2232 (expand_body): Use it.
2233 * tree.c (walk_tree): Special-case TARGET_EXPRs since they
2234 sometimes present the same sub-tree twice.
2235
2236 * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not
2237 `csl'.
2238
2239 * semantics.c (finish_switch_cond): Do conversions here, not ...
2240 * typeck.c (c_expand_start_case): Here.
2241
2242 * semantics.c (do_poplevel): Remove unused variable.
2243
2244 1999-12-06 Mark Mitchell <mark@codesourcery.com>
2245
2246 * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
2247 unless we're declaring the variable in question.
2248
2249 1999-12-06 Mark Mitchell <mark@codesourcery.com>
2250
2251 * decl.c (init_decl_processing): #if 0 last patch.
2252 (finish_function): Likewise.
2253
2254 1999-12-05 Mark Mitchell <mark@codesourcery.com>
2255
2256 * decl.c (init_decl_processing): Set flag_inline_trees if
2257 !flag_no_inline.
2258
2259 * cp-tree.h (calls_setjmp_p): Declare.
2260 * decl.c (finish_function): Mark functions that call setjmp as
2261 uninlinable.
2262 * optimize.c (calls_setjmp_r): New function.
2263 (calls_setjmp_p): Likewise.
2264
2265 1999-12-04 Mark Mitchell <mark@codesourcery.com>
2266
2267 * optimize.c (expand_call_inline): Wrap the expanded call in an
2268 EXPR_WITH_FILE_LOCATION node to get correct line numbers for
2269 inlined functions.
2270
2271 * optimize.c (inline_data): Remove fns_top. Add scope_stmt. Add
2272 in_target_cleanup_p.
2273 (remap_decl): New function.
2274 (remap_block): Likewise.
2275 (copy_scope_stmt): Likewise.
2276 (copy_body_r): Use remap_decl and copy_scope_stmt.
2277 (copy_body): Use VARRAY_TOP_TREE.
2278 (initialize_inlined_parameters): Likewise.
2279 (declare_return_variable): Likewise.
2280 (inlinable_function_p): Check flag_inline_trees.
2281 (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
2282 specially. Use VARRAY_PUSH_TREE. Create a BLOCK for the
2283 parameters of the inlined function.
2284 (optimize_function): Prevent recursion into partially complete
2285 functions.
2286
2287 * cp-tree.def (SCOPE_STMT): Take one operand.
2288 * cp-tree.h (SCOPE_STMT_BLOCK): New macro.
2289 (SCOPE_NULLIFIED_P): Redefine.
2290 (SCOPE_NO_CLEANUPS_P): New macro.
2291 (add_scope_stmt): Change prototype.
2292 * decl.c (poplevel): Tidy. Warn about unused variables here.
2293 Record SCOPE_STMT_BLOCKs.
2294 (finish_function): Keep DECL_INITIAL for functions that might be
2295 inlined.
2296 * ir.texi: Document SCOPE_NO_CLEANUPS_P.
2297 * semantics.c: Include rtl.h.
2298 (add_scope_stmt): Return the new scope statement and, for an
2299 end-of-scope statement, its matching begin statement. Don't set
2300 SCOPE_NULLIFIED_P.
2301 (do_pushlevel): Simplify, now that we are always
2302 function-at-a-time.
2303 (do_poplevel): Likewise. Record SCOPE_STMT_BLOCKs.
2304 (expand_stmt): Don't call expand_start_bindings or
2305 expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
2306 * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
2307 SCOPE_NULLIFIED_P.
2308 * Makefile.in (semantics.o): Depend on RTL_H.
2309
2310 * decl2.c (pending_statics_used): Make it a macro.
2311 (saved_inlines_used): Likewise.
2312 (finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
2313 (mark_inline_for_output): Likewise.
2314 (ssdf_decls_used): Remove.
2315 (start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
2316 (generate_ctor_or_dtor_function): Adjust accordingly.
2317
2318 1999-11-24 Geoffrey Keating <geoffk@cygnus.com>
2319 Greg McGary <gkm@gnu.org>
2320
2321 * decl.c (duplicate_decls): Merge
2322 DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
2323 DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
2324
2325 1999-12-02 Mike Stump <mrs@wrs.com>
2326
2327 * init.c (perform_member_init): Handle parse errors better.
2328
2329 1999-12-01 Mark Mitchell <mark@codesourcery.com>
2330
2331 * cp-tree.h (min_tree_cons): Remove.
2332 (scratch_ovl_cons): Likewise.
2333 * decl.c (saveable_obstack): Don't declare.
2334 (duplicate_decls): Tweak error-message.
2335 (initialize_local_var): Explicitly mark the definition as static.
2336 (finish_function): Call permanent_allocation, just so
2337 that the middle-end sees the obstacks it expects.
2338 (mark_cp_function_context): Likewise.
2339 * init.c (build_new): Don't use min_tree_cons.
2340 * lex.c (permanent_obstack): Don't declare.
2341 (current_obstack, saveable_obstack): Likewise.
2342 * spew.c (current_obstack, saveable_obstack): Likewise.
2343 * tree.c (current_obstack, saveable_obstack): Likewise.
2344 (scratch_ovl_cons): Remove.
2345 (build_min_nt): Don't mess with obstacks.
2346 (build_min): Likewise.
2347 (min_tree_cons): Remove
2348 * typeck.c (build_component_ref): Don't use scratch_ovl_cons.
2349 (build_x_function_call): Likewise.
2350 (build_c_cast): Don't use min_tree_cons.
2351
2352 1999-11-29 Mark Mitchell <mark@codesourcery.com>
2353
2354 * pt.c (tsubst_decl): Robustify.
2355
2356 1999-11-27 Mark Mitchell <mark@codesourcery.com>
2357
2358 * decl2.c (finish_file): Call expand_body for inline functions
2359 that will be written out but that do not yet have RTL.
2360 * semantics.c (expand_body): Do not generate RTL For inline
2361 functions that do not yet need to be written out.
2362
2363 1999-11-25 Mark Mitchell <mark@codesourcery.com>
2364
2365 * Make-lang.in (CXX_SRCS): Add optimize.c.
2366 * Makefile.in (CXX_OBJS): Add optimize.o.
2367 (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
2368 (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
2369 (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
2370 (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
2371 (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
2372 (dump.o): Likewise.
2373 (optimize.o): New target.
2374 * class.c: Don't include splay-tree.h.
2375 * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.
2376 * cp-tree.h: Include splay-tree.h.
2377 (DECL_UNINLINABLE): New macro.
2378 (CTOR_BEGIN_P, CTOR_END_P): New macros.
2379 (flag_inline_trees): New variable.
2380 (local_variable_p): New function.
2381 (nonstatic_local_decl_p): Likewise.
2382 (optimize_function): Likewise.
2383 (cplus_unsave_expr_now): Remove.
2384 (copy_tree_r): Declare.
2385 (remap_save_expr): Likewise.
2386 * decl.c (local_variable_p): Don't
2387 make it static.
2388 (local_variable_p_walkfn): New function.
2389 (make_rtl_for_local_static): Remove code to try to avoid writing
2390 out static constants.
2391 (emit_local_var): Fix indentation.
2392 (nonstatic_local_decl_p): New function.
2393 (check_default_argument): Use local_variable_p_walkfn, not
2394 local_variable_p, when walking the tree.
2395 (start_function): Set the DECL_CONTEXT for automatically generated
2396 labels.
2397 (finish_constructor_body): Use CTOR_STMT to mark the end of a
2398 constructor.
2399 * decl2.c: Don't include splay-tree.h.
2400 (flag_inline_trees): Define.
2401 * dump.c: Don't include
2402 splay-tree.h.
2403 * except.c (expand_end_catch_block): Fix comment formatting.
2404 (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
2405 (expand_throw): Tidy comment.
2406 * init.c (build_vec_delete_1): Use create_temporary_var.
2407 * lex.c (cplus_tree_code_type): Make it static.
2408 (cplus_tree_code_length): Likewise.
2409 (cplus_tree_code_name): Likewise.
2410 * optimize.c: New file.
2411 * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
2412 with computed gotos.
2413 (setup_vtbl_ptr): Mark the beginnings of constructors with
2414 CTOR_STMT.
2415 (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
2416 (expand_body): Call optimize_function. Save bodies if we're doing
2417 inlining on trees.
2418 * tree.c: Don't include splay-tree.h. Include insn-config.h and
2419 integrate.h.
2420 (copy_tree_r): Make it public.
2421 (statement_code_p): New function.
2422 (mark_local_for_remap_r): Likewise.
2423 (cp_usave_r): Likewise.
2424 (cp_unsave): Likewise.
2425 (build_cplus_new): Set DECL_CONTEXT for temporary variables.
2426 (walk_tree): Walk into `s' class nodes. Walk statement chains.
2427 (copy_tree_r): Handle 's' class nodes. Restore chains for
2428 statements. Nullify scopes. Don't copy types.
2429 (init_tree): Set lang_unsave to cp_unsave.
2430 (remap_save_expr): Define.
2431 * ir.texi: Document CTOR_STMT.
2432
2433 1999-11-24 Jason Merrill <jason@casey.cygnus.com>
2434
2435 * search.c (note_debug_info_needed): Do perform this optimization
2436 for dwarf2.
2437 (maybe_suppress_debug_info): Likewise. Start by clearing
2438 TYPE_DECL_SUPPRESS_DEBUG.
2439
2440 1999-11-24 Mark Mitchell <mark@codesourcery.com>
2441
2442 * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
2443
2444 * decl2.c (finish_vtable_vardecl): Don't prune vtables here.
2445
2446 1999-11-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2447
2448 * decl.c (pushdecl, grokdeclarator): Don't call a variadic
2449 function with a non-literal format string.
2450
2451 * lex.c (do_identifier): Likewise.
2452
2453 * typeck.c (build_unary_op): Likewise.
2454
2455 1999-11-23 Mark Mitchell <mark@codesourcery.com>
2456
2457 * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
2458
2459 1999-11-22 Mark Mitchell <mark@codesourcery.com>
2460
2461 * cp-tree.def (CTOR_COMPLETE): New tree node.
2462 * decl.c (finish_constructor_body): Add it, to mark the end of the
2463 constructor.
2464 (finish_function): Don't call end_protect_partials here.
2465 * ir.texi (CTOR_COMPLETE): Document it.
2466 * semantics.c (expand_stmt): Handle it.
2467
2468 * cp-tree.def (FUNCTION_NAME): New tree node.
2469 * cp-tree.h (current_function_name_declared): Tweak documentation.
2470 (lang_decl_flags): Add pretty_function_p, adjust dummy.
2471 (DECL_PRETTY_FUNCTION_P): New macro.
2472 * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
2473 etc., in a template function. Use at_function_scope_p instead of
2474 expanding it inline.
2475 * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
2476 specially.
2477 (tsubst): Handle FUNCTION_NAME.
2478 (tsubst_copy): Likewise.
2479 (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
2480 etc. in instantiation.
2481 * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
2482 even in template functions.
2483 (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
2484 conditional scope at the top of a destructor.
2485
2486 * error.c (dump_function_decl): Use `[ with ... ]' syntax for
2487 specializations too.
2488
2489 1999-11-22 Nathan Sidwell <nathan@acm.org>
2490
2491 * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
2492 when actually negative.
2493
2494 * typeck.c (convert_for_assignment): Expand comment about
2495 strange NULL check, moved from ...
2496 (convert_for_initialization): ... here. Remove unneeded
2497 code.
2498
2499 1999-11-21 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
2500
2501 * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
2502 * init.c (build_vec_delete, build_vec_delete_1): Likewise.
2503 Always destruct virtual bases of array components, but never
2504 delete them.
2505 (build_vec_init): Adjust invocations.
2506 (build_delete): Likewise.
2507 * decl2.c (delete_sanity): Likewise.
2508
2509 1999-11-19 Nathan Sidwell <nathan@acm.org>
2510
2511 * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
2512 * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
2513 * decl2.c (grok_method_quals): Accept `restrict' as applying to
2514 the object pointer. Return such qualifiers.
2515 (grokclassfn): Apply this pointer qualifiers. Cleanup unused
2516 variables.
2517
2518 1999-11-18 Mark Mitchell <mark@codesourcery.com>
2519
2520 * except.c (expand_end_catch_block): Fix typo.
2521 (expand_exception_blocks): Simplify. Don't call
2522 expand_leftover_cleanups.
2523
2524 1999-11-15 Jason Merrill <jason@casey.cygnus.com>
2525
2526 * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
2527 * pt.c (tsubst, case INTEGER_TYPE): Call it.
2528 Check uses_template_parms.
2529
2530 * class.c (finish_struct): If we're a local class in a template
2531 function, add a TAG_DEFN.
2532 * pt.c (lookup_template_class): If this is a local class in a
2533 template function, call pushtag.
2534 (tsubst_expr, case TAG_DEFN): Handle classes, too.
2535
2536 Emit debug info with the vtable.
2537 * search.c (maybe_suppress_debug_info): New function...
2538 * class.c (finish_struct_1): ...split out from here.
2539 * cp-tree.h: Declare it.
2540 * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
2541 if we're writing out the vtable.
2542 * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p,
2543 note_debug_info_needed): #if 0 out.
2544
2545 1999-11-14 Mark Mitchell <mark@codesourcery.com>
2546
2547 * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
2548 * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
2549 TREE_PERMANENT.
2550 * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
2551 * decl2.c (lookup_arg_dependent): Use it.
2552
2553 * cp-tree.h (cp_finish_decl): Change prototype.
2554 (finish_static_data_member_decl): Likewise.
2555 (push_permanent_obstack): Remove declaration.
2556 (push_expression_obstack): Likewise.
2557 (push_scratch_obstack): Likewise.
2558 (DECL_TEMPLATE_PARM_P): Robustify.
2559 (SET_DECL_TEMPLATE_PARM_P): New macro.
2560 * class.c (add_method): Don't manipulate obstacks.
2561 (finish_vtbls): Likewise.
2562 * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
2563 * decl.c (binding_for_name): Don't manipulate obstacks.
2564 (maybe_push_to_top_level): Likewise.
2565 (pop_from_top_level): Likewise.
2566 (duplicate_decls): Likewise.
2567 (pushdecl): Likewise.
2568 (implicitly_declare): Likewise.
2569 (build_typename_type): Likewise.
2570 (start_decl): Likewise.
2571 (cp_finish_decl): Likewise.
2572 (finish_decl): Likewise.
2573 (destroy_local_static): Likewise.
2574 (expand_static_init): Likewise.
2575 (complete_array_type): Likewise.
2576 (grokvardecl): Likewise.
2577 (build_ptrmemfnc_type): Likewise.
2578 (grokdeclarator): Likewise.
2579 (xref_tag): Likewise.
2580 (xref_basetypes): Likewise.
2581 (start_enum): Likewise.
2582 (finish_enum): Likewise.
2583 (start_function): Likewise.
2584 (finish_function): Likewise.
2585 (start_method): Adjust call to cp_finish_decl.
2586 * decl2.c (finish_static_data_member_decl): Don't manipulate
2587 obstacks.
2588 (grokfield): Likewise.
2589 (grokbitfield): Likewise.
2590 (get_temp_name): Likewise.
2591 (get_sentry): Likewise.
2592 (fnish_file): Likewise.
2593 (lookup_arg_dependent): Likewise.
2594 * except.c (call_eh_info): Likewise.
2595 (push_eh_info): Likewise.
2596 (do_pop_exception): Likewise.
2597 (initialize_handler_parm): Likewise.
2598 (expand_end_eh_spec): Likewise.
2599 (alloc_eh_object): Likewise.
2600 (expand_throw): Likewise.
2601 * expr.c (extract_scalar_init): Likewise.
2602 * init.c (build_java_class_ref): Likewise.
2603 * lex.c (get_time_identifier): Likewise.
2604 (snarf_defarg): Likewise.
2605 (add_defarg_fn): Likewise.
2606 (is_global): Simplify.
2607 (do_identifier): Don't check TREE_PERMANENT.
2608 * method.c (emit_thunk): Don't manipulate obstacks.
2609 * parse.y (condition): Adjust call to cp_finish_decl.
2610 (primary): Likewise.
2611 (initdcl): Likewise.
2612 (initdcl0_innards): Likewise.
2613 (nomods_initdcl0): Likewise.
2614 * pt.c (push_inline_template_parms_recursive): Use
2615 SET_DECL_TEMPLATE_PARM_P.
2616 (process_template_parm): Likewise.
2617 (lookup_template_class): Don't manipulate obstacks.
2618 (instantiate_class_template): Adjust call to
2619 finish_static_data_member_decl.
2620 (tsubst_decl): Don't manipulate obstacks.
2621 (tsubst_expr): Likewise.
2622 (instantiate_template): Likewise.
2623 (instantiate_decl): Adjust calls to cp_finish_decl.
2624 * rtti.c (call_void_fn): Don't manipulate obstacks.
2625 (get_tinfo_var): Likewise.
2626 (get_tinfo_fn_unused): Likewise.
2627 (build_dynamic_cast_1): Likewise.
2628 (expand_si_desc): Likewise.
2629 (expand_class_desc): Likewise.
2630 (expand_ptr_desc): Likewise.
2631 (expand_attr_desc): Likewise.
2632 (expand_generic_desc): Likewise.
2633 (synthesize_tinfo_fn): Likewise.
2634 * search.c (expand_upcast_fixups): Likewise.
2635 * semantics.c (finish_asm_stmt): Likewise.
2636 (finish_named_return_value): Likewise.
2637 (begin_class_definition): Likewise.
2638 (finish_class_definition): Likewise.
2639 (finish_typeof): Likewise.
2640 * tree.c (build_cplus_method_type): Likewise.
2641 (reverse_path): Likewise.
2642 (copy_template_template_parm): Likewise.
2643 (build_expr_ptr_wrapper): Likewise.
2644 (push_expression_obstack): Remove.
2645 (push_permanent_obstack): Likewise.
2646 * typeck.c (mark_addressable): Likewise.
2647
2648 1999-11-13 Mark Mitchell <mark@codesourcery.com>
2649
2650 * call.c (build_conditional_expr): Use build_target_expr_with_type.
2651 (convert_like): Likewise.
2652 (build_over_call): Likewise.
2653 * cp-tree.h (build_target_expr): Remove.
2654 (build_target_expr_with_type): New function.
2655 * cvt.c (build_up_reference): Use get_target_expr.
2656 * decl.c (build_target_expr): Move to ...
2657 * tree.c (build_target_expr): Here. Make it static.
2658 (build_target_expr_with_type): New function. Set DECL_CONTEXT on
2659 the temporary VAR_DECLs.
2660 (get_target_expr): Use it.
2661
2662 1999-11-13 Jason Merrill <jason@yorick.cygnus.com>
2663
2664 * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
2665 * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
2666 * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
2667 * class.c (set_rtti_entry): Use it.
2668
2669 1999-11-12 Mark Mitchell <mark@codesourcery.com>
2670
2671 * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
2672 here.
2673 * semantics.c (finish_expr_stmt): Call it here instead. Move
2674 default_conversion logic to semantic-analysis time.
2675
2676 1999-11-12 Jason Merrill <jason@yorick.cygnus.com>
2677
2678 * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
2679
2680 Fri Nov 12 12:56:32 MST 1999 Diego Novillo <dnovillo@cygnus.com>
2681
2682 * init.c (init_init_processing): Re-instated Nov 11 patch after
2683 approval.
2684
2685 Fri Nov 12 10:42:02 MST 1999 Diego Novillo <dnovillo@cygnus.com>
2686
2687 * init.c (init_init_processing): Undo patch from Nov 11, 1999.
2688 Patch had not been approved yet.
2689
2690 1999-11-12 Mark Mitchell <mark@codesourcery.com>
2691
2692 * decl.c (compute_array_index_type): New function, split out from
2693 grokdeclarator.
2694 (create_array_type_for_decl): Likewise.
2695 (grokdeclarator): Use them.
2696
2697 * semantics.c (expand_stmt): Don't suspend_momentary or
2698 resume_momentary.
2699
2700 Thu Nov 11 12:42:11 MST 1999 Diego Novillo <dnovillo@cygnus.com>
2701
2702 * init.c (init_init_processing): Header information for
2703 arrays allocated via `new' should have the same alignment used by
2704 malloc.
2705
2706 1999-11-10 Mark Mitchell <mark@codesourcery.com>
2707
2708 * error.c (dump_function_name): Don't crash if given a friend
2709 pseudo-instantiation.
2710
2711 * cp-tree.h (build_enumerator): Change prototype.
2712 * decl.c (enum_next_value): Remove.
2713 (enum_overflow): Likewise.
2714 (init_decl_processing): Don't register enum_next_value as a root.
2715 (start_enum): Clear TYPE_VALUES for a redefined enum.
2716 (finish_enum): Reset the type of enumeration constants.
2717 (build_enumerator): Fix indentation. Don't copy CONST_DECLs when
2718 we don't need to. Maintain the TYPE_VALUES list and look there
2719 for the previously defined enumeration constant. Let enumeration
2720 constants have the type of their values until the enumeration type
2721 is complete.
2722 * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
2723 (structsp): Adjust.
2724 * parse.c: Regenerated.
2725 * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
2726
2727 Wed Nov 10 12:43:21 1999 Philippe De Muyter <phdm@macqel.be>
2728 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2729
2730 * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
2731
2732 1999-11-09 Mark Mitchell <mark@codesourcery.com>
2733
2734 * cp-tree.h (language_function): Remove x_last_dtor_insn and
2735 x_last_parm_cleanup_insn.
2736 * decl.c (last_dtor_insn): Remove.
2737 (last_parm_cleanup_insn): Likewise.
2738 (expand_start_early_try_stmts): Don't set them.
2739 (store_parm_decls): Likewise.
2740 (save_function_data): Or save them.
2741 (mark_lang_function): Or mark them.
2742
2743 1999-11-08 Mark Mitchell <mark@codesourcery.com>
2744
2745 * decl.c (store_parm_decls): Generate cleanup code at
2746 semantic-analysis time. Destroy objects in the correct order.
2747
2748 1999-11-07 Mark Mitchell <mark@codesourcery.com>
2749
2750 * cp-tree.h (begin_new_placement): Remove.
2751 (finish_new_placement): Likewise.
2752 * class.c (finish_struct_1): Don't suspend_momentary or
2753 resume_momentary.
2754 * decl.c (grokdeclarator): Likewise.
2755 (maybe_build_cleanup_1): Likewise.
2756 * except.c (push_eh_cleanup): Likewise.
2757 (build_terminate_handler): Likewise.
2758 * init.c (build_new_1): Likewise.
2759 * parse.y (parse_decl): Change prototype.
2760 (initdecls, notype_initdecls, initdcl): Don't return int.
2761 (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
2762 (.begin_new_placement): Remove.
2763 (.finish_new_placement): Likewise.
2764 (nonmomentary_expr): Likewise.
2765 (suspend_mom): Likewise.
2766 (condition): Don't suspend_momentary, resume_momentary, or keep
2767 track of need to resume.
2768 (unary_expr): Likewise.
2769 (new_placement): Likewise.
2770 (decl): Likewise.
2771 (structsp): Likewise.
2772 (new_type_id): Likewise.
2773 (maybe_parmlist): Likewise.
2774 (direct_after_type_declaration): Likewise.
2775 (direct_new_declarator): Likewise.
2776 (direct_abstract_declaration): Likewise.
2777 * parse.c: Regenerated.
2778 * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
2779 * semantics.c (begin_new_placement): Remove.
2780 (finish_new_placement): Likewise.
2781
2782 1999-11-05 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2783
2784 * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
2785 (DECL_TEMPLATE_INFO): Use it.
2786 * decl.c (warn_extern_redeclared_static): Do nothing for
2787 TEMPLATE_DECLs.
2788 * decl2.c (mark_used): Explicitly check for function or variable.
2789 * semantics.c (finish_unary_op_expr): Check whether result is also
2790 an INTEGER_CST.
2791
2792 1999-11-05 Mark Mitchell <mark@codesourcery.com>
2793
2794 * Makefile.in (typeck2.o): Depend on output.h.
2795 * typeck2.c: Include output.h.
2796
2797 * decl.c (flag_ansi): Remove declaration.
2798
2799 * pt.c (tinst_level_tick): Make it static.
2800 (last_template_error_tick): Likewise.
2801
2802 * cp-tree.h (mapcar): Remove declaration.
2803 (search_tree): Likewise.
2804 (walk_tree_fn): New typedef.
2805 (walk_tree): New function.
2806 * tree.c (bot_manip): Change prototype. Adjust to be called via
2807 walk_tree.
2808 (bot_replace): Likewise.
2809 (no_linkage_helper): Likewise.
2810 (copy_tree_r): New function.
2811 (search_tree): Rename, and adjust, to become ...
2812 (walk_tree): New function.
2813 (mapcar): Remove.
2814 (target_remap): Remove.
2815 (target_remap_count): Likewise.
2816 (break_out_target_exprs): Use walk_tree.
2817 * decl.c (local_variable_p): Change prototype.
2818 (check_default_argument): Use walk_tree.
2819 * pt.c (for_each_template_parm_r): New function, split out from ...
2820 (for_each_template_parm): Here. Use it, via walk_tree.
2821
2822 1999-11-03 Mark Mitchell <mark@codesourcery.com>
2823
2824 * class.c (check_bitfield_decl): New function, split out from
2825 finish_stuct_1.
2826 (check_field_decl): Likewise. Recursively examine members of
2827 anonymous structs.
2828 (finish_struct_1): Use them.
2829 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
2830
2831 1999-11-02 Mark Mitchell <mark@codesourcery.com>
2832
2833 * decl.c (grokfndecl): Remove dead code.
2834
2835 * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
2836
2837 1999-11-02 Scott Snyder <snyder@fnal.gov>
2838
2839 * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
2840 IMAGPART_EXPR.
2841 * pt.c (tsubst_copy): Likewise.
2842
2843 1999-11-01 Jason Merrill <jason@yorick.cygnus.com>
2844
2845 * decl2.c (maybe_make_one_only): Always make things comdat on
2846 ELF targets, too.
2847
2848 1999-10-31 Mark Mitchell <mark@codesourcery.com>
2849
2850 * decl.c (finish_function): Call free_after_parsing for functions
2851 we are not immediately turning into RTL.
2852
2853 1999-10-31 Brendan Kehoe <brendan@cygnus.com>
2854
2855 * cp-tree.h (flag_dump_translation_unit): Add decl.
2856
2857 Sat Oct 30 22:42:50 1999 Stephen L Moshier <moshier@mediaone.net>
2858
2859 * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
2860
2861 1999-10-30 Mark Mitchell <mark@codesourcery.com>
2862
2863 * decl.c (pop_cp_function_context): Don't call free on a NULL
2864 pointer.
2865 * semantics.c: Include ggc.h.
2866 (expand_body): Do garbage-collection after processing a template
2867 function. Clear DECL_SAVED_TREE after generating RTL for a
2868 function.
2869 * Makefile.in (semantics.o): Depend on ggc.h.
2870
2871 1999-10-29 Mark Mitchell <mark@codesourcery.com>
2872
2873 * cp-tree.h (make_typename_type): Change prototype.
2874 * decl.c (make_typename_type): Only complain if so requested.
2875 * parse.y (nested_name_specifier): Adjust calls.
2876 (typename_sub0): Likewise.
2877 (typename_sub1): Likewise.
2878 * parse.c: Regenerated.
2879 * pt.c (convert_template_argument): Pass complain to
2880 make_typename_type.
2881 (tsubst): Likewise.
2882
2883 1999-10-28 Mark Mitchell <mark@codesourcery.com>
2884
2885 * semantics.c (finish_handler): End the scope of the handler
2886 before attaching it to the statement-tree.
2887
2888 1999-10-28 Ian Lance Taylor <ian@zembu.com>
2889
2890 * rtti.c (build_dynamic_cast_1): Give a better error message for
2891 an attempt to dynamic_cast from a non-polymorphic type.
2892
2893 1999-10-27 Mark Mitchell <mark@codesourcery.com>
2894
2895 * cp-tree.h (make_temp_vec): Remove.
2896 (make_scratch_vec): Likewise.
2897 * call.c (add_function_candidate): Use make_tree_vec.
2898 (add_conv_candidate): Likewise.
2899 (build_builtin_candidate): Likewise.
2900 (add_template_candidate_real): Likewise.
2901 * class.c (resolve_address_of_overloaded_function): Likewise.
2902 * decl.c (start_function): Don't fool with the momentary obstack.
2903 (finish_function): Likewise.
2904 * init.c (expand_direct_vtbls_init): Likewise.
2905 (begin_init_stmts): Likewise.
2906 (finish_init_stmts): Likewise.
2907 * pt.c (add_to_template_args): Use make_tree_vec.
2908 (check_explicit_specialization): Likewise.
2909 (coerce_template_parms): Likewise.
2910 (lookup_template_class): Don't fool with the momentary obstack.
2911 (instantiate_class_template): Likewise.
2912 (tsubst_template_arg_vector): Use make_tree_vec.
2913 (tsubst_aggr_type): Don't fool with the momentary obstack.
2914 (tsubst_decl): Likewise. Use make_tree_vec.
2915 (try_one_overload): Likewise.
2916 (try_class_unification): Don't fool with the momentary obstack.
2917 (get_bindings_real): Use make_tree_vec.
2918 (set_mangled_name_for_template_decl): Likewise.
2919 * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
2920 * semantics.c (finish_expr_stmt): Likewise.
2921 (finish_do_stmt): Likewise.
2922 (finish_for_expr): Likewise.
2923 (finish_switch_cond): Likewise.
2924 (do_pushlevel): Likewise.
2925 (do_poplevel): Likewise.
2926 * tree.c (make_temp_vec): Remove.
2927
2928 * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs. Dump
2929 CLEANUP_P for a TRY_BLOCK.
2930 * ir.texi: Document SAVE_EXPR.
2931
2932 Tue Oct 26 23:29:56 1999 Jeffrey A Law (law@cygnus.com)
2933
2934 * call.c (build_over_call): Check that the built-in function is
2935 of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
2936 * typeck.c (build_function_call_real): Similarly.
2937
2938 1999-10-26 Mark Mitchell <mark@codesourcery.com>
2939
2940 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS. Don't call
2941 remember_end_note.
2942
2943 1999-10-24 Mark Mitchell <mark@codesourcery.com>
2944
2945 * decl.c (push_overloaded_decl_1): Use pushdecl.
2946
2947 * decl.c (auto_function): Replace #ifdef'd __inline with just
2948 plain inline.
2949 * lex.c (my_get_run_time): Likeise.
2950 (yyprint): Likewise.
2951 (identifier_type): Likewise.
2952 * method.c (start_squangling): Likewise.
2953 (end_squangling): Likewise.
2954 (icat): Likewise.
2955 (old_backref_index): Likewise.
2956 (flush_repeats): Likewise.
2957 (issue_ktype): Likewise.
2958 * parse.y (empty_parms): Likewise.
2959 * parse.c: Regenerated.
2960
2961 1999-10-21 Mark Mitchell <mark@codesourcery.com>
2962
2963 * dump.c (dequeue_and_dump): Replace several uses of
2964 queue_and_dump_index with dump_child.
2965
2966 1999-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2967
2968 * expr.c: Include tm_p.h.
2969
2970 1999-10-21 Mark Mitchell <mark@codesourcery.com>
2971
2972 * cp-tree.h (SCOPE_PARTIAL_P): New macro.
2973 (pushlevel_temporary): Remove.
2974 (add_scope_stmt): New function.
2975 * decl.c (pushlevel_temporary): Remove.
2976 (poplevel): Use add_scope_stmt.
2977 (start_decl_1): Likewise.
2978 * semantics.c (add_scope_stmt): New function.
2979 (do_pushlevel): Use it.
2980 (do_poplevel): Use it.
2981 (expand_stmt): Check SCOPE_PARTIAL_P.
2982
2983 * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
2984 * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
2985 * expr.c (cplus_expand_expr): Expand it.
2986 * ir.texi: Document EMPTY_CLASS_EXPR.
2987
2988 1999-10-20 Mark Mitchell <mark@codesourcery.com>
2989
2990 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
2991 parameters as having namespace scope.
2992
2993 1999-10-19 Mark Mitchell <mark@codesourcery.com>
2994
2995 * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
2996 (mangling_flags): New type.
2997 (build_overload_int): Change prototype.
2998 (build_overload_value): Likewise.
2999 (numeric_output_need_bar): Improve comment.
3000 (mangle_expression): New function, broken out from ...
3001 (build_overload_int): Here.
3002 (build_overload_value): Adjust for use of mangling flags. Don't
3003 warn about real-valued template parameters here. Do handle
3004 complex expressions involving real-valued template parameters.
3005 (build_template_parm_names): Encase non-type template parameters
3006 in underscores, if necessary.
3007 (process_overload_item): Remove conditional on
3008 PARM_CAN_BE_ARRAY_TYPE.
3009
3010 1999-10-17 Mark Mitchell <mark@codesourcery.com>
3011
3012 * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
3013
3014 * ir.texi: Clean up documentation of RETURN_INIT.
3015
3016 1999-10-15 Greg McGary <gkm@gnu.org>
3017
3018 * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
3019 (lang_init): Set default for flag_bounds_check if still "unspecified".
3020
3021 1999-10-13 Andrew Haley <aph@cygnus.com>
3022
3023 * class.c (finish_struct_1): Force alignment of non-bitfields to
3024 BITS_PER_UNIT.
3025
3026 Wed Oct 13 22:01:35 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
3027
3028 * typeck2.c (process_init_constructor): Handle empty constructors.
3029
3030 1999-10-13 Jason Merrill <jason@yorick.cygnus.com>
3031
3032 * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
3033
3034 * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
3035 array error.
3036
3037 1999-10-13 Mark Mitchell <mark@codesourcery.com>
3038
3039 * decl.c (make_rtl_for_local_static): Don't create register RTL
3040 for addressable constants.
3041
3042 1999-10-13 Nathan Sidwell <nathan@acm.org>
3043
3044 * cp-tree.h (build_x_va_arg): Prototype new function.
3045 * call.c (build_x_va_arg): Define it.
3046 * parse.y (unary_expr): Call build_x_va_arg.
3047
3048 * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
3049 * call.c (convert_type_from_ellipsis): Define it.
3050 * decl.c (init_decl_processing): Set lang_type_promotes_to.
3051
3052 * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
3053
3054 1999-10-11 Jason Merrill <jason@yorick.cygnus.com>
3055
3056 * class.c (fixed_type_or_null): Always set *nonnull.
3057
3058 1999-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3059
3060 * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
3061 __GNUC__ and __GNUC_MINOR__.
3062
3063 1999-10-09 Mark Mitchell <mark@codesourcery.com>
3064
3065 * cp-tree.h (make_rtl_for_local_static): New function.
3066 * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
3067 local statics ...
3068 (make_rtl_for_local_static): Here.
3069 * semantics.c (expand_stmt): Use make_rtl_for_local_static.
3070
3071 1999-10-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3072
3073 * method.c: Include tm_p.h.
3074
3075 1999-10-7 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
3076
3077 * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
3078 * lex.c (cp_make_lake_type): Likewise.
3079 * tree.c (init_tree): Init make_lang_type_fn.
3080
3081 1999-10-07 Mark Mitchell <mark@codesourcery.com>
3082
3083 * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
3084 paramter.
3085
3086 * semantics.c (expand_stmt): Don't pretend to have asmspecs for
3087 local statics if we don't really have them.
3088
3089 * ir.texi: Improve documentation for STMT_EXPR. Describe
3090 CLEANUP_POINT_EXPR.
3091
3092 1999-10-07 Jason Merrill <jason@yorick.cygnus.com>
3093
3094 * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
3095
3096 1999-10-07 Greg McGary <gkm@gnu.org>
3097
3098 * class.c (finish_struct_1): Use simpler method of
3099 removing elements of a singly-linked list which doesn't
3100 lose for classes without data members.
3101
3102 1999-10-07 Mark Mitchell <mark@codesourcery.com>
3103
3104 * friend.c (make_friend_class): Robustify.
3105
3106 * semantics.c (finish_object_call_expr): Reject calls to template
3107 types.
3108
3109 1999-10-06 Mark Mitchell <mark@codesourcery.com>
3110
3111 * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
3112
3113 * cp-tree.h (CLASSTYPE_VFIELD): Remove.
3114 * call.c (build_vfield_ref): Use TYPE_VFIELD, not
3115 CLASSTYPE_VFIELD.
3116 * class.c (get_vfield_offset): Likewise.
3117 (finish_base_struct): Likewise.
3118 (modify_one_vtable): Likewise.
3119 (fixup_vtable_deltas): Likewise.
3120 (finish_struct_1): Likewise.
3121 * init.c (expand_virtual_init): Likewise.
3122 * search.c (lookup_field_1): Likewise.
3123 (expand_upcast_fixups): Likewise.
3124 * typeck.c (build_component_ref): Likewise.
3125 (build_binary_op_nodefault): Likewise.
3126
3127 * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
3128 * ir.texi: Document TYPE_VFIELD.
3129
3130 1999-10-06 Brendan Kehoe <brendan@cygnus.com>
3131
3132 * decl.c (grokdeclarator): Only warn about non-zero arrays if
3133 !in_system_header (linux socketbits.h can give this for
3134 __cmsg_data, which is using a GNU extension).
3135
3136 1999-10-05 Mark Mitchell <mark@codesourcery.com>
3137
3138 * decl2.c (start_static_storage_duration_function): Push the
3139 function declaration so it ends up in namespace scope.
3140
3141 * dump.c (DUMP_CHILDREN): Remove.
3142 (DUMP_BINFO): Adjust.
3143 (struct dump_node_info): Remove dump_children_p.
3144 (queue_and_dump_type): Remove dump_children_p parameter.
3145 (queue): Don't set dump_children_p.
3146 (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
3147 queue_and_dump_index.
3148 (dequeue_and_dump): Unconditionally print children. Adjust calls
3149 to functions mentioned above.
3150 (dump_node): Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
3151
3152 * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
3153 * dump.c (dequeue_and_dump): Dump them.
3154
3155 * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
3156
3157 * decl.c (start_function): Set current_in_charge_parm for
3158 constructors, too, where appropriate.
3159 * search.c (fixup_all_virtual_upcast_offsets): New function.
3160 (expand_indirect_vtbls_init): Use it.
3161
3162 1999-10-04 Nathan Sidwell <nathan@acm.org>
3163
3164 * decl2.c (grok_alignof): Don't decay lvalues.
3165
3166 * init.c (build_new): Remove unused variable.
3167
3168 1999-10-04 Mark Mitchell <mark@codesourcery.com>
3169
3170 * cp-tree.h (struct language_function): Remove static_labelno.
3171 (static_labelno): Remove macro.
3172 * method.c (build_overload_nested_name): Make static_labelno
3173 static here.
3174
3175 * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
3176 to decide whether or not a function is defined.
3177
3178 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
3179 situations where make_node will do it automatically.
3180 * decl.c (grok_reference_init): Likewise.
3181 (expand_static_init): Likewise.
3182 (do_static_initialization): Likewise.
3183 * init.c (perform_member_init): Likewise.
3184 (expand_aggr_init_1): Likewise.
3185 (build_new_1): Likewise.
3186 * method.c (do_build_copy_constructor): Likewise.
3187 (do_build_assign_ref): Likewise.
3188 * search.c (expand_upcast_fixups): Likewise.
3189 * semantics.c (finish_stmt_expr): Likewise.
3190 * typeck.c (build_unary_op): Likewise.
3191 (check_return_expr): Likewise.
3192
3193 1999-10-04 Jason Merrill <jason@yorick.cygnus.com>
3194
3195 * init.c (build_vec_delete_1): Fold COND_EXPRs.
3196
3197 1999-10-03 Mark Mitchell <mark@codesourcery.com>
3198
3199 * cp-tree.def (VEC_INIT_EXPR): Remove.
3200 * cp-tree.h (struct stmt_tree): New type.
3201 (struct saved_scope): Remove firstobj. Add x_saved_tree,
3202 x_stmt_tree.
3203 (class_cache_firstobj): Remove.
3204 (struct language_function): Remove stmts_are_full_exprs_p,
3205 x_last_tree, and x_last_expr_type. Add x_stmt_tree.
3206 (current_stmt_tree): New macro.
3207 (last_tree): Adjust.
3208 (last_expr_type): Likewise.
3209 (doing_semantic_analysis_p): Simplify.
3210 (stmts_are_full_exprs_p): Adjust.
3211 (begin_tree): Remove prototype.
3212 (end_tree): Likewise.
3213 (begin_stmt_tree): Change prototype.
3214 (finish_stmt_tree): Likewise.
3215 (building_stmt_tree): Simplify.
3216 * decl.c (mark_stmt_tree): New function.
3217 (mark_saved_scope): Use it.
3218 (start_function): Rearrange slightly to call begin_stmt_tree
3219 earlier.
3220 (save_function_data): Tweak.
3221 (finish_function): Adjust call to finish_stmt_tree.
3222 (mark_lang_function): Use mark_stmt_tree.
3223 * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
3224 * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
3225 (build_vec_init): Remove creation of stand-in intializer.
3226 * pt.c (begin_tree): Remove.
3227 (end_tree): Likewise.
3228 * semantics.c (SET_LAST_STMT): New macro. Use it throughout.
3229 (begin_compound_stmt): Handle a compound-statement outside of a
3230 function.
3231 (begin_stmt_expr): Handle a statement-expression outsidef of a
3232 function.
3233 (finish_stmt_expr): Likewise.
3234 (begin_class_definition): Don't call begin_tree.
3235 (finish_inline_definitions): Don't call end_tree.
3236 (begin_stmt_tree): Take a pointer to tree, not a function as input.
3237 (finish_stmt_tree): Likewise.
3238 * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
3239 (mapcar): Likewise.
3240
3241 * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
3242 * parse.c: Regenerated.
3243
3244 * dump.c (dqueue_and_dump): Dump bitfieldness.
3245
3246 * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
3247 bitfields, rather than DECL_BIT_FIELD.
3248 * ir.texi: Document how to tell whether or not a field is a
3249 bitfield.
3250
3251 * lex.c (make_lang_type): Fix typo in comment.
3252
3253 1999-10-01 Jason Merrill <jason@yorick.cygnus.com>
3254
3255 * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
3256
3257 1999-10-01 Mark Mitchell <mark@codesourcery.com>
3258
3259 * pt.c (tsubst_decl): If the type of a template instantiation is
3260 bogus, so is the whole instantiation.
3261
3262 1999-09-30 Mark Mitchell <mark@codesourcery.com>
3263
3264 * decl.c (initialize_local_var): Handle static variables here.
3265 (cp_finish_decl): Tweak handling of function-scope static
3266 variables.
3267 * semantics.c (expand_stmt): Handle DECL_STMTs for static
3268 variables.
3269
3270 * method.c (emit_thunk): Don't crash when -fsyntax-only.
3271
3272 * cp-tree.h (lang_decl_flags): Add global_ctor_p and
3273 global_dtor_p. Add init_priority.
3274 (DECL_ACCESS): Adjust accordingly.
3275 (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
3276 (GLOBAL_INIT_PRIORITY): Likewise.
3277 * decl.c (lang_mark_tree): Adjust accordingly.
3278 (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P,
3279 and GLOBAL_INIT_PRIORITY.
3280 * dump.c (dequeue_and_dump): Print them.
3281 * ir.texi: Document them.
3282
3283 * decl2.c (struct priority_info_s): Remove initialization_sequence
3284 and destruction_sequence.
3285 (start_static_storage_duration_function): Return the body of the
3286 function. Convert for function-at-a-time mode.
3287 (generate_inits_for_priority): Remove.
3288 (finish_static_storage_duration_function): Change prototype.
3289 Adjust for function-at-a-time mode.
3290 (do_static_initialization): Likewise.
3291 (do_static_destruction): Likewise.
3292 (do_static_initialization_and_destruction): Remove.
3293 (start_static_initialization_or_destruction): New function.
3294 (finish_static_initialization_or_destruction): Likewise.
3295 (get_priority_info): Don't manipulation initialization_sequence or
3296 destruction_sequence.
3297 (prune_vars_needing_no_initialization): New function.
3298 (write_out_vars): Likewise.
3299 (finish_file): Use the various new functions instead of the old.
3300
3301 Thu Sep 30 00:13:27 1999 Dirk Zoller <duz@rtsffm.com>
3302
3303 * cp-tree.h (warn_float_equal): Declare.
3304 * decl2.c (warn_float_equal): Define.
3305 (lang_decode_option): Recognize -W[no-]float-equal.
3306 * typeck.c (build_binary_op_nodefault): Conditionally warn
3307 about equality tests of floating point types.
3308
3309 1999-09-29 Jason Merrill <jason@yorick.cygnus.com>
3310
3311 Support normal type_info-based EH mechanisms with -fno-rtti.
3312 * except.c (build_eh_type_type): Remove special -fno-rtti handling.
3313 (build_eh_type_type_ref): Likewise.
3314 (build_eh_type): Remove.
3315 (expand_throw): Call build_eh_type_type, not build_eh_type.
3316 * decl2.c (import_export_decl): Don't associate the tinfo fn with
3317 the vtable if -fno-rtti.
3318 * decl.c (init_decl_processing): Always init_rtti_processing.
3319
3320 * rtti.c (get_typeid): Don't complain about -fno-rtti.
3321
3322 * class.c (class_cache_obstack, class_obstack): Remove.
3323 (init_class_processing): Don't initialize class_obstack.
3324 (push_cache_obstack): Remove.
3325 (pushclass): Don't call it.
3326 * cp-tree.h: Remove prototype for push_cache_obstack.
3327 * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
3328 (pushlevel_class): Don't push_decl_level.
3329 (poplevel_class): Don't pop_stack_level.
3330 (push_class_level_binding): Don't push_cache_obstack.
3331 (init_decl_processing): Don't intialize decl_obstack.
3332 * search.c (push_class_decls): Don't push_cache_obstack.
3333 * tree.c (list_hash_add): Put hash node on permanent_obstack.
3334 (hash_tree_cons): Don't mess with obstacks.
3335 (print_lang_statistics): Don't print stats for class_obstack and
3336 decl_obstack.
3337
3338 1999-09-29 Mark Mitchell <mark@codesourcery.com>
3339
3340 * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
3341 * ir.texi: Document DECL_EXTERNAL.
3342
3343 * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
3344 * ir.texi: Document THUNK_DECLs.
3345
3346 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
3347 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
3348 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
3349 * error.c (dump_template_bindings): Remove unused parameter.
3350 Handle multiple levels of template parameters.
3351 (dump_template_decl): Use `parms', not `args', for template
3352 parameters. Fix thinko.
3353 (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION. Don't pass
3354 flags to dump_template_bindings.
3355 * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
3356 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
3357 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
3358 (tsubst_copy): Clarify variable name.
3359 (most_general_template): Robustify.
3360
3361 1999-09-29 Nathan Sidwell <nathan@acm.org>
3362
3363 * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
3364 to change primary template rendering.
3365
3366 1999-09-29 Mark Mitchell <mark@codesourcery.com>
3367
3368 * cp-tree.h (UPT_TEMPLATE): Remove.
3369 (UPT_PARMS): Likewise.
3370 (DECL_NEEDED_P): New macro.
3371 * decl2.c (finish_vtable_vardecl): Use it.
3372 (finish_objects): Don't crash with -fsyntax-only.
3373 (finish_file): Use DECL_NEEDED_P. Don't prune vtables when
3374 -fsyntax-only.
3375 * pt.c (tsubst_friend_function): Remove FIXME that talks about
3376 obstacks.
3377 (tsubst_expr): Correct handling of function try-blocks.
3378 * semantics.c: Include flags.h.
3379 (expand_body): Don't do RTL generation if -fsyntax-only.
3380 * Makefile.in (semantics.o): Depends on flags.h.
3381
3382 1999-09-28 Gabriel Dos Reis <gdr@codesourcery.com>
3383
3384 * pt.c (most_general_template): Adjust declaration.
3385
3386 * cp-tree.h: (most_general_template): Declare.
3387
3388 * error.c (dump_template_value): Rename to ...
3389 (dump_template_argument): This.
3390 (dump_template_argument_list): New function.
3391 (dump_type): Use it.
3392 (dump_template_parameter): New function.
3393 (dump_template_decl): Use it.
3394 (dump_template_bindings): New function.
3395 (dump_function_decl): Use it. Pretty print function template
3396 instantiations.
3397
3398 1999-09-28 Nathan Sidwell <nathan@acm.org>
3399
3400 * decl.c (grokdeclarator): Distinguish parameter context for
3401 diagnostics. Tidy up missing type diagnostic.
3402 Diagnose `explicit' in one place. Diagnose `mutable' in one place.
3403
3404 1999-09-28 Mark Mitchell <mark@codesourcery.com>
3405
3406 * ir.texi: Improve documentation for TARGET_EXPR.
3407
3408 1999-09-27 Nathan Sidwell <nathan@acm.org>
3409
3410 Augment stringification of trees.
3411 * cp-tree.h (tree_string_flags): New error stringifying enumeration.
3412 (fndecl_as_string, type_as_string_real, args_as_string,
3413 code_as_string, language_as_string, parm_as_string,
3414 op_as_string, assop_as_string, cv_as_string): Remove.
3415 (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
3416 (context_as_string): Declare new function.
3417 * error.c (cp_printers): Move definition.
3418 (OB_UNPUT): Remove.
3419 (OB_END_TEMPLATE_ID): Adjust.
3420 (interesting_scope_p): Remove.
3421 (dump_scope): New static function.
3422 (dump_qualifiers): Adjust prototype, reimplement.
3423 (dump_template_value): Use tree_string_flags.
3424 (dump_type_real): Move back to dump_type.
3425 (dump_type): Adjust prototype. Use tree_string_flags.
3426 (dump_aggr_type): Likewise. Use dump_template_parms.
3427 (dump_type_prefix): Adjust prototype. Use tree_string_flags.
3428 Return pad flag.
3429 (dump_type_suffix): Adjust prototype. Use tree_string_flags.
3430 (dump_simple_decl): Likewise.
3431 (dump_decl): Likewise. Use dump_template_decl.
3432 (dump_template_decl): New static function broken out of dump_decl.
3433 (dump_function_decl): Adjust prototype. Use tree_string_flags.
3434 (dump_parameters): Likewise. Prefix space.
3435 (dump_exception_spec): Adjust prototype. Use tree_string_flags.
3436 (dump_function_name): Likewise. Use dump_template_parms.
3437 (dump_template_parms): New static function broken out of
3438 dump_function_name.
3439 (dump_expr_list): Adjust prototype. Use tree_string_flags.
3440 (dump_expr): Likewise.
3441 (fndecl_as_string): Removed
3442 (type_as_string_real): Removed
3443 (dump_binary_op): Adjust prototype. Use tree_string_flags.
3444 (dump_unary_op): Likewise.
3445 (type_as_string): Likewise.
3446 (expr_as_string): Likewise.
3447 (decl_as_string): Likewise.
3448 (context_as_string): New function.
3449 (lang_decl_name): Adjust.
3450 (decl_to_string): New static print callback.
3451 (expr_to_string): Likewise.
3452 (fndecl_to_string): Likewise.
3453 (code_as_string): Renamed to ...
3454 (code_to_string): ... here. Adjust.
3455 (language_as_string): Renamed to ...
3456 (language_to_string): ... here. Adjust.
3457 (parm_as_string): Renamed to ...
3458 (parm_to_string): ... here.
3459 (op_as_string): Renamed to ...
3460 (op_to_string): ... here.
3461 (assop_as_string): Renamed to ...
3462 (assop_to_string): ... here.
3463 (type_to_string): New static print callback.
3464 (args_as_string): Renamed to ...
3465 (args_to_string): ... here. Adjust.
3466 (cv_as_string): Renamed to ...
3467 (cv_to_string): ... here. Adjust.
3468 * pt.c (mangle_class_name_for_template): Use tree_string_flags.
3469 (print_template_context): Likewise.
3470
3471 1999-09-26 Mark Mitchell <mark@codesourcery.com>
3472
3473 * cp-tree.h (expand_throw): Remove prototype.
3474 * except.c (expand_throw): Make it static. Use tree-generation
3475 functions, rather than RTL-generation functions.
3476 (build_throw): Use it.
3477 * expr.c: Include except.h.
3478 (cplus_expand_expr): Don't call expand_throw here.
3479 * Makefile.in (expr.o): Depend on except.h.
3480 * ir.texi: Update documentation for THROW_EXPR.
3481
3482 * decl.c (start_function): Set x_dont_save_pending_sizes rather
3483 than calling get_pending_sizes.
3484 * init.c (build_new): Don't save and restore
3485 immediate_size_expand; instead, assert that it has the expected
3486 value already.
3487
3488 1999-09-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3489
3490 * lex.c (compiler_error): Add missing call to va_end().
3491
3492 1999-09-25 Mark Mitchell <mark@codesourcery.com>
3493
3494 * dump.c (dequeue_and_dump): Handle RESULT_DECL.
3495 * ir.texi: Document RESULT_DECL and DECL_RESULT.
3496
3497 * cp-tree.h (check_return_expr): New function.
3498 * decl.c (finish_constructor_body): New function.
3499 (pushdecl): Put global friend functions in namespace binding
3500 level, not the class binding level.
3501 (finish_destructor_body): Make sure the dtor_label is always
3502 defined. Fix typo in comment.
3503 (finish_function): Move generation of constructor-termination code
3504 to semantic-analysis time. Move generation of implicit `main'
3505 return value to semantic-analysis time.
3506 * semantics.c (finish_return_stmt): Generate goto's to
3507 ctor_label/dtor_label here. Use check_return_expr to do semantic
3508 analysis on the returned expression.
3509 * typeck.c (maybe_warn_about_returning_address_of_local): New
3510 function split out from c_expand_return.
3511 (check_return_expr): Likewise.
3512 (c_expand_return): Just generate the RTL for the return.
3513
3514 1999-09-24 Mark Mitchell <mark@codesourcery.com>
3515
3516 * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
3517 (cleanup_type): Likewise.
3518 (search_tree): Change prototype.
3519 * decl.c (local_variable_p): Adjust for new interface to
3520 search_tree.
3521 (check_default_argument): Likewise.
3522 * error.c (dump_expr): Handle INIT_EXPR.
3523 * except.c (expand_throw): Don't make cleanup_type a local static.
3524 * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
3525 * init.c (build_new): Call build_new_1 directly, rather than
3526 building a NEW_EXPR.
3527 (build_new_1): Tidy. Don't build a VEC_INIT_EXPR except when
3528 processing file-scope initializers.
3529 * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
3530 * tree.c: Include splay-tree.h
3531 (no_linkage_helper): Adjust for new interface to search_tree.
3532 (search_tree): Pass around pointers to tree nodes, rather than the
3533 nodes themselves. Handle VEC_INIT_EXPR.
3534 (no_linkage_check): Adjust for new interface to search_tree.
3535 (mapcar): Handle VEC_INIT_EXPR.
3536 (target_remap): New variable.
3537 (bot_manip): Use it.
3538 (bot_replace): New function.
3539 (break_out_target_exprs): Use it to remap all variables used in a
3540 default argument expression.
3541 * typeck.c (build_modify_expr): Don't crash when outside a
3542 function and presented with an INIT_EXPR assignment
3543 * Makefile.in (tree.o): Depend on splay-tree.h.
3544
3545 Fri Sep 24 10:48:10 1999 Bernd Schmidt <bernds@cygnus.co.uk>
3546
3547 * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
3548 DECL_BUILT_IN.
3549 (builtin_function): New arg CLASS. Arg CODE now of type int. All
3550 callers changed.
3551 Set the builtin's DECL_BUILT_IN_CLASS.
3552
3553 1999-09-24 Mark Mitchell <mark@codesourcery.com>
3554
3555 * decl.c (pushdecl): Don't make local declarations of extern
3556 variables give the variable a DECL_CONTEXT for the function.
3557 (make_rtl_for_nonlocal_decl): Don't fuss with obstacks. Simplify.
3558 Don't accidentally make RTL for local declarations.
3559 (emit_local_var): Handle declarations with asm-specifiers here.
3560
3561 1999-09-23 Mark Mitchell <mark@codesourcery.com>
3562
3563 * ir.texi: Improve documentation for TARGET_EXPRs. Discuss
3564 STMT_IS_FULL_EXPR_P.
3565
3566 * cp-tree.h (language_function): Add cannot_inline.
3567 * decl.c (start_function): Restore current_function_cannot_inline
3568 from the saved value.
3569 (save_function_data): Save current_function_cannot_inline.
3570 * decl2.c (start_objects): Change prototype. Build the function
3571 in function-at-a-time mode.
3572 (finish_objects): Likewise.
3573 (generate_ctor_or_dtor_function): Adjust accordingly.
3574
3575 * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
3576 * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
3577 Don't call expand_anon_union_decl here
3578 * semantics.c (exapnd_stmt): Call it here, instead.
3579 * typeck.c (mark_addressable): Addressed variables are implicitly
3580 used.
3581
3582 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3583
3584 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
3585 (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
3586 (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
3587 * cp-tree.h: Add tree checking macros to various tree access
3588 macros.
3589 * ptree.c (print_lang_decl): Test for function or variable
3590 before accessing template info.
3591
3592 1999-09-23 Jason Merrill <jason@yorick.cygnus.com>
3593
3594 * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
3595 * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
3596 * decl2.c (lang_f_options): Add -fshort-wchar.
3597 * cp-tree.h: Declare flag_short_wchar.
3598 * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned
3599 int' for wchar_t.
3600
3601 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3602
3603 * ir.texi: Fix formatting errors and typos.
3604
3605 1999-09-22 Mark Mitchell <mark@codesourcery.com>
3606
3607 * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
3608
3609 * decl.c (pushdecl): Do create a binding for extern "C" functions,
3610 but not for their DECL_ASSEMBLER_NAMEs.
3611 (lookup_name_current_level): Fix formatting.
3612 (xref_tag): Likewise.
3613 * decl2.c (start_objects): Mark static constructors and
3614 destructors as used.
3615
3616 1999-09-22 Jason Merrill <jason@yorick.cygnus.com>
3617
3618 * decl.c (define_case_label): Don't crash if we're not in a switch.
3619
3620 * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
3621 * lang-options.h: Restore -fthis-is-variable. Remove help strings
3622 for unsupported flags.
3623
3624 1999-09-21 Jason Merrill <jason@yorick.cygnus.com>
3625
3626 * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
3627 Accept and warn about -fthis-is-variable.
3628
3629 1999-09-21 Mark Mitchell <mark@codesourcery.com>
3630
3631 * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
3632 CLEANUP_STMT, and SCOPE_STMT.
3633
3634 * decl2.c (lang_decode_option): Adjust, in the wake of recent
3635 changes to option processing.
3636
3637 1999-09-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3638
3639 * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
3640 function pointer from pmfs with no object given.
3641 (convert_for_assignment): Do not return error when converting
3642 pmfs.
3643
3644 1999-09-21 Alex Samuel <samuel@codesourcery.com>
3645
3646 * lex.c (internal_filename): New variable.
3647 (INTERNAL_FILENAME): New macro.
3648 (init_parse): Allocate internal_filename and mark as root. Use it
3649 instead of a string constant.
3650
3651 1999-09-21 Nathan Sidwell <nathan@acm.org>
3652
3653 Reimplement dynamic cast and catch matching.
3654 * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
3655 * search.c (dynamic_cast_base_recurse): New function.
3656 (get_dynamic_cast_base_type): New function for dynamic cast.
3657 * rtti.c (build_dynamic_cast_1): Determine source and target
3658 class relationship. Call __dynamic_cast_2.
3659 * tinfo.h (__user_type_info::upcast): New catch dispatcher.
3660 (__user_type_info::dyncast): New dynamic cast dispatcher.
3661 (__user_type_info::sub_kind): New nested enumeration.
3662 (__user_type_info::contained_p): sub_kind predicate.
3663 (__user_type_info::contained_public_p): Likewise.
3664 (__user_type_info::contained_nonpublic_p): Likewise.
3665 (__user_type_info::contained_nonvirtual_p: Likewise.
3666 (__user_type_info::upcast_result): New nested struct.
3667 (__user_type_info::dyncast_result): New nested struct.
3668 (*::do_upcast): New catch function.
3669 (*::do_dyncast): New dynamic cast function.
3670 (__user_type_info::find_public_subobj): New dynamic cast
3671 helper dispatcher.
3672 (*::do_find_public_subobj): New dynamic cast helper function.
3673 * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
3674 (__user_type_info::dyncast): Define dynamic cast dispatcher.
3675 (*::do_upcast): Define catch function.
3676 (*::do_dyncast): Define dynamic cast function.
3677 (*::do_find_public_subobj): Define dynamic cast helper function.
3678 * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
3679 (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
3680 (__dynamic_cast_2): New dynamic cast runtime.
3681
3682 1999-09-20 Mark Mitchell <mark@codesourcery.com>
3683
3684 * cp-tree.h (finish_stmt_expr): Change prototype.
3685 * expr.c (cplus_expand_expr): Adjust call accordingly.
3686 * init.c (finish_init_stmts): Likewise.
3687 * parse.y (primary): Likewise.
3688 * pt.c (tsubst_copy): Likewise.
3689 * semantics.c (finish_stmt_expr): Don't take two parameters.
3690 Don't remove generated BLOCKs from the block-tree.
3691
3692 Remove support for assigning to `this'.
3693 * NEWS: Note that fact.
3694 * class.c (build_vbase_path): Don't check flag_this_is_variable.
3695 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
3696 (language_function): Remove assigns_this, just_assigned_this, and
3697 x_base_init_expr. Add x_vcalls_possible_p. Add vtbls_set_up_p.
3698 (base_init_expr): Remove.
3699 (current_vcalls_possible_p): New macro.
3700 (vtbls_set_up_p): Likewise.
3701 (emit_base_init): Change prototype.
3702 * decl.c (finish_destructor_body): New function, split out from
3703 finish_function.
3704 (current_function_assigns_this): Remove.
3705 (current_function_just_assigned_this): Likewise.
3706 (start_function): Don't set them.
3707 (finish_function): Don't check them. Don't emit
3708 base-initialization code here. Generate code for destructors when
3709 doing semantic analysis.
3710 (finish_stmt): Don't check current_function_just_assigned_this.
3711 * decl2.c (lang_f_options): Remove this-is-variable.
3712 (lang_decode_option): Likewise.
3713 (grokclassfn): Don't check flag_this_is_variable.
3714 * init.c (emit_base_init): Return the expression generated.
3715 (construct_virtual_bases): Don't push/pop obstacks. Fix
3716 typo.
3717 (build_new_1): Don't check flag_this_is_variable.
3718 (get_temp_regvar): Don't set DECL_REGISTER.
3719 (build_vec_init): Don't call use_variable.
3720 * lang-options.h: Remove "-fthis-is-variable" and
3721 "-fno-this-is-variable".
3722 * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
3723 * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
3724 expand_expr_stmt.
3725 * semantics.c (finish_expr_stmt_real): Rename to ...
3726 (finish_expr_stmt): This. Remove assigned_this parameter.
3727 (begin_if_stmt): Call do_pushlevel before starting the statement.
3728 (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
3729 blocks.
3730 (setup_vtbl_ptr): Emit initialization code for bases and members
3731 at semantic-analysis time. Emit code to initialize vtables in
3732 destructors here.
3733 (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
3734 Don't handle CTOR_INITIALIZER any more.
3735 * typeck.c (build_modify_expr): Don't check for assignments to
3736 this.
3737 (c_expand_return): Don't suggest assigning to `this'.
3738
3739 * Makefile.in (decl.o): Depend on RTL_H.
3740 (decl2.o): Likewise.
3741 (class.o): Likewise.
3742 (call.o): Likewise.
3743 (method.o): Likewise.
3744 (search.o): Likewise.
3745 (tree.o): Likewise.
3746 (pt.o): Likewise.
3747
3748 * decl.c (duplicate_decls): When a builtin function is redeclared
3749 as static, make sure it is mangled correctly.
3750
3751 * ir.texi (CTOR_INITIALIZER): Remove mention. Fix typo. Add
3752 detail about the statement-tree.
3753
3754 1999-09-20 Nathan Sidwell <nathan@acm.org>
3755
3756 * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
3757
3758 1999-09-20 Nick Clifton <nickc@cygnus.com>
3759
3760 * decl2.c (lang_decode_option): Extend comment.
3761
3762 Mon Sep 20 10:49:05 1999 Bernd Schmidt <bernds@cygnus.co.uk>
3763
3764 * typeck.c: Include "tm_p.h".
3765
3766 1999-09-19 Mark Mitchell <mark@codesourcery.com>
3767
3768 * ir.texi: New file.
3769
3770 1999-09-19 Paul Burchard <burchard@pobox.com>
3771
3772 * semantics.c (expand_stmt): Initialize return value.
3773
3774 1999-09-18 Paul Burchard <burchard@pobox.com>
3775
3776 * gxxint.texi: G++ now implements namespaces.
3777
3778 1999-09-18 Mark Mitchell <mark@codesourcery.com>
3779
3780 * decl.c (pop_label): Don't warn about unused labels more than
3781 once.
3782 * semantics.c (finish_goto_stmt): Always marked used labels as
3783 used.
3784
3785 * decl.c (layout_var_decl): Change prototype. Call layout_decl
3786 even when the declaration is external.
3787 (cp_finish_decl): Adjust call to layout_var_decl.
3788 * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
3789
3790 1999-09-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
3791
3792 * typeck.c (get_member_function_from_ptrfunc): Always consider
3793 virtuality inside member pointer.
3794
3795 1999-09-17 Mark Mitchell <mark@codesourcery.com>
3796
3797 Turn on function-at-a-time processing.
3798 * cp-tree.h (doing_semantic_analysis_p): New macro.
3799 (SF_DEFAULT): Define to zero, not SF_EXPAND.
3800 (start_handler_parms): Change prototype.
3801 (expand_start_catch_block): Likewise.
3802 (expand_end_catch_block): Likewise.
3803 (expand_start_eh_spec): Likewise.
3804 (expand_end_eh_spec): Declare.
3805 (finish_handler_parms): Change prototype.
3806 (begin_catch_block): Declare.
3807 (finish_handler): Change prototype.
3808 (do_pushlevel): Declare.
3809 (do_poplevel): Likewise.
3810 * decl.c (pushlevel): Don't create
3811 binding levels when not doing semantic analysis.
3812 (poplevel): Don't pop them.
3813 (pushdecl): Assert that we are never called when not doing
3814 semantic analysis.
3815 (pushdecl_top_level): Use push_to_top_level.
3816 (make_label_decl): Don't fiddle with obstacks. Make RTL For the
3817 label when expanding.
3818 (cp_finish_decl): Only inject for-scope variables when doing
3819 semantic analysis. Add comments.
3820 (start_handler_parms): Return the handler parm.
3821 (start_function): Reorganize. Don't clear DECL_INITIAL if it is
3822 already set. Reinitialize from saved function data if available.
3823 Don't pushlevel when not doing semantic analysis.
3824 (store_parm_decls): Only generate RTL when expanding. Only
3825 pushdecl when doing semantic analysis. Set
3826 current_eh_spec_try_block if appropriate.
3827 (finish_function): Simplify. Use do_pushlevel and do_poplevel.
3828 Combine common code. Don't poplevel when not doing semantic
3829 analysis.
3830 (push_cp_function_context): Don't expand functions without an
3831 explicit call to expand_body.
3832 (mark_lang_function): Make eh_spec_try_block and
3833 x_scope_stmt_stack.
3834 * except.c (expand_end_eh_spec): Don't
3835 declare.
3836 (process_start_catch_block): Likewise.
3837 (push_eh_cleanup): Use finish_decl_cleanup.
3838 (initialize_handler_parm): New function.
3839 (expand_start_catch_block): Use it.
3840 (expand_end_catch_block): Use tree-generation functions, not
3841 RTL-generation functions.
3842 (expand_start_eh_spec): Likewise.
3843 (expand_end_eh_spec): Likewise.
3844 (expand_exception_blocks): Simplify.
3845 (start_anon_func): Use do_pushlevel.
3846 (end_anon_func): Use do_poplvel. Call expand_body for the
3847 function.
3848 * expr.c (do_case): Don't call define_case_label.
3849 * init.c (create_temporary_var): Set DECL_CONTEXT for local
3850 variables.
3851 * method.c (emit_thunk): Call expand_body for the
3852 thunk.
3853 (sythesize_method): Likewise.
3854 * parse.y (handler_args): Give it ttype.
3855 (eat_saved_input): Call expand_body.
3856 (base_init): Use do_pushlevel.
3857 (pending_inline): Call expand_body.
3858 (handler): Adjust calls to finish_handler_parms and
3859 finish_handler.
3860 (handler_args): Don't call expand_start_catch_block. Return the
3861 catch parameter. * pt.c (tsubst_expr): Adjust HANDLER handling.
3862 * parse.c: Regenerated.
3863 * rtti.c (synthesize_tinfo_fn): Call finish_function.
3864 * semantics.c (do_pushlevel): Give it external linkage. Build
3865 SCOPE_STMTs.
3866 (do_poplevel): Likewise.
3867 (finish_case_label): Call define_case_label when doing semantic
3868 analysis.
3869 (finish_goto_stmt): Create RTL for labels.
3870 (finish_function_try_block): Set in_function_try_handler
3871 unconditionally.
3872 (finish_function_handler_sequence): Unset it.
3873 (finish_handler_parms): Use expand_start_catch_block even when
3874 building a statement-tree.
3875 (begin_catch_block): New function.
3876 (finish_handler): Move a little RTL-generation logic here.
3877 (finish_decl_cleanup): Allow cleanups for empty declarations.
3878 (finish_named_return_value): Don't pushdecl when not doing
3879 semantic analysis.
3880 (expand_stmt): Don't do semantic analysis for variable
3881 declarations. Handle START_CATCH_STMT. Call expand_label
3882 directly for a LABEL_STMT. Tweak handling of GOTO_STMT. Adjust
3883 HANDLERs. Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
3884 (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
3885 RETURN_INIT and function try blocks.
3886
3887 * cp-tree.h (language_function): Add x_eh_spec_try_block. Add
3888 x_scope_stmt_stack. Add x_in_charge_parm.
3889 (current_eh_spec_try_block): New macro.
3890 (current_scope_stmt_stack): Likewise.
3891 (current_in_charge_parm): Likewise.
3892 * decl.c (start_function): Initialize current_in_charge_parm.
3893 (finish_function): Use current_in_charge_parm rather than looking
3894 up __in_chrg.
3895 * search.c (expand_indirect_vtbls_init): Likewise.
3896
3897 * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
3898 (TRY_BLOCK): Likewise.
3899 (HANDLER): Likewise.
3900 (START_CATCH_STMT): New tree node.
3901 (SCOPE_STMT): Likewise.
3902 * cp-tree.h (SCOPE_BEGIN_P): New macro.
3903 (SCOPE_NULLIFIED_P): Likewise.
3904 (struct lang_decl_flags): Add pending_inline_p. Adjust dummy.
3905 (struct lang_decl): Add saved_language_function.
3906 (DECL_PENDING_INLINE_INFO): Adjust documentation.
3907 (DECL_PENDING_INLINE_P): New macro.
3908 (TYPE_TI_ARGS): Fix typo in comment.
3909 (DECL_SAVED_TREE): Add to documentation.
3910 (DECL_SAVED_FUNCTION_DATA): New macro.
3911 (START_CATCH_TYPE): Likewise.
3912 (SCOPE_END_P): New macro.
3913 (declare_parm_level): Don't declare.
3914 * decl.c (mark_lang_function): New function, split out from
3915 mark_cp_function_context.
3916 (save_function_data): New function.
3917 (declare_parm_level): Remove.
3918 (finish_function): Use save_function_data to squirrel away
3919 important stuff for later use.
3920 (mark_cp_function_context): Use mark_function_data.
3921 (lang_mark_tree): Likewise.
3922 * lex.c (begin_definition_of_inclass_inline): Set
3923 DECL_PENDING_INLINE_P.
3924 (store_pending_inline): Clear it.
3925 * pt.c (tsubst_decl): Likewise.
3926
3927 1999-09-17 Nathan Sidwell <nathan@acm.org>
3928
3929 * call.c (perform_implicit_conversion): Deal with error_mark_node.
3930
3931 1999-09-17 Mark Mitchell <mark@codesourcery.com>
3932
3933 * decl.c (warn_extern_redeclared_static): Don't get confused by
3934 static member functions.
3935 (duplicate_decls): Merge DECL_THIS_STATIC.
3936
3937 * decl.c (expand_static_init): Make sure assignments to local
3938 statics actually occur.
3939
3940 1999-09-17 Mark Mitchell <mark@codesourcery.com>
3941
3942 * cp-tree.h (poplevel_class): Declare.
3943 * class.c (popclass): Use poplevel_class, not poplevel.
3944 * decl.c (poplevel_class): Don't make it static. Don't return a
3945 value.
3946 (poplevel): Don't call poplevel_class; abort in a class
3947 binding level is seen.
3948 * semantics.c (finish_translation_unit): Use pop_everything.
3949 * parse.y (member_init): Allow errors.
3950 (pending_inline): Call finish_function.
3951 * parse.c: Regenerated.
3952 * Makefile.in (CONFLICTS): Adjust.
3953
3954 1999-09-17 Gabriel Dos Reis <gdr@codesourcery.com>
3955
3956 * error.c: Reduce code duplication.
3957 (dump_template_value): New function.
3958 (dump_type_real): Use it.
3959 (dump_decl): Likewise.
3960 (dump_function_name): Likewise.
3961 (dump_function_decl): Don't be too talkative about function return
3962 type variety.
3963
3964 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3965
3966 * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
3967
3968 * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
3969
3970 1999-09-16 Jason Merrill <jason@yorick.cygnus.com>
3971
3972 * decl2.c (finish_file): Also call check_global_declarations for
3973 the pending_statics list.
3974
3975 1999-09-15 Jason Merrill <jason@yorick.cygnus.com>
3976
3977 * lex.c (cp_pragma_implementation): Allow #pragma implementation
3978 in header files.
3979
3980 1999-09-15 Richard Henderson <rth@cygnus.com>
3981
3982 * lex.c (mark_impl_file_chain): Follow the next chain.
3983
3984 1999-09-15 Mark Mitchell <mark@codesourcery.com>
3985
3986 * decl.c (warn_extern_redeclared_static): Simplify. Catch
3987 problems with extern "C" functions redeclared as static.
3988 (duplicate_decls): When a builtin is redeclared static, make the
3989 new function have internal linkage.
3990
3991 1999-09-15 Mark Mitchell <mark@codesourcery.com>
3992
3993 * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
3994 * pt.c (tsubst_copy): Likewise.
3995 * tree.c (search_tree): Likewise.
3996 (mapcar): Likewise.
3997
3998 1999-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3999
4000 * typeck2.c (ack): Don't declare progname.
4001
4002 1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
4003
4004 * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
4005 filenames with ggc_alloc_string.
4006
4007 1999-09-14 Mark Mitchell <mark@codesourcery.com>
4008
4009 * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the
4010 TARGET_EXPR.
4011 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
4012 the TARGET_EXPR.
4013 * cvt.c (build_up_reference): Likewise.
4014 * tree.c (build_cplus_new): Likewise.
4015 (get_target_expr): Likewise.
4016
4017 Tue Sep 14 01:45:10 1999 Marc Espie <espie@cvs.openbsd.org>
4018
4019 * Makefile.in: Prepend $(SHELL) to move-if-change calls.
4020
4021 1999-09-13 Mark Mitchell <mark@codesourcery.com>
4022
4023 * cp-tree.h (build_target_expr): New function.
4024 * call.c (build_conditional_expr): Use build_target_expr.
4025 (convert_like): Likewise.
4026 (build_over_call): Likewise.
4027 * cvt.c (build_up_reference): Likewise.
4028 * decl.c (build_cleanup_on_safe_obstack): Fold into ...
4029 (destroy_local_var): Here.
4030 (build_target_expr): New function.
4031 * tree.c (build_cplus_new): Use it.
4032 (get_target_expr): Likewise.
4033
4034 1999-09-13 Nathan Sidwell <nathan@acm.org>
4035
4036 * typeck.c (expr_sizeof): Don't decay arrays and functions.
4037 Remove misleading comment.
4038 (build_compound_expr): Don't decay arrays.
4039
4040 1999-09-13 Jason Merrill <jason@yorick.cygnus.com>
4041
4042 * call.c (build_conditional_expr): Always use a TARGET_EXPR for
4043 class rvalues again.
4044
4045 Sun Sep 12 23:29:07 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4046
4047 * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
4048
4049 * g++spec.c: Include gcc.h.
4050 (lang_specific_driver): Constify a char*. Call xcalloc, not
4051 xmalloc/bzero. All calls to the function pointer parameter now
4052 explicitly call `fatal'.
4053
4054 1999-09-12 Mark Mitchell <mark@codesourcery.com>
4055
4056 * call.c (implicit_conversion): Robustify. Handle OFFSET_REFs.
4057 * cvt.c (ocp_convert): Complete the from and destination types.
4058 Adjust warning about functions always being `true' in conditionals.
4059 * decl.c (duplicate_decls): Don't play funny games with abort.
4060 * error.c (dump_expr): Handle OVERLOADs.
4061 * spew.c (probe_obstack): Remove.
4062 * typeck.c (condition_conversion): Use perform_implicit_conversion.
4063
4064 1999-09-12 Bernd Schmidt <bernds@cygnus.co.uk>
4065
4066 * cp-tree.h (auto_function, define_function): Adjust prototypes.
4067 * decl.c (define_function): Lose FUNCTION_CODE arg. All callers
4068 changed.
4069 (auto_function): Likewise, for CODE arg.
4070 Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
4071 (builtin_function): ... here.
4072
4073 1999-09-11 Mark Mitchell <mark@codesourcery.com>
4074
4075 * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
4076 (init_decl_processing): Don't set TREE_PERMANENT for the
4077 error_mark_node.
4078 (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
4079 (grokdeclarator): Likewise.
4080 (grokparms): Don't check TREE_PERMANENT when building up lists.
4081 * decl2.c (grokfield): Don't assert TREE_PERMANENT.
4082 (mark_inline_for_output): Likewise.
4083 * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
4084 * init.c (build_offset_ref): Don't check TREE_PERMANENT.
4085 * lex.c (check_newline): Don't check ggc_p; it is always one.
4086 * pt.c (process_template_parm): Don't check TREE_PERMANENT.
4087 * spew.c (yylex): Don't copy_node or probe_obstacks for
4088 non-permanent CONSTANTs and STRINGs.
4089 * tree.c (build_cplus_array_type_1): Don't fuss with
4090 TREE_PERMANENT on ARRAY_TYPEs.
4091
4092 * cp-tree.def (CLEANUP_STMT): New node.
4093 * cp-tree.h (language_function): Add name_declared.
4094 (current_function_name_declared): New macro.
4095 (CLEANUP_DECL): New macro.
4096 (CLEANUP_EXPR): Likewise.
4097 (emit_local_var): Likewise.
4098 (finish_decl_cleanup): New function.
4099 * cvt.c (build_up_reference): Simplify.
4100 (ocp_convert): Remove dead code.
4101 * decl.c (start_decl): Remove call to add_decl_stmt.
4102 (grok_reference_init): Adjust, to handle bindings temporaries to
4103 references. Remove dead code.
4104 (initialize_local_var): Don't generate RTL for
4105 declarations here, or build cleanups here. Don't fuss with
4106 obstacks. Replace expand_start_target_temps calls with explicit
4107 setting of stms_are_full_exprs_p.
4108 (destroy_local_var): New function.
4109 (emit_local_var): Likewise.
4110 (cp_finish_decl): Use them, as appropriate.
4111 (start_function): Announce template functions.
4112 (store_parm_decls): Don't call declare_function_name here.
4113 (finish_stmt): Don't start emit base-initialization code when just
4114 building the statement-tree.
4115 * init.c (create_temporary_var): Move add_decl_stmt call ...
4116 (get_temp_regvar): Here.
4117 * pt.c (tsubst_expr): Make DECL_INITIAL look like what
4118 cp_finish_decl would expect. Don't call add_decl_stmt.
4119 * semantics.c (begin_compound_stmt): Call declare_function_name,
4120 if appropriate.
4121 (finish_decl_cleanup): New function.
4122 (expand_stmt): Use emit_local_var to output variables.
4123 (expand_body): Set current_funtion_name_declared.
4124
4125 1999-09-10 Mark Mitchell <mark@codesourcery.com>
4126
4127 * cp-tree.h (finish_cleanup_try_block): New function.
4128 * semantics.c (finish_cleanup_try_block): Add comment.
4129
4130 Fri Sep 10 10:32:32 1999 Bernd Schmidt <bernds@cygnus.co.uk>
4131
4132 * cp-tree.h: Delete declarations for all tree nodes now moved to
4133 global_trees.
4134 * decl.c: Delete their definitions.
4135 (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
4136 FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
4137 provide defaults.
4138 (init_decl_processing): Call build_common_tree_nodes and
4139 build_common_tree_nodes_2 instead of building their nodes here.
4140 Don't add gc roots for them.
4141
4142 1999-09-10 Mark Mitchell <mark@codesourcery.com>
4143
4144 * cp-tree.h (language_function): Rename expanding_p to
4145 x_expanding_p. Rename named_label_uses to x_named_label_uses.
4146 (expanding_p): Adjust accordingly.
4147 (TREE_VIA_PRIVATE): Fix typo in comment.
4148 (DECL_REFERENCE_SLOT): Remove.
4149 (SET_DECL_REFERENCE_SLOT): Likewise.
4150 * decl.c (named_label_uses): Adjust. Remove chicken comment.
4151 (push_overloaded_decl): Don't truncate the chain of bindings when
4152 adding an overloaded function.
4153 (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
4154 (initialize_local_var): Fix typo in comment.
4155 (store_parm_decls): Don't set DECL_REFERENCE_SLOT. Tidy up.
4156 * decl2.c (start_objects): Make the fact that we are expanding
4157 the generated function right away explicit.
4158 (start_static_storage_duration_function): Likewise.
4159 (finish_file): Fix typo in comment.
4160 * init.c (build_vec_init): Correct bugs in handling cleanups.
4161 * semantics.c (maybe_convert_cond): New function.
4162 (FINISH_COND): Always store the condition, even if there's
4163 a declaration.
4164 (finish_if_stmt_cond): Use maybe_convert_cond.
4165 (finish_while_stmt_cond): Likewise.
4166 (finish_do_stmt): Likewise.
4167 (finish_for_cond): Likewise.
4168 (expand_cond): Adjust.
4169
4170 * cp-tree.h (FN_TRY_BLOCK_P): New macro.
4171 * init.c (perform_member_init): Remove obstack machinations.
4172 (expand_cleanup_for_base): Likewise.
4173 (finish_init_stmts): Mark the statement-expression as used.
4174 * method.c (emit_thunk): Use tree-generating functions, not
4175 RTL.
4176 (do_build_copy_constructor): Likewise.
4177 (do_build_assign_ref): Likewise.
4178 (synthesize_method): Likewise. Keep track of line numbers.
4179 * pt.c (tsubst_expr): Handle various kinds of try blocks.
4180 * semantics.c (expand_stmts): Remove.
4181 (begin_function_try_block): Set FN_TRY_BLOCK_P.
4182 (finish_function_try_block): Be careful rechaining
4183 function try blocks.
4184 (expand_stmt): Loop through all the statements at a given level.
4185 (exapnd_body): Be careful with line-numbers here too. Prepare for
4186 being called directly from the parser.
4187
4188 * cp-tree.h (finish_function): Adjust prototype.
4189 * decl.c (finish_function): Return the function compiled.
4190 * pt.c (instantiate_decl): Don't play games with obstacks.
4191 * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
4192 (search_tree): Likewise.
4193 * typeck.c: Fix typo in comment.
4194 * typeck2.c (store_init_value): Add comment.
4195
4196 * cp-tree.h (CPTI_ATEXIT): New macro.
4197 (atexit_node): Likewise.
4198 * decl.c (destroy_local_static): New function, broken out from ...
4199 (expand_static_init): Here.
4200
4201 * rtti.c (get_tinfo_var): These should always be global
4202 (expand_si_desc): Use tree, not RTL, functions to generate code.
4203 (expand_class_desc): Likewise.
4204 (expand_ptr_desc): Likewise.
4205 (expand_attr_desc): Likewise.
4206 (expand_generic_desc): Likewise.
4207 (synthesize_tinfo_fn): Likewise.
4208
4209 1999-09-09 Mark Mitchell <mark@codesourcery.com>
4210
4211 * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
4212 (RECHAIN_STMTS_FROM_LAST): Remove. Replace all uses with
4213 RECHAIN_STMTS.
4214 (RECHAIN_STMST_FROM_CHAIN): Likewise.
4215
4216 * parse.y (simple_stmt): Fix typo in last change.
4217
4218 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
4219 (STMT_IS_FULL_EXPR_P): Likewise.
4220 (STMT_LINENO_FOR_FN_P): Likewise.
4221 (prep_stmt): New function.
4222 (building_stmt_tree): Tweak for safety.
4223 * pt.c (tsubst_expr): Use prep_stmt throughout.
4224 (add_tree): Move it to semantics.c
4225 * semantics.c (add_tree): Move it here.
4226 (finish_expr_stmt_real): New function.
4227 (finish_expr_stmt): Use it.
4228 (finish_if_stmt_cond): Use FINISH_COND.
4229 (finish_while_stmt_cond): Likewise.
4230 (finish_for_cond): Likewise.
4231 (finish_stmt_tree): Tweak line-number handling.
4232 (prep_stmt): New function.
4233 (expand_stmt): Use it.
4234
4235 * cp-tree.h (begin_switch_stmt): Adjust prototype.
4236 (finish_switch_cond): Likewise.
4237 * parse.y (simple_stmt): Adjust accordingly.
4238 * parse.c: Regenerated.
4239 * pt.c (tsubst_expr): Adjust accordingly.
4240 * semantics.c (expand_cond): New function.
4241 (FINISH_COND): New macro.
4242 (begin_switch_stmt): Build the SWITCH_STMT here.
4243 (finish_switch_stmt_cond): Not here.
4244 (expand_stmt): Adjust calls to begin_switch_stmt and
4245 finish_switch_cond. Use expand_cond throughout.
4246
4247 * dump.c (dequeue_and_dump): Dump types for constants.
4248 Describe DECL_ARG_TYPE more intuitively.
4249 Handle ARRAY_REF.
4250
4251 * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
4252 (lang_cleanup_tree): Remove.
4253 * lex.c (make_lang_type): Use ggc_alloc to allocate
4254 TYPE_LANG_SPECIFIC.
4255
4256 Reorganize per-function data.
4257 * cp-tree.h (saved_scope): Add function_decl, bindings.
4258 (language_function): Rename binding_level to bindings.
4259 (cp_function_chain): Use the current_function, not the
4260 outer_function_chain.
4261 (current_class_ptr): Make it work, even when there's no
4262 current function.
4263 (current_class_ref): Likewise.
4264 (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New
4265 macros.
4266 (clear_temp_name): Remove.
4267 * decl.c (check_function_type): New function, broken out from
4268 start_function.
4269 (current_binding_level): Adjust definition.
4270 (pushlevel): Simplify.
4271 (poplevel): Don't use named_label_uses when we're outside
4272 a function scope.
4273 (mark_saved_scope): Mark function_decl and bindings.
4274 (maybe_push_to_top_level): Don't unconditionally push a new
4275 function context. Save bindings and the current_function_decl.
4276 Don't clear named_labels.
4277 (pop_from_top_level): Pop function context if appropriate.
4278 (init_decl_processing): Set init_lang_status and free_lang_status,
4279 rather than save_lang_status and restore_lang_status.
4280 (start_function): Take SF_* flags. Don't clear per-function data.
4281 Reorder and simplify to use new per-function data code. Add
4282 asserts.
4283 (store_parm_decls): Don't call init_function_start here.
4284 (finish_function): Adjust for new handling of per-function data.
4285 (push_cp_function_context): Simplify.
4286 (mark_cp_function_context): Change binding_level to bindings.
4287 * decl2.c (clear_temp_name): Remove.
4288 (start_objects): Use SF flags to start_function.
4289 (start_static_storage_duration_function): Likewise.
4290 * except.c (start_anon_func): Remove redundant calls to
4291 push_function_context_to. Use SF flags to start function.
4292 (end_anon_func): Remove redundant call to pop_function_context
4293 from.
4294 * lex.c (reinit_parse_for_function): Don't initialize per-function
4295 data.
4296 * method.c (emit_thunk): Clear current_function after calling
4297 assemble_end_function. Use SF flags for start_function.
4298 (synthesize_method): Use SF flags for start_function.
4299 * parse.c: Regenerated.
4300 * parse.y (fn.defpen): Likewise.
4301 (pending_inline): Clear current_function, even if something goes
4302 wrong.
4303 * pt.c (instantiate_decl): Use SF flags to start_function.
4304 Don't save and restore expanding_p.
4305 (add_tree): Handle the case where we are outside any function.
4306 (end_tree): Likewise.
4307 * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
4308 * semantics.c (begin_function_definition): Likewise.
4309 (expand_body): Likewise.
4310
4311 1999-09-09 Nathan Sidwell <nathan@acm.org>
4312
4313 * cp-tree.h (convert_to_void): Prototype new function.
4314 (require_complete_type_in_void): Remove prototype.
4315 * cvt.c (convert_to_void): New function.
4316 (ocp_convert): Use convert_to_void.
4317 * decl.c (cplus_expand_expr_stmt): Likewise, for complete
4318 expressions.
4319 * typeck.c (require_complete_type_in_void): Remove function.
4320 (build_compound_expr): Use convert_to_void.
4321 (build_static_cast): Likewise.
4322 (build_c_cast): Likewise.
4323 * semantics.c (finish_expr_stmt): Do not decay full expressions.
4324
4325 * typeck.c (build_x_compound_expr): Add FIXME.
4326
4327 1999-09-08 Mark Mitchell <mark@codesourcery.com>
4328
4329 * cp-tree.h (scratch_tree_cons): Remove.
4330 * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
4331 and perm_tree_cons with plain tree_cons.
4332 * class.c: Likewise.
4333 * decl.c: Likewise.
4334 * decl2.c: Likewise.
4335 * except.c: Likewise.
4336 * expr.c: Likewise.
4337 * init.c: Likewise.
4338 * lex.c: Likewise.
4339 * method.c: Likewise.
4340 * parse.y: Likewise.
4341 * pt.c: Likewise.
4342 * repo.c: Likewise.
4343 * rtti.c: Likewise.
4344 * search.c: Likewise.
4345 * typeck.c: Likewise.
4346 * parse.c: Regenerated.
4347 * tree.c (build_srcloc): Simplify.
4348
4349 1999-09-08 Bruce Korb autogen@linuxbox.com
4350
4351 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
4352
4353 1999-09-08 Mark Mitchell <mark@codesourcery.com>
4354
4355 * cp-tree.h (lang_decl_flags): Remove permanent_attr.
4356 Remove next.
4357 (LANG_DECL_PERMANENT): Remove.
4358 * decl.c (duplicate_decls): Don't mess about with obstacks trying
4359 to free memory.
4360 (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
4361 * lex.c (free_lang_decl_chain): Remove.
4362 (build_lang_decl): Don't use obstacks.
4363 (retrofit_lang_decl): Likewise.
4364 (copy_lang_decl): Likewise.
4365
4366 * cp-tree.h (saved_scope): Remove old_binding_level and
4367 function_decl. Tidy up.
4368 * decl.c (mark_saved_scope): Don't set them.
4369 (maybe_push_to_top_level): Clear memory.
4370
4371 * decl.c (layout_var_decl): Change prototype. Don't complete
4372 types for external objects.
4373 (check_initializer): Likewise. Tidy.
4374 (initialize_local_var): Complete types here.
4375 (cp_finish_decl): Not here. Reorganize a little.
4376 (grokvardecl): Don't complete types here.
4377
4378 * decl.c (start_function): Clear last_dtor_insn and
4379 last_parm_cleanup_insn.
4380 (push_cp_function_context): Just copy over a little of
4381 the old context, not all of it.
4382
4383 * cp-tree.h (copy_to_permanent): Remove.
4384 (permanent_p): Likewise.
4385 * decl.c (building_typename_type): Don't use copy_to_permanent.
4386 (start_decl): Likewise.
4387 (grok_reference_init): Likewise.
4388 (cp_finish_decl): Likewise.
4389 * init.c (build_new_1): Don't use mapcar.
4390 (build_vec_delete_1): Don't use copy_to_permanent.
4391 (build_vec_init): Likewise.
4392 * parse.y (primary): Likewise.
4393 * parse.c: Regenerated.
4394 * pt.c (push_template_decl_real): Don't use copy_to_permanent.
4395 (lookup_template_class): Likewise.
4396 (tsubst_friend_function): Likewise.
4397 (instantiate_class_template): Likewise.
4398 (tsubst_decl): Likewise.
4399 (tsubst): Likewise.
4400 (instantiate_template): Likewise.
4401 (unify): Likewise.
4402 * rtti.c (get_tinfo_fn): Likewise.
4403 (build_dynamic_cast): Likewise.
4404 * semantics.c (finish_if_stmt_cond): Likewise.
4405 (finish_while_stmt_cond): Likewise.
4406 (finish_do_stmt): Likewise.
4407 (finish_for_cond): Likewise.
4408 (finish_for_expr): Likewise.
4409 (finish_cleanup): Likewise.
4410 (add_decl_stmt): Likewise.
4411 (finish_named_return_value): Likewise.
4412 (finish_qualified_call_expr): Likewise.
4413 * tree.c (perm_manip): Remove.
4414 (build_exception_variant): Don't use copy_to_permanent.
4415 (permanent_p): Remove.
4416 (copy_to_permament): Remove.
4417 (build_min_nt): Don't use copy_to_permanent.
4418 (build_min): Likewise.
4419 (min_tree_cons): Likewise.
4420 * typeckc.c (build_static_cast): Likewise.
4421 (build_reinterpret_cast): Likewise.
4422 (build_const_cast): Likewise.
4423
4424 1999-09-07 Mark Mitchell <mark@codesourcery.com>
4425
4426 * decl.c (ggc_p): Set it to 1.
4427 (mark_saved_scope): Add prototype.
4428
4429 1999-09-07 Richard Henderson <rth@cygnus.com>
4430
4431 * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
4432 * typeck.c (self_promoting_args_p): Delete.
4433
4434 1999-09-07 Jason Merrill <jason@yorick.cygnus.com>
4435
4436 * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
4437 (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
4438
4439 1999-09-07 Mark Mitchell <mark@codesourcery.com>
4440
4441 * Makefile.in (tree.o): Depend on ggc.h.
4442 * class.c (make_method_vec): Remove.
4443 (free_method_vec): Likewise.
4444 (free_method_vecs): Remove.
4445 (add_method): Don't use them.
4446 * cp-tree.def (PTRMEM_CST): Make it longer.
4447 (TEMPLATE_PARM_INDEX): Make it shorter.
4448 * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
4449 (template_parm_index): Remove RTL field.
4450 (ptrmem_cst): Add RTL field.
4451 (finish_function): Removed parameter.
4452 (process_next_inline): Change prototype.
4453 (init_cplus_unsave): Rename to init_tree.
4454 (binding_init): Remove.
4455 * decl.c (free_binding_nodes): Remove.
4456 (push_binding): Don't use them. Set BINDING_HAS_LEVEL_P.
4457 (pop_binding): Don't use free_binding_nodes.
4458 (free_binding_vecs): Remove.
4459 (store_bindings): Don't use them.
4460 (pop_from_top_level): Likewise.
4461 (lookup_namespace_name): Simplify.
4462 (build_typename_type): Don't use obstack_free.
4463 (unqualified_namespace_lookup): Simplify.
4464 (lookup_name_real): Simplify.
4465 (start_function): Remove comment about leaks.
4466 (finish_function): Removed nested parameter. Call
4467 expand_end_bindings even when building_stmt_tree.
4468 Call ggc_push_context and ggc_pop_context around
4469 rest_of_compilation, if necessary.
4470 (mark_cp_function_context): Handle a NULL language-context.
4471 (lang_mark_false_label_stack): Fix typo.
4472 (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
4473 TEMPLATE_PARM_INDEX. Handle the funny TYPE_LANG_SPECIFIC on
4474 pointer to method types.
4475 (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
4476 * decl2.c (finish_objects): Adjust call to finish_function.
4477 (finish_static_store_duration_function): Likewise.
4478 (do_nonmember_using_decl): Remove call to binding_init.
4479 * except.c (end_anon_func): Adjust call to finish_function.
4480 * lex.c (mark_impl_file_chain): New function.
4481 (init_parse): Call init_tree, not init_cplus_unsave.
4482 Add GC roots.
4483 (cp_pramga_interface): Use xmalloc, not permalloc.
4484 (cp_pragma_implementation): Likewise.
4485 (begin_definition_of_inclass_inline): Simplify.
4486 (process_next_inline): Adjust prototype.
4487 (do_scoped_id): Don't call binding_init.
4488 (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
4489 * method.c (emit_thunk): Adjust call to finish_function.
4490 (synthesize_method): Likewise.
4491 * parse.y (%union): Add a new `pi' variant.
4492 (PRE_PARSED_FUNCTION_DECL): Use it.
4493 (fn.defpen): Likewise.
4494 (fndef): Adjust call to finish_function.
4495 * pt.c (instantiate_decl): Likewise.
4496 * rtti.c (syntheisze_tinfo_fn): Likewise.
4497 * semantics.c (expand_body): Likewise.
4498 * tree.c: Include ggc.h.
4499 (mark_list_hash): New function.
4500 (binding_init): Remove.
4501 (init_cplus_unsave): Rename to ...
4502 (init_tree): This. Add GC roots.
4503
4504 1999-09-05 Mark Mitchell <mark@codesourcery.com>
4505
4506 Get ready for garbage collection.
4507 * Makefile.in (CXX_TREE_H): Add varray.h
4508 (lex.o): Depend on ggc.h.
4509 (decl.o): Likewise.
4510 (decl2.o): Likewise.
4511 (method.o): Likewise.
4512 (search.o): Likewise.
4513 (pt.o): Likewise.
4514 (repo.o): Likewise.
4515 * class.c: Include ggc.h.
4516 (current_class_name): Remove.
4517 (current_class_type): Likewise.
4518 (current_access_specifier): Likewise.
4519 (previous_class_type): Likewise.
4520 (previous_class_values): Likewise.
4521 (class_cache_firstobj): Likewise.
4522 (current_lang_base): Likewise.
4523 (current_lang_stack): Likewise.
4524 (current_lang_stacksize): Likewise.
4525 (lang_name_c): Likewise.
4526 (lang_name_cplusplus): Likewise.
4527 (lang_name_java): Likewise.
4528 (current_lang_name): Likewise.
4529 (base_layout_decl): Likewise.
4530 (access_default_node): Likewise.
4531 (access_public_node): Likewise.
4532 (access_protected_node): Likewise.
4533 (access_private_node): Likewise.
4534 (access_default_virtual_node): Likewise.
4535 (access_public_virtual_node): Likewise.
4536 (access_protected_virtual_node): Likewise.
4537 (access_private_virtual_node): Likewise.
4538 (signed_zero_node): Likewise.
4539 (init_class_processing): Don't build base_layout_decl.
4540 (push_lang_context): Adjust now that current_lang_base is a varray.
4541 (pop_lang_context): Likewise.
4542 * cp-tree.h: Include varray.h.
4543 (cp_global_trees): Add access_default, access_public,
4544 access_protected, access_private, access_default_virtual,
4545 access_public_virtual, access_protected_virtual,
4546 access_private_virtual, ctor_identifier, delta2_identifier,
4547 delta_identifier, dtor_identifier, in_charge_identifier,
4548 index_identifier, nelts_identifier, this_identifier,
4549 pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
4550 lang_name_c, lang_name_cplusplus, lang_name_java,
4551 empty_except_spec, null, jclass, minus_one, terminate.
4552 (saved_scope): Move here from decl.c. Define globals in terms of
4553 saved_scope: current_namespace, current_class_name,
4554 current_class_type, current_access_specifier, current_lang_stack,
4555 current_lang_base, current_lang_name, current_function_parms,
4556 current_template_parms, processing_template_decl,
4557 processing_specialization, processing_explicit_instantiation,
4558 previous_class_type, previous_class_values, class_cache_firstobj.
4559 (scope_chain): New variable.
4560 (init_pt): New function.
4561 * decl.c (current_namespace): Remove.
4562 (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
4563 (dtor_identifier, pfn_identifier, index_identifier): Likewise.
4564 (delta_identifier, delta2_identifier): Likewise.
4565 (pfn_or_delta2_identifier, tag_identifier): Likewise
4566 (vt_off_identifier, empty_except_spec, null_node): Likewise.
4567 (current_function_parms, current_lang_base): Remove.
4568 (current_lang_stack, previous_class_values): Remove.
4569 (class_binding_level): Macroize.
4570 (saved_scope): Remove.
4571 (current_saved_scope): Rename to scope_chain.
4572 (mark_saved_scope): Adjust for new scope structure.
4573 (maybe_push_to_top_level): Likewise.
4574 (pop_from_top_level): Likewise.
4575 (duplicate_decls): Adjust now that current_lang_base is a varray.
4576 (build_typename_type): Call ggc_add_tree_hash_table_root.
4577 (init_decl_processing): Call init_pt. Call push_to_top_level to
4578 set up globals. Add GC roots.
4579 (xref_basetypes): Adjust now that current_lang_base is a varray.
4580 * decl.h (this_identifier): Remove.
4581 (in_charge_identifier): Likewise.
4582 * decl2.c: Don't include varray.h.
4583 (current_namespace): Remove.
4584 (init_decl2): Add GC roots.
4585 * except.c (Terminate): Remove.
4586 (init_exception_processing): Use terminate_node instead.
4587 (build_terminate_handler): Likewise.
4588 * init.c (nc_nelts_field_id): Remove.
4589 (minus_one): Likewise.
4590 (init_init_processing): Use minus_one_node and nelts_identifier
4591 instead. Add GC roots.
4592 (jclass_node): Remove.
4593 (build_new_1): Use nelts_identifier.
4594 (build_vec_init): Likewise.
4595 (build_vec_delete): Likewise.
4596 * lex.c: Include ggc.h.
4597 (defarg_fn): Move declaration early.
4598 (defarg_parms): Likewise.
4599 (init_parse): Add GC roots.
4600 (handle_cp_pragma): Remove redundant declaration of
4601 pending_vtables.
4602 * method.c: Include ggc.h.
4603 (btypelist): Make it a varray. All uses changed.
4604 (ktypelist): Likewise.
4605 (init_method): Add GC roots.
4606 * pt.c: Don't include varray.h. Include ggc.h.
4607 (current_template_parms): Remove.
4608 (processing_template_decl): Likewise.
4609 (processing_specialization): Likewise.
4610 (processing_explicit_instantiation): Likewise.
4611 (init_pt): New function.
4612 * repo.c: Include ggc.h.
4613 (init_repo): Add GC roots.
4614 * search.c: Don't include varray.h.
4615 (_vptr_name): Remove.
4616 (lookup_field_1): Use vtpr_identifier instead.
4617 (expand_indirect_vtbls_init): Remove redundant declaration of
4618 in_charge_identifier.
4619 (init_search_processing): Use vptr_identifier.
4620
4621 1999-09-05 Richard Henderson <rth@cygnus.com>
4622 Bernd Schmidt <bernds@cygnus.co.uk>
4623 Mark Mitchell <mark@codesourcery.com>
4624
4625 * Makefile.in (parse.o): Depend on ggc.h.
4626 (decl2.o): Depend on ggc.h.
4627 (init.o): Depend on ggc.h.
4628 * cp-tree.h (init_decl2): Declare.
4629 (cp_parse_init): Likewise.
4630 * decl.c (ggc_p): Define to zero.
4631 (mark_saved_scope): New function.
4632 (init_decl_processing): Call cp_parse_init, and cp_decl2.
4633 Register GC roots.
4634 (expand_static_init): Add GC roots.
4635 * decl2.c: Include ggc.h.
4636 (init_decl2): New function.
4637 * init.c: Include ggc.h.
4638 (init_init_processing): Add GC roots.
4639 * parse.y: Include ggc.h.
4640 (cp_parse_init): New function.
4641
4642 1999-09-04 Mark Mitchell <mark@codesourcery.com>
4643
4644 * decl.c (init_decl_processing): Set mark_lang_status.
4645 (lang_mark_false_label_stack): Adjust prototype.
4646 * decl2.c (grok_function_init): Remove extraneous declaration of
4647 abort_fndecl.
4648
4649 * Make-lang.in (cc1plus): Remove dependency on GGC.
4650 * Makefile.in (OBJS): Don't mention ggc-simple.o.
4651 (OBJDEPS): Don't mention ggc-simple.o.
4652
4653 * Make-lang.in (cc1plus): Depend on $(GGC).
4654 * Makefile.in (OBJS): Add ggc-simple.o.
4655 (OBJDEPS): Likewise.
4656 * cp-tree.h (language_function): Rename members to `x_' versions;
4657 we now have x_named_labels, x_ctor_label, x_dtor_label,
4658 x_base_init_list, x_member_init_list, x_base_init_expr,
4659 x_current_class_ptr, x_current_class_ref, x_last_tree,
4660 x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
4661 x_result_rtx.
4662 (dtor_label, ctor_label, current_base_init_list,
4663 current_member_init_list, base_init_expr, current_class_ptr,
4664 current_class_ref, last_tree, last_expr_type): Adjust accordingly.
4665 * decl.c: Include ggc.h.
4666 (last_dtor_insn): Adjust to use x_ names.
4667 (last_parm_cleanup_insn): Likewise.
4668 (original_result_rtx): Likewise.
4669 (named_labels): Likewise.
4670 (mark_binding_level): New function.
4671 (mark_cp_function_context): Likewise.
4672 (mark_false_label_stack): Likewise.
4673 (lang_mark_tree): Likewise.
4674 (lang_cleanup_tree): Likewise.
4675
4676 1999-09-03 Mark Mitchell <mark@codesourcery.com>
4677
4678 * Makefile.in (CXX_TREE_H): Include function.h.
4679 (decl.o): Don't depend on function.h.
4680 (decl2.o): Likewise.
4681 (typeck.o): Likewise.
4682 (init.o): Likewise.
4683 (method.o): Likewise.
4684 * cp-tree.h: Include function.h.
4685 (cp_function): Rename to language_function. Remove next.
4686 (cp_function_chain): Make it a macro, not a variable.
4687 (push_cp_function_context): Don't declare.
4688 (pop_cp_function_context): Likewise.
4689 * decl.c: Don't include function.h.
4690 (push_cp_function_context): Make it static. Make it suitable for
4691 a save_lang_status callback.
4692 (pop_cp_function_context): Likewise.
4693 (maybe_push_to_top_level): Call push_function_context_to, not
4694 push_cp_function_context.
4695 (pop_from_top_level): Call pop_function_context_from, not
4696 pop_cp_function_context.
4697 (init_decl_processing): Set save_lang_status and
4698 restore_lang_status. Call push_function_context_to, not
4699 push_cp_function_context.
4700 (cp_function_chain): Remove.
4701 * decl2.c: Don't include function.h.
4702 * except.c: Don't include function.h.
4703 (start_anon_func): Call push_function_context_to, not
4704 push_cp_function_context.
4705 (end_anon_func): Call pop_function_context_from, not
4706 pop_cp_function_context.
4707 * init.c: Don't include function.h.
4708 * lex.c (begin_definition_of_inclass_inline): Call
4709 push_function_context_to, not push_cp_function_context.
4710 (process_next_inline): Call pop_function_context_from, not
4711 pop_cp_function_context.
4712 * method.c: Don't include function.h.
4713 (synthesize_method): Call push_function_context_to, not
4714 push_cp_function_context. Call pop_function_context_from, not
4715 pop_cp_function_context.
4716 * typeck.c: Don't include function.h.
4717
4718 * decl.c (expand_static_init): Tweak handling of static
4719 initializations for objects without constructors.
4720
4721 1999-09-03 Nathan Sidwell <nathan@acm.org>
4722
4723 * typeck.c (build_indirect_ref): Reject dereference of pointer to
4724 void.
4725
4726 1999-09-02 Mark Mitchell <mark@codesourcery.com>
4727
4728 * cp-tree.h (cp_function): Move here, from decl.c.
4729 (cp_function_chain): Declare.
4730 (dtor_label): New macro, instead of variable.
4731 (ctor_label): Likewise.
4732 (current_base_init_list): Likewise.
4733 (current_member_init_list): Likewise.
4734 (base_init_expr): Likewise.
4735 (current_class_ptr): Likewise.
4736 (current_class_ref): Likewise.
4737 (last_tree): Likewise.
4738 (last_expr_type): Likewise.
4739 (current_function_returns_value): Likewise.
4740 (current_function_returns_null): Likewise.
4741 (current_function_just_assigned_this): Likewise.
4742 (current_function_parms_stored): Likewise.
4743 (temp_name_counter): Likewise.
4744 (static_labelno): Likewise.
4745 (expanding_p): Likewise.
4746 (stmts_are_full_exprs_p): Likewise.
4747 (in_function_try_handler): Likewise.
4748 (lang_type): Remove nested type_flags. All uses changed.
4749 * call.c (ctor_label): Remove.
4750 (dtor_label): Likewise.
4751 * class.c (current_class_ptr): Remove.
4752 (current_class_ref): Likewise.
4753 * decl.c (static_labelno): Remove.
4754 (dtor_label): Likewise.
4755 (last_dtor_insn): New macro, instead of variable.
4756 (last_parm_cleanup_insn): Likewise.
4757 (original_result_rtx): Likewise.
4758 (in_function_try_handler): Remove.
4759 (named_label_uses): New macro, instead of variable.
4760 (named_labels): Likewise.
4761 (current_function_returns_value): Remove.
4762 (current_function_returns_null): Likewise.
4763 (current_function_assigns_this): New macro, instead of variable.
4764 (current_function_just_assigned_this): Likewise.
4765 (current_binding_level): Likewise.
4766 (init_decl_processing): Call push_cp_function_context.
4767 (cp_function): Move to cp-tree.h
4768 (cp_function_chain): Make it global.
4769 (temp_name_counter): Remove.
4770 (push_cp_function_context): Simplify.
4771 (pop_cp_function_context): Likewise.
4772 * decl2.c (temp_name_counter): Remove.
4773 * init_c (current_base_init_list): Likewise.
4774 (current_member_init_list): Likewise.
4775 (base_init_expr): Likewise.
4776 * method.c (static_labelno): Likewise.
4777 * pt.c (last_tree): Likewise.
4778 * semantics.c (expanding_p): Likewise.
4779 (stmts_are_full_exprs_p): Likewise.
4780 (last_expr_type): Likewise.
4781 * typeck.c (dtor_label): Likewise.
4782 (ctor_label): Likewise.
4783
4784 1999-09-01 Alex Samuel <samuel@codesourcery.com>
4785
4786 * decl2.c (arg_assoc_template_arg): New prototype. New function.
4787 (arg_assoc_class): Use arg_assoc_template_arg for template
4788 arguments.
4789 (arg_assoc): Likewise.
4790 * pt.c (mangle_class_name_for_template): Allow member template
4791 template arguments.
4792
4793 1999-09-02 Nathan Sidwell <nathan@acm.org>
4794
4795 * call.c (build_conditional_expr): Warn on enum mismatches.
4796 (convert_arg_to_ellipsis): Move non-pod check to after
4797 conversion.
4798
4799 1999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4800
4801 * gxx.gperf (hash, is_reserved_word): Add prototypes.
4802
4803 * init.c (build_vec_init): Initialize variable `try_block'.
4804
4805 * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
4806 Likewise for bzero/memset.
4807 (token_getch, token_put_back): Add static prototypes. Remove
4808 `inline' from the definitions.
4809 (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
4810
4811 1999-09-01 Mark Mitchell <mark@codesourcery.com>
4812
4813 * cp-tree.h (lang_type): Move align into type_flags.
4814 (CLASSTYPE_ALIGN): Adjust accordingly.
4815 * call.c (direct_reference_binding): Remove misleading comment.
4816
4817 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4818
4819 * parse.y (language_string): Constify.
4820
4821 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4822
4823 * repo.c (getpwd): Don't prototype.
4824 * xref.c (getpwd): Likewise
4825
4826 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4827
4828 * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
4829 Remove hacks for stuff which now comes from libiberty.
4830
4831 1999-08-30 Jason Merrill <jason@yorick.cygnus.com>
4832
4833 * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
4834
4835 1999-08-30 Mark Mitchell <mark@codesourcery.com>
4836
4837 * cp-tree.h (begin_init_stmts): Declare.
4838 (finish_init_stmts): Likewise.
4839 * cvt.c (build_up_reference): Wrap the declaration of a temporary
4840 in a statement-expression so that we will see it when expanding
4841 tree structure later.
4842 * init.c (begin_init_stmts): Don't make it static.
4843 (finish_init_stmts): Likewise.
4844
4845 * cp-tree.h (start_handler_parms): New function.
4846 (expand_start_catch_block): Take only one parameter.
4847 (start_handler_parms): New function.
4848 * decl.c (start_handler_parms): Define it.
4849 * except.c (process_start_catch_block): Take only one parameter.
4850 Don't call grokdeclarator here.
4851 (expand_start_catch_block): Don't call grokdeclarator here,
4852 either.
4853 * parse.y (handler_args): Adjust call to
4854 expand_start_catch_block. Use start_handler_parms.
4855 * pt.c (push_template_decl_real): Make permanent lists have
4856 permanent elements.
4857 (tsubst_expr): Adjust calls to expand_start_catch_block
4858 appropriately.
4859 * semantics.c (expand_stmt): Likewise.
4860
4861 1999-08-29 Alex Samuel <samuel@codesourcery.com>
4862
4863 * pt.c (push_template_decl_real): Use template declaration from
4864 class type if it exists.
4865
4866 1999-08-29 Mark Mitchell <mark@codesourcery.com>
4867
4868 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
4869 (maybe_inject_for_scope_var): Declare it.
4870 (initialize_local_var): Likewise.
4871 * decl.c (maybe_inject_for_scope_var): Make it global.
4872 (initialize_local_var): Likewise. Move cleanup handling here,
4873 from cp_finish_decl.
4874 (make_rtl_for_nonlocal_decl): Use
4875 push_obstacks_nochange/pop_obstacks, rather than
4876 end_temporary_allocation/resume_temporary_allocation.
4877 (cp_finish_decl): Try to complete the type of a variable when it
4878 is declared. Move cleanup-handling to initialize_local_var.
4879 (expand_static_init): Use tree-building code, rather than
4880 RTL-building code.
4881 * decl2.c (get_temp_name): Assert non-initializedness of
4882 temporaries.
4883 * init.c (create_temporary_var): Move RTL-assigning code to ...
4884 (get_temp_regvar): Here.
4885 * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here.
4886 * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just
4887 call initialize_local_var to generate initialization code.
4888
4889 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4890
4891 * cp-tree.h (fndecl_as_string, type_as_string,
4892 type_as_string_real, args_as_string, decl_as_string,
4893 expr_as_string, code_as_string, language_as_string,
4894 parm_as_string, op_as_string, assop_as_string, cv_as_string,
4895 lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
4896
4897 * errfn.c (cp_printer): Likewise.
4898
4899 * error.c (cp_printer, fndecl_as_string, type_as_string_real,
4900 type_as_string, expr_as_string, decl_as_string, lang_decl_name,
4901 cp_file_of, code_as_string, language_as_string, parm_as_string,
4902 op_as_string, assop_as_string, args_as_string, cv_as_string):
4903 Likewise.
4904
4905 * tree.c (lang_printable_name): Likewise.
4906
4907 1999-08-28 Richard Henderson <rth@cygnus.com>
4908
4909 * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
4910
4911 1999-08-28 Mark Mitchell <mark@codesourcery.com>
4912
4913 * cp-tree.h (strip_array_types): New function.
4914 * decl.c (maybe_deduce_size_from_array_init): New function, split
4915 out from cp_finish_decl.
4916 (layout_var_decl): Likewise.
4917 (maybe_commonize_var): Likewise.
4918 (maybe_inject_for_scope_var): Likewise.
4919 (initialize_local_var): Likewise.
4920 (build_cleanup_on_safe_obstack): Likewise.
4921 (check_initializer): Likewise.
4922 (make_rtl_for_nonlocal_decl): Likewise.
4923 (cp_finish_decl): Use them.
4924 * typeck.c (strip_array_types): New function.
4925
4926 * cp-tree.def (LABEL_STMT): New tree node.
4927 * cp-tree.h (LABEL_STMT_LABEL): New macro.
4928 (shadow_label): Remove.
4929 (declare_local_label): New function.
4930 (finish_label_decl): Likewise.
4931 * decl.c (make_label_decl): New function, split out from
4932 lookup_label.
4933 (shadowed_labels): Remove.
4934 (binding_level): Add shadowed_labels.
4935 (clear_binding_level): Remove.
4936 (push_binding_level): Just bzero the new binding level.
4937 (pushlevel): Fix indentation.
4938 (pop_label): New function.
4939 (pop_labels): Likewise, split out from poplevel.
4940 (poplevel): Pop local labels. Use pop_labels.
4941 (maybe_push_to_top_level): Don't clear shadowed_labels.
4942 (lookup_label): Use make_label_decl.
4943 (shadow_label): Remove.
4944 (declare_local_label): New function.
4945 (define_label): Simplify.
4946 (start_function): Don't clear shadowed_labels.
4947 (cp_function): Remove shadowed_labels.
4948 (push_cp_function_context): Don't save shadowed_labels.
4949 (pop_cp_function_context): Don't restore it.
4950 * dump.c (dequeue_and_dump): Handle LABEL_STMT.
4951 * parse.y (label_decl): Use finish_label_decl.
4952 * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
4953 declarations.
4954 * semantics.c (finish_label_stmt): Add a LABEL_STMT when
4955 building_stmt_tree.
4956 (finish_label_decl): New function.
4957 (expand_stmt): Handle LABEL_STMTs and local label declarations.
4958
4959 1999-08-26 Mark Mitchell <mark@codesourcery.com>
4960
4961 * decl.c (lookup_label): Build labels on the permanent obstack
4962 when building statement trees. Don't build RTL for labels when
4963 building statement trees.
4964 * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
4965 building statement trees.
4966 (finish_label_stmt): Likewise.
4967 (expand_stmt): Adjust accordingly.
4968 * pt.c (tsubst_expr); Likewise.
4969 (do_decl_instantiation): Robustify.
4970
4971 * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
4972 * tree.c (build_cplus_new): Set it.
4973 * expr.c (cplus_expand_expr): Use it.
4974 * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
4975
4976 * decl.c (store_parm_decls): Reset immediate_size_expand.
4977 (finish_function): Likewise.
4978
4979 * tree.c (cplus_unsave_expr_now): Don't return a value.
4980
4981 * semantics.c (do_poplevel): Always initialize the return value.
4982
4983 1999-08-26 Gavin Romig-Koch <gavin@cygnus.com>
4984
4985 * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
4986 * tree.h (cplus_unsave_expr_now) : Same.
4987
4988 1999-08-25 Mark Mitchell <mark@codesourcery.com>
4989
4990 * decl.c (grokdeclarator): Amend comment.
4991 * except.c (expand_start_catch_block): Call push_template_decl for
4992 catch-block parameters.
4993 * method.c (synthesize_method): Build an empty compound statement
4994 for the body of a constructor.
4995
4996 1999-08-25 Jason Merrill <jason@yorick.cygnus.com>
4997
4998 * tree.c (cp_build_qualified_type_real): If we're asking for the
4999 same quals we already have, just return.
5000
5001 1999-08-25 Mark Mitchell <mark@codesourcery.com>
5002
5003 * cp-tree.def (SUBOBJECT): New tree node.
5004 * cp-tree.h (CLEANUP_P): New macro.
5005 (SUBOBJECT_CLEANUP): Likewise.
5006 (keep_next_level): Add parameter.
5007 (get_temp_regvar): Don't declare.
5008 (emit_base_init): Remove parameter.
5009 (expand_aggr_init): Rename to build_aggr_init.
5010 (expand_vec_init): Rename to build_vec_init.
5011 (do_pushlevel): Remove.
5012 (do_poplevel): Likewise.
5013 (finish_cleanup): New function.
5014 (finish_subobject): Likewise.
5015 (stmts_are_full_exprs_p): New variable.
5016 * decl.c (keep_next_level): Add parameter.
5017 (cp_finish_decl): Use build_aggr_init, not
5018 expand_aggr_init. Use finish_expr_stmt to expand the code.
5019 (expand_static_init): Use tree-generating, not RTL-generating,
5020 functions to handle the initialization.
5021 (start_function): Remove dead code. Always have a momentary
5022 obstack inside the function, even before hitting the first curly
5023 brace.
5024 (cplus_expand_expr_stmt): Move calls to
5025 expand_{start,end}_target_temps into semantics.c.
5026 (cp_function): Add stmts_are_full_exprs_p.
5027 (push_cp_function_context): Save it.
5028 (pop_cp_function_context): Restore it.
5029 * decl2.c (get_temp_regvar): Move to init.c.
5030 (do_static_initialization): Use build_{aggr,vec}_init.
5031 (do_static_destruction): Fix typo in comment.
5032 * dump.c (dequeue_and_dump): Handle INIT_EXPR.
5033 * except.c (expand_throw): Use create_temporary_var.
5034 * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
5035 * init.c (expand_vec_init_try_block): Remove.
5036 (expand_vec_init_catch_clause): Likewise.
5037 (get_temp_regvar): New function.
5038 (begin_init_stmts): Likewise.
5039 (finish_init_stmts): Likewise.
5040 (perform_member_init): Use build_{aggr,vec}_init. Build up tree
5041 structure here.
5042 (emit_base_init): Likewise. Remove unused parameter.
5043 (expand_virtual_init): Likewise.
5044 (expand_cleanup_for_base): Use finish_subobject.
5045 (expand_aggr_vbase_init_1): Simplify.
5046 (construct_virtual_bases): Use tree-generating functions to build
5047 up initialization.
5048 (expand_aggr_init): Likewise. Rename to build_aggr_init.
5049 (expand_default_init): Likewise.
5050 (expand_aggr_init_1): Likewise.
5051 (expand_vec_init): Rename to build_vec_init.
5052 * method.c (do_build_copy_constructor): Use tree-generating
5053 functions. Don't call clear_last_expr.
5054 (do_build_assign_ref): Likewise.
5055 (synthesize_method): Call clear_last_expr here.
5056 * parse.y (base_init): Don't call clear_last_expr here.
5057 (nodecls): Likewise.
5058 * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
5059 * semantics.c (do_pushlevel): Move to here.
5060 (do_poplevel): Likewise.
5061 (stmts_are_full_exprs_p): New variable.
5062 (finish_expr_stmt): Handle logic for temoprary cleanup here.
5063 (finish_for_stmt): Use finish_expr_stmt.
5064 (finish_cleanup): New function.
5065 (finish_function_try_block): Fix indentation.
5066 (finish_subobject): New function.
5067 (setup_vtbl_ptr): Call keep_next_level here.
5068 (finish_stmt_expr): Handle a block with no scope inside the
5069 statement-expression.
5070 (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle
5071 SUBOBJECT.
5072 * tree.c (search_tree): Handle INIT_EXPR.
5073 (mapcar): Likewise.
5074 * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
5075 * typeck2.c (store_init_value): Change expand_aggr_init to
5076 build_aggr_init in comment.
5077
5078 1999-08-25 Mark Mitchell <mark@codesourcery.com>
5079
5080 * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
5081
5082 1999-08-25 Nathan Sidwell <nathan@acm.org>
5083
5084 * decl2.c (handle_class_head): Be graceful about additional
5085 scope qualifiers. Adjust comments to reflect reality.
5086
5087 1999-08-24 Jason Merrill <jason@yorick.cygnus.com>
5088
5089 * call.c (build_conditional_expr): Fix typo.
5090 * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
5091 lvalue before trying to mess with the sides.
5092
5093 * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
5094
5095 Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu>
5096
5097 * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
5098
5099 1999-08-23 Jason Merrill <jason@yorick.cygnus.com>
5100
5101 * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
5102 Return arbitrary pointer or NULL.
5103 (check_eh_spec): Call __throw_type_match_rtti_2.
5104 * tinfo.h (*::dcast): Return int. Add valp parm.
5105 * tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers.
5106 * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
5107 (__throw_type_match_rtti): Now just a wrapper.
5108
5109 * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
5110 (init_exception_processing): Don't initialize them.
5111
5112 1999-08-23 Paul Burchard <burchard@pobox.com>
5113
5114 * decl.c (check_default_argument): Fix typo.
5115
5116 1999-08-22 Mark Mitchell <mark@codesourcery.com>
5117
5118 * cp-tree.def (STMT_EXPR): Fix typo in node name.
5119
5120 * dump.c (dump_next_stmt): New function.
5121 (dequeue_and_dump): Use it.
5122
5123 * pt.c (tsubst_copy): Make sure to initialize return value for a
5124 STMT_EXPR, even when processing_template_decl.
5125 * semantics.c (finish_stmt_expr): A statement-expression whose
5126 last statement is not an expression-statement has type `void'.
5127
5128 1999-08-20 Mark Mitchell <mark@codesourcery.com>
5129
5130 * semantics.c (finish_stmt_expr): Fix typo in comment.
5131 * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
5132 (mapcar): Likewise.
5133 * init.c (build_vec_delete_1): Make the children of a permanent
5134 BIND_EXPR permanent.
5135 * pt.c (register_specialization): Don't register a specialization
5136 more than once.
5137
5138 1999-08-18 Andrew Haley <aph@cygnus.com>
5139
5140 * method.c (process_overload_item): Call build_mangled_C9x_name ()
5141 for all integer parameter types larger than long long.
5142
5143 1999-08-19 Mark Mitchell <mark@codesourcery.com>
5144
5145 * pt.c (redeclare_class_template): Merge default template
5146 arguments in both directions.
5147
5148 * typeck.c (common_type): Undo 1999-08-18 change. Remove
5149 compiler_error message.
5150
5151 1999-08-19 Jason Merrill <jason@yorick.cygnus.com>
5152
5153 * cp-tree.h: Declare flag_use_repository.
5154 * pt.c (do_decl_instantiation): Don't complain about duplicate
5155 instantiation with -frepo.
5156 (do_type_instantiation): Likewise.
5157
5158 * pt.c (push_template_decl_real): Complain about everything
5159 that isn't a valid template.
5160
5161 * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
5162 affect inlines.
5163
5164 1999-08-19 Mark Mitchell <mark@codesourcery.com>
5165
5166 * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
5167 * decl2.c (build_expr_from_tree): Handle it.
5168 * error.c (dump_expr): Likewise.
5169 * pt.c (for_each_template_parm): Likewise.
5170 (tsubst_copy): Likewise.
5171 * tree.c (search_tree): Likewise.
5172 * semantics.c (finish_pseudo_destructor_call): Create it.
5173
5174 1999-08-18 Mark Mitchell <mark@codesourcery.com>
5175
5176 * search.c (setup_class_bindings): Robustify.
5177 * typeck.c (common_type): Use same_type_p, not pointer equality,
5178 to compare types.
5179
5180 * cp-tree.h (build_lang_field_decl): Remove.
5181 * class.c (build_vtable): Replace calls to build_lang_field_decl
5182 with build_lang_decl.
5183 (prepare_fresh_vtable): Likewise.
5184 (finish_struct_1): Likewise.
5185 (init_class_processing): Likewise.
5186 * decl.c (push_using_decl): Likewise.
5187 (init_decl_processsing): Likewise.
5188 (grokvardecl): Likewise.
5189 (build_ptrmemfunc_type): Likewise.
5190 (grokdeclarator): Likewise.
5191 (build_enumerator): Likewise.
5192 * decl2.c (grok_x_components): Likewise.
5193 (do_class_using_decl): Likewise.
5194 * except.c (call_eh_info): Likewise.
5195 * init.c (init_init_processing): Likewise.
5196 * rtti.c (expand_class_decl): Likewise.
5197 * tree.c (build_base_fields): Likewise.
5198 (build_vbase_pointer_fields): Likewise.
5199 * lex.c (build_lang_decl): Build declarations on the permanent
5200 obstack if we're building statmeent trees.
5201 (retrofit_lang_decl): Handle both the full lang_decl and also the
5202 smaller lang_decl_flags here.
5203 (build_lang_field_decl): Remove.
5204 * pt.c (push_template_decl_real): Issue errors for variable
5205 declarations that are not static members.
5206
5207 1999-08-18 Richard Henderson <rth@cygnus.com>
5208
5209 * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
5210 (mapcar): Likewise.
5211
5212 1999-08-17 Mark Mitchell <mark@codesourcery.com>
5213
5214 * cp-tree.h (back_end_hook): New variable.
5215 * decl2.c (back_end_hook): Define it.
5216 (finish_file): If it's non-NULL, call it.
5217
5218 * decl.c (add_decl_to_level): New function.
5219 (push_local_binding): Use it.
5220 (find_binding): Fix typo in comment.
5221 (pushdecl): Use add_decl_to_level. Put templates on the
5222 corresponding namespace-scope binding levels.
5223 * dump.c (dequeue_and_dump): Print the specializations of a
5224 template.
5225 * pt.c (push_template_decl_real): Don't push a template multiple
5226 times.
5227
5228 1999-08-17 Mark Mitchell <mark@codesourcery.com>
5229
5230 * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
5231 (CALL_DECLARATOR_QUALS): Likewise.
5232 (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
5233 * decl.c (grokdeclarator): Adjust to use them.
5234 * decl2.c (grokfield): Likewise.
5235 (reparse_absdcl_as_casts): Likewise.
5236 * lex.c (make_call_declarator): Likewise.
5237 (set_quals_and_spec): Likewise.
5238 * pt.c (tsubst): Likewise.
5239 * tree.c (mapcar): Remove special hack to handle third operand of
5240 a CALL_EXPR.
5241
5242 1999-08-16 Mark Mitchell <mark@codesourcery.com>
5243
5244 * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
5245 * class.c (build_vtable): Use build_lang_field_decl to build the
5246 VAR_DECLs for vtables.
5247 (prepare_fresh_vtable): Likewise.
5248 * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
5249 CAN_HAVE_FULL_LANG_DECL_P.
5250 (push_using_decl): Use build_lang_decl to build USING_DECLs.
5251 (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
5252 * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
5253 (build_lang_field_decl): Likewise.
5254 (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
5255 to copy.
5256
5257 * cp-tree.def (STMT_EXPR): New tree node.
5258 * cp-tree.h (STMT_EXPR_STMT): New macro.
5259 (store_return_init): Change prototype.
5260 (finish_named_return_value): New function.
5261 (expand_stmt): Likewise.
5262 (expand_body): Likewise.
5263 (begin_stmt_tree): Likewise.
5264 (finish_stmt_tree): Likewise.
5265 (expanding_p): New variable.
5266 (last_expr_type): Likewise.
5267 (building_stmt_tree): New macro.
5268 * decl.c (start_function): Use building_stmt_tree, not
5269 processing_template_decl, where appropriate.
5270 (store_parm_decls): Likewise.
5271 (store_return_init): Move most of the body to semantics.c.
5272 (finish_function): Use building_stmt_tree.
5273 (finish_stmt): Clear last_expr_type here.
5274 (cp_function): Add expanding_p, last_tree, last_expr_type.
5275 (push_cp_function_context): Save them.
5276 (pop_cp_function_context): Restore them.
5277 * decl2.c (setup_vtbl_ptr): Move to semantics.c.
5278 * error.c (dump_expr): Handle STMT_EXPR.
5279 * except.c (expand_start_catch_block): Use building_stmt_tree.
5280 Use add_decl_stmt.
5281 * expr.c (cplus_expand_expr): Handle STMT_EXPR.
5282 (do_case): Move add_tree call to semantics.c.
5283 * parse.y (return_init): Use finish_named_return_value.
5284 (for.init.statement): Use finish_expr_stmt.
5285 * parse.c: Regenerated.
5286 * pt.c (do_pushlevel): Move to semantics.c.
5287 (do_poplevel): Likewise.
5288 (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
5289 (tsubst_expr): Don't expand all the way to RTL here. Handle
5290 RETURN_INIT and CTOR_INITIALIZER.
5291 (instantiate_decl): Call expand_body after tsubst'ing into
5292 DECL_SAVED_TREE.
5293 * semantics.c (expand_stmts): New function.
5294 (expanding_p): New variable.
5295 (last_expr_type): Likewise.
5296 (finish_expr_stmt): Use building_stmt_tree.
5297 (begin_if_stmt): Likewise.
5298 (finish_if_stmt_cond): Likewise.
5299 (finish_then_clause): Likewise.
5300 (begin_else_clause): Likewise.
5301 (finish_else_clause): Likewise.
5302 (begin_while_stmt): Likewise.
5303 (finish_while_stmt_cond): Likewise.
5304 (finish_while_stmt): Likewise.
5305 (finish_do_body): Likewise.
5306 (finish_do_stmt): Likewise.
5307 (finish_return_stmt): Likewise.
5308 (begin_for_stmt): Likewise.
5309 (fnish_for_init_stmt): Likewise.
5310 (finish_for_cond): Likewise.
5311 (finish_for_expr): Likewise.
5312 (finish_for_stmt): Likewise.
5313 (finish_break_stmt): Likewise.
5314 (finish_continue_stmt): Likewise.
5315 (finish_switch_cond): Likewise.
5316 (finish_switch_stmt): Likewise.
5317 (finish_case_label): Call add_tree here if necessary.
5318 (finish_goto_statement): Use building_stmt_tree.
5319 (begin_try_block): Likewise.
5320 (begin_function_try_block): Likewise.
5321 (finish_try_block): Likewise.
5322 (finish_function_try_block): Likewise.
5323 (finish_handler_sequence): Likewise.
5324 (finish_function_handler_sequence): Likewise.
5325 (begin_handler): Likewise.
5326 (finish_handler_parms): Likewise.
5327 (finish_handler): Likewise.
5328 (begin_compound_stmt): Likewise.
5329 (finish_compound_stmt): Likewise.
5330 (finish_asm_stmt): Likewise.
5331 (finish_label_stmt): Likewise.
5332 (finish_named_return_value): New function.
5333 (setup_vtbl_ptr): Moved here from decl2.c.
5334 (do_pushlevel): Moved here from pt.c.
5335 (do_poplevel): Likewise.
5336 (begin_stmt_expr): Use building_stmt_tree.
5337 (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR,
5338 when building_stmt_tree.
5339 (begin_stmt_tree): New function.
5340 (finish_stmt_tree): Likewise.
5341 (expand_stmt): Likewise.
5342 (expand_body): Likewise.
5343 * tree.c (build_cplus_method_type): Make sure the argument types
5344 end up on the same obstack as the METHOD_TYPE.
5345 (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
5346 THROW_EXPR, STMT_EXPR.
5347 (mapcar): Break out common cases. Handle COMPOUND_EXPR,
5348 MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than
5349 sorry, if an unsupported node is encountered.
5350 * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
5351 (c_expand_return): Don't call add_tree here.
5352
5353 1999-08-15 Mark Mitchell <mark@codesourcery.com>
5354
5355 * pt.c (check_default_tmpl_args): Don't check in local scopes.
5356 (tsubst_decl): Make sure the declaration is on a saveable
5357 obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
5358 variable.
5359 (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
5360
5361 1999-08-14 Jason Merrill <jason@yorick.cygnus.com>
5362
5363 Speed up Koenig lookup.
5364 * decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm
5365 to return namespaces we've looked at.
5366 * decl2.c (lookup_using_namespace): Likewise.
5367 (add_function): Don't call ovl_member.
5368 (lookup_arg_dependent): Initialize k.namespaces to the list of
5369 namespaces seen in unqualified lookup.
5370 * call.c (equal_functions): Move here from tree.c.
5371 (joust): Use it to handle duplicate candidates.
5372 * tree.c (ovl_member): Use ==.
5373
5374 1999-08-13 Mark Mitchell <mark@codesourcery.com>
5375
5376 * cp-tree.def (DECL_STMT): Make it smaller.
5377 * cp-tree.h (lang_decl_flags): Move saved_tree to ...
5378 (lang_decl): ... here. Add next.
5379 (DECL_SAVED_TREE): Adjust accordingly.
5380 (DECL_IMPLICIT_TYPEDEF_P): New macro.
5381 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
5382 (DECL_STMT_DECL): Likewise.
5383 (create_implicit_typedef): New function.
5384 (maybe_push_decl): Likewise.
5385 (tsubst_default_argument): New function.
5386 (at_function_scope_p): Likewise.
5387 (add_decl_stmt): Likewise.
5388 (push_permanent_obstack): Likewise.
5389 * call.c (convert_default_arg): Use tsubst_default_argument.
5390 * class.c (add_method): Use push_permanent_obstack.
5391 (build_self_reference): Create a TEMPLATE_DECL for the
5392 self-reference, if necessary.
5393 * decl.c (pseudo_global_level_p): Only look at the current binding
5394 level.
5395 (push_binding): Use push_permanent_obstack.
5396 (create_implicit_typedef): New function.
5397 (pushtag): Use it.
5398 (duplicate_decls): Use push_permanent_obstack.
5399 (maybe_push_decl): New function.
5400 (start_decl): Use it. Remove dead code. Use add_decl_stmt.
5401 (start_decl_1): Remove dead code.
5402 (cp_finish_decl): Remove DECL_STMT handling here. Don't use
5403 pseudo_global_level_p.
5404 (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
5405 template.
5406 (grokdeclarator): Likewise, for TYPE_DECLs. Don't use
5407 pseudo_global_level_p.
5408 * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
5409 a template.
5410 (get_sentry): Use push_permanent_obstack.
5411 * dump.c (dequeue_and_dump): Enable DECL_STMT.
5412 * except.c (call_eh_info): Use push_permanent_obstack.
5413 (build_eh_type_ref): Likewise.
5414 (do_pop_exception): Likewise.
5415 (expand_eh_spec): Likewise.
5416 (alloc_eh_object): Likewise.
5417 (expand_throw): Likewise.
5418 * init.c (build_java_class_ref): Likewise.
5419 * lex.c (get_time_identifier): Likewise.
5420 (free_lang_decl_chain): Correct type.
5421 (retrofit_lang_decl): Adjust accordingly.
5422 (build_lang_field_decl): Likewise.
5423 * lex.h (free_lang_decl_chain): Likewise.
5424 * parse.y (lang_extdef): Don't use pseudo_global_level_p.
5425 * parse.c: Regenerated.
5426 * pt.c (tsubst_default_arguments): New function.
5427 (retrieve_local_specialization): Likewise.
5428 (register_local_specialization): Likewise.
5429 (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use
5430 pseudo_global_level_p to determine whether or not a template is
5431 primary.
5432 (lookup_template_class): Likewise. Use create_implicit_typedef.
5433 (instantiate_class_template): Call tsubst_default_arguments for
5434 member functions, if appropriate.
5435 (tsubst_default_argument): New function.
5436 (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs.
5437 * search.c (at_function_scope_p): New function.
5438 * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
5439 (finish_label_stmt): Likewise.
5440 (add_decl_stmt): New function.
5441 (begin_class_definition): Likewise.
5442 (finish_typeof): Likewise.
5443 * tree.c (copy_template_template_parm): Likewise.
5444 (copy_to_permanent): Likewise.
5445 (push_permanent_obstack): Define.
5446 (mark_addressable): Use it.
5447 * typeck.c (mark_addressable): Likewise.
5448
5449 1999-08-13 Gavin Romig-Koch <gavin@cygnus.com>
5450
5451 * cp-tree.h (init_cplus_unsave): New.
5452 (cplus_unsave_expr_now): New.
5453 * lex.c (init_parse): Call init_cplus_unsave.
5454 * tree.c (init_cplus_unsave): New.
5455 (cplus_unsave_expr_now): New.
5456
5457 1999-08-13 Mark Mitchell <mark@codesourcery.com>
5458
5459 * pt.c (tsubst): Back out 1999-08-06 patch. Use fold and
5460 decl_constant_value to simplify array bounds.
5461
5462 1999-08-11 Jason Merrill <jason@yorick.cygnus.com>
5463
5464 * lang-options.h: Add -fms-extensions.
5465 * cp-tree.h: Declare flag_ms_extensions.
5466 * decl2.c: Define it.
5467 * class.c (instantiate_type): Don't complain about taking the address
5468 of a bound member function if -fms-extensions.
5469 * typeck.c (build_unary_op): Likewise.
5470 * decl.c (grokdeclarator): Or about implicit int.
5471 * init.c (resolve_offset_ref): Or about implicit '&'.
5472
5473 1999-08-11 Mark Mitchell <mark@codesourcery.com>
5474
5475 * cp-tree.h (minimal_parse_mode): Remove.
5476 (finish_label_stmt): New function.
5477 * decl.c (saved_scope): Remove minimal parse mode.
5478 (maybe_push_to_top_level): Don't save it.
5479 (pop_from_top_level): Don't restore it.
5480 (define_label): Split out template-handling code to semantics.c.
5481 (start_decl): Don't use minimal_parse_mode.
5482 (cp_finish_decl): Likewise.
5483 (start_function): Don't increment it.
5484 (store_return_init): Don't use it.
5485 (finish_function): Don't decrement it.
5486 * parse.y (label_colon): Use finish_label_stmt throughout.
5487 * parse.c: Regenerated.
5488 * pt.c (minimal_parse_mode): Don't define it.
5489 (tsubst_expr): Use finish_label_stmt.
5490 * semantics.c (finish_label_stmt): New function.
5491
5492 * dump.c (queue): Be careful when computing bitmasks.
5493 (dequeue_and_dump): Describe binfos as binfos, not as
5494 vectors.
5495
5496 * parse.y (pedantic): Give it itype. Adjust usage accordingly
5497 throughout.
5498 * parse.c: Regenerated.
5499
5500 * Make-lang.in (CXX_SRCS): Remove sig.c.
5501 * Makefile.in (CXX_OBJS): Remove sig.o.
5502 (sig.o): Remove.
5503 * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
5504 (CPTI_SIGNATURE_TYPE): Likewise.
5505 (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
5506 (opaque_type_node): Likewise.
5507 (signature_type_node): Likewise.
5508 (sigtable_entry_type): Likewise.
5509 (flag_handle_signatures): Likewise.
5510 (lang_type): Remove is_signature, is_signature_pointer,
5511 is_signature_reference, has_opaque_typedecls,
5512 sigtables_has_been_generated. Adjust dummy. Remove signature,
5513 signature_pointer_to, signature_reference_to.
5514 (IS_SIGNATURE): Remove.
5515 (SET_SIGNATURE): Remove.
5516 (CLEAR_SIGNATURE): Remove.
5517 (IS_SIGNATURE_POINTER): Remove.
5518 (IS_SIGNATURE_REFERENCE): Remove.
5519 (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
5520 (SIGTABLE_HAS_BEEN_GENERATED): Remove.
5521 (CLASSTYPE_SIGNATURE): Remove.
5522 (SIGNATURE_TYPE): Remove.
5523 (SIGNATURE_METHOD_VEC): Remove.
5524 (SIGNATURE_POINTER_TO): Remove.
5525 (SIGNATURE_REFERENCE_TO): Remove.
5526 (lang_decl_flags): Remove is_default_implementation. Rename
5527 memfunc_pointer_to to saved_tree.
5528 (IS_DEFAULT_IMPLEMENTATION): Remove.
5529 (DECL_MEMFUNC_POINTER_TO): Remove.
5530 (DECL_MEMFUNC_POINTING_TO): Remove.
5531 (DECL_SAVED_TREE): Adjust definition.
5532 (tag_types): Remove signature_type_node.
5533 (SIGNATURE_FIELD_NAME): Remove.
5534 (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
5535 (SIGNATURE_OPTR_NAME): Likewise.
5536 (SIGNATURE_SPTR_NAME): Likewise.
5537 (SIGNATURE_POINTER_NAME): Likewise.
5538 (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
5539 (SIGNATURE_REFERENCE_NAME): Likewise.
5540 (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
5541 (SIGTABLE_PTR_TYPE): Likewise.
5542 (SIGTABLE_NAME_FORMAT): Likewise.
5543 (SIGTABLE_NAME_FORMAT_LONG): Likewise.
5544 (SIGTABLE_TAG_NAME): Likewise.
5545 (SIGTABLE_VB_OFF_NAME): Likewise.
5546 (SIGTABLE_VT_OFF_NAME): Likewise.
5547 (finish_base_specifiers): Change prototype.
5548 (build_signature_pointer_type): Remove.
5549 (build_signature_reference_type): Remove.
5550 (build_signature_pointer_constructor): Remove.
5551 (build_signature_method_call): Remove.
5552 (build_optr_ref): Likewise.
5553 (append_signature_fields): Likewise.
5554 (signature_error): Likewise.
5555 * call.c (build_this): Remove signature support.
5556 (build_over_call): Likewise.
5557 (build_new_method_call): Likewise.
5558 * class.c (add_implicitly_declared_members): Likewise.
5559 (finish_struct_1): Likewise.
5560 (finish_struct): Likewise.
5561 * cvt.c (cp_convert_to_pointer): Likewise.
5562 (convert_to_pointer_force): Likewise.
5563 (ocp_convert): Likewise.
5564 * decl.c (sigtable_decl_p): Remove.
5565 (init_decl_processing): Remove support for signatures.
5566 (cp_finish_decl): Likewise.
5567 (grokdeclarator): Likewise.
5568 (grokparms): Likewise.
5569 (xref_tag): Likewise.
5570 (start_function): Likewise.
5571 (start_method): Likewise.
5572 * decl2.c (finish_sigtable_vardecl): Remove.
5573 (flag_handle_signatures): Remove.
5574 (lang_f_options): Remove handle-signatures.
5575 (grokfield): Remove support for signatures.
5576 (grokbitfield): Likewise.
5577 (finish_file): Likewise.
5578 (reparse_absdcl_as_casts): Likewise.
5579 * error.c (dump_type_real): Likewise.
5580 (dump_function_decl): Likewise.
5581 * friend.c (make_friend_class): Likewise.
5582 * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
5583 * hash.h: Regenerated.
5584 * init.c (build_new_1): Remove support for signatures.
5585 * lang-options.h: Remove -fhandle-signatures,
5586 -fno-handle-signatures.
5587 * lex.c (init_parse): Remove support for signatures.
5588 (yyprint): Likewise.
5589 * lex.h (rid): Remove RID_SIGNATURE.
5590 * method.c (build_decl_overload_real): Remove support for
5591 signatures.
5592 (hack_identifier): Likewise.
5593 * parse.y (base_class): Likewise.
5594 (base_class.1): Likewise.
5595 (access_specifier): Likewise.
5596 * search.c (lookup_member): Likewise.
5597 * semantics.c (finish_qualified_object_call_expr): Likewise.
5598 (finish_template_type_parm): Likewise.
5599 (begin_class_definition): Likewise.
5600 (finish_base_specifier): Likewise.
5601 * sig.c: Remove.
5602 * tree.c (build_cplus_method_type): Remove support for signatures.
5603 * typeck.c (require_complete_type): Likewise.
5604 (c_sizeof): Likewise.
5605 (c_alignof): Likewise.
5606 (build_object_ref): Likewise.
5607 (build_component_ref): Likewise.
5608 (build_indirect_ref): Likewise.
5609 (build_c_cast): Likewise.
5610 (build_modify_expr): Likewise.
5611 (convert_for_initialization): Likewise.
5612 * typeck2.c (signature_error): Remove.
5613 (store_init_value): Remove support for signatures.
5614 (digest_init): Likewise.
5615 (build_x_arrow): Likewise.
5616 (build_functional_cast): Likewise.
5617 * xref.c (GNU_xref_decl): Likewise.
5618
5619 1999-08-10 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
5620
5621 * lex.c (do_identifier): Remove unnecessary lookup of class field.
5622
5623 1999-08-09 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
5624
5625 * decl2.c (set_decl_namespace): Do not complain about non-matching
5626 decls if processing a template.
5627
5628 1999-08-09 Mark Mitchell <mark@codesourcery.com>
5629
5630 * decl.c (build_ptrmemfunc_type): Handle qualified
5631 pointer-to-member types here.
5632 * tree.c (cp_build_qualified_type_real): Simplify handling here.
5633
5634 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5635
5636 * lex.c (lang_identify): Likewise.
5637
5638 1999-08-09 Bernd Schmidt <bernds@cygnus.co.uk>
5639
5640 * Makefile.in: Update dependencies.
5641 * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
5642 NULL_RTX.
5643 * decl.c: Include "function.h"
5644 (cleanup_label, return_label): Delete declarations.
5645 (store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX.
5646 (finish_function): Rename last_parm_insn variable to
5647 fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX.
5648 * decl2.c: Include "function.h".
5649 (rtl_expr_chain): Delete declaration.
5650 * method.c: Include "function.h"
5651 * tree.c (build_vbase_pointer_fields): Don't initialize
5652 DECL_SAVED_INSNS with NULL_RTX.
5653 * typeck.c: Include "function.h"
5654
5655 1999-08-09 Jason Merrill <jason@yorick.cygnus.com>
5656
5657 * semantics.c (begin_function_try_block, finish_function_try_block,
5658 finish_function_handler_sequence): New fns.
5659 * parse.y (function_try_block): Use them.
5660 * pt.c (instantiate_decl): Likewise.
5661
5662 * cp-tree.h: Declare in_function_try_handler.
5663 * decl.c: Define it.
5664 (start_function): Clear it.
5665 (struct cp_function, push_cp_function_context): Save it.
5666 (pop_cp_function_context): Restore it.
5667 * parse.y (function_try_block): Set and clear it.
5668 * except.c (expand_end_catch_block): Rethrow if we reach the end
5669 of a function-try-block handler in a ctor or dtor.
5670 * typeck.c (c_expand_return): Complain about returning from a
5671 function-try-block handler of a ctor.
5672
5673 * parse.y (function_try_block): Call end_protect_partials
5674 before expand_start_all_catch.
5675
5676 1999-08-08 Jason Merrill <jason@yorick.cygnus.com>
5677
5678 * decl.c (struct binding_level): Add eh_region field.
5679 (push_binding_level): Set it.
5680 (define_label): Complain about jumping into an EH block.
5681
5682 * ptree.c (print_lang_type): Print the real type of a PMF.
5683 Print what exceptions a fn type throws.
5684
5685 1999-08-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5686
5687 * class.c (count_fields, add_fields_to_vec): Add static prototype.
5688
5689 * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
5690 get_id_2, composite_pointer_type, dump_node_to_file): Constify a
5691 char*.
5692
5693 * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
5694 Constify a char*.
5695
5696 * decl2.c (finish_static_data_member_decl, grokfield): Constify a
5697 char*.
5698
5699 * dump.c (queue_and_dump_index, dump_int, dump_string,
5700 dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
5701 a char*.
5702 (dump_stmt): Add static prototype.
5703
5704 * errfn.c (cp_thing): Constify a char*.
5705
5706 * error.c (dump_unary_op, dump_binary_op, aggr_variety,
5707 dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
5708 dump_expr): Constify a char*.
5709
5710 * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
5711 read_line_number): Add static prototype.
5712 (opname_tab, assignop_tab, operator_name_string): Constify a char*.
5713 (real_yylex): Move label `letter' into the scope where it is used.
5714
5715 * method.c (build_mangled_template_parm_index, build_overload_int,
5716 build_decl_overload_real, get_id_2): Constify a char*.
5717
5718 * search.c (check_final_overrider): Make static.
5719
5720 * typeck.c (composite_pointer_type): Constify a char*.
5721
5722 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
5723
5724 * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
5725 we're looking at a class.
5726
5727 * decl.c (lookup_name_real): Set the complain flag if we're
5728 looking for a namespace member.
5729
5730 * lex.c (real_yylex): We can have a number with no digits.
5731
5732 * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
5733
5734 * search.c (binfo_from_vbase): New fn.
5735 * cp-tree.h: Declare it.
5736 * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
5737 from pointer to member of virtual base.
5738 * typeck.c (get_delta_difference): Likewise.
5739
5740 1999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br>
5741
5742 * pt.c (tsubst): Use build_index_type to build in-template array
5743 index type. Fixes g++.oliva/dwarf1.C.
5744 * decl.c (grokdeclarator): Likewise, just for consistency, as it
5745 doesn't seem to trigger the bug without it.
5746
5747 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
5748
5749 * typeck2.c (add_exception_specifier): Use complete_type.
5750
5751 1999-08-06 Mark Mitchell <mark@codesourcery.com>
5752
5753 * error.c (dump_expr): Handle EXACT_DIV_EXPR.
5754 (dump_binary_op): Bulletproof.
5755 * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
5756 * tree.c (search_tree): Don't enumerate all the nodes of classes
5757 `1', `2', and `<'; handle them generically. Don't be sorry about
5758 "unrecognized tree codes"; just abort.
5759 (no_linkage_check): Don't do linkage checks for templates.
5760
5761 * tree.c (cp_build_qualified_type_real): Handle
5762 pointer-to-member-function types correctly.
5763
5764 1999-08-05 Jason Merrill <jason@yorick.cygnus.com>
5765
5766 * decl.c (pushdecl): Only give an error for shadowing a parm
5767 from *this* function.
5768
5769 Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com)
5770
5771 * typeck2.c: Update URLs and mail addresses.
5772
5773 1999-08-04 Nathan Sidwell <nathan@acm.org>
5774
5775 * cp-tree.h (empty_except_spec): New global var.
5776 (compexcepttypes): Remove prototype.
5777 (comp_except_specs): Prototype new global function.
5778 (add_exception_specifier): Prototype new global function.
5779 * decl.c (empty_except_spec): Define new global var.
5780 (duplicate_decls): Use comp_except_specs, reword error message.
5781 (init_decl_processing): Initialize empty_except_spec.
5782 Adjust build_exception_variant calls.
5783 * parse.y (exception_specification_opt): Use empty_except_spec.
5784 (ansi_raise_identifier): Call check_for_new_type.
5785 (ansi_raise_identifiers): Use add_exception_specifier.
5786 * pt.c (tsubst): Use add_exception_specifier to build exception
5787 specifier.
5788 * search.c (check_final_overrider): New static function, broken
5789 out of get_matching_virtual. Check throw specifiers, reword
5790 diagnostics.
5791 (get_matching_virtual): Use check_final_overrider.
5792 * tree.c (build_exception_variant): Use comp_except_specs.
5793 * typeck.c (compexcepttypes): Remove.
5794 (comp_except_types): New static function, helper for
5795 comp_except_specs. Compare two types as exception specifiers.
5796 (comp_except_specs): New global function, compare two exception
5797 specifiers.
5798 (comptypes): Adjust for comp_except_specs.
5799 * typeck2.c (add_exception_specifier): New global function.
5800
5801 * class.c (check_for_override): Reword error message.
5802
5803 1999-08-03 Nathan Sidwell <nathan@acm.org>
5804
5805 * call.c (convert_arg_to_ellipsis): Use pod_type_p.
5806 * cp-tree.h (struct lang_type): Added non_pod_class flag.
5807 (CLASSTYPE_NON_POD_P): New macro to access it.
5808 * class.c (finish_struct_1): Determine non-PODness.
5809 Check for arrays of pointers (-Weffc++).
5810 Remove array inspection duplicated code.
5811 * tree.c (pod_type_p): Detect non-pod non-aggregate types.
5812 Use CLASSTYPE_NON_POD_P.
5813
5814 1999-08-03 Nathan Sidwell <nathan@acm.org>
5815
5816 * class.c (duplicate_tag_error): Preserve template information.
5817
5818 1999-08-03 Nathan Sidwell <nathan@acm.org>
5819
5820 * decl.c (start_enum): Show location of previous definition.
5821 * parse.y (enumlist_opt): New reduction.
5822 (structsp): Simplify enum rules to use enumlist_opt.
5823
5824 1999-08-03 Jason Merrill <jason@yorick.cygnus.com>
5825
5826 * lex.c (yyprint): Handle PFUNCNAME.
5827
5828 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
5829 build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
5830
5831 1999-08-03 Mumit Khan <khan@xraylith.wisc.edu>
5832
5833 * decl.c (start_decl): Set attributes before duplicate_decls call.
5834
5835 1999-08-02 Mark Mitchell <mark@codesourcery.com>
5836
5837 * Make-lang.in (CXX_SRCS): Add dump.c.
5838 * Makefile.in (CXX_OBJS): Add dump.o.
5839 (dump.o): New target.
5840 * cp-tree.h (DECL_CONV_FN_P): Document.
5841 (DECL_OVERLOADED_OPERATOR_P): New function.
5842 (TYPE_PTRMEM_CLASS_TYPE): New macro.
5843 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
5844 (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
5845 (ASM_VOLATILE_P): New macro.
5846 (STMT_LINENO): Likewise.
5847 (cp_namespace_decls): New function.
5848 (dump_node_to_file): New function.
5849 * decl.c (cp_namespace_decls): New function.
5850 (walk_namespaces_r): Use it.
5851 (wrapup_globals_for_namespace): Likewise.
5852 * decl2.c (flag_dump_translation_unit): New variable.
5853 (lang_decode_option): Handle -fdump-translation-unit.
5854 (finish_file): If flag_dump_translation_unit is set, dump the
5855 translation unit.
5856 * dump.c: New file.
5857 * lang-options.h: Add -fdump-translation-unit.
5858 * pt.c (tsubst_template_parms): Robustify.
5859 (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
5860 (tsubst_expr): Use STMT_LINENO.
5861 * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check
5862 for invalid cv-qualifiers even while building templates.
5863
5864 1999-08-02 Richard Henderson <rth@cygnus.com>
5865
5866 * call.c: Include defaults.h instead of expr.h.
5867 * decl.c: Likewise.
5868 * pt.c: Likewise.
5869 * typeck.c: Include defaults.h.
5870
5871 1999-08-02 Mark Mitchell <mark@codesourcery.com>
5872
5873 * lex.c (errorcount, sorrycount): Don't declare.
5874 * repo.c (errorcount, sorrycount): Likewise.
5875 * typeck2.c (errorcount, sorrycount): Likewise.
5876
5877 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
5878
5879 * call.c (convert_default_arg, build_over_call): Change all uses of
5880 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
5881 Ensure expr.h is included.
5882 * decl.c (grokparams): Ditto.
5883 * pt.c (tsubst_decl): Ditto.
5884 * typeck.c (convert_arguments): Ditto.
5885
5886 1999-08-02 Jason Merrill <jason@yorick.cygnus.com>
5887
5888 * class.c (mark_overriders): Fix order of args to overrides.
5889 (warn_hidden): Likewise. Fix for having virtual and non-virtual
5890 functions with the same name.
5891
5892 1999-08-02 Richard Henderson <rth@cygnus.com>
5893
5894 * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
5895
5896 1999-08-01 Mark Mitchell <mark@codesourcery.com>
5897
5898 * call.c (build_conditional_expr): Fix typo in comment.
5899
5900 1999-08-01 Bernd Schmidt <bernds@cygnus.co.uk>
5901
5902 * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
5903 case_stack; use in_control_zone_p.
5904 * typeck.c (c_expand_return): Likewise.
5905
5906 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
5907
5908 * except.c (catch_clauses): Delete declaration.
5909
5910 1999-07-30 Mark Mitchell <mark@codesourcery.com>
5911
5912 * call.c (build_conditional_expr): Call convert_from_reference to
5913 avoid reference/non-reference type confusion. Fix typo.
5914
5915 1999-07-30 Richard Henderson <rth@cygnus.com>
5916
5917 * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
5918 * cp-tree.h (initializer_constant_valid_p): Remove.
5919
5920 1999-07-28 Mark Mitchell <mark@codesourcery.com>
5921
5922 * call.c (conditional_conversion): Don't build BASE_CONVs for
5923 conversions between things that have the same type.
5924 (build_conditional_expr): Tweak.
5925 (convert_like): Some BASE_CONVs really do require the generation
5926 of code.
5927
5928 * init.c (perform_member_init): Don't go through build_modify_expr
5929 for simple initializations.
5930
5931 1999-07-27 Jason Merrill <jason@yorick.cygnus.com>
5932
5933 * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
5934 * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
5935 virtual functions and MI. Simplify.
5936
5937 * method.c: Remove prototype for largest_union_member.
5938 * pt.c (determine_specialization): Fix uninitialized warning.
5939 * lex.c (real_yylex): Likewise.
5940
5941 1999-07-27 Mark Mitchell <mark@codesourcery.com>
5942
5943 * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
5944 here too.
5945
5946 * cp-tree.h (BINFO_VIRTUALS): Document new format.
5947 * class.c (modify_one_vtable): Change prototype accordingly.
5948 (modify_all_vtables): Likewise.
5949 (modify_all_direct_vtables): Likewise.
5950 (modify_all_indirect_vtables): Likewise.
5951 (build_vtable_entry_for_fn): New function.
5952 (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
5953 (modify_vtable_entry): Likewise.
5954 (add_virtual_function): Likewise.
5955 (build_vtbl_initializer): New function.
5956 (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
5957 (fixup_vtable_deltas1): Likewise.
5958 (fixup_vtable_deltas): Likewise.
5959 (override_one_vtable): Likewise.
5960 (finish_struct_1): Likewise.
5961
5962 * error.c (dump_expr): Likewise.
5963 * search.c (get_abstract_virtuals_1): Likewise.
5964 (get_abstract_virtuals): Likewise.
5965 (expand_upcast_fixups): Likewise.
5966 * tree.c (debug_binfo): Likewise.
5967 * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
5968 __pure_virtual here.
5969
5970 1999-07-26 Mark Mitchell <mark@codesourcery.com>
5971
5972 * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
5973 as per 1999-07-26 change.
5974
5975 * typeck.c (c_sizeof): Don't allow non-static data members.
5976 (expr_sizeof): Likewise.
5977
5978 1999-07-26 Jason Merrill <jason@yorick.cygnus.com>
5979
5980 * input.c (feed_input): Only touch lineno and input_filename
5981 if !USE_CPPLIB. Save the old values before setting the new ones.
5982
5983 * input.c (feed_input): Add file, line parms.
5984 * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
5985 (real_yylex): Check linemode before input_redirected().
5986
5987 * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
5988 from op new to warning.
5989
5990 1999-07-26 Mark Mitchell <mark@codesourcery.com>
5991
5992 * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
5993 * call.c: All uses changed.
5994 * typeck.c: Likewise.
5995
5996 1999-07-26 Nathan Sidwell <nathan@acm.org>
5997
5998 * exception.cc (__cplus_type_matcher): Match __eh_matcher
5999 prototype.
6000
6001 1999-07-26 Mark Mitchell <mark@codesourcery.com>
6002
6003 * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
6004 (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
6005 (strip_top_quals): Declare.
6006 (ncp_convert): Likewise.
6007 (type_after_usual_arithmetic_converions): Likewise.
6008 (composite_pointer_type): Likewise.
6009 * call.c (strip_top_quals): Don't make it static.
6010 (promoted_arithmetic_type_p): New function.
6011 (conditional_conversion): Likewise.
6012 (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
6013 (standard_conversion): Use same_type_p. Don't build BASE_CONVs
6014 for converting a type to itself.
6015 (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
6016 (implicit_conversion): Make sure the from and to types are
6017 complete.
6018 (add_builtin_candidate): Correct handling of ?: operator.
6019 (add_builtin_candidates): Improve documentation.
6020 (build_conditional_expr): New function.
6021 (can_convert): Implement in terms of can_convert_arg.
6022 (ncp_convert): New function.
6023 * typeck.c (type_after_usual_arithmetic_conversions): New
6024 function, split out from common_type.
6025 (composite_pointer_type): New function, split out from
6026 build_conditional_expr.
6027 (common_type): Use type_after_usual_arithmetic_conversions.
6028 Remove redundant attribute merging.
6029 (comptypes): Tidy. Handle COMPLEX_TYPE.
6030 (build_binary_op_nodefault): Use null_ptr_cst_p.
6031 (build_conditional_expr): Remove.
6032 (convert_for_assignment): Use new conversion functions.
6033
6034 * cp-tree.h (abstract_virtuals_error): Change declaration.
6035 * typeck2.c (abstract_virtuals_error): Check to see if an error
6036 ocurred, and return a boolean value accordingly.
6037 (build_functional_cast): Adjust accordingly.
6038 * class.c (finish_struct_1): Likewise.
6039 * cvt.c (ocp_convert): Likewise.
6040 * decl.c (cp_finish_decl): Likewise.
6041 (grokparams): Likewise.
6042 (grok_op_properties): Likewise.
6043 (start_function): Likewise.
6044 * init.c (build_new_1): Likewise.
6045
6046 * pt.c (unify): Don't get confused by pointers-to-member functions.
6047
6048 * search.c (build_cplus_new): Robustify.
6049
6050 1999-07-24 Richard Henderson <rth@cygnus.com>
6051
6052 * gxx.gperf (__builtin_va_arg): New.
6053 * parse.y (VA_ARG): New token.
6054 (unary_expr): Recognize it.
6055
6056 Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com)
6057
6058 * g++FAQ.texi: Deleted per Joe Buck's request.
6059 * Makefile.in: Corresponding changes.
6060
6061 1999-07-23 Jason Merrill <jason@yorick.cygnus.com>
6062
6063 * lex.c: Sync with C frontend.
6064 (whitespace_cr): New fn.
6065 (skip_white_space): Use it.
6066 (init_parse): Reorder.
6067 (yyprint): Support CONSTANT.
6068 (pragma_getc, pragma_ungetc): Bring back.
6069 (read_line_number): Change in_system_header directly.
6070 (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
6071 (parse_float): Update to C version.
6072 (yylex): Handle '$' under the letter case.
6073 Remove looking_for_typename handling.
6074 Support hex floating point constants.
6075 Follow C's lead for choosing type of integer constants.
6076 Rearrange stuff to match C frontend.
6077 (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
6078 * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
6079
6080 1999-07-23 Mark Mitchell <mark@codesourcery.com>
6081
6082 * call.c (reference_binding): Tweak.
6083 (mayble_handle_implicit_object): Use direct_reference_binding to
6084 create the right implicit conversion sequence.
6085
6086 1999-07-22 Mark Mitchell <mark@codesourcery.com>
6087
6088 * pt.c (convert_nontype_argument): Don't call decl_constant_value
6089 if we're converting to a reference type.
6090
6091 * call.c (NEED_TEMPORARY_P): New macro.
6092 (standard_conversion): Set it, for derived-to-base conversions.
6093 (reference_related_p): New function.
6094 (reference_compatible_p): Likewise.
6095 (convert_class_to_reference): Likewise.
6096 (direct_reference_binding): Likewise.
6097 (reference_binding): Rework for standards-compliance.
6098 (convert_like): Adjust accordingly.
6099 (maybe_handle_ref_bind): Simplify; the right conversion sequences
6100 are now built up in reference_binding.
6101 (initialize_reference): New function.
6102 * cp-tree.h (ICS_USER_FLAG): Document.
6103 (ICS_THIS_FLAG): Likewise.
6104 (ICS_BAD_FLAG): Likewise.
6105 (NEED_TEMPORARY_P): Likewise.
6106 (cp_lvalue_kind): New type.
6107 (real_lvalue_p): Return it.
6108 * error.c (dump_expr): Provide more accurate representation for
6109 AGGR_INIT_EXPRs.
6110 * init.c (expand_default_init): Do not try to perform implicit
6111 conversions for a brace-enclosed initializer.
6112 * search.c (lookup_conversions): Document.
6113 * tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate
6114 appropriately.
6115 (real_lvalue_p): Adjust accordingly.
6116 (lvalue_p): Likewise.
6117 (build_cplus_new): Don't allow the creation of an abstract class.
6118 * typeck.c (convert_for_initialization): Use initialize_reference.
6119
6120 1999-07-21 Gavin Romig-Koch <gavin@cygnus.com>
6121
6122 * lex.c (real_yylex) : Correct the test for overflow when lexing
6123 integer literals.
6124
6125 1999-07-20 Jason Merrill <jason@yorick.cygnus.com>
6126
6127 * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
6128 not DECL_BUILT_IN, to determine if a function is internally declared.
6129 (duplicate_decls): Likewise. Improve handling of builtins.
6130 (push_overloaded_decl): Remove special handling of builtins.
6131
6132 * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
6133
6134 * decl.c (grokdeclarator): Pull out decl_constant_value in
6135 templates, too.
6136
6137 * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
6138 * cp-tree.h, pt.c, semantics.c: Adjust.
6139 * method.c (largest_union_member): Remove.
6140
6141 * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
6142
6143 * lex.c (token_getch, token_put_back): New fns.
6144 (real_yylex): Use them.
6145
6146 * lex.c (lang_init): Generalize.
6147 (lang_init_options): Tell cpplib this is C++.
6148 (nextchar): Remove. Replace uses with put_back.
6149 (skip_white_space): Handle linemode here. Optimize for cpplib.
6150 (extend_token_buffer_to): New fn.
6151 (extend_token_buffer): Use it.
6152 (read_line_number, check_newline): Just deal with tokens.
6153 (real_yylex): More cpplib optimizations. Simplify. Don't produce
6154 EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
6155 * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
6156 * parse.y (PAREN_STAR_PAREN): Remove.
6157 * input.c: Don't use the putback machinery with cpplib.
6158 (sub_getch): Fold back into getch.
6159 (getch): Don't handle linemode here.
6160 (feed_input): Unget any text in the token buffer.
6161
6162 * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
6163 nextyychar, nextyylval): Remove.
6164
6165 1999-07-20 Michael Tiemann <tiemann@holodeck.cygnus.com>
6166 Jason Merrill <jason@yorick.cygnus.com>
6167
6168 * lex.c (indent_level): New variable.
6169 (init_parse): Set cpp_token to CPP_DIRECTIVE.
6170 (consume_string): Make this smart about USE_CPPLIB.
6171 (yyungetc): Use put_back function.
6172 (pragma_getc, pragma_ungetc): Functions deleted.
6173 (check_newline): Rewrite to be intelligent about USE_CPPLIB.
6174 Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
6175 pragma_ungetc.
6176 (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
6177 Also, clean up cases where we redundantly set token_buffer[0].
6178 (read_line_number): New fn.
6179 * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
6180 (end_input): Call cpp_pop_buffer if USE_CPPLIB.
6181 (sub_getch): Conditionalize out code that's not appropriate if
6182 USE_CPPLIB.
6183 (put_back): Rewrite in case USE_CPPLIB is defined.
6184 (input_redirected): Ditto.
6185
6186 Tue Jul 20 11:24:19 1999 Bernd Schmidt <bernds@cygnus.co.uk>
6187
6188 * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
6189 c_global_trees and accessor macros defined in c-common.h.
6190 (cp_tree_index): New enumeration.
6191 (cp_global_trees): Declare new array. Add accessor macros for it, and
6192 delete declarations of tree nodes replaced by it.
6193 (builtin_function): Delete macro, add declaration for new function.
6194 Include c-common.h.
6195 * decl.c: Delete definitions for tree nodes that were replaced by
6196 cp_global_trees and c_global_trees.
6197 (init_decl_processing): Call c_common_nodes_and_builtins; delete code
6198 to generate the common builtins here.
6199 (builtin_function): New function.
6200 * decl2.c (abort_fndecl): Delete declaration.
6201 * except.c (expand_builtin_return_address): Delete declaration.
6202 (builtin_return_address_fndecl): Delete variable.
6203 (const_ptr_type_node): Delete declaration.
6204 * lex.c (cons_up_default_function): Delete declaration of
6205 void_list_node.
6206 * parse.y (void_list_node): Delete declaration.
6207 * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
6208 Delete variables.
6209 (const_string_type_node): Delete declaration.
6210 * search.c (abort_fndecl): Delete declaration.
6211 * Makefile.in: Update dependencies.
6212
6213 1999-07-19 Mark Mitchell <mark@codesourcery.com>
6214
6215 * pt.c (check_default_tmpl_args): Move test for missing default
6216 arguments here, from ...
6217 (end_template_parm_list): Here.
6218
6219 1999-07-18 Mark Mitchell <mark@codesourcery.com>
6220
6221 * decl.c (lookup_nested_type): Remove.
6222 (pushtag): Don't call it.
6223
6224 Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com)
6225
6226 * Makefile.in (INTERFACE): Bump to 2.
6227
6228 1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
6229
6230 * typeck2.c (my_friendly_abort): Updated URL with bug reporting
6231 instructions to gcc.gnu.org. Removed e-mail address.
6232
6233 1999-07-17 Mark Mitchell <mark@codesourcery.com>
6234
6235 * pt.c (determine_specialization): Tighten error-checking.
6236 (end_template_parm_list): Likewise.
6237
6238 1999-07-14 Mark Mitchell <mark@codesourcery.com>
6239
6240 * pt.c (check_default_tmpl_args): Handle friends defined in the
6241 class just like member functions defined in the class.
6242
6243 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
6244 Jason Merrill <jason@yorick.cygnus.com>
6245
6246 * cp-tree.h (struct lang_decl): Added field for storing sorted
6247 FIELD_DECLs (used in TYPE_DECLs).
6248 (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
6249 (DECL_SORTED_FIELDS): New macro.
6250 * class.c (method_name_cmp): New function.
6251 (finish_struct_methods): Modified to support sorting and searching
6252 methods.
6253 (finish_struct_anon): Changed code in inner loop to use ELT rather
6254 than UELT (which required an extra indirection for every reference).
6255 (field_decl_cmp): New function to support sorting FIELD_DECLs.
6256 (finish_struct_1): Sort fields.
6257 * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
6258 (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
6259 Also, switch to using array indexing rather than a changing pointer.
6260 * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
6261 DECL_SORTED_FIELDS.
6262
6263 1999-07-09 Jason Merrill <jason@yorick.cygnus.com>
6264
6265 * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
6266 casts in system headers or extern "C" blocks.
6267
6268 * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
6269 errors to pedwarn.
6270
6271 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
6272
6273 * decl2.c (write_virtuals): Deleted declaration.
6274 * cp-tree.h (write_virtuals): Deleted extern declaration.
6275 * class.c (finish_struct_1): Removed #if 0'd code that mentions
6276 write_virtuals.
6277 * semantics.c (begin_class_definition): Rewrite code to not depend
6278 on write_virtuals.
6279
6280 * lex.c (cp_pragma_interface): New function.
6281 (cp_pragma_implementation): Likewise.
6282 (handle_cp_pragma): Call them.
6283
6284 * typeck.c (comptypes): Simplify C code in look_hard.
6285
6286 * xref.c (PALLOC): Use xcalloc, not calloc.
6287 (SALLOC): Use xmalloc, not malloc.
6288
6289 * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
6290
6291 * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
6292 is NO_DEBUG.
6293
6294 * decl.c (duplicate_decls): If a redeclaration doesn't match the
6295 initial declaration, then don't save the inline info and by all
6296 means don't mark the function as a builtin function.
6297
6298 * decl.c (lookup_name_real): Set NONCLASS to 1 if
6299 CURRENT_CLASS_TYPE is 0.
6300
6301 * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
6302 NULL_TREE.
6303
6304 * ptree.c (print_lang_type): Added vtable-needs-writing.
6305
6306 Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
6307
6308 * decl2.c (mark_vtable_entries): Fix check for rtti offset.
6309
6310 1999-07-06 Gavin Romig-Koch <gavin@cygnus.com>
6311
6312 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
6313 Merged into c-common.
6314
6315 1999-07-05 Dave Brolley <brolley@cygnus.com>
6316
6317 * lex.c (errorcount): Declare it.
6318 (finish_parse): Update errorcount for when using CPPLIB.
6319
6320 1999-07-05 Mark Mitchell <mark@codesourcery.com>
6321
6322 * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
6323 parameters.
6324 (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
6325 * decl.c (push_class_binding): Use it.
6326 (lookup_name_real): Likewise.
6327
6328 1999-07-02 Gavin Romig-Koch <gavin@cygnus.com>
6329
6330 * cp-tree.h (widest_integer_literal_type_node,
6331 widest_unsigned_literal_type) : New.
6332 * decl.c (widest_integer_literal_type_node,
6333 widest_unsigned_literal_type) : New.
6334 (init_decl_processing): Handle/use the two new types.
6335 * lex.c (real_yylex): Same.
6336 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
6337 Same.
6338
6339 1999-07-01 Mark Mitchell <mark@codesourcery.com>
6340
6341 * decl.c (grokdeclarator): Don't give names "for linkage purposes"
6342 to anonymous cv-qualified types.
6343
6344 1999-07-01 Gavin Romig-Koch <gavin@cygnus.com>
6345
6346 * lex.c (real_yylex) : Change integer literal overflow handling to
6347 be like c-lex.c.
6348
6349 * lex.c (real_yylex): Improve 'integer constant out of range' messages.
6350
6351 1999-06-28 Richard Henderson <rth@cygnus.com>
6352
6353 * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
6354
6355 1999-06-28 Jason Merrill <jason@yorick.cygnus.com>
6356
6357 * error.c (dump_type_real): Handle TREE_LIST again.
6358
6359 * typeck.c (comp_target_parms): Don't complain about
6360 converting from () to (...) if !flag_strict_prototype.
6361
6362 * decl.c (grokdeclarator): Update the names of all variants when
6363 de-anonymizing.
6364
6365 1999-06-21 Mark Mitchell <mark@codesourcery.com>
6366
6367 * init.c (expand_aggr_vbase_init): Rename to
6368 construct_virtual_bases. Conditionalize construction here,
6369 rather than ...
6370 (emit_base_init): Here.
6371
6372 1999-06-19 Mark Mitchell <mark@codesourcery.com>
6373
6374 * semantics.c (finish_asm_stmt): Apply decay conversions to
6375 input operands.
6376
6377 * decl.c (expand_static_init): When building an anonymous function
6378 for use with atexit, compute its body before and after entering
6379 the function.
6380
6381 * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
6382 EXIT_EXPR.
6383
6384 1999-06-18 Mark Mitchell <mark@codesourcery.com>
6385
6386 * init.c (expand_aggr_vbase_init): Add flag parameter.
6387 (build_partial_cleanup_for): Remove, inlining into ..
6388 (expand_cleanup_for_base): ... here. Take flag parameter.
6389 (emit_base_init): Pass the in_chrg parameter to
6390 emit_aggr_vbase_init.
6391 (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
6392
6393 1999-06-16 Mark Mitchell <mark@codesourcery.com>
6394
6395 * decl2.c (import_export_decl): Use same_type_p, rather than
6396 relying on pointer-equality for types.
6397
6398 * method.c (do_build_copy_constructor): Simplify.
6399
6400 * call.c (build_method_call): Remove bogus code for two-argument
6401 delete.
6402 * init.c (build_new_1): Expand on comment, and remove dead code.
6403
6404 * init.c (expand_cleanup_for_base): New function, split out
6405 from ...
6406 (emit_base_init): Here.
6407 (expand_aggr_vbase_init): Use it.
6408
6409 1999-06-15 Mark Mitchell <mark@codesourcery.com>
6410
6411 * cp-tree.h (class_cache_firstobj): Declare.
6412 (maybe_push_cache_obstack): Rename to push_cache_obstack.
6413 * class.c (permanent_obstack): Remove declaration.
6414 (class_cache_firstobj): Make it global.
6415 (add_method): Don't use permanent_obstack directly.
6416 (pushclass): Only free the class_cache_obstack if we know how far
6417 back to free it.
6418 (maybe_push_cache_obstack): Rename to push_cache_obstack.
6419 * decl.c: Remove dead comment.
6420 (saved_scope): Add class_cache_firstobj.
6421 (push_to_top_level): Save it.
6422 (pop_from_top_level): Restore it.
6423 (push_class_level_binding): Use push_cache_obstack, not
6424 maybe_push_cache_obstack.
6425 * search.c (push_class_decls): Likewise.
6426
6427 1999-06-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
6428
6429 * pt.c (tsubst_friend_function): Push into namespace of friend
6430 function before pushdecl'ing it.
6431
6432 1999-06-14 Nathan Sidwell <nathan@acm.org>
6433
6434 * call.c (build_new_op): Remove REF_BIND from all operands.
6435
6436 1999-06-13 Alexandre Oliva <oliva@dcc.unicamp.br>
6437
6438 * init.c (build_new_1): Look up operator delete even if there was
6439 no explicit new placement.
6440
6441 1999-06-08 Nathan Sidwell <nathan@acm.org>
6442
6443 * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
6444 of ...
6445 (build_throw): ... here. Call it.
6446 (process_start_catch_block): Call it.
6447
6448 1999-06-07 Mark Mitchell <mark@codesourcery.com>
6449
6450 * search.c (convert_pointer_to_single_level): Reimplement without
6451 using get_binfo.
6452
6453 1999-06-06 Mark Mitchell <mark@codesourcery.com>
6454
6455 * method.c (is_back_referenceable_type): Back-reference bools when
6456 not squangling.
6457
6458 1999-06-07 Dave Brolley <brolley@cygnus.com>
6459
6460 * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
6461 * input.c (putback_buffer): New structure type.
6462 (putback): Replaces putback_char member.
6463 (putback): Replaces putback_char static variable.
6464 (feed_input): Use putback.
6465 (end_input): Use putback.
6466 (sub_getch): Use putback.
6467 (put_back): Use putback.
6468
6469 1999-06-05 Mark Mitchell <mark@codesourcery.com>
6470
6471 * decl.c (grokdeclarator): Fix typo in last change.
6472
6473 1999-06-04 Jason Merrill <jason@yorick.cygnus.com>
6474
6475 * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
6476 (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
6477
6478 1999-06-04 Nathan Sidwell <nathan@acm.org>
6479
6480 * except.c (build_throw): Check throw expression validity.
6481
6482 1999-06-03 Mark Mitchell <mark@codesourcery.com>
6483
6484 * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
6485 just because flag_signed_bitfields is false.
6486
6487 1999-06-03 Nathan Sidwell <nathan@acm.org>
6488
6489 * semantics.c (begin_class_definition): Update the struct's
6490 location here ...
6491 * class.c (finish_struct): ... rather than here.
6492
6493 * decl.c (make_typename_type): Don't rely on uninitialized
6494 variable.
6495
6496 1999-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6497
6498 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
6499
6500 1999-05-31 Mark Mitchell <mark@codesourcery.com>
6501
6502 * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
6503 and friends rather than messing with current_obstack directly.
6504 (cp_build_qualified_type_real): Rework ARRAY_TYPE
6505 allocation to match practice throughout the rest of the
6506 compiler.
6507
6508 1999-05-30 Mark Mitchell <mark@codesourcery.com>
6509
6510 * lex.c (make_lang_type): Create TYPE_BINFO for
6511 TEMPLATE_TYPE_PARMs just like for non-template types.
6512
6513 * decl.c (start_decl): Move checks on initialization to ...
6514 (cp_finish_decl): Here. Tidy formatting slightly.
6515
6516 1999-05-28 Mark Mitchell <mark@codesourcery.com>
6517
6518 * decl.c (add_binding): Don't complain about a redeclaration of a
6519 semantically identical typedef in a local scope.
6520
6521 1999-05-28 Nathan Sidwell <nathan@acm.org>
6522
6523 * decl.c (complete_array_type): Allocate off same obstack. Fix
6524 DO_DEFAULT comment to match reality.
6525
6526 * friend.c (make_friend_class): Fix diagnostic typo.
6527
6528 1999-05-28 Mark Mitchell <mark@codesourcery.com>
6529
6530 * decl.c (lookup_namespace_name): Handle getting a
6531 TEMPLATE_ID_EXPR.
6532 (expand_static_init): Don't call pushdecl for implicitly declared
6533 `atexit' used to register destructors.
6534
6535 1999-05-25 Mark Mitchell <mark@codesourcery.com>
6536
6537 * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
6538 intialize a vtable.
6539
6540 * cp-tree.h (NAMESPACE_LEVEL): Reformat.
6541 (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes
6542 by combining TEMPLATE_INFO and LEVEL into a single union.
6543 (DECL_TEMPLATE_INFO): Reformat.
6544 (DECL_SAVED_TREE): Document.
6545 (DECL_TEMPLATE_INJECT): Remove.
6546 * class.c (finish_struct): Remove code to deal with
6547 DECL_TEMPLATE_INJECT.
6548
6549 * decl.c (maybe_process_template_type_declaration): Handle all new
6550 types in templates uniformly.
6551 * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
6552 DECL_CONTEXT.
6553 * pt.c (lookup_template_class): Inject template instantiations of
6554 forward-declarations.
6555 (instantiate_class_template): Remove code processing
6556 DECL_TEMPLATE_INJECT.
6557
6558 * pt.c (lookup_template_class): Tweak lookup to find member
6559 templates.
6560
6561 * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
6562 ASM_CV_QUAL.
6563 * semantics.c (finish_asm_stmt): Make strings permanent if they're
6564 used in a template.
6565
6566 1999-05-25 Jason Merrill <jason@yorick.cygnus.com>
6567
6568 * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
6569 parts of pointer to data member types.
6570
6571 1999-05-24 Mark Mitchell <mark@codesourcery.com>
6572
6573 * decl2.c (mark_vtable_entries): Don't make a copy of a function,
6574 and then make it look like `abort'. Just use `abort' instead.
6575
6576 * typeck.c (build_static_cast): Don't allow static_casts that cast
6577 away constness.
6578 (casts_away_constness_r): New function.
6579 (casts_away_constness): Likewise.
6580
6581 * decl.c (lookup_tag): Remove code no longer needed after
6582 name-lookup improvements.
6583 * decl2.c (handle_class_head): Make error-recovery more robust.
6584 * friend.c (make_friend_class): Reject templated typename types.
6585 * lex.c (is_global): A template parameter isn't global.
6586 * parse.y (class_head): Robustify.
6587 * parse.c: Regenerated.
6588
6589 1999-05-22 Mark Mitchell <mark@codesourcery.com>
6590
6591 * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
6592 INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs.
6593
6594 * cp-tree.h (push_nested_namespace): Declare.
6595 (pop_nested_namespace): Likewise.
6596 * decl.c (push_nested_namespace): New function.
6597 (pop_nested_namespace): Likewise.
6598 * pt.c (instantiate_class_template): Use them.
6599
6600 * tree.c (mapcar): Handle NON_LVALUE_EXPR.
6601
6602 * cp-tree.h (cplus_expand_constant): Declare.
6603 * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
6604 converted from one pointer-to-object type to another.
6605 * expr.c (cplus_expand_constant): Don't make it static.
6606 * typeck.c (build_component_ref): Don't crash when presented with
6607 a component which is a TEMPLATE_DECL.
6608 (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a
6609 cast from a pointer-to-member constant to its own type does not
6610 result in a valid non-type template argument.
6611
6612 1999-05-21 Mark Mitchell <mark@codesourcery.com>
6613 Nathan Sidwell <nathan@acm.org>
6614
6615 * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
6616 * cp-tree.h: Fix typo in documentation on pointers-to-members.
6617 (cp_build_qualified_type): Make it a macro.
6618 (cp_build_qualified_type_real): Declare.
6619 * decl.c (grokdeclarator): Remove misleading comment. Avoid
6620 problem with template parameters and restrict-qualification.
6621 * gxx.gperf: Replace NORID with RID_UNUSED throughout.
6622 * hash.h: Regenerated.
6623 * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
6624 the enumeration.
6625 (NORID): Remove definition.
6626 * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
6627 (tsubst): Likewise. Remove special handling for FUNCTION_TYPEs.
6628 (fn_type_unification): Check that the function type resulting from
6629 the deduction is legal.
6630 (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
6631 (unify): Use cp_build_qualified_type_real.
6632 * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
6633 (cp_build_qualified_type): Rename to ...
6634 (cp_build_qualified_type_real): Add additional COMPLAIN parameter
6635 and modify appropriately.
6636
6637 * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
6638 reveal optimization opportunities.
6639
6640 * pt.c (tsubst): Don't issue error messages when we're not
6641 complaining, even if we see a qualified function type.
6642 (check_cv_quals_for_unify): Don't allow a qualified function
6643 type.
6644
6645 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
6646
6647 * class.c (instantiate_type): Downgrade errors for object-dependent
6648 memfn refs to pedwarn.
6649
6650 1999-05-20 Mark Mitchell <mark@codesourcery.com>
6651
6652 * decl.c (grokdeclarator): Don't treat [] as indicating a
6653 zero-sized array in a typedef.
6654
6655 * call.c (build_object_call): Don't look at DECL_NAME for a type.
6656 (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
6657 (typeck.c): Or TYPE_MAIN_VARIANT for a type.
6658
6659 * pt.c (for_each_template_parm): Rework to match documentation.
6660 Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
6661
6662 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
6663
6664 * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
6665
6666 * class.c (finish_base_struct): Allow non-COM bases for COM classes
6667 except at the leftmost position.
6668 (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
6669 Pass the binfo's class, not the most derived, to skip_rtti_stuff.
6670 * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
6671
6672 * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
6673 (build_cplus_new): Make sure that what we return is of the right type.
6674
6675 1999-05-20 Mark Mitchell <mark@codesourcery.com>
6676
6677 * cp-tree.h (make_ptrmem_cst): New function.
6678 * expr.c (cplus_expand_constant): Split out from ...
6679 (cplus_expand_expr): Here. Use cplus_expand_constant.
6680 (init_cplus_expand): Set lang_expand_constant.
6681 * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
6682
6683 * tree.c (make_ptrmem_cst): Define.
6684 * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
6685 * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
6686
6687 1999-05-19 Mark Mitchell <mark@codesourcery.com>
6688
6689 * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
6690
6691 * decl2.c (start_static_storage_duration_function): Fix comment.
6692 (finish_file): Create static storage duration functions lazily.
6693
6694 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
6695
6696 Implement anonymous structs.
6697 * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
6698 * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
6699 * class.c (finish_struct_1): Remove redundant check for anon struct.
6700 * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
6701 (check_tag_decl): Check for anonymous struct here.
6702 * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
6703 * init.c (sort_member_init, emit_base_init): Handle getting fields
6704 as well as names in current_member_init_list.
6705 (perform_member_init): Handle getting an anon aggr.
6706 * method.c (do_build_assign_ref): Don't descend into anon aggrs.
6707 (do_build_copy_constructor): Likewise.
6708
6709 1999-05-19 Mark Mitchell <mark@codesourcery.com>
6710
6711 * tree.c (cp_build_qualified_type): Don't allow qualified function
6712 types.
6713
6714 Wed May 19 02:50:53 1999 Arvind Sankar <arvinds@mit.edu>
6715
6716 * gxxint.texi: Fix typo.
6717
6718 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
6719
6720 * call.c (find_scoped_type, resolve_scope_to_name): Lose.
6721 * class.c (finish_struct_1): Use CLASS_TYPE_P.
6722 * ptree.c (print_lang_type): Likewise.
6723 * typeck.c (build_modify_expr, c_expand_asm_operands): Use
6724 IS_AGGR_TYPE_CODE.
6725 * typeck2.c (digest_init): Likewise.
6726
6727 1999-05-18 Jason Merrill <jason@yorick.cygnus.com>
6728
6729 * call.c (joust): Compare the types of the conv ops, not the
6730 target types of the conversions.
6731
6732 Tue May 18 00:21:34 1999 Zack Weinberg <zack@rabi.phys.columbia.edu>
6733
6734 * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
6735 was not given.
6736
6737 1999-05-17 Mark Mitchell <mark@codesourcery.com>
6738
6739 * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
6740 * decl.c (grokfndecl): Don't allow inline declarations of friend
6741 template specializations, or friend template specializations with
6742 default arguments.
6743 * pt.c (tsubst): Handle substitution into array types that does
6744 not yield a fixed upper bound, even when not processing a
6745 template.
6746 (tsubst_copy): Deal with the fact that the second operand to a
6747 TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
6748 * search.c (marked_pushdecls_p): Don't descend into
6749 TEMPLATE_TYPE_PARMs and the like.
6750 (unmarked_pushdecls_p): Likewise.
6751
6752 * call.c (build_over_call): Don't throw away
6753 initializations/copies of empty classes; use MODIFY_EXPR and
6754 INIT_EXPR as for non-empty classes.
6755 * class.c (finish_struct_1): Put the padding byte for an empty
6756 class on the TYPE_NONCOPIED_PARTS list for the class.
6757
6758 1999-05-16 Mark Mitchell <mark@codesourcery.com>
6759
6760 * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
6761 indicate a reference to a field that is a qualified name.
6762
6763 1999-05-16 Jason Merrill <jason@yorick.cygnus.com>
6764
6765 * decl2.c (finish_objects): Don't use .?tors.* if we don't have
6766 ASM_OUTPUT_CONSTRUCTOR.
6767
6768 * friend.c (do_friend): Add attrlist arg. Remove support for
6769 getting a non-decl as 'decl'.
6770 * decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or
6771 rtl.
6772 (grokdeclarator): Adjust.
6773 * cp-tree.h: Adjust.
6774
6775 1999-05-16 Mark Mitchell <mark@codesourcery.com>
6776
6777 * cp-tree.h (permanent_p): New function.
6778 * init.c (build_new_1): Use mapcar, not copy_node, to copy a
6779 possibly complex tree node.
6780 * tree.c (mapcar): Adjust comments, and follow coding standards in
6781 conditional.
6782 (permanent_p): New function.
6783
6784 1999-05-13 Per Bothner <bothner@cygnus.com>
6785
6786 * class.c (push_lang_context): Turn off DECL_IGNORED_P for
6787 primitive Java types, if we actually see `extern "Java"'.
6788
6789 1999-05-10 18:21 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
6790
6791 * lang-specs.h: Pass -$ to the preprocessor.
6792
6793 1999-05-10 Jason Merrill <jason@yorick.cygnus.com>
6794
6795 * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
6796 Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
6797 (resolve_offset_ref): Don't handle a raw baselink.
6798 * cvt.c (build_expr_type_conversion): Likewise.
6799 * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
6800 convert_for_initialization): Likewise.
6801 * class.c (instantiate_type): Handle seeing a baselink under an
6802 OFFSET_REF.
6803 * error.c (dump_expr): Likewise.
6804 * pt.c (for_each_template_parm): Likewise.
6805 (resolve_overloaded_unification): Likewise.
6806 * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
6807 * typeck.c (expr_sizeof): Also complain about other permutations
6808 of overloaded functions.
6809
6810 1999-05-07 Jason Merrill <jason@yorick.cygnus.com>
6811
6812 * init.c (resolve_offset_ref): Don't return a raw method.
6813 Use BASELINK_P.
6814 * typeck.c (decay_conversion): Don't handle a raw method.
6815 Resolve all OFFSET_REFs.
6816 (get_member_function_from_ptrfunc): 0 is a valid vtable index.
6817 (build_binary_op_nodefault): Handle resolving overloaded fns. Use
6818 same_type_p for pmf bits. Don't use build_binary_op to compare
6819 raw pointers to methods.
6820 (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
6821 to decide when to call resolve_offset_ref.
6822 (build_c_cast, convert_for_initialization): Likewise.
6823 * cvt.c (build_expr_type_conversion): Likewise.
6824
6825 1999-05-06 Nathan Sidwell <nathan@acm.org>
6826
6827 * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
6828
6829 1999-05-05 Mark Mitchell <mark@codesourcery.com>
6830
6831 * decl2.c (start_objects): Don't let static constructors and
6832 destructors get inlined.
6833
6834 * parse.y (nested_name_specifier): Make sure ordinary types are
6835 complete, just like template types.
6836 * parse.c: Regenerated.
6837
6838 * pt.c (check_explicit_specialization): Improve error messages.
6839
6840 1999-05-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
6841
6842 * typeck.c (string_conv_p): Use same_type_p to check whether we
6843 try to convert between char and wchar_t.
6844
6845 1999-05-03 Mark Mitchell <mark@codesourcery.com>
6846
6847 * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
6848 lookup to error_mark_node here.
6849 (lookup_member): Revise documentation. Add comments. Don't set
6850 the TREE_TYPE to error_mark_node here, and don't build up an extra
6851 TREE_LIST for ambiguous lookups.
6852 (setup_class_bindings): Adjust accordingly.
6853 (push_class_decls): Revise out-of-date comments.
6854
6855 * typeck.c (build_const_cast): Tighten checks for legality.
6856
6857 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
6858
6859 * init.c (build_member_call): Lookup names coming from
6860 namespace-scoped LOOKUP_EXPR.
6861
6862 1999-05-03 Jim Blandy <jimb@zwingli.cygnus.com>
6863
6864 * gxxint.texi: Add documentation for 'I'.
6865
6866 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
6867
6868 * tinfo.cc (operator==): Qualify type_info with std::.
6869
6870 1999-05-02 Mark Mitchell <mark@codesourcery.com>
6871
6872 * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy.
6873 (DECL_COMDAT): Remove definition.
6874
6875 1999-05-01 Mark Mitchell <mark@codesourcery.com>
6876
6877 * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
6878 change.
6879
6880 1999-04-30 Mark Mitchell <mark@codesourcery.com>
6881
6882 * class.c (build_vtable): Use build_lang_decl when building
6883 vtables, not just build_decl.
6884 (prepare_fresh_vtable): Likewise.
6885 * decl.c (wrapup_globals_for_namespace): Mark vtables as
6886 DECL_EXTERNAL when calling wrapup_global_declarations.
6887 * decl2.c (priority_info_s): Add initializations_p and
6888 destructions_p members.
6889 (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
6890 when deciding what vtables to write out.
6891 (ssdf_decls): New variable.
6892 (ssdf_decls_used): Likewise.
6893 (start_static_storage_duration_function): Deal with being called
6894 multiple times. Avoid inlining this function.
6895 (generate_inits_for_priority): Deal with reuse of priority map.
6896 (get_priority_info): Clear initializations_p and destructions_p.
6897 (do_static_initialization): Tweak comment.
6898 (do_static_destruction): Likewise. Fix condition on sentries for
6899 destruction.
6900 (generate_ctor_or_dtor_function): Call all of the static storage
6901 duration functions.
6902 (generate_ctor_or_dtor_function_for_priority): Check
6903 initializations_p and destructions_p to see what priorities need
6904 initialization functions.
6905 (finish_file): Rework to generate multiple static storage duration
6906 functions, rather than just one.
6907
6908 * typeck.c (build_const_cast): Tweak last change to handle
6909 templates correctly.
6910
6911 * typeck.c (build_const_cast): Disallow use of const_cast to
6912 anything but a pointer or reference type.
6913
6914 1999-04-30 Nathan Sidwell <nathan@acm.org>
6915
6916 * decl.c (cp_finish_decl): Don't permit arrays of abstract or
6917 signature type.
6918
6919 1999-04-29 Mark Mitchell <mark@codesourcery.com>
6920
6921 * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
6922 (finish_file): Indent comments properly.
6923
6924 1999-04-29 Richard Henderson <rth@cygnus.com>
6925
6926 * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
6927 (do_static_destruction): Likewise.
6928
6929 1999-04-29 Nathan Sidwell <nathan@acm.org>
6930
6931 * cp-tree.h (TYPE_NOTHROW_P): New macro.
6932 * decl2.c (delete_sanity): Warn on deleting void *.
6933 * init.c (build_new_1): Use TYPE_NOTHROW_P.
6934 * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
6935 throwing operator new.
6936
6937 1999-04-28 Nathan Sidwell <nathan@acm.org>
6938
6939 * cp-tree.h (build_component_addr): Remove prototype.
6940 * typeck.c (build_component_addr): Make static. Remove MSG
6941 argument.
6942 (build_component_addr): Remove MSG parameter, clean up
6943 comment.
6944 (build_x_function_call): Use cp_error.
6945 (build_unary_op): Adjust call of build_component_addr.
6946
6947 1999-04-28 Mark Mitchell <mark@codesourcery.com>
6948
6949 * pt.c (tsubst_friend_class): Check for NULL.
6950
6951 Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
6952
6953 * search.c (binfo_for_vtable): Initialize bfvi.var.
6954
6955 1999-04-27 Nathan Sidwell <nathan@acm.org>
6956
6957 * rtti.c (build_x_typeid): Check rtti is enabled.
6958
6959 1999-04-26 Mark Mitchell <mark@codesourcery.com>
6960
6961 * search.c (is_subobject_of_p): Make sure we're looking at the
6962 right baseclasses.
6963
6964 1999-04-26 Marc Espie <espie@cvs.openbsd.org>
6965
6966 * Make-lang.in (cplib2.ready): Don't depend on phony targets.
6967
6968 1999-04-23 Mark Mitchell <mark@codesourcery.com>
6969
6970 * decl2.c (finish_file): Tweak handling of extern inlines so that
6971 they are not unnecessarily put out.
6972
6973 * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
6974 such as base classes.
6975
6976 1999-04-22 Brendan Kehoe <brendan@cygnus.com>
6977
6978 * tree.c (build_exception_variant): Fix typo: use the chain of U,
6979 not trying V, while cycling through U.
6980
6981 1999-04-22 Mark Mitchell <mark@codesourcery.com>
6982
6983 * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
6984 preserves_first_arg. Enlarge dummy accordingly.
6985 (DECL_TINFO_FN_P): New macro.
6986 (SET_DECL_TINFO_FN_P): Likeiwse.
6987 (DECL_RETURNS_FIRST_ARG): Remove.
6988 (DECL_PRESERVES_THIS): Likewise.
6989 (DECL_INIT_PRIORITY): New macro.
6990 (finish_struct_1): Change prototype.
6991 (cat_namespace_levels): Remove prototype.
6992 (vtable_decl_p): New prototype.
6993 (vtype_decl_p): Likewise.
6994 (sigtable_decl_p): Likewise.
6995 (walk_globals_pred): New typedef.
6996 (walk_globals_fn): Likewise.
6997 (walk_globals): New prototype.
6998 (walk_namespaces_fn): New typedef.
6999 (walk_namespaces): New prototype.
7000 (wrapup_globals_for_namespace): Likewise.
7001 (walk_vtables): Remove prototype.
7002 (walk_sigtables): Likewise.
7003 (instantiate_pending_templates): New prototype.
7004 * class.c (finish_struct_1): Don't return a value.
7005 * decl.h (pending_statics): Remove declaration.
7006 * decl.c (walk_namespaces_r): New function.
7007 (walk_globals_r): Likewise.
7008 (vtable_decl_p): Likewise.
7009 (vtype_decl_p): Likewise.
7010 (sigtable_decl_p): Likewise.
7011 (walk_namespaces): Likewise.
7012 (walk_globals_data): New type.
7013 (walk_globals): New function.
7014 (wrapup_globals_for_namespace): Likewise.
7015 (expand_static_init): Remove assertion. Remove redundancy in
7016 conditional. Don't put static data members in static_aggregates
7017 Tidy.
7018 (finish_function): Remove redundancy in conditional. Don't set
7019 DECL_RETURNS_FIRST_ARG.
7020 (cat_namespace_levels): Remove.
7021 * decl2.c: Include splay-tree.h and varray.h.
7022 (priority_info_s): New structure.
7023 (finish_vtable_vardecl): Change prototype. Adjust for new calling
7024 conventions.
7025 (prune_vtable_vardecl): Likewise.
7026 (finish_sigtable_vardecl): Likewise.
7027 (setup_initp): Remove.
7028 (do_dtors): Remove.
7029 (do_ctors): Remove.
7030 (start_static_storage_duration_function): New function.
7031 (generate_inits_for_priority): Likewise.
7032 (finish_static_storage_duration_function): Likewise.
7033 (get_priority_info): Likewise.
7034 (do_static_initialization): Likewise.
7035 (do_static_destruction): Likewise.
7036 (do_static_initialization_and_destruction): Likewise.
7037 (generate_ctor_or_dtor_function): Likewise.
7038 (generate_ctor_and_dtor_functions_for_priority): Likewise.
7039 (pending_statics): Make it a varray.
7040 (pending_statics_used): New variable.
7041 (saved_inlines): Make it a varray.
7042 (saved_inlines_used): New variable.
7043 (finish_static_data_member): Change method of updating
7044 pending_statics.
7045 (mark_inline_for_output): Remove #if 0'd code. Change method of
7046 updating saved_inlines.
7047 (walk_vtables): Remove.
7048 (walk_sigtables): Likewise.
7049 (import_export_decl): Use DECL_TINFO_FN_P.
7050 (pending_templates): Remove declaration.
7051 (maybe_templates): Likewise.
7052 (static_aggregates_initp): Likewise.
7053 (setup_initp): Likewise.
7054 (finish_objects): Simplify.
7055 (INITIALIZE_P_IDENTIFIER): New macro.
7056 (PRIORITY_IDENTIFIER): New macro.
7057 (SSDF_IDENTIFIER): New macro.
7058 (initialize_p_decl): New variable.
7059 (priority_decl): Likewise.
7060 (ssdf_decl): Likewise.
7061 (priority_info_map): Likewise.
7062 (finish_file): Recode output of static intializers and other
7063 file-scope finalization tasks.
7064 * error.c (OB_END_TEMPLATE_ID): New macro.
7065 (dump_type_real): Use it.
7066 (dump_decl): Likewise.
7067 (dump_function_name): Likewise.
7068 * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
7069 interface.
7070 (check_newline): Use walk_globals, not walk_vtables.
7071 * pt.c (pending_tempalte_expansions): Remove.
7072 (set_vardecl_interface_info): Likewise.
7073 (pending_templates): Make static.
7074 (maybe_templates): Likewise.
7075 (instantiate_class_template): Adjust call to finish_struct_1.
7076 (instantiate_pending_templates): New function.
7077 * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
7078 * tree.c (static_aggregates_initp): Remove.
7079 (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
7080 instead.
7081 * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
7082
7083 * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
7084 with the RTL code RETURN.
7085 * hash.h: Regenerated.
7086 * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
7087 * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
7088 * parse.c: Regenerated.
7089 * pt.c: Include varray.h. Include rtl.h since varray.h requires
7090 it.
7091 (inline_parm_levels): New variable.
7092 (inline_parm_levels_used): Likewise.
7093 (maybe_begin_member_template_processing): Update them.
7094 (maybe_end_member_template_processing): Use them, rather than
7095 guessing how many levels to pop.
7096
7097 * decl.c (make_typename_type): Tighten error-checking.
7098
7099 1999-04-20 Mark Mitchell <mark@codesourcery.com>
7100
7101 * cp-tree.h (build_binary_op): Remove unneeded parameter.
7102 * class.c (build_vrable_entry_ref): Adjust call to
7103 build_binary_op.
7104 * decl.c (expand_static_init): Likewise.
7105 (grokdeclarator): Likewise.
7106 (finish_function): Likewise.
7107 * decl2.c (delete_sanity): Likewise.
7108 (do_dtors): Likewise.
7109 (do_ctors): Likewise.
7110 * error.c (dump_type_suffix): Likewise.
7111 * expr.c (cplus_expand_expr): Likewise.
7112 * init.c (resolve_offset_ref): Likewise.
7113 (build_new): Likewise.
7114 (build_new_1): Likewise.
7115 (build_vec_delete_1): Likewise.
7116 (expand_vec_init_catch_clause): Likewise.
7117 (build_delete): Likewise.
7118 * pt.c (tsubst): Likewise.
7119 * rtti.c (synthesize_tinfo_fn): Likewise.
7120 * search.c (expand_upcast_fixups): Likewise.
7121 (expand_direct_vtbls_init): Likewise.
7122 * typeck.c (get_member_function_from_ptrfunc): Likewise.
7123 (build_binary_op_nodefault): Likewise.
7124 (point_int_sum): Likewise.
7125 (pointer_diff): Likewise.
7126 (build_unary_op): Likewise.
7127 (build_modify_expr): Likewise.
7128 (get_delta_difference): Likewise.
7129 (build_ptrmemfunc): Likewise.
7130 (expand_ptrmemfunc_cst): Likewise.
7131
7132 1999-04-20 Jason Merrill <jason@yorick.cygnus.com>
7133
7134 * decl.c (grokfndecl): Always call cplus_decl_attributes.
7135 * decl2.c (grokfield): Pass attrlist to grokdeclarator.
7136
7137 1999-04-19 Mark Mitchell <mark@codesourcery.com>
7138
7139 * cp-tree.h (finish_static_data_member_decl): New function.
7140 * decl2.c (finish_static_data_member_decl): Split out from ...
7141 (grokfield): Here.
7142 * pt.c (instantiate_class_template): Use it here instead of
7143 trying to fake it.
7144 (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
7145 finish_static_data_member_decl will do that. Explicit set
7146 DECL_EXTERNAL to match non-template processing.
7147
7148 1999-04-18 Mark Mitchell <mark@codesourcery.com>
7149
7150 * cp-tree.h (finish_class_definition): Add parameter.
7151 * parse.y (structsp): Use it. Don't call pop_scope here.
7152 * parse.c: Regenerated.
7153 * semantics.c (finish_class_definition): Pop it here.
7154
7155 1999-04-17 Mark Mitchell <mark@codesourcery.com>
7156
7157 * decl.c (xref_tag): Revise handling of nested template
7158 declarations.
7159 * pt.c (check_explicit_specialization): Tweak handling of friend
7160 templates in template classes.
7161 (tsubst_friend_class): Handle friend declarations for nested
7162 member template classes.
7163
7164 1999-04-16 Mark Mitchell <mark@codesourcery.com>
7165
7166 * class.c (finish_struct): Remove unused variable.
7167 (pushclass): Likewise.
7168 (invalidate_class_lookup_cache): Likewise.
7169 * cp-tree.def (TYPENAME_TYPE): Improve documentation.
7170 * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
7171 doesn't get obliterated.
7172 (make_typename_type): Handle template classes correctly.
7173
7174 * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
7175 (storetags): Declare.
7176 * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
7177 (pushclass): Likewise. Use storetags to install tag declarations,
7178 not pushtag.
7179 (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
7180 * decl.c (storetags): Make it global.
7181 (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
7182 implicit typename declaration.
7183 (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG.
7184 * method.c (hack_identifier): Likewise.
7185 * search.c (lookup_member): Likewise.
7186
7187 * decl.c (warn_about_implicit_typename_lookup): New function.
7188 (lookup_name_real): Use it. Rework handling of implicit typename
7189 extension.
7190
7191 1999-04-15 Mark Mitchell <mark@codesourcery.com>
7192
7193 * cp-tree.h (lookup_nested_field): Remove.
7194 * class.c (push_nested_class): Handle UNION_TYPEs.
7195 (pop_nested_class): Likewise.
7196 * decl.c (lookup_name_real): Don't call lookup_nested_field.
7197 (start_decl): Use push_nested_class, not just pushclass.
7198 (cp_finish_decl): Use pop_nested_class, not just popclass.
7199 * search.c (lookup_nested_field): Remove.
7200
7201 * cp-tree.h (lang_type): Add documentation.
7202 * decl2.c (handle_class_head): Create template declarations here,
7203 as appropriate.
7204 * parse.y (class_head): Return whether or not we entered a new
7205 scope, as well as the type named.
7206 (named_class_head): Likewise.
7207 (named_complex_class_head_sans_basetype): Likewise.
7208 (structsp): Adjust accordingly. Pop scope when required.
7209 * parse.c: Regenerated.
7210 * pt.c (check_default_tmpl_args): Robustify.
7211 (redeclare_class_template): Likewise.
7212 (instantiate_class_template): An instantiation of an
7213 anonymous union is itself an anonymous union.
7214 * semantics.c (begin_class_definition): Don't create template
7215 declarations here.
7216
7217 1999-04-15 Jason Merrill <jason@yorick.cygnus.com>
7218
7219 * parse.y (after_type_declarator_intern): New nonterminal.
7220 (after_type_declarator): Use it.
7221 (direct_after_type_declarator): Likewise. Move above
7222 nonnested_type to fix reduce/reduce conflict resolution.
7223 (declmods): Reducing from just 'attributes' has EMPTY precedence.
7224 * Makefile.in (CONFLICTS): Update.
7225
7226 * decl.c (define_label): Downgrade error for jumping over a
7227 non-POD decl to pedwarn.
7228
7229 1999-04-14 Mark Mitchell <mark@codesourcery.com>
7230
7231 * cp-tree.h (popclass): Change declaration.
7232 (pop_nested_class): Likewise.
7233 (poplevel_class): Remove declaration.
7234 * call.c (convert_default_argument): Pass no arguments to
7235 popclass.
7236 * class.c (finish_struct_1): Likewise.
7237 (finish_struct): Likewise.
7238 (popclass): Remove argument. Simplify code accordingly.
7239 (pop_nested_class): Likewise.
7240 * decl.c (poplevel_class): Declare it here, and make it static.
7241 (poplevel): Handle class scopes.
7242 (poplevel_class): Don't take an rgument. Simplify.
7243 (pop_everything): Pass no arguments to pop_nested_class.
7244 (cp_finish_decl): Pass no arguments to popclass.
7245 (grokdeclarator): Pass no arguments to pop_nested_class.
7246 (finish_function): Likewise.
7247 * decl2.c (grokfield): Likewise.
7248 (pop_scope): Pass no arguments to popclass.
7249 * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
7250 * pt.c (instantiate_class_template): Move call to pushclass, and
7251 document. Pass no arguments to popclass.
7252 (regenerate_decl_from_template): Likewise.
7253
7254 1999-04-14 Jason Merrill <jason@yorick.cygnus.com>
7255
7256 * typeck.c (build_unary_op): Handle taking the address of a unique
7257 bound non-static member function.
7258
7259 1999-04-13 Martin von Loewis <loewis@informatik.hu-berlin.de>
7260
7261 * lang-options.h (-Wdeprecated): New flag.
7262 * decl2.c (warn_deprecated): New flag.
7263 (lang_decode_option): Deprecated this-is-variable,
7264 external-templates, alt-external-templates.
7265 Support -Wdeprecated.
7266 * errfn.c (cp_deprecated): New function.
7267
7268 1999-04-13 Jason Merrill <jason@yorick.cygnus.com>
7269
7270 * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
7271 of the decls themselves.
7272
7273 * pt.c (tsubst_function_type): Copy attributes over.
7274
7275 * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority
7276 and com_interface.
7277 * cp-tree.h: Add prototype.
7278 * decl.c (init_decl_processing): Set valid_lang_attribute.
7279
7280 1999-04-13 Mark Mitchell <mark@codesourcery.com>
7281
7282 * class.c (finish_struct_1): Look at the const-ness of the field's
7283 type, not the TREE_READONLY-ness of the declaration.
7284 * method.c (synthesize_method): Likewise.
7285 * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
7286 creating new declarations.
7287
7288 1999-04-13 Mike Stump <mrs@wrs.com>
7289
7290 * decl2.c (import_export_decl): Because vtables always reference
7291 virtual functions, even if they are inlined, don't allow
7292 -fno-implement-inlines to not emit them, instead, emit them with
7293 the vtable.
7294 * decl.c (start_function): Likewise.
7295
7296 1999-04-12 Jason Merrill <jason@yorick.cygnus.com>
7297
7298 * cp-tree.h (struct lang_type): Add com_interface.
7299 (CLASSTYPE_COM_INTERFACE): New macro.
7300 * class.c (set_rtti_entry): COM interface classes have no RTTI
7301 entries in their vtables; adjust.
7302 (add_virtual_function, finish_base_struct, skip_rtti_stuff,
7303 modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
7304 finish_struct_1): Likewise.
7305 * decl2.c (mark_vtable_entries): Likewise.
7306 * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
7307 * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
7308 expand_upcast_fixups): Likewise.
7309 * tree.c (debug_binfo): Likewise.
7310
7311 * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
7312 * typeck.c (comptypes): If we get it, ignore attributes.
7313 * class.c (instantiate_type): Use BASELINK_P. Change complain
7314 parameter to flags; 2 means ignore attributes.
7315 * call.c (build_op_delete_call): Pass it.
7316
7317 * decl.c (xref_tag): Only complain once about using a typedef-name
7318 with 'struct'. Downgrade to pedwarn.
7319
7320 * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
7321
7322 * parse.y (absdcl_intern): New nonterminal.
7323 (absdcl, direct_abstract_declarator): Use it.
7324
7325 * pt.c (lookup_template_class): Look through implict typename.
7326
7327 1999-04-11 Mark Mitchell <mark@codesourcery.com>
7328
7329 * friend.c (add_friend): Deal gracefully with error_mark_node.
7330 * method.c (build_overload_value): Handle pointers-to-members as
7331 template parameters.
7332
7333 * decl.c (push_binding): Fix typo in comment.
7334
7335 1999-04-10 Mark Mitchell <mark@codesourcery.com>
7336
7337 * error.c (dump_type_real): If a typename is a template-id, put
7338 out the template arguments.
7339 (dump_expr): Handle TEMPLATE_ID_EXPR.
7340 * pt.c (lookup_template_class): Now that full arguments are
7341 available everywhere, remove code that tried to guess them.
7342
7343 1999-04-09 Mark Mitchell <mark@codesourcery.com>
7344
7345 * decl.c (make_typename_type): Complain if we don't find a type
7346 when trying to make a typename type for a non-template type.
7347
7348 1999-04-09 Jason Merrill <jason@yorick.cygnus.com>
7349
7350 * decl.c (start_decl): Pass attributes to grokdeclarator.
7351 (grokdeclarator): Handle attributes on constructor-syntax
7352 initializers.
7353
7354 1999-04-08 Mark Mitchell <mark@codesourcery.com>
7355
7356 * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
7357 don't have types.
7358
7359 * search.c (template_self_reference_p): Tweak.
7360
7361 1999-04-07 Mark Mitchell <mark@codesourcery.com>
7362
7363 * init.c (build_offset_ref): Don't build yet another weird data
7364 structure to describe overloaded functions.
7365
7366 1999-04-06 Mark Mitchell <mark@codesourcery.com>
7367
7368 * cp-tree.h (BASELINK_P): New macro.
7369 (SET_BASELINK_P): Likewise.
7370 * init.c (build_member_call): Remove needless assignment in if
7371 statement.
7372 * search.c (lookup_field_r): Fix handling when we are looking
7373 specifically for a type; these are not hidden by functions and
7374 variables.
7375 (lookup_member): Use SET_BASELINK_P.
7376 * tree.c (is_overloaded_fn): Use BASELINK_P.
7377 (really_overloaed_fn): Likewise.
7378 (get_first_fn): Likewise.
7379
7380 1999-04-05 Mark Mitchell <mark@codesourcery.com>
7381
7382 * decl.c (lookup_name_current_level): Tweak, and improve
7383 documentation.
7384
7385 * class.c (maybe_fixup_vptrs): Remove declaration.
7386 (build_class_init_list): Likewise.
7387 * decl.c (pushdecl_class_level): Call check_template_shadow here
7388 ...
7389 (push_class_level_binding): ... not here.
7390 * search.c (dfs_push_type_decls): Only avoid
7391 template-self-reference TYPE_DECLs if they are from base classes.
7392
7393 1999-04-04 Mark Mitchell <mark@codesourcery.com>
7394
7395 * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
7396 nodes. Tidy.
7397
7398 1999-04-03 Jason Merrill <jason@yorick.cygnus.com>
7399
7400 * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
7401 (finish_struct_1): Don't call build_class_init_list.
7402
7403 1999-04-02 Mark Mitchell <mark@codesourcery.com>
7404
7405 * tinfo.h (__class_type_info): Fix illegal declaration.
7406
7407 * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
7408 * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
7409 (IDENTIFIER_CLASS_VALUE): Improve documentation.
7410 (is_properly_derived_from): Declare.
7411 (invalidate_class_lookup_cache): Likewise.
7412 (maybe_maybe_note_name_used_in_class): Likewise.
7413 (note_name_declared_in_class): Likewise.
7414 (push_using_decl): Remove duplicate declaration.
7415 (id_in_current_class): Remove declaration.
7416 (push_class_binding): Change prototype.
7417 (clear_identitifer_class_values): Declare.
7418 * call.c (is_properly_derived_from): Make it global.
7419 (build_new_function_call): Be careful about updating candidates.
7420 (build_new_method_call): Handle COMPONENT_REFs. Don't crash when
7421 asked to make illegal calls.
7422 * class.c: Include splay-tree.h.
7423 (class_stack_node): Add names_used slot.
7424 (check_member_decl_is_same_in_complete_scope): Remove.
7425 (add_method): Fix comment. Push the declaration into class
7426 scope.
7427 (finish_struct_1): When popping the class, pop the bindings too.
7428 Remove check for data member/function member conflict.
7429 (finish_struct): Remove calls to
7430 check_member_decl_is_same_in_complete_scope. Change calls to
7431 popclass.
7432 (pushclass): Clear names_used in the class stack entry.
7433 Use invalidate_class_lookup_cache to remove cached entries, rather
7434 than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE
7435 before entering a new class. Remove dead code. Don't mess with
7436 current_function_decl when pushing declarations.
7437 (invalidate_class_lookup_cache): New function, split out from ...
7438 (popclass): Here. Clean up names_used on our way out.
7439 (instantiate_type): Adjust.
7440 (build_self_reference): Don't push the declaration here.
7441 (maybe_note_name_used_in_class): New function.
7442 (note_name_declared_in_class): Likewise.
7443 * decl.c (add_binding): Change prototype.
7444 (find_class_binding_level): New function.
7445 (innermost_nonclass_level): Likewise.
7446 (current_binding_level): Update documentation.
7447 (inner_binding_level): Remove. Replace with current_binding_level
7448 throughout.
7449 (push_binding_level): Remove special handling of
7450 class_binding_level.
7451 (pop_binding_level): Likewise. Use find_class_binding_level.
7452 (suspend_binding_level): Likewise.
7453 (global_bindings_p): Use innermost_nonclass_level.
7454 (toplevel_bindings_p): Likewise.
7455 (namespace_bindings_p): Likewise.
7456 (pseudo_global_level_p): Likewise.
7457 (push_binding): Clear INHERITED_VALUE_BINDING_P.
7458 (add_binding): Check for illegal multiple declarations. Return a
7459 value indicating whether or not the new binding was legal.
7460 (push_local_binding): Skip over class binding levels. Check
7461 return value from add_binding.
7462 (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call
7463 note_name_declared_in_class.
7464 (pushlevel_class): Remove "fake out the rest of the compiler"
7465 code.
7466 (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
7467 (clear_identifier_class_values): New function.
7468 (pop_from_top_level): Use it.
7469 (pop_everything): Tweak.
7470 (maybe_process_template_type_declaration): Don't push the
7471 declaration for the template here.
7472 (pushtag): Don't push tag declarations into class scope here.
7473 (pushdecl): Apply DeMorgan's law for readability.
7474 (pushdecl_class_level): Remove special-case code for
7475 TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions.
7476 (push_class_level_bindng): Deal with inherited bindings.
7477 (lookup_name_real): Remove special-case code for
7478 TYPE_BEING_DEFINED, and some implicit typename magic.
7479 (grokdeclarator): Handle COMPONENT_REF for a template function.
7480 (build_enumerator): Don't call pushdecl_class_level here.
7481 (id_in_current_class): Remove.
7482 * decl2.c (grokfield): Don't call pushdecl_class_level or
7483 check_template_shadow.
7484 * errfn.c (cp_file_of): Don't declare.
7485 (cp_line_of): Likewise.
7486 * error.c (dump_decl): Handle an OVERLOAD.
7487 (cp_file_of): Likewise.
7488 (cp_line_of): Likewise.
7489 * init.c (build_member_call): Handle a COMPONENT_REF.
7490 * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
7491 pushdecl_class_level.
7492 * method.c (hack_identifier): Build COMPONENT_REFs for references
7493 to member templates as well as member functions. Remove dead
7494 code.
7495 * parse.y (left_curly): Remove.
7496 (nonnested_type): Call maybe_note_name_used_in_class, not
7497 pushdecl_class_level.
7498 * parse.c: Regenerated.
7499 (nested_name_specifier_1): Likewise.
7500 * pt.c (check_explicit_specialization): Adjust, for robustness.
7501 (check_template_shadow): Handle OVERLOADs.
7502 (build_template_decl): Set DECL_CONSTRUCTOR_P on the
7503 TEMPLATE_DECL, if appropriate.
7504 * search.c (envelope_add_decl): Remove.
7505 (dfs_pushdecls): Likewise.
7506 (dfs_compress_decls): Likewise.
7507 (dfs_push_decls): New function.
7508 (dfs_push_type_decls): Likewise.
7509 (setup_class_bindings): Likewise.
7510 (template_self_reference_p): Likewise.
7511 (lookup_field_r): Use it.
7512 (looup_member): Remove old comment. Deal with ambiguity.
7513 (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
7514 and remove envelope processing.
7515 * semantics.c (begin_class_definition): Let pushclass push
7516 declarations for base classes.
7517 (finish_member_declaration): Push declarations into class scope.
7518 * typeck.c (build_component_ref): Just put an OVERLOAD into the
7519 COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
7520 (build_x_function_call): Deal with OVERLOAD. Handle template-ids.
7521 * Makefile.in (class.o): Depend on splay-tree.h.
7522
7523 Wed Mar 31 11:30:43 1999 Nathan Sidwell <nathan@acm.org>
7524
7525 * cvt.c (convert_pointer_to_real): Use same_type_p.
7526 * typeck.c (comp_target_types): Use same_type_p.
7527
7528 1999-03-31 Jason Merrill <jason@yorick.cygnus.com>
7529
7530 * semantics.c (begin_inline_definitions,
7531 finish_inline_definitions): Rename from finish_default_args and
7532 begin_inline_definitions, respectively, to something that isn't a
7533 total lie. :)
7534 * parse.y (structsp): Adjust.
7535
7536 * tree.c (hash_tree_cons): Remove obsolete via_* parms.
7537 (list_hash_lookup): Likewise.
7538 (hash_tree_chain): Adjust.
7539 * pt.c (tsubst): Adjust.
7540 (tsubst_arg_types): Use plain hash_tree_cons.
7541 * cp-tree.h (hash_tree_cons_simple): Lose.
7542 * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
7543
7544 Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7545
7546 * Makefile.in (hash.h): Generate using gperf language 'C', not
7547 'KR-C', so gperf uses the `const' keyword on strings.
7548
7549 * gxx.gperf (resword): Const-ify a char*.
7550
7551 1999-03-30 Jason Merrill <jason@yorick.cygnus.com>
7552
7553 * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
7554 CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
7555 CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
7556 CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
7557 CLASSTYPE_BINFO_AS_LIST): Remove cruft.
7558 * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
7559 tree.c: Adjust.
7560
7561 1999-03-29 Jason Merrill <jason@yorick.cygnus.com>
7562
7563 * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
7564
7565 1999-03-28 Jason Merrill <jason@yorick.cygnus.com>
7566
7567 * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
7568
7569 1999-03-27 Mark Mitchell <mark@codesourcery.com>
7570
7571 * cp-tree.h (add_friend): Declare.
7572 (add_friends): Likewise.
7573 * friend.c (add_friend): Make it global. Don't add to
7574 DECL_BEFRIENDING_CLASSES if the befriending class is a template.
7575 (add_friends): Make it global.
7576 (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
7577 befriending class is a template.
7578 * parse.y (component_decl_1): Fix typo in comment.
7579 * parse.c: Regenerated.
7580 * pt.c (instantiate_class_template): Use add_friend and
7581 add_friends rather that duplicating some of their functionality
7582 here.
7583
7584 1999-03-27 Jason Merrill <jason@yorick.cygnus.com>
7585
7586 * call.c (build_field_call): Unify 'this' and non-'this' cases.
7587
7588 * typeck.c (build_indirect_ref): Check for 'this' sooner.
7589
7590 Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7591
7592 * call.c (op_error): Const-ify a char*.
7593 (add_candidate, source_type, add_warning): Add static prototype.
7594 (print_z_candidates): Const-ify a char*.
7595
7596 * class.c (resolve_address_of_overloaded_function,
7597 fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
7598 (get_vtable_name, finish_struct_1): Const-ify a char*.
7599
7600 * cvt.c (convert_to_reference): Likewise.
7601
7602 * decl.c (redeclaration_error_message, record_builtin_type,
7603 record_unknown_type, member_function_or_else, bad_specifiers):
7604 Likewise.
7605 (find_binding, select_decl, unqualified_namespace_lookup,
7606 lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
7607 Add static prototype.
7608 (warn_extern_redeclared_static, duplicate_decls, pushdecl,
7609 implicitly_declare, record_builtin_java_type, define_function,
7610 grok_op_properties, tag_name): Const-ify a char*.
7611
7612 * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
7613 (define_function, finish_builtin_type): Const-ify a char*.
7614 (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
7615 cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
7616 (file_name_nondirectory): Const-ify a char*.
7617 (init_filename_times): Don't prototype.
7618 (compiler_error): Prototype.
7619 (yyerror, init_repo): Const-ify a char*.
7620 (build_srcloc): Don't prototype.
7621 (build_x_indirect_ref, build_indirect_ref, build_component_addr):
7622 Const-ify a char*.
7623 (warn_for_assignment): Don't prototype.
7624 (convert_for_initialization, readonly_error, check_for_new_type,
7625 GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
7626 Const-ify a char*.
7627
7628 * decl2.c (acceptable_java_type, output_vtable_inherit,
7629 setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
7630 merge_functions, decl_namespace, validate_nonmember_using_decl,
7631 do_nonmember_using_decl): Add static prototype.
7632 (lang_f_options): Const-ify a char*.
7633 (finish_builtin_type): Likewise.
7634 (add_function, arg_assoc_namespace, arg_assoc_class): Add static
7635 prototype.
7636
7637 * errfn.c: Include cp-tree.h.
7638 (cp_thing): Add static prototype.
7639 (compiler_error): Don't protoptype.
7640 (cp_compiler_error): Cast `compiler_error' to `errorfn' before
7641 passing it to `cp_thing'.
7642
7643 * error.c (interesting_scope_p): Add static prototype.
7644
7645 * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
7646 a char*.
7647
7648 * init.c (compiler_error): Don't prototype.
7649 (member_init_ok_or_else): Const-ify a char*.
7650 (build_java_class_ref): Add static prototype.
7651
7652 * lex.c (compiler_error): Don't prototype.
7653 (get_time_identifier, interface_strcmp, extend_token_buffer,
7654 handle_cp_pragma): Const-ify a char*.
7655 (is_global, init_filename_times): Add static prototype.
7656 (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
7657 (compiler_error): Change from fixed args to variable args.
7658 (yyerror): Const-ify a char*.
7659
7660 * parse.y (cond_stmt_keyword): Const-ify a char*.
7661 (parse_decl): Add static prototype.
7662
7663 * pt.c (template_args_equal, print_template_context): Likewise.
7664 (print_candidates, check_default_tmpl_args): Const-ify a char*.
7665 (instantiate_class_template): Likewise.
7666
7667 * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
7668
7669 * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
7670 expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
7671
7672 * search.c (lookup_field_info, lookup_member): Likewise.
7673 (lookup_member): Cast the first argument of `bzero' to a PTR.
7674
7675 * sig.c (compiler_error): Don't prototype.
7676 (build_signature_pointer_or_reference_nam): Const-ify a char*.
7677 (get_sigtable_name, build_member_function_pointer): Likewise.
7678
7679 * tree.c (compiler_error): Don't prototype.
7680 (no_linkage_helper, build_srcloc): Add static prototype.
7681 (build_vbase_pointer_fields): Const-ify a char*.
7682 (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
7683
7684 * typeck.c (compiler_error): Don't prototype.
7685 (convert_for_assignment): Const-ify a char*.
7686 (comp_cv_target_types): Add static prototype.
7687 (build_x_indirect_ref, build_indirect_ref, convert_arguments,
7688 build_component_addr, build_unary_op, convert_for_initialization):
7689 Const-ify a char*.
7690
7691 * typeck2.c (ack): Add static prototype and change from fixed args
7692 to variable args.
7693 (readonly_error, check_for_new_type): Const-ify a char*.
7694
7695 * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
7696 fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
7697 (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'.
7698 (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
7699 gen_assign, GNU_xref_member): Const-ify a char*.
7700
7701 1999-03-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
7702
7703 * gxxint.texi: Remove old discussion on copying virtual bases.
7704
7705 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
7706
7707 * Make-lang.in: Remove all references to g++.o/g++.c.
7708 Link g++ from gcc.o.
7709
7710 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
7711
7712 * decl2.c (comdat_linkage): Treat vtables like functions.
7713
7714 1999-03-25 Mark Mitchell <mark@codesourcery.com>
7715
7716 * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
7717
7718 1999-03-25 Nathan Sidwell <nathan@acm.org>
7719
7720 * decl.c (init_decl_processing): Add `signed' type as a synonym
7721 for `int'.
7722
7723 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
7724
7725 * typeck.c (common_type): Handle cv-qual unification for pointers
7726 to members.
7727
7728 * decl.c (unqualified_namespace_lookup): Return error_mark_node
7729 on error.
7730 (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
7731 * lex.c (do_identifier): If we got error_mark_node, call
7732 lookup_name again.
7733
7734 1999-03-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
7735
7736 * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
7737 classes.
7738
7739 1999-03-24 Jason Merrill <jason@yorick.cygnus.com>
7740
7741 * decl.c (lookup_name_real): Do nested field lookup regardless of
7742 TYPE_BEING_DEFINED.
7743
7744 1999-03-24 Mark Mitchell <mark@codesourcery.com>
7745
7746 * cp-tree.h (lang_type): Remove has_assignment and
7747 has_real_assignment. Add befriending_classes.
7748 (TYPE_HAS_ASSIGNMENT): Remove.
7749 (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
7750 (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
7751 (lang_decl): Document.
7752 (DECL_BEFRIENDING_CLASSES): New macro.
7753 (FRIEND_NAME): Move declaration to more obvious location.
7754 (FRIEND_DECLS): Likewise.
7755 * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
7756 * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
7757 (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
7758 (grok_op_properties): Likewise.
7759 * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
7760 (add_friend): Likewise. Don't do weird things with assignment
7761 operators. Update DECL_BEFRIENDING_CLASSES.
7762 (add_friends): Don't do weird things with assignment operators.
7763 (make_friend_class): Likewise. Update
7764 CLASSTYPE_BEFRIENDING_CLASSES.
7765 * pt.c (instantiate_class_template): Don't set
7766 TYPE_HAS_ASSIGNMENT.
7767 (tsubst_copy): Substitute the TREE_TYPE for more unary
7768 expressions.
7769 * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
7770 * search.c (protected_accessible_p): New function.
7771 (friend_accessible_p): Likewise.
7772 (accessible_p): Use them.
7773
7774 1999-03-23 Mark Mitchell <mark@codesourcery.com>
7775
7776 * pt.c (convert_nontype_argument): Don't create things that aren't
7777 PTRMEM_CSTs when applying a qualification conversion to a
7778 PTRMEM_CST.
7779
7780 1999-03-23 Mark Mitchell <mark@codesourcery.com>
7781
7782 * Makefile.in (OBJS): Don't mention hash.o.
7783 (OBJDEPS): Likewise.
7784
7785 1999-03-23 Jason Merrill <jason@yorick.cygnus.com>
7786
7787 * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
7788 * decl.c (expand_static_init): Make sure we don't add any after
7789 then.
7790
7791 * decl.c (cp_finish_decl): Move intelligence about handling
7792 DECL_COMDAT for variables from here...
7793 * decl2.c (comdat_linkage): ...to here.
7794 (maybe_make_one_only): Tweak.
7795 (import_export_decl): Call comdat_linkage for variables, too.
7796 (finish_file): Handle template statics properly.
7797
7798 1999-03-22 Mark Mitchell <mark@codesourcery.com>
7799
7800 * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
7801 Document internals of pointer-to-member-functions.
7802 (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
7803 (PFN_FROM_PTRMEMFUNC): Likewise.
7804 (build_type_conversion): Remove unused parameter.
7805 (build_ptrmemfunc1): Declare.
7806 (expand_ptrmemfunc_cst): New function.
7807 (delta2_from_ptrmemfunc): Likewise.
7808 (pfn_from_ptrmemfunc): Likewise.
7809 * cvt.c (cp_convert_to_pointer): Remove unused parameter to
7810 build_type_conversion. Use TYPE_PTRMEM_P for readability.
7811 (convert_to_reference): Remove unused parameter to
7812 build_type_conversion.
7813 (ocp_convert): Likewise.
7814 (build_user_type_conversion): Likewise.
7815 * error.c (dump_expr): Handle NULL pointer-to-member functions.
7816 * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
7817 * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
7818 open when handling pointer-to-member functions.
7819 * pt.c (convert_nontype_argument): Clean up error messages. Be
7820 more stringent with pointers-to-members.
7821 * typeck.c (build_ptrmemfunc1): Don't declare. Make it global.
7822 (build_unary_op): Tidy ever-so-slightly.
7823 (build_conditional_expr): Remove extra parameter to
7824 build_type_conversion.
7825 (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
7826 we're using.
7827 (expand_ptrmemfunc_cst): Define.
7828 (delta2_from_ptrmemfunc): Likewise.
7829 (pfn_from_ptrmemfunc): Likewise.
7830
7831 1999-03-19 Mark Mitchell <mark@codesourcery.com>
7832
7833 * init.c (build_member_call): Handle template-id expressions
7834 correctly.
7835 * typeck.c (build_x_function_call): Likewise.
7836
7837 1999-03-19 Chip Salzenberg <chip@perlsupport.com>
7838
7839 * friend.c (make_friend_class): Avoid core dump when
7840 not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
7841
7842 1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
7843
7844 * decl.c (start_function): Suppress normal linkage heuristics
7845 for #pragma interface under MULTIPLE_SYMBOL_SPACES.
7846
7847 1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br>
7848
7849 * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
7850 ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
7851
7852 1999-03-17 Martin von Löwis <loewis@informatik.hu-berlin.de>
7853
7854 * parse.y (named_complex_class_head_sans_basetype):
7855 Do not push a scope for error_mark_node.
7856 (maybe_base_class_list): Likewise.
7857
7858 * decl.c (start_decl): Check for error_mark_node as a type.
7859 Detected by g++.brendan/array-refs.C.
7860 (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C.
7861 (maybe_build_cleanup_1): Likewise. Detected by
7862 g++.jason/incomplete1.C.
7863
7864 * tree.c (build_dummy_object): Use void_zero_node instead of the
7865 error_mark_node.
7866 (is_dummy_object): Check for such a node.
7867 Detected by g++.bob/inherit1.C
7868
7869 1999-03-16 Jason Merrill <jason@yorick.cygnus.com>
7870
7871 * method.c (old_backref_index): Split out...
7872 (flush_repeats): From here. Rename back from try_old_backref.
7873 (build_mangled_name): Put back some old-style repeat handling.
7874
7875 Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7876
7877 * lex.c: Don't include setjmp.h.
7878 (parse_float): New static function.
7879 (pf_args): New struct.
7880 (real_yylex): Use them in call to `do_float_handler'.
7881
7882 1999-03-15 Mark Mitchell <mark@markmitchell.com>
7883
7884 * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
7885 * tree.c (layout_basetypes): Not here.
7886 * search.c (dfs_search): Remove; no longer used.
7887
7888 1999-03-12 Mark Mitchell <mark@markmitchell.com>
7889
7890 * decl2.c (validate_nonmember_using_decl): Issue sensible
7891 error-messages on bogus qualifiers.
7892
7893 1999-03-14 Jason Merrill <jason@yorick.cygnus.com>
7894
7895 * call.c (add_function_candidate): Fix uninitialized variable.
7896
7897 * Makefile.in (search.o): Add dependency on varray.h.
7898
7899 1999-03-13 Jason Merrill <jason@yorick.cygnus.com>
7900
7901 * decl.c (duplicate_decls): Use same_type_p.
7902 * method.c (try_old_backref): Renamed from flush_repeats. Use
7903 same_type_p. Don't try to handle repeats. Return success.
7904 (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support
7905 calls from old-style code, too.
7906 (check_ktype): Use same_type_p.
7907 (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT.
7908 (build_qualified_name): Simplify logic.
7909 (process_overload_item): Strip typedefs and quals at the top.
7910 (build_mangled_name_for_type_with_Gcode): Remove call to
7911 type_canonical_variant.
7912 (build_mangled_name): Likewise. Remove support for old-style
7913 repeats, which have been disabled since 2.7.2. Don't mess with
7914 TREE_USED.
7915 (build_decl_overload_real): Don't mess with TREE_USED.
7916
7917 1999-03-13 Nathan Sidwell <nathan@acm.org>
7918
7919 * error.c (cp_printers): Add 'F' escape character.
7920 (dump_type_real): Remove TREE_LIST (fnargs) printing.
7921 Functionality moved to dump_parameters.
7922 (dump_type_suffix): Use dump_parameters and dump_exception_spec.
7923 (dump_function_decl): Extend meaning of V parameter. Use
7924 dump_parameters and dump_exception_spec.
7925 (dump_parameters): New static function.
7926 (dump_exception_spec): New static function.
7927 (fndecl_as_string): Change argument semantics. Use
7928 dump_function_decl directly.
7929
7930 * sig.c (build_signature_table_constructor): Use cp_error.
7931
7932 1999-03-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
7933
7934 * semantics.c (finish_switch_cond): Handle error cases gracefully.
7935 Detected by g++.law/enum5.C.
7936
7937 * typeck.c (build_modify_expr): Check for errors after resolving
7938 offsets. Detected by g++.brendan/static1.C.
7939
7940 * decl.c (complete_array_type): Ignore initial_value if it is an
7941 error. Detected by g++.benjamin/17930.C.
7942
7943 * typeck2.c (process_init_constructor): Return error if one argument
7944 is in error. Detected by g++.benjamin/13478.C.
7945
7946 1999-03-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
7947
7948 * decl.c (select_decl): Allow class templates when we need types.
7949 * decl2.c (ambiguous_decl): Likewise.
7950
7951 1999-03-12 Mark Mitchell <mark@markmitchell.com>
7952
7953 * lex.c (do_identifier): Correct call to enforce_access.
7954 * search.c (accessible_p): Tweak comment.
7955
7956 1999-03-10 Mark Mitchell <mark@markmitchell.com>
7957
7958 * semantics.c (begin_class_definition): Call build_self_reference.
7959 (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
7960
7961 * search.c (assert_canonical_unmarked): Fix typo in prototype.
7962
7963 * search.c (dfs_canonical_queue): New function.
7964 (dfs_assert_unmarked_p): Likewise.
7965 (assert_canonical_unmarked): Likewise.
7966 (access_in_type): Use it.
7967 (accessible_p): Likewise. Walk the whole tree when umarking.
7968
7969 * sig.c (build_signature_table_constructor): Use accessible_p
7970 instead of compute_access.
7971
7972 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
7973
7974 * call.c (add_builtin_candidates): Handle overloaded conversion ops.
7975
7976 1999-03-09 Mark Mitchell <mark@markmitchell.com>
7977
7978 * cp-tree.h (flag_access_control): Declare.
7979 (TREE_VIA_PPUBLIC): Document.
7980 (DECL_NONSTATIC_MEMBER_P): New macro.
7981 (enforce_access): Return an indication of whether or not access
7982 was permitted.
7983 (build_self_reference): Change prototype.
7984 (compute_access): Replace with ...
7985 (accessible_p): New function.
7986 (dfs_walk): Change prototype.
7987 (dfs_unmark): Likewise.
7988 (markedp): Likewise.
7989 * call.c (enforce_access): Use accessible_p.
7990 * class.c (build_self_reference): Insert the declaration into the
7991 list of members for this type, and make it public.
7992 * decl.c (xref_basetypes): Avoid ill-timed recursion.
7993 * init.c (build_offset_ref): Use lookup_member, not three separate
7994 name-lookups. Call enforce_access rather than checking for
7995 illegal accesses here.
7996 (resolve_offset_ref): Likewise.
7997 * lex.c (do_identifier): Likewise.
7998 * method.c (hack_identifier): Likewise.
7999 * parse.y (self_reference): Remove.
8000 (opt_component_decl_list): Don't use it.
8001 * parse.c: Regenerated.
8002 * pt.c (print_candidates): Generalize to handle lists of
8003 overloaded functions.
8004 (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
8005 not set.
8006 (get_template_base): Use new calling convention for dfs_walk.
8007 * search.c: Include varray.h. Add prototypes.
8008 (dfs_walk): Accept a data pointer to pass to the work functions.
8009 All callers changed. All work functions changed.
8010 (breadth_first_search): Rename to bfs_walk, and make consistent
8011 with dfs_walk.
8012 (dfs_walk_real): New function.
8013 (canonical_binfo): New function.
8014 (context_for_name_lookup): Likewise.
8015 (shared_marked_p): Likewise.
8016 (shared_unmarked_p): Likewise.
8017 (lokup_field_queue_p): Likewise.
8018 (lookup_field_r): Generalize to handle both functions and fields.
8019 (lookup_field): Just call lookup_member.
8020 (lookup_fnfields): Likewise.
8021 (lookup_member): Move body of lookup_field here and generalize.
8022 (dfs_accessible_queue_p): Likewise.
8023 (dfs_accessible_p): Likewise.
8024 (dfs_access_in_type): Likewise.
8025 (access_in_type): Likewise.
8026 (compute_access): Remove, and replace with ...
8027 (accessible_p): New function.
8028 (vbase_types): Remove.
8029 (vbase_decl_ptr_intermediate): Likewise.
8030 (vbase_decl_ptr): Likewise.
8031 (vbase_init_result): Likewise.
8032 (closed_envelopes): Likewise.
8033 (bvtable): Likewise.
8034
8035 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
8036
8037 * call.c (add_function_candidate): Check for proper number of args
8038 before checking the validity of those args.
8039
8040 1999-03-06 Jason Merrill <jason@yorick.cygnus.com>
8041
8042 * cp-tree.h (struct lang_type): Add anon_union field.
8043 (ANON_UNION_TYPE_P): Use it instead of examining type.
8044 (SET_ANON_UNION_TYPE_P): New macro.
8045 * decl.c (check_tag_decl): Use it.
8046
8047 * search.c (compute_access): Handle non-type contexts earlier, and
8048 handle NULL_TREE.
8049
8050 * tree.c (build_exception_variant): Use copy_to_permanent.
8051
8052 * decl2.c (setup_initp): Give statics with no priority the default
8053 priority here.
8054 (do_dtors, do_ctors, finish_file): Remove special handling of
8055 non-prioritized statics.
8056
8057 1999-03-05 Mark Mitchell <mark@markmitchell.com>
8058
8059 * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
8060 * decl.c (make_typename_type): Don't issue an error if an
8061 immediate lookup fails; it migt be resolved later.
8062 * friend.c (is_friend): Add comment.
8063 * search.c (breadth_first_search): Add POSTFN and DATA
8064 parameters. Tidy. All callers changed.
8065 (lookup_field_queue_p): New function.
8066 (lookup_field_r): Likewise.
8067 (lookup_field_post): Likewise.
8068 (lookup_field): Use them, via breadth_first_search, instead of
8069 duplicating logic.
8070 (compute_access): Robustify.
8071 (lookup_fnfield_info): New structure.
8072
8073 1999-03-05 Jason Merrill <jason@yorick.cygnus.com>
8074
8075 * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
8076
8077 1999-03-03 Jason Merrill <jason@yorick.cygnus.com>
8078
8079 * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
8080 cc happy.
8081
8082 * decl2.c (import_export_class): Also return if
8083 CLASSTYPE_INTERFACE_ONLY is set.
8084
8085 1999-03-03 Martin von Löwis <loewis@informatik.hu-berlin.de>
8086
8087 * decl.c (push_overloaded_decl): Only overwrite the old binding if
8088 there was one.
8089 * decl2.c (do_local_using_decl): Fix loop termination.
8090
8091 1999-03-02 Mark Mitchell <mark@markmitchell.com>
8092
8093 * cp-tree.h (determine_specialization): Don't declare.
8094 * pt.c (determine_specialization): Make it static. Eliminate
8095 complain parameter. Note that decl is always non-NULL now, and
8096 simplify accordingly.
8097
8098 * decl.c (maybe_push_to_top_level): Always call
8099 push_cp_function_context.
8100 (pop_from_top_level): Always call pop_cp_function_context.
8101
8102 1999-02-26 Nathan Sidwell <nathan@acm.org>
8103
8104 * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
8105 diagnostics.
8106 * cp-tree.h (complete_type_or_else): Added VALUE parameter.
8107 * init.c (build_new_1): Extra arg to complete_type_or_else.
8108 (build_delete): Likewise.
8109 * typeck.c (require_complete_type): Likewise.
8110 (pointer_int_sum): Likewise.
8111 (pointer_diff): Likewise.
8112 (build_component_ref): Likewise.
8113
8114 * typeck2.c (incomplete_type_error): Always use cp_error.
8115 Show declaration of undefined type, if appropriate.
8116 Deal with UNKNOWN_TYPE nodes.
8117
8118 * typeck.c (require_complete_type): Use TYPE_SIZE as
8119 size_zero_node to mean incomplete type.
8120 (require_complete_type_in_void): New function.
8121 (build_compound_expr): Call complete_type_in_void for LHS.
8122 (build_c_cast): Call complete_type_in_void for void cast.
8123 * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
8124 * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
8125 require_complete_type_in_void. Call it.
8126 * cp-tree.h (require_complete_type_in_void): Prototype new function.
8127
8128 * typeck.c (convert_arguments): Use alternative format for
8129 function decls. Don't require_complete_type here. Simplify
8130 diagnostic printing.
8131 (convert_for_initialization): Don't require_complete_type on RHS yet.
8132 * call.c (convert_arg_to_ellipsis): Call require_complete_type.
8133
8134 * call.c (build_over_call): Cope with qualified void return type.
8135 * semantics.c (finish_call_expr): Likewise.
8136 * typeck.c (build_function_call_real): Likewise.
8137 (c_expand_return): Likewise.
8138 * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
8139
8140 * call.c (print_z_candidates): Use alternate print format, to be
8141 consistent with (pt.c) print_candidates.
8142 * method.c (hack_identifier): List candidate members.
8143 * search.c (lookup_field): Build ambiguous list, and show it, if
8144 ambiguous.
8145
8146 1999-02-26 Mark Mitchell <mark@markmitchell.com>
8147
8148 * typeck.c (decay_conversion): Don't confuse constant array
8149 variables with their initializers.
8150
8151 * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
8152 merging decls.
8153 * pt.c (regenerate_decl_from_template): Tweak for clarity.
8154 (instantiate_decl): Mark a decl instantiated before regenerating
8155 it to avoid recursion.
8156 * tree.c (mapcar): Don't call decl_constant_value unless we know
8157 something is TREE_READONLY_DECL_P.
8158
8159 * class.c (check_for_override): Don't stop checking when we find
8160 the first overridden function. Delete #if 0'd code.
8161 * search.c (get_matching_virtual): Likewise.
8162
8163 1999-02-25 Richard Henderson <rth@cygnus.com>
8164
8165 * lang-specs.h: Define __FAST_MATH__ when appropriate.
8166
8167 1999-02-24 Mike Stump <mrs@wrs.com>
8168
8169 * typeck.c (convert_for_assignment): Allow boolean integral constant
8170 expressions to convert to null pointer.
8171
8172 1999-02-24 Martin von Loewis <loewis@informatik.hu-berlin.de>
8173
8174 * decl.c (lookup_namespace_name): Resolve namespace aliases.
8175
8176 * class.c (push_nested_class): Allow namespaces.
8177
8178 * decl2.c (set_decl_namespace): Add friendp parameter.
8179 * decl.c (grokfndecl): Pass it.
8180 (grokvardecl): Likewise.
8181 * cp-tree.h: Change declaration.
8182
8183 1999-02-24 Jason Merrill <jason@yorick.cygnus.com>
8184
8185 * pt.c (tsubst): Allow an array of explicit size zero.
8186
8187 1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
8188
8189 * errfn.c: Change varargs code to look like toplev.c.
8190
8191 * method.c (process_modifiers): Don't prepend 'U' for char or
8192 wchar_t.
8193
8194 1999-02-20 Craig Burley <craig@jcb-sc.com>
8195
8196 * Make-lang.in (cplib2.ready): Don't consider updating
8197 cplib2 stuff if the current directory isn't writable, as
8198 it won't work (such as during a `make install').
8199
8200 Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
8201
8202 * decl2.c (start_objects): Make file scope constructors and
8203 destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
8204 ASM_OUTPUT_DESTRUCTOR are defined.
8205
8206 1999-02-19 Mark Mitchell <mark@markmitchell.com>
8207
8208 * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
8209 (fn_type_unification): Adjust prototype.
8210 (lookup_fnfields_1): Declare.
8211 * call.c (add_template_candidate_real): Adjust call to
8212 fn_type_unification.
8213 * class.c (add_method): Don't allow duplicate declarations of
8214 constructors or destructors.
8215 (resolve_address_of_overloaded_function): Remove unused variable.
8216 Adjust call to fn_type_unification.
8217 * decl.c (grokfndecl): Be more robust in the face of illegal
8218 specializations.
8219 * decl2.c (check_classfn): Remove hokey handling of member
8220 templates.
8221 * pt.c (determine_specialization): Improve comments. Adjust to
8222 handle template argument deduction as per the standard.
8223 (check_explicit_specialization): Fix comment spacing. Handle
8224 type-conversion operators correctly. Improve error-recovery.
8225 (fn_type_unification): Remove EXTRA_FN_ARG parameter.
8226 (get_bindings_real): Simplify handling of static members.
8227 * search.c (lookup_fnfields_1): Make it have external linkage.
8228 * typeck.c (compparms): Fix comment.
8229 (build_unary_op): Don't try to figure out which template
8230 specialization is being referred to when when the address-of
8231 operator is used with a template function.
8232
8233 Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8234
8235 * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
8236 keyword to match an analogous change at the top level.
8237
8238 * tree.c (lvalue_or_else): Likewise.
8239
8240 1999-02-17 Mark Mitchell <mark@markmitchell.com>
8241
8242 * decl.c (xref_basetypes): Comment.
8243 * pt.c (instantiate_class_template): Use xref_basetypes.
8244
8245 1999-02-16 Mark Mitchell <mark@markmitchell.com>
8246
8247 * cp-tree.h (tsubst): Change prototype.
8248 (tsubst_expr): Likewise.
8249 (tsubst_copy): Likewise.
8250 (type_unification): Remove prototype.
8251 * call.c (convert_default_arg): Adjust call to tsubst_expr.
8252 * class.c (resolve_address_of_overloaded_function): Just use
8253 fn_type_unification.
8254 * decl.c (grokdeclarator): Adjust call to tsubst.
8255 * method.c (build_template_parm_names): Likewise.
8256 * pt.c (GTB_VIA_VIRTUAL): New macro.
8257 (GTB_IGNORE_TYPE): Likewise.
8258 (resolve_overloaded_unification): Add `complain' parameter.
8259 (try_one_overload): Likewise.
8260 (tsubst_template_arg_vector): Likewise.
8261 (tsubst_template_parms): Likewise.
8262 (tsubst_aggr_type): Likewise.
8263 (tsubst_arg_types): Likewise.
8264 (tsubst_call_declarator_parms): Likewise.
8265 (unify): Remove explicit_mask.
8266 (type_unification_real): Likewise.
8267 (get_template_base_recursive): Likewise.
8268 (coerce_template_template_parms): Provide prototype.
8269 (tsubst_function_type): Likewise.
8270 (try_class_unification): New function.
8271 All callers changed to use new complain parameter.
8272 (get_template_base): Use try_class_unification.
8273 (unify): Adjust handling of classes derived from template types.
8274 (fn_type_unification): Substitute explicit arguments before
8275 unification.
8276
8277 1999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
8278
8279 * decl.c (pushdecl): Remove dead code.
8280
8281 1999-02-16 Jason Merrill <jason@yorick.cygnus.com>
8282
8283 * decl2.c (finish_objects): Fix code I missed in previous change.
8284
8285 1999-02-13 Jason Merrill <jason@yorick.cygnus.com>
8286
8287 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
8288 (grokdeclarator): Don't expect error_mark_node from grokfndecl.
8289
8290 * pt.c (maybe_process_partial_specialization): Complain about
8291 'template <>' on non-specialization.
8292
8293 1999-02-10 Jason Merrill <jason@yorick.cygnus.com>
8294
8295 * decl.c (grokdeclarator): Catch wierd declarators.
8296 * decl2.c (finish_file): Don't abort because of namespace parsing
8297 failure.
8298 (check_decl_namespace): Remove.
8299
8300 1999-02-09 Mark Mitchell <mark@markmitchell.com>
8301
8302 * cp-tree.h (get_template_base): Don't declare.
8303 (dfs_walk): Declare.
8304 (dfs_unmark): Likewise.
8305 (markedp): Likewise.
8306 * pt.c (unify): Remove duplicate declaration. Pass tparms and
8307 targs to get_template_base.
8308 (get_template_base_recursive): Move here from search.c. Check to
8309 see that the base found can be instantiated to form the desired
8310 type.
8311 (get_template_base): Likewise.
8312 (get_class_bindings): Simplify.
8313 * search.c (get_template_base_recursive): Move to pt.c.
8314 (get_template_base): Likewise.
8315 (markedp): Make it global.
8316 (dfs_walk): Likewise.
8317 (dfs_unmark): Likewise.
8318
8319 1999-02-07 Jason Merrill <jason@yorick.cygnus.com>
8320
8321 * pt.c (maybe_process_partial_specialization): Complain about
8322 specialization in wrong namespace.
8323 * tree.c (decl_namespace_context): New fn.
8324
8325 1999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
8326
8327 * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
8328 * pt.c (coerce_template_template_parms): Handle nested
8329 template template parameters.
8330
8331 Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com)
8332
8333 * typeck2.c: Update email addresses.
8334
8335 1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
8336
8337 * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
8338 turned off.
8339
8340 1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
8341
8342 * lex.c (retrofit_lang_decl): Split out...
8343 (build_lang_decl): From here.
8344 * decl.c (pushdecl): Call it for functions generated by the middle
8345 end that don't have DECL_LANG_SPECIFIC.
8346 * cp-tree.h: Declare it.
8347
8348 * decl2.c: Remove flag_init_priority. Always enable initp stuff.
8349 (start_objects, finish_objects): Only use special
8350 init_priority code if the user specified a priority.
8351 (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
8352 objects.
8353
8354 Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
8355
8356 * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
8357 mkstemp.o. Get them from libiberty now.
8358 (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
8359
8360 Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
8361
8362 * decl2.c (lang_decode_option): Use read_integral_parameter.
8363
8364 1999-02-01 Mark Mitchell <mark@markmitchell.com>
8365
8366 * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
8367 before calling complete_type_or_else.
8368
8369 Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8370
8371 * input.c (inline): Don't define, its handled by system.h.
8372
8373 Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
8374
8375 * decl2.c: Don't define flag_no_ident here. Don't process
8376 -f(no-)ident here.
8377 * cp-tree.h: Don't declare flag_no_ident here.
8378 * lang-specs.h: Map -Qn to -fno-ident.
8379
8380 1999-01-28 Jason Merrill <jason@yorick.cygnus.com>
8381
8382 * cp-tree.h (struct tree_binding): Replace scope field with a union.
8383 (BINDING_SCOPE): Adjust.
8384 * decl.c (BINDING_LEVEL): Adjust.
8385
8386 1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
8387
8388 * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
8389 member constants.
8390
8391 * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
8392 a ctor initializer.
8393
8394 * tree.c (equal_functions): Fix name in prototype.
8395
8396 * decl.c (push_local_binding): Add FLAGS argument.
8397 (pushdecl, push_overloaded_decl): Pass it.
8398 * decl2.c (do_local_using_decl): Likewise.
8399 * cp-tree.h: Adjust prototype.
8400 * decl.c (poplevel): Fix logic.
8401
8402 * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
8403 (poplevel): Handle that. Fix logic for removing TREE_LISTs.
8404 (cat_namespace_levels): Don't loop forever.
8405
8406 1999-01-25 Richard Henderson <rth@cygnus.com>
8407
8408 * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
8409
8410 1999-01-25 Jason Merrill <jason@yorick.cygnus.com>
8411
8412 * class.c (resolve_address_of_overloaded_function): Mark the
8413 chosen function used.
8414
8415 * call.c (build_call): Make sure that a function coming in has
8416 been marked used already.
8417 * decl.c (expand_static_init): Call mark_used instead of
8418 assemble_external.
8419 * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
8420 alloc_eh_object, expand_throw): Likewise.
8421 * init.c (build_builtin_delete_call): Likewise.
8422 * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
8423 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
8424 expand_generic_desc): Likewise.
8425
8426 1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
8427
8428 * tree.c (equal_functions): New function.
8429 (ovl_member): Call it.
8430
8431 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
8432
8433 * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
8434
8435 1999-01-25 Martin von Loewis <loewis@informatik.hu-berlin.de>
8436
8437 * decl.c (decls_match): Return 1 if old and new are identical.
8438 (push_overloaded_decl): Set OVL_USED when PUSH_USING.
8439
8440 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
8441
8442 * decl.c (start_function): Make member functions one_only on windows.
8443 * decl2.c (import_export_decl): Likewise.
8444
8445 * decl.c (grokdeclarator): Don't complain about implicit int in
8446 a system header. Change same-name field check to not complain in
8447 a system header instead of within extern "C".
8448
8449 1999-01-21 Mark Mitchell <mark@markmitchell.com>
8450
8451 * cp-tree.h (PUSH_GLOBAL): New macro.
8452 (PUSH_LOCAL): Likewise.
8453 (PUSH_USING): Likewise.
8454 (namespace_bindings_p): Declare.
8455 (push_overloaded_decl): Likewise.
8456 * decl.c (push_overloaded_decl): Don't make it static. Check for
8457 illegal declarations after using declarations here.
8458 (namespace_bindings_p): Likewise.
8459 (duplicate_decls): Don't consider declarations from different
8460 namespaces to be the same.
8461 (pushdecl): Use symbolic PUSH_ constants in calls to
8462 push_overloaded_decl.
8463 (push_overloaded_decl_1): Likewise.
8464 * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
8465 (do_nonmember_using_decl): Check for illegal using declarations
8466 after ordinary declarations here.
8467 (do_local_using_decl): Call pushdecl to insert declarations.
8468
8469 1999-01-21 Jason Merrill <jason@yorick.cygnus.com>
8470
8471 * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
8472
8473 1999-01-21 Mark Mitchell <mark@markmitchell.com>
8474
8475 * tree.c (build_cplus_array_type_1): Don't call build_array_type
8476 for types involving template parameters.
8477
8478 * cp-tree.h (PARM_DECL_EXPR): Delete.
8479 (convert_default_arg): Change prototype.
8480 (check_default_argument): Declare.
8481 (search_tree): Likewise.
8482 * call.c (convert_default_arg): Take the function to which the
8483 default argument belongs as a parameter, and do any necessary
8484 instantiation here, instead of ...
8485 (build_over_call): Here.
8486 * decl.c (local_variable_p): New function.
8487 (check_default_argument): Likewise, split out and tidied from ...
8488 (grokparms): Here.
8489 * error.c (dump_expr): Don't set PARM_DECL_EXPR.
8490 * pt.c (tsubst_call_declarator_parms): New function.
8491 (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing
8492 with CALL_EXPRs, rather than trying to be clever.
8493 (tsubst): Use tsubst_call_declarator_parms.
8494 * tree.c (search_tree): Don't make it static.
8495 * typeck.c (convert_arguments): Use new interface to
8496 convert_default_arg.
8497
8498 1999-01-20 Mark Mitchell <mark@markmitchell.com>
8499
8500 * error.c (dump_function_decl): Don't print the argument types for
8501 a function when the verbosity level is negative.
8502
8503 * call.c (build_over_call): Check format attributes at call-time.
8504
8505 * pt.c (tsubst_copy): Fix comment.
8506 (unify): Don't allow unification with variable-sized arrays.
8507
8508 * semantics.c (finish_stmt_expr): When processing a template make
8509 the BIND_EXPR long-lived.
8510
8511 1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
8512
8513 * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
8514 (import_export_vtable): Not here.
8515
8516 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
8517
8518 * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
8519 non-static member function.
8520
8521 1999-01-18 Nathan Sidwell <nathan@acm.org>
8522
8523 * class.c (instantiate_type): Only diagnose illegal address of member
8524 function if complaining.
8525
8526 * decl.c (lookup_name_real): Remove duplicate code.
8527
8528 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
8529
8530 * tree.c (copy_template_template_parm): Use permanent_obstack.
8531
8532 1999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
8533
8534 * pt.c (unify): Remove restrictions on deduction of argument
8535 of template template parameters.
8536
8537 1999-01-18 Nathan Sidwell <nathan@acm.org>
8538
8539 * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
8540
8541 * class.c (resolve_address_of_overloaded_function): Show list of
8542 all candidates, when none of them match.
8543
8544 1999-01-18 Chip Salzenberg <chip@perlsupport.com>
8545
8546 * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
8547 definition of 'casting away const' in reinterpret_cast<>.
8548
8549 1999-01-18 Graham <grahams@rcp.co.uk>
8550
8551 * cvt.c: Add include for decl.h, remove extern for
8552 static_aggregates which is now provided by decl.h.
8553
8554 * Makefile.in (cvt.o): Add dependency for decl.h and missing
8555 dependencies for convert.h and flags.h.
8556
8557 1999-01-18 Nathan Sidwell <nathan@acm.org>
8558
8559 * decl2.c (do_dtors): Set current location to that of the
8560 decl, for sensible diagnostics and debugging.
8561 (check_classfn): Issue `incomplete type' error, if
8562 class is not defined.
8563
8564 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
8565
8566 * cp-tree.h: Add prototype for bound_pmf_p.
8567
8568 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
8569 Manfred Hollstein <manfred@s-direktnet.de>
8570
8571 * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
8572 -Wreturn-type.
8573
8574 1999-01-16 Nathan Sidwell <nathan@acm.org>
8575
8576 * cp-tree.h (struct lang_type): Added has_mutable flag.
8577 (CLASSTYPE_HAS_MUTABLE): New macro to access it.
8578 (TYPE_HAS_MUTABLE_P): New macro to read it.
8579 (cp_has_mutable_p): Prototype for new function.
8580 * class.c (finish_struct_1): Set has_mutable from members.
8581 * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
8582 it contains a mutable.
8583 * typeck.c (cp_has_mutable_p): New function.
8584
8585 1999-01-15 Mark Mitchell <mark@markmitchell.com>
8586
8587 * pt.c (process_template_parm): Ignore top-level qualifiers on
8588 non-type parameters.
8589
8590 * decl.c (start_function): Use current_function_parms in the call
8591 to require_complete_type_for_parms, not the probably empty
8592 DECL_ARGUMENTS.
8593
8594 1999-01-14 Jason Merrill <jason@yorick.cygnus.com>
8595
8596 * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
8597
8598 * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
8599 that we don't suppress the other copies.
8600 * lex.c (handle_cp_pragma): Likewise.
8601
8602 1999-01-13 Mark Mitchell <mark@markmitchell.com>
8603
8604 * decl.c (grokdeclarator): Undo 1998-12-14 change.
8605 * tree.c (build_cplus_array_type_1): Likewise.
8606 * pt.c (instantiate_class_template): Remove misleading comment.
8607 (tsubst_aggr_type): Substitute if there are template parameters,
8608 regardless of whether or not they use template arguments.
8609 (unify): Likewise, but for unification.
8610
8611 1999-01-12 Richard Henderson <rth@cygnus.com>
8612
8613 * cp-tree.h (flag_permissive): Declare extern.
8614
8615 1999-01-06 Mark Mitchell <mark@markmitchell.com>
8616
8617 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
8618 here.
8619 (lang_type): Add is_partial_instantiation. Decrease width of
8620 dummy.
8621 (PARTIAL_INSTANTIATION_P): New macro.
8622 (OPERATOR_TYPENAME_P): Remove.
8623 * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
8624 OPERATOR_TYPENAME_P.
8625 (grok_op_properties): Likewise.
8626 * friend.c (do_friend): Handle friends that are member functions
8627 correctly.
8628 * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
8629 * pt.c (instantiate_class_template): Rework for clarity. Avoid
8630 leaving TYPE_BEING_DEFINED set in obscure cases. Don't do
8631 any more partial instantiation than is absolutely necessary for
8632 implicit typename. Set PARTIAL_INSTANTIATION_P.
8633 (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
8634 * semantics.c (begin_class_definition): Handle partial
8635 specializations of a type that was previously partially
8636 instantiated.
8637
8638 Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
8639
8640 * g++spec.c (LIBSTDCXX): Provide default definition.
8641 (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
8642
8643 Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8644
8645 * Make-lang.in (g++.o): Depend on prefix.h.
8646
8647 1999-01-04 Jason Merrill <jason@yorick.cygnus.com>
8648
8649 * tree.c (bound_pmf_p): New fn.
8650 * typeck.c (build_c_cast): Use it.
8651
8652 * decl.c (grok_op_properties): Use same_type_p.
8653
8654 Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8655
8656 * Makefile.in (cvt.o): Depend on toplev.h.
8657
8658 * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
8659
8660 * cvt.c: Include toplev.h.
8661
8662 * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
8663 definitions.
8664
8665 * init.c (expand_vec_init): Initialize variable `itype'.
8666
8667 * lex.c (yyerror): Cast the argument passed to a ctype function to
8668 an unsigned char.
8669
8670 * method.c (build_mangled_C9x_name): Wrap prototype and definition
8671 in "HOST_BITS_PER_WIDE_INT >= 64".
8672
8673 * typeck.c (build_binary_op): Mark parameter `convert_p' with
8674 ATTRIBUTE_UNUSED.
8675
8676 1998-12-22 Mark Mitchell <mark@markmitchell.com>
8677
8678 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
8679 * tree.c (build_exception_variant): Don't crash on empty throw
8680 specs.
8681
8682 1998-12-18 DJ Delorie <dj@cygnus.com>
8683
8684 * cvt.c (convert_to_reference): Check for both error_mark_node
8685 and NULL_NODE after call to convert_for_initialization.
8686
8687 1998-12-17 Jason Merrill <jason@yorick.cygnus.com>
8688
8689 * error.c (interesting_scope_p): New fn.
8690 (dump_simple_decl): Use it.
8691 (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
8692 (dump_expr, case OFFSET_REF): Print ->* if appropriate.
8693
8694 1998-12-16 Mark Mitchell <mark@markmitchell.com>
8695
8696 * class.c (resolve_address_of_overloaded_function): Do conversion
8697 to correct type here, rather than ...
8698 (instantiate_type): Here.
8699
8700 * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
8701 (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
8702 (decl_template_parm_p): Remove.
8703 * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
8704 parameter.
8705 * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
8706 * pt.c (push_inline_template_parms_recursive): Set it.
8707 (decl_template_parm_p): Remove.
8708 (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
8709 (process_template_parm): Set it.
8710
8711 Wed Dec 16 16:33:58 1998 Dave Brolley <brolley@cygnus.com>
8712
8713 * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
8714 if configured with cpplib.
8715
8716 1998-12-15 Mark Mitchell <mark@markmitchell.com>
8717
8718 * decl.c (poplevel): Make sure ns_binding is initialized.
8719
8720 * decl.c (finish_function): Undo inadvertent change in previous
8721 patch.
8722
8723 1998-12-14 Mark Mitchell <mark@markmitchell.com>
8724
8725 * class.c (pushclass): Tweak handling of class-level bindings.
8726 (resolve_address_of_overloaded_function): Update pointer-to-member
8727 handling.
8728 (instantiate_type): Likewise.
8729 * cvt.c (cp_convert_to_pointer): Likewise.
8730 * decl.c (pop_binding): Take the DECL to pop, not just the name.
8731 Deal with `struct stat' hack.
8732 (binding_level): Add to documentation.
8733 (push_binding): Clear BINDING_TYPE.
8734 (add_binding): New function.
8735 (push_local_binding): Use it.
8736 (push_class_binding): Likewise.
8737 (poplevel): Adjust calls to pop_binding.
8738 (poplevel_class): Likewise.
8739 (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
8740 declarations to current binding level.
8741 (push_class_level_binding): Likewise.
8742 (push_overloaded_decl): Adjust handling of OVERLOADs in local
8743 bindings.
8744 (lookup_namespace_name): Don't crash when confronted with a
8745 TEMPLATE_DECL.
8746 (lookup_name_real): Do `struct stat' hack in local binding
8747 contexts.
8748 (build_ptrmemfunc_type): Adjust documentation.
8749 (grokdeclarator): Don't avoid building real array types when
8750 processing templates unless really necessary.
8751 (finish_method): Adjust calls to pop_binding.
8752 * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
8753 not reparse_decl_as_expr.
8754 (build_expr_from_tree): Deal with a template-id as the function to
8755 call in a METHOD_CALL_EXPR.
8756 * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
8757 (maybe_adjust_types_For_deduction): Don't do peculiar things with
8758 METHOD_TYPEs here.
8759 (resolve_overloaded_unification): Handle COMPONENT_REFs. Build
8760 pointer-to-member types where necessary.
8761 * tree.c (build_cplus_array_type_1): Don't avoid building real
8762 array types when processing templates unless really necessary.
8763 (build_exception_variant): Compare the exception lists correctly.
8764
8765 1998-12-13 Mark Mitchell <mark@markmitchell.com>
8766
8767 * cp-tree.def (CPLUS_BINDING): Update documentation.
8768 * cp-tree.h (LOCAL_BINDING_P): New macro.
8769 (lang_identifier): Rename local_value to bindings.
8770 (tree_binding): Make `scope' of type `void*', not `tree'.
8771 (BINDING_SCOPE): Update documentation.
8772 (IDENTIFIER_LOCAL_VALUE): Remove.
8773 (IDENTIFIER_CLASS_VALUE): Document.
8774 (IDENTIFIER_BINDING): New macro.
8775 (IDENTIFIER_VALUE): Likewise.
8776 (TIME_IDENTIFIER_TIME): Likewise.
8777 (TIME_IDENTIFIER_FILEINFO): Likewise.
8778 (IMPLICIT_TYPENAME_P): Likewise.
8779 (set_identifier_local_value): Remove.
8780 (push_local_binding): New function.
8781 (push_class_binding): Likewise.
8782 * class.c (pushclass): Update comments; use push_class_binding.
8783 * decl.c (set_identifier_local_value_with_scope): Remove.
8784 (set_identifier_local_value): Likewise.
8785 (push_binding): New function.
8786 (pop_binding): Likewise.
8787 (binding_level): Update documentation. Remove shadowed.
8788 (BINDING_LEVEL): New macro.
8789 (free_binding_nodes): New variable.
8790 (poplevel): Adjust for new name-lookup scheme. Don't mess up
8791 BLOCK_VARs when doing for-scope extension. Remove effectively
8792 dead code.
8793 (pushlevel_class): Tweak formatting.
8794 (poplevel_class): Adjust for new name-lookup scheme.
8795 (print_binding_level): Likewise.
8796 (store_bindings): Likewise.
8797 (pushdecl): Likewise.
8798 (pushdecl_class_level): Likewise.
8799 (push_class_level_binding): Likewise.
8800 (push_overloaded_decl): Update comments. Adjust for new
8801 name-lookup scheme.
8802 (lookup_name_real): Likewise.
8803 (lookup_name_current_level): Likewise.
8804 (cp_finish_decl): Likewise.
8805 (require_complete_types_for_parms): Likewise. Remove misleading
8806 #if 0'd code.
8807 (grok_parms): Likewise. Don't call
8808 require_complete_types_for_parms here.
8809 (grok_ctor_properties): Don't treat templates as copy
8810 constructors.
8811 (grop_op_properties): Or as assignment operators.
8812 (start_function): Document. Adjust for new name-lookup scheme.
8813 (finish_function): Likewise.
8814 * decl2.c (do_local_using_decl): Use push_local_binding.
8815 * lex.c (begin_definition_of_inclass_inline): New function, split
8816 out from ...
8817 (do_pending_inlines): Here, and ...
8818 (process_next_inline): Here.
8819 (get_time_identifier): Use TIME_IDENTIFIER_* macros.
8820 (init_filename_times): Likewise.
8821 (extract_interface_info): Likewise.
8822 (ste_typedecl_interface_info): Likewise.
8823 (check_newline): Likewise.
8824 (dump_time_statistics): Likewise.
8825 (handle_cp_pragma): Likewise.
8826 (do_identifier): Adjust for new name-lookup scheme.
8827 * parse.y (function_try_block): Return ctor_initializer_opt value.
8828 (fndef): Use it.
8829 (fn.defpen): Pass appropriate values to start_function.
8830 (pending_inline): Use functor_try_block value, and pass
8831 appropriate values to finish_function.
8832 * pt.c (is_member_template): Update documentation; remove handling
8833 of FUNCTION_DECLs. As per name, this function should deal only in
8834 TEMPLATE_DECLs.
8835 (decl_template_parm_p): Change name of olddecl parameter to decl.
8836 (check_template_shadow): Adjust for new name-lookup scheme.
8837 (lookup_template_class): Likewise.
8838 (tsubst_decl): Tweak so as not to confuse member templates with
8839 copy constructors and assignment operators.
8840 (unify): Handle UNION_TYPEs.
8841 * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
8842 (lang_print_xnode): Adjust for new name-lookup scheme.
8843 * typeck.c (mark_addressable): Likewise.
8844 (c_expand_return): Likewise.
8845
8846 1998-12-08 Jason Merrill <jason@yorick.cygnus.com>
8847
8848 * decl.c (grokdeclarator): Allow field with same name as class
8849 in extern "C".
8850
8851 * decl.c (lookup_name_real): Don't limit field lookup to types.
8852 * class.c (check_member_decl_is_same_in_complete_scope): No error
8853 if icv and x are the same.
8854 * lex.c (do_identifier): Tweak error message.
8855
8856 1998-12-10 Mark Mitchell <mark@markmitchell.com>
8857
8858 * decl.c (start_enum): Use push_obstacks, not
8859 end_temporary_allocation.
8860 (finish_enum): Call pop_obstacks.
8861
8862 1998-12-10 Mark Mitchell <mark@markmitchell.com>
8863
8864 * class.c (instantiate_type): Return error_mark_node rather than
8865 junk.
8866
8867 1998-12-09 Mark Mitchell <mark@markmitchell.com>
8868
8869 * cp-tree.h (most_specialized_instantiation): New function.
8870 (print_candidates): Likewise.
8871 * class.c (validate_lhs): Remove.
8872 (resolve_address_of_overloaded_function): New function, split out
8873 and then substantially reworked, from ...
8874 (instantiate_type): Use it. Simplify.
8875 * cvt.c (convert_to_reference): Complain when caller has indicated
8876 that's the right thing to do. Don't crash if instantiate_type
8877 fails.
8878 * pt.c: Substitute `parameters' for `paramters' throughout.
8879 (print_candidates): Don't make it static.
8880 (most_specialized_instantiation): Split out from ...
8881 (most_specialized): Here.
8882
8883 Wed Dec 9 15:33:01 1998 Dave Brolley <brolley@cygnus.com>
8884
8885 * lex.c (lang_init_options): Initialize cpplib.
8886 * decl2.c (parse_options,cpp_initialized): Removed.
8887 (lang_decode_option): Move initialization of cpplib to
8888 lang_init_options.
8889
8890 1998-12-09 Mark Mitchell <mark@markmitchell.com>
8891
8892 * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
8893 well as the TYPE_DECL, when a typedef name is assigned to a
8894 previously anonymous type.
8895
8896 1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
8897
8898 * cp/except.c (call_eh_info): Use __start_cp_handler instead of
8899 __cp_eh_info for getting the eh info pointer. Add table_index to
8900 field list.
8901 (push_eh_cleanup): Don't increment 'handlers' data field.
8902 (process_start_catch_block): Don't set the 'caught' field.
8903
8904 * cp/exception.cc (CP_EH_INFO): New macro for getting the
8905 exception info pointer within library routines.
8906 (__cp_eh_info): Use CP_EH_INFO.
8907 (__start_cp_handler): Get exception info pointer, set caught field,
8908 and increment the handlers field. Avoids this being done by handlers.
8909 (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
8910 (uncaught_exception): Use CP_EH_INFO macro.
8911
8912 Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com)
8913
8914 * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
8915
8916 Mon Dec 7 17:56:06 1998 Mike Stump <mrs@wrs.com>
8917
8918 * lex.c (check_newline): Add support for \ as `natural'
8919 characters in file names in #line to be consistent with #include
8920 handling. We support escape processing in the # 1 "..." version of
8921 the command. See also support in cp/lex.c.
8922
8923 1998-12-07 Zack Weinberg <zack@rabi.phys.columbia.edu>
8924
8925 * cp/decl2.c: s/data/opts/ when initializing cpp_reader
8926 structure.
8927
8928 1998-12-07 Jason Merrill <jason@yorick.cygnus.com>
8929
8930 * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
8931
8932 * error.c (dump_simple_decl): Also print namespace context.
8933 (dump_function_decl): Likewise.
8934
8935 * decl2.c (ambiguous_decl): Don't print old value if it's
8936 error_mark_node.
8937
8938 * decl.c (lookup_name_real): Fix handling of local types shadowed
8939 by a non-type decl. Remove obsolete code.
8940 * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
8941
8942 * lang-options.h: Add -fpermissive.
8943 * decl2.c: Likewise.
8944 * cp-tree.h: Add flag_permissive.
8945 * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
8946 were specified, set flag_pedantic_errors.
8947 * call.c (build_over_call): Turn dropped qualifier messages
8948 back into pedwarns.
8949 * cvt.c (convert_to_reference): Likewise.
8950 * typeck.c (convert_for_assignment): Likewise.
8951
8952 1998-12-05 Jason Merrill <jason@yorick.cygnus.com>
8953
8954 * decl2.c (coerce_new_type): Use same_type_p.
8955 (coerce_delete_type): Likewise.
8956
8957 * call.c (check_dtor_name): Return 1, not error_mark_node.
8958
8959 1998-12-04 Jason Merrill <jason@yorick.cygnus.com>
8960
8961 * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
8962 if MULTIPLE_SYMBOL_SPACES.
8963
8964 * pt.c (check_template_shadow): New fn.
8965 * decl2.c (grokfield): Use it.
8966 * decl.c (pushdecl): Likewise.
8967 (pushdecl_class_level): Likewise.
8968 (start_method): Likewise.
8969 (xref_tag): Don't try to use 't' if we're defining.
8970
8971 * call.c (check_dtor_name): Just return an error_mark_node.
8972 * pt.c (lookup_template_class): Complain about using non-template here.
8973 * parse.y (apparent_template_type): Not here.
8974
8975 * pt.c (check_explicit_specialization): Complain about specialization
8976 with C linkage.
8977
8978 * lang-options.h: Add -f{no-,}implicit-inline-templates.
8979
8980 * pt.c (convert_nontype_argument): Don't assume that any integer
8981 argument is intended to be a constant-expression.
8982
8983 1998-12-03 Mark Mitchell <mark@markmitchell.com>
8984
8985 * class.c (handle_using_decl): Fix comment. Don't lookup
8986 constructors in base classes.
8987 (validate_lhs): Fix typo in comment.
8988 * search.c (lookup_field_1): Don't return a USING_DECL.
8989
8990 * cp-tree.h (DECL_ACCESS): Improve documentation.
8991
8992 * decl.c (expand_static_init): Don't set the initialization-done
8993 flag until the initialization is done.
8994
8995 1998-12-02 Mark Mitchell <mark@markmitchell.com>
8996
8997 * decl2.c (validate_nonmember_using_decl): Complain about using
8998 declarations for class members.
8999
9000 1998-11-29 Jason Merrill <jason@yorick.cygnus.com>
9001
9002 * typeck2.c (process_init_constructor): Use same_type_p.
9003
9004 * decl.c (check_tag_decl): Don't warn about null decl inside a
9005 class.
9006
9007 * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
9008 UNIFY_ALLOW_NONE.
9009 (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
9010 (resolve_overloaded_unification): Strip baselinks.
9011
9012 Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9013
9014 * g++spec.c: Don't prototype xmalloc.
9015
9016 1998-11-25 Jason Merrill <jason@yorick.cygnus.com>
9017
9018 * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
9019
9020 * decl.c (check_tag_decl): Do complain about null friend decl at
9021 file scope.
9022
9023 1998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
9024
9025 * lex.c (make_lang_type): Clear the whole struct lang_type, not
9026 only the first multiple of sizeof (int).
9027
9028 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
9029
9030 * decl.c (start_decl): An explicit specialization of a static data
9031 member is only a definition if it has an initializer.
9032
9033 * except.c (expand_throw): Use cp_finish_decl for the throw temp.
9034 * cvt.c (build_up_reference): Pass DIRECT_BIND down into
9035 cp_finish_decl.
9036 * init.c (expand_default_init): Check for DIRECT_BIND instead of
9037 DECL_ARTIFICIAL.
9038
9039 * call.c (build_over_call): Use build_decl.
9040
9041 * except.c (expand_throw): Just use convert, not
9042 build_reinterpret_cast.
9043
9044 * lex.c (handle_generic_pragma): Use token_buffer.
9045
9046 * decl.c (check_tag_decl): Don't complain about null friend decl.
9047
9048 1998-11-24 Dave Pitts <dpitts@cozx.com>
9049
9050 * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
9051 first position.
9052 * lex.c (check_newline): Use ISALPHA.
9053 (readescape): Use ISGRAPH.
9054 (yyerror): Use ISGRAPH.
9055
9056 1998-11-24 Nathan Sidwell <nathan@acm.org>
9057
9058 * search.c (get_abstract_virtuals): Do not use initial
9059 CLASSTYPE_ABSTRACT_VIRTUALS.
9060 * typeck2.c (abstract_virtuals_error): Show location of abstract
9061 declaration.
9062 * call.c (build_new_method_call): Use
9063 CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
9064 * class.c (finish_struct_bits): Don't bother working out whether
9065 get_abstract_virtuals will do anything, just do it.
9066
9067 1998-11-24 Graham <grahams@rcp.co.uk>
9068
9069 * typeck.c (build_component_ref): Remove unused statement.
9070
9071 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
9072
9073 * class.c (add_method): Catch invalid overloads.
9074
9075 * class.c (add_method): Build up OVERLOADs properly for conversion ops.
9076 * search.c (lookup_conversions): Handle getting real OVERLOADs.
9077 (add_conversions): Likewise. Revert last change.
9078 * call.c (add_conv_candidate): Pass totype to add_candidate instead
9079 of fn. Don't add a new candidate if the last one was for the same
9080 type.
9081 (print_z_candidates): Handle getting a type as a function.
9082 (joust): If we got two conversion candidates to the same type,
9083 just pick one.
9084 (build_object_call): Lose 'templates'.
9085 (build_user_type_conversion_1): Handle getting real OVERLOADs.
9086
9087 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
9088
9089 * typeck2.c (process_init_constructor): If there are elements
9090 that don't have initializers and they need to have constructors
9091 run, supply them with initializers.
9092
9093 * class.c (finish_struct_1): A class with a 0-width bitfield is
9094 still empty.
9095
9096 1998-11-23 Mark Mitchell <mark@markmitchell.com>
9097
9098 * pt.c (instantiate_class_template): Don't try to figure out what
9099 specialization to use for a partial instantiation. Correct
9100 typos in a couple of comments. Avoid calling uses_template_parms
9101 multiple times.
9102
9103 1998-11-23 Benjamin Kosnik <bkoz@cygnus.com>
9104
9105 * method.c (process_overload_item): Add call to
9106 build_mangled_C9x_name for intTI_type_nodes.
9107 (build_mangled_C9x_name): Add prototype, define.
9108 * decl.c (init_decl_processing): Add names for
9109 TImode_type_node.
9110
9111 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
9112
9113 * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
9114
9115 * class.c (finish_struct_1): Set things up for 0-width bitfields
9116 like we do for others.
9117
9118 * decl.c (check_tag_decl): New fn.
9119 (shadow_tag): Split out from here.
9120 * decl2.c (grok_x_components): Call it.
9121
9122 1998-11-22 Jason Merrill <jason@yorick.cygnus.com>
9123
9124 * decl.c: Lose warn_about_return_type.
9125 (grokdeclarator): Always complain about implicit int, except for
9126 `main () { ... }'.
9127
9128 * decl.c (tag_name): New fn.
9129 (xref_tag): Complain about using typedef-name after class-key.
9130
9131 * init.c (expand_vec_init): Also keep going if from_array.
9132
9133 * tree.c (is_overloaded_fn): Also handle the output of
9134 build_offset_ref.
9135
9136 * decl.c (grokdeclarator): Use constructor_name when comparing
9137 field name against enclosing class.
9138 * class.c (finish_struct_anon): Likewise.
9139
9140 1998-11-22 Mark Mitchell <mark@markmitchell.com>
9141
9142 * decl.c (poplevel): Remove code to handle KEEP == 2.
9143 (finish_function): Don't confuse BLOCK-order when
9144 processing a destructor.
9145
9146 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
9147
9148 * decl.c (require_complete_types_for_parms): Call layout_decl
9149 after we've completed the type.
9150
9151 1998-11-21 Martin von Löwis <loewis@informatik.hu-berlin.de>
9152
9153 * decl2.c (validate_nonmember_using_decl): Allow using templates
9154 from the global namespace.
9155
9156 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
9157
9158 Handle specifying template args to member function templates.
9159 * tree.c (build_overload): Always create an OVERLOAD for a template.
9160 * search.c (add_conversions): Handle finding an OVERLOAD.
9161 * decl2.c (check_classfn): Likewise.
9162 * lex.c (identifier_type): See through a baselink.
9163 * parse.y (do_id): Don't call do_identifier if we got a baselink.
9164 * class.c (instantiate_type, case TREE_LIST): Recurse.
9165
9166 * decl.c (grokdeclarator): Allow a boolean constant for array
9167 bounds, odd as that sounds.
9168
9169 * pt.c (unify): Be more strict about non-type parms, except for
9170 array bounds.
9171 (UNIFY_ALLOW_INTEGER): New macro.
9172
9173 1998-11-19 Manfred Hollstein <manfred@s-direktnet.de>
9174
9175 * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
9176
9177 1998-11-19 Jason Merrill <jason@yorick.cygnus.com>
9178
9179 * semantics.c (begin_class_definition): Call
9180 maybe_process_partial_specialization before push_template_decl.
9181 Don't call push_template_decl for a specialization.
9182 * search.c (lookup_field): Do return a member template class.
9183 * decl2.c (handle_class_head): Handle member template classes.
9184
9185 * decl.c (grokdeclarator): A parm type need not be complete.
9186
9187 * pt.c (convert_nontype_argument): Fix thinko.
9188
9189 1998-11-18 Mark Mitchell <mark@markmitchell.com>
9190
9191 * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
9192 (global_delete_fndecl): New variable.
9193 * decl.c (global_delete_fndecl): Define it.
9194 (init_decl_processing): Set it.
9195 * init.c (build_builtin_delete_call): Use it.
9196 * tree.c (mapcar): Recursively call mapcar for the type of EXPR
9197 nodes.
9198
9199 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
9200
9201 * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
9202 type.
9203
9204 * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
9205 * call.c (build_object_call): Also support references to functions.
9206 * typeck.c (convert_for_initialization): Don't decay a function
9207 if the target is a reference to function.
9208
9209 * search.c (add_conversions): Get all the overloads from a class.
9210
9211 * decl.c (grok_ctor_properties): Complain about any constructor
9212 that will take a single arg of the class type by value.
9213
9214 * typeck2.c (build_functional_cast): Can't create objects of
9215 abstract classes this way.
9216 * cvt.c (ocp_convert): Likewise.
9217
9218 * decl.c (grokfndecl): Member functions of local classes are not
9219 public.
9220
9221 1998-11-18 Mark Mitchell <mark@markmitchell.com>
9222
9223 * Make-lang.in (cc1plus): Add dependency on hash.o.
9224
9225 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
9226
9227 * search.c (get_abstract_virtuals): Complain about virtuals with
9228 no final overrider.
9229 * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
9230 with no final overrider.
9231 * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
9232 on virtuals with no final overrider.
9233
9234 * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
9235
9236 * class.c (finish_struct_1): Don't remove zero-width bit-fields until
9237 after layout_type.
9238
9239 * friend.c (do_friend): Don't set_mangled_name_for_decl.
9240
9241 * class.c (finish_struct_anon): Complain about non-fields.
9242 * decl2.c (build_anon_union_vars): Likewise.
9243
9244 * decl.c (grokdeclarator): Normal data members can't have the same
9245 name as the class, either.
9246 * class.c (finish_struct_anon): Neither can members of an
9247 anonymous union.
9248
9249 1998-11-17 Mark Mitchell <mark@markmitchell.com>
9250
9251 * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
9252 (TYPE_BINFO): Likewise.
9253 (IS_AGGR_TYPE): Tweak.
9254 (SET_IS_AGGR_TYPE): New macro.
9255 (CLASS_TYPE_P): Tweak.
9256 (lang_type): Group mark bitfields together. Remove linenum.
9257 (CLASSTYPE_SOURCE_LINE): Remove macro.
9258 (CLASSTYPE_MARKED_N): New macro.
9259 (SET_CLASSTYPE_MARKED_N): Likewise.
9260 (CLEAR_CLASSTYPE_MARKED_N): Likewise.
9261 (CLASS_TYPE_MARKED_*): Use them.
9262 (SET_CLASSTYPE_MARKED_*): Likewise.
9263 (CLEAR_CLASSTYPE_MARKED_*): Likewise.
9264 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
9265 (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
9266 (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
9267 * class.c (class_cache_obstack): New variable.
9268 (class_cache_firstobj): Likewise.
9269 (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
9270 (pushclass): Free the cache, when appropriate.
9271 (popclass): Tidy.
9272 (maybe_push_cache_obstack): Use class_cache_obstack.
9273 * decl.c (include hash.h).
9274 (typename_hash): New function.
9275 (typename_compare): Likewise.
9276 (build_typename_type): Check the hash table to avoid creating
9277 duplicates.
9278 (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
9279 (grokdeclarator): Use CLASS_TYPE_P.
9280 (xref_basetypes): Likewise.
9281 (start_function): Likewise. Don't put current_class_ref on the
9282 permanent obstack.
9283 * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
9284 and TYPE_TI_ARGS.
9285 * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
9286 (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
9287 fields for types other than class types. Do clear TYPE_ALIAS_SET
9288 for types other than class types, though.
9289 * method.c (build_overload_identifier): Use CLASS_TYPE_P and
9290 TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9291 * pt.c (process_template_parm): Don't set
9292 CLASSTYPE_GOT_SEMICOLON.
9293 (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9294 Coerce arguments on the momentary obstack.
9295 (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9296 (instantiate_class_template): Calculate template arguments on the
9297 momentary obstack. Tidy.
9298 (tsubst_template_arg_vector): Use make_temp_vec.
9299 (tsubst_aggr_type): Put template arguments on the momentary
9300 obstack.
9301 (tsubst_decl): Likewise.
9302 (tsubst): Copy the array bounds index to the permanent obstack
9303 before building index types. Use new macros.
9304 (unify): Use new macros.
9305 (do_type_instantiation): Likewise.
9306 * search.c (lookup_fnfields_1): Use new macros.
9307 (dfs_pushdecls): Build envelopes on the cache obstack.
9308 (dfs_compress_decls): Use new macros.
9309 (push_class_decls): Build on the cache obstack.
9310 * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
9311 * sign.c (build_signature_pointer_or_reference_type): Use
9312 SET_IS_AGGR_TYPE.
9313 * tree.c (make_binfo): Check CLASS_TYPE_P.
9314 (copy_template_template_parm): Adjust.
9315 (make_temp_vec): Use push_expression_obstack.
9316 * typeck.c (complete_type): Use new macros.
9317 (comptypes): Likewise.
9318
9319 1998-11-17 Jason Merrill <jason@yorick.cygnus.com>
9320
9321 * pt.c (tsubst): Add diagnostics for invalid array, reference
9322 and pointer to member types.
9323
9324 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
9325
9326 * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
9327
9328 * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
9329 Simplify.
9330
9331 * parse.y (structsp): Fix cut-and-paste error.
9332
9333 * init.c (build_new): Complain about non-integral size.
9334
9335 * parse.y (unary_expr): Complain about defining types in sizeof.
9336
9337 * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
9338
9339 * rtti.c (build_x_typeid): Complain about typeid without
9340 including <typeinfo>.
9341 (get_typeid): Likewise. Complain about typeid of incomplete type.
9342 (get_tinfo_fn_dynamic): Likewise.
9343 (get_typeid_1): Not static anymore.
9344 * except.c (build_eh_type_type): Use get_typeid_1.
9345
9346 * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
9347 ambiguous or private bases. Fix warning for reference cast.
9348
9349 1998-11-16 Mark Mitchell <mark@markmitchell.com>
9350
9351 * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
9352 * decl.c (duplicate_decls): Remove special-case code to deal with
9353 template friends, and just do the obvious thing.
9354 * pt.c (register_specialization): Tweak for clarity, and also to
9355 clear DECL_INITIAL for an instantiation before it is merged with a
9356 specialization.
9357 (check_explicit_specialization): Fix indentation.
9358 (tsubst_friend_function): Handle both definitions in friend
9359 declaration and outside friend declarations.
9360 (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
9361 (regenerate_decl_from_template): Tweak accordingly.
9362 (instantiate_decl): Likewise.
9363
9364 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
9365
9366 * decl.c (cplus_expand_expr_stmt): Promote warning about naked
9367 member function reference to error.
9368 * cvt.c (ocp_convert): Complain about converting an overloaded
9369 function to void.
9370
9371 * init.c (build_offset_ref): Just return a lone static member
9372 function.
9373
9374 * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
9375 not internal ones.
9376
9377 * typeck.c (build_binary_op_nodefault): Improve error handling.
9378
9379 * decl.c (grokfndecl): Complain about making 'main' a template.
9380
9381 * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
9382
9383 * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
9384 TYPE_DECL in a template.
9385
9386 1998-11-15 Jason Merrill <jason@yorick.cygnus.com>
9387
9388 * typeck2.c (my_friendly_abort): Add URL in the other case, too.
9389
9390 * decl.c (struct cp_function): Add named_label_uses.
9391 (push_cp_function_context): Save it.
9392 (pop_cp_function_context): Restore it.
9393 (define_label): Also complain about jumping into the scope of
9394 non-POD objects that don't have constructors.
9395 * tree.c (pod_type_p): New fn.
9396
9397 * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
9398 * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
9399 (get_tinfo_fn): Not here.
9400 * repo.c (repo_get_id): Abort if we get called for an incomplete
9401 type.
9402
9403 1998-11-13 Mark Mitchell <mark@markmitchell.com>
9404
9405 * except.c (expand_throw): Make sure first argument to
9406 __cp_push_exception is of type `void*' to avoid spurious error
9407 messages.
9408
9409 1998-11-11 Jason Merrill <jason@yorick.cygnus.com>
9410
9411 * pt.c (try_one_overload): Take orig_targs again. Only check for
9412 mismatches against them; we don't care what a previous call found.
9413 (resolve_overloaded_unification): Adjust.
9414
9415 * search.c (lookup_field): Don't return anything for a non-type
9416 field from a dependent type.
9417 * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
9418 in an array declarator.
9419 (start_decl): Push into the class before looking for the field.
9420
9421 1998-11-08 Mark Mitchell <mark@markmitchell.com>
9422
9423 * method.c (build_overload_value): Handle REFERENCE_TYPE.
9424
9425 1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
9426
9427 * decl.c (grokdeclarator): Allow namespace-scoped members if they
9428 are friends.
9429
9430 1998-11-08 Jason Merrill <jason@yorick.cygnus.com>
9431
9432 * pt.c (tsubst_decl): Don't mess with the global value of an
9433 un-mangled DECL_ASSEMBLER_NAME.
9434
9435 1998-11-03 Christopher Faylor <cgf@cygnus.com>
9436
9437 * decl.c (init_decl_processing): Remove CYGWIN conditional
9438 since CYGWIN is now able to deal with trapping signals.
9439
9440 Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9441
9442 * cp-tree.h: Don't include gansidecl.h.
9443 * exception.cc: Include gansidecl.h (since we don't include config.h)
9444 * g++spec.c: Don't include gansidecl.h.
9445
9446 1998-11-06 Mark Mitchell <mark@markmitchell.com>
9447
9448 * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease
9449 size of dummy.
9450 (DECL_DEFINED_IN_CLASS_P): New macro.
9451 (TEMPLATE_PARMS_FOR_INLINE): Document.
9452 (check_static_variable_definition): New function.
9453 * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
9454 appropriate.
9455 (check_static_variable_definition): Split out from ...
9456 (grokdeclarator): Here.
9457 * pt.c (check_default_tmpl_args): New function, split out from ...
9458 (push_template_decl_real): Here.
9459 (instantiate_template): Fix comment.
9460
9461 1998-11-04 Mark Mitchell <mark@markmitchell.com>
9462
9463 * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
9464 (CP_TYPE_VOLATILE_P): Likewise.
9465 (CP_TYPE_RESTRICT_P): Likewise.
9466
9467 1998-11-03 Mark Mitchell <mark@markmitchell.com>
9468
9469 * pt.c (tsubst): Use build_index_type, not build_index_2_type.
9470
9471 1998-11-02 Jason Merrill <jason@yorick.cygnus.com>
9472
9473 * class.c (instantiate_type): Be more helpful.
9474
9475 * decl2.c (import_export_decl): Call import_export_class.
9476
9477 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
9478 * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
9479 * pt.c (tsubst_copy): Likewise.
9480
9481 1998-11-02 Mark Mitchell <mark@markmitchell.com>
9482
9483 * init.c (expand_vec_init): Fix off-by-one error.
9484
9485 1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
9486
9487 * parse.y (apparent_template_type): New type.
9488 (named_complex_class_head_sans_basetype): Use it.
9489 * Makefile.in (CONFLICTS): One new conflict.
9490 * parse.c: Regenerated.
9491
9492 1998-11-01 Mark Mitchell <mark@markmitchell.com>
9493
9494 * cp-tree.h (COMPARE_STRICT): New macro.
9495 (COMPARE_BASE): Likewise.
9496 (COMPARE_RELAXED): Likewise.
9497 (COMPARE_REDECLARATION): Likewise.
9498 (same_type_p): Likewise.
9499 (same_or_base_type_p): Likewise.
9500 * call.c (standard_conversion): Use them, in place of comptypes
9501 with numeric arguments.
9502 (reference_binding): Likewise.
9503 (convert_like): Likewise.
9504 (build_over_call): Likewise.
9505 (is_subseq): Likewise.
9506 (is_properly_derived_from): Likewise.
9507 (compare_ics): Likewise.
9508 (joust): Likewise.
9509 * class.c (delete_duplicate_fields_1): Likewise.
9510 (resolves_to_fixed_type_p): Likewise.
9511 (instantiate_type): Likewise. Remove #if 0'd code.
9512 * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here.
9513 (pushdecl): Likewise.
9514 (lookup_name_real): Likewise.
9515 (grokdeclarator): Likewise. Check for illegal array declarations.
9516 (grokparms): Likewise.
9517 (grok_op_properties): Likewise.
9518 * decl2.c (check_classfn): Likewise.
9519 * friend.c (is_friend): Likewise.
9520 (make_friend_class): Likewise.
9521 * init.c (expand_aggr_init): Likewise.
9522 (expand_vec_init): Likewise.
9523 * pt.c (is_member_template_class): Remove declaration.
9524 (is_specialization_of): Use COMPARE_* and new macros.
9525 (comp_template_parms): Likewise.
9526 (convert_nontype_argument): Likewise.
9527 (coerce_template_template_parms): Likewise.
9528 (template_args_equal): Likewise.
9529 (lookup_template_class): Likewise.
9530 (type_unification_real): Likewise.
9531 (unify): Likewise.
9532 (get_bindings_real): Likewise.
9533 * search.c (covariant_return_p): Likewise.
9534 (get_matching_virtual): Likewise.
9535 * sig.c (match_method_types): Likewise.
9536 * tree.c (vec_binfo_member): Likewise.
9537 (cp_tree_equal): Likewise.
9538 * typeck.c (common_type): Likewise.
9539 (comp_array_types): Likewise. Get issues involving unknown array
9540 bounds right.
9541 (comptypes): Update comments. Use new flags.
9542 (comp_target_types): Use new macros.
9543 (compparms): Likewise.
9544 (comp_target_parms): Likewise.
9545 (string_conv_p): Likewise.
9546 (build_component_ref): Likewise.
9547 (build_indirect_ref): Likewise.
9548 (build_conditional_expr): Likewise.
9549 (build_static_cast): Likewise.
9550 (build_reinterpret_cast): Likewise.
9551 (build_const_cast): Likewise.
9552 (build_modify_expr): Likewise.
9553 (convert_for_assignment): Likewise.
9554 (comp_ptr_ttypes_real): Likewise.
9555 (ptr_reasonably_similar): Likewise.
9556 (comp_ptr_ttypes_const): Likewise.
9557
9558 1998-10-31 Jason Merrill <jason@yorick.cygnus.com>
9559
9560 * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
9561
9562 1998-10-30 Mark Mitchell <mark@markmitchell.com>
9563
9564 * decl2.c (delete_sanity): Pass integer_zero_node, not
9565 integer_two_node, to build_vec_delete.
9566 * init.c (build_array_eh_cleanup): Remove.
9567 (expand_vec_init_try_block): New function.
9568 (expand_vec_init_catch_clause): Likewise.
9569 (build_vec_delete_1): Don't deal with case that auto_delete_vec
9570 might be integer_two_node anymore.
9571 (expand_vec_init): Rework for initialization-correctness and
9572 exception-correctness.
9573 * typeck2.c (process_init_constructor): Make mutual exclusivity
9574 of cases more obvious.
9575
9576 1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
9577
9578 * decl.c (lookup_name_real): OK, only warn if not lexing.
9579 Simplify suggested fix.
9580
9581 * cp-tree.h (IDENTIFIER_MARKED): New macro.
9582 * search.c (lookup_conversions): Use breadth_first_search.
9583 (add_conversions): Avoid adding two conversions to the same type.
9584 (breadth_first_search): Work with base binfos, rather
9585 than binfos and base indices.
9586 (get_virtual_destructor): Adjust.
9587 (tree_has_any_destructor_p): Adjust.
9588 (get_matching_virtual): Adjust.
9589
9590 * pt.c (push_template_decl_real): Generalize check for incorrect
9591 number of template parms.
9592 (is_member_template_class): #if 0.
9593
9594 1998-10-29 Richard Henderson <rth@cygnus.com>
9595
9596 * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
9597 last.
9598
9599 1998-10-28 Zack Weinberg <zack@rabi.phys.columbia.edu>
9600
9601 * lex.c: Call check_newline from lang_init always. After
9602 calling cpp_start_read, set yy_cur and yy_lim to read from the
9603 cpplib token buffer.
9604
9605 1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
9606
9607 * class.c (instantiate_type): Don't consider templates for a normal
9608 match.
9609
9610 * class.c (finish_struct_1): Don't complain about non-copy
9611 assignment ops in union members.
9612
9613 * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
9614 (prepare_fresh_vtable): Likewise.
9615 (finish_struct_1): Don't call import_export_class.
9616 * decl2.c (finish_vtable_vardecl): Do import/export stuff.
9617 (finish_prevtable_vardecl): Lose.
9618 (finish_file): Don't call it.
9619 * pt.c (instantiate_class_template): Likewise.
9620 * cp-tree.h: Remove it.
9621
9622 * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
9623 * decl.c (finish_function): Not here.
9624 (start_function): Do set DECL_INITIAL.
9625
9626 * pt.c (push_template_decl_real): Complain about default template
9627 args for enclosing classes.
9628
9629 * call.c (add_function_candidate): Treat conversion functions
9630 as coming from the argument's class.
9631 * cp-tree.h (DECL_CONV_FN_P): New fn.
9632 (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
9633 * class.c (add_method): Use DECL_CONV_FN_P.
9634 * decl2.c (check_classfn): Likewise.
9635 * error.c (dump_function_name): Likewise.
9636 (dump_function_decl): Likewise.
9637 * pt.c (fn_type_unification): Likewise.
9638 * search.c (add_conversions): Likewise.
9639
9640 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
9641
9642 * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
9643 * method.c (hack_identifier): Also check for using RESULT_DECL
9644 from outer context.
9645
9646 1998-10-27 Mark Mitchell <mark@markmitchell.com>
9647
9648 * decl.c (grokdeclarator): Use type_quals, rather than constp,
9649 consistently.
9650
9651 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
9652
9653 * call.c (standard_conversion): instantiate_type here.
9654 (reference_binding): And here.
9655 (implicit_conversion): Not here.
9656 (build_op_delete_call): No need to cons up an OVERLOAD.
9657 * cvt.c (cp_convert_to_pointer): instantiate_type here.
9658 (convert_to_reference): And here.
9659 * decl.c (grok_reference_init): Not here.
9660 (grokparms): Or here.
9661 * typeck2.c (digest_init): Or here.
9662 * typeck.c (decay_conversion): Take the address of overloaded
9663 functions, too.
9664 (require_instantiated_type): Lose.
9665 (convert_arguments): Don't handle unknown types here.
9666 (build_c_cast): Likewise.
9667 (build_binary_op): Gut.
9668 (build_conditional_expr): Don't require_instantiated_type.
9669 (build_modify_expr): Likewise.
9670 (build_static_cast): Don't instantiate_type.
9671 (build_reinterpret_cast): Likewise.
9672 (build_const_cast): Likewise.
9673 (convert_for_initialization): Likewise.
9674 (build_ptrmemfunc): Use type_unknown_p.
9675 (convert_for_assignment): Also do default_conversion on overloaded
9676 functions. Hand them off to ocp_convert.
9677
9678 1998-10-26 Mark Mitchell <mark@markmitchell.com>
9679
9680 * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
9681 VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type.
9682
9683 * class.c (finish_struct_1): Use build_cplus_array_type to build
9684 array types.
9685 * decl.c (init_decl_processing): Likewise.
9686 * except.c (expand_end_eh_spec): Likewise.
9687 * search.c (expand_upcast_fixups): Simplify very slightly.
9688
9689 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
9690
9691 * decl.c (grokdeclarator): Complain about a variable using
9692 constructor syntax coming back null from start_decl.
9693
9694 * friend.c (make_friend_class): Complain about trying to make
9695 a non-class type a friend.
9696
9697 * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
9698 (start_function): Not here.
9699
9700 1998-10-26 Brendan Kehoe <brendan@cygnus.com>
9701
9702 * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
9703
9704 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
9705
9706 * typeck2.c (process_init_constructor): Only skip anonymous fields
9707 if they are bitfields.
9708
9709 * cp-tree.def (TYPEOF_TYPE): New code.
9710 * error.c (dump_type_real): Handle it.
9711 * pt.c (tsubst): Likewise.
9712 * tree.c (search_tree): Likewise.
9713 * semantics.c (finish_typeof): New fn.
9714 * parse.y (typespec): Use it.
9715 * cp-tree.h: Declare it.
9716
9717 1998-10-26 Manfred Hollstein <manfred@s-direktnet.de>
9718
9719 * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
9720
9721 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
9722
9723 * typeck.c (convert_arguments): Don't handle pmf references
9724 specially.
9725
9726 * init.c (build_member_call): Don't try to convert to the base type
9727 if it's ambiguous or pedantic.
9728
9729 * typeck2.c (check_for_new_type): Only depend on pedantic for
9730 C-style casts.
9731
9732 1998-10-25 Mark Mitchell <mark@markmitchell.com>
9733
9734 * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
9735 non-converting constructors.
9736
9737 1998-10-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
9738
9739 * gxxint.texi: Correct documentation for n, N, Q, and B.
9740
9741 1998-10-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
9742
9743 * parse.y (condition): Convert VAR_DECL from reference to indirect
9744 reference.
9745
9746 1998-10-23 Andrew MacLeod <amacleod@cygnus.com>
9747
9748 * exception.cc (__cp_pop_exception): Free the original exception
9749 value, not the potentially coerced one.
9750
9751 1998-10-23 Mark Mitchell <mark@markmitchell.com>
9752
9753 * Makefile.in (hash.h): Run gperf when necessary.
9754
9755 * cp-tree.h (CP_TYPE_READONLY): Remove.
9756 (CP_TYPE_VOLATILE): Likewise.
9757 (CP_TYPE_QUALS): New macro.
9758 (CP_TYPE_CONST_P): Likewise.
9759 (CP_TYPE_VOLATILE_P): Likewise.
9760 (CP_TYPE_RESTRICT_P): Likewise.
9761 (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
9762 (cp_build_type_variant): Rename to ...
9763 (cp_build_qualified_type): New function.
9764 (c_apply_type_quals_to_decl): Declare.
9765 (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
9766 (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
9767 (cp_type_qual_from_rid): New function.
9768 (compparms): Remove unused parameter. All callers changed.
9769 (cp_type_quals): New function.
9770 (at_least_as_qualified_p): Likewise.
9771 (more_qualified_p): Likewise.
9772
9773 * call.c (standard_conversion): Replace calls to
9774 cp_build_type_variant with cp_build_qualified_type. Use
9775 CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
9776 compare them. Use CP_TYPE_* macros to check qualifiers.
9777 (reference_binding): Likewise.
9778 (implicit_conversion): Likewise.
9779 (add_builtin_candidates): Likewise.
9780 (build_over_call): Likewise.
9781 * class.c (overrides): Compare all qualifiers, not just `const',
9782 on method declarations.
9783 * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
9784 (convert_pointer_to_real): Likewise.
9785 (type_promotes_to): Likewise.
9786 * decl.c (check_for_uninitialized_const_var): New function.
9787 (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
9788 (cp_finish_decl): Use check_for_uninitialized_const_var.
9789 (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to
9790 handle `restrict'.
9791 (grok_ctor_properties): Likewise.
9792 (grok_op_properties): Likewise.
9793 (start_function): Likewise.
9794 (rever_static_member_fn): Likewise.
9795 * decl2.c (grok_method_quals): Likewise.
9796 (grokfield): Likewise.
9797 * error.c (dump_readonly_or_volatile): Rename to ...
9798 (dump_qualifiers): New function. Handle `restrict'.
9799 (dump_type_real): Use it.
9800 (dump_aggr_type): Likewise.
9801 (dump_type_prefix): Likewise.
9802 (dump_type_suffix): Likewise.
9803 (dump_function_decl): Likewise.
9804 (cv_as_string): Likewise.
9805 * gxx.gperf: Add __restrict and __restrict__.
9806 * gxxint.texi: Document `u' as used for `__restrict', and a few
9807 other previously undocumented codes.
9808 * hash.h: Regenerated.
9809 * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
9810 (build_member_call): Likewise.
9811 (build_new_1): Likewise.
9812 * lex.c (init_parse): Add entry for RID_RESTRICT.
9813 (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
9814 (cp_type_qual_from_rid): Define.
9815 * lex.h (enum rid): Add RID_RESTRICT.
9816 * method.c (process_modifiers): Deal with `restrict'.
9817 * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
9818 * parse.c: Regenerated.
9819 * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
9820 (tsubst_aggr_type): Likewise.
9821 (tsubst): Likewise.
9822 (check_cv_quals_for_unify): Likewise.
9823 (unify): Likewise.
9824 * rtti.c (init_rtti_processing): Likewise.
9825 (build_headof): Likewise.
9826 (get_tinfo_var): Likewise.
9827 (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling.
9828 (expand_class_desc): Likewise.
9829 (expand_attr_desc): Likewise.
9830 (synthesize_tinfo_fn): Likewise.
9831 * search.c (covariant_return_p): Likewise. Fix `volatile' handling.
9832 (get_matching_virtual): Likewise.
9833 (expand_upcast_fixups): Likewise.
9834 * sig.c (build_signature_pointer_or_reference_name): Take
9835 type_quals, not constp and volatilep.
9836 (build_signature_pointer_or_reference_type): Likewise.
9837 (match_method_types): More CP_TYPE_QUALS conversion, etc.
9838 (build_signature_pointer_constructor): Likewise.
9839 (build_signature_method_call): Likewise.
9840 * tree.c (build_cplus_array_type): Likewise.
9841 (cp_build_type_variant): Rename to ...
9842 (cp_build_qualified_type): New function. Deal with `__restrict'.
9843 (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
9844 (build_exception_variant): Likewise.
9845 (mapcar): Likewise.
9846 * typeck.c (qualif_type): Likewise.
9847 (common_type): Likewise.
9848 (comptypes): Likewise.
9849 (comp_cv_target_types): Likewise.
9850 (at_least_as_qualified_p): Define.
9851 (more_qualified_p): Likewise.
9852 (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
9853 (compparms): Likewise.
9854 (inline_conversion): Likewise.
9855 (string_conv_p): Likewise.
9856 (build_component_ref): Likewise.
9857 (build_indirect_ref): Likewise.
9858 (build_array_ref): Likewise.
9859 (build_unary_op): Likewise.
9860 (build_conditional_expr): Likewise.
9861 (build_static_cast): Likewise.
9862 (build_c_cast): Likewise.
9863 (build_modify_expr): Likewise.
9864 (convert_For_assignment): Likewise.
9865 (comp_ptr_ttypes_real): Likewise.
9866 (cp_type_quals): New function.
9867
9868 1998-10-23 Jason Merrill <jason@yorick.cygnus.com>
9869
9870 * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
9871 (CP_TYPE_VOLATILE): Likewise.
9872 * decl.c (grokdeclarator): Use them.
9873 * tree.c (canonical_type_variant): Likewise.
9874
9875 1998-10-22 Martin von Löwis <loewis@informatik.hu-berlin.de>
9876
9877 * parse.y (named_class_head): Push into class while parsing the
9878 base class list.
9879 * decl2.c (push_scope, pop_scope): New functions.
9880 * cp-tree.h: Declare them.
9881 * init.c (build_new_1): Delay cleanup until end of full expression.
9882
9883 1998-10-21 Jason Merrill <jason@yorick.cygnus.com>
9884
9885 * typeck.c (build_component_ref): Use of a type here is an error.
9886
9887 1998-10-19 Jason Merrill <jason@yorick.cygnus.com>
9888
9889 Revamp references to member functions.
9890 * method.c (hack_identifier): Call build_component_ref for a
9891 reference to a member function.
9892 * typeck.c (build_component_ref): Only return a single function
9893 if it's static. Otherwise, return a COMPONENT_REF.
9894 (build_x_function_call): Handle a COMPONENT_REF.
9895 (build_unary_op): Handle all unknown-type things.
9896 * decl2.c (arg_assoc): Handle COMPONENT_REF.
9897 * class.c (instantiate_type): Complain if the function we get is a
9898 nonstatic member function. Remove code for finding "compatible"
9899 functions.
9900 * pt.c (tsubst_copy): Handle NOP_EXPR.
9901 * tree.c (build_dummy_object): New fn.
9902 (maybe_dummy_object): New fn.
9903 (is_dummy_object): New fn.
9904 * cp-tree.h: Declare them.
9905 * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
9906 * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
9907 * init.c (build_member_call): Use maybe_dummy_object and
9908 is_dummy_object.
9909 (build_offset_ref): Use maybe_dummy_object.
9910 (resolve_offset_ref): Use is_dummy_object.
9911 * typeck.c (build_x_function_call): Call build_dummy_object.
9912 (unary_complex_lvalue): Call is_dummy_object.
9913
9914 * typeck.c (build_component_addr): Make sure field is a field.
9915
9916 * call.c (build_new_op): Delete obsolete code.
9917
9918 * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
9919
9920 1998-10-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
9921
9922 * decl2.c (validate_nonmember_using_decl): Fix using-directives of
9923 std if std is ignored.
9924
9925 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
9926
9927 * decl.c (grokvardecl): Fix thinko.
9928
9929 * decl.c (grokdeclarator): Embedded attrs bind to the right,
9930 not the left.
9931
9932 * parse.y (fn.def2): Fix 'attrs' format.
9933
9934 1998-10-18 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
9935
9936 * Makefile.in (CONFLICTS): Update.
9937 * parse.y (expr_or_declarator_intern): New rule.
9938 (expr_or_declarator, direct_notype_declarator, primary,
9939 functional_cast): Use it.
9940 (notype_declarator_intern): New rule.
9941 (notype_declarator, complex_notype_declarator): Use it.
9942
9943 1998-10-17 Jason Merrill <jason@yorick.cygnus.com>
9944
9945 * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
9946 (grokvardecl): Likewise.
9947
9948 Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9949
9950 * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
9951 (add_method): Likewise for arguments 1 & 2 of `bcopy'.
9952
9953 * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
9954
9955 * pt.c (process_partial_specialization): Cast 1st argument of
9956 `bzero' to (PTR).
9957
9958 * tree.c (build_base_fields): Cast `base_align' to (int) when
9959 comparing against one.
9960
9961 1998-10-16 Mark Mitchell <mark@markmitchell.com>
9962
9963 * decl.c (lookup_name_real): Handle template parameters for member
9964 templates where said parameters have the same name as the
9965 surrounding class.
9966
9967 * decl.c (expand_static_init): Build cleanups before entering the
9968 anonymous function used to do them to avoid access-checking
9969 confusion.
9970
9971 * decl.c (grokfndecl): Add back call to cplus_decl_attributes
9972 accidentally removed by previous change, and make DECL_RTL here.
9973 * class.c (add_method): Don't make DECL_RTL here.
9974
9975 * pt.c (for_each_template_parm): Don't examine uninstantiated
9976 default arguments.
9977
9978 1998-10-16 Dave Brolley <brolley@cygnus.com>
9979
9980 * lex.c (real_yylex): Fix unaligned access of wchar_t.
9981
9982 1998-10-16 Mark Mitchell <mark@markmitchell.com>
9983
9984 * class.c (add_method): Fix documentation to reflect previous
9985 changes. Check for duplicate method declarations here.
9986 * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
9987 correctly; such things never match.
9988 (grokfndecl): Don't look for duplicate methods here.
9989 * decl2.c (check_classfn): Don't assume names are mangled.
9990 Don't add bogus member function declarations to a class before the
9991 class type is complete.
9992 (grokfield): Reformat error message.
9993 * method.c (set_mangled_name_for_decl): Don't mangle names while
9994 processing_template_decl.
9995
9996 1998-10-16 Jason Merrill <jason@yorick.cygnus.com>
9997
9998 * typeck.c (build_indirect_ref): Complain about a pointer to data
9999 member, too.
10000 * typeck2.c (build_m_component_ref): Don't indirect a pointer to
10001 data member.
10002 * init.c (resolve_offset_ref): Don't undo the above.
10003
10004 * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
10005 (struct lang_decl_flags): Add `bitfield'.
10006 * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
10007 DECL_BIT_FIELD.
10008 * decl2.c (grokbitfield, grok_alignof): Likewise.
10009 * init.c (build_offset_ref): Likewise.
10010 * typeck.c (build_component_addr, expr_sizeof): Likewise.
10011 * cvt.c (build_up_reference): Don't crash if taking the address
10012 returns error_mark_node.
10013
10014 * decl.c (grokfndecl): Also check ctype when checking for ::main().
10015
10016 1998-10-15 Jason Merrill <jason@yorick.cygnus.com>
10017
10018 * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
10019 Do mangling here.
10020 (grokdeclarator): Instead of here.
10021 * friend.c (do_friend): Lose special handling of ::main and
10022 __builtin_*.
10023 * cp-tree.h (DECL_MAIN_P): Check for C linkage.
10024
10025 * spew.c (yylex): Clear looking_for_typename if we got
10026 'enum { ... };'.
10027
10028 1998-10-15 Mark Mitchell <mark@markmitchell.com>
10029
10030 * class.c (maybe_warn_about_overly_private_class): Improve error
10031 messages for class with only private constructors.
10032
10033 * cp-tree.def (TYPENAME_TYPE): Add to documentation.
10034 * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
10035 (build_typename_type): New function.
10036 * decl.c (build_typename_type): Broken out from ...
10037 (make_typename_type): Use it.
10038 * search.c (lookup_field): Likewise.
10039
10040 1998-10-14 Benjamin Kosnik <bkoz@rhino.cygnus.com>
10041
10042 * pt.c (convert_nontype_argument): Check against type_referred_to.
10043 * decl.c (grokvardecl): Check for declarator name before building
10044 DECL_ASSEMBLER_NAME.
10045
10046 1998-10-14 Mark Mitchell <mark@markmitchell.com>
10047
10048 * pt.c (lookup_template_class): Add comment.
10049 (instantiate_class_template): Don't mark the _TYPE node for
10050 member class templates as an instantiation.
10051
10052 1998-10-14 Jason Merrill <jason@yorick.cygnus.com>
10053
10054 * decl.c (grokfndecl): Fix my thinko.
10055
10056 1998-10-13 Jason Merrill <jason@yorick.cygnus.com>
10057
10058 * tinfo2.cc (fast_compare): Remove.
10059 (before): Just use strcmp.
10060 * tinfo.cc (operator==): Just use strcmp.
10061
10062 1998-10-13 Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
10063
10064 * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
10065 declarations.
10066
10067 1998-10-13 Mark Mitchell <mark@markmitchell.com>
10068
10069 * cp-tree.h (specializations_of_same_template_p): Remove.
10070 * search.c (get_template_base): Don't use it.
10071 (get_template_base_recursive): Likewise.
10072 * pt.c (specializations_of_same_template_p): Remove.
10073 (unify): Don't use it.
10074 (lookup_template_class): Find the correct parent when setting
10075 CLASSTYPE_TI_TEMPLATE.
10076
10077 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
10078
10079 * tinfo.cc (operator==): Always compare names.
10080
10081 1998-10-12 Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
10082
10083 * decl.c (start_function): Fix cut-and-paste error.
10084
10085 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
10086
10087 * inc/typeinfo: Add #pragma interface.
10088 (operator!=): Just call operator==.
10089 * tinfo.cc: Add #pragma implementation.
10090 (operator==): Move from inc/typeinfo and tinfo2.cc.
10091 Check __COMMON_UNRELIABLE instead of _WIN32.
10092
10093 * typeck2.c (my_friendly_abort): Add URL.
10094
10095 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
10096
10097 * decl.c (start_method): Added extra parameter for attributes.
10098 * cp-tree.h (start_method): Update prototype.
10099 * parse.y (fn.def2): Update start_method parameter list.
10100
10101 1998-10-11 Mark Mitchell <mark@markmitchell.com>
10102
10103 * cp-tree.h (specializations_of_same_template_p): Declare.
10104 * pt.c (specializations_of_same_template_p): New function.
10105 (unify): Use it.
10106 * search.c (get_template_base): Use it.
10107 (get_template_base_recursive): Likewise.
10108
10109 1998-10-10 Manfred Hollstein <manfred@s-direktnet.de>
10110
10111 * decl2.c (start_objects): Add new variable `joiner' and
10112 initialize it properly.
10113
10114 1998-10-09 Mark Mitchell <mark@markmitchell.com>
10115
10116 * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
10117 change to vtable types.
10118
10119 * cvt.c (ocp_convert): Avoid infinite recursion caused by
10120 1998-10-03 change.
10121
10122 1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
10123
10124 * pt.c (resolve_overloaded_unification): New fn.
10125 (try_one_overload): Likewise.
10126 (unify): Don't fail on unknown type.
10127 (type_unification_real): Likewise. Use resolve_overloaded_unification
10128 to handle an overloaded argument.
10129 (template_args_equal): Split out...
10130 (comp_template_args): From here.
10131 (determine_specialization): Also allow a template with more
10132 parms than were explicitly specified.
10133 * cp-tree.h: Add template_args_equal.
10134 * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
10135
10136 Thu Oct 8 15:58:30 1998 Anthony Green <green@cygnus.com>
10137
10138 * semantics.c (finish_asm_stmt): Revert my 1998-09-28
10139 change.
10140
10141 Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com)
10142
10143 * typeck.c (unsigned_type): Only return TItype nodes when
10144 HOST_BITS_PER_WIDE_INT is >= 64 bits.
10145 (signed_type): Likewise.
10146 * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
10147 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
10148 (init_decl_processing): Only create TItype nodes when
10149 HOST_BITS_PER_WIDE_INT is >= 64 bits.
10150 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
10151 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
10152
10153 Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10154
10155 * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
10156 (gxx.gperf): Update comments describing invocation flags.
10157 (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
10158
10159 1998-10-07 Mark Mitchell <mark@markmitchell.com>
10160
10161 * class.c (finish_struct_1): Add commentary on previous change.
10162
10163 * cp-tree.h (vtbl_ptr_type_node): New variable.
10164 * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
10165 already of the right type.
10166 (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
10167 Simplify code to grow vtable.
10168 * decl.c (vtbl_ptr_type_node): Define.
10169 (init_decl_processing): Initialize it.
10170
10171 1998-10-06 Mark Mitchell <mark@markmitchell.com>
10172
10173 * cp-tree.def (PTRMEM_CST): New tree node.
10174 * cp-tree.h (ptrmem_cst): New type.
10175 (lang_type): Remove local_typedecls.
10176 (dummy): Increase to 12 bits from 11.
10177 (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
10178 (PTRMEM_CST_CLASS): New macro.
10179 (PTRMEM_CST_MEMBER): Likewise.
10180 (current_access_specifier): New variable.
10181 (current_class_type): Remove duplicate declaration.
10182 (finish_struct): Change prototype.
10183 (unreverse_member_declarations): New function.
10184 (pushdecl_class_level): Change prototype.
10185 (grok_enum_decls): Remove.
10186 (fixup_anonymous_union): New function.
10187 (grok_x_components): Change prototype.
10188 (tsubst_chain): Remove.
10189 (finish_member_template_decl): Likewise.
10190 (check_explicit_specialization): Fix indentation.
10191 (finish_class_definition): Change prototype.
10192 (finish_member_class_template): Likewise.
10193 (finish_member_declaration): New function.
10194 (check_multiple_declarators): Likewise.
10195 * class.c (class_stack_node_t): New type.
10196 (current_class_base): Remove.
10197 (current_class_stack): Change type.
10198 (current_access_specifier): New variable.
10199 (grow_method): Remove.
10200 (check_member_decl_is_same_in_complete_scope): Break out from
10201 finish_struct.
10202 (make_method_vec): New function.
10203 (free_method_vec): Likewise.
10204 (add_implicitly_declared_members): Break out from finish_struct_1.
10205 (free_method_vecs): New variable.
10206 (add_method): Rework for direct use from parser.
10207 (handle_using_decl): Watch for NULL_TREE while iterating through
10208 CLASSTYPE_METHOD_VEC.
10209 (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
10210 just do some error-checking.
10211 (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
10212 (finish_struct_1): Simplify. Use add_implicitly_declared_members.
10213 (finish_struct): Change prototype. Simplify; fields and methods
10214 are already set up at this point.
10215 (init_class_processing): Set up current_class_stack.
10216 (pushclass): Save current_access_specifier.
10217 (popclass): Restore it.
10218 (currently_open_class): Simplify.
10219 (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
10220 * decl.c (saved_scope): Add access_specifier.
10221 (maybe_push_to_top_level): Save it.
10222 (pop_from_top_level): Restore it.
10223 (maybe_process_template_type_declaration): Use
10224 finish_member_declaration.
10225 (pushtag): Likewise.
10226 (pushdecl_class_level): Don't return a value.
10227 (fixup_anonymous_union): Break out from grok_x_components.
10228 (shadow_tag): Use it.
10229 (xref_tag): Complain about using an elaborated type specifier to
10230 reference a template type parameter or typedef name.
10231 (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
10232 (current_local_enum): Remove.
10233 (build_enumerator): Call finish_member_declaration.
10234 (grok_enum_decls): Remove.
10235 * decl2.c (grok_x_components): Simplify.
10236 (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
10237 (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
10238 (merge_functions): Add to comment.
10239 (arg_assoc_type): Prototype.
10240 (arg_assoc): Pass as many arguments as there are parameters.
10241 * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of
10242 OFFSET_REF.
10243 * expr.c (cpls_expand_expr): Remove dead code. Handle
10244 PTRMEM_CST.
10245 * friend.c (do_friend): Lookup friends when in nested classes.
10246 Change comments.
10247 * init.c (build_offset_ref): Do lookup even for classes that are
10248 only partially defined.
10249 (decl_constant_value): Remove dead code.
10250 * method.c (build_overload_value): Remove hack where by TYPE was
10251 not a TYPE. Handle PTRMEM_CST.
10252 (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
10253 should go.
10254 * parse.y (components, notype_components, component_decl,
10255 component_decl_1, component_declarator, component_declarator0):
10256 Now all are itype rather than ttype. Rework to add members to
10257 classes on the fly.
10258 (typesqpecqual_reserved): Use check_multiple_declarators.
10259 (structsp): Update class to finish_class_definition.
10260 (do_xref_defn): Unsplit into named_class_head.
10261 (access_specifier): Set current_access_specifier.
10262 * pt.c (set_current_access_from_decl): New function.
10263 (finish_member_template_decl): Don't take the parameters.
10264 (comp_template_args): Make more robust.
10265 (lookup_template_class): Don't use current_local_enum.
10266 (for_each_template_parm): Handle PTRMEM_CST.
10267 (instantiate_class_template): Use set_current_access_from_decl,
10268 finish_member_declaration and unreverse_member_declarations. Set
10269 lineno/input_filename before generating implicit member functions.
10270 (type_unification_real): Don't assume back-unification happens
10271 only for the last argument.
10272 (regenerate_decl_from_template): Call pushclass a bit earlier.
10273 (tsubst_chain): Remove.
10274 (tsubst_enum): Use set_current_access_from_decl.
10275 (set_mangled_name_for_template_decl): Fix indentation.
10276 * search.c (lookup_fnfields_1): Change iteration through
10277 CLASSTYPE_METHOD_VEC.
10278 (dfs_pushdecls): Likewise.
10279 (dfs_compress_decls): Likewise.
10280 (add_conversions): Likewise.
10281 * semantics.c (finish_class_definition): Don't take components.
10282 Change call to finish_struct.
10283 (finish_member_declaration): New function.
10284 (finish_member_class_template): Don't take template parameters.
10285 Change call to grok_x_components. Call finish_member_template_decl.
10286 (check_multiple_declarators): New function.
10287 * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
10288 a passed in fieldlist.
10289 * tree.c (search_tree): Handle PTRMEM_CST.
10290 (mapcar): Likewise.
10291 * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
10292 INTEGER_CSTs, for pointer-to-data members.
10293
10294 * call.c (resolve_args): Resolve template specializations, if
10295 possible.
10296
10297 Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10298
10299 * Makefile.in (spew.o): Depend on toplev.h.
10300
10301 * call.c (compare_ics): Initialize variables `deref_from_type2',
10302 `deref_to_type1' and `deref_to_type2'.
10303
10304 * except.c (get_eh_type): Hide prototype and definition.
10305 (process_start_catch_block_old): Remove unused static prototype.
10306
10307 * pt.c (tsubst_decl): Initialize variable `argvec'.
10308
10309 * spew.c: Include toplev.h.
10310
10311 1998-10-05 Jason Merrill <jason@yorick.cygnus.com>
10312
10313 * pt.c (instantiate_decl): Do save and restore file position.
10314
10315 1998-10-05 Martin von Löwis <loewis@informatik.hu-berlin.de>
10316
10317 * method.c (build_decl_overload_real): Clear
10318 numeric_output_need_bar after __.
10319
10320 1998-10-05 Nathan Sidwell <nathan@acm.org>
10321
10322 * call.c (build_new_method_call): Issue 'incomplete type' error,
10323 if class is not defined.
10324
10325 1998-10-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10326
10327 * call.c (build_object_call): Move declaration of variable
10328 `fn' into the scope where it is used. Don't access variable
10329 `fn' when it is uninitialized, instead use `fns'.
10330
10331 1998-10-04 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10332
10333 * errfn.c (cp_thing): Print buf as a string not as a printf format
10334 to avoid problems with the operator%. Consequently, `%%' sequences
10335 in format are copied as `%' in buf.
10336
10337 1998-10-04 Jason Merrill <jason@yorick.cygnus.com>
10338
10339 * pt.c (pop_tinst_level): Call extract_interface_info.
10340 (instantiate_decl): Don't save and restore file position.
10341
10342 * decl.c (cp_finish_decl): Make statics in extern inlines and
10343 templates common, if possible and the target doesn't support weak
10344 symbols.
10345
10346 * decl.c (grokdeclarator): Remove redundant calls to
10347 build_type_variant and some duplicated code.
10348 * sig.c (build_signature_reference_type): Only take the type parm.
10349 (build_signature_pointer_type): Likewise.
10350 * tree.c (build_cplus_method_type): Adjust.
10351 * cp-tree.h: Update.
10352
10353 1998-10-04 Mark Mitchell <mark@markmitchell.com>
10354
10355 * call.c (build_over_call): Make pedwarns about dropped qualifiers
10356 into full-fledged errors.
10357 * cvt.c (convert_to_reference): Likewise.
10358 * typeck.c (convert_for_assignment): Likewise.
10359
10360 * search.c (expand_upcast_vtables): In addition to unsetting
10361 TREE_READONLY, remove top-level const type qualifier.
10362
10363 1998-10-03 Mark Mitchell <mark@markmitchell.com>
10364
10365 * class.c (current_class_ptr, current_class_ref): Clarify
10366 documentation.
10367 * cvt.c (ocp_convert): Don't expect fold to remove all trivial
10368 NOP type conversions.
10369 * decl.c (decls_match): Use comptypes directly; ignore
10370 qualifiers on the DECL.
10371 (duplicate_decls): Remove qualifier checks on DECL.
10372 (grokdeclarator): Make the type built up include top-level
10373 qualifiers.
10374 * decl2.c (do_dtors): Fix spelling error.
10375 * error.c (dump_simple_decl): Don't look at qualifiers on the decl
10376 when printing type information.
10377 * init.c (build_new_1): Add documentation. Deal with the fact
10378 that type of allocated memory now contains qualifiers.
10379 * lex.c (is_global): Improve error-recovery.
10380 * sig.c (build_member_function_pointer): Don't cast away const
10381 on fields of sigtable_entry_type.
10382 * tree.c (lvalue_type): Don't look at top-level qualifiers on
10383 expressions.
10384 * typeck.c (decay_conversion): Likewise.
10385 (build_component_ref): Make sure the type of the COMPONENT_REF
10386 contains top-level qualifiers, as appropriate. Improve
10387 error-handling.
10388 (build_indirect_ref): Simplify. Don't strip top-level qualifiers.
10389 (build_array_ref): Likewise.
10390 (build_unary_op): Improve error-recovery.
10391 (unary_complex_lvalue): Make taking the address a bound member
10392 function an error, not a sorry.
10393 (build_conditional_expr): Look at the type qualifiers, not the
10394 qualifiers on the expression itself.
10395
10396 1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
10397
10398 * decl2.c (merge_functions): Remove duplicates.
10399
10400 * decl2.c: Add -f{no-,}implicit-inline-templates.
10401 (import_export_decl): Check it.
10402
10403 * decl.c (lookup_name_real): Template parms also take precedence
10404 over implicit typename. Only warn if yylex.
10405
10406 * typeck.c (build_conditional_expr): Only fold if ifexp is an
10407 INTEGER_CST.
10408
10409 * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
10410 instead of linkage.
10411
10412 1998-10-01 Jason Merrill <jason@yorick.cygnus.com>
10413
10414 * cp-tree.h (FORMAT_VBASE_NAME): New macro.
10415 * class.c (build_vbase_pointer): Use it.
10416 * rtti.c (expand_class_desc): Likewise.
10417 * tree.c (build_vbase_pointer_fields): Likewise.
10418
10419 Thu Oct 1 10:43:45 1998 Nick Clifton <nickc@cygnus.com>
10420
10421 * decl.c (start_decl): Add invocation of
10422 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
10423 (start_function): Add invocation of
10424 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
10425
10426 * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
10427 HANDLE_GENERIC_PRAGMAS.
10428
10429 1998-09-28 Anthony Green <green@cygnus.com>
10430
10431 * semantics.c (finish_asm_stmt): Always permit volatile asms.
10432
10433 1998-09-28 Mark Mitchell <mark@markmitchell.com>
10434
10435 * decl.c (grokdeclarator): Tighten checks for invalid
10436 destructors. Improve error-messages and error-recovery.
10437 * decl2.c (check_classfn): Don't assume that mangled destructor
10438 names contain type information.
10439
10440 1998-09-25 Jason Merrill <jason@yorick.cygnus.com>
10441
10442 * search.c (get_base_distance): Remove assert.
10443
10444 * decl2.c (build_anon_union_vars): Don't process a field with no
10445 name.
10446 (finish_anon_union): Also complain about local anon unions with no
10447 members.
10448
10449 1998-09-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
10450
10451 * decl.c (lookup_namespace_name): If the name is a namespace,
10452 return it immediately.
10453
10454 Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10455
10456 * cp-tree.h (define_case_label): Remove unused parameter.
10457 (check_java_method): Likewise.
10458 (grokclassfn): Likewise.
10459 (expand_aggr_init): Likewise.
10460 (build_x_delete): Likewise.
10461 (maybe_end_member_template_processing): Likewise.
10462 (unshare_base_binfos): Add prototype.
10463 (string_conv_p): Likewise.
10464 (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
10465
10466 * cvt.c (build_up_reference): Remove unused parameter
10467 `checkconst', all callers changed.
10468 (build_type_conversion): Mark parameter `code' with
10469 ATTRIBUTE_UNUSED.
10470 (build_expr_type_conversion): Initialize variable `conv'.
10471
10472 * decl.c (push_namespace): Initialize variable `d'.
10473 (define_case_label): Remove unused parameter `decl', all callers
10474 changed.
10475
10476 * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
10477 `argc' with ATTRIBUTE_UNUSED.
10478 (grokclassfn): Remove unused parameter `cname', all callers
10479 changed.
10480 (check_java_method): Likewise for parameter `ctype'.
10481 (copy_assignment_arg_p): Mark parameter `virtualp' with
10482 ATTRIBUTE_UNUSED.
10483 (finish_prevtable_vardecl): Likewise for parameter `prev'.
10484
10485 * expr.c (extract_init): Likewise for parameters `decl' and `init'.
10486
10487 * init.c (expand_aggr_init_1): Remove unused parameter
10488 `alias_this', all callers changed.
10489 (expand_aggr_init): Likewise.
10490 (expand_default_init): Likewise.
10491 (build_new_1): Initialize variable `susp'.
10492 (build_x_delete): Remove unused parameter `type', all callers
10493 changed.
10494
10495 * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
10496 ATTRIBUTE_UNUSED.
10497 (readescape): Use (unsigned) value in shift.
10498 (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when
10499 comparing to a signed quantity.
10500
10501 * pt.c (maybe_end_member_template_processing): Remove unused
10502 parameter `decl', all callers changed.
10503 (check_explicit_specialization): Add braces around empty body in
10504 an else-statement.
10505 (current_template_args): Initialize variable `args'.
10506 (lookup_template_class): Likewise for variable `prev_local_enum'.
10507 (tsubst_decl): Likewise for variable `r'.
10508 (set_mangled_name_for_template_decl): Initialize variable
10509 `context'.
10510
10511 * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
10512 Likewise for variable `i'.
10513 (yylex): Initialize variable `trrr'.
10514
10515 * typeck.c (compparms): Mark variable `strict' with
10516 ATTRIBUTE_UNUSED.
10517
10518 * xref.c (simplify_type): Cast argument of ctype function to
10519 `unsigned char'.
10520
10521 1998-09-24 Mark Mitchell <mark@markmitchell.com>
10522
10523 * cp-tree.h (language_lvalue_valid): Remove.
10524 * decl.c (grokdeclarator): Don't disallow references to functions.
10525 * tree.c (lvalue_p_1): New function, combining duplicated
10526 code from ...
10527 (lvalue_p): Use it.
10528 (real_lvalue_p): Likewise.
10529 * typeck.c (language_lvalue_valid): Remove.
10530 (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
10531 they don't have TREE_READONLY set.
10532 * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
10533
10534 1998-09-24 Benjamin Kosnik <bkoz@loony.cygnus.com>
10535
10536 * spew.c (yylex): Give diagnostic.
10537 * hash.h (is_reserved_word): Add export.
10538 * gxx.gperf: Likewise.
10539 * lex.h (rid): Add RID_EXPORT.
10540 * lex.c (init_parse): Likewise.
10541
10542 Tue Sep 22 21:01:19 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
10543
10544 * friend.c (do_friend): Make warning a full sentence.
10545
10546 1998-09-22 Mark Mitchell <mark@markmitchell.com>
10547
10548 * parse.y (component_decl_list): Improve error-recovery.
10549
10550 1998-09-22 Benjamin Kosnik <bkoz@loony.cygnus.com>
10551
10552 * decl.c (make_typename_type): Move error to point where name
10553 variable can be used by dump_type.
10554
10555 1998-09-22 Mark Mitchell <mark@markmitchell.com>
10556
10557 * decl.c (grokfndecl): Improve error-recovery.
10558 * decl2.c (grokfield): Likewise.
10559 * pt.c (finish_member_template_decl): Likewise.
10560
10561 1998-09-20 Martin von Löwis <loewis@informatik.hu-berlin.de>
10562
10563 * method.c (hack_identifier): Finding multiple members is always
10564 an error.
10565
10566 1998-09-21 Per Bothner <bothner@cygnus.com>
10567
10568 * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o.
10569
10570 Mon Sep 21 01:53:05 1998 Felix Lee <flee@cygnus.com>
10571
10572 * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
10573
10574 1998-09-20 Mark Mitchell <mark@markmitchell.com>
10575
10576 * class.c (maybe_warn_about_overly_private_class): Reformat.
10577
10578 1998-09-17 Andrew MacLeod <amacleod@cygnus.com>
10579
10580 * exception.cc (__cplus_type_matcher): Realign some code.
10581
10582 1998-09-16 Mark Mitchell <mark@markmitchell.com>
10583
10584 * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
10585 (tinfo2.o): Likewise.
10586 (exception.o): Likewise.
10587 (new.o): Likewise.
10588 (opnew.o): Likewise.
10589 (opnewnt.o): Likewise.
10590 (opvnew.o): Likewise.
10591 (opvnewnt.o): Likewise.
10592 (opdel.o): Likewise.
10593 (opdelnt.o): Likewise.
10594 (opvdel.o): Likewise.
10595 (opvdelnt.o): Likewise.
10596
10597 1998-09-16 Richard Henderson <rth@cygnus.com>
10598
10599 * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
10600
10601 1998-09-15 Alexandre Oliva <oliva@dcc.unicamp.br>
10602
10603 * call.c (build_field_call): Handle static data members too.
10604
10605 * typeck.c (comptypes): When comparing pointer types, check
10606 whether referred types match even in strictest modes.
10607
10608 1998-09-15 Mark Mitchell <mark@markmitchell.com>
10609
10610 * cp-tree.h: Revert previous change.
10611 (finish_struct_methods): Remove declaration.
10612 * class.c: Revert previous change.
10613 (maybe_warn_about_overly_private_class): New function.
10614 (finish_struct_methods): Declare here, and make static. Remove
10615 unnecessary parameters. Tidy slightly. Use
10616 maybe_warn_about_overly_private_class.
10617 (finish_struct_1): Adjust. Remove check for private constructors,
10618 now done elsewhere.
10619 (finish_struct): Adjust.
10620
10621 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
10622
10623 * except.c (expand_start_catch_block): No need to check for new
10624 exception model.
10625 (process_start_catch_block_old): Deleted.
10626 (process_start_catch_block): Add call to start_decl_1().
10627 (expand_end_catch_block): Add call to end_catch_handler().
10628 * exception.cc (__cplus_type_matcher): Only check the exception
10629 language if there is an exception table.
10630
10631 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
10632
10633 * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
10634 as used to prevent conflicts with virtual function tables.
10635
10636 1998-09-14 Mark Mitchell <mark@markmitchell.com>
10637
10638 * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
10639 (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
10640 * class.c (maybe_class_too_private_p): New function.
10641 (finish_struct_methods): Use it.
10642 (finish_struct_1): Likewise.
10643 (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
10644 appropriate.
10645
10646 * pt.c (check_specialization_scope): Fix spelling error.
10647 (check_explicit_specialization): Remove code to handle explicit
10648 specializations in class scope; they are now correctly diagnosed
10649 as errors.
10650
10651 1998-09-10 Mark Mitchell <mark@markmitchell.com>
10652
10653 * decl.c (pushdecl): Don't copy types if the
10654 DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
10655 type.
10656
10657 1998-09-09 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
10658
10659 * class.c (get_enclosing_class): New function.
10660 (is_base_of_enclosing_class): Likewise.
10661 * cp-tree.h (get_enclosing_class): Declare.
10662 (is_base_of_enclosing_class): Likewise.
10663 * pt.c (coerce_template_parms): Use them.
10664
10665 1998-09-09 Jason Merrill <jason@yorick.cygnus.com>
10666
10667 * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
10668 null to decide whether to use it.
10669
10670 * error.c (dump_type_real): Handle NAMESPACE_DECL.
10671 * parse.y (base_class.1): Avoid crash on error.
10672
10673 1998-09-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
10674
10675 * decl.c (make_typename_type): If context is a namespace, the code
10676 is in error.
10677
10678 1998-09-08 Mumit Khan <khan@xraylith.wisc.edu>
10679
10680 * parse.y (nomods_initdcl0): Set up the parser stack correctly.
10681
10682 1998-09-08 Mark Mitchell <mark@markmitchell.com>
10683
10684 * cp-tree.h (anonymous_namespace_name): Declare.
10685 * decl.c: Define it.
10686 (push_namespace): Use anonymous_namespace_name, rather than local
10687 static anon_name.
10688 * error.c (dump_decl): If a namespace is named
10689 anonymous_namespace_name, call it {anonymous}.
10690
10691 * decl.c (grokparms): Distinguish between references and pointers
10692 in error message.
10693
10694 1998-09-08 Richard Henderson <rth@cygnus.com>
10695 Mark Mitchell <mark@markmitchell.com>
10696
10697 * pt.c (process_partial_specialization): Consistently allocate
10698 and zero tpd.parms based on ntparms. Use tpd2.parms, not
10699 tpd.parms, where appropriate.
10700
10701 Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com)
10702
10703 * Makefile.in (INCLUDES): Update after recent toplevel gcc
10704 reorganizations.
10705
10706 1998-09-05 Mark Mitchell <mark@markmitchell.com>
10707
10708 * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
10709 * class.c (finish_struct): Remove hackery to deal with explicit
10710 specializations in class scope.
10711 * decl.c (grokfndecl): Improve error-recovery.
10712 * decl2.c (grokfield): Likewise.
10713 * pt.c (check_specialization_scope): New function.
10714 (begin_specialization): Call it.
10715 (process_partial_specialization): New function, split out from
10716 push_template_decl. Check partial specializations more
10717 stringently.
10718 (push_template_decl): Call it.
10719 (check_explicit_specialization): Don't attempt to handle explicit
10720 specializations in class scope.
10721 (template_parm_data): Document. Add current_arg and
10722 arg_uses_template_parms.
10723 (mark_template_parm): Set it.
10724 (tsubst_arg_types): Remove unused variable.
10725 * semantics.c (begin_class_definition): Tweak.
10726
10727 1998-09-04 Mark Mitchell <mark@markmitchell.com>
10728
10729 * inc/typeinfo (type_info::type_info(const char*)): Make
10730 `explicit'.
10731
10732 * cp-tree.h (hash_tree_cons_simple): New macro.
10733 * pt.c (tsubst_arg_types): New function. Use hash_tree_cons.
10734 (coerce_template_parms): Use make_temp_vec, instead of
10735 make_tree_vec. Document this behavior.
10736 (lookup_template_class): Likewise.
10737 (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
10738 Remove dead code (and add assertion to check its deadness). Fix
10739 bug w.r.t. exception specifications.
10740
10741 1998-09-03 Jason Merrill <jason@yorick.cygnus.com>
10742
10743 * decl2.c (import_export_vtable): Always make artificials comdat.
10744 (import_export_decl): Likewise.
10745 * pt.c (mark_decl_instantiated): Likewise.
10746
10747 1998-09-03 Mark Mitchell <mark@markmitchell.com>
10748
10749 * cp-tree.h (finish_globally_qualified_member_call_expr):
10750 Rename to ...
10751 (finish_qualified_call_expr).
10752 * semantics.c: Likewise.
10753 * parse.y (primary): Use it.
10754 * method.c (hack_identifier): Remove redundant code.
10755
10756 * init.c (resolve_offset_ref): Call convert_from_reference to
10757 handle members of reference type. Improve error recovery.
10758
10759 1998-09-03 Benjamin Kosnik <bkoz@cygnus.com>
10760
10761 * cp-tree.h: Declare warn_nontemplate_friend.
10762 * decl2.c (lang_decode_option): Set.
10763 * lang-options.h: Add -Wnon-template-friend.
10764 * friend.c (do_friend): Use to toggle non-template function warning.
10765
10766 1998-09-03 Mark Mitchell <mark@markmitchell.com>
10767
10768 * decl.c (finish_enum): Don't resolve CONST_DECLs to their
10769 corresponding INTEGER_CSTs when processing_template_decl.
10770 * pt.c (tsubst_enum): Tweak accordingly.
10771
10772 1998-09-03 Benjamin Kosnik <bkoz@rhino.cygnus.com>
10773
10774 * decl.c (pushdecl_class_level): Add warning here.
10775 (pushdecl): Tweak.
10776
10777 1998-09-02 Jason Merrill <jason@yorick.cygnus.com>
10778
10779 * cvt.c (convert_pointer_to_real): Tidy.
10780 * search.c (get_base_distance_recursive): Simplify.
10781 (get_base_distance): Likewise.
10782
10783 * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
10784 parms.
10785
10786 Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
10787
10788 * lex.c (check_newline): Call HANDLE_PRAGMA before
10789 HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages
10790 if unknown pragmas are encountered.
10791 (handle_sysv_pragma): Interpret return code from
10792 handle_pragma_token (). Return success/failure indication rather
10793 than next unprocessed character.
10794 (pragma_getc): New function: retrieves characters from the
10795 input stream. Defined when HANDLE_PRAGMA is defined.
10796 (pragma_ungetc): New function: replaces characters back into the
10797 input stream. Defined when HANDLE_PRAGMA is defined.
10798
10799 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
10800
10801 * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
10802 * class.c (build_vtable_entry_ref): Likewise.
10803
10804 1998-09-01 Mark Mitchell <mark@markmitchell.com>
10805
10806 * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
10807 * decl2.c (import_export_decl): Likewise.
10808 * pt.c (instantiate_decl): Use it.
10809
10810 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
10811
10812 * decl.c (lookup_name_real): Also do implicit typename thing for
10813 artificial TYPE_DECLs.
10814 * search.c (lookup_field): Likewise.
10815 (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
10816 * semantics.c (begin_constructor_declarator): Use enter_scope_of.
10817 (enter_scope_of): Extract type from implicit typename.
10818 (begin_class_definition): Likewise.
10819 * lex.c (identifier_type): Handle implicit typename when checking
10820 for SELFNAME.
10821
10822 * cp-tree.h: Declare flag_strict_prototype.
10823 * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
10824 -fstrict-prototype.
10825 * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
10826 specified, set it to the value of pedantic.
10827
10828 1998-09-01 Mark Mitchell <mark@markmitchell.com>
10829
10830 * decl2.c (arg_assoc): Handle template-id expressions as arguments.
10831
10832 1998-08-31 Mark Mitchell <mark@markmitchell.com>
10833
10834 * decl.c (finish_enum): Handle member enums of classes declared in
10835 template functions.
10836
10837 * decl2.c (grok_x_components): Strip attributes before calling
10838 groktypename.
10839
10840 1998-08-31 Jason Merrill <jason@yorick.cygnus.com>
10841
10842 * cp-tree.h, decl2.c: Remove support for -fall-virtual,
10843 -fenum-int-equivalence and -fno-nonnull-objects.
10844 * class.c (check_for_override): Remove support for -fall-virtual.
10845 (finish_struct_1): Likewise.
10846 * call.c (build_new_op): Remove support for -fenum-int-equivalence.
10847 * typeck.c (build_binary_op_nodefault): Likewise.
10848 * cvt.c (ocp_convert): Likewise.
10849 * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
10850 * class.c (build_vbase_path): Likewise.
10851
10852 Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org)
10853
10854 * Makefile.in (INTERFACE): New, set to 1.
10855
10856 1998-08-30 Mark Mitchell <mark@markmitchell.com>
10857
10858 * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
10859 comparing with global_namespace.
10860 (dump_aggr_type): Likewise.
10861
10862 * decl.c (grokfndecl): Issue error on declaration of friend
10863 templates with explicit template arguments.
10864
10865 * pt.c (convert_template_argument): New function, split out
10866 from...
10867 (coerce_template_parms): Here.
10868 (tsubst): Attempt better error-recovery.
10869
10870 1998-08-28 Benjamin Kosnik <bkoz@loony.cygnus.com>
10871
10872 * pt.c (decl_template_parm_p): Add checks for
10873 TEMPLATE_TEMPLATE_PARM.
10874
10875 1998-08-28 Mark Mitchell <mark@markmitchell.com>
10876
10877 * lex.c (do_identifier): Fix thinko in previous change.
10878
10879 1998-08-28 Jason Merrill <jason@yorick.cygnus.com>
10880
10881 * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
10882 * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
10883
10884 1998-08-28 Richard Henderson <rth@cygnus.com>
10885
10886 Add support for discarding unused virtual functions.
10887 * lang-options.h: Add -fvtable-gc.
10888 * cp-tree.h: Add flag_vtable_gc.
10889 * decl2.c (output_vtable_inherit): New fn.
10890 (finish_vtable_vardecl): Call it.
10891 * class.c (build_vtable_entry_ref): New fn.
10892 (build_vtbl_ref): Call it.
10893
10894 1998-08-28 Mark Mitchell <mark@markmitchell.com>
10895
10896 * cp-tree.h (build_enumerator): Take the enumeration type as a
10897 parameter.
10898 * decl.c (finish_enum): Don't set the TREE_TYPE for the
10899 enumeration constant values if we're processing_template_decls.
10900 Don't set the type for the CONST_DECLs either; that's done in
10901 build_enumerator.
10902 (build_enumerator): Take the enumeration type as a
10903 parameter.
10904 * lex.c (do_identifier): Don't resolve enumeration constants while
10905 processing template declarations, even if they happen to be
10906 TEMPLATE_PARM_INDEXs.
10907
10908 * parse.y (current_enum_type): New variable.
10909 (primary): Don't allow statement-expression in local classes just
10910 as we don't in global classes.
10911 (structsp): Use current_enum_type.
10912 (enum_list): Likewise.
10913 * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
10914 finish_enum; they no longer occur.
10915
10916 * cp-tree.h (finish_base_specifier): New function.
10917 * parse.y (base_class): Use it.
10918 * semantics.c (finish_base_specifier): Define it.
10919
10920 * parse.y (structsp): Warn on use of typename outside of template
10921 declarations.
10922
10923 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
10924
10925 * lex.c (handle_cp_pragma): Remove #pragma vtable.
10926 * lang-options.h: Remove +e options.
10927 * decl2.c (lang_decode_option): Likewise.
10928 (import_export_vtable): Don't check write_virtuals.
10929 (finish_vtable_vardecl, finish_file): Likewise.
10930 * search.c (dfs_debug_mark): Likewise.
10931 * semantics.c (begin_class_definition): Likewise.
10932 * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
10933
10934 * call.c (build_over_call): Check flag_elide_constructors.
10935 * decl2.c: flag_elide_constructors defaults to 1.
10936 * typeck.c (convert_arguments): Remove return_loc parm.
10937 (build_function_call_real): Adjust.
10938
10939 * search.c: Tear out all mi_matrix and memoize code.
10940 (lookup_field, lookup_fnfields): Use scratch_tree_cons.
10941 * lang-options.h: Remove documentation for -fhandle-exceptions,
10942 -fmemoize-lookups and -fsave-memoized.
10943 * cp-tree.h: Lose mi_matrix and memoize support.
10944 * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
10945 * class.c: Lose struct class_level.
10946 (pushclass, popclass): Lose memoize support.
10947 * init.c (build_offset_ref): Likewise.
10948
10949 Never change BINFO_INHERITANCE_CHAIN.
10950 * init.c (emit_base_init): Change modification of
10951 BINFO_INHERITANCE_CHAIN to an assert.
10952 * search.c (get_base_distance_recursive): Likewise.
10953 (get_base_distance): Likewise.
10954 (lookup_member): Likewise.
10955 (convert_pointer_to_single_level): Likewise.
10956 (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs.
10957 (lookup_fnfields): Likewise.
10958 * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
10959 (unshare_base_binfos): Don't call propagate_binfo_offsets.
10960 (layout_basetypes): Call propagate_binfo_offsets instead of
10961 unshare_base_binfos.
10962 * decl.c (xref_basetypes): Call unshare_base_binfos.
10963 * pt.c (instantiate_class_template): Likewise.
10964 * tree.c (reverse_path): Remove 'copy' parm; always make a
10965 temporary copy.
10966 * class.c (build_vbase_path): Just call it.
10967 * search.c (compute_access): Likewise. Don't re-reverse.
10968
10969 1998-08-27 Mark Mitchell <mark@markmitchell.com>
10970
10971 * class.c (build_vbase_path): Use reverse_path.
10972 (finish_base_struct): Move warnings for inaccessible bases to
10973 layout_basetypes.
10974 (modify_one_vtable): Remove check of TREE_USED (binfo).
10975 (fixup_vtable_deltas1): Likewise.
10976 * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
10977 (xref_tag): Remove binfos parameter.
10978 (make_binfo): Remove chain parameter.
10979 (reverse_path): Add copy parameter.
10980 * decl.c (init_decl_processing): Change calls to xref_tag.
10981 (xref_tag): Remove binfos parameter.
10982 (xref_basetypes): Change calls to make_binfo.
10983 * decl2.c (grok_x_components): Change calls to xref_tag.
10984 (handle_class_head): Likewise.
10985 * friend.c (do_friend): Likewise.
10986 * lex.c (make_lang_type): Change calls to make_binfo.
10987 * parse.y (structsp): Change calls to xref_tag.
10988 (named_complex_class_head_sans_basetype): Likewise.
10989 (named_class_head): Likewise.
10990 * rtti.c (init_rtti_processing): Likewise.
10991 * search.c (compute_access): Change calls to reverse_path.
10992 (dfs_get_vbase_types): Change calls to make_binfo.
10993 (get_vbase_types): Remove dead code.
10994 * tree.c (unshare_base_binfos): Change calls to make_binfo.
10995 (layout_basetypes): Warn here about inaccessible bases.
10996 (make_binfo): Remove chain parameter.
10997 (reverse_path): Add copy parameter.
10998
10999 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
11000
11001 * class.c: #if 0 complete_type_p.
11002 * init.c (build_java_class_ref, build_new_1): Remove unused locals.
11003 * method.c (process_overload_item): Likewise.
11004 * typeck.c (comp_target_types): Likewise.
11005
11006 Stop sharing binfos for indirect virtual bases.
11007 * tree.c (propagate_binfo_offsets): Unshare vbases, too.
11008 (layout_basetypes): Likewise.
11009 (unshare_base_binfos): Copy vbases, too.
11010 * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
11011 BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
11012 (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
11013 CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
11014 * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
11015 reference to BINFO_VIA_PUBLIC.
11016 (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
11017 (push_class_decls): Use them.
11018 (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
11019 (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
11020
11021 1998-08-27 Mark Mitchell <mark@markmitchell.com>
11022
11023 * decl.c (build_enumerator): Set DECL_CONTEXT for the
11024 CONST_DECLs.
11025
11026 1998-08-26 Mark Mitchell <mark@markmitchell.com>
11027
11028 * cp-tree.h (finish_enum): Change prototype.
11029 * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
11030 VALUES parameter. Don't try to compute mins/maxs if
11031 processing_template_decl.
11032 * parse.y (structsp): Use new calling sequence for finish_enum.
11033 * pt.c (tsubst_enum): Likewise. Take the new type as input.
11034 (lookup_template_class): Remove unused variables. Tweak.
11035 Register enums on instantiation list before substituting
11036 enumeration constants.
11037 (tsubst_decl): Remove unused variables.
11038 (regenerate_decl_from_template): Likewise.
11039
11040 * decl.c (duplicate_decls): Don't obliterate the
11041 DECL_TEMPLATE_INFO for a template if we're not replacing it with
11042 anything.
11043
11044 * lex.c (do_identifier): Fix typo in comment.
11045
11046 Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11047
11048 * errfn.c: Remove stdarg.h/varargs.h.
11049 * tree.c: Likewise.
11050
11051 1998-08-25 Brendan Kehoe <brendan@cygnus.com>
11052
11053 * pt.c (tsubst_copy): Only do typename overloading on an
11054 IDENTIFIER_NODE that happens to look like a typename if it actually
11055 has a type for us to use.
11056
11057 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
11058
11059 * typeck.c (comp_cv_target_types): Split out...
11060 (comp_target_types): From here. Don't allow cv-qual changes under
11061 a pointer if nptrs == 0. Fix OFFSET_TYPE handling.
11062 (build_ptrmemfunc): Pass 1 to nptrs.
11063 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
11064
11065 1998-08-25 Mark Mitchell <mark@markmitchell.com>
11066
11067 * search.c (dependent_base_p): Don't compare a binfo to
11068 current_class_type; use the TREE_TYPE of the binfo instead.
11069
11070 * cp-tree.h (CLASS_TYPE_P): Revise definition.
11071
11072 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
11073
11074 * decl.c (duplicate_decls): Don't complain about different
11075 exceptions from an internal decl even if pedantic.
11076
11077 * typeck.c (convert_for_assignment): Converting from pm of vbase
11078 to derived is an error, not a sorry.
11079
11080 * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
11081 * class.c (fixed_type_or_null): Rename from
11082 resolves_to_fixed_type_p. Return the dynamic type of the
11083 expression, if fixed, or null.
11084 (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type
11085 does not match the static type.
11086 (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use
11087 resolves_to_fixed_type_p again.
11088
11089 1998-08-24 Mark Mitchell <mark@markmitchell.com>
11090
11091 * pt.c (tsubst_decl): Move special case code for dealing with
11092 tricky friend templates here from ...
11093 (regenerate_decl_from_template): Here.
11094
11095 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
11096
11097 * decl.c (start_decl): Remove redundant linkage check.
11098
11099 1998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
11100
11101 * typeck.c (c_expand_return): Handle the case that valtype
11102 is wider than the functions return type.
11103
11104 1998-08-24 Mark Mitchell <mark@markmitchell.com>
11105
11106 * cp-tree.h (CLASS_TYPE_P): New macro.
11107 * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
11108 * pt.c (process_template_parm): Undo previous change.
11109
11110 1998-08-24 Benjamin Kosnik <bkoz@cygnus.com>
11111
11112 * cp-tree.h: Declare.
11113 * pt.c (decl_template_parm_p): New function.
11114 * decl.c (pushdecl): Check decls for redeclaring template parms.
11115 (xref_tag): Make redeclaration an error, print decl.
11116 * decl2.c (grokfield): Check field_decls for redeclaration as well.
11117
11118 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
11119
11120 * parse.y (primary): Fix up the type of string constants.
11121
11122 1998-08-24 Mark Mitchell <mark@markmitchell.com>
11123
11124 * typeck.c (convert_for_initialization): Move check for odd uses
11125 of NULL to avoid duplicate warnings.
11126
11127 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
11128
11129 * tree.c (lvalue_type): Fix for arrays.
11130 * typeck.c (string_conv_p): New fn.
11131 (convert_for_assignment): Use it.
11132 (build_unary_op): Use lvalue_type.
11133 * call.c (standard_conversion, convert_like): Use string_conv_p.
11134 (add_function_candidate): Use lvalue_type.
11135 * cvt.c (convert_to_reference): Likewise.
11136 * decl2.c (lang_decode_option): Ignore -traditional.
11137 * decl.c (init_decl_processing): flag_writable_strings inhibits
11138 flag_const_strings.
11139
11140 1998-08-24 Andrew MacLeod <amacleod@cygnus.com>
11141
11142 * lang-options.h (lang_options): Add fconst-strings to the list
11143 of valid options.
11144 * decl2.c (lang_f_options, lang_decode_option): Likewise.
11145
11146 1998-08-24 Nathan Sidwell <nathan@acm.org>
11147
11148 * lex.c (real_yylex): Don't warn about long long constants if
11149 we're allowing long long.
11150
11151 1998-08-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
11152
11153 * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
11154 accessing bindings directly.
11155
11156 * search.c (my_tree_cons): Reimplement.
11157
11158 * lang-specs.h: Remove __HONOR_STD.
11159 * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
11160
11161 1998-08-23 Mark Mitchell <mark@markmitchell.com>
11162
11163 * decl.c (grokdeclarator): Complain about in-class initialization
11164 of aggregates and/or references.
11165 * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
11166 TEMPLATE_TYPE_PARMs.
11167
11168 * decl2.c (grok_array_decl): Add comment.
11169 (mark_used): Don't instantiate an explicit instantiation.
11170 * friend.c (make_friend_class): Remove bogus comment. Fix check
11171 for partial specializations.
11172 * pt.c (check_explicit_specialization): Don't
11173 SET_DECL_EXPLICIT_INSTANTIATION here.
11174 (mark_decl_instantiated): Or here.
11175 (do_decl_instantiation): Do it here, instead. Add checks for
11176 duplicate explicit instantiations, etc. Tidy.
11177 (do_type_instantiation): Likewise.
11178 (instantiate_decl): Improve comments. Complain about explicit
11179 instantiations where no definition is available.
11180
11181 * cp-tree.h (ansi_null_node): Remove.
11182 * call.c (build_over_call): Warn about converting NULL to an
11183 arithmetic type.
11184 * cvt.c (build_expr_type_conversion): Likewise. Use
11185 null_ptr_cst_p instead of expanding it inline.
11186 * decl.c (ansi_null_node): Remove.
11187 (init_decl_processing): Make null_node always have integral type.
11188 * except.c (build_throw): Warn about converting NULL to an
11189 arithmetic type.
11190 * lex.c (init_parse): Remove handling of ansi_null_node.
11191 * pt.c (type_unification_real): Don't convert NULL to void* type.
11192 * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
11193 (convert_for_assignment): Warn about converting NULL to an
11194 arithmetic type.
11195 (convert_for_initialization): Likewise.
11196
11197 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
11198
11199 * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
11200 * pt.c (coerce_template_parms): Use no_linkage_check.
11201 * decl.c (grokvardecl): Likewise.
11202 (grokfndecl): Likewise. Members of anonymous types have no linkage.
11203
11204 * method.c (process_overload_item): Remove useless code.
11205
11206 1998-08-20 Per Bothner <bothner@cygnus.com>
11207
11208 Handle new'ing of Java classes.
11209 * init.c (build_class_classref): New function.
11210 (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject;
11211 constructor does not return this; don't need to exception-protect.
11212
11213 * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag.
11214 * decl2.c (acceptable_java_type): Handle template-derived types.
11215
11216 1998-08-20 Per Bothner <bothner@cygnus.com>
11217
11218 * decl2.c (import_export_vtable): Suppress vtables for Java classes.
11219
11220 1998-08-20 Mark Mitchell <mark@markmitchell.com>
11221
11222 * decl.c (duplicate_decls): Always merge the old and new patterns
11223 for templates, regardless of whether or not the new one has
11224 DECL_INITIAL. Don't throw away specializations. Merge
11225 DECL_SAVED_TREE.
11226 * pt.c (tsubst_decl): Use the right pattern when calculating the
11227 complete args for a new template instance.
11228 (do_decl_instantiation): Fix typo in comment.
11229 (regenerate_decl_from_template): Deal with tricky friend template
11230 case.
11231 (instantiate_decl): Likewise.
11232
11233 Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com)
11234
11235 * init.c (build_builtin_delete_call): Add missing assemble_external
11236 call.
11237
11238 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
11239
11240 * parse.y (notype_unqualified_id): Also accept ~A<int>.
11241
11242 1998-08-19 Mark Mitchell <mark@markmitchell.com>
11243
11244 * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
11245 arithmetic.
11246 * except.c (build_throw): Warn when NULL is thrown, even with
11247 -ansi. Use ansi_null_node, rather than integer_zero_node, in the
11248 thrown expression.
11249
11250 * cp-tree.h (ansi_null_node): New variable.
11251 * decl.c (ansi_null_node): New variable.
11252 (init_decl_processing): Initialize its type.
11253 * lex.c (init_parse): Initialize its value. Use ansi_null_node
11254 for null_node in non-ANSI mode.
11255 * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
11256 place of null_node to avoid spurious errors.
11257
11258 1998-08-17 Mark Mitchell <mark@markmitchell.com>
11259
11260 * cp-tree.h (enter_scope_of): New function.
11261 * parse.y (complex_direct_notype_declarator): Use it.
11262 * semantics.c (enter_scope_of): New function.
11263
11264 1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
11265
11266 * decl.c (grokparms): No, here.
11267
11268 * decl.c (grokdeclarator): Catch parm with pointer to array of
11269 unknown bound here...
11270 * method.c (process_overload_item): ...not here.
11271
11272 * gxxint.texi: Remove obsolete documentation of overloading code.
11273
11274 * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
11275 * class.c (finish_struct_bits): Likewise.
11276
11277 * tree.c (lvalue_type): Fix for arrays.
11278 * typeck.c (build_unary_op): Use lvalue_type.
11279 * call.c (add_function_candidate): Likewise.
11280 * cvt.c (convert_to_reference): Likewise.
11281
11282 * decl2.c (lang_decode_option): Ignore -traditional.
11283
11284 * init.c (build_offset_ref): Don't mess with error_mark_node.
11285 * lex.c (do_scoped_id): Use cp_error.
11286
11287 * rtti.c (get_tinfo_fn): Don't mess with the context for now.
11288
11289 1998-08-17 Benjamin Kosnik <bkoz@loony.cygnus.com>
11290
11291 * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
11292
11293 Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com)
11294
11295 * cp-tree.h (set_identifier_local_value): Provide prototype.
11296
11297 * decl2.c (do_namespace_alias): Remove unused variables `binding'
11298 and `old'.
11299
11300 Fri Aug 14 16:42:27 1998 Nick Clifton <nickc@cygnus.com>
11301
11302 * Makefile.in: Rename BBISON to BISON so that it can be properly
11303 inherited from the parent makefile.
11304
11305 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
11306
11307 * lang-options.h: Add -finit-priority.
11308 * decl2.c: Likewise. Check flag_init_priority instead of
11309 USE_INIT_PRIORITY.
11310
11311 * decl2.c (setup_initp): New fn.
11312 (start_objects, finish_objects, do_ctors): Handle init_priority.
11313 (do_dtors, finish_file): Likewise.
11314
11315 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
11316
11317 * pt.c (tsubst_copy): Hush warning.
11318
11319 * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
11320
11321 1998-08-12 Mark Mitchell <mark@markmitchell.com>
11322
11323 * pt.c (print_template_context): Don't abort when instantiating a
11324 synthesized method.
11325
11326 * decl.c (grokdeclarator): Issue errors on namespace qualified
11327 declarators in parameter lists or in class scope.
11328
11329 1998-08-09 Mark Mitchell <mark@markmitchell.com>
11330
11331 * pt.c (check_explicit_specialization): Don't abort on bogus
11332 explicit instantiations.
11333
11334 1998-08-07 Mark Mitchell <mark@markmitchell.com>
11335
11336 * typeck.c (require_complete_type): Use complete_type_or_else.
11337 (complete_type_or_else): Always return NULL_TREE on failure, as
11338 documented.
11339
11340 * pt.c (tsubst_aggr_type): Prototype.
11341 (tsubst_decl): New function, split out from tsubst. Set
11342 input_filename and lineno as appropriate.
11343 (pop_tinst_level): Restore the file and line number saved in
11344 push_tinst_level.
11345 (instantiate_class_template): Set input_filename and lineno as
11346 appropriate.
11347 (tsubst): Move _DECL processing to tsubst_decl. Make sure the
11348 context for a TYPENAME_TYPE is complete.
11349
11350 * decl2.c (grokbitfield): Issue errors on bitfields declared with
11351 function type.
11352 (do_dtors): As in do_ctors, pretend to be a member of the same
11353 class as a static data member while generating a call to its
11354 destructor.
11355
11356 * cvt.c (cp_convert_to_pointer): Handle NULL pointer
11357 conversions, even in complex virtual base class hierarchies.
11358
11359 1998-08-06 Mark Mitchell <mark@markmitchell.com>
11360
11361 * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
11362 (TYPE_TEMPLATE_INFO): Likewise.
11363 (SET_TYPE_TEMPLATE_INFO): Likewise.
11364 (ENUM_TI_TEMPLATE): Likewise.
11365 (ENUM_TI_ARGS): Likewise.
11366 (lookup_nested_type_by_name): Remove.
11367 * decl.c (maybe_process_template_type_declaration): Handle enums.
11368 (start_enum): Don't check for primary-template enum declarations
11369 here.
11370 (finish_enum): Clean up, document. Make sure template enum
11371 constants get the correct type.
11372 (build_enumerator): Copy initializers for template enumerations,
11373 too.
11374 (grok_enum_decls): Document.
11375 * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
11376 better. Build LOOKUP_EXPRs for local variables, even if they are
11377 TREE_PERMANENT.
11378 * pt.c (tsubst_enum): Remove field_chain parameter.
11379 (template_class_depth): Include the depth of surrounding function
11380 contexts.
11381 (push_template_decl): Check for primary-template enum declarations
11382 here. Deal with enumeration templates.
11383 (lookup_template_class): Likewise.
11384 (for_each_template_parm): Likewise.
11385 (instantiate_class_template): Don't call tsubst_enum directly,
11386 call tsubst instead, to instantiate enums. Deal with all
11387 field_chain issues here, not in tsubst_enum.
11388 (lookup_nested_type_by_name): Remove.
11389 (tsubst_aggr_type): Revise handling of enumeration types.
11390 (tsubst): Likewise.
11391 (tsubst_copy): Likewise.
11392 (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
11393
11394 1998-08-04 Mark Mitchell <mark@markmitchell.com>
11395
11396 * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
11397 uses template parameters.
11398 * method.c (build_template_parm_names): Use the full set of
11399 template arguments for tsubst'ing.
11400 (build_overload_identifier): Pass the full set of template
11401 arguments to build_template_parm_names, not just the
11402 innermost_args.
11403 * pt.c (TMPL_ARGS_DEPTH): Define using
11404 TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
11405 (NUM_TMPL_ARGS): New macro.
11406 (add_outermost_template_args): Deal with the case where the outer
11407 args will be completely discarded.
11408 (coerce_template_parms): Use the full set of template arguments
11409 for tsubst'ing. Simplify. Add some asserts. Improve
11410 error messages.
11411 (lookup_template_class): Pass the full set of template arguments
11412 to coerce_template_parms.
11413 (tsubst): Add assertion.
11414 (do_type_instantiation): Don't instantiate member template
11415 classes.
11416
11417 * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
11418 name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
11419
11420 1998-08-03 Jason Merrill <jason@yorick.cygnus.com>
11421
11422 * method.c (set_mangled_name_for_decl): Change return type to void.
11423
11424 * decl.c (lookup_name_real): A namespace-level decl takes priority
11425 over implicit typename. Avoid doing the same lookup twice.
11426
11427 * search.c (dependent_base_p): New fn.
11428 (dfs_pushdecls, dfs_compress_decls): Use it.
11429
11430 * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
11431 virtual functions if the type doesn't have any.
11432
11433 1998-08-03 Mark Mitchell <mark@markmitchell.com>
11434
11435 * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
11436 uses template parameters.
11437
11438 1998-08-02 Mark Mitchell <mark@markmitchell.com>
11439
11440 * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument.
11441 * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
11442 * lex.c (do_identifier): Don't use a second argument, or a type,
11443 when building LOOKUP_EXPRs.
11444 (do_identifier): Likewise.
11445 (do_scoped_id): Likewise.
11446 * method.c (hack_identifier): Improve error message.
11447 * pt.c (lookup_template_function): Don't needlessly call
11448 copy_to_permanent or build_min.
11449 (tsubst_copy): Remove #if 0'd code. tsubst into LOOKUP_EXPRs if
11450 necessary.
11451 (do_decl_instantiation): Improve error message.
11452 * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
11453 (build_min): Copy the type to the permanent obstack, too.
11454
11455 1998-08-01 Jason Merrill <jason@yorick.cygnus.com>
11456
11457 * init.c (init_init_processing): Remove BI* handling.
11458 (build_builtin_call): Remove.
11459 (build_builtin_delete_call): New fn.
11460 (build_delete): Use it.
11461
11462 1998-07-31 Mark Mitchell <mark@markmitchell.com>
11463
11464 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
11465 (maybe_check_template_type): New function.
11466 * decl.c (maybe_process_template_type_declaration): New function,
11467 split out from pushtag Call maybe_check_template_type.
11468 (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P.
11469 (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
11470 * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
11471 * pt.c (template_class_depth_real): Generalization of ...
11472 (template_class_depth): Use it.
11473 (register_specialization): Use duplicate_decls for duplicate
11474 declarations of specializations.
11475 (maybe_check_template_type): New function.
11476 (push_template_decl_real): Fix comment.
11477 (convert_nontype_argument): Likewise.
11478 (lookup_template_class): Likewise. Avoid an infinite loop on
11479 erroneous code.
11480 (tsubst_friend_function): Fix comment.
11481 (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
11482 an IDENTIFIER_NODE.
11483 * semantics.c (begin_function_definition): Use
11484 reset_specialization to note that template headers don't apply
11485 directly to declarations after the opening curly for a function.
11486
11487 1998-07-29 Jason Merrill <jason@yorick.cygnus.com>
11488
11489 * decl.c (push_overloaded_decl): Use current_namespace instead of
11490 DECL_CONTEXT (decl) to determine where we go.
11491
11492 * decl.c (lookup_name_real): Fix typo.
11493
11494 1998-07-28 Mark Mitchell <mark@markmitchell.com>
11495
11496 * friend.c (is_friend): Be lenient with member functions to deal
11497 with nested friends.
11498
11499 1998-07-28 Jason Merrill <jason@yorick.cygnus.com>
11500
11501 * class.c (finish_struct_1): Convert integer_zero_node to
11502 ssizetype before passing it to set_rtti_entry.
11503 * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
11504 of any size to a pointer.
11505
11506 1998-07-27 Mark Mitchell <mark@markmitchell.com>
11507
11508 * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
11509 (build_template_decl_overload): Remove.
11510 (set_mangled_name_for_decl): New function.
11511 (innermost_args): Remove is_spec parameter.
11512 (most_specialized, most_specialized_class): Remove declarations.
11513 (lookup_template_class): Add entering_scope parameter.
11514 (maybe_process_partial_specialization): New function.
11515 (finish_template_decl): Likewise.
11516 (finish_template_type): Likewise.
11517 * class.c (finish_struct): Clean up processing of member template
11518 specializations.
11519 * decl.c (pushtag): Fix formatting.
11520 (lookup_tag): Improve handling of pseudo-global levels.
11521 (make_typename_type): Adjust call to lookup_template_class.
11522 (shadow_tag): Use maybe_process_partial_specialization.
11523 (xref_tag): Improve handling of member friends.
11524 (start_function): Call push_nested_class before
11525 push_template_decl. Don't call push_template_decl for
11526 specializations.
11527 * decl2.c (grok_x_components): Don't call xref_tag for
11528 template instantiations. Handle UNION_TYPEs like RECORD_TYPEs.
11529 (grokclassfn): Use set_mangled_name_for_decl.
11530 (arg_assoc_class): Adjust call to innermost_args.
11531 (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
11532 * error.c (dump_function_name): Improve printing of template
11533 function names.
11534 * friend.c (is_friend): Don't compare types of decls to determine
11535 friendship, unless flag_guiding_decls.
11536 (make_friend_class): Partial specializations cannot be friends.
11537 (do_friend): Use set_mangled_name_for_decl. Call
11538 push_template_decl_real instead of push_template_decl.
11539 * method.c (build_decl_overload_real): Remove prototype. Give it
11540 external linkage.
11541 (build_overload_identififer): Adjust call to innermost_args.
11542 (build_template_decl_overload): Remove.
11543 (set_mangled_name_for_decl): New function.
11544 * parse.y (.finish_template_type): New non-terminal.
11545 (template_def): Use finish_template_decl. Use template_extdef
11546 instead of extdef.
11547 (template_extdef, template_datadef): New non-terminals, containing
11548 only those rules for things which can be templates.
11549 (datadef): Tidy.
11550 (template_type, self_template_type): Use .finish_template_type.
11551 (named_class_head): Use maybe_process_partial_specialization.
11552 * pt.c (mangle_class_name_for_template): Remove context parameter.
11553 (get_class_bindings): Remove outer_args parameter.
11554 (complete_template_args): Remove.
11555 (add_outermost_template_args): New function.
11556 (register_specialization): Return the specialization.
11557 (unregister_specialization): New function.
11558 (tsubst_template_parms): Likewise.
11559 (most_specialized, most_specialized_class): Prototype here as
11560 static.
11561 (original_template): Rename to most_general_template.
11562 (tsubst_template_parms): New function.
11563 (set_mangled_name_for_template_decl): Likewise.
11564 (TMPL_ARGS_DEPTH): New macro.
11565 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
11566 (TMPL_ARGS_LEVEL): New macro.
11567 (SET_TMPL_ARGS_LEVEL): Likewise.
11568 (TMPL_ARG): Likewise.
11569 (SET_TMPL_ARG): Likewise.
11570 (TMPL_ARGS_DEPTH): Likewise.
11571 (finish_member_template_decl): Use finish_template_decl.
11572 (maybe_process_partial_specialization): New function, split out
11573 from tsubst.
11574 (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
11575 (maybe_begin_member_template_processing): Use new macros.
11576 (is_member_template): Likewise.
11577 (is_member_template_class): Likewise.
11578 (add_to_template_args): Likewise. Deal with multiple levels of
11579 args.
11580 (maybe_process_partial_specialization): New function.
11581 (retrieve_specialization): Add consistency check.
11582 (determine_specialization): Return full argument list.
11583 (check_explicit_specialization): Tweak friend handling. Use full
11584 argument lists. Simplify.
11585 (current_template_args): Use new macros.
11586 (push_template_decl_real): Change ill-named mainargs to specargs.
11587 Check that a partial specialization actually specializes at least
11588 one parameter. Improve friend handling. Modify for full
11589 template arguments.
11590 (classtype_mangled_name): Don't mangle the names of
11591 specializations.
11592 (lookup_template_class): Add entering_scope parameter. Use it to
11593 avoid finding a template type when an instantiation is required.
11594 Simplify. Use full template arguments.
11595 (tsubst_friend_function): Use unregister_specialization. Use new
11596 macros. Use full template arguments.
11597 (tsubst_friend_class): Substitute, using tsubst_template_parms,
11598 into the template parameters before passing them to
11599 redeclare_class_template.
11600 (instantiate_class_template): Simplify. Use full template
11601 arguments. Adjust calls to get_class_bindings. Use
11602 SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling.
11603 (innermost_args): Use new macros.
11604 (tsubst_aggr_type): New function, split out from tsubst.
11605 (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
11606 conventions for lookup_template_class. Refine handling of partial
11607 instantiations. Remove calls to complete_template_args.
11608 Simplify. Add consistency checks. Use set_mangled_name_for_decl
11609 and set_mangled_name_for_template_decl.
11610 (tsubst_copy): Use tsubst_aggr_type.
11611 (instantiate_template): Use full template arguments.
11612 (more_specialized): Improve formatting.
11613 (more_specialized_class): Adjust calls to get_class_bindings.
11614 (get_bindings_real): Don't call complete_template_args.
11615 (most_specialized): Don't overwrite input; create a new list.
11616 (most_specialized_class): Use most_general_template.
11617 (regenerate_decl_from_template): Use unregister_specialization.
11618 Use full template arguments.
11619 (instantiate_decl): Use full template arguments.
11620 (set_mangled_name_for_template_decl): New function.
11621 * semantics.c (begin_class_definition): Use
11622 maybe_process_partial_specialization.
11623 (finish_member_class_template): New function.
11624 (finish_template_decl): Likewise.
11625 (finish_template_type): Likewise.
11626 (typeck.c): Don't crash after issuing a compiler_error.
11627 * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
11628
11629 1998-07-27 Jason Merrill <jason@yorick.cygnus.com>
11630
11631 * typeck2.c (build_functional_cast): Handle default-initialization.
11632
11633 * call.c (build_over_call): Pass 1 to popclass.
11634
11635 * parse.y (direct_notype_declarator): Add precedence declaration
11636 to notype_unqualified_id case.
11637 * Makefile.in (EXPECT): Adjust.
11638
11639 * tree.c (ovl_member): Fix for single function in OVL.
11640
11641 1998-07-27 Dave Brolley <brolley@cygnus.com>
11642
11643 * c-lex.c (yylex): Fix boundary conditions in character literal and
11644 string literal loops.
11645
11646 1998-07-24 Jason Merrill <jason@yorick.cygnus.com>
11647
11648 * decl.c (lookup_name_real): OK, do return the from_obj value
11649 unless got_object depends on template parms.
11650
11651 * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
11652
11653 * pt.c (coerce_template_parms): Also complain about local enums.
11654
11655 * cp-tree.h: Add prototype for set_identifier_local_value.
11656 * decl.c (set_identifier_local_value_with_scope): Make static,
11657 prototype.
11658 * search.c (covariant_return_p): Likewise.
11659 * except.c (build_terminate_handler, alloc_eh_object): Likewise.
11660
11661 * call.c (build_method_call): Only pull out the type of a destructor
11662 if it's a template type parm.
11663 * decl.c (lookup_name_real): Never return the from_obj value.
11664
11665 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
11666
11667 * except.c (process_start_catch_block_old): Call start_decl_1 for
11668 catch parm.
11669 * decl.c (start_decl_1): Avoid duplicate error.
11670
11671 * init.c (expand_default_init): Only perform the initialization if
11672 it will do something.
11673
11674 1998-07-23 H.J. Lu (hjl@gnu.org)
11675
11676 * parse.y (base_class): Check for invalid base class.
11677
11678 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
11679
11680 * decl2.c (import_export_template): Fold in...
11681 (import_export_class): ...to here. Handle dllimport/export.
11682
11683 * class.c (build_vtable): Pass at_eof to import_export_vtable.
11684 (prepare_fresh_vtable): Likewise.
11685 * decl2.c (import_export_class): Split out...
11686 (finish_prevtable_vardecl): From here.
11687 * class.c (finish_struct_1): Call import_export_class if at_eof.
11688
11689 * decl.c (start_function): #if 0 mysterious code I wrote and have
11690 forgotten why.
11691 * rtti.c (get_tinfo_fn): If this is for a class type, set
11692 DECL_CONTEXT.
11693
11694 1998-07-22 Jason Merrill <jason@yorick.cygnus.com>
11695
11696 * inc/exception: Change terminate and unexpected to ().
11697
11698 * parse.y (named_class_head_sans_basetype_defn): A
11699 named_class_head_sans_basetype followed by '{' or ':' is a defn.
11700
11701 1998-07-21 Jason Merrill <jason@yorick.cygnus.com>
11702
11703 * tree.c (canonical_type_variant): New fn to handle arrays.
11704 * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
11705 * pt.c (unify, default case): Also fold arg. Fix array bounds case.
11706 * method.c (process_overload_item): Use build_overload_value for
11707 arrays.
11708
11709 1998-07-20 Dave Brolley <brolley@cygnus.com>
11710
11711 * lex.c (mbchar.h): #include it.
11712 (GET_ENVIRONMENT): New macro.
11713 (init_parse): Set character set based on LANG environment variable.
11714 (real_yylex): Handle multibyte characters in character literals.
11715 (real_yylex): Handle multibyte characters in string literals.
11716
11717 1998-07-19 Jason Merrill <jason@yorick.cygnus.com>
11718
11719 * lex.c (do_identifier): Look for class value even if we don't
11720 have a global value. Do implicit declaration if parsing is 2.
11721 * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
11722 lookup.
11723
11724 1998-07-19 Mark Mitchell <mark@markmitchell.com>
11725
11726 * decl.c (pushtag): Revert previous change.
11727 * pt.c (lookup_template_class): Don't put out debugging
11728 information for types that use template parameters.
11729
11730 * decl.c (pushtag): Don't put out debugging information for
11731 compiler-generated typedefs.
11732
11733 * error.c (dump_type_real): Don't crash when presented with
11734 intQI_type_node or the like.
11735
11736 * semantics.c (finish_translation_unit): Fix spelling error in
11737 comment.
11738
11739 1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
11740
11741 * decl.c (lookup_name_real): Pull out single function here.
11742 (select_decl): Not here.
11743 (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
11744
11745 * decl.c (qualify_lookup): Tweak again.
11746
11747 * pt.c (lookup_template_class): Don't mess with the context of the
11748 instantiation.
11749 * decl2.c (current_decl_namespace): Remove special handling for
11750 templates.
11751
11752 * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
11753 a member template specialization.
11754
11755 * tree.c (ovl_member): Use decls_match to compare functions.
11756 * decl.c (decls_match): Check the context of a function.
11757
11758 * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
11759 in Koenig lookup support rules.
11760 * semantics.c (finish_call_expr): Handle the new cases.
11761
11762 * typeck.c (build_x_function_call): Handle overloaded methods.
11763
11764 * decl.c (grokvardecl): Don't call build_static_name for extern "C".
11765
11766 1998-07-16 Mark Mitchell <mark@markmitchell.com>
11767
11768 * semantics.c (finish_object_call_expr): Revert previous change.
11769 * call.c (build_new_method_call): Likewise. Instead, convert
11770 TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
11771
11772 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
11773
11774 * decl.c (qualify_lookup): Handle templates.
11775
11776 * decl2.c (do_using_directive): Don't pass ancestor.
11777 * decl.c (push_using_directive): Calculate ancestor.
11778
11779 * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
11780 * decl.c (pushdecl): Move type shadowing handling from here...
11781 (duplicate_decls): ...to here.
11782 * decl.c (set_identifier_local_value_with_scope): New fn.
11783 (pushdecl): Use it.
11784 (set_identifier_local_value, lookup_type_current_level): New fns.
11785 * decl2.c (do_local_using_decl): Handle types and binding level
11786 stuff properly.
11787
11788 * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
11789 * decl.c (select_decl): Extract a lone function from an OVERLOAD.
11790 (lookup_namespace_name): Likewise.
11791 * typeck.c (build_unary_op): Not here anymore.
11792
11793 * decl2.c (do_class_using_decl): Make sure we get an identifier.
11794 * class.c (handle_using_decl): Ignore TYPE_DECLs.
11795
11796 * decl.c (qualify_lookup): New fn.
11797 (lookup_name_real): Use it.
11798
11799 1998-07-16 Martin v. Loewis <loewis@informatik.hu-berlin.de>
11800
11801 * decl2.c (add_using_namespace): When directly using a namespace
11802 that was indirect before, promote it.
11803
11804 * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
11805 LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
11806 LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
11807 * decl.c (select_decl): Replace two flag parameters by one.
11808 (unqualified_namespace_lookup): Likewise, pass flag.
11809 (lookup_flags): New function.
11810 (lookup_name_real): Compute flags, pass them.
11811 (lookup_namespace_name): Call with zero-flag.
11812 * decl2.c (ambiguous_decl): Add flag parameter, complain only
11813 according to flags.
11814 (lookup_using_namespace, qualified_lookup_using_namespace):
11815 Add flag parameter, pass them through.
11816 * lex.c (do_scoped_id): Call with zero-flag.
11817
11818 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
11819
11820 * typeck.c (convert_for_assignment): Use comptypes.
11821
11822 1998-07-16 Mark Mitchell <mark@markmitchell.com>
11823
11824 * semantics.c (finish_object_call_expr): Move test for the
11825 function called being a TYPE_DECL to ...
11826 * call.c (build_new_method_call): Here.
11827
11828 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
11829
11830 * decl2.c (arg_assoc_class): Also look at template arguments, if any.
11831 (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
11832
11833 * lex.c (looking_for_typename): Don't initialize.
11834
11835 * decl2.c (ambiguous_decl): Clarify error message.
11836
11837 * decl.c (push_using_directive): Iterate over namespaces used
11838 indirectly.
11839
11840 1998-07-15 Martin v. Löwis <loewis@informatik.hu-berlin.de>
11841
11842 * decl2.c (add_using_namespace): Iterate over namespaces used
11843 indirectly.
11844
11845 * decl.c (lookup_name_real): Accept namespace aliases as locals.
11846 (cat_namespace_levels): Ignore aliases.
11847 (duplicate_decls): Ignore duplicate aliases.
11848 * decl2.c (do_namespace_alias): Process block level namespace
11849 aliases. Store alias with pushdecl. Remove odr errors.
11850 * parse.y (namespace_alias): New non-terminal.
11851 (extdef): Use it.
11852
11853 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
11854
11855 * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
11856 Handle TEMPLATE_TYPE_PARM.
11857 (arg_assoc): Rewrite.
11858
11859 * pt.c (complete_template_args): Don't look at the context unless
11860 we have to.
11861
11862 * method.c (build_decl_overload_real): Fix namespace handling.
11863
11864 * typeck.c (build_unary_op): Extract a lone function from an
11865 OVERLOAD.
11866
11867 * call.c (build_scoped_method_call): Handle getting a namespace
11868 for basetype in a destructor call.
11869 (check_dtor_name): Handle enums.
11870
11871 * parse.y (using_directive): New nonterminal.
11872 (extdef, simple_stmt): Use it.
11873
11874 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
11875
11876 * decl2.c (add_function): Move error message ...
11877 (arg_assoc_namespace): ... from here.
11878
11879 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
11880
11881 * parse.y (namespace_qualifier): Fix multiple level handling.
11882 * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
11883 (arg_assoc): Don't skip the first argument of a function.
11884
11885 Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com)
11886
11887 * search.c (my_tree_cons): Clean up.
11888
11889 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
11890
11891 * call.c (joust): Don't warn about "confusing" conversions to the
11892 same type.
11893
11894 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
11895
11896 * class.c (push_nested_class): Complain about namespaces.
11897 * decl.c (start_decl): Enter the object's namespace.
11898 (cp_finish_decl): Leave it.
11899 (grokdeclarator): Likewise.
11900 * decl2.c (check_decl_namespace): New function.
11901 (finish_file): Call it.
11902 * parse.y (complex_direct_notype_declarator): Set complexity
11903 of namespace-qualified ids to -1, enter the namespace.
11904
11905 * method.c (build_template_decl_overload): Expect _DECL as first
11906 parameter. Put context temporarily into current_namespace.
11907 * pt.c (check_explicit_specialization): Change caller.
11908 (tsubst): Likewise.
11909
11910 * init.c (build_offset_ref): Call mark_used and
11911 convert_from_reference for namespace members.
11912
11913 Mon Jul 13 23:25:28 1998 Martin von Löwis <loewis@informatik.hu-berlin.de>
11914
11915 * search.c (my_tree_cons): The bitfield is at index 2.
11916
11917 Mon Jul 13 17:21:01 1998 Nick Clifton <nickc@cygnus.com>
11918
11919 * lang-options.h: Format changed to work with new --help support
11920 in gcc/toplev.c
11921
11922 1998-07-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
11923
11924 * decl2.c (build_expr_from_tree): Change calls of do_identifier.
11925 Do Koenig lookup in CALL_EXPR.
11926 (arg_assoc): Handle error_mark.
11927 * lex.c (is_global): New function.
11928 (do_identifier): Expect arguments for Koenig lookup.
11929 * parse.y (primary): Add rules for calls of unqualified function calls.
11930 (do_id): Change call of do_identifier.
11931 * pt.c (finish_stmt_expr): Likewise.
11932 * semantics.c (finish_id_expr): Likewise.
11933 (finish_call_expr): Add integer parameter to indicate
11934 argument-dependent lookup.
11935
11936 * decl.c (struct binding_level): New field using_directives.
11937 (push_using_decl): Not sorry anymore.
11938 (push_using_directive): New function.
11939 (lookup_tag): Use CP_DECL_CONTEXT to iterate.
11940 (unqualified_namespace_lookup): New function, code from ...
11941 (lookup_name_real): ... here.
11942 * decl2.c (lookup_using_namespace): Pass using list instead of
11943 initial scope.
11944 (validate_nonmember_using_decl): New function.
11945 (do_nonmember_using_decl): New function.
11946 (do_toplevel_using_decl): Use them.
11947 (do_local_using_decl): New function.
11948 (do_using_directive): Support block-level directives.
11949 * parse.y (simple_stmt): Support using declarations and
11950 directives.
11951 (namespace_qualifier, namespace_using_decl): New non-terminals.
11952
11953 * xref.c (classname): New function.
11954 (GNU_xref_hier): Change class and base parameters to tree.
11955 * decl.c (xref_baseypes): Change caller.
11956 * friend.c (make_friend_class): Likewise.
11957
11958 1998-07-12 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
11959
11960 * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
11961 comparison.
11962
11963 * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
11964 template template parameter, record its use.
11965 (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
11966 its template arguments if exists.
11967
11968 * pt.c (coerce_template_template_parms): New function equivalent
11969 to coerce_template_parms when IS_TMPL_PARM is true.
11970 (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter,
11971 all callers changed.
11972
11973 (coerce_template_parms): Access ARGLIST properly when creating a
11974 new vector. Only accept implicit TYPE_DECL as valid argument for
11975 a template template parameter when it is a base class of
11976 current_class_type. Don't display error message when COMPLAIN is
11977 false.
11978
11979 1998-07-12 Klaus Kaempf (kkaempf@progis.de)
11980
11981 * repo.c (get_base_filename): Use file_name_nondirectory.
11982 (open_repo_file): Likewise.
11983 * cp-tree.h (file_name_nondirectory): Add prototype.
11984
11985 1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
11986
11987 * friend.c (do_friend): Pull the identifier out of declarator.
11988 Use cp_error and friends.
11989 * decl2.c (qualified_lookup_using_namespace): Fix call to
11990 purpose_member.
11991 * decl.c (lookup_name_real): Don't call complete_type on a namespace.
11992 (grokvardecl): Use DECL_CLASS_SCOPE_P.
11993 * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
11994 * class.c (warn_hidden): Fix for OVERLOAD.
11995 From grahams@rcp.co.uk:
11996 * cp-tree.h (DEFARG_NODE_CHECK): New macro.
11997 (DEFARG_LENGTH, DEFARG_POINTER): Use it.
11998
11999 Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com)
12000
12001 * g++.1 (-traditional): Remove duplicated documentation.
12002
12003 1998-07-11 Mark Mitchell <mark@markmitchell.com>
12004
12005 * method.c (flush_repeats): Add nrepeats parameter.
12006 (issue_nrepeats): Likewise.
12007 (is_back_referenceable_type): New function. Don't back-reference
12008 TEMPLATE_TYPE_PARMs as well as simple types like integers.
12009 (build_mangled_name_for_type): Likewise.
12010 (build_mangled_name_for_type_with_Gcode): Likewise.
12011 (lasttype): Remove.
12012 (nrepeats): Likewise.
12013 (Nrepeats): Likewise.
12014 (start_squangling): Don't clear the variables removed above.
12015 (end_squangling): Likewise.
12016 (flush_repeats): Tidy. Use nrepeats parameter rather than
12017 Nrepeats global.
12018 (issue_nrepeats): Likewise, but with nrepeats global. Use
12019 is_backreferenceable_type.
12020 (build_overload_nested_name): Tidy. Add comment. Use
12021 build_mangled_name_for_type.
12022 (build_underscore_int): Comment.
12023 (build_overload_scope_ref): Use build_mangled_name_for_type.
12024 (build_overload_int): Likewise.
12025 (build_template_template_parm_names): Tidy.
12026 (build_template_parm_names): Use build_mangled_name_for_type.
12027 (build_overload_identifier): Add comments.
12028 (build_mangled_name_for_type_with_Gcode): Split out from
12029 build_mangled_name.
12030 (build_mangled_name_for_type): Use it.
12031 (build_mangled_name): Rework to use build_mangled_name_for_type
12032 and to not use global nrepeats/Nrepeats. Tidy.
12033 (process_modifiers): Tidy.
12034 (check_btype): Use is_backreferenceable_type. Add comment.
12035 Rename `node' to `type'.
12036 (process_overload_item): Set numeric_output_need_bar here.
12037 Use build_mangled_name_for_type. Tidy.
12038 (build_decl_overload_real): Tidy. Don't use Nrepeats. Use
12039 build_mangled_name_for_type.
12040
12041 * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
12042 for TYPE_DECLs.
12043
12044 1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com>
12045
12046 * cp-tree.h (warn_long_long): Define.
12047 * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
12048 warning "ANSI C++ does not support `long long'".
12049 * decl2.c (warn_long_long): Define.
12050 (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
12051
12052 1998-07-07 Jason Merrill <jason@yorick.cygnus.com>
12053
12054 * decl.c (xref_tag): Handle attributes between 'class' and name.
12055 * parse.y (aggr): Likewise.
12056 * semantics.c (finish_class_definition): Likewise.
12057 * Makefile.in (EXPECTED): Adjust.
12058
12059 * cp-tree.h: Declare flag_optional_diags and warn_multichar.
12060 * decl2.c: Define them.
12061 (lang_decode_option): Handle them.
12062 * lang-options.h: Add -foptional-diags.
12063 * class.c (finish_struct): Don't complain about multiple meanings of
12064 name if -fno-optional-diags.
12065 * decl.c (pushdecl_class_level): Likewise.
12066 * lex.c (real_yylex): Check warn_multichar.
12067
12068 1998-07-06 Jason Merrill <jason@yorick.cygnus.com>
12069
12070 * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
12071
12072 * tree.c (make_binfo): Fix length.
12073
12074 1998-06-30 Benjamin Kosnik <bkoz@bliss.nabi.net>
12075
12076 * decl2.c (lang_decode_option): Remove warn_template_debugging.
12077 * lang-options.h: Likewise.
12078
12079 Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12080
12081 * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
12082 (process_start_catch_block): Likewise for variables
12083 `false_label_rtx', `call_rtx' and `return_value_rtx'.
12084
12085 1998-06-29 Brendan Kehoe <brendan@cygnus.com>
12086
12087 * tree.c (build_srcloc): Make sure we allocate this node on the
12088 permanent obstack.
12089
12090 Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com>
12091
12092 * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
12093 (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
12094 (lang_specific_driver): Only add -lm automatically if need_math is
12095 nonzero.
12096
12097 Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com)
12098
12099 * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o
12100
12101 Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12102
12103 * Makefile.in (EXPR_H): New dependency variable.
12104 (decl2.o): Depend on $(EXPR_H).
12105 (typeck.o): Likewise.
12106 (init.o): Likewise.
12107 (expr.o): Likewise.
12108
12109 1998-06-25 Benjamin Kosnik <bkoz@lisa.cygnus.com>
12110
12111 * decl.c (start_enum): Put local enums on permanent_obstack.
12112
12113 1998-06-25 Mark Mitchell <mark@markmitchell.com>
12114
12115 * cp-tree.h (c_get_alias_set): Declare.
12116 * decl.c (init_decl_processing): Set lang_get_alias_set.
12117
12118 1998-06-25 Andrew MacLeod <amacleod@cygnus.com>
12119
12120 * cp-tree.h (mark_all_runtime_matches): Add function prototype.
12121 * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
12122 flag for all function decls which are in the exception table.
12123 * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
12124 * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
12125 code is emitted for any referenced rtti function.
12126
12127 1998-06-25 Dave Brolley <brolley@cygnus.com>
12128
12129 * lang-specs.h: Use new | syntax to eliminate
12130 string concatenation.
12131
12132 1998-06-25 Jason Merrill <jason@yorick.cygnus.com>
12133
12134 * cp-tree.h (CP_DECL_CONTEXT): New macro.
12135 * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
12136 * method.c (build_overload_nested_name): Likewise.
12137 * sig.c (build_signature_pointer_or_reference_type): Don't set
12138 DECL_CONTEXT.
12139
12140 1998-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
12141
12142 Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
12143 * cp-tree.h (FROB_CONTEXT): New macro.
12144 (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
12145 * decl.c (namespace_binding): Replace NULL_TREE with
12146 global_namespace.
12147 (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
12148 * decl2.c (is_namespace_ancestor, lookup_using_namespace):
12149 Likewise.
12150 * decl.c (pushtag): Use FROB_CONTEXT.
12151 (pushdecl, make_typename_type, define_function, grokdeclarator):
12152 Likewise.
12153 * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
12154 * pt.c (push_template_decl_real, lookup_template_class, tsubst):
12155 Likewise.
12156 * decl2.c (decl_namespace): Return global_namespace if no context.
12157 * method.c (build_overload_nested_name): Expect null as context.
12158 * pt.c (mangle_class_name_for_template): Do nothing for null
12159 contexts.
12160 (lookup_template_class): Allow for null id_context.
12161
12162 1998-06-25 Richard Henderson <rth@cygnus.com>
12163
12164 * method.c (emit_thunk): Set current_function_is_thunk for the
12165 ASM_OUTPUT_MI_THUNK case as well.
12166
12167 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
12168
12169 * exception.cc (__cplus_type_matcher): Get a match_info pointer
12170 instead of an exception table entry as a parameter.
12171
12172 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
12173
12174 * parse.y (function_try_block): Don't call start_catch_handler.
12175 * except.c (call_eh_info): Remove coerced field from declaration.
12176 (build_eh_type_type_ref): New function to create an address of a
12177 rtti function for the new style exception tables.
12178 (expand_start_catch_block): Split function, this contains the
12179 common part.
12180 (process_start_catch_block_old): New function to perform the rest
12181 of expand_start_catch_block under old style exceptions.
12182 (process_start_catch_block_old): New function to perform the rest
12183 of expand_start_catch_block under new style exceptions.
12184 (expand_end_catch_block): Only pop the false label off the stack under
12185 the old style of exceptions.
12186 * semantics.c (finish_try_block): Don't call start_catch_handler.
12187 * exception.cc (struct cp_eh_info): Add original_value field.
12188 (__cplus_type_matcher): Perform type matching on the original exception
12189 value, and if we have a match, set the current value.
12190 (__cp_push_exception): Set the original exception value.
12191
12192 1998-06-23 Jason Merrill <jason@yorick.cygnus.com>
12193
12194 * call.c (joust): Fix confusing conversion warning.
12195
12196 * call.c (build_op_delete_call): Add placement parm. Check
12197 LOOKUP_SPECULATIVELY.
12198 * cp-tree.h, decl2.c, init.c: Adjust.
12199 * decl.c (finish_function): Use it.
12200
12201 * pt.c (tsubst): Diagnose creating void fields or variables.
12202
12203 Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12204
12205 * call.c (build_scoped_method_call): Remove unused variable `tmp'.
12206
12207 * cp-tree.h (check_dtor_name): Add prototype.
12208
12209 * init.c (expand_member_init): Remove unused variables
12210 `ptr_type_node', `parm' and `rval'.
12211
12212 * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
12213 in call to fprintf.
12214 (lang_print_xnode): Likewise.
12215
12216 * typeck2.c (enum_name_string): Cast argument to sprintf to long
12217 and use %ld specifier.
12218
12219 * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
12220 specifier in call to fprintf.
12221 (GNU_xref_member): Cast argument to sprintf to int.
12222
12223 Fri Jun 19 23:22:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
12224
12225 * typeck2.c (pop_init_level): Warn about implicit zero initialization
12226 of struct members.
12227
12228 Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12229
12230 * cp-tree.h: Prototype function `check_java_method'.
12231
12232 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
12233
12234 * class.c (finish_struct): Make conflicting use of id a pedwarn.
12235 * decl.c (pushdecl_class_level): Likewise.
12236
12237 1998-06-17 Mark Mitchell <mark@markmitchell.com>
12238
12239 * pt.c (convert_nontype_argument): Issue an error when presented
12240 with an integer (real) constant that cannot be simplified to an
12241 INT_CST (REAL_CST).
12242
12243 * cp-tree.h (c_get_alias_set): Remove declaration added in
12244 1998-06-13 change that should never have been checked in.
12245
12246 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
12247
12248 * typeck.c (build_binary_op_nodefault): Change % in format strings
12249 to %%.
12250
12251 * decl.c (grokvardecl): Don't build_static_name for decls that
12252 aren't at namespace scope.
12253
12254 * init.c (perform_member_init): Catch default-initialization of
12255 references.
12256
12257 1998-06-17 Mark Mitchell <mark@markmitchell.com>
12258
12259 * errfn.c (cp_thing): Handle the `%%' formatting sequence.
12260
12261 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
12262
12263 * method.c (hack_identifier): Complain about getting a namespace
12264 or class template.
12265 * typeck.c (decay_conversion): Remove check for namespaces.
12266 * typeck2.c (incomplete_type_error): Likewise.
12267 * parse.y (template_arg): Add PTYPENAME expansion.
12268
12269 1998-06-16 Andrew MacLeod <amacleod@cygnus.com>
12270
12271 * decl.c (grokvardecl): Don't build external assembler names for
12272 TYPENAMEs in other namespaces as there is no declarator.
12273 * error.c (cp_file_of, cp_line_of): Don't extract file or line number
12274 info from DECL_CONTEXT if it is NULL.
12275
12276 1998-06-16 Jason Merrill <jason@yorick.cygnus.com>
12277
12278 * call.c (check_dtor_name): Split out.
12279 (build_scoped_method_call): Use it.
12280 (build_method_call): Use it.
12281 * init.c (build_offset_ref): Use it.
12282
12283 * typeck.c (build_static_cast): Fix handling of pointers to members.
12284
12285 * decl.c (finish_function): Just return nothing from a constructor.
12286 * typeck.c (c_expand_return): Complain about returning a void
12287 expression from a destructor.
12288
12289 1998-06-13 Mark Mitchell <mark@markmitchell.com>
12290
12291 * class.c (alter_access): Accept a BINFO explaining how to get
12292 from the entity whose accessed is being altered to the type doing
12293 the altering.
12294 (handle_using_decl): New function containing code split out from ...
12295 (finish_struct_1): Here.
12296
12297 * cp-tree.h (complete_type_or_else): Declare.
12298 * init.c (build_new_1, build_delete): Use it.
12299 * typeck.c (require_complete_type): Use complete_type, rather than
12300 expanding it inline.
12301 (complete_type_or_else): New function.
12302 (build_component_ref): Use it.
12303 (pointer_int_sum): Make sure the type pointed to is complete.
12304 (pointer_diff): Likewise.
12305
12306 * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
12307 types.
12308
12309 * search.c (get_matching_virtual): Note that member templates
12310 cannot override virtual functions.
12311
12312 1998-06-12 Brendan Kehoe <brendan@cygnus.com>
12313
12314 * pt.c (check_explicit_specialization): If DECLARATOR turned into
12315 an error_mark_node from lookup_template_function, return the same.
12316 (determine_specialization): Also make sure TEMPLATE_ID isn't an
12317 error_mark_node, before we try to read its operands.
12318 * decl.c (grokdeclarator): If we got an error_mark_node from
12319 check_explicit_specialization, just return it right back.
12320
12321 1998-06-12 Mark Mitchell <mark@markmitchell.com>
12322
12323 * class.c (instantiate_type): Don't treat template-ids that don't
12324 specify any template arguments as equivalent to ordinary
12325 identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to
12326 pointer-to-members for member templates. Tidy slightly.
12327 * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
12328 * init.c (build_offset_ref): Handle template-ids like ordinary
12329 identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
12330 offset part of the OFFSET_REF.
12331 * typeck.c (build_unary_op): Change check for unknown types to
12332 look for OFFSET_REFs, not SCOPE_REFs.
12333
12334 1998-06-11 Mark Mitchell <mark@markmitchell.com>
12335
12336 * pt.c (is_member_template_class): New function.
12337 (push_template_decl_real): Use it.
12338
12339 1998-06-11 Benjamin Kosnik <bkoz@elmo.cygnus.com>
12340
12341 * friend.c (do_friend): Add support for nested classes using
12342 member functions of the enclosing class as friends.
12343
12344 1998-06-10 Mark Mitchell <mark@markmitchell.com>
12345
12346 * call.c (convert_default_arg): Make global, not static.
12347 (convert_arg_for_ellipsis): Split out from ...
12348 (build_over_call): Here.
12349 * cp-tree.h (convert_default_arg); Declare.
12350 (convert_arg_to_ellipsis): Likewise.
12351 (do_member_init): Remove.
12352 * init.c (do_member_init): Remove; this code is dead.
12353 (expand_member_init): Remove much of this code; it is dead.
12354 * typeck.c (convert_arguments): Use convert_default_arg and
12355 convert_arg_for_ellipsis, rather than duplicating here.
12356
12357 * call.c (convert_like): Don't fail silently if
12358 build_user_type_conversion fails. Always return error_mark_node
12359 for failure.
12360
12361 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
12362
12363 * search.c (covariant_return_p): Complain about ambiguous base.
12364
12365 * typeck.c (build_component_ref): Diagnose ref to nested type.
12366
12367 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
12368
12369 * decl.c (grokparms): Check that INIT isn't an error_mark_node
12370 before giving error about invalid type for default arg.
12371
12372 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
12373
12374 * call.c (build_method_call): Fix thinko.
12375
12376 1998-06-10 Dave Brolley <brolley@cygnus.com>
12377
12378 * decl2.c (lang_decode_option): New argc/argv interface.
12379 * cp-tree.h (lang_decode_option): New argc/argv interface.
12380 * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
12381 specified for cpplib-enabled compilers.
12382 * lex.c (lang_init): Don't check_newline for cpplib.
12383 (init_parse): Don't initialize cpplib here.
12384
12385 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
12386
12387 * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
12388 piece before checking DECL_MUTABLE_P.
12389
12390 1998-06-10 John Carr <jfc@mit.edu>
12391
12392 * tree.c (debug_binfo): Make printf format match arguments.
12393
12394 * error.c (OB_PUTI): Make printf format match arguments.
12395
12396 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
12397
12398 * init.c (perform_member_init): Handle default-initialization.
12399
12400 * except.c (build_throw): Handle throwing NULL.
12401
12402 * typeck.c (build_x_function_call): Use resolve_offset_ref.
12403
12404 * search.c (compute_access): Only strip an anonymous union
12405 for a FIELD_DECL.
12406
12407 * call.c (add_builtin_candidates): Tweak.
12408
12409 * cvt.c (build_expr_type_conversion): Restore code for conversion
12410 from class types.
12411 * decl2.c (delete_sanity): Use it. Clean up.
12412
12413 * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
12414
12415 1998-06-10 Branko Cibej <branko.cibej@hermes.si>
12416
12417 * typeck.c (c_expand_return): Don't warn about void expressions on
12418 return statements in functions returning void.
12419
12420 1998-06-09 Mark Mitchell <mark@markmitchell.com>
12421
12422 * pt.c (fn_type_unification): Revise documentation. Tidy.
12423 (type_unification): Likewise.
12424
12425 1998-06-09 Andrew MacLeod <amacleod@cygnus.com>
12426
12427 * semantics.c (finish_try_block): Rename expand_start_catch, and delete
12428 expand_end_catch.
12429 * parse.y (function_try_block): Rename expand_start_catch, and delete
12430 expand_end_catch.
12431 * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
12432 expand_end_catch.
12433
12434 1998-06-09 Jason Merrill <jason@yorick.cygnus.com>
12435
12436 * search.c (lookup_member): New fn.
12437 * class.c (finish_struct_1): Use it.
12438 * decl.c (lookup_name_real): Use it.
12439
12440 Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12441
12442 * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
12443
12444 * cp-tree.h: Add prototype for `maybe_print_template_context' and
12445 `maybe_make_one_only'.
12446
12447 * decl.c (auto_function): Remove unused variable `decl'.
12448
12449 * decl2.c: Include dwarf2out.h and dwarfout.h.
12450
12451 * lex.c: Remove redundant declarations of `set_float_handler' and
12452 `asm_out_file'.
12453
12454 1998-06-08 Andrew MacLeod <amacleod@cygnus.com>
12455
12456 * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
12457 time flag. Call __cp_eh_info instead of __cp_exception_info.
12458 * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
12459 (__cp_exception_info): Return offset into cp_eh_info structure to
12460 match what use to be the start of this structure.
12461 (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
12462 (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
12463 compile time flag.
12464 (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
12465 __cp_eh_info instead of __cp_exception_info.
12466
12467 1998-06-08 Jason Merrill <jason@yorick.cygnus.com>
12468
12469 * decl.c (cp_finish_decl): Disable inlining of extern inlines
12470 with static variables.
12471
12472 1998-06-08 Mark Mitchell <mark@markmitchell.com>
12473
12474 * init.c (build_offset_ref): Correct previous change to use build,
12475 not build_min.
12476
12477 1998-06-07 Mark Mitchell <mark@markmitchell.com>
12478
12479 * class.c (instantiate_type): Handle pointer-to-members where the
12480 member is a template.
12481 * init.c (build_offset_ref): Likewise.
12482 * typeck.c (build_unary_op): Likewise.
12483
12484 1998-06-07 Richard Henderson <rth@cygnus.com>
12485
12486 * lex.c (lang_init_options): New function.
12487 (lang_init): Remove flag_exceptions == 2 hack.
12488
12489 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
12490
12491 * search.c (envelope_add_decl): Tweak for implicit typename.
12492
12493 * call.c (joust): Also warn about confusing conversion op/constructor
12494 overload resolution.
12495
12496 * spew.c (yylex): Also return the TYPE_DECL if got_object.
12497 Don't clear got_object after '~'.
12498 * call.c (build_scoped_method_call): Tweak destructor handling.
12499 (build_method_call): Likewise.
12500 * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
12501 TYPE_MAIN_VARIANT for destructors.
12502 * semantics.c (finish_object_call_expr): Complain about calling a
12503 TYPE_DECL.
12504
12505 1998-06-05 Per Bothner <bothner@cygnus.com>
12506
12507 * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
12508 Define - update needed by gcc.c change.
12509
12510 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
12511
12512 * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
12513
12514 1998-06-05 Martin v. Loewis <loewis@informatik.hu-berlin.de>
12515
12516 * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
12517 * decl.c (lookup_name_real): Add namespaces_only parameter.
12518 If set, return only NAMESPACE_DECLs.
12519 (select_decl): Likewise.
12520 (identifier_type_value): Give additional parameter.
12521 (lookup_name_nonclass): Likewise.
12522 (lookup_name): Likewise.
12523 (find_binding): Skip namespace aliases.
12524 (binding_for_name): Likewise.
12525 (push_namespace): Check for namespace aliases.
12526 (lookup_name_namespace_only): New function.
12527 (begin_only_namespace_names, end_only_namespace_names): New functions.
12528 * decl2.c (set_decl_namespace): Skip namespace aliases.
12529 (do_using_directive): Likewise.
12530 (do_namespace_alias): Produce namespace aliases, fix alias
12531 redeclaration.
12532 * error.c (dump_decl): Support SCOPE_REF.
12533 * parse.y (extdef): Wrap lookup with namespace_only for namespace
12534 aliases and using declarations.
12535
12536 1998-06-04 Jason Merrill <jason@yorick.cygnus.com>
12537
12538 * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
12539
12540 * error.c (dump_expr): Clean up NEW_EXPR case.
12541
12542 1998-06-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
12543
12544 Suggested by Brendan Kehoe
12545 * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
12546 treat it as using ::decl.
12547
12548 * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
12549
12550 * tree.c (mapcar): Support NEW_EXPR.
12551
12552 * error.c (dump_expr): Support NEW_EXPR.
12553
12554 1998-06-03 Jason Merrill <jason@yorick.cygnus.com>
12555
12556 * method.c (make_thunk): Use overload machinery to make name.
12557 * search.c (covariant_return_p): New fn.
12558 (get_matching_virtual): Use it.
12559
12560 * init.c (build_new_1): Fix check for void.
12561
12562 1998-06-01 Per Bothner <bothner@cygnus.com>
12563
12564 * cp-tree.h (TYPE_FOR_JAVA): New macro.
12565 * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
12566 java_int_type_node, java_long_type_node, java_float_type_node,
12567 java_double_type_node, java_char_type_node, java_boolean_type_node):
12568 New "primitive" types, with predefined names __java_byte etc.
12569 (record_builtin_java_type): New function.
12570 (init_decl_processing): Make Java types with record_builtin_java_type.
12571 (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA".
12572 (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class.
12573 (grokfndecl): Call check_java_method for Java classes.
12574 * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA.
12575 (process_overload_item): Match types against specific
12576 java_XX_type_node types, rather than using is_java_type.
12577 * class.c (finish_struct_1): Don't add default copy constructor
12578 or operator= if TYPE_FOR_JAVA.
12579 (pop_lang_conext): Restore strict_prototyp proper if Java.
12580 * decl2.c (acceptable_java_type, check_java_method): New functions.
12581 * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern.
12582 (tsubst): Move common statement after if statement.
12583 * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match.
12584
12585 1998-06-01 Jason Merrill <jason@yorick.cygnus.com>
12586
12587 * pt.c (for_each_template_parm): Use first_rtl_op.
12588
12589 * tree.c (build_cplus_array_type_1): Also check index_type for
12590 template parms.
12591
12592 1998-05-31 Jason Merrill <jason@yorick.cygnus.com>
12593
12594 * pt.c (tsubst): Always copy BINFO_BASETYPES.
12595
12596 1998-05-29 scott snyder <snyder@d0sgif.fnal.gov>
12597
12598 * tree.c (layout_basetypes): If we change TYPE_SIZE, change
12599 TYPE_SIZE_UNIT too.
12600
12601 1998-05-29 Mark Mitchell <mark@markmitchell.com>
12602
12603 * decl.c (grokdeclarator): Don't complain about in-class
12604 initialization of static consts if we don't really know the type
12605 of the variable.
12606
12607 1998-05-29 Jason Merrill <jason@yorick.cygnus.com>
12608
12609 * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
12610 * method.c (build_destructor_name): New fn.
12611 * decl2.c (maybe_retrofit_in_chrg): Split out...
12612 (grokclassfn): From here. Reorganize.
12613 * decl.c (grok_ctor_properties): Make sure ctors for types with
12614 vbases have the in_chrg parm.
12615 * pt.c (instantiate_class_template): Update
12616 TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call
12617 grok_*_properties.
12618 (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
12619
12620 1998-05-28 Mark Mitchell <mark@markmitchell.com>
12621
12622 * pt.c (instantiate_decl): Make test for whether or not static
12623 variables should be instantiated early match its comment.
12624
12625 1998-05-28 Jason Merrill <jason@yorick.cygnus.com>
12626
12627 * decl.c (start_decl): Always pedwarn about vacuously redeclaring
12628 a member.
12629 (start_function): Call check_default_args.
12630 * decl2.c (grokfield): Don't call check_default_args.
12631 (check_default_args): Use cp_error_at.
12632 * lex.c (do_pending_defargs): Call check_default_args.
12633
12634 1998-05-27 Brendan Kehoe <brendan@cygnus.com>
12635
12636 * call.c (build_method_call): Make sure get_type_value returns
12637 something before we try to use its TYPE_MAIN_VARIANT.
12638 (build_scoped_method_call): Likewise.
12639
12640 1998-05-27 Jason Merrill <jason@yorick.cygnus.com>
12641
12642 * typeck2.c (digest_init): Complain about getting a TREE_LIST to
12643 initialize an array.
12644
12645 * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
12646 DECL_VIRTUAL_P.
12647
12648 * friend.c (do_friend): Clarify template warning.
12649
12650 1998-05-27 Mark Mitchell <mark@markmitchell.com>
12651
12652 * decl.c (shadow_label): Don't treat decls as identifiers.
12653 (maybe_push_to_top_level): Clear shadowed_labels.
12654
12655 * pt.c (instantiate_decl): Reset lineno and filename after calling
12656 regenerate_decl_from_template.
12657
12658 * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
12659 error_mark_node.
12660
12661 1998-05-27 Kevin Buhr <buhr@stat.wisc.edu>
12662
12663 * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
12664
12665 1998-05-26 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
12666
12667 * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
12668 (convert_nontype_argument): Handle cases when nontype template
12669 parameters become classes after substitution.
12670
12671 1998-05-26 Mark Mitchell <mark@markmitchell.com>
12672
12673 * friend.c (is_friend): Use comptypes, rather than == to compare
12674 types. Modify for new representation of template friends.
12675 (make_friend_class): Likewise.
12676 * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak.
12677 (instantiate_class_template): Deal with template friends.
12678
12679 * decl.c (store_parm_decls): Remove redundant call to
12680 expand_main_function.
12681
12682 1998-05-26 Benjamin Kosnik <bkoz@loony.cygnus.com>
12683
12684 * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
12685 DECL_USE_TEMPLATE.
12686
12687 1998-05-26 Per Bothner <bothner@cygnus.com>
12688
12689 * language_as_string: Handle lang_java.
12690
12691 1998-05-26 Jason Merrill <jason@yorick.cygnus.com>
12692
12693 * decl.c (pushdecl): Don't copy the type_decl.
12694
12695 1998-05-26 Martin v. Löwis <loewis@informatik.hu-berlin.de>
12696
12697 * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
12698 current_class_type.
12699 * decl.c (grokdeclarator): Put typedefs on the type's obstack.
12700
12701 * parse.y (complex_direct_notype_declarator): Use $1 to access
12702 scope of notype_qualified_id.
12703
12704 1998-05-26 Dave Brolley <brolley@cygnus.com>
12705
12706 * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
12707 (init_parse): Initialize cpplib interface.
12708
12709 * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
12710 empty continuation.
12711
12712 1998-05-26 Mark Mitchell <mark@markmitchell.com>
12713
12714 * decl.c (pushtag): Avoid crashing on erroneous input.
12715
12716 1998-05-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
12717
12718 * decl.c (push_namespace): Only produce one unique name for
12719 anonymous namespaces.
12720 (get_unique_name): Remove.
12721
12722 1998-05-25 Mark Mitchell <mark@markmitchell.com>
12723
12724 * call.c (tourney): Don't do any extra comparisons.
12725
12726 * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
12727
12728 * cp-tree.h (processing_template_parmlist): Declare.
12729 * decl.c (pushtag): Don't call push_template_decl when we
12730 shouldn't.
12731 * pt.c (processing_template_parmlist): New variable.
12732 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
12733 (complete_template_args): Use it.
12734 (add_to_template_args): Likewise.
12735 (innermost_args): Likewise.
12736 (tsubst): Likewise.
12737 (begin_template_parm_list): Use processing_template_parmlist.
12738 (end_template_parm_list): Likewise.
12739
12740 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
12741 * decl.c (grokdeclarator): Use it.
12742 * decl2.c (grok_x_components): Likewise.
12743 * init.c (initializing_context): Likewise.
12744 * method.c (do_build_copy_constructor): Likewise.
12745 (do_build_assign_ref): Likewise.
12746 * search.c (compute_access): Likewise.
12747 * typeck.c (build_component_ref): Likewise.
12748
12749 * decl.c (grokdeclarator): Don't give a cv-qualified version of an
12750 unnamed type a typedef name "for linkage purposes".
12751
12752 * pt.c (lookup_template_class): Don't look at
12753 IDENTIFIER_CLASS_VALUE when there's no current_class_type.
12754
12755 * method.c (build_overload_int): Handle error cases gracefully.
12756
12757 * pt.c (instantiate_decl): Handle static member variables
12758 correctly.
12759
12760 * pt.c (tsubst): Use the tsubst'd type when producing new
12761 TEMPLATE_PARM_INDEX nodes.
12762
12763 1998-05-24 Mark Mitchell <mark@markmitchell.com>
12764
12765 * tree.c (cp_tree_equal): Handle pointers to member functions.
12766
12767 * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make
12768 sure the type of the REF_BIND is a reference type.
12769 (maybe_handle_ref_bind, compare_ics): Rename reference_type to
12770 target_type for clarity.
12771
12772 * parse.y (xcond): Move call to condition_conversion ...
12773 * semantics.c (finish_for_cond): Here.
12774 * parse.c: Regenerated.
12775
12776 1998-05-24 Jason Merrill <jason@yorick.cygnus.com>
12777
12778 * decl.c (push_namespace): Namespaces have type void.
12779 * typeck2.c (incomplete_type_error): Complain about namespace
12780 used as expression.
12781 * typeck.c (decay_conversion): Likewise.
12782
12783 1998-05-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
12784
12785 * error.c (dump_expr): Support namespaces.
12786
12787 1998-05-23 Jason Merrill <jason@yorick.cygnus.com>
12788
12789 * cp-tree.def: Add SRCLOC.
12790 * cp-tree.h: Add struct tree_srcloc and accessor macros.
12791 * tree.c (build_srcloc, build_srcloc_here): New fns.
12792 * pt.c (add_pending_template): Use build_srcloc_here.
12793 (push_tinst_level): Update last_template_error_tick before erroring.
12794 (instantiate_decl): Restore lineno and input_filename before
12795 calling add_pending_template.
12796 * decl2.c (finish_file): Set up lineno and input_filename for
12797 pending templates.
12798
12799 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
12800
12801 * decl.c (lang_print_error_function): New fn.
12802 (init_decl_processing): Set print_error_function to use it.
12803 * errfn.c (cp_thing): Don't call maybe_print_template_context here.
12804
12805 * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
12806 ICS_BAD_FLAG.
12807
12808 * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
12809 copy-initialization.
12810
12811 * class.c (build_vtable_entry): Use int_fits_type_p.
12812 (build_vtable): Pass a signed offset to build_vtable_entry.
12813 (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
12814 set_rtti_entry): Likewise.
12815
12816 1998-05-22 Per Bothner <bothner@cygnus.com>
12817
12818 * cp-tree.h: Add comments documenting which LANG_FLAGS are used.
12819 (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used.
12820
12821 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
12822
12823 * pt.c (print_template_context): Use fprintf instead of cp_error.
12824
12825 * pt.c (determine_specialization): Just return an error_mark_node.
12826 Also print the decl we want in error messages. If we complain,
12827 return error_mark_node.
12828 (tsubst_friend_function): Set lineno and input_filename so
12829 error messages will be useful.
12830 (instantiate_template): Just return an error_mark_node.
12831 (check_explicit_specialization): Don't mess with a returned
12832 error_mark_node.
12833
12834 * pt.c (print_template_context): Add new argument.
12835 (maybe_print_template_context): New fn.
12836 (push_tinst_level): Increment tinst_level_tick.
12837 (pop_tinst_level): Likewise.
12838 * errfn.c (cp_thing): Call maybe_print_template_context. Use
12839 xrealloc instead of xmalloc.
12840
12841 * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
12842
12843 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
12844
12845 * pt.c (tsubst_friend_class): Don't call redeclare_class_template
12846 if the template we looked up is the same as the one we already
12847 have.
12848
12849 Thu May 21 11:54:44 1998 Dave Brolley <brolley@cygnus.com>
12850
12851 * lex.c: (handle_sysv_pragma): FILE* parameter not used.
12852 (cpp_reader,parse_in): Add for cpplib.
12853 (check_newline): Call handle_sysv_pragma with new interface.
12854 (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
12855
12856 * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
12857 (sub_getch): Call GETC for cpplib.
12858
12859 * cp-tree.h: (get_directive_line): Different prototype for cpplib.
12860 (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
12861
12862 * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
12863
12864 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
12865
12866 * decl2.c (maybe_make_one_only): New fn.
12867 (import_export_vtable): Use it.
12868 (import_export_decl): Likewise.
12869 * pt.c (mark_decl_instantiated): Likewise.
12870
12871 1998-05-21 Mark Mitchell <mmitchell@usa.net>
12872
12873 * decl2.c (find_representative_member): Rename to ...
12874 (build_anon_union_vars): New function.
12875 (finish_anon_union): Fix stupidity of previous change.
12876
12877 1998-05-20 Jason Merrill <jason@yorick.cygnus.com>
12878
12879 * decl.c (grokfndecl): Handle definition of specialization in
12880 friend declaration.
12881
12882 * error.c (dump_decl): Fix LOOKUP_EXPR handling.
12883
12884 1998-05-20 Mark Mitchell <mmitchell@usa.net>
12885
12886 * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
12887 to look for type declarations.
12888 (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
12889 * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
12890 (finish_member_class_template): Declare.
12891 * decl.c (pushtag): Put member class templates on the
12892 CLASSTYPE_TAGS list, just as for ordinary member classes.
12893 (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
12894 (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
12895 IDENTIFIER_NAMESPACE_VALUEs.
12896 * parse.y (component_decl): Move code to ...
12897 * semantics.c (finish_member_class_template): New function.
12898 Don't put member class templates on the list of components for a
12899 class.
12900 * parse.c: Regenerated.
12901 * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
12902 In fact, don't use DECL_CONTEXT at all here.
12903
12904 1998-05-20 Martin von Loewis <loewis@informatik.hu-berlin.de>
12905
12906 * decl.c (record_unknown_type): New function.
12907 (init_decl_processing): Call it for the unknown and global type
12908 nodes.
12909
12910 1998-05-20 Mark Mitchell <mmitchell@usa.net>
12911
12912 * decl2.c (find_representative_member): New function.
12913 (finish_anon_union): Use it.
12914
12915 * cp-tree.h (MAIN_NAME_P): New macro.
12916 (DECL_MAIN_P): Likwise.
12917 * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
12918 (grokfndecl): Use the new macros.
12919 (grokdeclarator): Likewise.
12920 (start_function): Likewise.
12921 (store_parm_decls): Likewise.
12922 (finsh_function): Likewise.
12923 * friend.c (do_friend): Likewise.
12924 * typeck.c (build_function_call_real): Likewise.
12925 (build_unary_op): Likewise.
12926
12927 Wed May 20 02:16:01 1998 Jason Merrill <jason@yorick.cygnus.com>
12928
12929 * decl2.c (start_objects, finish_objects, do_dtors,
12930 do_ctors): Split out from...
12931 (finish_file): ...here.
12932
12933 Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com>
12934
12935 * tree.c (is_overloaded_fn): Don't abort on placeholders from
12936 push_class_decls.
12937
12938 Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com>
12939
12940 * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
12941
12942 * error.c (dump_expr): Handle an ARROW_EXPR.
12943
12944 Tue May 19 15:13:39 1998 Mark Mitchell <mmitchell@usa.net>
12945
12946 * decl.c (saveable_obstack): Declare.
12947 (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
12948 declare, if necessary.
12949
12950 Tue May 19 14:50:27 1998 Mark Mitchell <mmitchell@usa.net>
12951
12952 * call.c (compare_qual): Remove.
12953 (is_subseq): Tweak.
12954 (is_properly_derived_from): New function.
12955 (maybe_handle_ref_bind): Likewise.
12956 (maybe_handle_implicit_object): Likewise.
12957 (compare_ics): Modify substantially to bring into conformance with
12958 the standard.
12959 * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
12960 (comp_cv_qualification): Declare.
12961 (comp_cv_qual_signature): Likewise.
12962 * typeck.c (comp_cv_qualification): Likewise.
12963 (comp_cv_qual_signature): Likewise.
12964
12965 Tue May 19 10:05:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12966
12967 * Makefile.in (parse.o): Depend on toplev.h.
12968
12969 * class.c (typecode_p): Remove prototype and definition.
12970
12971 * cp-tree.h (currently_open_class, is_empty_class, member_p):
12972 Add prototype.
12973
12974 * decl.c (push_overloaded_decl_top_level): Remove prototype and
12975 definition.
12976
12977 * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
12978 in call to `cp_thing'.
12979 (cp_warning): Likewise for function pointer `warning'.
12980
12981 * except.c (do_function_call): Remove prototype and definition.
12982 (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
12983
12984 * method.c (is_java_type): Add prototype and make it static.
12985
12986 * parse.y: Include toplev.h.
12987
12988 * pt.c (type_unification): Remove unused variable `arg'.
12989 (instantiate_decl): Likewise for `save_ti'.
12990
12991 * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
12992
12993 Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
12994
12995 * init.c (build_member_call): Handle template_ids.
12996 * parse.y (primary): Add global_scope template_id.
12997
12998 Mon May 18 23:22:52 1998 Jason Merrill <jason@yorick.cygnus.com>
12999
13000 * decl2.c (get_sentry): Use end_temporary_allocation.
13001 Don't declare permanent_obstack.
13002
13003 Mon May 18 12:28:44 1998 Mark Mitchell <mmitchell@usa.net>
13004
13005 * parse.y (.finish_new_placement): New non-terminal.
13006 (unary_expr, new_type_id): Use it.
13007 * parse.c: Regenerated.
13008
13009 Mon May 18 12:20:27 1998 Brendan Kehoe <brendan@cygnus.com>
13010
13011 * pt.c (redeclare_class_template): Say where the original definition
13012 of the template-parameter's default argument appeared.
13013
13014 Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com>
13015
13016 * call.c (build_over_call): Tweak empty class handling.
13017
13018 * decl.c (make_typename_type): Use currently_open_class.
13019
13020 * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
13021
13022 Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
13023
13024 * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
13025 for a type unless it is one.
13026
13027 * class.c (finish_struct_1): Use OVL_CURRENT in error message.
13028
13029 Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com)
13030
13031 * Makefile.in (program_transform_name, objdir): Define.
13032
13033 * Makefile.in (BISON): Use bison from the build tree if it exists.
13034 (FLEX): Likewise.
13035
13036 Sun May 17 14:52:08 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
13037
13038 * typeck.c (type_unknown_p): Return true for TREE_LIST also.
13039
13040 * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
13041
13042 Sun May 17 14:51:41 1998 Jason Merrill <jason@yorick.cygnus.com>
13043
13044 * call.c (build_scoped_method_call): Likewise.
13045
13046 Sun May 17 13:53:48 1998 Mark Mitchell <mmitchell@usa.net>
13047
13048 * init.c (build_new_1): Call suspend_momentary around the creation
13049 of values that must be saved for exception handling.
13050 * parse.y (.build_new_placement): New non-terminal.
13051 (unary_expr, new_placement): Use it.
13052 * parse.c: Regenerated.
13053
13054 Sun May 17 12:32:08 1998 Jason Merrill <jason@yorick.cygnus.com>
13055
13056 * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
13057 old and new types.
13058
13059 * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
13060 canonical type.
13061
13062 * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
13063
13064 Fri May 15 20:28:00 1998 Jason Merrill <jason@yorick.cygnus.com>
13065
13066 * decl.c (start_decl): Revert problem change.
13067
13068 * Makefile.in (CONFLICTS): Fix.
13069
13070 Fri May 15 15:34:02 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
13071
13072 * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
13073
13074 Fri May 15 00:46:05 1998 Jason Merrill <jason@yorick.cygnus.com>
13075
13076 * class.c (finish_struct_1): Use BINFO_SIZE.
13077
13078 * decl.c (start_decl): Use 'tem'.
13079
13080 Thu May 14 16:30:47 1998 Andrew MacLeod <amacleod@cygnus.com>
13081
13082 * exception.cc: Include eh-common.h.
13083 (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
13084 (__cplus_type_matcher): First stab at new C++ runtime type matcher.
13085 (__cp_push_exception): Initialize eh_info struct as well.
13086 * except.c: Remove local structs and include eh-common.h.
13087 (init_exception_processing): Set language and version codes.
13088 (call_eh_info): Add presence of eh_info to runtime description of
13089 struct cp_eh_info.
13090 (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
13091 * semantics.c (finish_try_block): Call start_catch_block() and
13092 end_catch_block().
13093 * parse.y (function_try_block): Call start_catch_block() and
13094 end_catch_block().
13095
13096 Thu May 14 12:27:34 1998 Brendan Kehoe <brendan@cygnus.com>
13097
13098 * typeck.c (original_type): New function.
13099 (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
13100 to see if they're actually the same.
13101 * cp-tree.h (original_type): Declare.
13102
13103 Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13104
13105 * Makefile.in (lex.o): Depend on output.h.
13106
13107 * call.c (add_function_candidate): Remove unused variable `cand'.
13108 (add_conv_candidate): Likewise.
13109 (build_builtin_candidate): Likewise.
13110
13111 * cp-tree.h: Add prototype for `types_overlap_p'.
13112
13113 * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
13114
13115 * decl2.c (merge_functions): Remove unused variables `tmp' and
13116 `tempn'.
13117
13118 * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
13119 (code_as_string): Likewise.
13120 (language_as_string): Likewise.
13121 (parm_as_string): Likewise.
13122 (op_as_string): Likewise.
13123 (assop_as_string): Likewise.
13124 (cv_as_string): Likewise.
13125
13126 * lex.c: Include output.h.
13127
13128 * pt.c (type_unification): Cast first argument of `bzero' to a char*.
13129
13130 * search.c (dfs_no_overlap_yet): Mark parameter `t' with
13131 ATTRIBUTE_UNUSED.
13132
13133 * tinfo.cc (__class_type_info::dcast): Change the type of variable
13134 `i' from int to size_t.
13135
13136 * typeck.c (language_lvalue_valid): Mark parameter `exp' with
13137 ATTRIBUTE_UNUSED.
13138
13139 Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
13140
13141 * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
13142 DECL_NAMESPACE_SCOPE_P.
13143 (lang_decl_name): Likewise.
13144 * pt.c (tsubst_friend_function, tsubst): Likewise.
13145 * decl.c (pushdecl, redeclaration_error_message, start_decl,
13146 cp_finish_decl, start_function): Likewise.
13147 * class.c (finish_struct_1): Likewise.
13148 * call.c (build_over_call): Likewise.
13149 (compare_ics): Use DERIVED_FROM_P.
13150
13151 Tue May 12 07:24:18 1998 Mark Mitchell <mmitchell@usa.net>
13152
13153 * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
13154 * method.c (build_mangled_name): Use it.
13155 (build_decl_overload_real): Likewise.
13156
13157 * error.c (dump_simple_decl): New function, broken out from ...
13158 (dump_decl): Use it.
13159
13160 Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
13161
13162 * ptree.c (lang_print_xnode): Add missing `break'.
13163
13164 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
13165
13166 * call.c (add_template_candidate): Adjust for changes to
13167 fn_type_unification.
13168 (add_template_candidate_real): Likewise.
13169 (add_template_conv_candidate): Likewise.
13170 (build_user_type_conversion_1): Likewise.
13171 (build_new_function_call): Likewise.
13172 (build_object_call): Likewise.
13173 (build_new_op): Likewise.
13174 (build_new_method_call): Likewise.
13175 * class.c (instantiate_type): Likewise.
13176 * cp-tree.h (unification_kind_t): New type.
13177 (fn_type_unification): Adjust prototype.
13178 (type_unificaiton): Likewise.
13179 * pt.c (UNIFY_ALLOW_NONE): New macro.
13180 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
13181 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
13182 (UNIFY_ALLOW_DERIVED): Likewise.
13183 (unify): Change prototype.
13184 (maybe_adjust_types_for_deduction): New function.
13185 (check_cv_quals_for_unify): Likewise.
13186 (determine_specialization): Adjust.
13187 (fn_type_unification): Likewise.
13188 (type_unification): Likewise.
13189 (type_unification_real): Likewise. Use
13190 maybe_adjust_types_for_deduction. Fix mishandling of
13191 back-unification of template functions passed as arguments. Pass
13192 appropriate combination of UNIFY_ALLOW_* to unify.
13193 (unify): Remove unused NTPARMS parameter. Use
13194 check_cv_quals_for_unify. Remove bogus code that allowed
13195 too-generous unification in order to adhere more closely to standard.
13196 (get_bindings_real): Adjust.
13197 (get_class_bindings): Likewise.
13198
13199 * method.c (build_overload_identifier): Only use the innermost
13200 template arguments when mangling.
13201 * pt.c (tsubst_template_argument_vector): New function.
13202 (complete_template_args): Deal with the situation where the
13203 extra_args contain more than one level of arguments.
13204 (lookup_template_class): Deal with member template classes, which
13205 may have more than one level of arguments.
13206 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
13207 Improve handling of member template classes. Use
13208 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
13209 tsubst_template_argument_vector where appropriate.
13210 (regenerate_decl_from_template): Break out from ...
13211 (instantiate_decl): Here.
13212
13213 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
13214 * parse.h: Regenerated.
13215 * parse.c: Really regenerated.
13216
13217 * cp-tree.h (finish_unary_op_expr): New function.
13218 (finish_id_expr): Likewise.
13219 (begin_new_placement): Likewise.
13220 (finish_new_placement): Likewise.
13221 (finish_declarator): Likewise.
13222 (finish_translation_unit): Likewise.
13223 (finish_parmlist): Likewise.
13224 (begin_class_definition): Likewise.
13225 (finish_class_definition): Likewise.
13226 (finish_default_args): Likewise.
13227 (finish_inline_definitions): Likewise.
13228 * parse.y (GCC_ASM_KEYWORD): Remove.
13229 (TYPENAME_ELLIPSIS): Likewise.
13230 * parse.c: Regenerated.
13231 Use new functions in semantics.c in the actions for many rules.
13232 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
13233 * hash.h: Regenerated.
13234 * semantics.c (finish_expr_stmt): Allow NULL expr.
13235 (finish_unary_op_expr): New function, containing
13236 code previously in parse.y.
13237 (finish_id_expr): Likewise.
13238 (begin_new_placement): Likewise.
13239 (finish_new_placement): Likewise.
13240 (finish_declarator): Likewise.
13241 (finish_translation_unit): Likewise.
13242 (finish_parmlist): Likewise.
13243 (begin_class_definition): Likewise.
13244 (finish_class_definition): Likewise.
13245 (finish_default_args): Likewise.
13246 (finish_inline_definitions): Likewise.
13247
13248 Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
13249
13250 * typeck.c (build_c_cast): Don't decay arrays and functions to
13251 pointer type when converting to a class type.
13252
13253 Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
13254
13255 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
13256 (DECL_CLASS_SCOPE_P): Likewise.
13257
13258 Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
13259
13260 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
13261 * decl2.c (constructor_name_full): Likewise.
13262
13263 Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
13264
13265 * tree.c (mapcar): Add OVERLOAD support.
13266
13267 * init.c (resolve_offset_ref): We must use basetype_path before we
13268 destroy it with a call to convert_pointer_to.
13269
13270 Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
13271
13272 * class.c (currently_open_class): New fn.
13273 * decl.c (lookup_name_real): Use it.
13274 * search.c (lookup_field): Likewise.
13275
13276 Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
13277
13278 * cp-tree.def (OVERLOAD): New node.
13279 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
13280 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
13281 (NAMESPACE_BINDING): Remove.
13282 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
13283 namespace_binding.
13284 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
13285 Define.
13286 (tree_overload): New struct.
13287 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
13288 (REAL_IDENTIFIER_TYPE_VALUE): Define.
13289 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
13290 (lang_decl_flags): Remove in_namespace.
13291 (lang_decl): Remove chain.
13292 (DECL_CHAIN, DECL_NAMESPACE): Remove.
13293 (flag_honor_std): Declare extern.
13294 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
13295 namespace_binding, set_namespace_binding,
13296 lookup_function_nonclass, cat_namespace_levels,
13297 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
13298 scratch_ovl_cons, ovl_member, build_overload): Declare.
13299 (decl_list_length, get_namespace_id, current_namespace_id,
13300 overloaded_globals_p): Remove.
13301 (lookup_using_namespace, qualified_lookup_using_namespace): Change
13302 return type.
13303 (push_scratch_obstack): New macro.
13304 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
13305 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
13306 convs, fns.
13307 (build_new_function_call): Iterate using OVL_CHAIN.
13308 Print DECL_NAME in when reporting ambiguities.
13309 (build_object_call): Iterate using OVL_NEXT for fns, convs.
13310 (build_new_op): Call lookup_function_nonclass.
13311 Iterate using OVL_NEXT.
13312 (build_op_delete_call): Change detection of members.
13313 Do not wrap TREE_LIST around fields and single global functions.
13314 (build_over_call): Don't push a class level if the context is a
13315 namespace.
13316 (build_new_method_call): Iterate using OVL_NEXT.
13317 * class.c (add_method): Chain overloaded members using
13318 build_overload. Remove copying of method.
13319 (grow_method): When iterating through the obstack, expect OVERLOAD
13320 nodes. Chain overload members.
13321 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
13322 nodes in call to get_baselinks.
13323 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
13324 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
13325 fdecls that are OVERLOAD nodes.
13326 (validate_lhs): New function.
13327 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
13328 code. Use DECL_NAME in error messages. Split code between global
13329 and member function processing.
13330 * decl.c (global_type_node): New static variable.
13331 (in_std): New global.
13332 (struct binding_level): New field usings.
13333 (resume_binding_level): Assert that we are not in a class.
13334 (toplevel_bindings_p): Just check for namespace_p or
13335 pseudo_global.
13336 (resume_level): Remove.
13337 (find_binding): New function.
13338 (binding_for_name): Call it.
13339 (namespace_binding, set_namespace_binding): New functions.
13340 (push_namespace): Associate binding level with new namespace,
13341 resume_binding_level for existing namespace. Remove old code.
13342 Fake std by counting.
13343 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
13344 (maybe_push_to_top_level): Save current namespace.
13345 (pop_from_top_level): Restore saved namespace.
13346 (pop_namespace): Call suspend_binding_level. Remove old code.
13347 (cat_namespace_levels): New function.
13348 (set_identifier_type_value_with_scope): For namespace bindings,
13349 set BINDING_TYPE, and use global_type_node.
13350 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
13351 (identifier_type_value): New function.
13352 (pushtag): If no context, use current_namespace.
13353 (duplicate_decls): Don't process DECL_CHAIN.
13354 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
13355 already set. Never reset it to NULL_TREE. Lookup global variables
13356 in their namespace. Push overloaded templates if they are on
13357 namespace level.
13358 (pushdecl_namespace_level): New function.
13359 (pushdecl_top_level): Implement using pushdecl_namespace_level.
13360 (pushdecl_using_decl): New function.
13361 (overloaded_globals_p): Remove.
13362 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
13363 them. Use namespace_binding and set_namespace_value.
13364 (redeclaration_error_message): Complain if the declarations come
13365 from different namespaces.
13366 (lookup_tag): On namespace level, look in the BINDING_TYPE.
13367 (lookup_namespace_name): Pass tree_bindings from stack. Remove
13368 old code.
13369 (select_decl): New function.
13370 (lookup_name_real): Call it for qualified and unqualified lookup.
13371 Pass tree_bindings from the stack.
13372 If prefer_type is 1, also accept namespaces.
13373 (lookup_function_nonclass): New function.
13374 (init_decl_processing): Set the binding level of the global
13375 namespace to global_binding_level.
13376 Build a proper type list for __builtin_apply.
13377 Initialize std_node to "fake std" if flag_honor_std is set.
13378 Initialize global_type_node.
13379 Allocated bad_alloc in namespace std if flag_honor_std.
13380 (define_function): Set the DECL_CONTEXT to the current_namespace.
13381 (start_decl): A namespace is not considered as a context here. If
13382 the DECL_CONTEXT is a namespace, push the decl.
13383 (cp_finish_decl): Check for namespaces used as initializers.
13384 (grokfndecl): Add namespace parameter. Remove processing of
13385 DECL_CHAIN.
13386 (grokvardecl): Add namespace parameter.
13387 (grokdeclarator): Process SCOPEs that are namespaces. For
13388 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
13389 (start_function): Check for contexts that are namespaces.
13390 Set context for declarations that have not been pushed.
13391 (store_parm_decls): Check for ::main only.
13392 (finish_function): Likewise.
13393 (start_method): Check for contexts that are namespaces.
13394 (start_method): Remove DECL_CHAIN processing.
13395 * decl2.c (flag_honor_std): Declare.
13396 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
13397 (decl_namespace_list): New static global.
13398 (grok_x_components): Ignore namespaces as type contexts.
13399 (check_classfn): Expect OVERLOAD nodes.
13400 (grokfield): Remove DECL_CHAIN processing.
13401 (finish_file): Call cat_namespace_levels.
13402 (merge_functions): New function.
13403 (ambiguous_decl): Rewrite.
13404 (lookup_using_namespace): Produce tree_bindings.
13405 (qualified_lookup_using_namespace): Likewise.
13406 (set_decl_namespace, decl_namespace, current_decl_namespace,
13407 push_decl_namespace, pop_decl_namespace): New functions.
13408 (arg_lookup): New struct.
13409 (add_function, arg_assoc_namespace, arg_assoc_class,
13410 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
13411 New functions.
13412 (get_namespace_id, current_namespace_id): Remove.
13413 (do_toplevel_using_decl): Rewrite.
13414 (do_class_using_decl): Complain about namespace qualifiers.
13415 (do_using_directive): Sorry if not on namespace level. Complain
13416 about unknown namespaces.
13417 * error.c (dump_aggr_type): Check for namespace contexts.
13418 * except.c (init_exception_processing): Push terminate into std.
13419 * friend.c (is_friend): A namespace is not a context, here.
13420 * init.c (expand_member_init): Remove DECL_CHAIN processing.
13421 (build_offset_ref): Process OVERLOAD nodes.
13422 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
13423 * lex.c (identifier_type): Loop using OVL_CHAIN.
13424 (see_typename): Set looking_for_typename to 2.
13425 (real_yylex): Likewise.
13426 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
13427 (do_scoped_id): Expect OVERLOAD nodes.
13428 Change calling convention for qualified_lookup_using_namespace.
13429 (build_lang_decl): Don't set in_namespace anymore.
13430 * method.c (typevec_size): New global.
13431 (build_overload_nested_name): Return if global_namespace.
13432 Otherwise, always expect a declaration context.
13433 (build_qualified_name): Likewise.
13434 Make sure we don't write beyond typevec_size.
13435 (build_decl_overload_real): Likewise.
13436 Allocate one extra slot for the namespace.
13437 (hack_identifier): Mark code dead.
13438 Process OVERLOAD and NAMESPACE_DECL nodes.
13439 * parse.y (program): Pop namespaces until in global namespace.
13440 (extdef): In a using-declaration, don't discard the identifier if
13441 there is no declaration.
13442 (left_curly): Ignore type contexts which are namespaces.
13443 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
13444 used as scope.
13445 * pt.c (template_class_depth): Expect types to be namespaces.
13446 (determine_specialization): Simplify by expecting OVERLOAD nodes.
13447 (push_template_decl): Push into namespace level.
13448 Reset ctx if it is a namespace.
13449 Set DECL_CONTEXT to current_namespace if not set already.
13450 Ignore real contexts that are namespaces.
13451 (mangle_class_name_for_template): Skip global_namespace.
13452 Mangle other namespaces as declarations.
13453 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
13454 (lookup_template_class): Push into namespace of context.
13455 If the context is a namespace, set it to global_namespace.
13456 Use id_context for mangling.
13457 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
13458 (tsubst_friend_function): Ignore namespace contexts.
13459 Push into namespace level.
13460 (tsubst): Handle NAMESPACE_DECL nodes.
13461 Remove DECL_CHAIN processing.
13462 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
13463 * ptree.c (print_lang_identifier): Print bindings.
13464 (lang_print_xnode): Print OVERLOAD nodes.
13465 * rtti.c (init_rtti_processing): Push type_info into std.
13466 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
13467 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
13468 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
13469 lookup_fnfields_here): Likewise.
13470 Process all nodes, instead of going through TREE_CHAIN.
13471 * sig.c (build_signature_pointer_or_reference_type): Set context
13472 to global_namespace.
13473 (build_signature_table_constructor): Expect OVERLOAD nodes.
13474 * spew.c (yylex): Save old setting of looking_for_typename.
13475 * tree.c (decl_list_length): Remove.
13476 (binding_init): New function.
13477 (count_functions): Rewrite.
13478 (is_overloaded_fn): Expect OVERLOAD nodes.
13479 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
13480 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
13481 ovl_member): New functions.
13482 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
13483 (type_unknown_p): Likewise.
13484 (require_instantiated_type): Likewise.
13485 (build_component_ref): Declare code dead.
13486 (build_x_function_call): Create and expect OVERLOAD nodes.
13487 (build_function_call_real): Check for ::main only.
13488 (build_unary_op): Likewise. Expect OVERLOAD nodes.
13489 (convert_for_assignment): Check for TREE_LIST before accessing
13490 TREE_VALUE.
13491 * decl.c (duplicate_decls): Check for namespace bindings instead
13492 of global bindings.
13493 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
13494 lookup_name_current_level, start_decl, xref_tag,
13495 finish_enum): Likewise.
13496 * init.c (build_offset_ref): Likewise.
13497 * search.c (lookup_field): Likewise.
13498 (lookup_fnfields): Likewise.
13499 (dfs_debug_mark): Likewise.
13500 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
13501 (poplevel_class, pop_from_top_level): Likewise.
13502 * decl2.c (finish_method): Likewise.
13503 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
13504 * decl.c (record_builtin_type): Likewise.
13505 (init_decl_processing, grokfndecl): Likewise.
13506 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
13507 (make_lang_type): Likewise.
13508 * parse.y (make_thunk): Likewise.
13509 * pt.c (tsubst): Likewise.
13510 * tree.c (debug_binfo): Likewise.
13511 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
13512 tinfo2.cc, inc/new.h: Add std qualifications.
13513 * inc/new: Wrap with namespace std if __HONOR_STD.
13514 * inc/typeinfo: Likewise.
13515
13516 Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
13517
13518 * call.c (build_user_type_conversion_1): Handle second_conv
13519 properly for templates.
13520
13521 Thu May 7 17:09:25 1998 Andrew MacLeod <amacleod@cygnus.com>
13522
13523 * method.c (build_decl_overload_real): Set TREE_USED flag to
13524 zero for build_type_variants nodes as well.
13525
13526 Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
13527
13528 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
13529
13530 Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
13531
13532 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
13533 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
13534 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
13535 xref.o): Add toplev.h dependencies.
13536
13537 Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
13538
13539 * errfn.c (cp_error, cp_warning): Remove declarations for
13540 error and warning respectively.
13541
13542 Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13543
13544 * error.c: Convert to using ctype macros defined in system.h.
13545 * method.c: Likewise.
13546 * xref.c: Likewise.
13547 * lex.c: Likewise. Also remove redundant system header stuff.
13548
13549 Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
13550
13551 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
13552 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
13553 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
13554 xref.c: Add include of toplev.h.
13555
13556 Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
13557
13558 * tree.c (perm_manip): Also regenerate the RTL of an extern.
13559 (copy_to_permanent): Use end_temporary_allocation.
13560
13561 Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
13562
13563 * init.c (expand_vec_init): The initialization of each array
13564 element is a full-expression.
13565
13566 Tue May 5 18:24:13 1998 Andrew MacLeod <amacleod@cygnus.com>
13567
13568 * method.c (build_mangled_name): Add a call to build_type_variant
13569 to get the right type.
13570
13571 Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
13572
13573 * Makefile.in: Add .SUFFIXES.
13574
13575 * cp-tree.def: Remove NAMESPACE_DECL.
13576
13577 Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
13578
13579 * call.c (build_over_call): Do evaluate arg even if it has empty
13580 class type.
13581 * decl.c (start_function): Don't push a member function.
13582
13583 Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
13584
13585 * Makefile.in (g++FAQ.info): Put -o option before input file.
13586
13587 Thu Apr 30 13:05:33 1998 Andrew MacLeod <amacleod@cygnus.com>
13588
13589 * gxxint.texi: Add info for squangling codes K and B.
13590
13591 Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
13592
13593 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
13594 the expression in templates.
13595 (finish_stmt_expr): Likewise.
13596
13597 1998-04-28 Brendan Kehoe <brendan@cygnus.com>
13598
13599 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
13600
13601 Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
13602
13603 * decl.c (maybe_push_to_top_level): Always clear
13604 current_template_parms and processing_template_decl.
13605 (pushtag): Remove check of current_class_type and some comments,
13606 since maybe_push_to_top_level no longer creates confusion.
13607
13608 Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
13609
13610 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
13611 (DECL_CLASS_TEMPLATE_P): Likewise.
13612 (DECL_PRIMARY_TEMPLATE): Likewise.
13613 (PRIMARY_TEMPLATE_P): Use it.
13614 (push_template_decl_real): New function.
13615 (redeclare_class_template): Take new template parameters as
13616 input.
13617 (is_specialization_of): New function.
13618 (comp_template_args): Declare.
13619 * decl.c (pushtag): Handle friend template classes.
13620 (xref_tag): Likewise. Use new calling convention for
13621 redeclare_class_template.
13622 * decl2.c (grok_x_components): Handle friend templates.
13623 * friend.c (is_friend): Use is_specialization_of where
13624 appropriate. Deal with friend class templates.
13625 (make_friend_class): Let a class template be friends with itself.
13626 * pt.c (comp_template_args): Remove declaration.
13627 (tsubst_friend_class): New function.
13628 (push_template_decl_real): New function.
13629 (push_template_decl): Use it.
13630 (redeclare_class_template): Adjust for new calling convention.
13631 (comp_template_args): Give it external linkage.
13632 (instantiate_class_type): Use tsubst_friend_class to deal
13633 with friend templates.
13634 * typeck.c (comptypes): Use comp_template_args, rather than
13635 expanding it inline.
13636 * parse.y (component_decl): Handle a nested template type
13637 like other component type declarations.
13638
13639 * pt.c (check_explicit_specialization): Handle overloaded
13640 constructors correctly.
13641
13642 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
13643 (lookup_template_class): Use it.
13644
13645 Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
13646
13647 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
13648 * cp-tree.h: Add WRAPPER support.
13649 * call.c (add_candidate): Split out from add_*_candidate fns.
13650 (build_over_call): Take the candidate instead of function and args.
13651 Enforce access control here. Emit overload warnings here.
13652 (add_warning): New fn.
13653 (joust): Add WARN parm. If not set, call add_warning instead of
13654 printing a warning. Re-enable some warnings.
13655 (tourney): Pass it.
13656 (convert_like): Adjust.
13657 (build_new_op): Adjust.
13658 (build_new_function_call): Adjust.
13659 (build_user_type_conversion_1): Adjust.
13660 (USER_CONV_FN): Adjust.
13661 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
13662 build_int_wrapper): New fns.
13663
13664 Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
13665
13666 * pt.c (unify): Fix typo in previous change.
13667
13668 Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
13669
13670 * error.c (dump_type_real): Declare canonical_name.
13671
13672 * typeck.c (comp_target_types): Fix PMFs.
13673
13674 Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
13675
13676 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
13677 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
13678 TEMPLATE_DECL.
13679
13680 * pt.c (tsubst): Decrease the template-level of
13681 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
13682 TEMPLATE_PARM_INDEX.
13683 (template_decl_level): New function.
13684 (unify): Make sure to record unifications for template
13685 parameters, even when the parameters exactly match the arguments.
13686 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
13687 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
13688 aren't from the level we're currently working on.
13689
13690 Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
13691
13692 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
13693
13694 * decl2.c (check_member_template): Set DECL_IGNORED for member
13695 class templates, too.
13696
13697 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
13698
13699 Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
13700
13701 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
13702
13703 Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
13704
13705 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
13706 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
13707 (init_decl_processing): Handle TI types.
13708 * typeck.c (unsigned_type, signed_type): Handle TI types.
13709
13710 Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
13711
13712 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
13713 New local added_libraries. Increment count when add library to
13714 arglist.
13715
13716 Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
13717
13718 * cp-tree.h (type_as_string_real): New function.
13719 * pt.c (mangle_class_name_for_template): Use it.
13720 * error.c (dump_aggr_type): Change prototype.
13721 (dump_type_prefix): Likewise.
13722 (dump_type_suffix): Likewise.
13723 (dump_type_real): Convert from dump_type. If desired, the
13724 "canonica" name of a typedef, i.e., the name of the underlying
13725 type, can be printed.
13726 (dump_type): Call dump_type_real.
13727
13728 Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
13729
13730 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
13731
13732 * typeck.c (comp_target_types): Tweak pedantic case.
13733 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
13734 Return -1 or 1 instead of 1 or 2.
13735 (compparms): Remove STRICT handling.
13736 (convert_for_assignment): Fix handling of pmfs.
13737
13738 Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
13739
13740 * typeck.c (comp_target_types): Handle references like pointers.
13741 (comp_target_parms): Note that return code from comp_target_types
13742 can be negative to indicate failure.
13743
13744 Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
13745
13746 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
13747 which requires a working target compiler to build.
13748
13749 Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
13750
13751 * tree.c (avoid_overlap): Add prototype.
13752
13753 * spew.c (num_tokens): Add prototype.
13754 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
13755
13756 * search.c (dfs_check_overlap): Add prototype.
13757 (dfs_no_overlap_yet): Likewise.
13758
13759 * pt.c (original_template): Add prototype.
13760 (inline_needs_template_parms): Likewise.
13761 (push_inline_template_parms_recursive): Likewise.
13762 (retrieve_specialization, register_specialization): Likewise.
13763 (print_candidates, reduce_template_parm_level): Likewise.
13764 (build_template_decl, mark_template_parm): Likewise.
13765 (tsubst_friend_function, get_bindings_real): Likewise.
13766
13767 * method.c (start_squangling): Add prototype.
13768 (end_squangling, check_ktype, issue_ktype): Likewise.
13769 (build_overloaded_scope_ref, check_btype): Likewise.
13770 (build_mangled_template_parm_index): Likewise.
13771
13772 * lex.c (init_cpp_parse): Add prototype.
13773 (handle_cp_pragma, handle_sysv_pragma): Likewise.
13774 (reduce_cmp, token_cmp): Likewise.
13775
13776 * except.c (call_eh_info): Add prototype.
13777 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
13778 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
13779
13780 * decl2.c (is_namespace_ancestor): Add prototype.
13781 (namespace_ancestor, add_using_namespace): Likewise.
13782 (ambiguous_decl): Likewise.
13783
13784 * decl.c (indent): Add prototype.
13785
13786 * call.c (add_template_candidate_real): Add prototype.
13787
13788 Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
13789
13790 * decl2.c (build_expr_from_tree): Just return a PMF.
13791
13792 Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
13793
13794 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
13795 when doing initializations.
13796
13797 * pt.c (unify): Use comptypes to compare type args.
13798
13799 Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
13800
13801 * decl.c (duplicate_decls): Fix check for when it's safe to free
13802 the new decl.
13803
13804 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
13805 to type_as_string.
13806
13807 Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
13808
13809 * pt.c (build_template_parm_index): Add prototype.
13810
13811 * search.c (my_tree_cons): Don't clear words outside the
13812 newly allocated node.
13813
13814 Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
13815
13816 * lex.c (init_parse): Now returns char* containing the filename.
13817
13818 Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
13819 Jeff Law <law@cygnus.com>
13820
13821 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
13822 than a pointer.
13823
13824 Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13825
13826 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
13827
13828 Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
13829
13830 * decl.c (duplicate_decls): Don't warn for redundant decls if
13831 friend: let add_friend take care of it.
13832
13833 Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
13834
13835 * sig.c (build_signature_pointer_constructor): Don't set
13836 TREE_HAS_CONSTRUCTOR for a signature pointer.
13837 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
13838 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
13839 here, too.
13840 * typeck.c (build_unary_op): Only allow taking the address of a
13841 real constructor.
13842 * typeck2.c (digest_init): Simplify.
13843 (store_init_value): Don't pedwarn about using { } for pmfs.
13844
13845 Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
13846
13847 * cp-tree.h (start_decl): Update prototype.
13848 * decl.c (start_decl): Like the C version, new parameters
13849 for the attributes. Call cplus_decl_attributes here,
13850 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
13851 (grokdeclarator): Pass NULL for new start_decl arguments.
13852 * pt.c (tsubst_expr): Likewise.
13853 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
13854 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
13855 * lex.c (build_lang_decl): Add lang_name_java.
13856 * class.c (push_lang_context): Add lang_name_java.
13857 * method.c (build_mangled_name): Check for is_java_type.
13858
13859 Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
13860
13861 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
13862 * call.c (build_scoped_method_call): Check for TREE_CODE for
13863 VOID_TYPE instead of type == void_type_node.
13864 (build_method_call): Likewise.
13865 * decl.c (lookup_name_real): Likewise.
13866 (grokdeclarator): Likewise.
13867 (start_decl): Likewise.
13868 (grokparms): Likewise.
13869 (start_function): Likewise.
13870 (finish_function): Likewise.
13871 (start_method): Likewise.
13872
13873 Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
13874
13875 * lex.c (finput): New variable.
13876 (init_cpp_parse): Renamed from init_parse.
13877 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
13878 (finish_parse): New function.
13879 * cp-tree.h (init_lex, init_parse): Remove declarations.
13880
13881 Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
13882
13883 * call.c (build_call): Still evaluate the actual argument.
13884 * class.c (is_empty_class): Update for -fnew-abi.
13885
13886 * decl2.c: -fnew-abi implies -fsquangle.
13887
13888 * method.c (do_build_assign_ref): Don't do anything to copy
13889 an empty class.
13890 (do_build_copy_constructor): Likewise.
13891 * call.c (build_over_call): Likewise.
13892
13893 Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
13894
13895 * tree.c (avoid_overlap): Return a value.
13896
13897 Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
13898
13899 * method.c (check_btype): Add missing argument to xrealloc.
13900 (check_ktype): Likewise.
13901
13902 Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
13903
13904 Implement empty base optimization.
13905 * class.c (finish_struct_1): Add vbase fields earlier. Set
13906 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
13907 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
13908 (types_overlap_p): New fn.
13909 * tree.c (avoid_overlap): New fn.
13910 (build_base_fields): Use it to avoid overlapping empty bases.
13911 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
13912
13913 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
13914
13915 Re-implement allocation of base class subobjects.
13916 * tree.c (unshare_base_binfos): New fn.
13917 (layout_basetypes): Use it. Now handles offsets of both virtual and
13918 non-virtual bases, after layout_type.
13919 (layout_vbasetypes): Remove.
13920 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
13921 (build_vbase_pointer_fields): Split out from old layout_basetypes.
13922 * class.c (finish_base_struct): Lose offset handling code.
13923 Move nonvdtor warning here. Don't mess with t_binfo anymore.
13924 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
13925 * cp-tree.h: Adjust.
13926
13927 Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
13928
13929 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
13930 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
13931 * class.c (duplicate_tag_error): Likewise.
13932 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
13933 * tree.c (layout_vbasetypes): Update from layout_record, remove
13934 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
13935 (layout_basetypes): Likewise.
13936
13937 Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
13938
13939 * class.c, Make sure system.h is included just after config.h.
13940 Delete lingering stdio and errno references too.
13941 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
13942
13943 Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
13944
13945 * friend.c (is_friend): Fix access control for local classes.
13946
13947 * class.c (is_empty_class): New fn.
13948 * call.c (build_call): Don't pass empty class objects to a function.
13949
13950 Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
13951
13952 * call.c (build_over_call): Do name resolution for default
13953 arguments of function templates in the scope of the templates.
13954
13955 Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
13956
13957 * call.c: Include system.h. Remove includes, declarations and
13958 defines provided by system.h.
13959 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
13960 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
13961 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
13962 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
13963 * typeck2.c, xref.c: Likewise.
13964 * Makefile.in: Dependencies updated as appropriate.
13965 * Make-lang.in: Likewise.
13966
13967 Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
13968
13969 * pt.c (fn_type_unification): Allow incomplete unification without
13970 an immediate error message.
13971
13972 Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
13973
13974 * tree.c (member_p): New fn.
13975 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
13976 initializing class members.
13977
13978 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
13979 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
13980
13981 * call.c (build_method_call): Handle non-scoped destructors, too.
13982 * pt.c (tsubst_copy): Likewise.
13983
13984 * pt.c (print_template_context): Split out...
13985 (push_tinst_level): ...from here.
13986
13987 * friend.c (is_friend): Don't pass a type to decl_function_context.
13988
13989 * typeck.c (convert_for_initialization): Always hand off
13990 conversions to class type.
13991
13992 Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
13993
13994 * friend.c (is_friend): Local classes have the same access as the
13995 enclosing function.
13996
13997 Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
13998
13999 * typeck.c (expand_target_expr): Delete dead function.
14000
14001 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
14002
14003 * repo.c (save_string): Delete dead function.
14004
14005 * method.c (thunk_printable_name): Delete dead function.
14006
14007 * lex.c (yynextch): Delete dead function.
14008
14009 * expr.c (tree_extract_aggr_init): #if 0 out.
14010
14011 * except.c (do_unwind): Delete dead function.
14012 (easy_expand_asm): Likewise.
14013
14014 * cvt.c (build_conversion_type_1): Delete dead function.
14015
14016 * cp-tree.h (push_expression_obstack): Declare.
14017
14018 * call.c (source_type): #if 0 out.
14019
14020 * class.c (alter_access): Remove unused label. Add braces
14021 around empty else clause.
14022
14023 * lex.c (yyprint): Fix argument to printf.
14024
14025 Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
14026
14027 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
14028
14029 * pt.c (instantiate_class_template): Make sure template
14030 arguments are permanent.
14031 * init.c (resolve_offset_ref): Don't go looking around in
14032 template types.
14033
14034 * semantics.c: Add routines to handle expressions, and some
14035 declaration processing.
14036 * parse.y: Use them.
14037 (current_class_depth): Move declaration to cp-tree.h.
14038 * parse.c: Regenerated.
14039 * cp-tree.h: Use them.
14040 (current_class_depth): Declare.
14041 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
14042
14043 Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
14044
14045 * error.c (dump_decl): Be a bit more explicit with template
14046 type arguments, when verbose.
14047
14048 Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
14049
14050 * inc/exception: Reorder closing braces.
14051
14052 Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
14053
14054 * pt.c (redeclare_class_template): New function.
14055 * cp_tree.h (redeclare_class_template): Declare it.
14056 * decl.c (xref_tag): Use it.
14057
14058 Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
14059
14060 * call.c (build_over_call): Check IS_AGGR_TYPE, not
14061 TYPE_LANG_SPECIFIC.
14062 * typeck.c (convert_arguments): Likewise.
14063
14064 * decl.c (grokdeclarator): Remove const and volatile from type after
14065 setting constp and volatilep.
14066
14067 * class.c (finish_struct_1): Don't warn about bool bitfield larger
14068 than one bit.
14069
14070 Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
14071
14072 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
14073
14074 Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
14075
14076 * call.c (build_object_call): Complain about ambiguous operator(),
14077 rather that crashing.
14078 (build_new_op): Likewise.
14079 (build_op_delete_call): Likewise.
14080
14081 Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
14082
14083 * cvt.c (perform_qualification_conversions): Use comp_target_types
14084 instead of comp_ptr_ttypes.
14085
14086 Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
14087
14088 * cp-tree.h (enforce_access): Declare.
14089 * call.c (enforce_access): Make it extern, not static.
14090 * class.c (alter_access): Use enforce_access; modify code for ISO
14091 compliance, rather than ARM rules.
14092
14093 Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14094
14095 * cp-tree.h: Fix typo.
14096
14097 Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
14098
14099 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
14100 if (aggregate_value_p (type)).
14101
14102 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
14103
14104 Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
14105
14106 * tree.c (mapcar): When dealing with a DECL, use it's constant
14107 value, if any.
14108 * pt.c (lookup_template_class): Don't mangle the names of template
14109 classes whose arguments are unknown.
14110
14111 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
14112
14113 Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
14114
14115 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
14116
14117 Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
14118
14119 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
14120 boolean_type_node to 1.
14121
14122 Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
14123
14124 * error.c (dump_expr): Remove unused variable `l'.
14125
14126 * pt.c (for_each_template_parm): New function, created by
14127 converting uses_template_parms.
14128 (tree_fn_t): New typedef.
14129 (uses_template_parms): Use it.
14130 (mark_template_parm): New function.
14131 (push_template_decl): Check that the argument list of a partial
14132 specialization uses all the template parameters.
14133
14134 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
14135 with it; we might want it for debugging.
14136 * cp-tree.h (type_unification): Change interface.
14137 * class.c (finish_struct_1): Skip nested template types, just like
14138 ordinary nested types.
14139 (instantiate_type): Use new interface to type_unification.
14140 * lex.c (init_lex): Add __sz as opname for sizeof.
14141 * method.c (build_overload_scope_ref): New function.
14142 (build_overload_int): Handle complex expressions. Set
14143 numeric_output_need_bar if necessary.
14144 (build_overload_value): Handle non-PARM_DECL nodes; this
14145 routine is now used by build_overload_int. Remove some
14146 assignments to numeric_output_need_bar. Use
14147 build_overload_scope_ref.
14148 (build_qualified_name): Note that some template mangled names end
14149 with digits, and set numeric_output_need_bar appropriately. Use
14150 build_underscore_int.
14151 * pt.c (unify): Change interface.
14152 (type_unification_real): Likewise.
14153 (determine_specialization): Use new interfaces.
14154 (tsubst): Deal gracefully with situations in which the argument
14155 vector is not fully filled.
14156 (fn_type_unification): Use new interfaces.
14157 (type_unification): Likewise. Remove NOP_EXPR hack.
14158 (type_unification_real): Likewise.
14159 (unify): Likewise. Deal with unification of complex expressions.
14160
14161 Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
14162
14163 * pt.c (complete_template_args): Initialize skip properly.
14164
14165 * decl.c (make_typename_type): Revert.
14166 (make_implicit_typename): Remove.
14167 (lookup_name_real): Don't call it. Call lookup_field if we see a
14168 TYPE_DECL from a template base.
14169 * search.c (lookup_field): Do implicit typename stuff.
14170
14171 Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
14172 Geoff Noer <noer@cygnus.com>
14173
14174 * Makefile.in: Various fixes for building cygwin32 native toolchains.
14175 * Make-lang.in: Likewise.
14176
14177 Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14178
14179 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
14180
14181 Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
14182
14183 * decl.c (make_implicit_typename): Rewrite removed code.
14184 (make_typename_type): Call it if the type we look up comes from
14185 a base that uses template parms.
14186
14187 * pt.c (complete_template_args): Rewrite.
14188 (tsubst, FUNCTION_DECL): Use it.
14189
14190 Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
14191
14192 * semantics.c (finish_asm_stmt): Fix combine strings. Call
14193 c_expand_asm_operands () if output_operands, input_operands or
14194 clobbers is not NULL_TREE.
14195
14196 Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14197
14198 * pt.c (complete_template_args): New function.
14199 (get_bindings): Deal with specializations of function templates
14200 with return type containing parameters from outer class
14201 templates.
14202 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
14203 substitute arguments and compose a new type.
14204
14205 Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
14206
14207 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
14208 FUNCTION_DECLs.
14209
14210 Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
14211
14212 * decl.c (make_implicit_typename): Lose useless code.
14213
14214 * call.c (standard_conversion): Handle A* -> const A* properly.
14215
14216 * pt.c (get_bindings_real): Rename from get_bindings. Add
14217 check_rettype parm.
14218 (get_bindings): Pass 1.
14219 (get_bindings_overload): Pass 0.
14220
14221 Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
14222
14223 * pt.c (check_explicit_specialization): When reverting a static
14224 member function, also remove the `this' parameter from
14225 last_function_parms.
14226
14227 Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
14228
14229 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
14230 a function context.
14231
14232 * decl.c (store_bindings): Use free_binding_vecs.
14233 (pop_from_top_level): Likewise.
14234
14235 Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
14236
14237 * decl.c (make_implicit_typename): Only change the type of a
14238 TYPENAME_TYPE.
14239
14240 Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
14241
14242 * semantics.c: New file, containing routines to perform the
14243 semantic phase of parsing.
14244 * parse.y: Use it.
14245 * pt.c (tsubst_expr): Likewise.
14246 * cp-tree.h: Declare the various functions in semantics.c.
14247 Provide macros to access _STMT tree nodes.
14248 * cp-tree.def: Add ASM_STMT tree node.
14249 * Makefile.in, Make-lang.in: Add dependencies on and for
14250 semantics.c.
14251
14252 Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
14253
14254 * pt.c (push_template_decl): Only check primary templates.
14255
14256 * pt.c (check_explicit_specialization): Complain about default args
14257 in explicit specialization.
14258
14259 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
14260 constructor_declarator.
14261
14262 Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
14263
14264 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
14265 has no overloaded operator ->.
14266
14267 * call.c (build_field_call): Don't crash when presented with a
14268 field that is actually a nested type.
14269
14270 * decl.c (pushtag): Deal with friend class injection in local
14271 classes.
14272
14273 * call.c (build_object_call): Don't crash if OBJ is a
14274 pointer-to-member-function.
14275
14276 Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
14277
14278 * pt.c (push_template_decl): Complain about template with C linkage,
14279 anonymous template class.
14280
14281 Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
14282
14283 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
14284 * search.c: Likewise.
14285
14286 * lex.c (do_pending_defargs): Only call
14287 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
14288
14289 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
14290
14291 Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
14292
14293 * parse.y: Deal with CONSTRUCTORS in new_initializers.
14294
14295 Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
14296
14297 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
14298 closely mimics the behavior in parse.y.
14299 (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
14300 into a compound statement.
14301
14302 Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
14303
14304 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
14305 * pt.c (inline_needs_template_parms): New fn.
14306 (original_template): New fn.
14307 (push_inline_template_parms_recursive): New fn.
14308 (maybe_begin_member_template_processing): Use them.
14309 (maybe_end_member_template_processing): Likewise.
14310 (is_member_or_friend_template): Rename to is_member_template.
14311 Member functions of local classes are never member templates.
14312
14313 Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14314
14315 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
14316 added in the class scope to catch redefinition error.
14317
14318 * pt.c (reduce_template_parm_level): Also copy
14319 the DECL_TEMPLATE_PARMS field.
14320
14321 Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
14322
14323 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
14324 reduced-level template type parameter.
14325
14326 Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
14327
14328 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
14329 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
14330 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
14331 * decl.c (duplicate_decls): Propagate it.
14332 * typeck2.c (abstract_virtuals_error): Use two loops to emit
14333 abstract virtual functions and virtual functions which need a
14334 final overrider separately.
14335
14336 Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
14337
14338 * lang-specs.h: Properly put brackets around array elements in
14339 initializer.
14340
14341 * typeck.c (build_binary_op_nodefault): Correctly place parens around
14342 && and || in expression.
14343
14344 Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
14345
14346 * call.c (default_parm_conversions): Remove prototype definition.
14347 (build_method_call): Remove unused variable result.
14348
14349 * cvt.c (ocp_convert): Remove unused variable conversion.
14350
14351 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
14352
14353 * except.c (do_unwind): #if 0 definition of unused variables fcall
14354 and next_pc.
14355
14356 * expr.c (extract_scalar_init): #if 0 prototype and function
14357 definition.
14358
14359 * init.c (expand_aggr_init_1): Remove unused variable init_type.
14360 (build_new_1): Remove unused variable t.
14361
14362 * pt.c (instantiate_class_template): Remove unused variable newtag;
14363 cast called function return value to void.
14364 (do_decl_instantiation): Remove unused variables name and fn.
14365
14366 * tree.c (get_type_decl): Add default return to shut up compiler from
14367 complaining control reaches end of non-void function.
14368
14369 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
14370
14371 Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
14372
14373 * call.c (default_parm_conversions): Remove prototype definition.
14374 (build_method_call): Remove unused variable result.
14375 (build_over_call): Add default case in enumeration switch.
14376
14377 Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
14378
14379 * decl2.c (lang_decode_option): Change j's type to size_t.
14380
14381 * tree.c (layout_vbasetypes): record_align and desired_align are of
14382 type unsigned int; const_size and nonvirtual_const_size likewise.
14383
14384 Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
14385
14386 * parse.y (new_initializer): Make sure all initializers are
14387 lists.
14388
14389 Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
14390
14391 * decl2.c (import_export_decl): Mark tinfo functions for
14392 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
14393
14394 Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
14395
14396 * method.c: Fix typo.
14397
14398 Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14399
14400 * method.c: Include "system.h" to get stdlib.h, stdio.h,
14401 ctype.h, string.h, etc.
14402 (issue_nrepeats): Add default case in enumeration switch.
14403 (check_btype): Likewise.
14404 (process_overload_item): Likewise.
14405
14406 * Makefile.in (method.o): Depend on system.h.
14407
14408 Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
14409
14410 * lex.c (do_scoped_id): Fix parenthesizing.
14411
14412 Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
14413
14414 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
14415 FLAG_RTTI is unset, initialize type info machinery and continue
14416 with FLAG_RTTI enabled.
14417 (get_typeid): Likewise.
14418
14419 Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
14420
14421 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
14422 from B.
14423
14424 Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
14425
14426 * pt.c (finish_member_template_decl): Deal more gracefully with
14427 invalid declarations.
14428
14429 Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
14430
14431 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
14432 cp-tree.h: Clean up more old overloading code, old RTTI code, and
14433 some formatting quirks.
14434
14435 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
14436 method.c, pt.c, ptree.c, typeck.c: Remove support for
14437 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
14438 * class.h: Remove.
14439 * Makefile.in: Adjust.
14440
14441 * pt.c (unify): Don't allow reduced cv-quals when strict.
14442
14443 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
14444 *type_unification* and unify.
14445
14446 Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
14447
14448 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
14449 (nested_name_specifier): And add it before this use.
14450 (typename_sub0): And this use. Also add use without the keyword.
14451 (typename_sub1): Likewise.
14452 * pt.c (instantiate_class_template): Don't actually instantiate
14453 anything if our type uses template parms.
14454
14455 Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
14456
14457 * decl.c (start_function): Don't call temporary_allocation for a
14458 nested function.
14459
14460 Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
14461
14462 * pt.c (instantiate_class_template): Don't mess with friends if
14463 our type uses template parms.
14464
14465 Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
14466
14467 * parse.y (nested_name_specifier): Use explicit_template_type.
14468 (typename_sub): Allow a template_type, an explicit_template_type,
14469 or an implicit template type at the end.
14470 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
14471 * decl.c (make_typename_type): Handle template-id where the name
14472 is a TEMPLATE_DECL.
14473 * call.c (build_scoped_method_call): Handle member template
14474 destructor call.
14475 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
14476 destructor is represented by the type.
14477
14478 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
14479 * parse.y (nested_name_specifier): Add 'template' case.
14480 (explicit_template_type): New rule.
14481 (typename_sub): Use it.
14482 * decl.c (make_typename_type): Handle getting a template-id for NAME.
14483 * pt.c (tsubst): Likewise.
14484
14485 Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
14486
14487 * pt.c (add_to_template_args): Fix thinko.
14488 (instantiate_class_template): Call it later.
14489
14490 * pt.c (get_class_bindings): Add outer_args parm.
14491 (most_specialized_class): Likewise.
14492 (instantiate_class_template): Pass it.
14493 (more_specialized_class): Likewise.
14494 (lookup_template_class): Get context from template if none
14495 was specified.
14496 (finish_member_template_decl): Don't do anything with a
14497 partial specialization.
14498 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
14499 AGGREGATE_TYPE_P.
14500 * class.c (finish_struct): Member class templates have already been
14501 checked for name clashes.
14502 * decl.c (pushdecl_with_scope): Handle pushing at class level.
14503
14504 Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
14505
14506 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
14507 (tsubst, *_PARM): Support multiple levels of template classes.
14508 (instantiate_class_template): Look up the pattern from the
14509 original template.
14510 (lookup_template_class): Handle getting a template for d1.
14511 (push_template_decl): Correct setting of 'primary'.
14512 (reduce_template_parm_level): Add 'levels' parm.
14513 (finish_member_template_decl): Support member class templates.
14514 (template_class_depth): Handle multiple levels.
14515 * parse.y (component_decl_1, fn.def2): Remove member template case.
14516 (component_decl): Add member template cases.
14517 * decl2.c (check_member_template): We now handle member template
14518 classes.
14519 * decl.c (pushtag): Handle member templates.
14520 * method.c (do_inline_function_hair): Don't touch
14521 IDENTIFIER_GLOBAL_VALUE.
14522 * init.c (build_offset_ref): If name isn't an identifier, just
14523 return it.
14524 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
14525
14526 * typeck.c (get_delta_difference): Do adjust for conversions to
14527 and from virtual base.
14528
14529 Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
14530
14531 * typeck.c (get_delta_difference): Give hard error for conversion
14532 from virtual base.
14533
14534 * cp-tree.h: Tweak formatting.
14535
14536 Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
14537
14538 * decl.c (push_namespace): Handle redeclaration error.
14539
14540 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
14541 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
14542 (NAMESPACE_BINDING): New macro.
14543 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
14544 * *.c: Use them.
14545
14546 * pt.c (push_template_decl): Use innermost_args.
14547
14548 * decl.c (get_unique_name): Tweak from earlier in the name.
14549
14550 Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
14551
14552 * cp-tree.def: Add CPLUS_BINDING node.
14553 * cp-tree.h (tree_binding): New struct.
14554 (BINDING_SCOPE, BINDING_VALUE): New macros.
14555 (current_namespace, global_namespace): Declare extern.
14556 (struct lang_decl_flags): New field in_namespace.
14557 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
14558 (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
14559 (TREE_INDIRECT_USING): New macro.
14560 * decl2.c (current_namespace, global_namespace): Declare. The
14561 value is a NAMESPACE_DECL now, not a TREE_LIST.
14562 (is_namespace_ancestor, namespace_ancestor): New static functions.
14563 (add_using_namespace, ambiguous_decl): Likewise.
14564 (lookup_using_namespace): New support function for lookup_name.
14565 (qualified_lookup_using_namespace): New support function for
14566 do_scoped_id and lookup_namespace_name.
14567 (get_namespace_id): Mark as obsolete.
14568 (current_namespace_id): Likewise.
14569 (do_namespace_alias): Implement.
14570 (do_using_directive): Implement as call to add_using_namespace.
14571 * decl.c (binding_for_name): New function.
14572 (push_namespace, pop_namespace): Implement.
14573 (push_decl): Don't install a FUNCTION_DECL in the global branch.
14574 (lookup_namespace_name): Implement using qualified lookup.
14575 (lookup_name_real): For global scoping, lookup in
14576 global_namespace. For namespace scoping, lookup in given
14577 namespace. For unscoped lookup, iterate over namespace,
14578 considering using directives.
14579 (init_decl_processing): Initialize global_namespace.
14580 (grokvardecl): Build assembler name as static name for globals.
14581 (grokdeclarator): Remove old namespace mangling.
14582 (xref_tag): When installing a global binding for the
14583 tag, make sure we have an identifier.
14584 * method.c (build_overload_nested_name): Mangle namespaces.
14585 (build_qualified_name): Likewise.
14586 (build_decl_overload_real): Likewise.
14587 * lex.c (build_lang_decl): Set namespace for new declaration to
14588 current_namespace.
14589 (do_scoped_id): Find global names in global or current
14590 namespace, or using qualified namespace lookup, depending on
14591 context.
14592 * init.c (build_member_call): When scope is namespace, use
14593 build_x_function_call instead.
14594 (build_offset_ref): When scope is namespace, collapse processing
14595 to lookup_namespace_name instead.
14596 * error.c (dump_decl): Support NAMESPACE_DECL.
14597 * decl.c (pushdecl): Bind globals to current namespace.
14598 (push_overloaded_decl): Likewise.
14599 (lookup_tag): Likewise.
14600 (lookup_name_current_level): Likewise.
14601 (xref_tag): Likewise.
14602 (start_function): Likewise.
14603 * lex.c (do_identifier): Likewise.
14604 (identifier_typedecl_value): Likewise.
14605 (real_yylex): Likewise.
14606 * method.c (do_inline_function_hair): Likewise.
14607 * parse.y (unscoped): Likewise.
14608 * pt.c (check_explicit_specialization): Likewise.
14609 (lookup_template_class): Likewise.
14610 * rtti.c (call_void_fn): Likewise.
14611 * sig.c (build_sigtable): Likewise.
14612 * ptree.c (lang_print_xnode): New function.
14613
14614 Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
14615
14616 * pt.c (instantiate_class_template): Don't instantiate if pedantic
14617 and the args use template parms.
14618
14619 * pt.c (push_tinst_level): If the instantiation uses template parms,
14620 fail silently.
14621 * decl.c (xref_basetypes): Do call complete_type for basetypes
14622 that involve template parameters.
14623
14624 Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
14625
14626 * typeck2.c (process_init_constructor): Fix labeled init check.
14627
14628 Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
14629
14630 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
14631 argument to tsubst and friends.
14632
14633 * pt.c (tsubst, FUNCTION_DECL): Tidy.
14634
14635 * typeck.c (build_x_function_call): Handle static member function
14636 templates like non-templates. Handle friend templates like normal
14637 function templates.
14638 * pt.c (tsubst, *_PARM): Don't use orig_level.
14639 (get_bindings): Don't call add_to_template_args.
14640 (instantiate_template): Likewise.
14641 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
14642 * ptree.c (print_lang_type): Print index/level for template parms.
14643
14644 Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
14645
14646 * Make-lang.in (cc1plus): Note that cc1plus depends on
14647 cp/cp-tree.h and cp/cp-tree.def.
14648
14649 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
14650 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
14651 position in a template parameter list.
14652 * cp-tree.h (template_parm_index): New structure, used as the tree
14653 structure for a TEMPLATE_PARM_INDEX.
14654 (TEMPLATE_PARM_IDX): New macro.
14655 (TEMPLATE_PARM_LEVEL): Likewise.
14656 (TEMPLATE_PARM_DESCENDANTS): Likewise.
14657 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
14658 (TEMPLATE_PARM_DECL): Likewise.
14659 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
14660 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
14661 (TEMPLATE_TYPE_DECL): Likewise.
14662 (TEMPLATE_CONST_IDX): Remove.
14663 (TEMPLATE_CONST_LEVEL): Likewise.
14664 (TEMPLATE_CONST_SET_INFO): Likewise.
14665 (TEMPLATE_TYPE_SET_INFO): Likewise.
14666 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
14667 node.
14668 (TEMPLATE_TYPE_LEVEL): Likewise.
14669 * decl.c (decls_match): Call comp_template_parms, rather than
14670 expanding it inline.
14671 (duplicate_decls): If two template declarations are being merged,
14672 then their TEMPLATE_INFOs should be merged as well.
14673 (grokfndecl): Save template-id information when declaring a friend
14674 with explicit template arguments. Pass arguments to
14675 check_explicit_specialization via correct convention; at some
14676 point check_explicit_specialization changed, but these call-sites
14677 did not.
14678 (grokdeclarator): Tidy up slightly.
14679 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
14680 two template functions with the same DECL_ASSEMBLER_NAME the same,
14681 since the names are not yet mangled.
14682 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
14683 TEMPLATE_CONST_PARM.
14684 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
14685 decl for a non-type parameter, rather than printing `<tparm ...>'.
14686 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
14687 (do_friend): Deal with template friends.
14688 * lex.c (do_pending_inlines): Call
14689 maybe_begin_member_template_processing, rather than
14690 conditionally calling begin_member_template_processing.
14691 (process_next_inline): Likewise. Call
14692 maybe_end_member_template_processing, rather than
14693 conditionally calling end_member_template_processing.
14694 (do_pending_defargs): Likewise.
14695 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
14696 TEMPLATE_CONST_PARM.
14697 * method.c (build_mangled_template_parm_index): New function.
14698 (build_overload_value): Use it.
14699 (build_overload_name): Likewise.
14700 * pt.c (finish_member_template_decl): Allow friend declarations.
14701 (template_class_depth): New function.
14702 (is_member_template): Rename, and modify, to become...
14703 (is_member_or_friend_template): New function.
14704 (end_member_template_processing): Rename, and modify, to become...
14705 (maybe_end_member_template_processing).
14706 (build_template_parm_index): New function.
14707 (reduce_template_parm_level): New function.
14708 (process_template_parm): Modify to use build_template_parm_index.
14709 (push_template_decl): Deal with friend templates.
14710 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
14711 TEMPLATE_CONST_PARM.
14712 (tsubst_friend_function): New function.
14713 (instantiate_class_template): Generate the DECL_FRIENDLIST
14714 for a new instantiation by using tsubst_friend_function rather
14715 than just tsubst.
14716 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
14717 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
14718 appropriate new macros. Use reduce_template_parm_level to
14719 generate lower-level template parameters. Handle tsubst'ing into
14720 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
14721 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
14722 templates. Similarly for the template parameters for a new
14723 template.
14724 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
14725 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
14726 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
14727 (get_bindings): Call add_to_template_args if necessary.
14728 (instantiate_decl): Handle instantiations of friend templates.
14729 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
14730 TEMPLATE_TYPE_PARM as a list of fields; it's not!
14731 * spew.c (yylex): Do a little manual constant propagation to
14732 clarify the code.
14733
14734 Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
14735
14736 * error.c: Include sys/types.h.
14737
14738 Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
14739
14740 * method.c (build_mangled_name): Start CPP directives in column zero.
14741
14742 Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
14743
14744 * typeck2.c (process_init_constructor): Sorry about non-trivial
14745 labeled initializers.
14746 * parse.y (initlist): Re-enable labeled initializers.
14747
14748 Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14749
14750 * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
14751 all callers changed. Rely on the new parameter instead of arg
14752 being a TREE_LIST when determine whether we are working inside
14753 template template parameter. Clean up is_type test.
14754
14755 Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
14756
14757 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
14758 * typeck2.c (initializer_constant_valid_p): Allow conversions
14759 between pointers and references.
14760
14761 1998-02-19 Brendan Kehoe <brendan@cygnus.com>
14762
14763 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
14764 if pedantic || warn_pointer_arith.
14765
14766 Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14767
14768 * pt.c (unify): Handle TEMPLATE_DECL.
14769
14770 1998-02-18 Brendan Kehoe <brendan@cygnus.com>
14771
14772 * cp-tree.h (strip_attrs): Remove decl.
14773
14774 1998-02-18 Doug Evans <devans@cygnus.com>
14775
14776 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
14777 Update olddecl's attributes too.
14778 (strip_attrs): Remove function.
14779 * typeck.c (common_type): Call merge_machine_type_attributes.
14780
14781 Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
14782
14783 * parse.y (initdcl0_innards): New grammar symbol.
14784 (nomods_initdecls, nomods_initdcl0): Change type from itype to
14785 none, since the resulting value is never used.
14786 (parse_decl): New function.
14787 (datadef): Remove redundant actions.
14788 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
14789 * parse.c: Regenerated.
14790
14791 Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
14792
14793 * parse.y (simple_stmt): Use getdecls() to check for decl.
14794
14795 Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
14796
14797 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
14798 macros.
14799 (c++.install-common): Install c++filt properly as native or as cross
14800 variant.
14801 (c++.uninstall): Add c++filt.
14802
14803 Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
14804
14805 * call.c (standard_conversion): Fix multi-level ptr conversions.
14806
14807 Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
14808
14809 * init.c (build_new): Propagate error_mark_node up.
14810
14811 Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
14812
14813 * parse.y (simple_stmt): If the condition isn't a declaration,
14814 start the controlled block after the test.
14815
14816 Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
14817
14818 * call.c (build_over_call): Convert builtin abs, labs and fabs to
14819 tree-codes.
14820 * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
14821 builtins.
14822
14823 Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
14824
14825 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
14826
14827 Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
14828
14829 * cp-tree.h: Add access_protected_virtual_node.
14830 * class.c (init_class_processing): Initialize it.
14831 * decl.c (xref_basetypes): Use it.
14832 * parse.y (base_class_access_list): Likewise.
14833
14834 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
14835 (c++.install-common): Install c++filt.
14836
14837 Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
14838
14839 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
14840
14841 Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
14842
14843 * call.c (reference_binding): Use comptypes when comparing
14844 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
14845
14846 Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
14847
14848 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
14849 (really_overloaded_fn): Move check here from is_overloaded_fn.
14850 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
14851
14852 Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
14853
14854 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
14855 conversions.
14856
14857 Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
14858
14859 * cp-tree.h (push_template_decl): Return the decl passed in, or an
14860 equivalent duplicate.
14861 * decl.c (pushtag): Use the return value from push_template_decl.
14862 (duplicate_decls): When duplicating a template declaration, merge
14863 the DECL_TEMPLATE_RESULTs as well.
14864 (make_implicit_typename): Don't try to dive into typename types to
14865 find a context for making a new implicit typename.
14866 (start_decl): Use the return value from push_template_decl.
14867 (grokdeclarator): Complain about declarations list `const operator
14868 int'. Since we don't correctly handle in-class initializations of
14869 non-static data members, complain about this (now illegal)
14870 practice. Issue an error for initializations of non-const statics
14871 since that is illegal as well, and since we don't handle that case
14872 correctly either.
14873 (start_function): Use the return value from push_template_decl.
14874 (start_method): Likewise.
14875 * decl2.c (grokfield): Likewise. Since the change to
14876 grokdeclarator ensures that all initialized fields are in fact
14877 static, remove a redundant test for TREE_PUBLIC.
14878 * parse.y (initlist): Disable labeled initializers since they do
14879 not work as per the documentation, and since they do not use the
14880 same syntax as the C front end.
14881 * pt.c (push_template_decl): Return the decl passed in, or an
14882 equivalent duplicate.
14883 (lookup_template_class): When searching in a nested context,
14884 use the right arguments.
14885 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
14886 * typeck.c (build_component_ref): Assign the correct type to the
14887 result of build_vfn_ref.
14888
14889 Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
14890
14891 * pt.c (convert_nontype_argument): Fix typo.
14892 (check_explicit_specialization): Allow old-style specialization
14893 of class template members.
14894
14895 Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
14896 Manfred Hollstein <manfred@s-direktnet.de>
14897
14898 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
14899 when deciding to override DECL_ASSEMBLER_NAME.
14900
14901 Tue Feb 10 15:30:55 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
14902
14903 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
14904 * cp-tree.h (flag_do_squangling): Add declaration.
14905 * lang-options.h: Add -fsquangle and -fno-squangle.
14906 * method.c: Add macros and static variables for squangling.
14907 (build_overload_name): Rename to build_mangled_name, add logic for B
14908 compression, and split into process_modifiers and
14909 process_overload_item.
14910 (process_modifiers): New function, to handle constant, reference,
14911 and pointer types.
14912 (process_overload_item): New function, handles issue of type codes.
14913 (build_overload_name): New function, start squangling and call
14914 build_mangled_name.
14915 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
14916 (start_squangling): New function to initialize squangling structs.
14917 (end_squangling): New function to destroy squangling structs.
14918 (nrepeats): Rename variable to Nrepeats.
14919 (issue_nrepeats): New function for issuing 'n' type repeats.
14920 (check_ktype): New function to check for type K name compression.
14921 (build_overload_nested_name): Add a check for K name compression.
14922 (build_qualified_name): Add a check for K name compression and don't
14923 use DECL_ASSEMBLER_NAME when squangling is on.
14924 (check_btype): New function, checks for B type compression.
14925 (build_static_name, build_decl_overload_real): Initiate squangling.
14926 (build_typename_overload, build_overload_with_type): Initiate
14927 squangling
14928
14929 Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
14930
14931 * method.c (make_thunk): Avoid name buffer overflow.
14932
14933 Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
14934
14935 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
14936 don't define them yet.
14937
14938 * parse.y (nomods_initdcl0): Add constructor_declarator case.
14939
14940 Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14941
14942 * config-lang.in (diff_excludes): Use basename only.
14943
14944 Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
14945
14946 * tinfo2.cc: Add tinfo for signed char.
14947
14948 Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
14949
14950 * search.c (compute_access): Handle protected constructors in derived
14951 classes as accessible.
14952
14953 Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
14954
14955 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
14956 Call convert_from_reference sooner.
14957
14958 Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
14959
14960 * cvt.c (ocp_convert): Obtain the constant values from constant
14961 decls even if the destination type is the same as the type of the
14962 decl.
14963
14964 * decl2.c (finish_file): Make sure that static inlines with
14965 definitions are not marked DECL_EXTERNAL before returning.
14966
14967 Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
14968
14969 * decl.c: Lose arg_looking_for_template.
14970 (lookup_name_real): Likewise.
14971 * parse.y: Lose processing_template_arg, template_arg1.
14972 (primary): Likewise.
14973 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
14974
14975 Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14976
14977 * error.c (dump_decl): Fix type of default arguments for template
14978 template parameters and nontype template parameters.
14979 * parse.y (template_parm): Handle invalid default template
14980 template arguments here.
14981
14982 * parse.y (template_parm): Use template_arg instead of PTYPENAME
14983 for default template template argument.
14984 * pt.c (coerce_template_parms): Merge default template argument
14985 codes. Can treat RECORD_TYPE as template name if it is implicitly
14986 created. Fix argument index in error message.
14987 * typeck.c (comptypes): Merge template argument comparison codes in
14988 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
14989
14990 Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
14991
14992 * lex.c (file_name_nondirectory): Also check for '/'.
14993
14994 Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
14995
14996 * parse.y (primary): Deal with statement-expressions in
14997 templates.
14998 * pt.c (tsubst_copy): Handle BIND_EXPR.
14999 * tree.c (mapcar): Likewise.
15000
15001 * call.c (add_template_candidate_real): Pass extra parameter to
15002 fn_type_unification.
15003 * cp-tree.h (fn_type_unification): Add parameter.
15004 * pt.c (fn_type_unification): Add additional parameter to deal with
15005 static member functions.
15006 (get_bindings): Deal with static member functions.
15007
15008 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
15009 (revert_static_member_fn): Declare.
15010 * decl.c (revert_static_member_fn): Remove declaration. Change
15011 linkage from internal to external.
15012 (cp_finish_decl): Deal with virtual functions in classes local to
15013 template functions.
15014 * decl2.c (finish_file): Don't forget to emit increment/decrement
15015 expressions in initializers for file-scope variables.
15016 * parse.y (typename_sub2): If the typename doesn't names a
15017 template, rather than a type, issue an error message.
15018 * pt.c (check_explicit_specialization): Handle specializations of
15019 static member functions.
15020 (coerce_template_parms): Handle offset references to lists of
15021 member functions.
15022 * search.c (note_debug_info_needed): Don't crash when handed a
15023 type which is being defined.
15024 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
15025 that can happen with some illegal code.
15026
15027 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15028
15029 * call.c (user_harshness): Initialize `code' to 0.
15030 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
15031 (null_ptr_cst_p): Add parentheses around && within ||.
15032 (standard_conversion): Likewise.
15033 (z_candidate): Likewise.
15034 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
15035 (build_object_call): Likewise for `mem_args'.
15036 (build_new_op): Likewise for `mem_arglist'. Add `return' from
15037 default case in enumeration switch.
15038
15039 * class.c (build_vtable_entry): Add explicit braces to avoid
15040 ambiguous `else'.
15041 (build_class_init_list): Likewise.
15042 (finish_struct_1): Initialize `width' to 0.
15043 (instantiate_type): Initialize `name' to NULL_TREE. Add
15044 explicit braces to avoid ambiguous `else'.
15045
15046 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
15047 `else'.
15048
15049 * decl.c (grok_reference_init): Eliminate unused parameter, all
15050 callers changed.
15051 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
15052 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
15053 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
15054 (grokdeclarator): Add parentheses around && within ||. Add
15055 explicit braces to avoid ambiguous `else'.
15056 (grokparms): Initialize `type' to NULL_TREE.
15057 (xref_tag): Remove unused label `just_return'.
15058 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
15059 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
15060 (hack_incomplete_structures): Add parentheses around assignment
15061 used as truth value.
15062
15063 * decl2.c (coerce_delete_type): Hide definition of `e3'.
15064
15065 * error.c: Include <stdlib.h>.
15066 (dump_expr): Change the type of `i' to size_t. Remove unused
15067 label `error'.
15068
15069 * except.c (init_exception_processing): Remove unused variable `d'.
15070 (expand_throw): Likewise for `label'.
15071
15072 * friend.c (add_friends): Add explicit braces to avoid ambiguous
15073 `else'.
15074
15075 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
15076 (sort_base_init): Likewise for `binfo'.
15077 (expand_member_init): Likewise for `rval'.
15078 (build_member_call): Add parentheses around assignment used as
15079 truth value.
15080 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
15081 (build_new): Initialize `nelts' to NULL_TREE. Initialize
15082 `old_immediate_size_expand' to 0.
15083 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
15084 (build_vec_delete_1): Remove unused variable `block'.
15085 (expand_vec_init): Initialize `itype' to NULL_TREE.
15086
15087 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
15088 declaration of `index' and `rindex' with autoconf macros.
15089 (reinit_parse_for_expr): Remove unused variables
15090 `look_for_semicolon' and `look_for_lbrac'.
15091 (cons_up_default_function): Initialize `args' to NULL_TREE.
15092 (readescape): Initialize `firstdig' to 0.
15093 (real_yylex): Add parentheses around assignment used as truth value.
15094
15095 * method.c: Include <strings.h> if we don't have <string.h>.
15096 Protect declaration of `index' with autoconf macro.
15097
15098 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
15099 Initialize `type' to NULL_TREE.
15100 (structsp): Remove unused variable `id'.
15101
15102 * pt.c (coerce_template_parms): Add explicit braces to avoid
15103 ambiguous `else'.
15104 (lookup_template_class): Initialize `template' to NULL_TREE.
15105 (instantiate_class_template): Remove unused variable `name' and `e'.
15106 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
15107 (do_poplevel): Initialize `saved_warn_unused' to 0.
15108 (type_unification): Remove unused varable `parm'.
15109 (unify): Likewise for `j'.
15110
15111 * repo.c (init_repo): Add parentheses around assignment used as
15112 truth value.
15113 (finish_repo): Remove unused varable `p'.
15114
15115 * search.c (get_binfo): Initialize `type' to NULL_TREE.
15116 (get_base_distance): Likewise.
15117 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
15118 and `new_v' to NULL_TREE.
15119 (lookup_fnfields): Likewise for `rval_binfo_h'.
15120 (breadth_first_search): Add parentheses around assignment used as
15121 truth value.
15122 (get_template_base): Initialize `type' to NULL_TREE.
15123
15124 * sig.c (append_signature_fields): Initialize `last_mfptr' to
15125 NULL_TREE.
15126 (build_signature_table_constructor): Likewise for
15127 `last_rhs_field', `pfn' and `vt_off'.
15128 (build_sigtable): Likewise for `init'.
15129
15130 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
15131 (propagate_binfo_offsets): Likewise for `delta'.
15132 (hash_tree_cons): Initialize hashcode to 0.
15133 (can_free): Likewise for `size'.
15134 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
15135
15136 * typeck.c (convert_sequence): Hide prototype.
15137 (common_type): Add explicit braces to avoid ambiguous `else'.
15138 (comp_target_types): Likewise.
15139 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
15140 (build_function_call_real): Add explicit braces to avoid ambiguous
15141 `else'.
15142 (convert_arguments): Initialize `called_thing' to 0.
15143 (convert_for_initialization): Initialize `savew' and `savee' to 0.
15144
15145 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
15146 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
15147 (build_x_arrow): Likewise for `last_rval'.
15148
15149 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
15150
15151 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
15152
15153 * decl.c (init_decl_processing): Use set_sizetype.
15154 * decl2.c (sizetype): Don't declare.
15155 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
15156 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
15157 (build_component_addr, unary_complex_lvalue): Likewise.
15158 * rtti.c (expand_class_desc): Likewise.
15159 * class.c (get_vfield_offset): Likewise.
15160
15161 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
15162
15163 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
15164 early to avoid bogus error. Handle overloaded function
15165 names provided as template arguments correctly.
15166 (coerce_template_parms): Don't mishandle overloaded functions when
15167 dealing with template template parameters.
15168 (lookup_template_class): Issue an error message, rather than
15169 crashing, when the TYPE_DECL provided is not a template type.
15170
15171 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
15172
15173 * class.c (instantiate_type): Don't just return a known type if
15174 it's wrong.
15175
15176 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
15177
15178 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
15179 since that code could never be reached.
15180
15181 * error.c (dump_decl): Avoid aborting in the midst of printing an
15182 error message about an illegal template declaration.
15183
15184 * parse.y (structsp): Print an error message, rather than crashing,
15185 when a class-head does not name a class.
15186
15187 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
15188 template arguments as a g++ extension.
15189
15190 * cp-tree.def (ALIGNOF_EXPR): New tree code.
15191 * decl2.c (grok_alignof): If processing_template_decl, just store
15192 the expression.
15193 * typeck.c (c_alignof): Likewise.
15194 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
15195 * error.c (dump_expr): Likewise.
15196 * pt.c (tsubst_copy): Likewise.
15197 * tree.c (cp_tree_equal): Likewise.
15198 * pt.c (uses_template_parms): Correctly determine whether or not a
15199 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
15200 folding can be done.
15201
15202 * cp-tree.h (grok_enum_decls): Remove type parameter.
15203 * decl.c (grok_enum_decls): Likewise.
15204 * decl2.c (grok_x_components): Call grok_enum_decls
15205 unconditionally, since it will do nothing if there is no
15206 current_local_enum. Use the new calling sequence.
15207 * pt.c (tsubst_enum): Use the new calling sequence for
15208 grok_enum_decls.
15209
15210 * decl.c (start_function): Make member functions of local classes
15211 in extern inline functions have comdat linkage here...
15212 (grokdeclarator): Rather than here.
15213
15214 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
15215
15216 * pt.c (convert_nontype_argument): Use decl_constant_value.
15217
15218 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
15219
15220 * call.c (add_template_candidate_real): New function.
15221 (add_template_candidate): Use it.
15222 (add_template_conv_candidate): Likewise.
15223 (joust): Pass extra argument to more_specialized.
15224 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
15225 (is_local_class): Remove.
15226 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
15227 * cp-tree.h (is_local_class): Remove.
15228 (perform_array_to_pointer_conversion): Likewise.
15229 (finish_member_template_decl): Add.
15230 (check_explicit_specialization): Return a tree, not an int.
15231 (more_specialized): Take additional argument.
15232 (get_bindings): Likewise.
15233 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
15234 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
15235 (perform_array_to_pointer_conversion): Remove.
15236 * decl.c (saved_scope): Add processing_specialization,
15237 processing_explicit_instantiation fields.
15238 (maybe_push_to_top_level): Save them.
15239 (pop_from_top_level): Restore them.
15240 (grokfndecl): Use new return value from
15241 check_explicit_specialization.
15242 (start_decl): Don't check flag_guiding_decls before pushing
15243 decls.
15244 (cp_finish_decl): Remove previous (bogus) change.
15245 (grok_declarator): Use decl_function_context rather than
15246 is_local_class.
15247 * decl2.c (finish_file): Pass extra argument to get_bindings.
15248 (build_expr_from_tree): Let build_x_component_ref check
15249 validity of arguments rather than doing it here.
15250 * lex.c (cons_up_default_function): Remove code fooling with
15251 processing_specialization, processing_explicit_instantiation
15252 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
15253 * method.c (build_overload_identifier): Mangle local classes in
15254 template functions correctly.
15255 * parse.y (finish_member_template_decl): Move to pt.c.
15256 * pt.c (finish_member_template_decl): Moved here from parse.y.
15257 (print_candidates): New function.
15258 (determine_specialization): Change interface. Properly look for
15259 most specialized versions of template candidates.
15260 (check_explicit_specialization): Fully process explicit
15261 instantiations.
15262 (push_template_decl): Avoid looking at CLASSTYPE fields in
15263 FUNCTION_DECLS.
15264 (determine_overloaded_function): Remove.
15265 (convert_nontype_argument): Change name from
15266 convert_nontype_parameter. Use determine_overloaded_function
15267 instead of instantiate_type.
15268 (mangle_class_name_for_template): Handle type contexts as well as
15269 function contexts.
15270 (classtype_mangled_name): Likewise.
15271 (lookup_template_class): Likewise.
15272 (tsubst): Likewise.
15273 (more_specialized): Take explict template arguments as a
15274 parameter.
15275 (most_specialized): Likewise.
15276 (get_bindings): Likewise. Check that return types match before
15277 proclaiming a function a match.
15278 (do_decl_instantiation): Remove code searching for function to
15279 instantiate; that is now done in check_explicit_specialization.
15280 (add_maybe_template): Pass extra argument to get_bindings.
15281 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
15282 implementation.
15283 * typeck.c (build_component_ref): Check for invalid arguments.
15284
15285 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
15286
15287 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
15288 return_target and call_target are equivalent.
15289
15290 * pt.c (type_unification_real): Just accept function parms that
15291 don't use any template parms.
15292
15293 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
15294
15295 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
15296 unset DECL_NOT_REALLY_EXTERN.
15297
15298 * parse.y (typename_sub*): Fix std::.
15299
15300 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
15301
15302 * error.c (dump_decl): Fix type default template args.
15303 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
15304
15305 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
15306
15307 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
15308 (file_name_nondirectory): Use.
15309
15310 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
15311
15312 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
15313 that are not really present. Substitute default arguments in
15314 template template arguments. Correctly convert TEMPLATE_DECL to
15315 TEMPLATE_TEMPLATE_PARM.
15316 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
15317 are no longer treated specially here.
15318 * parse.y (template_template_parm): Fix copy error.
15319 * decl.c (grokdeclarator): Warn about missing `typename' for nested
15320 type created from template template parameters.
15321 * parse.y (bad_parm): Likewise
15322
15323 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
15324 (push_nested_class): Likewise.
15325 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
15326 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
15327 (copy_template_template_parm): Declare.
15328 * decl.c (arg_looking_for_template): New variable.
15329 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
15330 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
15331 node if arg_looking_for_template is nonzero.
15332 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
15333 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
15334 (grokdeclarator): Handle TEMPLATE_DECL.
15335 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
15336 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
15337 (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
15338 (dump_decl): Handle unnamed template type parameters.
15339 Handle template template parameters.
15340 (dump_function_name): Handle template template parameters.
15341 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
15342 Handle TEMPLATE_TEMPLATE_PARM.
15343 * method.c (build_template_template_parm_names): New function.
15344 (build_template_parm_names): Handle TEMPLATE_DECL.
15345 (build_overload_nested_name, build_overload_name):
15346 Handle TEMPLATE_TEMPLATE_PARM.
15347 * parse.y (maybe_identifier): New nonterminal.
15348 (template_type_parm): Use it.
15349 (template_template_parm, template_arg1): New nonterminal.
15350 (template_parm): Add template_template_parm rules.
15351 (template_arg): Set processing_template_arg.
15352 (template_arg1): Rules moved from template_arg.
15353 (primary, nonnested_type): Set arg_looking_for_template if we are
15354 processing template arguments.
15355 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
15356 (process_template_parm): Handle template template parameters.
15357 (coerce_template_parms, comp_template_args): Likewise.
15358 (mangle_class_name_for_template, lookup_template_class): Likewise.
15359 (uses_template_parms): Handle TEMPLATE_DECL and
15360 TEMPLATE_TEMPLATE_PARM.
15361 (current_template_args): Handle TEMPLATE_DECL.
15362 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
15363 * search.c (dfs_walk, dfs_record_inheritance):
15364 Handle TEMPLATE_TEMPLATE_PARM.
15365 * tree.c (copy_template_template_parm): New function.
15366 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
15367 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
15368
15369 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
15370
15371 * decl.c (start_decl): Don't allow duplicate definitions of static
15372 data members.
15373
15374 * call.c (build_user_type_conversion_1): Handle user-defined
15375 template conversion operators correctly.
15376
15377 * decl2.c (build_expr_from_tree): Issue an error message if the
15378 object in a COMPONENT_REF is a TEMPLATE_DECL.
15379
15380 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
15381
15382 * class.c (is_local_class): New function.
15383 * cp-tree.h (is_local_class): Declare it.
15384 (last_tree): Likewise.
15385 (begin_tree): Likewise.
15386 (end_tree): Likewise.
15387 (lookup_template_class): Change prototype.
15388 * decl.c (cp_finish_decl): Check for NULL where necessary.
15389 Consider FUNCTION_DECLS to declare objects with top-level binding,
15390 when calling make_decl_rtl.
15391 (grokdeclarator): Give members of local classes internal linkage.
15392 (start_function): Remove declaration of last_tree.
15393 (finish_function): Set flag_keep_inline_functions around call to
15394 rest_of_compilation if we are processing a member function in a
15395 local class.
15396 (start_method): Call push_template_decl for member functions of
15397 local classes in template functions.
15398 * decl2.c (import_export_decl): Don't give external linkage to
15399 instantiations of templates with internal linkage.
15400 * parse.y (last_tree): Remove declaration.
15401 (template_type): Pass extra parameter to lookup_template_class.
15402 (self_template_type): Likewise.
15403 (structsp): Move call to reset_specialization into left_curly.
15404 (left_curly): Call reset_specialization, and begin_tree.
15405 * pt.c (saved_trees): New variable.
15406 (mangle_class_name_for_template): Change prototype. Use
15407 additional function context to name local classes in templates
15408 correctly.
15409 (classtype_mangled_name): Pass the context.
15410 (push_template_decl): Handle local classes and templates, and
15411 member functions for such classes.
15412 (convert_nontype_parameter): Fix handling of pointer-to-member
15413 constants.
15414 (lookup_template_class): Handle local classes in templates.
15415 (tsubst): Likewise. Don't assume that template instantiations
15416 have external linkage; pay attention to the template declaration.
15417 (mark_decl_instantiated): Likewise.
15418 (begin_tree): New function.
15419 (end_tree): Likewise.
15420
15421 * decl.c (xref_basetypes): Don't call complete_type for basetypes
15422 that involve template parameters; that can lead to infinite
15423 recursion unnecessarily.
15424
15425 * pt.c (register_specialization): Do not register specializations
15426 that aren't ready to be registered yet.
15427 (check_explicit_specialization): Handle explicit specialization of
15428 constructors and destructors.
15429 (build_template_decl): New function.
15430 (push_template_delc): Handle out-of-class specializations of
15431 member templates.
15432
15433 * pt.c (check_explicit_specialization): Set up the template
15434 information before registering the specialization.
15435 (coerce_template_parms): Fix thinko.
15436 (tsubst): Handle specializations of member templates correctly.
15437
15438 * class.c (finish_struct_methods): Remove calls to
15439 check_explicit_specialization from here.
15440 (finish_struct): And insert them here.
15441 * cp-tree.h (perform_qualification_conversions): New function.
15442 (perform_array_to_pointer_conversion): Likewise.
15443 (begin_explicit_instantiation): Likewise.
15444 (end_explicit_instantiation): Likewise.
15445 (determine_specialization): Renamed from
15446 determine_explicit_specialization.
15447 (comp_template_parms): New function.
15448 (processing_explicit_instantiation): New variable.
15449 * cvt.c (perform_qualification_conversions): New function.
15450 (perform_array_to_pointer_conversion): Likewise.
15451 * decl.c (duplicate_decls): Don't consider template functions
15452 alike unless they have the same parameters. Refine handling of
15453 instantiation/specialization mismatches.
15454 (start_decl): Don't call pushdecl for template specializations,
15455 since they don't affect overloading.
15456 (start_function): Likewise.
15457 (grokfndecl): Call check_explicit_specialization a little later.
15458 Don't call duplicate_decls for memberm template specializations.
15459 (grokdeclarator): Don't update template_count for classes that are
15460 themselves specializations. Remove use of `2' as parameter to
15461 grokfndecl since that value isn't used.
15462 * lex.c (cons_up_default_function): Save and restore
15463 processing_explicit_instantiation around calls to grokfield.
15464 * parse.y (finish_member_template_decl): New function.
15465 (component_decl_1): Use it.
15466 (fn.def2): Likewise.
15467 (template_arg_list_opt): New nonterminal.
15468 (template_type): Use it.
15469 (self_template_type): Likewise.
15470 (template_id): Likewise.
15471 (object_template_id): Likewise.
15472 (notype_template_declarator): Likwise.
15473 (begin_explicit_instantiation): Likewise.
15474 (end_explicit_instantiation): Likewise.
15475 (explicit_instantiation): Use them.
15476 * pt.c (coerce_template_parms): Add parameters.
15477 (processing_explicit_instantiation): New variable.
15478 (convert_nontype_parameter): New function.
15479 (determine_overloaded_function): Likewise.
15480 (begin_explicit_instantiation): Likewise.
15481 (end_explicit_instantiation): Likewise.
15482 (retrieve_specialization): Likewise.
15483 (register_specialization): Likewise.
15484 (processing_explicit_specialization): Removed.
15485 (determine_specialization): Handle specializations of member
15486 functions of template class instantiations.
15487 (check_explicit_specialization): Refine to conform to standard.
15488 (comp_template_parms): New function.
15489 (coerce_template_parms): Call convert_nontype_parameter.
15490 (tsubst): Refine handling of member templates. Use
15491 register_specialization.
15492 (instantiate_template): Use retrieve_specialization.
15493 (do_decl_instantiation): Likewise.
15494 (instantiate_decl): Likewise.
15495 (type_unification): Improve handling of explict template
15496 arguments.
15497 * tree.c (mapcar): Return error_mark_node, rather than aborting,
15498 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
15499 * typeck.c (build_unary_op): Call determine_specialization, rather
15500 than determine_explicit_specialization.
15501
15502 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
15503
15504 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
15505
15506 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
15507
15508 * error.c (dump_decl): For enum tags, output the tag, not its value.
15509
15510 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
15511
15512 * decl.c (init_decl_processing): Only call init_rtti_processing
15513 FLAG_RTTI is set.
15514
15515 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
15516
15517 * init.c (build_new_1): Split out from build_new.
15518 (build_new): Just return a NEW_EXPR.
15519 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
15520
15521 * decl2.c (get_temp_regvar): Tweak.
15522
15523 * cp-tree.h (TREE_CALLS_NEW): Comment out.
15524 * class.c (resolves_to_fixed_type_p): Remove use.
15525 * method.c (build_opfncall): Likewise.
15526 * call.c (build_new_op): Likewise.
15527
15528 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
15529
15530 * exception.cc (__eh_alloc, __eh_free): New fns.
15531 (__cp_push_exception, __cp_pop_exception): Use them.
15532 (__uncatch_exception): Call terminate here if no exception.
15533 * except.c (build_terminate_handler): New fn.
15534 (expand_start_catch_block): Use it.
15535 (expand_exception_blocks): Likewise.
15536 (alloc_eh_object): New fn.
15537 (expand_throw): Use it. Protect exception init with terminate.
15538 * typeck.c (build_modify_expr): Remove code that ignores trivial
15539 methods.
15540
15541 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15542
15543 * call.c (add_builtin_candidate): Add default case in enumeration
15544 switch.
15545 (build_new_op): Likewise.
15546 (convert_like): Likewise.
15547 * cvt.c (build_expr_type_conversion): Likewise.
15548 * tree.c (real_lvalue_p): Likewise.
15549 (lvalue_p): Likewise.
15550 (cp_tree_equal): Likewise.
15551 * typeck.c (comptypes): Likewise.
15552 (build_component_ref): Likewise.
15553 (build_function_call_real): Likewise.
15554 (build_binary_op_nodefault): Likewise.
15555 (build_unary_op): Likewise.
15556 (build_modify_expr): Likewise.
15557 * typeck2.c (initializer_constant_valid_p): Likewise.
15558
15559 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
15560
15561 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
15562
15563 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
15564
15565 * pt.c (coerce_template_parms): Make sure to digest_init if
15566 possible.
15567
15568 * decl.c (duplicate_decls): Make the newdecl virtual if the
15569 olddecl was, just as is done with other attributes of olddecl.
15570
15571 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
15572
15573 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
15574 address of an OFFSET_REF.
15575
15576 * cp-tree.def: Add AGGR_INIT_EXPR.
15577 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
15578 AGGR_INIT_EXPR where appropriate.
15579 * expr.c (cplus_expand_expr): Likewise. Simplify.
15580
15581 * decl2.c (finish_file): Remove call to register_exception_table.
15582
15583 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15584
15585 * pt.c (instantiate_class_template): Don't do injection when
15586 processing_template_decl is true, as pollutes current_binding_level
15587 for base classes.
15588
15589 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
15590
15591 * pt.c (maybe_fold_nontype_arg): Add prototype.
15592
15593 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
15594
15595 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
15596 * error.c (dump_expr): Likewise.
15597
15598 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
15599
15600 * typeck.c (build_function_call_real): Remove "inline called before
15601 definition" pedwarn.
15602
15603 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
15604
15605 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
15606
15607 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
15608
15609 * pt.c (type_unification_real): Change __null to type void* with
15610 a warning.
15611
15612 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
15613
15614 * call.c (implicit_conversion): Don't call
15615 build_user_type_conversion_1 with a NULL expr, since it will
15616 crash.
15617
15618 * pt.c (unify): Don't try to unify array bounds if either array is
15619 unbounded.
15620
15621 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
15622
15623 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
15624 Replace extern decls with casts.
15625
15626 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
15627 Update last_parm_cleanup_insn.
15628 (store_after_parms): Remove.
15629 * cp-tree.h: Adjust.
15630
15631 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
15632
15633 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
15634 (finish_file): Check DECL_COMDAT instead of weak|one_only.
15635 (import_export_vtable): Use make_decl_one_only instead of
15636 comdat_linkage for win32 tweak.
15637 (import_export_decl): Likewise.
15638 * pt.c (mark_decl_instantiated): Likewise.
15639
15640 * decl2.c (finish_file): Lose handling of templates in pending_statics.
15641
15642 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
15643
15644 * decl2.c (finish_file): Lose call to expand_builtin_throw.
15645 * except.c (expand_builtin_throw): Remove.
15646 * cp-tree.h: Remove ptr_ptr_type_node.
15647 * decl.c: Likewise.
15648
15649 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
15650
15651 * decl.c (ptr_ptr_type_node): Define.
15652 (init_decl_processing): Initialize it.
15653 * cp-tree.h: Declare it.
15654 * exception.cc (__cp_exception_info): Use __get_eh_info.
15655 (__cp_push_exception): Likewise.
15656 (__cp_pop_exception): Likewise.
15657
15658 From Scott Snyder <snyder@d0sgif.fnal.gov>:
15659 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
15660 saved_pc.
15661 (init_exception_processing): Removed saved_pc initialization.
15662
15663 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
15664
15665 * pt.c (instantiate_decl): Defer all templates but inline functions.
15666
15667 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
15668
15669 * init.c (expand_vec_init): Don't fold a list of parameters.
15670
15671 * decl.c (copy_args_p): Handle copy elision for types with virtual
15672 bases.
15673 * call.c (build_over_call): Likewise.
15674
15675 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
15676
15677 * pt.c (lookup_template_function): Copy the template arguments,
15678 not just the list containing them, to the permanent obstack.
15679
15680 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
15681
15682 * except.c (expand_start_catch_block): suspend_momentary for the
15683 terminate handler.
15684
15685 * error.c (dump_decl): Handle LOOKUP_EXPR.
15686
15687 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
15688
15689 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
15690 permanent obstack if we are processing a template decl.
15691 * typeck.c (build_static_cast): Likewise.
15692 (build_const_cast): Likewise.
15693 (build_reinterpret_cast): Likewise.
15694
15695 * pt.c (coerce_template_parms): Coerce some expressions, even
15696 when processing_template_decl.
15697
15698 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
15699
15700 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
15701 handling of pointer difference expressions.
15702
15703 * typeck.c (comp_target_types): Comparison of function/method types
15704 is independent of nptrs.
15705
15706 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
15707
15708 * pt.c (tsubst): Avoid creating pointer to reference and
15709 reference to reference types.
15710
15711 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
15712
15713 * parse.y (do_id): New nonterminal.
15714 (template_id): Use it.
15715
15716 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
15717
15718 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
15719 * spew.c (yylex): Don't do_identifier here.
15720 * decl2.c (build_expr_from_tree): Revert last change.
15721
15722 * decl2.c (build_expr_from_tree): Expand the name for a method call.
15723 * parse.y (object_template_id): Don't try to take the DECL_NAME.
15724
15725 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
15726
15727 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
15728 alloc_expr.
15729 * call.c (build_op_delete_call): Adjust.
15730
15731 * except.c (expand_end_catch_block): Lose rethrow region.
15732 (expand_start_catch_block): Likewise.
15733 (expand_end_catch_block): Don't expand_leftover_cleanups.
15734
15735 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15736
15737 * pt.c (tsubst): Remove tree_cons call (places redundant info into
15738 DECL_TEMPLATE_INSTANTIATION).
15739
15740 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
15741
15742 * tree.c (is_overloaded_fn): Handle getting a fn template.
15743 (really_overloaded_fn): Likewise.
15744 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
15745 * pt.c (check_explicit_specialization): Tweak.
15746 (determine_explicit_specialization): Tweak.
15747
15748 * tree.c, cp-tree.h (get_target_expr): New fn.
15749
15750 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
15751
15752 * pt.c (check_explicit_specialization): Fix misspelling in
15753 diagnostic: `preceeded'.
15754 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
15755 `conversiona'.
15756
15757 1997-12-02 Mark Mitchell <mmitchell@usa.net>
15758
15759 * pt.c (determine_explicit_specialization): Avoid an internal
15760 error for bad specializations.
15761
15762 * method.c (build_overload_value): Handle SCOPE_REF.
15763
15764 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
15765
15766 * class.c (prepare_fresh_vtable): Enable even more complex MI
15767 vtable names.
15768
15769 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
15770
15771 * exception.cc (__check_eh_spec): Optimize a bit.
15772
15773 * exception.cc (__cp_pop_exception): Lose handler arg.
15774 * except.c (do_pop_exception): Likewise.
15775 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
15776 (expand_end_catch_block): Likewise.
15777
15778 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
15779
15780 * pt.c (check_explicit_specialization): Complain about using a
15781 template-id for a non-specialization.
15782
15783 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
15784
15785 * repo.c: Prototype rindex only if needed.
15786 * xref.c: Likewise.
15787
15788 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
15789
15790 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
15791
15792 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
15793
15794 * typeck.c (build_const_cast): Handle references here instead of
15795 handing off to convert_to_reference.
15796
15797 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
15798 TerminateFunctionCall.
15799 (init_exception_processing): Likewise. Terminate et al are now
15800 the fns, not ADDR_EXPRs.
15801 (various): Lose redundant assemble_external calls.
15802 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
15803
15804 * cp-tree.h (struct lang_decl_flags): Add comdat.
15805 (DECL_COMDAT): New macro.
15806 * decl.c (duplicate_decls): Propagate it.
15807 (cp_finish_decl): Handle it.
15808 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
15809
15810 * class.c: Remove static pending_hard_virtuals.
15811 (add_virtual_function): Take pointers to pending_virtuals
15812 and pending_hard_virtuals.
15813 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
15814
15815 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
15816
15817 * decl2.c (import_export_vtable): If we support one_only but not
15818 weak symbols, mark instantiated template vtables one_only.
15819 (import_export_decl): Likewise for tinfo functions.
15820 (finish_vtable_vardecl): Also write out vtables from explicitly
15821 instantiated template classes.
15822 * pt.c (mark_class_instantiated): Revert last change.
15823
15824 * except.c (expand_throw): Call mark_used on the destructor.
15825
15826 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
15827
15828 * lex.c (lang_init): Enable flag_exceptions by default if no
15829 command line switch was specified.
15830
15831 1997-11-26 Mark Mitchell <mmitchell@usa.net>
15832
15833 * pt.c (unify): Handle `void' template parameters in
15834 specializations.
15835
15836 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
15837
15838 * rtti.c (build_dynamic_cast): Handle template case here.
15839 (build_dynamic_cast_1): Not here.
15840
15841 * typeck2.c (digest_init): Make copies where appropriate.
15842
15843 * decl2.c (delete_sanity): resolve_offset_ref.
15844
15845 * except.c: Call terminate without caching so many bits.
15846
15847 * except.c (expand_start_catch_block): Fix catching a reference
15848 to pointer.
15849
15850 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
15851
15852 * init.c (build_new): Copy size to the saveable obstack.
15853
15854 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
15855 TRY_CATCH_EXPR for now.
15856
15857 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
15858
15859 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
15860 has DECL_LANG_SPECIFIC.
15861
15862 * exception.cc (struct cp_eh_info): Add handlers field.
15863 (__cp_push_exception): Initialize it.
15864 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
15865 (__throw_bad_exception): Remove.
15866 * except.c (call_eh_info): Add handlers field.
15867 (get_eh_handlers): New fn.
15868 (push_eh_cleanup): Increment handlers.
15869
15870 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
15871
15872 * except.c (expand_start_eh_spec): Use the try/catch code.
15873 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
15874 doing everything inline.
15875 (init_exception_processing): throw_type_match now takes
15876 const void pointers.
15877 * exception.cc (__check_eh_spec): New fn.
15878 * inc/exception: Neither terminate nor unexpected return.
15879 * decl.c: Make const_ptr_type_node public.
15880 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
15881
15882 * except.c (expand_start_catch_block): We only need the rethrow
15883 region for non-sjlj exceptions.
15884 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
15885
15886 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
15887
15888 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
15889 (various.o): Likewise.
15890 * inc/new: Add placement deletes. Add throw specs for default new.
15891 * new.cc (set_new_handler): Move here from libgcc2.
15892 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
15893 (new): Move from libgcc2. Throw bad_alloc.
15894 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
15895 * decl.c (init_decl_processing): Update exception specs on new and
15896 delete.
15897
15898 * method.c (build_decl_overload_real): Don't mess with global
15899 placement delete.
15900
15901 * init.c (build_new): Check for null throw spec, not nothrow_t.
15902
15903 * decl.c (duplicate_decls): Don't complain about different exceptions
15904 from an internal declaration.
15905
15906 * call.c (build_op_delete_call): Fix check for member fns again.
15907
15908 * decl2.c (import_export_decl): Interface hackery affects
15909 virtual synthesized methods.
15910
15911 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
15912
15913 * decl.c (start_decl): Don't just complain about a mismatched
15914 scope, fix it.
15915
15916 * decl.c (make_implicit_typename): Handle case where t is not
15917 actually from context.
15918 * tree.c (get_type_decl): Lose identifier case.
15919 * spew.c (yylex): Lose useless call to identifier_typedecl_value.
15920 * parse.y (nonnested_type): Just use lookup_name.
15921 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
15922
15923 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
15924
15925 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
15926 T was built in C language context (for example, by
15927 output_func_start_profiler).
15928
15929 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
15930
15931 * decl.c (make_implicit_typename): New fn.
15932 (lookup_name_real): Use it. Use current_class_type as the context.
15933
15934 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
15935
15936 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
15937
15938 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
15939
15940 * friend.c (do_friend): Warn about non-template friends in templates.
15941
15942 * call.c (build_op_delete_call): Fix handling of inherited delete.
15943
15944 * search.c (dfs_record_inheritance): Ignore template type parms.
15945
15946 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
15947
15948 * call.c (build_new_op): Fix copy error.
15949 (build_op_new_call): New fn.
15950 (build_op_delete_call): New fn.
15951 * cp-tree.h: Declare them.
15952 * init.c (build_new): Use them. Support placement delete.
15953 (build_x_delete): Use build_op_delete_call.
15954 (build_delete): Likewise.
15955 * decl2.c (delete_sanity): Likewise.
15956 (coerce_delete_type): Don't complain about placement delete.
15957
15958 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
15959
15960 * call.c (build_new_function_call): Remove unused 'obj' parm.
15961 * cp-tree.h, typeck.c: Adjust.
15962
15963 * init.c (build_new): Make the cleanup last longer.
15964 (expand_vec_init): Call do_pending_stack_adjust.
15965
15966 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
15967
15968 * pt.c (do_type_instantiation): Fix typo.
15969 (mark_class_instantiated): If we support one_only but not weak
15970 symbols, don't mark this as known.
15971
15972 * init.c (build_new): Handle vec delete in EH cleanup.
15973
15974 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15975
15976 * call.c (build_method_call): Call complete_type before checking
15977 for destructor.
15978
15979 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
15980
15981 * decl.c (add_block_current_level): Delete.
15982 * init.c (build_vec_delete_1): Delete build_block and
15983 add_block_current_level calls.
15984
15985 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
15986
15987 * init.c (build_new): Handle freeing allocated memory when the
15988 constructor throws.
15989
15990 * call.c (build_new_method_call): Fix flags arg.
15991
15992 * pt.c (do_type_instantiation): Don't try to instantiate
15993 member templates.
15994 (mark_decl_instantiated): If we support one_only but not
15995 weak symbols, mark this one_only.
15996 * decl2.c (import_export_vtable): Don't defer handling of vtables
15997 if MULTIPLE_SYMBOL_SPACES.
15998
15999 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
16000
16001 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
16002
16003 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
16004
16005 * except.c (do_pop_exception): Return a value.
16006
16007 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
16008
16009 * call.c (build_new_method_call): Handle getting a
16010 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
16011 if we got template parms.
16012 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
16013 not just the args.
16014 * decl2.c (build_expr_from_tree): Tweak last change.
16015 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
16016 (maybe_fold_nontype_arg): Split out from tsubst_copy.
16017 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
16018
16019 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
16020
16021 * pt.c (tsubst_copy): Handle explicit template arguments in
16022 function calls.
16023 * typeck.c (build_x_function_call): Likewise.
16024 * decl2.c (build_expr_from_tree): Lookup function name if it
16025 hasn't been done.
16026
16027 * pt.c (tsubst): Instantiate template functions properly when
16028 template parameter does not appear in function arguments and return
16029 type.
16030 (comp_template_args): Handle member templates required by tsubst.
16031
16032 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
16033
16034 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
16035 previous change.
16036
16037 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
16038
16039 * pt.c (coerce_template_parms): Tweak error message.
16040
16041 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
16042 return type defaults to `int', even if there are storage-class
16043 specifiers.
16044
16045 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
16046
16047 Complete nested exception support.
16048 * except.c (do_pop_exception): Split out...
16049 (push_eh_cleanup): From here. Handle the EH region by hand.
16050 (expand_start_catch_block): Add a new level for the catch parm.
16051 Move the rethrow region outside the two cleanup regions.
16052 Protect the initializer for the catch parm with terminate.
16053 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
16054 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
16055 popping off the middle of the stack.
16056 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
16057 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
16058 (build_cplus_new): Only wrap CALL_EXPRs.
16059 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
16060 the constructor call.
16061
16062 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16063
16064 * Make-lang.in (c++.distdir): Make inc subdirectory.
16065
16066 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
16067
16068 * decl2.c (finish_file): Put back some code.
16069
16070 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
16071
16072 * decl2.c (finish_file): Remove redundant code.
16073 * method.c (emit_thunk): Don't let the backend defer generic thunks.
16074
16075 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
16076
16077 * except.c (call_eh_info): Split out...
16078 (push_eh_info): From here.
16079 (expand_builtin_throw): Use it.
16080 (expand_start_catch_block): Move region start back.
16081
16082 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
16083
16084 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
16085 (real_yylex): Record wide strings using target endianness, not host.
16086
16087 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
16088
16089 * repo.c (rindex): Add decl unconditionally.
16090 (get_base_filename, open_repo_file): Don't cast rindex.
16091 * xref.c (rindex): Add decl unconditionally.
16092 (index): Remove unused decl.
16093 (open_xref_file): Don't cast rindex.
16094
16095 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
16096
16097 * class.c (build_vbase_path): Propagate the result type properly.
16098
16099 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
16100
16101 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
16102 remaining use of saved_throw_type with a call to get_eh_type.
16103
16104 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
16105
16106 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
16107 (file_name_nondirectory): New function, doing the same as the macro.
16108 (set_typedecl_interface_info): Use it instead of the macro.
16109 (check_newline): Likewise.
16110 (handle_cp_pragma): Likewise.
16111
16112 * repo.c (get_base_filename): Cast result of rindex to char*.
16113 (open_repo_file): Likewise.
16114 * xref.c (open_xref_file): Likewise.
16115 * error.c (dump_char): Make its arg int, not char.
16116
16117 * except.c (push_eh_info): Pass the number of fields - 1 down, not
16118 the exact number of fields.
16119
16120 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
16121
16122 Support for nested exceptions.
16123 * tinfo2.cc (__is_pointer): New fn.
16124 * exception.cc (struct cp_eh_info): Define.
16125 (__cp_exception_info, __uncatch_exception): New fns.
16126 (__cp_push_exception, __cp_pop_exception): New fns.
16127 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
16128 Lose empty_fndecl.
16129 (init_exception_processing): Likewise. __eh_pc is now external.
16130 (push_eh_info): New fn.
16131 (get_eh_{info,value,type,caught}): New fns.
16132 (push_eh_cleanup): Just call __cp_pop_exception.
16133 (expand_start_catch_block): Use push_eh_info. Start the eh region
16134 sooner.
16135 (expand_end_eh_spec): Use push_eh_info.
16136 (expand_throw): Call __cp_push_exception to set up the exception info.
16137 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
16138 when we rethrow.
16139 (expand_builtin_throw): Don't refer to empty_fndecl.
16140
16141 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
16142
16143 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
16144
16145 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
16146
16147 * method.c (build_template_parm_names, build_decl_overload_real):
16148 Add static to definitions.
16149 * pt.c (add_to_template_args, note_template_header,
16150 processing_explicit_specialization, type_unification_real): Likewise.
16151 ({determine,check}_explicit_specialization): Use a single string for
16152 error messages.
16153
16154 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
16155
16156 * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
16157 (expand_end_catch_block): Likewise.
16158 (expand_end_eh_spec): Likewise.
16159
16160 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
16161
16162 * decl.c (duplicate_decls): Handle template specializations
16163 correctly.
16164 * error.c (dump_function_name): Fix printing of specializations of
16165 member functions that are not member templates.
16166 * cp-tree.h (processing_specialization): Make global.
16167 * pt.c (processing_specialization): Likewise.
16168 * lex.c (cons_up_default_function): Save and restore
16169 processing_specialization to avoid confusion.
16170
16171 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
16172
16173 * decl.c (init_decl_processing): Give null_node unknown* type.
16174 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
16175 (common_type): Likewise.
16176 * error.c (args_as_string): Recognize null_node.
16177
16178 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16179
16180 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
16181 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
16182
16183 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
16184
16185 * Make-lang.in (g++): Include prefix.o.
16186
16187 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
16188
16189 * pt.c (determine_explicit_specialization): Initialize "dummy"
16190 to keep Purify quiet.
16191
16192 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
16193
16194 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
16195 (build_overload_int): Not here.
16196
16197 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
16198
16199 * class.c (build_type_pathname): Remove.
16200 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
16201
16202 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
16203
16204 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
16205 &&label GNU extension.
16206
16207 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
16208
16209 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
16210 so as to avoid incorrect manglings.
16211 * method.c (build_decl_overload_real): Don't mangle return types
16212 for constructors.
16213
16214 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
16215
16216 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
16217 scratch_tree_cons): Define as macros for now.
16218 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
16219 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
16220 typeck2.c: Use them and the expression_obstack variants.
16221
16222 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
16223
16224 * decl.c (store_return_init): Allow classes with explicit ctors to
16225 be used with the named return values extension.
16226
16227 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
16228
16229 * pt.c (instantiate_decl): Fix previous change.
16230
16231 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
16232
16233 * pt.c (tsubst): Fix thinko.
16234 (instantiate_decl): Really use the original template.
16235
16236 * call.c (build_new_method_call): Use simple constructor_name for
16237 error messages.
16238
16239 Wed Oct 8 22:44:42 1997 Jeffrey A Law <law@cygnus.com>
16240
16241 * method.c (build_underscore_int): Don't use ANSI specific
16242 features.
16243
16244 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
16245
16246 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
16247 for our key method; it might have been inlined by -O3.
16248
16249 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
16250
16251 * decl.c (make_typename_type): Do not try to call lookup_field for
16252 non-aggregate types.
16253
16254 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
16255
16256 * typeck.c (build_reinterpret_cast): Tweak.
16257
16258 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
16259
16260 * typeck.c (build_reinterpret_cast): Converting a void pointer
16261 to function pointer with a reinterpret_cast produces a warning
16262 if -pedantic is issued.
16263
16264 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
16265
16266 * typeck.c (c_expand_return): Don't warn about returning a
16267 reference-type variable as a reference.
16268
16269 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
16270
16271 * method.c (build_static_name): Fix typo.
16272
16273 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
16274
16275 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
16276 OLDDECL before we try to do DECL_USE_TEMPLATE.
16277
16278 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
16279
16280 * decl.c (duplicate_decls): Don't warn about template instances.
16281
16282 * typeck.c (mark_addressable): Lose ancient code that unsets
16283 DECL_EXTERNAL.
16284
16285 * pt.c (do_decl_instantiation): Lose support for instantiating
16286 non-templates.
16287
16288 * call.c (build_new_function_call): Fix handling of null explicit
16289 template args.
16290 (build_new_method_call): Likewise.
16291
16292 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
16293
16294 * method.c (build_underscore_int): Fix typo.
16295
16296 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
16297
16298 * tree.c (print_lang_statistics): #if 0 call to
16299 print_inline_obstack_statistics until its definition is checked in.
16300
16301 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
16302
16303 * decl2.c (finish_file): Move dump_tree_statistics to end.
16304
16305 * pt.c (instantiate_decl): Look for the original template.
16306 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
16307 of member templates.
16308
16309 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
16310
16311 * Makefile.in (g++FAQ.*): New rules.
16312 (CONFLICTS): Update.
16313 * g++FAQ.texi: Moved from libg++.
16314
16315 * parse.y (PFUNCNAME): Only specify the type once.
16316
16317 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
16318
16319 * lex.c (real_yylex): Clean up the code to fully behave the way
16320 the c-lex.c parser does for complex and real numbers.
16321
16322 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
16323
16324 * method.c (build_decl_overload_real): Reformat.
16325
16326 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
16327
16328 * method.c (synthesize_method): If at_eof, determine our linkage.
16329
16330 1997-09-29 Paul Eggert <eggert@twinsun.com>
16331
16332 * lex.c (real_yylex): Treat `$' just like `_', except issue a
16333 diagnostic if !dollars_in_ident or if pedantic.
16334
16335 * lang-specs.h (@c++): -ansi no longer implies -$.
16336
16337 * decl2.c (lang_decode_option):
16338 -traditional and -ansi now do not mess with
16339 dollars_in_ident.
16340
16341 Mon Sep 29 19:57:51 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
16342
16343 * Makefile.in (parse.o, decl.o): Also depend on
16344 $(srcdir)/../except.h $(srcdir)/../output.h.
16345 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
16346 $(srcdir)/../except.h $(srcdir)/../output.h.
16347 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
16348 ../insn-codes.h.
16349
16350 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
16351
16352 * expr.c (cplus_expand_expr): Make it static.
16353
16354 * decl2.c, init.c, typeck.c: Include "expr.h".
16355 (expand_expr): Use proper values when calling the function.
16356
16357 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
16358
16359 * lang-options.h: New -Wold-style-cast flag.
16360 * cp-tree.h (warn_old_style_cast): New variable.
16361 * decl2.c (warn_old_style_cast): Likewise.
16362 (lang_decode_option): Support -Wold-style-cast.
16363 (reparse_absdcl_as_casts): Produce old-style-cast warning.
16364
16365 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
16366
16367 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
16368 TREE_USED, reset value based on already_used.
16369
16370 * init.c (expand_member_init): Revert change.
16371
16372 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
16373
16374 * cp-tree.h, decl.c, decl2.c, pt.c:
16375 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
16376
16377 * decl2.c (lang_decode_option): Add missing ;.
16378
16379 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
16380
16381 * friend.c (do_friend): Disable injection for all template-derived
16382 decls.
16383 * decl2.c (lang_decode_option): Handle -fguiding-decls.
16384 * parse.y (notype_template_declarator): New nonterminal.
16385 (direct_notype_declarator): Use it.
16386 (complex_direct_notype_declarator): Likewise.
16387 (object_template_id): Accept any kind of identifier after TEMPLATE.
16388 (notype_qualified_id): Don't add template declarators here.
16389
16390 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
16391
16392 * call.c (add_template_candidate): Add explicit_targs parameter.
16393 (build_scoped_method_call): Use it.
16394 (build_overload_call_real): Likewise.
16395 (build_user_type_conversion_1): Likewise.
16396 (build_new_function_call): Likewise.
16397 (build_object_call): Likewise.
16398 (build_new_op): Likewise.
16399 (build_new_method_call): Likewise.
16400 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
16401 (build_new_method_call): Likewise.
16402
16403 * class.c (finish_struct_methods): Add specialization pass to
16404 determine which methods were specializing which other methods.
16405 (instantiate_type): Handle TEMPLATE_ID_EXPR.
16406
16407 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
16408
16409 * cp-tree.h (name_mangling_version): New variable.
16410 (flag_guiding_decls): Likewise.
16411 (build_template_decl_overload): New function.
16412 (begin_specialization): Likewise.
16413 (reset_specialization): Likewise.
16414 (end_specialization): Likewise.
16415 (determine_explicit_specialization): Likewise.
16416 (check_explicit_specialization): Likewise.
16417 (lookup_template_function): Likewise.
16418 (fn_type_unification): Add explicit_targs parameter.
16419 (type_unification): Likewise.
16420
16421 * decl.c (duplicate_decls): Add smarts for explicit
16422 specializations.
16423 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
16424 specializations.
16425 (grokfndecl): Call check_explicit_specialization.
16426
16427 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
16428 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
16429 (check_classfn): Handle specializations.
16430
16431 * error.c (dump_function_name): Print specialization arguments.
16432
16433 * friend.c (do_friend): Don't call pushdecl for template
16434 instantiations.
16435
16436 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
16437
16438 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
16439 and -fno-guiding-decls.
16440
16441 * lex.c (identifier_type): Return PFUNCNAME for template function
16442 names.
16443
16444 * method.c (build_decl_overload_real): New function.
16445 (build_template_parm_names): New function.
16446 (build_overload_identifier): Use it.
16447 (build_underscore_int): New function.
16448 (build_overload_int): Use it. Add levels for template
16449 parameters.
16450 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
16451 (build_overload_nested_names): Handle template type parameters.
16452 (build_template_decl_overload): New function.
16453
16454 * parse.y (YYSTYPE): New ntype member.
16455 (nested_name_specifier): Use it.
16456 (nested_name_specifier_1): Likewise.
16457 (PFUNCNAME): New token.
16458 (template_id, object_template_id): New non-terminals.
16459 (template_parm_list): Note specializations.
16460 (template_def): Likewise.
16461 (structsp): Likewise.
16462 (fn.def2): Handle member template specializations.
16463 (component_decl_1): Likewise.
16464 (direct_notype_declarator): Handle template-ids.
16465 (component_decl_1): Likewise.
16466 (direct_notype_declarator): Handle template-ids.
16467 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
16468
16469 * pt.c (processing_specializations): New variable.
16470 (template_header_count): Likewise.
16471 (type_unification_real): New function.
16472 (processing_explicit_specialization): Likewise.
16473 (note_template_header): Likewise.
16474 (is_member_template): Handle specializations.
16475 (end_template_decl): Call reset_specialization.
16476 (push_template_decl): Handle member template specializations.
16477 (tsubst): Likewise.
16478 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
16479 (instantiate_template): Handle specializations.
16480 (instantiate_decl): Likewise.
16481 (fn_type_unification): Handle explicit_targs.
16482 (type_unification): Likewise. Allow incomplete unification
16483 without an error message, if allow_incomplete.
16484 (get_bindings): Use new calling sequence for fn_type_unification.
16485
16486 * spew.c (yylex): Handle PFUNCNAME.
16487
16488 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
16489 (really_overloaded_fn): Likewise.
16490 (get_first_fn): Handle function templates.
16491
16492 * typeck.c (build_x_function_call): Use really_overloaded_fn.
16493 Handle TEMPLATE_ID_EXPR.
16494 (build_x_unary_op): Likewise.
16495 (build_unary_op): Likewise.
16496 (mark_addressable): Templates whose address is taken are marked
16497 as used.
16498
16499 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
16500
16501 * decl.c (init_decl_processing): Declare __builtin_constant_p as
16502 accepting any kind of type, not only int.
16503
16504 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
16505
16506 * search.c (get_matching_virtual): Notice virtual bases when sorrying
16507 about covariant returns.
16508
16509 * parse.y (member_init): Also imply typename here. Remove ancient
16510 extension for initializing base members.
16511
16512 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
16513
16514 Handle multi-level typenames and implicit typename in base list.
16515 * parse.y (typename_sub{,[0-2]}): New rules.
16516 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
16517 (nonnested_type): New rule.
16518 (complete_type_name): Use it.
16519 (base_class.1): Use typename_sub and nonnested_type.
16520 (nested_name_specifier): Don't elide std:: here.
16521 * decl.c (make_typename_type): Handle getting a type for NAME.
16522 (lookup_name_real): Turn std:: into :: here.
16523
16524 Rvalue conversions were removed in London.
16525 * call.c (is_subseq): Don't consider lvalue transformations.
16526 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
16527 (joust): Re-enable ?: kludge.
16528
16529 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
16530
16531 * decl.c (start_function): Up warning of no return type to be a
16532 pedwarn.
16533
16534 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
16535
16536 * init.c (expand_member_init): Don't set TREE_USED.
16537 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
16538 set,don't clear TREE_USED wholesale.
16539
16540 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
16541
16542 * call.c (build_over_call): Do require_complete_type before
16543 build_cplus_new.
16544
16545 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
16546
16547 * search.c (lookup_field): Call complete_type in all cases.
16548
16549 * decl.c (finish_function): Just warn about flowing off the end.
16550
16551 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
16552
16553 * decl.c (grokparms): Don't bash a permanent list node if we're
16554 in a function.
16555
16556 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
16557
16558 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
16559
16560 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
16561
16562 * call.c (build_new_op): Give better error for syntactically
16563 correct, but semantically invalid, use of undeclared template.
16564
16565 * call.c (compare_qual): Handle pmfs.
16566
16567 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
16568 after the exception spec.
16569
16570 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
16571
16572 * call.c (null_ptr_cst_p): Integer type, not integral type.
16573
16574 * call.c (joust): Disable warnings until they can be moved to the
16575 right place.
16576
16577 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
16578
16579 * Makefile.in, config-lang.in: Convert to autoconf.
16580
16581 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
16582
16583 * decl.c (lookup_name_real): Add implicit 'typename' to types from
16584 base classes.
16585
16586 * pt.c (most_specialized_class): Fix typo.
16587 (tsubst): Move constant folding to TREE_VEC case.
16588
16589 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
16590
16591 * pt.c (do_poplevel): Don't warn about unused local variables
16592 while processing_template_decl since we don't always know whether
16593 or not they will need constructing/destructing.
16594
16595 * pt.c (uses_template_parms): Check the values of an enumeration
16596 type to make sure they don't depend on template parms.
16597
16598 * decl.c (make_typename_type): Don't lookup the field if the
16599 context uses template parms, even if we're not
16600 processing_template_decl at the moment.
16601
16602 * pt.c (coerce_template_parms): Avoid looking at the
16603 TYPE_LANG_DECL portion of a typename type, since there won't be
16604 one.
16605 (tsubst): Do constant folding as necessary to make sure that
16606 arguments passed to lookup_template_class really are constants.
16607
16608 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
16609
16610 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
16611 * decl2.c (finish_file): Only register exception tables if we
16612 need to.
16613
16614 * decl.c (init_decl_processing): Add __builtin_[fs]p.
16615
16616 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
16617
16618 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
16619
16620 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
16621
16622 * error.c (dump_decl): Avoid crashing when presented with a
16623 uninitialized constant, as can occur with a template parameter.
16624 (dump_expr): Make sure that there are enough levels of
16625 current_template_parms before we start diving through them.
16626
16627 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
16628
16629 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
16630 c-typeck.c.
16631
16632 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
16633
16634 * except.c (expand_throw): Call build_delete for all
16635 exception types, not just objects with destructors.
16636
16637 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
16638
16639 * decl.c (current_local_enum): Remove static.
16640 * pt.c (tsubst_enum): Save and restore value of current_local_enum
16641 in case template is expanded in enum decl.
16642 (instantiate_class_template): Use new tsubst_enum signature.
16643 (tsubst_expr): Likewise.
16644
16645 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
16646
16647 * pt.c (begin_member_template_processing): Take a function as
16648 argument, not a set of template arguments. Use the template
16649 parameters, rather than the arguments. Handle non-type parameters
16650 correctly. Push a binding level for the parameters so that multiple
16651 member templates using the same parameter names can be declared.
16652 (end_member_template_processing): Pop the binding level.
16653 (push_template_decl): Mark member templates as static when
16654 appropriate.
16655
16656 * lex.c (do_pending_inlines): Pass the function, not its template
16657 arguments, to begin_member_template_processing.
16658 (process_next_inline): Likewise.
16659 (do_pending_defargs): Likewise.
16660
16661 * error.c (dump_expr): Obtain the correct declaration for a
16662 TEMPLATE_CONST_PARM.
16663
16664 * call.c (add_template_conv_candidate): New function.
16665 (build_object_call): Handle member templates, as done in the other
16666 build_ functions.
16667
16668 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
16669
16670 * decl.c (replace_defag): Undo previous change.
16671 * lex.c (do_pending_defargs): Deal with member templates.
16672
16673 * pt.c (is_member_template): Avoid crashing when passed a
16674 non-function argument.
16675
16676 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
16677
16678 * class.c (grow_method): Remove check for redeclaration.
16679
16680 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
16681
16682 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
16683 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
16684 (PRIMARY_TEMPLATE_P): Use it.
16685 * call.c (build_overload_call_real): Use it.
16686 * class.c (instantiate_type): Likewise.
16687 * decl.c (decls_match): Likewise.
16688 * method.c (build_overload_identifier): Likewise.
16689 * pt.c (push_template_decl): Likewise.
16690 (classtype_mangled_name): Likewise.
16691 (lookup_template_class): Likewise.
16692
16693 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
16694 DECL_NTPARMS to conform to usage elsewhere.
16695 * call.c (add_template_candidate): Likewise.
16696 * class.c (instantiate_type): Likewise.
16697 * pt.c (instantiate_template): Likewise.
16698 (get_bindings): Likewise.
16699
16700 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
16701 is_member_template.
16702
16703 * pt.c (unify): Undo changes to allow multiple levels of template
16704 parameters.
16705 (type_unification): Likewise.
16706 (fn_type_unification): Likewise.
16707 (get_class_bindings): Likewise.
16708 * cp-tree.h (Likewise).
16709
16710 * decl.c (replace_defarg): Check that the type of the default
16711 parameter does not invlove a template type before complaining
16712 about the initialization.
16713
16714 * error.c (dump_expr): Deal with template constant parameters in
16715 member templates correctly.
16716
16717 * pt.c (is_member_template): Deal with class specializations
16718 correctly.
16719 (tsubst): Handle "partial instantiation" of member templates
16720 correctly.
16721
16722 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
16723
16724 * pt.c (type_unification): Change calling sequence to allow for
16725 multiple levels of template parameters.
16726 (tsubst_expr): Likewise.
16727 (tsubst): Likewise.
16728 (tsubst_copy): Likewise.
16729 (instantiate_template): Likewise.
16730 (unify): Likewise.
16731 * call.c (build_overload_call_real): Use it.
16732 (add_builtin_candidate): Use it.
16733 (build_new_method_call): Use it.
16734 * class.c (instantiate_type): Use it.
16735 * decl.c (grokdeclarator): Use it.
16736 * decl2.c (finish_file): Use it.
16737 * method.c (build_overload_identifier): Use it.
16738
16739 * call.c (add_template_candidate): Add additional parameter for
16740 the function return type. Call fn_type_unification istead of
16741 type_unification.
16742 (build_user_type_conversion_1): Handle member templates.
16743 (build_new_function_call): Likewise.
16744 (build_new_op): Likewise.
16745 (build_new_method_call): Likewise.
16746
16747 * class.c (grow_method): Don't give an error message indicating
16748 that two member templates with the same name are ambiguous.
16749 (finish_struct): Treat member template functions just like member
16750 functions.
16751
16752 * cp-tree.h (check_member_template): Add declaration.
16753 (begin_member_template_processing): Likewise.
16754 (end_member_template_processing): Likewise.
16755 (fn_type_unification): Likewise.
16756 (is_member_template): Likewise.
16757 (tsubst): Change prototype.
16758 (tsubst_expr): Likewise.
16759 (tsubst_copy): Likewise.
16760 (instantiate_template): Likewise.
16761 (get_bindings): Likewise.
16762
16763 * decl.c (decls_match): Handle multiple levels of template
16764 parameters.
16765 (pushdecl): Handle template type params just like other type
16766 declarations.
16767 (push_class_level_binding): Return immediately if the
16768 class_binding_level is NULL.
16769 (grokfndecl): If check_classfn() returns a member_template, use
16770 the result of the template, not the template itself.
16771
16772 * decl2.c (check_member_template): New function. Check to see
16773 that the entity declared to be a member template can be one.
16774 (check_classfn): Allow redeclaration of member template functions
16775 with different types; the new functions can be specializations or
16776 explicit instantiations.
16777
16778 * error.c (dump_decl): Handle multiple levels of template
16779 parameters.
16780 (dump_function_decl): Update to handle function templates.
16781
16782 * lex.c (do_pending_inlines): Set up template parameter context
16783 for member templates.
16784 (process_next_inline): Likewise.
16785
16786 * method.c (build_overload_identifier): Adjust for multiple levels
16787 of template parameters.
16788
16789 * parse.y (fn.def2): Add member templates.
16790 (component_decl_1): Likewise.
16791
16792 * pt.c (begin_member_template_processing): New function.
16793 (end_member_template_processing): Likewise.
16794 (is_member_template): Likewise.
16795 (fn_type_unification): Likewise.
16796 (current_template_parms): Return a vector of all the template
16797 parms, not just the innermost level of parms.
16798 (push_template_decl): Deal with the possibility of member
16799 templates.
16800 (lookup_template_class): Likewise.
16801 (uses_template_parms): Likewise.
16802 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
16803 TEMPLATE_CONST_PARM to deal with multiple levels of template
16804 arguments. Add processing of TEMPLATE_DECL to produce new
16805 TEMPLATE_DECLs from old ones.
16806 (do_decl_instantiation): Handle member templates.
16807
16808 * search.c (lookup_fnfields_1): Handle member template conversion
16809 operators.
16810
16811 * tree.c (cp_tree_equal): Check the levels, as well as the
16812 indices, of TEMPLATE_CONST_PARMs.
16813
16814 * typeck.c (comptypes): Check the levels, as well as the indices,
16815 fo TEMPLATE_TYPE_PARMs.
16816 (build_x_function_call): Treat member templates like member
16817 functions.
16818
16819 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
16820
16821 * typeck.c (c_expand_return): Always convert_for_initialization
16822 before checking for returning a pointer to local.
16823
16824 * pt.c (type_unification): If strict and the function parm doesn't
16825 use template parms, just compare types.
16826
16827 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
16828
16829 * method.c (build_overloaded_value): Replace direct call
16830 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
16831
16832 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
16833
16834 * typeck.c (convert_arguments): Don't arbitrarily choose the first
16835 of a set of overloaded functions.
16836
16837 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
16838
16839 * lex.c (real_yylex): Don't elide __FUNCTION__.
16840
16841 * method.c (build_overload_value): Add in_template parm.
16842 (build_overload_int): Likewise.
16843 (build_overload_identifier): Pass it.
16844
16845 * decl.c (duplicate_decls): Don't bash a previous template
16846 definition with a redeclaration.
16847
16848 * pt.c (unify): float doesn't match double.
16849
16850 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
16851 TYPE_DECL. Handle getting non-template types.
16852 * parse.y (explicit_instantiation): Use typespec instead of
16853 aggr template_type.
16854
16855 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
16856
16857 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
16858
16859 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
16860
16861 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
16862 (compare_ics): Likewise.
16863
16864 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
16865
16866 * call.c (joust): Warn about choosing one conversion op over
16867 another because of 'this' argument when the other return type is
16868 better.
16869 (source_type): New fn.
16870
16871 * call.c (build_new_op): Strip leading REF_BIND from first operand
16872 to builtin operator.
16873
16874 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
16875 use its RTL.
16876
16877 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
16878
16879 * call.c (null_ptr_cst_p): Remove support for (void*)0.
16880
16881 Wed Aug 27 02:03:34 1997 Jeffrey A Law <law@cygnus.com>
16882
16883 * typeck.c (expand_target_expr): Make definition match declaration.
16884
16885 * class.c (get_basefndecls): Make definition match declaration.
16886
16887 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
16888
16889 * input.c (sub_getch): Eventually give up and release the input file.
16890
16891 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
16892 right place.
16893
16894 * call.c (joust): Tweak message.
16895
16896 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
16897
16898 * error.c (type_as_string): Put const/volatile on template type
16899 parameters where appropriate.
16900
16901 Sat Aug 23 17:47:22 1997 Jeffrey A Law <law@cygnus.com>
16902
16903 * call.c (strictly_better): Make arguments unsigned ints.
16904
16905 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
16906
16907 * lex.c (real_yylex): Refer to __complex instead of complex.
16908
16909 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
16910
16911 * lex.c (real_yylex): Don't use getc directly.
16912
16913 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
16914
16915 * call.c (is_subseq): Don't try to be clever.
16916
16917 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
16918
16919 * parse.y, pt.c: Include "except.h".
16920 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
16921 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
16922 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
16923 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
16924 prototyping.
16925
16926 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
16927
16928 * decl2.c (mark_vtable_entries): Instead of replacing pure
16929 virtuals with a reference to __pure_virtual, copy the decl and
16930 change the RTL.
16931
16932 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
16933
16934 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
16935
16936 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
16937
16938 * pt.c (instantiate_class_template): Call repo_template_used
16939 before finish_prevtable_vardecl.
16940
16941 * call.c (is_subseq): New fn.
16942 (compare_ics): Use it.
16943
16944 * repo.c (finish_repo): Don't crash on no args.
16945
16946 * parse.y (named_complex_class_head_sans_basetype): Handle
16947 explicit global scope.
16948 * decl2.c (handle_class_head): New fn.
16949
16950 * pt.c (unify): Add CONST_DECL case.
16951
16952 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
16953
16954 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
16955
16956 * cp-tree.h (report_type_mismatch): Add prototype.
16957 * call.c (build_overload_call_real): Remove erroneous fourth
16958 argument to report_type_mismatch.
16959 (build_user_type_conversion_1): Remove erroneous second arg to
16960 tourney.
16961 (build_new_function_call): Likewise.
16962 (build_object_call): Likewise.
16963 (build_new_op): Likewise.
16964 (build_new_method_call): Likewise.
16965
16966 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
16967
16968 * error.c (dump_decl): Don't bother processing a function with no
16969 DECL_LANG_SPECIFIC.
16970
16971 * method.c (emit_thunk): Call init_function_start in the macro case.
16972
16973 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
16974
16975 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
16976 defined and used to set flag_vtable_thunks.
16977
16978 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
16979
16980 * parse.y: Don't clear the inlines from their obstack until they've
16981 all been processed.
16982
16983 * decl.c (duplicate_decls): Don't complain about exception
16984 specification mismatch if flag_exceptions is off.
16985
16986 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
16987
16988 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
16989
16990 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
16991
16992 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
16993 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
16994 Include <stdio.h> before include files that formerly used STDIO_PROTO.
16995
16996 * decl.c, g++spec.c, lex.c, method.c, repo.c:
16997 Include "config.h" first, as per autoconf manual.
16998
16999 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
17000
17001 * decl.c (duplicate_decls): Tweak wording.
17002 * lex.c (do_pending_defargs): Don't die if we see a default arg
17003 that isn't a DEFAULT_ARG.
17004 * error.c (dump_expr): Handle DEFAULT_ARG.
17005
17006 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
17007 * lang-options.h: Add -fhandle-exceptions.
17008
17009 * class.c (build_vtable): Vtables are artificial.
17010 (prepare_fresh_vtable): Likewise.
17011
17012 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
17013
17014 * cvt.c (ocp_convert): After converting to the target type, set
17015 LOOKUP_NO_CONVERSION.
17016
17017 * call.c (joust): Warn about potentially confusing promotion rules
17018 with -Wsign-promo.
17019 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
17020
17021 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
17022
17023 * exception.cc: Declare __terminate_func with noreturn attribute.
17024
17025 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
17026
17027 * parse.y: Break out eat_saved_input, handle errors.
17028 (function_try_block): Use compstmt instead of compstmt_or_error.
17029
17030 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
17031
17032 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
17033
17034 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
17035
17036 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
17037 existence of cc1plus check whether $(LANGUAGES) contains C++.
17038
17039 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
17040
17041 * method.c (do_build_copy_constructor): When copying an anonymous
17042 union member loop around to handle nested anonymous unions. Use
17043 the offset of the member relative to the outer structure, not the
17044 union.
17045
17046 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
17047
17048 * call.c (resolve_args): New fn.
17049 (build_new_function_call): Use it.
17050 (build_object_call): Likewise.
17051 (build_new_method_call): Likewise.
17052
17053 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
17054
17055 * call.c (build_over_call): tsubst all default parms from templates.
17056
17057 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
17058
17059 * decl.c (struct cp_function): Add static_labelno.
17060 (push_cp_function_context): Save it.
17061 (pop_cp_function_context): Restore it.
17062
17063 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
17064
17065 * typeck.c (build_component_ref_1): Convert from reference.
17066
17067 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17068
17069 * parse.y (current_declspecs, prefix_attributes): Initialize to
17070 NULL_TREE.
17071
17072 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
17073 before we try to force it to be a TREE_LIST.
17074 (decl): Make sure $1.t is non-nil.
17075
17076 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
17077
17078 * pt.c (uses_template_parms): Handle template first-parse codes.
17079
17080 * decl.c (cp_finish_decl): Only warn about user-defined statics.
17081
17082 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
17083
17084 * pt.c (unify): Handle BOOLEAN_TYPE.
17085
17086 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
17087 * pt.c (tsubst): Don't set it.
17088 * call.c (build_over_call): Use uses_template_parms.
17089
17090 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
17091
17092 * method.c (build_overload_nested_name): Use static_labelno
17093 instead of var_labelno.
17094 (build_qualified_name): New fn.
17095 (build_overload_name): Split out from here.
17096 (build_static_name): Use build_qualified_name.
17097 * decl.c (cp_finish_decl): Statics in extern inline functions
17098 have comdat linkage.
17099 (start_function): Initialize static_labelno.
17100
17101 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
17102
17103 * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
17104 before "all member functions in class [] are private".
17105
17106 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
17107
17108 * lex.c (do_scoped_id): convert_from_reference.
17109 * init.c (build_offset_ref): Likewise.
17110
17111 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
17112
17113 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
17114
17115 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
17116
17117 * typeck.c (get_member_function_from_ptrfunc): Promote index
17118 before saving it.
17119
17120 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
17121
17122 * tree.c (layout_basetypes): Move non-virtual destructor warning.
17123 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
17124
17125 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
17126
17127 * decl.c (grokdeclarator): Call add_defarg_fn for the function
17128 type, too.
17129 * lex.c (add_defarg_fn): Adjust.
17130 (do_pending_defargs): Adjust. Don't skip the first parm.
17131
17132 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
17133
17134 * decl.c (build_enumerator): Global enumerators are also readonly.
17135
17136 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
17137 (build_dynamic_cast): Call it and convert_from_reference.
17138
17139 * lex.c (add_defarg_fn): New fn.
17140 (snarf_defarg): Don't add to defarg_types.
17141 (do_pending_defargs): Lose defarg_types. All fns we process now
17142 have defargs.
17143 * decl.c (grokfndecl): Call add_defarg_fn.
17144
17145 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
17146 * cp-tree.def: Add DEFAULT_ARG.
17147 * spew.c (yylex): Call snarf_defarg as appropriate.
17148 * parse.y: New tokens DEFARG and DEFARG_MARKER.
17149 (defarg_again, pending_defargs, defarg, defarg1): New rules.
17150 (structsp): Use pending_defargs.
17151 (parms, full_parm): Use defarg.
17152 * lex.c (init_lex): Initialize inline_text_firstobj.
17153 (do_pending_inlines): Never pass the obstack to feed_input.
17154 (process_next_inline): Call end_input instead of restore_pending_input.
17155 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
17156 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
17157 * input.c (end_input): New fn.
17158 (sub_getch): At the end of some fed input, just keep returning EOF
17159 until someone calls end_input.
17160 Remove 'obstack' field from struct input_source.
17161 * decl.c (grokparms): Handle DEFAULT_ARG.
17162 (replace_defarg): New fn.
17163 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
17164
17165 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
17166
17167 * call.c (implicit_conversion): If nothing else works, try binding
17168 an rvalue to a reference.
17169
17170 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
17171
17172 * decl.c (init_decl_processing): Fix Jun 30 patch -- move
17173 ifndef for Cygwin32 to include SIGSEGV.
17174
17175 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
17176
17177 * class.c (finish_struct_1): Only complain about pointers without
17178 copy stuff if there are any constructors.
17179
17180 * rtti.c (build_dynamic_cast): Call complete_type on the types.
17181
17182 * decl.c (grokfndecl): If the function we chose doesn't actually
17183 match, die.
17184
17185 * decl2.c (grokclassfn): Don't specify 'const int' for the
17186 artificial destructor parm.
17187
17188 * pt.c (type_unification): If we are called recursively, nothing
17189 decays.
17190
17191 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
17192
17193 * decl.c (init_decl_processing): Stop trying to catch signals
17194 other than SIGABRT since the Cygwin32 library doesn't support
17195 them correctly yet. This fixes a situation in which g++ causes
17196 a hang on SIGSEGVs and other such signals in our Win32-hosted
17197 tools.
17198
17199 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
17200
17201 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
17202
17203 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
17204
17205 * typeck2.c (store_init_value): Always return the value if our
17206 type needs constructing.
17207
17208 * method.c (hack_identifier): Convert class statics from
17209 reference, too.
17210
17211 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
17212
17213 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
17214
17215 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
17216
17217 * typeck.c (c_expand_return): Make sure we clean up temporaries at
17218 the end of return x;
17219
17220 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17221
17222 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
17223
17224 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
17225
17226 * except.c (expand_builtin_throw): Add support
17227 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
17228
17229 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
17230
17231 * repo.c (extract_string): Null-terminate.
17232
17233 * cp-tree.h (TI_SPEC_INFO): New macro.
17234 (CLASSTYPE_TI_SPEC_INFO): New macro.
17235 * pt.c (push_template_decl): Correctly determine # of template parms
17236 for partial specs.
17237
17238 * call.c (compare_ics): Really fix 'this' conversions.
17239
17240 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
17241 non-template fn.
17242
17243 * pt.c (push_template_decl): Complain about mismatch in # of
17244 template parms between a class template and a member template.
17245
17246 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
17247
17248 * method.c (synthesize_method): You can't call
17249 function_cannot_inline_p after finish_function.
17250 * decl.c (finish_function): Turn on flag_inline_functions and turn
17251 off DECL_INLINE before handing a synthesized method to the
17252 backend.
17253
17254 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
17255
17256 * method.c (synthesize_method): Remove July 30 change to never set
17257 DECL_INLINE if at_eof.
17258
17259 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
17260
17261 * xref.c (GNU_xref_member): Ensure that the node has a
17262 decl_lang_specific part before checking DECL_FRIEND_P.
17263
17264 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
17265
17266 * pt.c (instantiate_class_template): Diagnose non-class types used
17267 as bases.
17268
17269 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
17270
17271 * typeck.c (build_conditional_expr): Use convert_for_initialization
17272 instead of convert_and_check.
17273
17274 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17275
17276 * parse.y (typespec): Don't pedwarn for typeof.
17277
17278 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
17279
17280 * repo.c (finish_repo): Only check changes if we would write a
17281 repo file.
17282
17283 * call.c (compare_ics): Fix handling of 'this' conversions.
17284
17285 * pt.c (do_decl_instantiation): Support static data too. Rename
17286 from do_function_instantiation.
17287 * cp-tree.h: Adjust.
17288 * parse.y: Adjust.
17289
17290 * repo.c (extract_string): New fn.
17291 (get_base_filename): Use it.
17292 (init_repo): Compare old args with current args.
17293
17294 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
17295
17296 * Makefile.in, Make-lang.in: Protect C-ls with a comment
17297 character, idea from Paul Eggert <eggert@twinsun.com>.
17298
17299 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
17300
17301 * typeck.c (c_expand_return): Be more persistent in looking for
17302 returned temps.
17303
17304 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
17305 pointer to reference.
17306
17307 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
17308
17309 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
17310
17311 * init.c (build_member_call, build_offset_ref):
17312 Use do_scoped_id instead of do_identifier.
17313
17314 * cvt.c (convert): Remove bogosity.
17315
17316 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17317
17318 * cvt.c (build_up_reference): Do checks of ARGTYPE and
17319 TARGET_TYPE before trying to use get_binfo.
17320
17321 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
17322
17323 * cvt.c (build_up_reference): Call get_binfo to get access control.
17324
17325 * decl2.c (import_export_decl): If we don't support weaks, leave
17326 statics undefined.
17327
17328 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
17329
17330 * except.c (expand_builtin_throw): Add support for machines that
17331 cannot access globals after throw's epilogue when
17332 -fno-sjlj-exceptions is used.
17333
17334 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
17335
17336 * parse.y: 'std::' becomes '::'.
17337 * lex.c (real_yylex): Remove 'namespace' warning.
17338 * init.c (build_member_call): Ignore 'std::'.
17339 (build_offset_ref): Likewise.
17340 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
17341 (do_toplevel_using_decl): Ignore 'using std::whatever'.
17342 * decl.c (push_namespace): Just sorry.
17343 (pop_namespace): Nop.
17344 (init_decl_processing): Declare std namespace.
17345
17346 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
17347
17348 * search.c (push_class_decls): A name which ambiguously refers to
17349 several instantiations of the same template just refers to the
17350 template.
17351
17352 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
17353
17354 * decl.c (build_enumerator): Fix problem with unsigned long
17355 enumerated values being smashed to ints, causing overflow
17356 when computing next enumerated value (for enum values around
17357 MAX_VAL).
17358
17359 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
17360
17361 * typeck.c (build_component_ref): Only call mark_used on a decl.
17362
17363 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17364
17365 * typeck.c (build_c_cast): Make the check for a ptr to function
17366 more specific before possible default_conversion call.
17367
17368 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
17369
17370 * except.c (expand_exception_blocks): Simplify and fix and make
17371 sure we don't end a region in a sequence, as expand_end_bindings
17372 doesn't like it.
17373
17374 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
17375
17376 * except.c (init_exception_processing): Mark terminate as not
17377 returning so that the optimizer can optimize better.
17378
17379 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
17380
17381 * cvt.c (convert): Don't do any extra work, if we can avoid it
17382 easily.
17383
17384 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
17385
17386 * *.[chy]: Change cp_convert to ocp_convert, change convert to
17387 cp_convert. convert is now reserved for the backend, and doesn't
17388 have the semantics a frontend person should ever want.
17389
17390 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
17391
17392 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
17393 Lose -traditional support.
17394
17395 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
17396
17397 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
17398
17399 * parse.y (self_reference): Do it for templates, too.
17400 * class.c (pushclass): Don't overload_template_name; the alias
17401 generated by build_self_reference serves the same purpose.
17402
17403 * tree.c (list_hash): Make static, take more args.
17404 (list_hash_lookup): Likewise.
17405 (list_hash_add): Make static.
17406 (list_hash_canon): Lose.
17407 (hash_tree_cons): Only build a new node if one isn't already in the
17408 hashtable.
17409 (hash_tree_chain): Use hash_tree_cons.
17410 * cp-tree.h: Adjust.
17411 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
17412 of calling lookup_name.
17413
17414 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
17415
17416 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
17417 doesn't refer to the CONST_DECLs.
17418
17419 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
17420
17421 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
17422 is bigger.
17423 (expand_class_desc): Convert the last argument to a sizetype.
17424
17425 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17426
17427 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
17428 __real__): Add reswords.
17429 * hash.h: Regenerate.
17430 * lex.h (rid): Add RID_COMPLEX.
17431 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
17432 * lex.c (init_lex): Add building of RID_COMPLEX.
17433 (real_yylex): General cleanup in line with what c-lex.c also has,
17434 sans the cruft for traditional; add handling of SPEC_IMAG, complex
17435 types, and imaginary numeric constants.
17436 * parse.y (REALPART, IMAGPART): Add tokens.
17437 (unary_expr): Add REALPART and IMAGPART rules.
17438 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
17439 * decl.c (complex_{integer,float,double,long}_type_node): Define
17440 types.
17441 (init_decl_processing): Set up the types.
17442 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
17443 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
17444 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
17445 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
17446 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
17447 COMPLEX_TYPE case.
17448 * method.c (build_overload_name): Add handling of the different
17449 COMPLEX_TYPEs, prefixing them with `J'.
17450 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
17451 as a template parm.
17452 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
17453 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
17454 (mapcar): Handle COMPLEX_CST.
17455 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
17456 (common_type): Add code for complex types.
17457 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
17458 (convert_for_assignment): Likewise.
17459 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
17460
17461 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
17462
17463 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
17464 tsubst_expr, as it might try to do overload resolution.
17465
17466 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
17467
17468 * pt.c (instantiate_class_template): Oops.
17469
17470 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
17471
17472 * cp-tree.def: Add TAG_DEFN.
17473 * pt.c (tsubst_enum): New fn.
17474 (instantiate_class_template): Use it.
17475 (tsubst_expr): Support TAG_DEFN.
17476 (tsubst): Support local enums.
17477 (tsubst_copy): Likewise.
17478 * decl.c (finish_enum): Likewise.
17479 (start_enum): If this is a local enum, switch to permanent_obstack.
17480
17481 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
17482
17483 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
17484 (finish_function): Put the base init code for constructors just
17485 after the parm cleanup insns.
17486 (struct cp_function): Add last_parm_cleanup_insn.
17487 (push_cp_function_context): Likewise.
17488 (pop_cp_function_context): Likewise.
17489
17490 Tue May 13 15:51:20 1997 Jason Merrill <jason@yorick.cygnus.com>
17491
17492 * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
17493
17494 Wed May 7 11:17:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17495
17496 * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
17497 for THUNK_FNDECL before we switch to temporary allocation.
17498
17499 Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
17500
17501 * call.c (build_new_op): Handle null arg2 for ?:.
17502
17503 Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
17504
17505 * except.c (expand_exception_blocks): Ensure that we flow through
17506 the end of the exception region for the exception specification.
17507 Move exception region for the exception specification in, so that
17508 it doesn't protect the parm cleanup. Remove some obsolete code.
17509 * decl.c (store_parm_decls): Likewise.
17510 (finish_function): Likewise.
17511
17512 Tue Apr 29 15:38:54 1997 Jason Merrill <jason@yorick.cygnus.com>
17513
17514 * init.c (build_new): Fix nothrow handling.
17515
17516 Tue Apr 29 14:29:50 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17517
17518 * init.c (emit_base_init): Don't warn about the initialization
17519 list for an artificial member.
17520
17521 Fri Apr 25 17:47:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17522
17523 * expr.c (do_case): Handle !START case for the error msg.
17524
17525 Fri Apr 25 11:55:23 1997 Jason Merrill <jason@yorick.cygnus.com>
17526
17527 * decl2.c, lang-options.h: New option -Weffc++.
17528 * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
17529 to -Weffc++.
17530
17531 * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
17532 to MULTIPLE_SYMBOL_SPACES.
17533
17534 Wed Apr 23 18:06:50 1997 Jason Merrill <jason@yorick.cygnus.com>
17535
17536 * method.c (emit_thunk, generic case): Set current_function_is_thunk.
17537
17538 * method.c (emit_thunk, macro case): Set up DECL_RESULT.
17539
17540 * typeck.c (c_expand_return): Don't complain about returning void
17541 to void in an artificial function.
17542 * method.c (make_thunk): Change settings of READONLY/VOLATILE,
17543 don't set DECL_RESULT, set DECL_ARTIFICIAL.
17544 (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
17545
17546 Wed Apr 23 14:43:06 1997 Mike Stump <mrs@cygnus.com>
17547
17548 * init.c (init_decl_processing): Add support for setjmp/longjmp based
17549 exception handling.
17550 * except.c (init_exception_processing): Likewise.
17551 (expand_end_catch_block): Likewise.
17552 (expand_exception_blocks): Likewise.
17553 (expand_throw): Likewise.
17554 * exception.cc (__default_terminate): Likewise.
17555
17556 * init.c (perform_member_init): Use new method of expr level
17557 cleanups, instead of cleanups_this_call and friends.
17558 (emit_base_init): Likewise.
17559 (expand_aggr_vbase_init_1): Likewise.
17560 (expand_vec_init): Likewise.
17561 * decl.c (cp_finish_decl): Likewise.
17562 (expand_static_init): Likewise.
17563 (store_parm_decls): Likewise.
17564 (cplus_expand_expr_stmt): Likewise.
17565 * decl2.c (finish_file): Likewise.
17566
17567 * Make-lang.in (exception.o): Ok to compile with -O now.
17568
17569 * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
17570 we know it will be done later by the backend.
17571
17572 * decl2.c (lang_f_options): Remove support for short temps.
17573 * lang-options.h: Likewise.
17574
17575 Wed Apr 23 04:12:06 1997 Jason Merrill <jason@yorick.cygnus.com>
17576
17577 * tree.c (varargs_function_p): New fn.
17578 * method.c (emit_thunk): Replace broken generic code with code to
17579 generate a heavyweight thunk function.
17580
17581 Tue Apr 22 02:45:18 1997 Jason Merrill <jason@yorick.cygnus.com>
17582
17583 * pt.c (process_template_parm): pedwarn about floating-point parms.
17584
17585 * decl.c (grokdeclarator): inline no longer implies static.
17586
17587 * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
17588
17589 Mon Apr 21 15:42:27 1997 Jason Merrill <jason@yorick.cygnus.com>
17590
17591 * class.c (check_for_override): The signature of an overriding
17592 function is not changed.
17593
17594 * call.c (build_over_call): Move setting of conv into the loop.
17595 Note: this change, along with the related changes of the 18th thru
17596 the 20th of April, fix an infinite loop problem in conversions.
17597
17598 Sun Apr 20 16:24:29 1997 Jason Merrill <jason@yorick.cygnus.com>
17599
17600 * call.c (build_user_type_conversion_1): Really ignore rvalue
17601 conversions when looking for a REFERENCE_TYPE.
17602
17603 * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
17604 * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
17605 * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
17606 (build_unary_op): Likewise.
17607 * call.c (build_over_call): See through a CONVERT_EXPR around the
17608 ADDR_EXPR for on a temporary.
17609 * typeck.c (c_expand_return): See through a CONVERT_EXPR around
17610 the ADDR_EXPR for a local variable.
17611
17612 Fri Apr 18 12:11:33 1997 Jason Merrill <jason@yorick.cygnus.com>
17613
17614 * call.c (build_user_type_conversion_1): If we're trying to
17615 convert to a REFERENCE_TYPE, only consider lvalue conversions.
17616 (build_new_function_call): Print candidates.
17617 (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
17618 (reference_binding): Binding a temporary of a reference-related type
17619 is BAD.
17620
17621 Thu Apr 17 14:37:22 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17622
17623 * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
17624 * tinfo2.cc (type_info::before): Likewise.
17625
17626 Mon Apr 14 12:38:17 1997 Jason Merrill <jason@yorick.cygnus.com>
17627
17628 * call.c (implicit_conversion): Oops.
17629
17630 Fri Apr 11 02:18:30 1997 Jason Merrill <jason@yorick.cygnus.com>
17631
17632 * call.c (implicit_conversion): Try to find a reference conversion
17633 before binding a const reference to a temporary.
17634
17635 Wed Apr 2 12:51:36 1997 Mike Stump <mrs@cygnus.com>
17636
17637 * exception.cc (__default_unexpected): Call terminate by default,
17638 so that if the user overrides terminate, the correct function will
17639 be called.
17640
17641 Wed Mar 19 14:14:45 1997 Mike Stump <mrs@cygnus.com>
17642
17643 * parse.y (left_curly): Avoid trying to use any fields of
17644 error_mark_node, as there aren't any.
17645
17646 Thu Mar 13 16:33:22 1997 Jason Merrill <jason@yorick.cygnus.com>
17647
17648 * lex.c (do_identifier): Avoid breaking on overloaded methods
17649 as default arguments.
17650
17651 Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se>
17652
17653 * call.c (add_template_candidate): Initialize the variable "dummy".
17654
17655 Mon Mar 10 15:13:14 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
17656
17657 * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
17658 before we try to use TYPE_SIZE and TREE_CONSTANT on it.
17659
17660 Fri Mar 7 13:19:36 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17661
17662 * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
17663 (debug_binfo): Delete decl, not needed.
17664
17665 * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
17666 promotes_to_aggr_type): Delete fns.
17667 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
17668 SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
17669 PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
17670
17671 * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
17672
17673 * friend.c (is_friend_type): Delete fn.
17674 * cp-tree.h (is_friend_type): Delete decl.
17675
17676 * decl.c (original_result_rtx, double_ftype_double,
17677 double_ftype_double_double, int_ftype_int, long_ftype_long,
17678 float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
17679 * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
17680
17681 * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
17682 fwd decls.
17683 * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
17684
17685 * decl.c (pushdecl_nonclass_level): #if 0, unused.
17686 * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
17687
17688 * lex.c (reinit_lang_specific): #if 0, unused.
17689 * cp-tree.h (reinit_lang_specific): #if 0 decl.
17690
17691 * decl.c (revert_static_member_fn): Make static, adding fwd decl.
17692 * cp-tree.h (revert_static_member_fn): Delete decl.
17693
17694 * class.c (root_lang_context_p): Delete fn.
17695 * cp-tree.h (root_lang_context_p): Delete decl.
17696
17697 * decl.c (set_current_level_tags_transparency): #if 0, unused.
17698 * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
17699
17700 * lex.c (set_vardecl_interface_info): Make static.
17701 * cp-tree.h (set_vardecl_interface_info): Delete decl.
17702
17703 * call.c (find_scoped_type): Make static.
17704 * cp-tree.h (find_scoped_type): Delete decl.
17705
17706 * search.c (convert_pointer_to_vbase): Make static.
17707 * cp-tree.h (convert_pointer_to_vbase): Delete decl.
17708
17709 * decl.c (const_ptr_type_node): Likewise.
17710 * cp-tree.h (const_ptr_type_node): Delete decl.
17711
17712 * typeck.c (common_base_type): Make static.
17713 * cp-tree.h (common_base_types): Delete erroneous decl.
17714
17715 * pt.c (classtype_mangled_name): Make static.
17716 * cp-tree.h (classtype_mangled_name): Delete decl.
17717
17718 * lex.c (check_newline): Make static.
17719 * cp-tree.h (check_newline): Delete decl.
17720
17721 * typeck.c (build_x_array_ref): Delete fn, same idea as
17722 grok_array_decl.
17723 * cp-tree.h (build_x_array_ref): Delete decl.
17724
17725 * lex.c (copy_decl_lang_specific): Delete fn, same idea as
17726 copy_lang_decl.
17727 * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
17728
17729 * class.c (build_vtable_entry): Make static.
17730 * cp-tree.h (build_vtable_entry): Delete decl.
17731
17732 * class.c (build_vbase_pointer): Make static.
17733 * cp-tree.h (build_vbase_pointer): Delete decl.
17734
17735 * sig.c (build_sptr_ref): Add forward decl and make static.
17736 * cp-tree.h (build_sptr_ref): Delete decl.
17737
17738 * call.c (build_new_method_call): Add forward decl and make static.
17739 * cp-tree.h (build_new_method_call): Delete decl.
17740
17741 * call.c (build_object_call): Make static.
17742 * class.c (check_for_override, complete_type_p, mark_overriders):
17743 Likewise.
17744 * decl.c (cp_function_chain): Likewise.
17745 * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
17746 Likewise.
17747 * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
17748 Likewise.
17749 * tree.c (build_cplus_array_type_1): Likewise.
17750 * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
17751 (comp_target_parms): Likewise.
17752
17753 * init.c (build_builtin_call): Make static.
17754 * cp-tree.h (build_builtin_call): Delete decl.
17755
17756 * typeck.c (binary_op_error): Delete decl.
17757 * cp-tree.h (binary_op_error): Likewise.
17758
17759 Thu Mar 6 16:13:52 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17760
17761 * call.c (build_method_call): Compare against error_mark_node
17762 directly, rather than the ERROR_MARK tree code.
17763 * cvt.c (cp_convert): Likewise.
17764 * decl.c (print_binding_level): Likewise.
17765 (duplicate_decls): Likewise.
17766 (grokdeclarator): Likewise.
17767 (grokdeclarator): Likewise.
17768 * init.c (expand_aggr_init_1): Likewise.
17769 (decl_constant_value): Likewise.
17770 * method.c (build_opfncall): Likewise.
17771 (hack_identifier): Likewise.
17772 * typeck.c (build_modify_expr): Likewise.
17773
17774 * typeck.c (build_c_cast): Don't decl TYPE as register tree.
17775
17776 Sun Mar 2 02:54:36 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
17777
17778 * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
17779
17780 * pt.c (coerce_template_parms): Add new error message.
17781
17782 * method.c (build_overload_value): Implement name mangling for
17783 floating-point template arguments.
17784
17785 * method.c (build_overload_int, icat, dicat): Fix mangling of template
17786 arguments whose absolute value doesn't fit in a signed word.
17787
17788 Mon Mar 3 12:14:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17789
17790 * friend.c: New file; put all of the friend stuff in here.
17791 * init.c: Instead of here.
17792 * Makefile.in (CXX_OBJS): Add friend.o.
17793 (friend.o): Add dependencies.
17794 * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
17795
17796 Sun Mar 2 11:04:43 1997 Jason Merrill <jason@yorick.cygnus.com>
17797
17798 * call.c (build_scoped_method_call): Complain if the scope isn't a
17799 base.
17800
17801 Wed Feb 26 11:31:06 1997 Jason Merrill <jason@yorick.cygnus.com>
17802
17803 * parse.y (left_curly): Don't crash on erroneous type.
17804
17805 * init.c (build_delete): Fix type of ref.
17806
17807 Tue Feb 25 12:41:48 1997 Jason Merrill <jason@yorick.cygnus.com>
17808
17809 * search.c (get_vbase_1): Renamed from get_vbase.
17810 (get_vbase): Wrapper, now non-static.
17811 (convert_pointer_to_vbase): Now static.
17812
17813 * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
17814 * init.c (build_delete): Pass one.
17815 (build_partial_cleanup_for): Use build_scoped_method_call.
17816 * decl.c (finish_function): Pass a binfo.
17817
17818 Mon Feb 24 15:00:12 1997 Jason Merrill <jason@yorick.cygnus.com>
17819
17820 * call.c (build_over_call): Only synthesize non-trivial copy ctors.
17821
17822 * typeck.c (build_c_cast): Lose other reference to flag.
17823
17824 * call.c (build_field_call): Don't look for [cd]tor_identifier.
17825 * decl2.c (delete_sanity): Remove meaningless use of
17826 LOOKUP_HAS_IN_CHARGE.
17827 * decl.c (finish_function): Use build_scoped_method_call instead
17828 of build_delete for running vbase dtors.
17829 * init.c (build_delete): Call overload resolution code instead of
17830 duplicating it badly.
17831
17832 Thu Feb 20 15:12:15 1997 Jason Merrill <jason@yorick.cygnus.com>
17833
17834 * call.c (build_over_call): Call mark_used before trying to elide
17835 the call.
17836
17837 * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
17838
17839 Wed Feb 19 11:18:53 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17840
17841 * typeck.c (build_modify_expr): Always pedwarn for a cast to
17842 non-reference used as an lvalue.
17843
17844 Wed Feb 19 10:35:37 1997 Jason Merrill <jason@yorick.cygnus.com>
17845
17846 * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
17847
17848 Tue Feb 18 15:40:57 1997 Jason Merrill <jason@yorick.cygnus.com>
17849
17850 * parse.y (handler): Fix template typo.
17851
17852 Sun Feb 16 02:12:28 1997 Jason Merrill <jason@yorick.cygnus.com>
17853
17854 * error.c (lang_decl_name): New fn.
17855 * tree.c (lang_printable_name): Use it.
17856
17857 Fri Feb 14 16:57:05 1997 Mike Stump <mrs@cygnus.com>
17858
17859 * g++spec.c: Include config.h so that we can catch bzero #defines
17860 from the config file.
17861
17862 Tue Feb 11 13:50:48 1997 Mike Stump <mrs@cygnus.com>
17863
17864 * new1.cc: Include a declaration for malloc, to avoid warning, and
17865 avoid lossing on systems that require one (ones that define malloc
17866 in xm.h).
17867
17868 Mon Feb 10 22:51:13 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
17869
17870 * decl2.c (max_tinst_depth): New variable.
17871 (lang_decode_option): Parse "-ftemplate-depth-NN" command line
17872 option.
17873 * pt.c (max_tinst_depth): Variable moved.
17874 * lang-options.h: Declare "-ftemplate-depth-NN" command line option
17875 as legal.
17876
17877 Fri Feb 7 15:43:34 1997 Jason Merrill <jason@yorick.cygnus.com>
17878
17879 * decl.c (xref_basetypes): Allow a base class that depends on
17880 template parms to be incomplete.
17881
17882 * decl2.c (build_expr_from_tree): Support typeid(type).
17883 * rtti.c (get_typeid): Support templates.
17884 (expand_si_desc, expand_class_desc): Fix string length.
17885 (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
17886
17887 Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
17888
17889 * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
17890
17891 * pt.c (tsubst): Put it back for -fno-ansi-overloading.
17892
17893 Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
17894
17895 * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
17896 smashes together template and non-template decls of the same
17897 signature.
17898
17899 Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
17900
17901 * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
17902
17903 Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17904
17905 * decl.c (duplicate_decls): Next route, pedwarn about different
17906 exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
17907
17908 Tue Jan 28 20:43:29 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17909
17910 * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
17911 (struct lang_type): Delete has_default_implementation member.
17912 Increase dummy to 21.
17913 * decl.c (start_method): Delete usage.
17914
17915 * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
17916 store_after_parms, start_decl_1, auto_function): Add decls.
17917 (get_arglist_len_in_bytes, declare_implicit_exception,
17918 have_exceptions_p, make_type_decl, typedecl_for_tag,
17919 store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
17920 build_component_type_expr, cplus_exception_name,
17921 {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
17922 * call.c (build_this): Make static.
17923 (is_complete): Likewise.
17924 (implicit_conversion): Likewise.
17925 (reference_binding): Likewise.
17926 (standard_conversion): Likewise.
17927 (strip_top_quals): Likewise.
17928 (non_reference): Likewise.
17929 (build_conv): Likewise.
17930 (user_harshness): Likewise.
17931 (rank_for_ideal): Likewise.
17932 * decl.c (start_decl_1): Delete forward decl.
17933 (push_decl_level): Make static.
17934 (resume_binding_level): Make static.
17935 (namespace_bindings_p): Make static.
17936 (declare_namespace_level): Make static.
17937 (lookup_name_real): Make static.
17938 (duplicate_decls): Make static. Take register off NEWDECL and
17939 OLDDECL parm decls.
17940 * decl2.c (get_sentry): Make static.
17941 (temp_name_p): Delete fn.
17942 * except.c (auto_function): Delete decl.
17943 * lex.c (handle_{cp,sysv}_pragma): Make static.
17944 (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
17945 * method.c (do_build_{copy_constructor,assign_ref}): Make static.
17946 * pt.c (tsubst_expr_values): Make static.
17947 * rtti.c (combine_strings): Delete decl.
17948
17949 Tue Jan 28 16:40:40 1997 Jason Merrill <jason@yorick.cygnus.com>
17950
17951 * pt.c (push_template_decl): Handle getting a typedef.
17952
17953 * call.c (build_new_function_call): Complain about void arg.
17954
17955 Tue Jan 28 15:25:09 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17956
17957 * decl.c (duplicate_decls): Give pedwarn of different exceptions
17958 if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
17959
17960 Mon Jan 27 19:21:29 1997 Mike Stump <mrs@cygnus.com>
17961
17962 * except.c (expand_throw): Don't expand the cleanup tree here,
17963 since we are not going to write the rtl out. Fixes problem with
17964 -g -O on SPARC.
17965
17966 Mon Jan 27 16:24:35 1997 Sean McNeil <sean@mcneil.com>
17967
17968 * Make-lang.in: Add $(exeext) as necessary.
17969
17970 Mon Jan 27 13:20:39 1997 Mike Stump <mrs@cygnus.com>
17971
17972 * parse.y (handler_seq): Must have at least one catch clause.
17973
17974 Sat Jan 25 12:00:05 1997 Jason Merrill <jason@yorick.cygnus.com>
17975
17976 * call.c (add_builtin_candidate): Restore ?: hack.
17977
17978 * decl.c (grok_op_properties): More warnings.
17979
17980 Sat Jan 25 08:50:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17981
17982 * decl.c (duplicate_decls): On second thought, do it as a pedwarn
17983 still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
17984
17985 * decl.c (duplicate_decls): Scale back to a warning, and only do
17986 'em if -pedantic.
17987
17988 Fri Jan 24 17:52:54 1997 Mike Stump <mrs@cygnus.com>
17989
17990 * decl.c (duplicate_decls): pedwarn mismatched exception
17991 specifications.
17992
17993 Thu Jan 23 18:18:54 1997 Mike Stump <mrs@cygnus.com>
17994
17995 * call.c (build_new_method_call): Don't display the invisible
17996 argument for controlling virtual bases.
17997
17998 Thu Jan 23 16:48:10 1997 Mike Stump <mrs@cygnus.com>
17999
18000 * new: Add nothrow new and delete, bad_alloc and throw specifications
18001 for delete.
18002 * decl.c (init_decl_processing): Add throw specification for delete.
18003 * new.cc (nothrow): Define.
18004 * lex.c (real_yylex): Removing warning that throw and friends are
18005 keywords.
18006 * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
18007 * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
18008 * Make-lang.in: Add new{1,2}.{cc,o}.
18009
18010 Thu Jan 23 16:39:06 1997 Jason Merrill <jason@yorick.cygnus.com>
18011
18012 * lex.c (cons_up_default_function): Fix return type of synth op=.
18013
18014 * init.c (emit_base_init): Add warnings for uninitialized members
18015 and bases.
18016
18017 * decl.c (xref_basetypes): Add warning for non-polymorphic type
18018 with destructor used as base type.
18019
18020 * decl.c (grok_op_properties): Add warning for op= returning void.
18021 * typeck.c (c_expand_return): Add warning for op= returning anything
18022 other than *this.
18023
18024 * class.c (finish_struct_1): Add warning for class with pointers
18025 but not copy ctor or copy op=.
18026
18027 * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
18028 * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
18029 (instantiate_template): If -fexternal-templates, add this
18030 instantiation to pending_templates.
18031
18032 * decl2.c (copy_assignment_arg_p): Disable old hack to support
18033 Booch components.
18034
18035 Tue Jan 21 18:32:04 1997 Mike Stump <mrs@cygnus.com>
18036
18037 * cvt.c (cp_convert): pedwarn enum to pointer conversions.
18038
18039 Mon Jan 20 17:59:51 1997 Jason Merrill <jason@yorick.cygnus.com>
18040
18041 * call.c (standard_conversion): Handle getting references. Tack
18042 on RVALUE_CONV here. Do it for non-class types, too.
18043 (reference_binding): Pass references to standard_conversion.
18044 (implicit_conversion): Likewise.
18045 (add_builtin_candidate): Disable one ?: kludge.
18046 (convert_like): Handle RVALUE_CONVs for non-class types.
18047 (joust): Disable the other ?: kludge.
18048
18049 Mon Jan 20 14:53:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
18050
18051 * decl.c (init_decl_processing): Add code to build up common
18052 function types beforehand, to avoid creation then removal of
18053 things already in the hash table.
18054
18055 Mon Jan 20 14:43:49 1997 Jason Merrill <jason@yorick.cygnus.com>
18056
18057 * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
18058 the arguments.
18059
18060 * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
18061 current_template_parms.
18062
18063 Fri Jan 17 10:25:42 1997 Jason Merrill <jason@yorick.cygnus.com>
18064
18065 * search.c (lookup_field): Don't return a function, check want_type.
18066
18067 Thu Jan 16 18:14:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
18068
18069 * init.c (build_new): Make sure PLACEMENT has a type.
18070
18071 Thu Jan 16 17:40:28 1997 Jason Merrill <jason@yorick.cygnus.com>
18072
18073 * init.c (build_new): Support new (nothrow).
18074
18075 Wed Jan 15 12:38:14 1997 Jason Merrill <jason@yorick.cygnus.com>
18076
18077 * pt.c (instantiate_decl): Also do push_to_top_level before setting
18078 up DECL_INITIAL.
18079
18080 * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
18081 * pt.c (tsubst): Defer instantiation of default args.
18082 * call.c (build_over_call): Until here.
18083
18084 Wed Jan 15 10:08:10 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
18085
18086 * search.c (lookup_field): Make sure we have an
18087 IDENTIFIER_CLASS_VALUE before we try to return it.
18088
18089 Thu Jan 9 07:19:01 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
18090
18091 * call.c (build_method_call): Delete unused var PARM.
18092 (build_overload_call_real): Likewise.
18093 (build_object_call): Delete unused var P.
18094 (build_new_op): Likewise.
18095 * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
18096 var definitions, which are never used.
18097 (shadow_tag): Delete unused var FN.
18098 * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
18099 * init.c (build_new): Delete unused var ALLOC_TEMP.
18100 * method.c (hack_identifier): Delete unused var CONTEXT.
18101 (do_build_copy_constructor): Delete unused var NAME.
18102 (synthesize_method): Delete unused var BASE.
18103 * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
18104 * rtti.c (build_headof): Delete unused var VPTR.
18105 (get_typeid): Delete unused var T.
18106 * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
18107 and ORIG_OP2.
18108 (build_ptrmemfunc): Delete unused vars U and NINDEX.
18109 * typeck2.c (build_functional_cast): Delete unused var BINFO.
18110
18111 Wed Jan 8 13:09:54 1997 Jason Merrill <jason@yorick.cygnus.com>
18112
18113 * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
18114 things in a type being defined.
18115 * decl.c (finish_enum): Reverse the values so that they are in
18116 the correct order.
18117
18118 * pt.c (instantiate_class_template): Don't initialize
18119 BINFO_BASETYPES until the vector is filled out.
18120 (unify): Don't abort on conflicting bindings, just fail.
18121 (instantiate_decl): Do push_tinst_level before any tsubsting.
18122
18123 * method.c (build_overload_value): Handle getting a
18124 TEMPLATE_CONST_PARM for a pointer.
18125
18126 Tue Jan 7 14:00:58 1997 Jason Merrill <jason@yorick.cygnus.com>
18127
18128 * init.c (expand_member_init): Don't give 'not a base' error for
18129 templates.
18130
18131 * pt.c (instantiate_decl): Call import_export_decl later.
18132
18133 * pt.c (instantiate_class_template): Return a value.
18134
18135 * parse.y (extension): New rule for __extension__.
18136 (extdef, unary_expr, decl, component_decl): Use it.
18137
18138 Tue Jan 7 09:20:28 1997 Mike Stump <mrs@cygnus.com>
18139
18140 * class.c (base_binfo): Remove unused base_has_virtual member.
18141 (finish_base_struct): Likewise.
18142 (finish_struct_1): Likewise.
18143
18144 Tue Dec 31 20:25:50 1996 Mike Stump <mrs@cygnus.com>
18145
18146 * search.c (expand_upcast_fixups): Fix bogus code generation
18147 problem where the generated code uses the wrong index into the
18148 runtime built vtable on the stack. Old code could clobber random
18149 stack values.
18150
18151 Tue Dec 31 15:16:56 1996 Mike Stump <mrs@cygnus.com>
18152
18153 * init.c (perform_member_init): Make sure the partial EH cleanups
18154 live on the function_obstack.
18155
18156 Fri Dec 27 10:31:40 1996 Paul Eggert <eggert@twinsun.com>
18157
18158 * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
18159 this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
18160
18161 Tue Dec 24 10:24:03 1996 Jeffrey A Law <law@cygnus.com>
18162
18163 * decl.c (grokvardecl): Avoid ANSI style initialization.
18164
18165 Sun Dec 22 04:22:06 1996 Jason Merrill <jason@yorick.cygnus.com>
18166
18167 * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
18168
18169 Fri Dec 20 17:09:25 1996 Jason Merrill <jason@yorick.cygnus.com>
18170
18171 * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
18172
18173 Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18174
18175 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
18176 arguments we compare against. Start the count of I at 1, not 0,
18177 since argv[0] is still the command.
18178
18179 Thu Dec 19 11:53:57 1996 Stan Shebs <shebs@andros.cygnus.com>
18180
18181 * lang-specs.h: Accept .cp as an C++ extension.
18182
18183 Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18184
18185 * cp-tree.h (ptr_reasonably_similar): Add decl.
18186
18187 Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18188
18189 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
18190 pointer. New local SPECBITS with the parm's value.
18191 (grokdeclarator): Pass &specbits down.
18192
18193 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
18194 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
18195
18196 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
18197 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
18198
18199 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
18200 not an error_mark_node.
18201
18202 Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
18203
18204 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
18205 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
18206
18207 Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
18208
18209 * decl.c (grokdeclarator): When giving an anonymous struct a name,
18210 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
18211 not affected).
18212
18213 * typeck2.c (build_m_component_ref): If component is a pointer
18214 to data member, resolve the OFFSET_REF now.
18215
18216 * call.c (convert_like): Don't go into infinite recursion.
18217
18218 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
18219
18220 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
18221 * tree.c (layout_basetypes): And on the vbase ptr.
18222
18223 Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
18224
18225 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
18226 CHAR_TYPE_SIZE so bool is always the same size as another type.
18227
18228 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
18229
18230 Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
18231
18232 * decl2.c (grok_x_components): Remove synthesized methods from
18233 TYPE_METHODS of an anonymous union, complain about member
18234 functions.
18235 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
18236 anonymous unions.
18237 (finish_function): Just clear the DECL_RTL of our arguments.
18238
18239 Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
18240
18241 * decl2.c (finish_file): Emit DWARF debugging info for static data
18242 members.
18243
18244 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
18245
18246 Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
18247
18248 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
18249 IDENTIFIER_NODE.
18250
18251 Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
18252
18253 * Make-lang.in (g++-cross$(exeext)): Fix typo.
18254
18255 Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18256
18257 Make the g++ driver now be a standalone program, rather than one
18258 that tries to run the gcc driver after munging up the options.
18259 * Make-lang.in (g++.c, g++spec.o): New rules.
18260 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
18261 added.
18262 (g++$(exeext)): New rule, based on xgcc rule.
18263 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
18264 * g++spec.c: New file.
18265 * g++.c: Removed file.
18266
18267 Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
18268
18269 * cvt.c (build_up_reference): Arrange for any temporary values
18270 that have been keep in registers until now to be put into memory.
18271
18272 Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18273
18274 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
18275 that make -j3 bootstrap works better.
18276
18277 Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
18278
18279 * decl.c (pushtag): Do pushdecl for anon tags.
18280
18281 Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
18282
18283 * typeck.c (c_expand_return): Fix logic.
18284 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
18285
18286 Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
18287
18288 * g++.c (main): Make sure arglist has a final NULL entry. Add
18289 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
18290 stdin/stdout of the invoked program are redirected to
18291 nowheresville.
18292
18293 Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
18294
18295 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
18296
18297 Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
18298
18299 * init.c (resolve_offset_ref): Handle obj.vfn better.
18300 * typeck.c (build_component_ref): Set TREE_TYPE on result from
18301 build_vfn_ref.
18302
18303 Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
18304
18305 * typeck.c (convert_for_assignment): Also handle anachronistic
18306 implicit conversions from (::*)() to cv void*.
18307 * cvt.c (cp_convert_to_pointer): Likewise.
18308
18309 Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
18310
18311 * lex.c (handle_cp_pragma): Fix bogus warning.
18312
18313 Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
18314
18315 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
18316 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
18317
18318 Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
18319
18320 * class.c (finish_struct_1): Support DWARF2_DEBUG.
18321 * search.c (dfs_debug_mark): Likewise.
18322 * decl2.c (finish_vtable_vardecl): Likewise.
18323 * decl.c (pushtag, finish_enum): Likewise.
18324 * lex.c (check_newline): Use debug_* instead of calling *out
18325 functions directly.
18326
18327 Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18328
18329 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
18330 on some picky hosts.
18331
18332 Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
18333
18334 * class.c (finish_struct_1): A class has a non-trivial copy
18335 constructor if it has virtual functions.
18336
18337 * cvt.c (cp_convert): Always call a constructor.
18338
18339 * call.c (reference_binding): Still tack on a REF_BIND
18340 for bad conversions.
18341 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
18342
18343 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
18344 (c_expand_return): Likewise.
18345 * typeck2.c (digest_init): Likewise for { }.
18346 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
18347 * cvt.c (cp_convert): Handle failure better.
18348
18349 Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18350
18351 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
18352 of GCC be path-relative.
18353
18354 Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
18355
18356 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
18357 it does need choose-temp.o and pexecute.o.
18358
18359 Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18360
18361 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
18362 that we still use it.
18363 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
18364
18365 Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
18366
18367 * init.c (expand_default_init): Avoid calling constructors to
18368 initialize reference temps.
18369
18370 * cvt.c (convert_to_reference): Fix.
18371
18372 Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
18373
18374 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
18375 (convert_to_reference): Likewise.
18376 * typeck.c (convert_for_initialization): Likewise.
18377 * init.c (expand_default_init): Likewise.
18378 (expand_aggr_init_1): Likewise.
18379 * cp-tree.h (CONV_NONCONVERTING): Lose.
18380 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
18381 * *.c: Adjust.
18382 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
18383
18384 Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
18385
18386 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
18387
18388 Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
18389
18390 * init.c (expand_aggr_init_1): Don't crash on non-constructor
18391 TARGET_EXPR.
18392
18393 Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18394
18395 * g++.c: Include gansidecl.h.
18396 (VPROTO, PVPROTO, VA_START): Delete.
18397 (choose_temp_base_try, choose_temp_base, perror_exec,
18398 run_dos) [__MSDOS__]: Delete fns.
18399 (pfatal_with_name): Delete fn.
18400 (temp_filename): Declare like in gcc.c.
18401 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
18402 (error_count, signal_count): Define.
18403 (error): Delete both definitions.
18404 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
18405 (pfatal_pexecute): Add fn from gcc.c.
18406 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
18407 code to use the pexecute stuff also used by gcc.c.
18408 (MIN_FATAL_STATUS): Define.
18409 * Make-lang.in (g++): Add dependency on and linking with
18410 choose-temp.o and pexecute.o.
18411
18412 * cp-tree.h: Include gansidecl.h.
18413 (STDIO_PROTO): Delete #undef/#define.
18414 * cvt.c (NULL): Delete #undef/#define.
18415 * expr.c (NULL): Likewise.
18416 * init.c (NULL): Likewise.
18417 * rtti.c (NULL): Likewise.
18418 * xref.c (NULL): Likewise.
18419
18420 * cp-tree.h (build_user_type_conversion): Add prototype.
18421 * call.c (build_user_type_conversion): Delete prototype. Correct
18422 decl of FLAGS arg to be an int.
18423 * cvt.c (build_user_type_conversion): Likewise.
18424
18425 Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
18426
18427 * cp-tree.def: Add TRY_BLOCK and HANDLER.
18428 * except.c (expand_start_catch_block): Support templates.
18429 * parse.y (try_block, handler_seq): Likewise.
18430 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
18431
18432 Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
18433
18434 * pt.c (current_template_args): New fn.
18435 (push_template_decl): Use it.
18436 * decl.c (grokdeclarator): Use it.
18437
18438 * decl2.c (build_expr_from_tree): Dereference ref vars.
18439
18440 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
18441 the decl-specifier-seq.
18442
18443 * decl.c (grok_op_properties): Don't force the type of a conversion
18444 op to be complete. Don't warn about converting to the same type
18445 for template instantiations.
18446
18447 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
18448 methods.
18449
18450 Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
18451
18452 * typeck.c (get_delta_difference): Remove previous bogusness.
18453 Don't give errors if force is set.
18454
18455 Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
18456
18457 * decl2.c (finish_file): Don't emit debug info.
18458 * decl.c (pushdecl): Lose obsolete code.
18459 (grokdeclarator): Still do the long long thing after complaining.
18460 * search.c (note_debug_info_needed): Don't do anything if we're in a
18461 template.
18462 * method.c (synthesize_method): For non-local classes,
18463 push_to_top_level first.
18464
18465 Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
18466
18467 * typeck.c (get_delta_difference): Add no_error parameter.
18468 (build_ptrmemfunc): Call get_delta_difference with no_error set;
18469 we don't want error messages when converting unrelated
18470 pointer-to-member functions.
18471
18472 Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
18473
18474 * error.c (dump_expr): Improve the wording on error messages that
18475 involve pointer to member functions.
18476
18477 Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
18478
18479 * cvt.c (cp_convert_to_pointer): Move code for conversions from
18480 (::*)() to void* or (*)() up a bit, so that we can convert from
18481 METHOD_TYPEs as well.
18482
18483 Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
18484
18485 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
18486 There are no 'member' types.
18487 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
18488 (build_x_typeid): Handle errors.
18489
18490 Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
18491
18492 * typeck.c (convert_for_assignment): Handle anachronistic implicit
18493 conversions from (::*)() to void* or (*)().
18494 * cvt.c (cp_convert_to_pointer): Likewise.
18495 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
18496 conversions from here.
18497 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
18498 * lang-options.h: Likewise.
18499 * decl2.c (warn_pmf2ptr): Define.
18500 * cp-tree.h: Declare it.
18501 * typeck2.c (digest_init): Allow pmfs down into
18502 convert_for_initialization.
18503
18504 Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
18505
18506 * typeck.c (c_expand_return): Fix for returning overloaded fn.
18507
18508 Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
18509
18510 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
18511 * decl.c (grok_reference_init): Pass DIRECT_BIND.
18512 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
18513 DIRECT_BIND.
18514 * call.c (convert_like): Don't pass INDIRECT_BIND.
18515 * typeck.c (convert_arguments): Likewise.
18516 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
18517
18518 Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
18519
18520 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
18521 similar code in build_up_ref.
18522 * cvt.c (build_up_reference): Drastically simplify.
18523
18524 Mon Oct 28 12:45:05 1996 Jeffrey A Law <law@cygnus.com>
18525
18526 * typeck.c (signed_or_unsigned_type): If the given type already
18527 as the correct signedness, then just return it.
18528
18529 * typeck.c ({un,}signed_type): If can't do anything, call
18530 signed_or_unsigned_type.
18531
18532 Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
18533
18534 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
18535 current_class_type is NULL.
18536
18537 Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
18538
18539 * class.c (finish_struct_1): Avoid empty structs by adding a field
18540 so layout_type gets the mode right.
18541
18542 * typeck.c (c_expand_return): Drastically simplify.
18543
18544 Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
18545
18546 * typeck.c (decay_conversion): Handle overloaded methods.
18547
18548 Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
18549
18550 * call.c (build_over_call): A TARGET_EXPR has side-effects.
18551
18552 Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
18553
18554 * cvt.c (convert_to_pointer_force): Add code to support pointer to
18555 member function to pointer to function conversions.
18556 * init.c (resolve_offset_ref): Add code to allow faked up objects,
18557 ignoring them if they are not used, and giving an error, if they
18558 are needed.
18559 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
18560 code, and so that we can give an error, if we needed an object,
18561 and one was not provided.
18562 (build_c_cast): Don't call default_conversion when we want to
18563 convert to pointer to function from a METHOD_TYPE.
18564
18565 Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
18566
18567 * Make-lang.in (cplib2.ready): Fix logic.
18568
18569 * decl.c (shadow_tag): Only complain about non-artificial function
18570 members.
18571
18572 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
18573
18574 Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
18575
18576 * expr.c (cplus_expand_expr): Pre-tweak call_target like
18577 expand_inline_function would.
18578
18579 * pt.c (mark_decl_instantiated): If extern_p, call
18580 mark_inline_for_output.
18581
18582 Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
18583
18584 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
18585 pmd conversions.
18586
18587 * typeck.c (get_delta_difference): Fix wording, as we can be used
18588 for pointer to data members.
18589
18590 Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
18591
18592 * pt.c (tsubst): If the function decl isn't a member of this
18593 template, return a copy of the decl (including copying the
18594 lang-specific part) so we don't hose ourselves later.
18595
18596 Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
18597
18598 * class.c (finish_struct): Remove DWARF-specific tag handling.
18599 * decl.c (pushtag): Likewise.
18600 (finish_function): Always clear DECL_ARGUMENTS on function decls with
18601 no saved RTX.
18602 * decl2.c (finish_file): Emit DWARF debugging info for static data
18603 members.
18604
18605 Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
18606
18607 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
18608 isn't the same as the new one before we whack it.
18609
18610 Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
18611
18612 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
18613 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
18614 warn_traditional and warn_strict_prototypes; remove ancient
18615 'overload' code; remove references to flag_traditional.
18616
18617 Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
18618
18619 * input.c (sub_getch): Handle 8-bit characters in string literals.
18620
18621 Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
18622
18623 * tree.c (mapcar): Handle CONSTRUCTORs.
18624 (copy_to_permanent): Handle expression_obstack properly.
18625
18626 * Make-lang.in (cplib2.txt): Also depend on the headers.
18627
18628 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
18629 INT_TYPE_SIZE.
18630 (expand_class_desc): Use USItype for offset field.
18631 * tinfo.h (struct __class_type_info): Likewise.
18632
18633 * method.c (build_overload_int): TYPE_PRECISION should be applied
18634 to types.
18635
18636 Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
18637
18638 * call.c (build_new_op): A COND_EXPR involving void must be a
18639 builtin.
18640
18641 Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
18642
18643 * typeck.c (build_x_component_ref): New fn.
18644 (build_object_ref): Use it.
18645 * parse.y (primary): Use it.
18646 * decl2.c (build_expr_from_tree): Use it.
18647 * cp-tree.h: Declare it.
18648
18649 * decl.c (start_decl): Variable-sized arrays cannot be initialized.
18650 * error.c (dump_type_suffix): Handle variable arrays.
18651
18652 Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18653
18654 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
18655
18656 Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
18657
18658 * decl.c (lookup_name_real): Don't try to look up anything in a
18659 TYPENAME_TYPE.
18660
18661 * tinfo2.cc (__throw_type_match_rtti): Oops.
18662
18663 Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18664
18665 * Make-lang.in (exception.o): Use -fno-PIC for now.
18666
18667 Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
18668
18669 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
18670 calling them.
18671 (get_tinfo_fn_dynamic): Extracted from build_typeid.
18672 * tinfo2.cc (__dynamic_cast): Adjust.
18673
18674 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
18675 (build_x_typeid): Likewise.
18676
18677 * parse.y: Call build_x_typeid instead of build_typeid.
18678 * cp-tree.def: Add TYPEID_EXPR.
18679 * pt.c (tsubst_copy): Handle typeid.
18680 * decl2.c (build_expr_from_tree): Likewise.
18681 * rtti.c (build_x_typeid): Throw bad_typeid from here.
18682 (build_typeid): Not here.
18683 * cp-tree.h: Declare build_x_typeid.
18684
18685 Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
18686
18687 * call.c (convert_like): Pull out constant values.
18688
18689 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
18690
18691 Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
18692
18693 * decl.c (init_decl_processing): Create short int types before
18694 creating size_t in case a machine description needs to use
18695 unsigned short for size_t.
18696
18697 Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
18698
18699 * Make-lang.in (exception.o): Turn off pic.
18700
18701 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
18702 type, multi-level ptr conversions.
18703
18704 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
18705 (throw_bad_cast): Use it.
18706 (throw_bad_typeid): New fn.
18707 (build_typeid): Throw bad_typeid as needed.
18708 Use build_call.
18709 (synthesize_tinfo_fn): Handle functions and arrays before checking
18710 for cv-quals.
18711
18712 * Remove .h from standard C++ headers, add new.h, move into inc
18713 subdirectory.
18714
18715 * exception*: Remove pointer from object, constructors. Add
18716 default exception::what that uses type_info::name. Add
18717 __throw_bad_typeid.
18718
18719 * init.c (build_new): Don't add a cookie to new (void *) T[2].
18720
18721 Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
18722
18723 * Make-lang.in: Building C++ code depends on cc1plus.
18724
18725 Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18726
18727 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
18728 a HOST_WIDE_INT, not a tree.
18729
18730 Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
18731
18732 * exception.cc: Don't include <stdlib.h>.
18733
18734 * Make-lang.in (c++.clean): Remove cplib2.*.
18735
18736 Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
18737
18738 * parse.y (component_decl_1, component_costructor_declarator case):
18739 Pass attributes/prefix_attributes in tree list.
18740
18741 Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
18742
18743 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
18744
18745 Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
18746
18747 * lex.c (do_identifier): Don't do deferred lookup in a template
18748 header.
18749
18750 * typeck2.c (store_init_value): Oops.
18751
18752 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
18753 New files for C++ lang-support library.
18754 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
18755 (CXX_LIB2FUNCS): Define.
18756 And rules for building the C++ lang-support code.
18757 * config-lang.in (headers): Define.
18758 (lib2funcs): Define.
18759
18760 Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
18761
18762 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
18763 digest_init.
18764 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
18765 * typeck2.c (store_init_value): Check for initializing pmf with { }
18766 here.
18767 (process_init_constructor): Not here.
18768
18769 Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
18770
18771 * pt.c (begin_template_parm_list): Increment
18772 processing_template_decl here.
18773 (end_template_parm_list): Not here.
18774 (process_template_parm): No need to add 1 to it now.
18775 * *.c: Use processing_template_decl instead of current_template_parms
18776 to check for being in a template.
18777
18778 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
18779 (tsubst_copy): Handle CONSTRUCTOR.
18780 (instantiate_decl): Set up context properly for variables.
18781 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
18782 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
18783
18784 Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18785
18786 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
18787
18788 Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
18789
18790 * method.c (make_thunk): Call comdat_linkage before setting the
18791 TREE_CODE.
18792
18793 * decl2.c (comdat_linkage): Use make_decl_one_only.
18794 (import_export_decl): Likewise.
18795 * decl.c (init_decl_processing): Check supports_one_only instead of
18796 SUPPORTS_WEAK.
18797
18798 Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
18799
18800 * decl2.c (grokfield): Tighten checking for access decls.
18801
18802 * decl.c (make_typename_type): Resolve references to
18803 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
18804 (lookup_name_real): Types that depend on a template parameter get
18805 an implicit 'typename' unless they're in the current scope.
18806 (start_decl_1): We don't care about incomplete types that depend
18807 on a template parm.
18808 (grokdeclarator): Resolve 'typename's in the type specifier that
18809 refer to members of the current scope.
18810
18811 * call.c (build_over_call): Remove 'inline called before
18812 definition' diagnostic.
18813 (build_method_call): Likewise.
18814 * decl.c (duplicate_decls): Downgrade 'used before declared
18815 inline' to a warning, only with -Winline.
18816
18817 Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
18818
18819 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
18820
18821 Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
18822
18823 * call.c (build_method_call): When calling a signature
18824 default implementation, as in other cases, let instance_ptr simply
18825 be instance.
18826
18827 Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
18828
18829 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
18830
18831 Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
18832
18833 * except.c (expand_start_catch_block): Add a pushlevel so that -g
18834 works on hppa and SPARC.
18835
18836 Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18837
18838 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
18839
18840 Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
18841
18842 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
18843 before testing whether it's a signature.
18844
18845 Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
18846
18847 * call.c (build_new_method_call): Don't complain about signature
18848 pointers and references not being an aggr type.
18849 (build_this): If a signature pointer or reference was passed in,
18850 just return it.
18851 (build_new_method_call): If instance is a signature pointer, set
18852 basetype to the signature type of instance.
18853 * sig.c (build_signature_method_call): Deleted basetype and
18854 instance parameters, they can be found as the DECL_CONTEXT of
18855 function and as the first argument passed in.
18856 * cp-tree.h: Changed declaration of build_signature_method_call.
18857 * call.c (build_method_call): Deleted first two arguments in call
18858 of build_signature_method_call.
18859 (build_over_call): Added call to build_signature_method_call.
18860
18861 Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
18862
18863 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
18864 target_expr.
18865
18866 Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18867
18868 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
18869
18870 Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
18871
18872 * except.c (expand_start_try_stmts): Move to except.c in the backend.
18873 (expand_end_try_stmts): Remove.
18874
18875 * init.c (perform_member_init): Use add_partial_entry () instead
18876 of directly manipulating lists.
18877 (emit_base_init): Likewise.
18878
18879 Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
18880
18881 * except.c (expand_exception_blocks): Always make sure USE and
18882 CLOBBER insns that came at the end still do, the backend relies
18883 upon this.
18884
18885 Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
18886
18887 * call.c (build_over_call): We can only use a TARGET_EXPR of the
18888 right type.
18889
18890 Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
18891
18892 * cvt.c (convert_to_reference): Revert last change, don't complain
18893 about temp without target decl.
18894
18895 Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
18896
18897 * decl.c (grokdeclarator): Don't core dump when void() is given.
18898
18899 Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
18900
18901 * decl.c (copy_args_p): Don't crash.
18902
18903 Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
18904
18905 * pt.c (tsubst): And support template args inside the exception
18906 specification.
18907
18908 * pt.c (tsubst): Add support for exception specifications in
18909 template functions.
18910
18911 Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
18912
18913 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
18914 fields now.
18915 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
18916 (start_function): Likewise.
18917 (start_method): Likewise.
18918 (grokfield): Likewise.
18919 (make_call_declarator): Add throw spec parameter.
18920 (set_quals_and_spec): Add routine.
18921 * lex.c (set_quals_and_spec): Likewise.
18922 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
18923 * decl.c (shadow_tag): Eliminate the throw spec parameter to
18924 grokdeclarator.
18925 (groktypename): Likewise.
18926 (start_decl): Eliminate the throw spec parameter. Eliminate the
18927 throw spec parameter to grokdeclarator. Eliminate the throw spec
18928 field in DECL_STMT.
18929 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
18930 (grokfndecl): Remove useless set of raises.
18931 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
18932 the throw spec parameter to start_decl. Pull the throw spec out
18933 of the call declarator.
18934 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
18935 (start_function): Eliminate the throw spec parameter. Eliminate
18936 the throw spec parameter to grokdeclarator.
18937 (start_method): Likewise.
18938 * decl2.c (grokfield): Likewise.
18939 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
18940 (grokoptypename): Likewise.
18941 (finish_file): Eliminate the throw spec parameter to
18942 start_function. Add throw spec to make_call_declarator.
18943 * except.c (init_exception_processing): Add throw spec to
18944 make_call_declarator. Eliminate the throw spec parameter to
18945 start_decl.
18946 (expand_start_catch_block): Eliminate the throw spec parameter to
18947 grokdeclarator.
18948 (expand_builtin_throw): Add throw spec to make_call_declarator.
18949 Eliminate the throw spec parameter to start_function.
18950 (start_anon_func): Likewise.
18951 * lex.c (make_call_declarator): Add throw spec parameter.
18952 (set_quals_and_spec): New routine.
18953 (cons_up_default_function): Add throw spec to make_call_declarator.
18954 Eliminate the throw spec parameter to grokfield.
18955 * method.c (synthesize_method): Eliminate the throw spec parameter
18956 to start_function.
18957 * pt.c (process_template_parm): Eliminate the throw spec parameter
18958 to grokdeclarator.
18959 (tsubst): Add throw spec to make_call_declarator.
18960 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
18961 (do_function_instantiation): Eliminate the throw spec parameter to
18962 grokdeclarator. Eliminate the throw spec parameter to
18963 start_function.
18964 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
18965 to start_function.
18966 * parse.y (datadef): Remove non-winning optimization.
18967 (decl): Likewise.
18968 (fndef): Remove ambiguous error productions uncovered by grammar
18969 fixing.
18970 (constructor_declarator): Add exception_specification_opt here.
18971 (component_constructor_declarator): Likewise.
18972 (direct_after_type_declarator): Likewise.
18973 (complex_direct_notype_declarator): Likewise.
18974 (direct_abstract_declarator): Likewise.
18975 (fn.def1): Remove exception_specification_opt.
18976 (fn.def2): Likewise.
18977 (condition): Likewise.
18978 (initdcl0): Likewise.
18979 (initdcl): Likewise.
18980 (notype_initdcl0): Likewise.
18981 (nomods_initdcl0): Likewise.
18982 (component_decl_1): Likewise.
18983 (component_declarator): Likewise.
18984 (after_type_component_declarator0): Likewise.
18985 (after_type_component_declarator): Likewise.
18986 (notype_component_declarator): Likewise.
18987
18988 Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
18989
18990 * call.c (build_over_call): Also use an INIT_EXPR when
18991 initializing anything from an rvalue.
18992
18993 * call.c (build_over_call): Call stabilize_reference when building
18994 an INIT_EXPR instead of calling the copy ctor.
18995
18996 * call.c (joust): Extend the previous change to all comparisons.
18997
18998 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
18999 NO_LINKAGE_HEURISTICS.
19000
19001 * decl2.c (finish_file): Emit any statics that weren't already.
19002
19003 * typeck.c (build_static_cast): Implement.
19004 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
19005 * decl.c (grokparms): Use can_convert_arg instead of
19006 implicit_conversion directly.
19007 (copy_args_p): New fn.
19008 * cvt.c (convert_to_reference): Don't complain about temp with
19009 static_cast.
19010 (build_up_reference): Handle TARGET_EXPRs.
19011 * call.c (build_over_call): Elide unnecessary temps.
19012 (can_convert*): Use new overloading code.
19013
19014 Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
19015
19016 * call.c: Move TYPE_PTR*_MACROS ...
19017 * cp-tree.h: To here.
19018 * typeck.c (build_reinterpret_cast): Implement.
19019
19020 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
19021 ptr_complete_ob.
19022 (joust): If we're comparing a function to a builtin and the worst
19023 conversion for the builtin is worse than the worst conversion for the
19024 function, take the function.
19025
19026 * typeck.c (build_const_cast): Implement.
19027 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
19028 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
19029
19030 Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
19031
19032 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
19033 too early. Make sure we explode if exprtype turns out to be a
19034 NULL_TREE when it shouldn't be.
19035
19036 Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
19037
19038 * cp-tree.h: New routine make_call_declarator.
19039 * lex.c (make_call_declarator): Define it.
19040 * except.c (init_exception_processing): Use it.
19041 (expand_builtin_throw): Likewise.
19042 (start_anon_func): Likewise.
19043 * decl2.c (finish_file): Likewise.
19044 * lex.c (cons_up_default_function): Likewise.
19045 * parse.y: Likewise.
19046 * pt.c (tsubst): Likewise.
19047
19048 Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
19049
19050 * decl2.c (groktypefield): Remove unused code.
19051
19052 Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
19053
19054 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
19055 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
19056 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
19057 nonempty_cv_qualifiers.
19058 * hash.h: Rebuild.
19059
19060 * lex.c (make_pointer_declarator): Change type_quals into
19061 cv_qualifiers.
19062 (make_reference_declarator): Likewise.
19063
19064 Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
19065
19066 * decl.c (start_function): Only check interface_* for templates
19067 with flag_alt_external_templates.
19068
19069 * call.c (build_new_op): Check for comparison of different enum types.
19070 (build_over_call): Fix arg # output.
19071
19072 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
19073
19074 Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
19075
19076 * call.c (build_new_op): Check for erroneous args.
19077
19078 * call.c (build_new_method_call): Add missing args to cp_error.
19079
19080 * tree.c (error_type): Don't print reference-to-array.
19081
19082 * typeck.c (convert_for_assignment): Don't say contravariance for
19083 removing const.
19084
19085 Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
19086
19087 * call.c (build_over_call): Diagnose bad convs for `this'.
19088
19089 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
19090 on _ctor_arg.
19091
19092 * call.c (convert_like): Handle bad convs.
19093 (build_over_call): Handle bad convs better.
19094
19095 * decl2.c: -fansi-overloading is now the default.
19096
19097 * call.c (build_new_method_call): Check for erroneous args.
19098
19099 * pt.c (instantiate_class_template): Propagate
19100 TYPE_USES_MULTIPLE_INHERITANCE.
19101
19102 Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
19103
19104 * call.c (enforce_access): Add static to routine.
19105
19106 Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
19107
19108 * call.c (build_user_type_conversion_1): Fix bad handling.
19109 (compare_ics): Likewise.
19110
19111 Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
19112
19113 * call.c (standard_conversion): Oops.
19114
19115 Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
19116
19117 * g++.c: Update test for win32 (&& ! cygwin32).
19118
19119 Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
19120
19121 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
19122 (ptr_reasonably_similar): New fn.
19123 * call.c (BAD_RANK): New rank.
19124 (ICS_BAD_FLAG): New macro.
19125 (standard_conversion): Handle almost-right pointer conversions.
19126 (reference_binding): Handle bad rvalue bindings.
19127 (add_*_candidate): Stuff.
19128 (build_over_call): Pass bad conversions to convert_for_initialization.
19129 (compare_ics): Handle bad convs.
19130 (joust): Likewise.
19131
19132 Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
19133
19134 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
19135 integer_type_node when computing pointer offsets.
19136
19137 Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
19138
19139 * tree.c (lvalue_type): New fn.
19140 (error_type): New fn.
19141 * call.c (op_error): Use error_type.
19142 (add_conv_candidate): Use lvalue_type.
19143 (add_builtin_candidates): Likewise.
19144 * error.c (args_as_string): Use error_type.
19145
19146 Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
19147
19148 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
19149 (tsubst): Not here.
19150
19151 * decl.c (init_decl_processing): With -ansi, __null's type is the
19152 signed integral type with the same number of bits as a pointer.
19153 Introduce a new variable null_node for it.
19154 * cp-tree.h: Adjust.
19155 * call.c (null_ptr_cst_p): Adjust.
19156
19157 Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
19158
19159 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
19160 optimize.
19161
19162 Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
19163
19164 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
19165 fns of classes without virtual functions.
19166
19167 * call.c (add_function_candidate): Handle `this' specially.
19168 (compare_ics): Likewise.
19169
19170 Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
19171
19172 * typeck.c (build_conditional_expr): Fix handling of __null.
19173
19174 * decl2.c (comdat_linkage): New fn.
19175 (import_export_vtable): Use it.
19176 (import_export_decl): Use it.
19177 * method.c (make_thunk): Use it.
19178
19179 Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
19180
19181 * pt.c (end_template_decl): If we don't actually have parms, return.
19182 * parse.y (template_header): Accept 'template <>'.
19183
19184 * errfn.c: Allow 5 args.
19185
19186 Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
19187
19188 * tree.c (make_temp_vec): New fn.
19189 * pt.c (push_template_decl): Handle partial specs.
19190 (instantiate_class_template): Likewise.
19191 (more_specialized): Use get_bindings.
19192 (more_specialized_class): New fn.
19193 (get_class_bindings): New fn.
19194 (most_specialized_class): New fn.
19195 (do_function_instantiation): List candidates for ambiguous case.
19196 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
19197 (shadow_tag): Call push_template_decl for partial specializations.
19198 * parse.y: Likewise.
19199 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
19200 DECL_TEMPLATE_MEMBERS.
19201 * call.c (print_z_candidates): Reduce duplication.
19202
19203 Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
19204
19205 * decl2.c (lang_decode_option): Allow -fansi-overloading.
19206
19207 Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
19208
19209 * pt.c (get_bindings): New fn.
19210 (most_specialized): Likewise.
19211 (do_function_instantiation): Use them.
19212 (add_maybe_template): New fn.
19213 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
19214 * call.c (build_new_op): Handle guiding decls.
19215 (build_new_function_call): Likewise.
19216 * decl2.c (finish_file): Likewise.
19217
19218 * decl2.c (mark_used): Do synthesis here.
19219 * call.c (build_method_call): Not here.
19220 (build_over_call): Or here.
19221 * typeck.c (build_function_call_real): Or here.
19222 * tree.c (bot_manip): Call mark_used on functions used in default
19223 args.
19224
19225 Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
19226
19227 * decl2.c (import_export_vtable): Delete code that disabled vtable
19228 heuristic on systems with ASM_OUTPUT_EXTERNAL.
19229
19230 Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
19231
19232 * typeck.c (build_x_function_call): Handle static call context
19233 better.
19234
19235 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
19236 the function, not its outer block.
19237
19238 * call.c (build_field_call): Pass fields on to build_opfncall
19239 regardless of TYPE_OVERLOADS_CALL_EXPR.
19240 (build_method_call): Pass on to build_new_method_call sooner.
19241
19242 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
19243 gives us.
19244 * class.c (instantiate_type): Don't put a POINTER_TYPE to
19245 METHOD_TYPE on an expression. Also make a copy of rhs instead of
19246 modifying it.
19247
19248 Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
19249
19250 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
19251 (add_builtin_candidate): Don't take enums for ++.
19252 (build_new_method_call): Handle non-aggregates and field calls.
19253 Move new overloading code from...
19254 * cvt.c: Here.
19255
19256 * decl.c (grokparms): Don't check default args in templates.
19257
19258 Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
19259
19260 * cvt.c (build_new_op): Fix args to build_unary_op.
19261 (add_builtin_candidates): Don't call type_promotes_to on float.
19262
19263 * decl.c (grokparms): Check the type of the default arg.
19264
19265 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
19266 returning NULL_TREE.
19267
19268 * typeck.c (build_x_binary_op): Avoid doing extra work.
19269 (build_x_unary_op): Likewise.
19270 (build_x_conditional_expr): Likewise.
19271 * cvt.c (build_over_call): Return.
19272 (add_builtin_candidate): Fix MEMBER_REF.
19273 (build_new_op): Likewise.
19274
19275 Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
19276
19277 * method.c (build_overload_name): Put bug fix into code but leave
19278 disabled for now so we can be bug compatible with older releases
19279 that do repeats incorrectly. In the future, we can enable it.
19280
19281 Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
19282
19283 * cvt.c (convert_like): Don't call build_cplus_new twice.
19284
19285 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
19286 Control new overloading code with -fansi-overloading.
19287
19288 Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
19289
19290 * cvt.c (build_over_call): Call build_cplus_new.
19291 * call.c (build_method_call): Likewise.
19292 * typeck.c (build_function_call_real): Likewise.
19293 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
19294 the COND_EXPR in a TARGET_EXPR so they use the same slot.
19295
19296 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
19297 recursive calls.
19298 * typeck.c (complete_type): Propagate
19299 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
19300
19301 Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
19302
19303 * cvt.c (joust): More ?: kludging. Sigh.
19304 (build_over_call): Don't try to synthesize global fns.
19305
19306 * search.c (lookup_conversions): Use binfo marking.
19307
19308 Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
19309
19310 * search.c (build_mi_matrix): Use the correct value of cid
19311 when determining the new mi_size.
19312
19313 Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
19314
19315 * cvt.c (add_builtin_candidates): Do consider type conversion ops
19316 for the first parms of += et al.
19317 (strip_top_quals): New fn.
19318 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
19319 (implicit_conversion): Likewise.
19320 (add_builtin_candidates): Be careful about arrays.
19321 (build_new_method_call): Handle vtable optimization.
19322
19323 Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
19324
19325 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
19326 * cvt.c (reference_binding): Use it.
19327 (implicit_conversion): Use it.
19328 (add_builtin_candidate, COND_EXPR): Use it.
19329
19330 * cvt.c (build_new_function_call): Check for error args.
19331
19332 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
19333
19334 * gxx.gperf: Add __null.
19335 * hash.h: Regenerate.
19336 * lex.h: Add RID_NULL.
19337 * lex.c (init_lex): Create null_pointer_node here, stick it in
19338 RID_NULL.
19339 * decl.c (init_decl_processing): Still set its type here.
19340 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
19341 (convert_to_pointer_force): Likewise.
19342 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
19343 if (! pedantic).
19344 * call.c (convert_harshness): Use null_ptr_cst_p.
19345 * typeck.c (convert_for_assignment): Likewise. Don't produce
19346 null_pointer_node.
19347
19348 * error.c (args_as_string): Handle lists of actual args, too.
19349 * cvt.c (null_ptr_cst): Support (void*)0 for now.
19350 (build_user_type_conversion_1): Improve diagnostics.
19351 (build_new_function_call): Likewise.
19352 (build_object_call): Likewise.
19353 (build_new_method_call): Likewise. Move call before def diagnostic...
19354 (build_over_call): Here.
19355
19356 * cvt.c (build_new_method_call): Don't complain about no match if
19357 LOOKUP_SPECULATIVELY.
19358 (build_over_call): Fix 'this' for virtual fn.
19359 (build_new_method_call): Add diagnostic.
19360
19361 Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
19362
19363 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
19364 constructors to be passed in.
19365 (build_over_call): Likewise.
19366 (build_user_type_conversion_1): Pass them in.
19367 (convert_like): Likewise.
19368 (build_object_call): Handle overloaded conversions.
19369 (build_over_call): Pass the right args to build_vfn_ref.
19370 (standard_conversion): Fix pmf convs.
19371 (joust): Handle comparing statics and non-statics.
19372 (build_new_method_call): New fn.
19373 * call.c (build_method_call): Call it if NEW_OVER.
19374
19375 Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
19376
19377 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
19378 %D instead.
19379
19380 Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
19381
19382 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
19383 instead of just maybe_build_cleanup so that we deallocate the
19384 thrown object.
19385
19386 Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19387
19388 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
19389 * cp-tree.h (finish_prevtable_vardecl): Add decl.
19390
19391 Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
19392
19393 * pt.c (instantiate_class_template): Call complete_type. Also, if
19394 we're at the end of the file and we just instantiated a template
19395 class with a vtable, call finish_prevtable_vardecl.
19396
19397 * error.c (dump_decl): Don't explode (or explode more gracefully
19398 as appropriate) if the object being dumped has a null type.
19399 (dump_expr): Likewise.
19400
19401 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
19402 by counting the number of nodes that we'll need before allocating
19403 the array.
19404 (lookup_fnfields): Fix comment.
19405 (breadth_first_search): Fix comment.
19406
19407 Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
19408
19409 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
19410 TYPE_ALIGN.
19411 * class.c (finish_struct): Call cplus_decl_attributes here.
19412 (finish_struct_1): Not here.
19413 * cp-tree.h: Adjust.
19414
19415 * pt.c (type_unification): New parameter STRICT.
19416 (unify): If STRICT, don't allow cv addition or base deduction.
19417 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
19418
19419 Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
19420
19421 * search.c (get_template_base{_recursive}): New fns.
19422 * pt.c (more_specialized): New fn.
19423 (do_function_instantiation): Use it.
19424 (unify): Handle base deduction.
19425 * cvt.c (joust): Use more_specialized.
19426 Don't arbitrarily choose between non-builtin candidates.
19427 (build_over_call): Call require_complete_type.
19428
19429 * decl.c (start_function): Statics are static even in a #pragma
19430 interface file.
19431
19432 * decl2.c (import_export_vtable): Disable vtable heuristic on
19433 systems with ASM_OUTPUT_EXTERNAL.
19434
19435 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
19436 (standard_conversion): No std conv to enum type.
19437
19438 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
19439 for ptm's.
19440
19441 * cvt.c (reference_binding): Bind directly to a base subobject of
19442 a class rvalue.
19443
19444 * cvt.c (build_new_op): Enforce access control.
19445
19446 Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
19447
19448 * typeck2.c (process_init_constructor): When scanning the
19449 union for a named field, skip things that aren't FIELD_DECLs.
19450
19451 * method.c (synthesize_method): Don't scan fndecl's rtl if
19452 we're at the end of the file; just assume the function can't
19453 be inlined.
19454
19455 Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
19456
19457 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
19458 it failed.
19459
19460 * cvt.c (build_user_type_conversion_1): Handle overloaded
19461 conversion ops.
19462
19463 * cvt.c (add_builtin_candidates): Don't consider type conversion
19464 operators for the first parameter of operator=.
19465
19466 Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
19467
19468 * typeck.c (complete_type): Only call layout_type if we're not
19469 expanding a template.
19470
19471 Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
19472
19473 * cvt.c (compare_ics): Oops.
19474
19475 * cvt.c (op_error): Oops.
19476
19477 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
19478 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
19479 (build_conv): Use them.
19480 (implicit_conversion): Use them.
19481 (convert_like): Handle them.
19482 (build_new_op): Handle builtin COND_EXPR again.
19483 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
19484 in lists of types for COND_EXPR.
19485 (add_builtin_candidate): Add enum candidates for COND_EXPR.
19486
19487 Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
19488
19489 * typeck.c (build_modify_expr): Always attempt to build a call to
19490 the assignment operator, even if we're using a default one.
19491 (convert_for_initialization): Call complete_type.
19492
19493 Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
19494
19495 * cvt.c (reference_binding): A REF_BIND gets the reference type.
19496 (implicit_conversion): Likewise.
19497 (convert_like): Likewise.
19498 (compare_ics): Likewise.
19499 (compare_qual): Likewise.
19500 (print_z_candidates): Handle no candidates.
19501 (build_new_op): Don't handle builtin COND_EXPR for now.
19502
19503 Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
19504
19505 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
19506
19507 Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
19508
19509 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
19510
19511 * cvt.c (build_builtin_candidate): Oops.
19512 (build_new_op): Oops.
19513
19514 * method.c (build_opfncall): Pass COND_EXPR on.
19515 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
19516 (add_builtin_candidate{,s}): Likewise.
19517 (add_builtin_candidates): Likewise.
19518 (print_z_candidates, op_error, build_new_op): Likewise.
19519 (type_decays_to): New fn.
19520 * lex.c (init_lex): Just say ?: for COND_EXPR.
19521
19522 Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
19523
19524 * typeck.c (complete_type): Call layout_type rather than building
19525 a new array type.
19526
19527 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
19528 only use ptrdiff_t.
19529
19530 Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
19531
19532 * cvt.c: Always compile the new overloading code (but don't use it).
19533 (implicit_conversion): Add a BASE_CONV when converting to
19534 the same class type.
19535 (convert_like): Handle BASE_CONV.
19536
19537 Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
19538
19539 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
19540 (add_builtin_candidate): Likewise.
19541
19542 NEW_OVER changes:
19543 * typeck.c (build_x_function_call): Try an operator function
19544 whenever we call an object of class type.
19545 * method.c (build_opfncall): Pass CALL_EXPRs through.
19546 * cvt.c (implicit_conversion): Do const-ref case first.
19547 (add_conv_candidate, build_object_call, op_error): New fns.
19548 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
19549 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
19550 builtin candidates.
19551 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
19552 Fall back on preincrement handling. Use op_error.
19553 Handle warn_synth.
19554 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
19555 an error_mark_node.
19556 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
19557 properly.
19558
19559 Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
19560
19561 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
19562
19563 Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
19564
19565 * typeck.c (build_component_ref_1): Use build_component_ref
19566 instead of open coding it here.
19567
19568 Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
19569
19570 * g++.c (main): Don't link with -lg++.
19571
19572 NEW_OVER changes:
19573 * cvt.c (convert_to_reference): Don't use convert_from_reference on
19574 result of build_type_conversion.
19575 (cp_convert): Only call build_method_call for ctors if
19576 build_type_conversion failed.
19577 (ptr_complete_ob): New function.
19578 (TYPE_PTR{,OB,MEM}_P): New macros.
19579 ({add,build}_builtin_candidate{,s}): New functions.
19580 (print_z_candidates): Handle builtins.
19581 (build_user_type_conversion_1): Don't use conversion fns for
19582 converting to a base type.
19583 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
19584 (build_user_type_conversion): Use convert_from_reference.
19585 (build_new_op): New function.
19586 (build_over_call): Fix handling of methods.
19587 (compare_ics): Handle AMBIG_CONV properly.
19588 * typeck2.c: Increment abort count.
19589 * method.c (build_opfncall): Forward most requests to build_new_op.
19590 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
19591
19592 Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19593
19594 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
19595 invalid second argument to dump_expr_list.
19596
19597 Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
19598
19599 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
19600
19601 Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
19602
19603 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
19604 ASSEMBLE_EXTERNAL.
19605
19606 Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
19607
19608 * typeck2.c (process_init_constructor): New pedwarn for using { }
19609 to initialize a pointer to member function.
19610 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
19611 we can avoid the new error.
19612
19613 Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
19614
19615 * typeck.c (build_ptrmemfunc1): New function to hide details of
19616 pointer to member functions better.
19617
19618 Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
19619
19620 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
19621 methods into the actual method, as we know the implied object is
19622 not used.
19623
19624 Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19625
19626 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
19627 inside a system header.
19628
19629 Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
19630
19631 * call.c (build_method_call): Call complete_type on the
19632 instance type.
19633
19634 Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
19635
19636 * typeck.c (build_component_ref): Always build up an OFFSET_REF
19637 for obj_ptr->func so that we can know which object to use in a
19638 method call.
19639
19640 Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
19641
19642 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
19643 around things. Also improve maintainability.
19644
19645 Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
19646
19647 * decl.c (grokdeclarator): Check for overflow when evaluating an
19648 array dimension.
19649
19650 Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
19651
19652 * cvt.c (cp_convert): Don't check for ambiguity with constructor
19653 if NEW_OVER.
19654
19655 * typeck.c (build_x_function_call): Pass function overload
19656 questions to new overloading code if NEW_OVER.
19657 * init.c (expand_aggr_init_1): Only check for type conversion ops
19658 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
19659 Don't check for ambiguity with constructor if NEW_OVER.
19660 * cvt.c (convert_to_reference): Dereference the result of a type
19661 conversion operator.
19662 (build_conv): Propagate ICS_USER_FLAG.
19663 (implicit_conversion): Call instantiate_type.
19664 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
19665 (add_function_candidate): Fix cv-quals on argtype.
19666 (print_z_candidates): New function.
19667 (build_new_function_call): Call it.
19668 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
19669 consider non-converting constructors.
19670 Call print_z_candidates.
19671 Return an AMBIG_CONV for an ambiguous conversion.
19672 (build_user_type_conversion): Handle AMBIG_CONV.
19673 (convert_like): Fix test for building TARGET_EXPR.
19674 Call instantiate_type.
19675 Handle AMBIG_CONV and LVALUE_CONV.
19676 (build_over_call): Handle 0 args and ellipsis.
19677 * cp-tree.def: Add AMBIG_CONV.
19678
19679 Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
19680
19681 * decl.c (lookup_name_real): If we find mem in obj when parsing
19682 `obj->mem', make sure we return the right value.
19683
19684 Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
19685
19686 * search.c (get_base_distance): Call complete_type.
19687
19688 Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
19689
19690 * decl.c (store_bindings): Make static.
19691
19692 Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
19693
19694 * init.c (expand_aggr_init_1): Don't check type conversions if
19695 NEW_OVER.
19696
19697 * cvt.c (z_candidate): Put back template field.
19698 (add_function_candidate): Set it.
19699 (add_template_candidate): Likewise.
19700 (joust): Use it.
19701 (compare_qual): Handle references and pointers to members.
19702 (compare_ics): Handle reference bindings.
19703
19704 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
19705
19706 Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
19707
19708 * call.c (compute_conversion_costs): Call complete_type.
19709
19710 * tree.c (vec_binfo_member): Use comptypes instead of comparing
19711 pointers, so we can handle template parameters.
19712
19713 Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
19714
19715 * cvt.c (cp_convert_to_pointer): We have to call complete_type
19716 here; let's make it explicit instead of a side effect of an
19717 error check.
19718
19719 Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
19720
19721 * cvt.c (z_candidate): Remove template field.
19722 (reference_binding): Handle binding to temporary.
19723 (implicit_conversion): Likewise.
19724 (add_function_candidate): Handle artificial constructor parms.
19725 Handle functions with too few parms.
19726 (add_template_candidate): New function.
19727 (build_user_type_conversion_1): Handle constructors.
19728 (convert_like): Likewise.
19729 (build_over_call): Likewise.
19730 (build_new_function_call): Support templates.
19731 (compare_ics): Fix reference, inheritance handling.
19732
19733 Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
19734
19735 * decl.c: Add signed_size_zero_node.
19736 (init_decl_processing): Build it.
19737 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
19738 when we're trying to make a negative delta.
19739
19740 Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19741
19742 Stop doing this damn index==strchr variable name confusion.
19743 * class.c (add_virtual_function): Change local var INDEX to be
19744 named IDX.
19745 (add_method): Likewise.
19746 * lex.c (print_parse_statistics): Likewise.
19747 * search.c (make_memoized_table_entry): Likewise.
19748 (lookup_fnfields_here): Likewise.
19749 (lookup_field): Likewise.
19750 (lookup_fnfields): Likewise.
19751 (get_baselinks): Likewise.
19752 * sig.c (build_signature_table_constructor): Likewise.
19753 (build_signature_method_call): Likewise.
19754 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
19755 (get_member_function_from_ptrfunc): Likewise.
19756 (build_ptrmemfunc): Change local var INDEX to be IDX.
19757 (c_expand_start_case): Likewise.
19758
19759 Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
19760
19761 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
19762 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
19763 (convert_to_reference): Use build_type_conversion to convert to
19764 the reference type directly.
19765 (standard_conversion): Fix void* case, non-conversions.
19766 (reference_binding): Fix expr == 0 case, non-conversions.
19767 (convert_like): Support REF_BIND.
19768 (compare_qual): Split out from compare_ics.
19769 (compare_ics): Use it, handle icses with only a qual_conv.
19770
19771 * init.c (expand_vec_init): Don't crash if decl is NULL.
19772
19773 Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
19774
19775 * mpw-config.in: New file, configury for Mac MPW.
19776 * mpw-make.sed: New file, makefile editing for MPW.
19777
19778 Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
19779
19780 * pt.c (instantiate_class_template): Call repo_template_used.
19781
19782 * search.c (lookup_conversions): Only lookup conversions in
19783 complete types.
19784
19785 Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19786
19787 * cp-tree.def: Renamed from tree.def, to avoid confusion with
19788 gcc's tree.def.
19789 * cp-tree.h, lex.c: Include cp-tree.def.
19790 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
19791
19792 Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
19793
19794 * init.c (build_vec_delete_1): Call complete_type.
19795
19796 Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
19797
19798 * except.c (start_anon_func): Make sure anonymous functions are
19799 never external.
19800
19801 Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
19802
19803 * decl.c (finish_function): If function_depth > 1, set nested.
19804
19805 * decl2.c (grokbitfield): Revert Bob's change.
19806 * class.c (finish_struct_1): Fix handling of named bitfield widths.
19807
19808 Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
19809
19810 * pt.c (add_pending_template): Handle types.
19811 (lookup_template_class): With -fexternal-templates, just add the class
19812 to pending_templates instead of instantiating it now.
19813 * decl2.c (finish_file): Handle types in pending_templates.
19814
19815 Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
19816
19817 * decl2.c (grokbitfield): Handle constant decls appropriately.
19818 Give an appropriate error message now instead of spewing core
19819 later.
19820
19821 Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
19822
19823 * decl2.c: Don't turn on thunks by default for now.
19824
19825 Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
19826
19827 * typeck.c (complete_type): Handle error_mark_node.
19828 (common_type, OFFSET_TYPE): Handle template_type_parms.
19829
19830 Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
19831
19832 * pt.c (instantiate_decl): If at_eof, call import_export_decl
19833 regardless of DECL_INLINE.
19834
19835 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
19836
19837 * class.c (finish_struct_bits): Copy TYPE_SIZE.
19838
19839 * rtti.c (build_dynamic_cast): Support templates.
19840 * tree.def: Support DYNAMIC_CAST_EXPR.
19841 * pt.c (tsubst_copy): Likewise.
19842 * decl2.c (build_expr_from_tree): Likewise.
19843
19844 Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
19845
19846 * typeck.c (build_static_cast): Support templates.
19847 (build_const_cast): Likewise.
19848 * tree.def: Support CONST/STATIC_CAST_EXPR.
19849 * pt.c (tsubst_copy): Likewise.
19850 * decl2.c (build_expr_from_tree): Likewise.
19851
19852 Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
19853
19854 * decl2.c (finish_vtable_vardecl): Don't trust
19855 TREE_SYMBOL_REFERENCED for vtables of local classes.
19856
19857 Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
19858
19859 * pt.c (tsubst_copy): Handle operator T.
19860
19861 Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19862
19863 * init.c (build_delete): Move creation of PARMS inside test of
19864 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
19865
19866 Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
19867
19868 * typeck.c (build_conditional_expr): Don't assume that
19869 the arguments to ?: are always pointers or records.
19870
19871 Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
19872
19873 * decl2.c (import_export_decl): Still emit static/weak/comdat
19874 copies of inline template functions with -fno-implicit-templates.
19875
19876 Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
19877
19878 * init.c (build_delete): Determine the complete basetype
19879 path to the destructor we're calling.
19880
19881 Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
19882
19883 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
19884 initialize the enum, because we really and truly don't know where
19885 it came from.
19886 (start_enum): Don't copy integer_zero_node because
19887 build_enumerator will do it.
19888
19889 Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
19890
19891 * decl.c (finish_function): Do access control on base destructors.
19892
19893 * pt.c (tsubst, case FUNCTION_DECL): Set up
19894 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
19895 hose us.
19896
19897 Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
19898
19899 * cvt.c (build_up_reference): If we have already extended the
19900 lifetime of the temporary, don't try it again.
19901 * typeck.c (c_expand_return): Don't try and convert the return
19902 value twice when we want a reference, once is enough.
19903
19904 Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
19905
19906 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
19907 LOOKUP_ONLYCONVERTING at all for now.
19908
19909 * search.c (add_conversions): Put the conversion function in
19910 TREE_VALUE, the basetype in TREE_PURPOSE.
19911 * cvt.c (build_type_conversion): Adjust.
19912 * cvt.c (build_expr_type_conversion): Adjust.
19913 * call.c (user_harshness): Adjust.
19914
19915 Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
19916
19917 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
19918 backend's benefit.
19919
19920 Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
19921
19922 * except.c (expand_start_catch_block): Add a dummy region, if we
19923 get an error, so that we can avoid core dumping later.
19924
19925 Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
19926
19927 * cp-tree.h (OFFSET_REF): Remove.
19928 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
19929 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
19930 * init.c (expand_aggr_init_1): Likewise.
19931 (build_new): Likewise.
19932 * typeck.c (expand_target_expr): Likewise.
19933
19934 Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
19935
19936 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
19937 TARGET_EXPR.
19938
19939 Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
19940
19941 * cvt.c (build_up_reference): Redo how and when temporaries are
19942 created.
19943 * decl.c (grok_reference_init): Don't try and be smart about
19944 running cleanups.
19945
19946 Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
19947
19948 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
19949 (TARGET_EXPR...), now that it has 4 arguments.
19950 * tree.c (build_cplus_new): Likewise.
19951
19952 Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
19953
19954 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
19955
19956 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
19957 * decl.c (struct saved_scope): Remove named_labels,
19958 {base,member}_init_list.
19959 (maybe_push_to_top_level): Don't set them. Call
19960 push_cp_function_context if appropriate.
19961 (pop_from_top_level): Likewise.
19962
19963 * method.c (do_build_assign_ref): Remove obsolete check of
19964 TYPE_HAS_ASSIGN_REF (basetype).
19965
19966 * decl.c (grokfndecl): Diagnose user definition of
19967 implicitly-declared methods.
19968
19969 Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
19970
19971 * method.c (do_build_copy_constructor): Add code to give
19972 meaningful error messages instead of crashing.
19973 (do_build_assign_ref): Don't synthesize assignment operators for
19974 classes containing reference or const members.
19975
19976 * class.c (struct base_info): Remove cant_synth_copy_ctor
19977 and cant_synth_asn_ref.
19978 (finish_base_struct): Remove the code that tries to conditionalize
19979 synthesis of copy constructors & assignment operators based on
19980 access permissions. Instead, let it fail when it tries to
19981 synthesize the copy constructor. This will give meaningful error
19982 messages instead of silently generating code to perform a bitcopy.
19983
19984 Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
19985
19986 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
19987 determining types for constant values.
19988
19989 * decl.c (struct named_label_list): Use instead of stuffing
19990 random items into a TREE_LIST node.
19991 (named_label_uses): Use the new struct.
19992 (poplevel): Likewise.
19993 (lookup_label): Likewise.
19994 (define_label): Add an error message to tell the user the line
19995 where the goto is located in addition to the destination of the
19996 goto.
19997 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
19998 named_label_uses.
19999 (finish_function): Likewise.
20000
20001 (start_decl): Complain about defining a static data member
20002 in a different type from which it was declared.
20003
20004 Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
20005
20006 * cvt.c (build_expr_type_conversion): Adjust.
20007
20008 Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
20009
20010 * call.c (build_method_call): Always convert 'this' to the
20011 appropriate type.
20012
20013 * search.c (add_conversions): Put the conversion function in
20014 TREE_VALUE, the type in TREE_PURPOSE.
20015 * cvt.c (build_type_conversion): Adjust.
20016 * call.c (user_harshness): Adjust.
20017
20018 * method.c (emit_thunk): Call temporary_allocation and
20019 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
20020
20021 * tree.c (build_cplus_array_type): Handle tweaking of
20022 TYPE_MAIN_VARIANT here.
20023 * typeck.c (common_type): Not here.
20024
20025 * typeck.c (complete_type): Only try to complete an array type if
20026 it has a domain.
20027
20028 Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
20029
20030 * decl.c (grokvardecl): Call complete_type.
20031 (grokdeclarator): Call complete_type for PARM_DECLs.
20032
20033 Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
20034
20035 * pt.c (instantiate_class_template): Re-set
20036 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
20037
20038 Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
20039
20040 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
20041 smart enough to do it right.
20042 * tree.c (cp_expand_decl_cleanup): Likewise.
20043 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
20044 cp_expand_decl_cleanup.
20045 (store_parm_decls): Likewise.
20046 (hack_incomplete_structures): Likewise.
20047 * except.c (push_eh_cleanup): Likewise.
20048
20049 Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
20050
20051 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
20052 frontend to the backend where it belongs.
20053 * tree.c (unsave_expr): Likewise.
20054 (unsave_expr_now): Likewise.
20055 * tree.def (UNSAVE_EXPR): Likewise.
20056 * cp-tree.h (unsave_expr): Likewise.
20057 (unsave_expr_now): Likewise.
20058
20059 Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
20060
20061 * init.c (emit_base_init): Make sure the partial EH cleanups live
20062 on the function_obstack.
20063
20064 Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
20065
20066 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
20067 when checking for pointer types.
20068
20069 Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
20070
20071 * pt.c (instantiate_class_template): Remove obsolete check for
20072 access declarations.
20073
20074 Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
20075
20076 * call.c (build_overload_call): Simplify calls to
20077 build_overload_call by removing last parameter.
20078 (build_method_call): Likewise.
20079 * cp-tree.h: Likewise.
20080 * method.c (build_opfncall): Likewise.
20081 * typeck.c (build_x_function_call): Likewise.
20082
20083 Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
20084
20085 * call.c (default_parm_conversions): Factor out common code.
20086 (build_method_call): Use it.
20087 (build_overload_call_real): Use it.
20088
20089 Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
20090
20091 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
20092 but pedwarn as the code is bogus.
20093 * typeck.c (decay_conversion): Likewise.
20094 (build_function_call_real): Use build_addr_func instead of
20095 default_conversion. Don't allow pointer-to-method functions down
20096 here.
20097 (build_unary_op): Use real pointer-to-member functions instead of
20098 fake ones.
20099 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
20100 (convert_for_assignment): Removed some obsolete code.
20101 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
20102 build_x_function_call instead of current_class_ptr. Only call
20103 digest_init once on an initializer, we do this just checking
20104 TREE_TYPE.
20105 (build_expr_from_tree): Pass current_class_ref to
20106 build_x_function_call instead of current_class_ptr.
20107 * init.c (build_member_call): Likewise.
20108 * pase.y: Likewise.
20109 * error.c (dump_expr): Handle OFFSET_REFs better.
20110 * pt.c (unify): Handle pointer-to-member functions better.
20111 * decl.c (finish_function): Clear out current_class_ref just like
20112 we do for current_class_ptr.
20113
20114 * typeck.c (get_delta_difference): Handle virtual bases better.
20115
20116 Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
20117
20118 * sig.c (build_signature_table_constructor): Use the delta for
20119 the original basetype for this virtual function with thunks.
20120 (build_signature_method_call): We still need to adjust 'this'
20121 with thunks.
20122
20123 Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
20124
20125 * call.c (build_addr_func): New routine. Used to get the `real'
20126 address of a function or a method. Needed to avoid getting a
20127 pointer-to-member function.
20128 (build_call): New routine to build CALL_EXPRs.
20129 (build_method_call): Use it.
20130 * cvt.c (convert_to_aggr): Likewise.
20131 * typeck.c (build_function_call_real): Likewise.
20132 * sig.c (build_signature_table_constructor): Use build_addr_func.
20133 * cp-tree.h (build_call, build_addr_func): Declare them.
20134
20135 Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
20136
20137 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
20138 * parse.y: Remove uses of LOOKUP_AGGR.
20139
20140 Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
20141
20142 * *.[chy]: Rename current_class_decl to current_class_ptr, and
20143 C_C_D to current_class_ref.
20144
20145 Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
20146
20147 * call.c (convert_harshness): Tighten up pointer conversions.
20148
20149 Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
20150
20151 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
20152 (finish_file): Likewise.
20153
20154 Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
20155
20156 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
20157
20158 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
20159 code.
20160
20161 Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
20162
20163 * decl2.c: Turn on thunks by default where supported.
20164
20165 Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
20166
20167 * cp-tree.h (build_overload_call_maybe): Removed.
20168 * call.c (build_overload_call_real): Invert meaning of last arg to
20169 be require_complete.
20170 (build_overload_call): Likewise.
20171 * typeck.c (build_x_function_call): Use build_overload_call_real
20172 instead of build_overload_call_maybe.
20173
20174 Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
20175
20176 * decl2.c (finish_file): Don't try to emit functions that haven't
20177 been compiled.
20178
20179 Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
20180
20181 * decl2.c (finish_vtable_vardecl): Oops.
20182
20183 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
20184 Also store the bindings from previous_class_values.
20185 (pop_from_top_level): Restore them.
20186
20187 Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
20188
20189 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
20190 symbol has been referenced.
20191 (finish_file): Re-join synthesis/vtable loop with inline emission
20192 loop, disable inlining when an inline is output.
20193
20194 Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
20195
20196 * except.c (init_exception_processing): Setup saved_in_catch.
20197 (push_eh_cleanup): Reset __eh_in_catch.
20198 (expand_start_catch_block): Set __eh_in_catch.
20199
20200 Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
20201
20202 * except.c (push_eh_cleanup): Add tracking for whether or not we
20203 have an active exception object.
20204 (expand_builtin_throw): Use it to make sure a rethrow without an
20205 exception object is caught.
20206
20207 Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
20208
20209 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
20210 cache.
20211
20212 Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
20213
20214 * decl2.c (finish_file): Also use sentries for vars with
20215 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
20216 created).
20217
20218 * lex.c (handle_cp_pragma): Disable #pragma
20219 interface/implementation if SUPPORTS_ONE_ONLY > 1.
20220
20221 Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
20222
20223 * method.c (emit_thunk): Wrap default case in
20224 temporary/permanent_allocation.
20225
20226 * method.c (make_thunk): Use DECL_ONE_ONLY.
20227 (emit_thunk): Call assemble_end_function.
20228
20229 Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
20230
20231 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
20232 (import_export_decl): Likewise.
20233 (finish_prevtable_vardecl): Disable vtable hack if
20234 SUPPORTS_ONE_ONLY > 1.
20235
20236 Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
20237
20238 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
20239 PREDECREMENT_EXPRs take two arguments, not one.
20240
20241 Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
20242
20243 * class.c (build_vtable_entry): Don't build thunks for abstract
20244 virtuals.
20245
20246 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
20247 frontend.
20248
20249 Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
20250
20251 * class.c (set_rtti_entry): Use size_zero_node.
20252 (build_vtable): Likewise.
20253
20254 Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
20255
20256 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
20257 (prepare_fresh_vtable): Likewise.
20258
20259 Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
20260
20261 * method.c (emit_thunk): Call mark_used on the target function.
20262
20263 * call.c (build_method_call): Don't warn about pending templates.
20264
20265 Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
20266
20267 * decl2.c (finish_file): Fix list walking logic.
20268
20269 * typeck2.c (check_for_new_type): Only warn if -pedantic.
20270
20271 Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
20272
20273 * class.c (finish_struct_1): Remove old code for
20274 dont_allow_type_definitions.
20275 * cp-tree.h: Likewise.
20276 * spew.c: Make sure cp-tree.h is included before parse.h, so the
20277 definition of flagged_type_tree is found before it is used.
20278 * lex.c: Likewise.
20279 * parse.y: Added the ftype member to the type union, and changed a
20280 number of rules to use it instead of ttype. Added calls to
20281 check_for_new_type() as appropriate.
20282 * typeck2.c (check_for_new_type): New function for checking
20283 if a newly defined type appears in the specified tree.
20284 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
20285 for check_for_new_type().
20286
20287 Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
20288
20289 * decl2.c (finish_file): Only use a sentry if the decl is public.
20290
20291 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
20292 don't pass LOOKUP_ONLYCONVERTING.
20293
20294 Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
20295
20296 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
20297 properly keeps track of const and volatile type modifiers.
20298
20299 Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
20300
20301 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
20302 * pt.c (comp_template_args): Use it.
20303
20304 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
20305 assemble_external for artificial function decls.
20306
20307 * decl.c (cp_finish_decl): Oops.
20308
20309 Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
20310
20311 * decl2.c (import_export_decl): Put static data member templates
20312 into common storage, or make them weak, depending on whether they
20313 are dynamically or statically initialized.
20314 (get_sentry): New function.
20315 (finish_file): Do import_export_decl for static data members before
20316 building the init/fini functions. Don't init/fini a variable that's
20317 EXTERNAL. Use a sentry for variables in common. Fix mismatching
20318 push/pop_temp_slots.
20319 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
20320 expand_static_init thang.
20321 * method.c (get_id_2): New function.
20322
20323 Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
20324
20325 * parse.y (empty_parms): Make sure we use C++-style prototypes
20326 when we're declaring member functions.
20327
20328 Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
20329
20330 * Makefile.in (CONFLICTS): 16 s/r conflicts.
20331 * parse.y (self_template_type): New nonterminal.
20332
20333 Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
20334
20335 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
20336 name.
20337 * parse.y (base_class.1): Allow 'typename foo::bar'.
20338
20339 * lex.c (check_newline): Remove #pragma code that plays with the
20340 input stream, since we now deal with tokens. Clear nextchar when
20341 we're done.
20342 (handle_cp_pragma): Use real_yylex.
20343 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
20344 in one place.
20345
20346 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
20347
20348 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
20349
20350 Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
20351
20352 * parse.y: New token SELFNAME for potential constructor.
20353 * spew.c (yylex): Handle it.
20354 * lex.c (identifier_type): Produce it.
20355
20356 * parse.y (complete_type_name): In :: case, don't push class binding.
20357 (complex_type_name): Likewise.
20358
20359 Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
20360
20361 * typeck.c (build_reinterpret_cast): Handle pointer to member
20362 functions.
20363
20364 Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20365
20366 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
20367 pragmas.
20368 (check_newline): Put the vtable/unit/implementation/interface pragma
20369 code into handle_cp_pragma, replacing it with a call.
20370 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
20371 args. Get the next token after handling the pragma token.
20372
20373 Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
20374
20375 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
20376 (convert_to_pointer_force): Likewise.
20377
20378 * init.c (build_new): Fix array new without -fcheck-new.
20379
20380 Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
20381
20382 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
20383 tree.c: Lose TYPE_NESTED_NAME.
20384
20385 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
20386 as identifiers.
20387
20388 * tree.def: Add VEC_INIT_EXPR.
20389 * expr.c (cplus_expand_expr): Handle it.
20390 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
20391 the extra file-scope symbol nastiness.
20392
20393 Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
20394
20395 * method.c (make_thunk): Thunks are static.
20396 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
20397
20398 * decl2.c (mark_vtable_entries): Emit thunks as needed.
20399 (finish_file): Don't emit them here.
20400
20401 Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
20402
20403 * rtti.c (build_dynamic_cast): Handle null pointers.
20404 (ifnonnull): New function.
20405
20406 Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
20407
20408 * call.c (build_method_call): Remember the original basetype we
20409 were called with. Give an error message instead of trying
20410 (incorrectly) to call a non-static member function through a
20411 non-inherited class.
20412
20413 * search.c (expand_upcast_fixups): Mark the new fixup as
20414 DECL_ARTIFICIAL.
20415
20416 Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
20417
20418 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
20419
20420 * class.c (set_rtti_entry): Fix for thunks.
20421
20422 * decl2.c (import_export_decl): Still emit typeinfo fns for
20423 cv-variants of builtin types.
20424
20425 * rtti.c (expand_class_desc): Set up base_info_type_node here.
20426 (init_rtti_processing): Instead of here.
20427
20428 Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
20429
20430 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
20431 (build_typeid): Only complain about taking dynamic typeid without
20432 -frtti.
20433
20434 * decl2.c: flag_rtti defaults to 1.
20435
20436 * rtti.c (get_tinfo_var): The general class case is now smaller.
20437 (init_rtti_processing): Pack the latter three fields of base_info
20438 into 32 bits.
20439
20440 Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
20441
20442 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
20443
20444 Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
20445
20446 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
20447 (push_memoized_context): Split out code to undefer pop_type_level to
20448 (clear_memoized_cache): here.
20449 (pop_memoized_context): We can only handle one layer of deferral of
20450 pop_type_level so clear the cache, if there was a previous level.
20451
20452 Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
20453
20454 * rtti.c (init_rtti_processing): Build up base_info_type_node.
20455 (expand_class_desc): Use one pointer to an array of base_info
20456 structs, passed using a CONSTRUCTOR.
20457
20458 Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
20459
20460 * class.c (build_vbase_path): Remove block extern for
20461 flag_assume_nonnull_objects here.
20462 (build_vfn_ref): Split out functionality into build_vtbl_ref.
20463 (build_vtbl_ref): New routine.
20464 (build_vtable): Set up rtti info here.
20465 (add_virtual_function): Note in CLASSTYPE_RTTI the best
20466 place where we can get the rtti pointers from to avoid having to
20467 search around for a place.
20468 (finish_base_struct): Likewise.
20469 (finish_struct_1): Likewise. Never create totally new vtables
20470 with totally new vtable pointers for rtti. Disable code to layout
20471 vtable pointers better until we want to break binary
20472 compatibility.
20473 * rtti.c (build_headof_sub): New routine to convert down to a
20474 sub-object that has an rtti pointer in the vtable.
20475 (build_headof): Use it. Also, use build_vtbl_ref now to be more
20476 maintainable.
20477 (build_dynamic_cast): Make sure we have saved it, if we need to.
20478 * search.c (dfs_init_vbase_pointers): Disable code that deals with
20479 a more efficient vtable layout, enable later.
20480 * call.c (flag_assume_nonnull_objects): Moved declaration to
20481 * cp-tree.h: here. Declare build_vtbl_ref.
20482 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
20483 function calls that want a tree.
20484
20485 Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
20486
20487 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
20488 other X subobjects in the most derived type. Ack.
20489
20490 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
20491 get_typeid will do it for us.
20492 (get_typeid_1): Break out call-building for expand_*_desc to use.
20493 (get_typeid): Call it.
20494 (expand_*_desc): Likewise.
20495 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
20496 and void *.
20497 (init_decl_processing): Lose builtin_type_tdescs lossage.
20498 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
20499
20500 Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
20501
20502 * pt.c (tsubst): When calling set_nested_typename, use
20503 TYPE_NESTED_NAME (current_class_type) instead of
20504 current_class_name.
20505
20506 * decl.c (pushdecl): Likewise.
20507 (pushdecl_class_level): Likewise.
20508 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
20509 set_nested_typename.
20510
20511 Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
20512
20513 * rtti.c (synthesize_tinfo_fn): Handle arrays.
20514
20515 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
20516
20517 Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
20518
20519 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
20520 (init_rtti_processing): Lose bad_cast_type.
20521 (build_dynamic_cast): Use throw_bad_cast.
20522
20523 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
20524
20525 * decl2.c (finish_file): Don't synthesize artificial functions
20526 that are external and not inline.
20527
20528 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
20529
20530 * decl2.c (finish_file): Handle having new inlines added to
20531 saved_inlines by synthesis.
20532
20533 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
20534
20535 Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
20536
20537 RTTI rewrite to initialize nodes as needed, not require that
20538 users #include <typeinfo>, complete functionality and reduce wasted
20539 space.
20540 * rtti.c (init_rtti_processing): New fn.
20541 (build_typeid): The vtable entry is now a function.
20542 (get_tinfo_var): New fn.
20543 (get_tinfo_fn): Likewise.
20544 (get_typeid): Use it.
20545 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
20546 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
20547 points __rtti_*.
20548 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
20549 (synthesize_tinfo_fn): New fn.
20550 * method.c (build_t_desc_overload): Lose.
20551 (build_overload_with_type): More generic.
20552 * decl.c (init_decl_processing): Call init_rtti_processing.
20553 * class.c (set_rtti_entry): Use get_tinfo_fn.
20554 * decl2.c (mark_vtable_entries): Mark the rtti function.
20555 (finish_prevtable_vardecl): Don't build_t_desc.
20556 (import_export_decl): Handle tinfo functions.
20557 (finish_file): Likewise.
20558 * typeck.c (inline_conversion): New fn.
20559 (build_function_call_real): Use it.
20560 * cp-tree.h: Add decls.
20561
20562 * method.c (hack_identifier): Also convert component_refs from
20563 references.
20564
20565 * lex.c (cons_up_default_function): Use the type, not the name, in
20566 declspecs.
20567
20568 * decl2.c (import_export_vtable): Fix weak vtables.
20569
20570 Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
20571
20572 * search.c (get_base_distance_recursive): Fix access checks for
20573 protected bases.
20574
20575 Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20576
20577 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
20578 cp-tree.h.
20579 (convert_harshness): Add prototypes wrapped by PROTO.
20580 * decl2.c (grok_function_init): Likewise.
20581 (do_toplevel_using_decl): Change to void return type.
20582 * class.c (build_vtable_entry): Remove decl of make_thunk.
20583 (merge_overrides): Fix order of arg definitions.
20584 (finish_vtbls): Likewise.
20585 (fixup_vtable_deltas): Likewise.
20586 (modify_all_direct_vtables): Likewise.
20587 (modify_all_indirect_vtables): Likewise.
20588 * search.c (get_base_distance_recursive): Likewise.
20589 (get_abstract_virtuals_1): Likewise.
20590 (fixup_virtual_upcast_offsets): Likewise.
20591 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
20592 * init.c (perform_member_init): Fix order of arg definitions.
20593 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
20594 * cp-tree.h (make_thunk): Add decl.
20595 (overload_template_name, push_template_decl): Add decls.
20596 (do_toplevel_using_decl): Change to void return type.
20597 (vec_binfo_member): Add decl.
20598
20599 Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20600
20601 * typeck.c (mark_addressable, convert_for_assignment,
20602 convert_for_initialization, pointer_int_sum, pointer_diff,
20603 unary_complex_lvalue): Add prototypes wrapped by PROTO.
20604 (convert_sequence): #if 0 fn decl, since definition also is.
20605
20606 Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
20607
20608 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
20609 cast to pointer types for type searching.
20610
20611 Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20612
20613 * typeck.c (get_delta_difference): Use cp_error, not error, in the
20614 case where BINFO == 0.
20615
20616 Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
20617
20618 * call.c (build_method_call): Fix wording of error messages so
20619 constructors come out right.
20620
20621 Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
20622
20623 * decl.c (push_overloaded_decl): Don't warn about hidden
20624 constructors when both the type and the function are declared
20625 in a system header file.
20626
20627 Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
20628
20629 * class.c (finish_struct_1): Propagate the TYPE_PACKED
20630 flag for the type to the type's fields.
20631
20632 Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20633
20634 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
20635
20636 Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
20637
20638 * class.c (base_info, finish_base_struct): Replace
20639 needs_virtual_dtor with base_has_virtual.
20640
20641 (finish_struct_1): Remove the old code that tried to make default
20642 destructors virtual. Use base_has_virtual when checking if we need
20643 to add a vtable entry for the rtti code.
20644
20645 Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
20646
20647 * pt.c (push_template_decl): Complain about template decl with
20648 inappropriate declaration.
20649
20650 Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
20651
20652 * typeck.c (build_x_unary_op): Remove bogus check for taking
20653 the address of a member function.
20654
20655 Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
20656
20657 * parse.y (constructor_declarator): Only push the class if
20658 we are not already in the class.
20659
20660 Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
20661
20662 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
20663 Add additional argument to INIT_CUMULATIVE_ARGS.
20664
20665 Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
20666
20667 * decl.c (shadow_tag): Fix error about anon union with methods.
20668
20669 * parse.y (self_reference): Only generate a self-reference if this
20670 is a non-template class.
20671 (opt.component_decl_list): Only use it if it was generated.
20672
20673 * parse.y (component_decl_1): Use constructor_declarator.
20674 (fn.def2): Likewise.
20675 (notype_component_declarator0): Likewise.
20676
20677 Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
20678
20679 * typeck.c (build_x_unary_op): Add checks for taking the address
20680 of a TARGET_EXPR or of a member function, and give appropriate
20681 warnings.
20682
20683 Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
20684
20685 * pt.c (process_template_parm): Allow template type parms to be
20686 used as types for template const parms.
20687
20688 Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
20689
20690 * init.c (expand_vec_init): Ensure the eh cleanups are on the
20691 function_obstack.
20692
20693 Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
20694
20695 * decl.c (lookup_name_real): Be even more picky about the
20696 ambiguous lookup warning.
20697 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
20698 * parse.y (constructor_declarator): Rather than here.
20699
20700 * parse.y (constructor_declarator): New nonterminal.
20701 (fn.def1): Use it.
20702 (explicit_instantiation): Likewise.
20703
20704 Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
20705
20706 Add implicit declaration of class name at class scope.
20707 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
20708 * parse.y (self_reference): New nonterminal.
20709 (opt.component_decl_list): Use it.
20710 (fn.def1): Add nested_name_specifier type_name cases.
20711 * class.c (build_self_reference): New function.
20712 (finish_struct): Handle access_default later, move self-reference
20713 decl to the end.
20714 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
20715 * cp-tree.h: Adjust.
20716
20717 * pt.c (do_function_instantiation): Separate handling of member
20718 functions and non-member functions properly.
20719
20720 Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
20721
20722 * pt.c (process_template_parm): Improve error for 'volatile class K'.
20723
20724 * class.c (finish_struct_1): Check the right slot for destructors.
20725
20726 * decl.c (start_enum): Complain about enum templates.
20727
20728 Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
20729
20730 * init.c (resolve_offset_ref): Offset pointers to member data by one.
20731 * typeck.c (unary_complex_lvalue): Likewise.
20732
20733 Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
20734
20735 * typeck.c (c_expand_return): Check for a returned local
20736 array name, similar to the check for an ADDR_EXPR.
20737
20738 Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
20739
20740 * decl.c (cp_finish_decl): Don't build cleanups for static
20741 variables here.
20742
20743 Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
20744
20745 * typeck.c (build_modify_expr): Fix error messages to be more
20746 accurate.
20747 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
20748 assignment operators.
20749 * error.c (assop_as_string): Likewise. Add support for `%Q' for
20750 assignment operators.
20751
20752 Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
20753
20754 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
20755 give an error if initialized. pedwarn about nested type with the
20756 same name as its enclosing class.
20757
20758 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
20759
20760 * typeck.c (require_complete_type): Be sure to instantiate the
20761 MAIN_VARIANT of the type.
20762
20763 * decl2.c (finish_file): Instantiate pending templates before
20764 processing static constructors and destructors.
20765
20766 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
20767 unless at_eof.
20768
20769 Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
20770
20771 * decl2.c (delete_sanity): If error_mark_node is passed
20772 in as an expression, quit while we're ahead.
20773
20774 * decl.c (grokdeclarator): Give an error message if `friend'
20775 is combined with any storage class specifiers.
20776
20777 Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
20778
20779 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
20780 definition of nonexistent nested type.
20781
20782 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
20783 not to say 'typedef'.
20784
20785 Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20786
20787 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
20788 * search.c (dfs_walk, dfs_init_vbase_pointers,
20789 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
20790 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
20791
20792 Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
20793
20794 * except.c (build_throw): Support minimal parse.
20795 * pt.c (tsubst_copy): Support THROW_EXPR.
20796 * decl2.c (build_expr_from_tree): Likewise.
20797
20798 * pt.c (mangle_class_name_for_template): Always allocate
20799 scratch_firstobj.
20800
20801 Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
20802
20803 * cvt.c (cp_convert_to_pointer): Give an appropriate error
20804 when trying to cast from an incomplete type.
20805
20806 Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
20807
20808 * pt.c (instantiate_class_template): Don't bother setting up
20809 CLASSTYPE_TAGS explicitly, as the nested types will add
20810 themselves.
20811
20812 Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
20813
20814 * decl.c (shadow_tag): Remove old error check for usage of
20815 an enum without a previous declaration.
20816 (xref_tag): Add error message about usage of enums without a
20817 previous declaration.
20818
20819 Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
20820
20821 * lex.c (do_identifier): Only do name consistency check if we're
20822 parsing.
20823
20824 * pt.c (push_template_decl): Don't crash if we get a member defn
20825 that doesn't match.
20826
20827 * decl.c (xref_tag_from_type): New function to do an xref without
20828 always having to figure out code_type_node.
20829 * cp-tree.h: Declare it.
20830 * pt.c (instantiate_class_template): Use it for friend classes.
20831 (lookup_template_class): Use it.
20832
20833 * typeck2.c (build_functional_cast): Pull out a single parm before
20834 passing it to build_c_cast.
20835
20836 Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
20837
20838 * expr.c (do_case): Give an error message if a pointer is
20839 given as a case value.
20840
20841 Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
20842
20843 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
20844 an overload list.
20845
20846 * lex.c (cons_up_default_function): Really, now, interface hackery
20847 does not apply to synthesized methods.
20848
20849 Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
20850
20851 * call.c (build_method_call): Ctors and dtors now have special names
20852 with respect to lookups.
20853 * class.c (add_method): Likewise.
20854 (grow_method): Likewise.
20855 (finish_struct_methods): Likewise.
20856 (warn_hidden): Likewise.
20857 (finish_struct_1): Likewise.
20858 * cvt.c (convert_to_reference): Likewise.
20859 (convert_to_aggr): Likewise.
20860 (cp_convert): Likewise.
20861 * decl2.c (check_classfn): Likewise.
20862 * init.c (expand_member_init): Likewise.
20863 (expand_default_init): Likewise.
20864 (expand_aggr_init_1): Likewise.
20865 (build_offset_ref): Likewise.
20866 (build_new): Likewise.
20867 (build_delete): Likewise.
20868 * lex.c (do_inline_function_hair): Likewise.
20869 * search.c (lookup_field_1): Likewise.
20870 (lookup_fnfields_here): Likewise.
20871 (lookup_field): Likewise.
20872 (lookup_fnfields): Likewise.
20873 (get_virtual_destructor): Likewise.
20874 (dfs_debug_mark): Likewise.
20875 (dfs_pushdecls): Likewise.
20876 (dfs_compress_decls): Likewise.
20877 * tree.c (layout_basetypes): Likewise.
20878 * typeck.c (build_component_ref): Likewise.
20879 (build_x_function_call): Likewise.
20880 (build_modify_expr): Likewise.
20881 (convert_for_initialization): Likewise.
20882 (build_functional_cast): Likewise.
20883 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
20884 (CTOR_NAME): New.
20885 (DTOR_NAME): New.
20886 * decl.c (ctor_identifier): New.
20887 (dtor_identifier): New.
20888 (init_decl_processing): Set them.
20889
20890 Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
20891
20892 * typeck.c (build_component_ref): Don't get confused by fields whose
20893 context has no type name, like pointer to member functions.
20894
20895 Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
20896
20897 * decl.c (grokdeclarator): Handle typedef without declarator.
20898
20899 * pt.c (tsubst): Handle SCOPE_REF in declarator.
20900
20901 * parse.y (bad_parm): Catch another case of missing `typename'.
20902
20903 * lex.c (yyprint): Handle TYPE_DECLs.
20904
20905 * decl.c (start_function): Don't try to be clever.
20906
20907 * lex.c: Lose compiler_error_with_decl.
20908 * typeck2.c: Lose error_with_aggr_type.
20909 (incomplete_type_error): Use cp_* instead of old functions.
20910 (readonly_error): Likewise.
20911 * typeck.c (convert_arguments): Likewise.
20912 * search.c (lookup_nested_field): Likewise.
20913 * method.c (make_thunk): Likewise.
20914 * decl.c (grokparms): Likewise.
20915 * cp-tree.h: Update.
20916
20917 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
20918 and value.
20919
20920 Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
20921
20922 * method.c (build_opfncall): When deleting a pointer to an
20923 array, build a new pointer to the tree past any ARRAY_TYPE
20924 nodes.
20925
20926 Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20927
20928 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
20929
20930 Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
20931
20932 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
20933 and ! DECL_INLINE.
20934
20935 * decl.c (finish_function): Don't set nested based on
20936 hack_decl_function_context.
20937 * parse.y (function_try_block): Check for nested function.
20938 (pending_inlines): Likewise.
20939
20940 * decl2.c (build_expr_from_tree): If a unary op already has a
20941 type, just return it.
20942
20943 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
20944
20945 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
20946 (finish_file): Check the return value of walk_vtables.
20947 (finish_prevtable_vardecl): Return int.
20948 (finish_vtable_vardecl): Likewise.
20949 (prune_vtable_vardecl): Likewise.
20950 * lex.c (set_vardecl_interface_info): Likewise.
20951 * cp-tree.h: Adjust return types.
20952
20953 * class.c (delete_duplicate_fields_1): Don't complain about
20954 duplicate nested types if they're the same type.
20955 (finish_struct): Remove check for duplicate.
20956 * decl2.c (grokfield): Don't check for typedef of anonymous type.
20957
20958 Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
20959
20960 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
20961
20962 * decl.c (grokdeclarator): Lose special handling of class-level
20963 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
20964 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
20965
20966 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
20967
20968 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
20969
20970 * search.c (compute_access): Fix handling of anonymous union
20971 members.
20972 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
20973 from anonymous unions to their members.
20974
20975 * typeck.c (build_x_function_call): For static member functions,
20976 hand off to build_member_call.
20977
20978 Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
20979
20980 * typeck.c (build_component_ref): Handle OFFSET_REFs.
20981
20982 * init.c (expand_vec_init): Fix init == 0 case.
20983
20984 Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
20985
20986 * init.c (build_new): pedwarn about init and array new.
20987 (expand_vec_init): Handle lists, use convert_for_initialization.
20988
20989 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
20990 when converting to an aggregate type.
20991 * cvt.c (cp_convert): Pass it through.
20992
20993 * typeck.c (build_conditional_expr): Handle user-defined
20994 conversions to slightly different types.
20995
20996 * decl.c (grokdeclarator): Force an array type in a parm to be
20997 permanent.
20998
20999 * decl2.c (do_using_directive): Sorry.
21000 (do_namespace_alias): Likewise.
21001 * lex.c (real_yylex): Warn about using the `namespace' keyword.
21002
21003 Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
21004
21005 * parse.y (datadef): Move call to note_list_got_semicolon up.
21006
21007 Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
21008
21009 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
21010
21011 Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
21012
21013 * decl.c (cp_finish_decl): The exception regions have to be
21014 nested, not overlapping. We start the exception region for a
21015 decl, after it has been fully built, and all temporaries for it
21016 have been cleaned up.
21017
21018 Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
21019
21020 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
21021
21022 Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
21023
21024 * tree.def: Add RETURN_INIT.
21025 * pt.c (instantiate_decl): Handle RETURN_INIT.
21026 * decl.c (store_return_init): Handle minimal_parse_mode.
21027
21028 * tree.c (cp_build_type_variant): Just return an error_mark_node.
21029 * decl.c (make_typename_type): Don't try to get the file and line
21030 of an identifier.
21031 * typeck.c (comptypes): Handle TYPENAME_TYPE.
21032
21033 Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
21034
21035 * decl.c (poplevel): Make sure we clear out and restore old local
21036 non-VAR_DECL values by default when they go out of scope.
21037
21038 Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
21039
21040 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
21041 referring to addresses of variables and functions.
21042
21043 * error.c (dump_expr): Support SIZEOF_EXPR.
21044
21045 * init.c (do_friend): Use the return value of check_classfn.
21046
21047 * typeck.c (convert_arguments): Call complete_type.
21048
21049 * method.c (hack_identifier): After giving an error, set value to
21050 error_mark_node.
21051
21052 Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
21053
21054 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
21055 lossage for local classes.
21056 * cp-tree.h: Declare it.
21057 * decl.c (lookup_name_real): Evil, painful hack for local classes.
21058 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
21059 Use hack_decl_function_context.
21060 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
21061 (start_function): Use hack_decl_function_context.
21062 (finish_function): Likewise.
21063 * method.c (synthesize_method): Likewise.
21064 * lex.c (process_next_inline): Likewise.
21065 (do_pending_inlines): Likewise.
21066 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
21067 done with it.
21068
21069 Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
21070
21071 * sig.c (build_signature_pointer_or_reference_type): Align
21072 signature pointers/references on 8-byte boundaries so they can be
21073 grabbed 2 words at a time on a Sparc.
21074
21075 Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
21076
21077 * method.c (hack_identifier): Requiring a static chain is now a
21078 hard error.
21079 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
21080 functions.
21081
21082 Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
21083
21084 * init.c (build_offset_ref): Call complete_type.
21085
21086 * decl.c (pop_from_top_level): Always pop previous_class_type.
21087
21088 * parse.y: Handle multiple decls in a for-init-statement.
21089 * pt.c (tsubst_expr): Likewise.
21090
21091 * pt.c (tsubst): Use tsubst_expr for the second operand of an
21092 ARRAY_REF.
21093
21094 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
21095 (poplevel_class): Set it here.
21096 (pop_from_top_level): Pop it here if we're returning to class scope.
21097 * class.c (pushclass): Don't set it here.
21098
21099 * decl.c (maybe_push_to_top_level): Save current_template_parms,
21100 and clear it if !pseudo.
21101 (pop_from_top_level): Restore it.
21102
21103 * decl2.c (finish_file): Push the dummy each time we walk the list
21104 of vtables.
21105
21106 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
21107 something for CAST_EXPR.
21108
21109 Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
21110
21111 * cvt.c (cp_convert): Warn about implicit conversion of the
21112 address of a function to bool, as it is always true.
21113
21114 Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
21115
21116 * typeck.c (c_expand_return): Fix warning for local externs returned.
21117
21118 Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
21119
21120 * tree.c (mapcar): Propagate const and volatile properly.
21121
21122 * typeck.c (complete_type): Be sure to instantiate the
21123 MAIN_VARIANT of the type.
21124
21125 * method.c (synthesize_method): Class interface hackery does not
21126 apply to synthesized methods.
21127
21128 Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
21129
21130 * pt.c (comp_template_args): Use comptypes rather than just
21131 checking for TEMPLATE_TYPE_PARM equivalence.
21132
21133 * typeck.c (build_x_function_call): Call complete_type before
21134 checking TYPE_OVERLOADS_CALL_EXPR.
21135
21136 Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
21137
21138 * g++.c (main): Check also for new define ALT_LIBM.
21139
21140 Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
21141
21142 * pt.c (instantiate_class_template): If we don't have a pattern
21143 yet, that's OK.
21144 (coerce_template_parms): If we see a local class, bail.
21145
21146 * decl.c (grok_reference_init): Make sure there's a type before
21147 checking its code.
21148
21149 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
21150 (push_template_decl): Likewise.
21151
21152 * parse.y (named_class_head): Set
21153 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
21154
21155 * decl.c (xref_tag): Diagnose redeclaration of template
21156 type-parameter name.
21157
21158 * error.c (dump_type): Handle anonymous template type parms.
21159
21160 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
21161 TYPE_STUB_DECL.
21162 (coerce_template_parms): Likewise.
21163
21164 Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
21165
21166 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
21167 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
21168
21169 Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
21170
21171 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
21172 before trying to get its STUB_DECL.
21173 (coerce_template_parms): Likewise.
21174
21175 * parse.y (template_type_parm): If they didn't use 'class',
21176 pretend they did after giving an error.
21177
21178 * pt.c (coerce_template_parms): Diagnose use of local class.
21179
21180 * decl.c (grok_reference_init): Use instantiate_type.
21181
21182 * error.c (dump_expr): Handle TEMPLATE_DECLs.
21183
21184 * parse.y (named_class_head): Diagnose mismatching types and tags.
21185
21186 * decl.c (pushdecl): Type decls and class templates clash with
21187 artificial type decls, not hide them.
21188
21189 * decl.c (redeclaration_error_message): Diagnose redefinition of
21190 templates properly.
21191 (duplicate_decls): Diagnose disallowed overloads for template
21192 functions, too.
21193
21194 * decl.c (start_decl): Call complete_type before checking for a
21195 destructor.
21196
21197 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
21198
21199 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
21200
21201 Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
21202
21203 * decl.c (grok_op_properties): Don't check for operator++(int) in
21204 a template.
21205
21206 * tree.c (perm_manip): Return a copy of variable and function
21207 decls with external linkage.
21208
21209 * tree.def: Change some of the min tree codes to type "1".
21210 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
21211 * method.c (build_overload_int): Emit something arbitrary for
21212 anything but an INTEGER_CST if we're in a template.
21213
21214 * decl.c (cp_finish_decl): Call complete_type before deciding
21215 whether or not to lay out the decl.
21216
21217 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
21218
21219 Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
21220
21221 * typeck2.c (build_x_arrow): Call complete_type.
21222
21223 * pt.c (add_pending_template): Broken out.
21224 (lookup_template_class): If -fexternal-templates, call it for all
21225 the methods of implemented types.
21226 (instantiate_class_template): Instead of instantiating them here.
21227 (instantiate_decl): Handle -fexternal-templates earlier.
21228
21229 Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21230
21231 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
21232 memoized lookup stuff inside GATHER_STATISTICS.
21233
21234 Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
21235
21236 * decl.c (start_decl): Complain about array of incomplete type
21237 here.
21238 (grokdeclarator): Not here.
21239
21240 * parse.y (template_parm): Expand full_parm inline so we can set
21241 the rule's precedence.
21242
21243 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
21244 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
21245 * decl2.c (grokbitfield): Don't check for integer constant here.
21246 * class.c (finish_struct_1): Check here.
21247
21248 * decl.c (define_label): Make the min decl go on permanent_obstack.
21249
21250 * pt.c (unify): Don't handle CONST_DECLs.
21251 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
21252 (tsubst_copy): Likewise.
21253
21254 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
21255 CONST_DECL for a template parm.
21256
21257 Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
21258
21259 * decl.c (grokdeclarator): Complain about array of incomplete type
21260 here.
21261 (start_decl_1): Not here.
21262
21263 * pt.c (tsubst): Handle pointer-to-function declarators.
21264
21265 * method.c (hack_identifier): If pedantic, diagnose local class
21266 methods that require a static chain.
21267
21268 * decl.c (grok_op_properties): No longer static.
21269 * cp-tree.h: Declare it.
21270 * pt.c (tsubst): Call it for operators.
21271 Use tsubst_copy for TREE_VECs.
21272
21273 * parse.y (template_arg): The expr has precedence like '>'.
21274
21275 Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
21276
21277 * pt.c (coerce_template_parms): Don't coerce an expression using
21278 template parms.
21279 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
21280 (tsubst): Don't use build_index_2_type if the max_value uses template
21281 parms.
21282 * method.c (build_overload_int): Emit something arbitrary for an
21283 expression using template parms.
21284
21285 * parse.y (template_close_bracket): New non-terminal to catch use
21286 of '>>' instead of '> >' in template class names.
21287 (template_type): Use it.
21288 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
21289
21290 * tree.def: Add CAST_EXPR.
21291 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
21292 CONVERT_EXPR for minimal_parse_mode.
21293 * typeck.c (build_c_cast): Likewise.
21294 * pt.c (tsubst_copy): Likewise.
21295 * decl2.c (build_expr_from_tree): Likewise.
21296 * error.c (dump_expr): Likewise.
21297
21298 Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21299
21300 * except.c (SetTerminate, SetUnexpected): Put back global vars.
21301 (init_exception_processing): Put back decl/init of
21302 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
21303 fns from libstdc++.
21304
21305 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
21306 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
21307 Delete unused fns.
21308 * cp-tree.h (declare_uninstantiated_type_level,
21309 uninstantiated_type_level_p): Delete prototypes.
21310
21311 Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
21312
21313 * pt.c (tsubst_expr): Add default return.
21314
21315 Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21316
21317 * error.c (fndecl_as_string): Delete unused arg CNAME.
21318 * sig.c (build_signature_table_constructor,
21319 build_signature_method_call): Fix calls.
21320
21321 * class.c (the_null_vtable_entry): Delete var definition.
21322 (init_class_processing): Delete tree the_null_vtable_entry init.
21323 * decl.c (no_print_{functions, builtins}): Declare as static.
21324 (__tp_desc_type_node): #if 0 var definition.
21325 (init_type_desc): #if 0 init of __tp_desc_type_node.
21326 (vb_off_identifier): Move var decl into init_decl_processing.
21327 (current_function_assigns_this): Declare as static.
21328 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
21329 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
21330 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
21331 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
21332 * init.c (BI_header_type, BI_header_size): Declare as static.
21333 * pt.c (template_classes): Delete unused var.
21334 (add_pending_template): Delete decl for non-existent fn.
21335 (lookup_template_class): Delete vars CODE and TAG_CODE.
21336 (instantiate_template): Delete unused var TARGS.
21337 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
21338 Delete decls.
21339 (__tp_desc_type_node): #if 0 var decl.
21340 (fndecl_as_string): Fix prototype.
21341
21342 Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
21343
21344 * tree.def: Add GOTO_STMT.
21345 * pt.c (tsubst_expr): Support goto and labels.
21346 * decl.c (define_label): Support minimal parsing.
21347 * parse.y (simple_stmt): Likewise.
21348
21349 Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21350
21351 * xref.c (GNU_xref_member): Only define/set var I if
21352 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
21353 used.
21354 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
21355 (GNU_xref_end): Fix call.
21356 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
21357 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
21358
21359 * tree.c (build_exception_variant): Delete unused vars I, A, T,
21360 T2, and CNAME.
21361 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
21362 (mapcar): Delete unused var CODE.
21363 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
21364 (break_out_cleanups): Fix call.
21365 (bot_manip): Likewise.
21366 * call.c (build_method_call): Likewise.
21367 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
21368 Likewise.
21369 * typeck.c (unary_complex_lvalue, build_modify_expr,
21370 convert_for_initialization): Likewise.
21371 * typeck2.c (build_functional_cast): Likewise.
21372 * cp-tree.h (build_cplus_new): Fix prototype.
21373
21374 * repo.c (open_repo_file): Delete unused var Q.
21375 (repo_compile_flags, repo_template_declared,
21376 repo_template_defined, repo_class_defined, repo_inline_used,
21377 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
21378 (repo_get_id, repo_vtable_used): Declare as static.
21379 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
21380 prototypes.
21381
21382 Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
21383
21384 * parse.y (pending_inlines): Add function_try_block case.
21385
21386 * pt.c (unify): Fix for template const parms.
21387
21388 Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21389
21390 * lex.c (extract_interface_info): Delete forward decl.
21391 (default_copy_constructor_body, default_assign_ref_body): Delete
21392 decls for non-existent functions.
21393 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
21394 (init_lex): Delete setting them.
21395 (cons_up_default_function): Delete unused vars FUNC_BUF,
21396 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
21397 #if 0'd synth code.
21398 (toplevel, expression_obstack): Delete unused extern decls.
21399 (tree_node_kind): Delete unused enum.
21400 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
21401 GATHER_STATISTICS.
21402 (tree_node_kind_names): Delete unused extern decl.
21403 (synth_obstack): Delete unused var.
21404 (init_lex): Don't set it.
21405 (init_parse): Add decl before use.
21406 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
21407 (current_unit_{name, language}): Delete unused vars.
21408 (check_newline): Don't bother setting them, just accept the #pragma.
21409 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
21410 (current_unit_{name, language}): Delete decls.
21411
21412 * search.c: Wrap all of the memoized functions, macros, and
21413 variables inside #ifdef GATHER_STATISTICS.
21414 (lookup_field, lookup_fnfields): Likewise.
21415 (init_search_processing): Likewise.
21416 (reinit_search_statistics): Wrap whole function.
21417 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
21418
21419 * decl.c (finish_function): Only call pop_memoized_context if
21420 GATHER_STATISTICS is defined.
21421 (start_function): Likewise for push_memoized_context.
21422 * class.c (pushclass, popclass): Likewise.
21423
21424 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
21425 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
21426
21427 * cvt.c (cp_convert): Delete unused local var FORM.
21428 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
21429 prototypes.
21430
21431 Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
21432
21433 * pt.c (do_poplevel): Oops; really return what we get from
21434 poplevel this time.
21435
21436 Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21437
21438 * cp-tree.h (is_aggr_type): Add prototype.
21439
21440 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
21441 * method.c ({push,pop}_cp_function_context): Delete decls.
21442 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
21443 (SetUnexpected, SetTerminate): Delete unused vars.
21444 (init_exception_processing): Don't set SetUnexpected or
21445 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
21446 (output_exception_table_entry): Delete unused array LABEL.
21447 (expand_internal_throw): Delete unused var PARAMS.
21448 (expand_start_catch_block): Delete unused var CLEANUP.
21449 (emit_exception_table): Delete unused var EH_NODE_DECL.
21450 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
21451 GOTO_UNWIND_AND_THROW. Don't set them.
21452 (end_eh_unwinder): Add top decl.
21453 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
21454 (exception_section, push_rtl_perm, do_function_call,
21455 lang_interim_eh, push_eh_cleanup, eh_outer_context,
21456 expand_end_eh_spec, end_eh_unwinder): Declare as static.
21457 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
21458 throw_used): Likewise.
21459 * cp-tree.h (expand_end_eh_spec): Delete prototype.
21460
21461 * search.c (dfs_mark, dfs_mark_vtable_path,
21462 dfs_unmark_vtable_path, dfs_mark_new_vtable,
21463 dfs_unmark_new_vtable, dfs_clear_search_slot,
21464 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
21465 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
21466 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
21467 functions.
21468 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
21469 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
21470 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
21471 Only define #ifdef GATHER_STATISTICS.
21472 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
21473 is defined.
21474 (vbase_decl): Delete var definition.
21475 (init_search): Delete old decl.
21476 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
21477 never actually used.
21478 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
21479 (get_base_distance_recursive): Delete unused fourth arg
21480 BASETYPE_PATH. Fix call .
21481 (get_base_distance): Fix call.
21482 (push_class_decls): Delete unused var ID.
21483 (make_memoized_table_entry): Declare as static.
21484 (breadth_first_search): Declare as static.
21485 (tree_has_any_destructor_p): Declare as static.
21486 (pop_class_decls): Delete unused arg pop_class_decls.
21487 * class.c (popclass): Fix call to pop_class_decls.
21488 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
21489 tree_has_any_destructor_p): Delete prototypes.
21490
21491 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
21492 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
21493 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
21494 (build_user_desc): Delete unused var T.
21495 (build_class_desc): Delete unused vars T and OFF.
21496 (build_t_desc): Delete unused var NAME_STRING.
21497 (build_headof): Make static.
21498 (get_bad_cast_node): Likewise.
21499 (get_def_to_follow): Likewise.
21500 * cp-tree.h (init_type_desc): Add prototype.
21501 (build_headof): Remove prototype.
21502
21503 Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
21504
21505 * pt.c (tsubst): Only look for matching decls at file scope for
21506 non-member functions.
21507
21508 * call.c (build_scoped_method_call): Handle scoped destructor
21509 calls in templates.
21510
21511 * decl.c (*_top_level): Also save previous_class_values.
21512
21513 * pt.c (tsubst_expr): Support do {} while loops.
21514 * parse.y (simple_stmt): Likewise.
21515 * tree.def: Likewise.
21516
21517 * method.c (build_overload_identifier): For a class nested in a
21518 template class, don't mangle in the template parms from our
21519 context.
21520
21521 * lex.c, cp-tree.h: Remove support for template instantiations in
21522 the pending_inlines code.
21523 * pt.c: Remove dead functions and unused arguments.
21524 (uses_template_parms): TYPENAME_TYPEs always use template parms.
21525 * parse.y: Stop passing anything to end_template_decl.
21526 * tree.c (print_lang_statistics): Only print tinst info #ifdef
21527 GATHER_STATISTICS.
21528
21529 Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21530
21531 * init.c (expand_recursive_init{,_1}): Delete decls.
21532 (sort_member_init): Delete unused var INIT.
21533 (emit_base_init): Delete unused var X.
21534 (build_offset_ref): Delete unused var CNAME.
21535 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
21536 (emit_base_init): Delete unused local var BASE. Delete extern
21537 decl of IN_CHARGE_IDENTIFIER.
21538 (build_delete): Delete unused local var VIRTUAL_SIZE.
21539
21540 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
21541 (build_delete): Fix call.
21542 * decl2.c (delete_sanity): Likewise.
21543 * cp-tree.h (build_vec_delete): Update prototype.
21544
21545 * typeck.c (common_base_type): Delete unused var TMP.
21546 (build_binary_op): Delete local var ARGS_SAVE.
21547 (build_array_ref): Delete unused var ITYPE.
21548 (c_expand_return): Delete unused var USE_TEMP.
21549
21550 * typeck.c (compexcepttypes): Delete unused arg STRICT.
21551 (comptypes): Fix calls.
21552 * decl.c (duplicate_decls): Likewise.
21553 * cp-tree.h (compexcepttypes): Delete extra arg.
21554
21555 * decl2.c (check_classfn): Delete unused second arg CNAME.
21556 * decl.c (start_decl, grokfndecl): Fix calls.
21557 * init.c (do_friend): Likewise.
21558 * cp-tree.h (check_classfn): Update prototype.
21559
21560 * cp-tree.h (signature_error, import_export_vtable,
21561 append_signature_fields, id_in_current_class, mark_used,
21562 copy_assignment_arg_p): Add decls.
21563 * decl2.c (mark_used): Delete decl.
21564
21565 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
21566
21567 * class.c (get_vtable_entry): Disable unused function.
21568 (doing_hard_virtuals): Delete unused static global var.
21569 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
21570 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
21571 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
21572 (modify_one_vtable): Delete unused var OLD_RTTI.
21573 (finish_struct_anon): Delete unused vars OFFSET and X.
21574 (finish_struct_bits): Delete unused var METHOD_VEC.
21575 (get_basefndecls): Delete unused var PURPOSE. Delete unused
21576 for-scope local variable METHODS.
21577
21578 * call.c (user_harshness): Delete unused/unneeded arg PARM.
21579 (ideal_candidate): Delete unused args BASETYPE and PARMS.
21580 (build_method_call): Delete unused args passed into ideal_candidate.
21581 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
21582 * cp-tree.h (synthesize_method): Add decl.
21583
21584 * decl.c (note_level_for_for): Give void return type.
21585 (pushdecl_nonclass_level): Likewise.
21586 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
21587 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
21588 (suspend_binding_level): Delete unused var LEVEL.
21589 (duplicate_decls): Delete unused var CTYPE.
21590 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
21591 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
21592 PTR_ENDLINK.
21593 (grokdeclarator): Delete unused var C.
21594 (grokdeclarator): Delete unused var SIZE_VARIES.
21595 (grokparms): Delete unused var SAW_VOID.
21596 (start_function): Delete unused var OLDDECL.
21597 (cplus_expand_expr_stmt): Delete unused var
21598 REMOVE_IMPLICIT_IMMEDIATELY.
21599
21600 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
21601
21602 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
21603
21604 Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
21605
21606 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
21607 (build_min_nt): Likewise.
21608 * pt.c (do_pushlevel): Emit line note.
21609 (do_poplevel): Return what we get from poplevel.
21610 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
21611 * parse.y: Use do_pushlevel and do_poplevel.
21612 * cp-tree.h: Declare do_poplevel.
21613
21614 * cp-tree.h: Declare at_eof.
21615 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
21616 * decl2.c (import_export_decl): Renamed from import_export_inline.
21617 (finish_file): Call it to do interface handling for statics.
21618 * pt.c (tsubst_copy): Call mark_used on variables and functions
21619 used here.
21620
21621 * decl2.c (finish_file): Don't emit statics we can't generate.
21622 * pt.c (instantiate_decl): Don't set interface on instantiations
21623 we can't generate.
21624
21625 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
21626 * tree.c (print_lang_statistics): Print max template depth.
21627 * pt.c (push_tinst_level): Dump entire instantiation context.
21628 (instantiate_class_template): Use it and pop_tinst_level.
21629 (instantiate_decl): Likewise.
21630
21631 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
21632 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
21633
21634 Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
21635
21636 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
21637 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
21638 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
21639 the new template implementation.
21640
21641 Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21642
21643 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
21644
21645 Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
21646
21647 * decl.c (cp_finish_decl): Delay emitting the debug information for
21648 a typedef that has been installed as the canonical typedef, if the
21649 type has not yet been defined.
21650
21651 Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
21652
21653 * decl2.c (grokfield): Still call pop_nested_class for access decls.
21654
21655 Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21656
21657 * decl.c (lookup_label): Call label_rtx.
21658
21659 * decl.c (make_binding_level): New function.
21660 (pushlevel, pushlevel_class): Call it instead of explicit
21661 duplicate calls to xmalloc.
21662
21663 * decl.c (init_decl_processing): Delete useless build_pointer_type
21664 call.
21665
21666 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
21667 (sizet_ftype_string): Delete variable.
21668 (init_decl_processing): Add built-in functions fabsf, fabsl,
21669 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
21670 variable strlen_ftype, used for strlen.
21671
21672 Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
21673
21674 * decl.c (push_to_top_level): Start from current_binding_level
21675 again for now; the stl hacks depend on g++ being broken in this
21676 way, and it'll be fixed in the template rewrite.
21677
21678 * tree.def: Add USING_DECL.
21679 * decl2.c (do_class_using_decl): Implement.
21680 (grokfield): Pass access decls off to do_class_using_decl instead of
21681 grokdeclarator.
21682 * error.c (dump_decl): Handle USING_DECLs.
21683 * decl.c (grokdeclarator): Remove code for handling access decls.
21684 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
21685 as access decls for now.
21686 (finish_struct): Don't check USING_DECLs for other uses of the name.
21687
21688 * search.c (get_matching_virtual): Use cp_error_at.
21689
21690 Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21691
21692 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
21693 match c-typeck.c.
21694 (self_promoting_args_p): Move the check that TYPE is non-nil
21695 before trying to look at its main variant.
21696 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
21697
21698 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
21699 Delete macros.
21700 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
21701 (do_friend): Delete call to xref_friend.
21702 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
21703
21704 * typeck.c (convert_sequence): #if 0 unused function.
21705
21706 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
21707 be in decl_in_memory_p.
21708 (decl_in_memory_p): Delete decl.
21709 * expr.c (decl_in_memory_p): Delete fn.
21710 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
21711
21712 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
21713
21714 Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
21715
21716 * class.c (finish_struct_1): Check for a pure-specifier on a
21717 non-virtual function here.
21718
21719 * decl2.c (grok_function_init): Don't check whether the function
21720 is virtual here.
21721 (grokfield): Don't call check_for_override here.
21722
21723 * decl.c (push_to_top_level): Start from inner_binding_level,
21724 check class_shadowed in class levels.
21725
21726 Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
21727
21728 * decl.c (resume_level): Ignore things that don't have names, instead
21729 of core dumping.
21730
21731 Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21732
21733 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
21734
21735 Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
21736
21737 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
21738 synthesized dtor.
21739
21740 * parse.y (complete_type_name): Bind global_scope earlier.
21741 (complex_type_name): Likewise.
21742 (qualified_type_name): Remove.
21743
21744 Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
21745
21746 * decl.c (grokfndecl): Move code that looks for virtuals in base
21747 classes...
21748 * class.c (check_for_override): ... to a new function.
21749 (finish_struct_1): Call it.
21750
21751 * cp-tree.h: Declare warn_sign_compare.
21752
21753 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
21754 rather than extra_warnings to decide whether to warn about
21755 comparison of signed and unsigned.
21756
21757 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
21758 implies -Wsign-compare. -Wall doesn't imply -W.
21759
21760 Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
21761
21762 * typeck.c (build_component_ref): Fix to handle anon unions in base
21763 classes as well.
21764
21765 Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21766
21767 * class.c (resolves_to_fixed_type_p): Delete code dealing with
21768 a WITH_CLEANUP_EXPR, since we don't generate them any more.
21769 * cvt.c (build_up_reference): Likewise.
21770 * decl.c (grok_reference_init): Likewise.
21771 (cp_finish_decl): Likewise.
21772 * error.c (dump_expr): Likewise.
21773 * tree.c (real_lvalue_p): Likewise.
21774 (lvalue_p): Likewise.
21775 (build_cplus_new): Likewise.
21776 (unsave_expr_now): Likewise.
21777 * typeck.c (unary_complex_lvalue, build_modify_expr,
21778 c_expand_return): Likewise.
21779
21780 Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21781
21782 Make the C++ front-end pay attention to attributes for structures.
21783 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
21784 finish_struct_1.
21785 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
21786 Take out old round_up_size use and setting the DECL_ALIGN possibly
21787 using it. Take out setting of TYPE_ALIGN to round_up_size, which
21788 can override what the attribute set.
21789 * cp-tree.h (finish_struct): Update prototype.
21790 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
21791 attributes to finish_struct.
21792 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
21793 value down into finish_struct.
21794 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
21795
21796 Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
21797
21798 * decl.c (poplevel): Re-word dead for local handling.
21799 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
21800 (cp_finish_decl): If is_for_scope, check for duplicates so
21801 we can disable is_for_scope. Otherwise, preserve_temp_slots.
21802
21803 * lex.c (do_identifier): Use global binding in preference of
21804 dead for local variable.
21805
21806 Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
21807
21808 * init.c (initializing_context): Handle anon union changes, the
21809 context where fields of anon unions can be initialized now has to be
21810 found by walking up the TYPE_CONTEXT chain.
21811
21812 Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
21813
21814 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
21815 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
21816 (obscure_complex_init): If bss is supported, always set
21817 DECL_INITIAL to error_mark_node.
21818
21819 Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21820
21821 * init.c (is_friend): Make sure there's a context before we see if
21822 it's an aggr type.
21823
21824 Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
21825
21826 * init.c (is_friend): Classes are not friendly with nested classes.
21827
21828 Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
21829
21830 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
21831 and record its result.
21832
21833 Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
21834
21835 * class.c (finish_struct_anon): Switch around code to not move anon
21836 union elements around, nor mess up their contexts, nor offsets,
21837 instead we now build up the right number of COMPONENT_REFs for all
21838 the anon unions that may be present at build_component_ref time.
21839 * typeck.c (lookup_anon_field): New routine to handle field lookup
21840 on fields without names. We find them, based upon their unique type
21841 instead.
21842 * typeck.c (build_component_ref): Allow FIELD_DECL components.
21843 Handle finding components in anonymous unions, and ensure that a
21844 COMPONENT_REF is built for each level as necessary.
21845
21846 Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
21847
21848 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
21849 code that ensures that copy ctors are used if appropriate.
21850
21851 Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21852
21853 * init.c (build_vec_delete): Only give an error if base isn't an
21854 error_mark_node.
21855
21856 Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
21857
21858 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
21859 (yylex): If we see `new', keep slurping.
21860
21861 Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
21862
21863 * class.c (finish_struct_1): Move code for handling anon unions...
21864 (finish_struct_anon): to here. Fixup so that we do the offset
21865 calculations right, and so that the fields are physically moved to
21866 the containers's chain.
21867
21868 Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21869
21870 * decl.c (grokdeclarator): Avoid trying to get an operand off an
21871 identifier node.
21872
21873 Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
21874
21875 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
21876 POINTER_SIZE to agree with expr.c.
21877
21878 Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
21879
21880 * search.c (lookup_field): Don't report ambiguities if protect is 0,
21881 instead return NULL_TREE.
21882
21883 Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
21884
21885 * class.c (finish_struct_1): Call warn_hidden if we want warnings
21886 about overloaded virtual functions.
21887 (warn_hidden): New routine to warn of virtual functions that are
21888 hidden by other virtual functions, that are not overridden.
21889 (get_basefndecls): New routine, used by warn_hidden.
21890 (mark_overriders): New routine, used by warn_hidden.
21891 * search.c (get_matching_virtual): Remove old warning that just
21892 isn't very useful.
21893
21894 Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21895
21896 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
21897
21898 * typeck.c (null_ptr_cst_p): Delete unused fn.
21899 (build_function_call_maybe): Delete unused fn.
21900
21901 * expr.c (extract_init): #if 0 the code after unconditional return 0
21902 for now.
21903
21904 Delete old cadillac code.
21905 * edsel.c: Remove file.
21906 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
21907 * Makefile.in (CXX_OBJS): Delete edsel.o.
21908 (edsel.o): Delete rule.
21909 * cp-tree.h (flag_cadillac): Delete var decl.
21910 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
21911 * decl2.c (flag_cadillac): Delete var definition.
21912 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
21913 (grokfield): Delete code depending on flag_cadillac.
21914 (finish_anon_union): Likewise.
21915 * class.c (finish_struct_1): Likewise.
21916 (pushclass): Likewise.
21917 (popclass): Likewise.
21918 (push_lang_context): Likewise.
21919 (pop_lang_context): Likewise.
21920 * decl.c (init_decl_processing): Likewise.
21921 (start_decl): Likewise.
21922 (cp_finish_decl): Likewise.
21923 (xref_tag): Likewise.
21924 (finish_enum): Likewise.
21925 (start_function): Likewise.
21926 (finish_function): Likewise.
21927 (finish_stmt): Likewise.
21928 * lex.c (lang_init): Likewise.
21929 (check_newline): Likewise.
21930
21931 * lex.c (do_pending_inlines): Delete synthesized method kludge.
21932
21933 Delete defunct, ancient garbage collection implementation.
21934 * rtti.c: New file with the RTTI stuff from gc.c.
21935 * gc.c: Removed file (moved the remaining stuff into rtti.c).
21936 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
21937 (rtti.o): New rule, replacing gc.o.
21938 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
21939 * cp-tree.h: Delete gc-related fn decls.
21940 (DECL_GC_OFFSET): Delete macro.
21941 (flag_gc): Delete extern decl.
21942 * decl.c (current_function_obstack_index): Delete var decl.
21943 (current_function_obstack_usage): Delete var decl.
21944 (start_function): Delete clearing of current_function_obstack_index
21945 and current_function_obstack_usage.
21946 (init_decl_processing): Delete code relying on -fgc.
21947 Delete call to init_gc_processing.
21948 (cp_finish_decl): Delete calls to build_static_gc_entry and
21949 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
21950 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
21951 and to expand_expr of a __gc_main call.
21952 (maybe_gc_cleanup): Delete var decl.
21953 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
21954 * decl2.c (flag_gc): Delete var decl.
21955 (lang_f_options): Delete offering of -fgc.
21956 (lang_decode_option): Delete -fgc and -fno-gc handling.
21957 (get_temp_regvar): Delete gc code.
21958 * init.c (build_new): Delete gc code.
21959 * lex.c (init_lex): Delete checking of flag_gc.
21960
21961 * typeck.c (convert_arguments): Delete gc code.
21962 (build_component_addr): Delete -fgc warning.
21963 (build_modify_expr): Delete gc code.
21964
21965 * decl2.c (build_push_scope): Delete fn.
21966 * cp-tree.h (build_push_scope): Delete decl.
21967
21968 * search.c (clear_search_slots): Delete fn.
21969 * cp-tree.h (clear_search_slots): Delete decl.
21970
21971 * search.c (tree_needs_constructor_p): Delete fn.
21972 * cp-tree.h (tree_needs_constructor_p): Delete decl.
21973
21974 * tree.c (id_cmp): Delete fn.
21975
21976 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
21977 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
21978
21979 * tree.c (decl_value_member): Delete fn.
21980 * cp-tree.h (decl_value_member): Delete decl.
21981
21982 * tree.c (list_hash_lookup_or_cons): Delete fn.
21983 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
21984
21985 * method.c (cplus_exception_name): Delete fn.
21986 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
21987
21988 * spew.c (shift_tokens): Delete fn.
21989
21990 Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
21991
21992 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
21993 to cp_finish_decl.
21994 * parse.y: Likewise.
21995
21996 Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21997
21998 * tree.c (build_cplus_staticfn_type): Delete function definition;
21999 never used.
22000 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
22001
22002 * tree.c (virtual_member): Delete function definition; never used.
22003 * cp-tree.h (virtual_member): Delete decl.
22004
22005 Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
22006
22007 * typeck.c (build_component_ref): Handle getting vbase pointers
22008 out of complex multiple inheritance better.
22009
22010 Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
22011
22012 * typeck.c (build_object_ref): Make sure we use the real type, not
22013 any reference type.
22014
22015 Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
22016
22017 * tree.c (build_exception_variant): Don't create new types if we
22018 don't have to, also build new types on the right obstack.
22019
22020 Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
22021
22022 * decl.c (store_bindings): Split out from push_to_top_level.
22023 (push_to_top_level): Call it for b->type_shadowed on class binding
22024 levels.
22025
22026 Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
22027
22028 * search.c (expand_upcast_fixups): Fix so that offsets stored in
22029 vbase_offsets are always right. Fixes a problem where virtual base
22030 upcasting and downcasting could be wrong during conversions on this
22031 during virtual function dispatch at ctor/dtor time when dynamic
22032 vtable fixups for deltas are needed. This only sounds easier than
22033 it is. :-)
22034 (fixup_virtual_upcast_offsets): Change to reflect new calling
22035 convention for expand_upcast_fixups.
22036
22037 Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22038
22039 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
22040 check that it's usable as the bitfield width.
22041
22042 Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22043
22044 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
22045 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
22046 only ever used for functions in it.
22047
22048 Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
22049
22050 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
22051 (nested_type): Likewise.
22052 (nested_name_specifier): Use lastiddecl.
22053
22054 * decl.c (grokdeclarator): Adjust accordingly.
22055 * init.c (expand_member_init): Likewise.
22056 * parse.y (base_class): Likewise.
22057 * typeck2.c (build_functional_cast): Likewise.
22058
22059 * typeck2.c (build_functional_cast): Fill in name after we've
22060 checked for non-aggr type.
22061
22062 Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
22063
22064 * decl2.c (warn_pointer_arith): Default to on.
22065
22066 Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
22067
22068 * lex.c (is_rid): New function.
22069 * decl.c (grokdeclarator): Diagnose reserved words used as
22070 declarator-ids.
22071
22072 Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
22073
22074 * tree.c (get_decl_list): Don't lose cv-quals.
22075
22076 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
22077 typespecs used as declarator-ids.
22078
22079 Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
22080
22081 * decl.c (poplevel): When poping a level, don't give a warning for
22082 any subblocks that already exist.
22083
22084 Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
22085
22086 * typeck.c (build_object_ref): Finish what I started.
22087
22088 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
22089
22090 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
22091
22092 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
22093 scope.
22094
22095 Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
22096
22097 * decl.c (xref_tag): Handle passing a type in directly.
22098
22099 * parse.y (qualified_type_name): Pull out the type.
22100 (nested_type): Likewise.
22101 Take types directly instead of as identifiers.
22102 * call.c (build_scoped_method_call): Take types directly instead of
22103 as identifiers.
22104 * decl.c (xref_basetypes): Likewise.
22105 * init.c (expand_member_init): Likewise.
22106 (build_member_call): Likewise.
22107 (build_offset_ref): Likewise.
22108 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
22109 * method.c (do_build_assign_ref): Likewise.
22110 * decl.c (grokdeclarator): Handle a type appearing as the
22111 declarator-id for constructors.
22112 * method.c (do_build_copy_constructor): current_base_init_list now
22113 uses the types directly, not their names.
22114 * init.c (sort_base_init): Likewise.
22115 (expand_member_init): Likewise.
22116 * init.c (is_aggr_type): New function, like is_aggr_typedef.
22117
22118 Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
22119
22120 * tree.c (layout_basetypes): Call build_lang_field_decl instead
22121 of build_lang_decl if first arg is a FIELD_DECL.
22122
22123 Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22124
22125 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
22126 non-empty.
22127 * except.c (expand_start_catch_block): Set TREE_USED to avoid
22128 warnings about the catch handler.
22129
22130 Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
22131
22132 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
22133 expand_target_expr.
22134
22135 Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22136
22137 Fix access control to use trees rather than integers.
22138 * class.c (access_{default, public, protected, private,
22139 default_virtual, public_virtual, private_virtual}_node): Add
22140 definitions.
22141 (init_class_processing): Do creation of those nodes.
22142 * cp-tree.h (access_type): Delete enum decl.
22143 (access_{default, public, protected, private, default_virtual,
22144 public_virtual, private_virtual}_node): Add decls.
22145 (compute_access): Change return type.
22146 * search.c (compute_access): Have tree return type, instead of enum.
22147 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
22148 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
22149 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
22150 * parse.y (VISSPEC): Make ttype rather than itype.
22151 (base_class_access_list): Likewise.
22152 * *.[cy]: Change all refs of `access_public' to `access_public_node',
22153 etc.
22154 * call.c (build_method_call): Make ACCESS be a tree.
22155 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
22156 * cvt.c (convert_to_aggr): Likewise.
22157 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
22158 Likewise.
22159 * method.c (hack_identifier): Likewise.
22160 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
22161
22162 Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
22163
22164 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
22165 frontend, and make it more consistent with respect to
22166 warn_pointer_arith.
22167
22168 Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
22169
22170 * decl.c (pushdecl): Check for duplicate parameter names.
22171
22172 Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
22173
22174 * decl.c (expand_static_init): Call assemble_external for atexit.
22175
22176 Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
22177
22178 * except.c (do_unwind): Remove some generated dead code.
22179 (eh_outer_context): New routine, factor out some common code from
22180 expand_builtin_throw and end_eh_unwinder. Add code to do return
22181 address masking for the PA.
22182 (expand_builtin_throw): Use eh_outer_context instead of open coding
22183 it here.
22184 (end_eh_unwinder): Likewise.
22185
22186 Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
22187
22188 * except.c (expand_throw): Call assemble_external for __empty, if we
22189 use it.
22190
22191 Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
22192
22193 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
22194 NORMAL_RETURN_ADDR_OFFSET.
22195 (end_eh_unwinder): Likewise.
22196
22197 Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
22198
22199 * gc.c (build_dynamic_cast): Make sure we don't cast away const
22200 when dealing with references, and make sure we handle dynamic
22201 casting to a cv qualified reference.
22202
22203 Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
22204
22205 * except.c (struct eh_context): New structure top hold eh context
22206 information.
22207 (push_eh_context): New routine.
22208 (pop_eh_context): Likewise.
22209 * decl.c (push_cp_function_context): Use them.
22210 (pop_cp_function_context): Likewise.
22211
22212 Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
22213
22214 * decl2.c (finish_file): Also prune uninteresting functions in the
22215 inline emission loop.
22216
22217 Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
22218
22219 * sig.c (build_signature_table_constructor): Mark functions
22220 in the signature as referenced.
22221
22222 Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
22223
22224 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
22225 the inline emission stuff.
22226
22227 Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
22228
22229 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
22230 weak symbols.
22231 * lang-options.h: Add -f{no-,}weak.
22232 * decl.c (init_decl_processing): If the target does not support weak
22233 symbols, don't use them.
22234 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
22235
22236 Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
22237
22238 * init.c (expand_member_init): warning for base init after members.
22239
22240 Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
22241
22242 * cvt.c (build_expr_type_conversion): Don't convert to a reference
22243 type.
22244
22245 Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
22246
22247 * method.c (report_type_mismatch): Improve wording for volatile
22248 mismatches.
22249
22250 Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
22251
22252 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
22253 expand_assignment, as the later doesn't handle things that have
22254 copy constructors well. The compiler would do bitwise copying,
22255 instead of ctor calling in some cases.
22256
22257 Wed Dec 13 17:05:54 1995 Paul Eggert <eggert@twinsun.com>
22258
22259 * g++.c (my_strerror): Return "cannot access" if errno is 0.
22260 (pfatal_with_name, perror_exec): Don't assume that
22261 the returned value from my_strerror contains no '%'s.
22262 (concat): Remove.
22263 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
22264
22265 Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
22266
22267 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
22268 TYPE_METHODS/TREE_CHAIN mean what they used to.
22269 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
22270 instead of TYPE_METHODS.
22271 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
22272 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
22273 * cp-tree.h (CLASSTYPE_METHODS): Lose.
22274 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
22275 TYPE_METHODS.
22276 (struct lang_decl): Lose next_method field.
22277 (DECL_NEXT_METHOD): Lose.
22278 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
22279 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
22280 anymore.
22281 (finish_struct_methods): Don't mess with the TREE_CHAINs in
22282 fn_fields.
22283
22284 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
22285 vector.
22286
22287 * call.c (build_method_call): Synthesize here even when not inlining.
22288 * typeck.c (build_function_call_real): Likewise.
22289
22290 Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
22291
22292 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
22293 == DBX_DEBUG, call dbxout_start_new_source_file and
22294 dbxout_resume_previous_source_file when appropriate.
22295
22296 Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
22297
22298 * except.c (start_anon_func): Push to the top level.
22299 (end_anon_func): Pop from the top level.
22300
22301 Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
22302
22303 * cp-tree.h (build_cleanup): New routine to build cleanups.
22304 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
22305 call at ctor time and use atexit to run it later.
22306 * decl2.c (build_cleanup): New routine, taken from finish_file.
22307 (finish_file): Use build_cleanup instead, and don't put function
22308 local statics in global dtor list.
22309
22310 Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
22311
22312 * except.c (expand_throw): Ensure that we have cleanups, if we try
22313 and expand cleanups.
22314
22315 Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
22316
22317 * except.c (expand_throw): Add logic to manage dynamic cleanups for
22318 the EH object.
22319 (expand_end_catch_block): Use the magic of expand_goto, instead of
22320 emit_jump so that we get the cleanup for any catch clause parameter
22321 and the cleanup for the exception object. Update to reflect label
22322 changes.
22323 (push_eh_cleanup): New routine to register a cleanup for an
22324 exception object.
22325 (empty_fndecl): Used to default cleanup actions to
22326 nothing.
22327 (init_exception_processing): Setup empty_fndecl. Setup
22328 saved_cleanup.
22329 (expand_start_catch_block): Update to reflect label changes. Call
22330 push_eh_object to register the cleanup for the EH object.
22331 (start_anon_func): New routine to start building lambda expressions
22332 from trees.
22333 (end_anon_func): New routine to end them.
22334 (struct labelNode): Change so that we can use tree labels, or rtx
22335 labels.
22336 (saved_cleanup): Object to check for dynamic cleanups for the
22337 exception handling object.
22338 (push_label_entry): Change so that we can use tree labels, or rtx
22339 labels.
22340 (pop_label_entry): Likewise.
22341 (top_label_entry): Likewise.
22342 (expand_start_all_catch): Use tree label instead of rtx label, so
22343 that we can get the magic of expand_goto.
22344 (expand_end_all_catch): Update to reflect label changes.
22345
22346 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
22347 use UNSAVE_EXPRs.
22348 * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
22349 building_cleanup logic, as we now use UNSAVE_EXPRs.
22350 * cp-tree.h (unsave_expr): Declare it.
22351 * decl.c (building_cleanup): Remove.
22352 (maybe_build_cleanup): Remove building_cleanup logic, and use
22353 UNSAVE_EXPR instead.
22354
22355 Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
22356
22357 * gc.c (build_t_desc): Update error message to say <typeinfo>.
22358
22359 Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
22360
22361 * decl.c (pushdecl): Only warn about shadowing a local variable if
22362 warn_shadow is true.
22363
22364 Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
22365
22366 * typeck.c (build_binary_op_nodefault): Added warning about
22367 comparisons between different enum types with -Wall, unless
22368 -fenum-int-equiv set.
22369
22370 Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
22371
22372 * class.c (finish_struct_1): Skip down to the inner type in
22373 multidimensional arrays. Ensures ctors will be made for types that
22374 need constructing.
22375
22376 Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
22377
22378 * decl.c (last_dtor_insn): New to track the last compiler generated
22379 insn in a dtor.
22380 (store_parm_decls): Set it.
22381 (finish_function): Use it to see if the dtor is empty. Avoid doing
22382 vtable setup all the time, if we can.
22383 (struct cp_function): Add last_dtor_insn.
22384 (push_cp_function_context): Save it.
22385 (pop_cp_function_context): Restore it.
22386
22387 Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
22388
22389 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
22390 warnings.
22391
22392 Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
22393
22394 * typeck.c (expand_target_expr): Make sure targets get put into the
22395 current temp_slot_level, so that the free_temp_slots call will reuse
22396 them.
22397
22398 Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
22399
22400 * class.c (finish_struct_1): Delay delta fixups for virtual bases
22401 until after we have done the hard virtuals, to avoid a bogus `every
22402 virtual function must have a unique final overrider' for virtual
22403 functions that are only overridden by hard virtuals.
22404
22405 Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
22406
22407 * pt.c (do_function_instantiation): Don't try to find a file-scope
22408 template for a member function.
22409
22410 Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
22411
22412 * g++.c (main): Add handling of -nodefaultlibs.
22413
22414 Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
22415
22416 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
22417 distinguish between direct bindings of reference variables, and
22418 indirect bindings of reference variables.
22419 * cvt.c (build_up_reference): Use it.
22420 * typeck.c (convert_arguments): Use it to indicate this is an
22421 indirect binding.
22422 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
22423 as they are unused.
22424 (expand_static_init): Likewise.
22425 (cplus_expand_expr_stmt): Likewise.
22426 * decl2.c (finish_file): Likewise.
22427 * init.c (perform_member_init): Likewise.
22428 (emit_base_init): Likewise.
22429 (expand_aggr_vbase_init_1): Likewise.
22430
22431 Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
22432
22433 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
22434 get a DECL_LANG_SPECIFIC node.
22435 * cp-tree.h (lang_decl_flags): Add new member `level'.
22436 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
22437 decl_flags level member.
22438
22439 Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
22440
22441 * call.c (build_method_call): Make sure instance has a
22442 TYPE_LANG_SPECIFIC node before we dive into it.
22443
22444 Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
22445
22446 * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
22447
22448 Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
22449
22450 * decl.c (duplicate_decls): When smashing decls, smash staticness in
22451 the usual way.
22452
22453 Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
22454
22455 * decl.c (poplevel): Handle the merging of subblocks of cleanups
22456 when finishing blocks that have already been created (usually due to
22457 the fixup goto code). Fixes bad debugging information.
22458
22459 Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
22460
22461 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
22462 that's not a list of overloaded functions.
22463
22464 Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
22465
22466 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
22467 before trying to use DECL_ABSTRACT_VIRTUAL_P.
22468
22469 Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
22470
22471 * decl2.c (mark_used): New function for hooking into setting of
22472 TREE_USED on decls.
22473 * call.c (build_method_call): Use it.
22474 * class.c (instantiate_type): Likewise.
22475 * init.c (build_offset_ref): Likewise. Don't call assemble_external
22476 for all like-named functions.
22477 * method.c (hack_identifier): Likewise.
22478 (emit_thunk): Don't call assemble_external.
22479 (make_thunk): Create thunk as a FUNCTION_DECL so that it
22480 gets the right mode and ENCODE_SECTION_INFO works.
22481
22482 * parse.y: Use mark_used. Pass operator names to do_identifier.
22483 * lex.c (do_identifier): Handle operator names.
22484
22485 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
22486
22487 Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
22488
22489 * errfn.c: Include stdio.h.
22490 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
22491
22492 Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
22493
22494 * typeck2.c (digest_init): Always convert initializers to the
22495 right type.
22496
22497 Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
22498
22499 * init.c (member_init_ok_or_else): Don't allow member initializers
22500 for indirect members, as it is invalid.
22501
22502 Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
22503
22504 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
22505
22506 Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
22507
22508 * parse.y (for.init.statement): Catch compound statements inside for
22509 initializations, if we're being pedantic.
22510
22511 Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
22512
22513 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
22514 looking for.
22515
22516 Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
22517
22518 * error.c (dump_expr): Don't core dump when a boolean expression is
22519 used as a default argument.
22520
22521 Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
22522
22523 * class.c (finish_struct_bits): Check aggregate_value_p instead of
22524 RETURN_IN_MEMORY.
22525
22526 Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
22527
22528 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
22529 BLKmode type that would otherwise be returned in registers.
22530
22531 Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
22532
22533 * g++.c (WITHLIBC): New macro.
22534 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
22535 saw_libc and pass it at the end if it was set.
22536
22537 Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
22538
22539 * parse.y (fn.def1): Call split_specs_attrs in
22540 declmods notype_declarator case.
This page took 1.116876 seconds and 5 git commands to generate.