decl2.c (maybe_retrofit_in_chrg): Don't create in-charge parameters for template...
[gcc.git] / gcc / cp / ChangeLog
1 2000-05-23 Mark Mitchell <mark@codesourcery.com>
2
3 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
4 parameters for template functions.
5 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
6 destructors as well as constructors.
7
8 2000-05-22 Mark Mitchell <mark@codesourcery.com>
9
10 * class.c (build_ctor_vtbl_group): Set inits.
11 * optimize.c (maybe_clone_body): Set DECL_INLINE and
12 DECL_THIS_INLINE appropriately for clones.
13
14 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
15 (DECL_CONV_FN_P): Simplify.
16 (DECL_OPERATOR): Remove.
17 (language_to_string): Declare.
18 * decl.c (duplicate_decls): Fix typo in comment.
19 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
20 (grok_op_properties): Use DECL_CONV_FN_P instead of
21 IDENTIFIER_TYPENAME_P.
22 * dump.c (dequeue_and_dump): Dump the language linkage of
23 declarations.
24 * error.c (language_to_string): Give it external linkage.
25 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
26 (implicitly_declare_fn): Set DECL_LANGUAGE.
27 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
28 IDENTIFIER_TYPENAME_P.
29 (tsubst_decl): Likewise.
30 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
31 * semantics.c (finish_member_declaration): Don't mark members of
32 classes declared in an extern "C" region as extern "C".
33
34 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
35
36 * decl2.c (qualified_lookup_using_namespace): Look through
37 namespace aliases.
38
39 * decl.c (push_using_decl): Return the old decl on namespace level.
40
41 2000-05-21 Mark Mitchell <mark@codesourcery.com>
42
43 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
44 (VTT_NAME_PREFIX): New macro.
45 (CTOR_VTBL_NAME_PREFIX): Likewise.
46 (get_ctor_vtbl_name): New function.
47 * class.c (get_vtable_name): Simplify.
48 (get_vtt_name): New function.
49 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
50 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
51 when a virtual base becomes primary.
52 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
53 VTTs.
54 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
55 additional parameters.
56 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
57 (initialize_array): New function.
58 (build_vtt): Likewise.
59 (build_vtt_inits): Likewise.
60 (dfs_build_vtt_inits): Likewise.
61 (dfs_fixup_binfo_vtbls): Likewise.
62 (build_ctor_vtbl_group): Likewise.
63 (initialize_vtable): Use initialize_array.
64 (accumulate_vtbl_inits): Reimplement to handle construction
65 vtables.
66 (dfs_accumulate_vtbl_inits): Likewise.
67 (bulid_vtbl_initializer): Adjust parameter name.
68 * method.c (build_typename_overload): Remove #if 0'd code.
69 (get_ctor_vtbl_name): New function.
70 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
71 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
72
73 * cp-tree.h (struct lang_type): Remove search_slot.
74 (CLASSTYPE_SEARCH_SLOT): Remove.
75 (emit_base_init): Change prototype.
76 (initialize_vtbl_ptrs): Likewise.
77 (expand_indirect_vtbls_init): Likewise.
78 (clear_search_slots): Remove.
79 * decl.c (lang_mark_tree): Don't mark search_slot.
80 * init.c (initialize_vtbl_ptrs): Simplify.
81 (emit_base_init): Likewise.
82 * search.c (struct vbase_info): Document decl_ptr.
83 (convert_pointer_to_single_level): Remove.
84 (dfs_find_vbases): Remove.
85 (dfs_init_base_pointers): Simplify.
86 (dfs_clear_vbase_slots): Remove.
87 (dfs_vtable_path_unmark): New function.
88 (init_vbase_pointers): Simplify.
89 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
90 (expand_indirect_vtbls_init): Simplify. Don't call
91 mark_all_temps_used.
92 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
93 initialize_vtbl_ptrs.
94
95 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
96
97 * except.c: Add static prototypes.
98
99 2000-05-20 H.J. Lu <hjl@gnu.org>
100
101 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
102
103 2000-05-19 Mark Mitchell <mark@codesourcery.com>
104
105 Don't create a separate copy of virtual bases for the
106 CLASSTYPE_VBASECLASSES list.
107 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
108 (BINFO_FOR_VBASE): Remove.
109 (CANONICAL_BINFO): Adjust.
110 (binfo_for_vbase): New function.
111 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
112 instead of BINFO_FOR_VBASE.
113 (build_vbase_pointer): Likewise.
114 (build_secondary_vtable): Likewise.
115 (dfs_mark_primary_bases): Likewise.
116 (mark_primary_bases): Likewise.
117 (layout_nonempty_base_or_field): Likewise.
118 (dfs_set_offset_for_shared_vbases): Likewise.
119 (dfs_set_offset_for_unshared_vbases): Likewise.
120 (layout_virtual_bases): Likewise. Adjust for changes to the
121 CLASSTYPE_VBASECLASSES list.
122 (dump_class_hierarchy_r): Use binfo_for_vbase
123 instead of BINFO_FOR_VBASE.
124 (dump_class_hierarchy): Likewise.
125 (finish_vtbls): Likewise.
126 (build_vtbl_initializer): Adjust for changes to the
127 CLASSTYPE_VBASECLASSES list.
128 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
129 * decl.c (finish_destructor_body): Adjust for changes to the
130 CLASSTYPE_VBASECLASSES list.
131 * init.c (sort_base_init): Use binfo_for_vbase.
132 (construct_virtual_bases): Adjust for changes to the
133 CLASSTYPE_VBASECLASSES list.
134 (expand_member_init): Use binfo_for_vbase.
135 (build_vbase_delete): Adjust for changes to the
136 CLASSTYPE_VBASECLASSES list.
137 * method.c (do_build_copy_constructor): Likewise.
138 * rtti.c (get_base_offset): Use binfo_for_vbase.
139 (expand_class_desc): Remove #if 0'd code.
140 * search.c (struct vbase_info): Remove vbase_types.
141 (get_base_distance): Use binfo_for_vbase.
142 (lookup_field_queue_p): Use CANONICAL_BINFO.
143 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
144 (get_pure_virtuals): Adjust for changes to the
145 CLASSTYPE_VBASECLASSES list.
146 (dfs_find_vbases): Use binfo_for_vbase.
147 (dfs_init_vbase_pointers): Likewise.
148 (init_vbase_pointers): Don't initialize vi.vbase_types.
149 (virtual_context): Use binfo_for_vbase.
150 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
151 CLASSTYPE_VBASECLASSES list.
152 (expand_indirect_vtbls_init): Simplify.
153 (dfs_get_vbase_types): Don't replicate virtual bases.
154 (find_vbase_instance): Use binfo_for_vbase.
155 (binfo_for_vbase): New function.
156 * typeck.c (get_delta_difference): Use binfo_for_vbase.
157
158 2000-05-17 Mark Mitchell <mark@codesourcery.com>
159
160 * decl2.c (finish_anon_union): Generalize error messages to handle
161 anonymous structures.
162 * init.c (perform_member_init): Remove `name' parameter.
163 (build_field_list): New function.
164 (sort_member_init): Handle anonymous union initialization order
165 correctly. Check for multiple initializations of the same union.
166 (emit_base_init): Don't look up fields by name here.
167 (expand_member_init): Record the result of name lookup for future
168 reference.
169 * typeck.c (build_component_ref): Fix formatting.
170
171 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
172
173 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
174 * typeck.c (build_x_compound_expr): Replace warn_unused with
175 warn_unused_value.
176
177 * decl2.c (lang_decode_option): Update -Wall unused flags by
178 calling set_Wunused.
179
180 2000-05-16 Mark Mitchell <mark@codesourcery.com>
181
182 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
183 * init.c (dfs_vtable_path_unmark): Remove.
184 * search.c (marked_new_vtable_p): Likewise.
185 (unmarked_new_vtable_p): Likewise.
186 (dfs_search_slot_nonempty_p): Likewise.
187 (dfs_mark): Likewise.
188 (dfs_vtable_path_unmark): Likewise.
189 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
190 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
191 (dfs_init_vbase_pointers): Remove special-case new ABI code.
192 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
193 (init_vbase_pointers): Simplify.
194 (expand_indirect_vtbls_init): Likewise.
195
196 * class.c (copy_virtuals): New function.
197 (build_primary_table): Use it.
198 (build_secondary_vtable): Likewise.
199 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
200 indicate that no vcall offset is required.
201 (add_virtual_function): Likewise.
202 (modify_all_vtables): Likewise.
203 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
204 (dfs_accumulate_vtbl_inits): Likewise.
205 (build_vtbl_initializer): Make changes to handle construction
206 vtables.
207 (dfs_build_vcall_offset_vtbl_entries): Likewise.
208 (build_rtti_vtbl_entries): Likewise.
209 (build_vtable_entries): Handle a NULL vcall_index.
210
211 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
212
213 * decl2.c (lang_decode_option): Fix thinko.
214
215 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
216
217 * except.c (check_handlers): New fn.
218 * cp-tree.h: Declare it.
219 * semantics.c (finish_handler_sequence): Call it.
220 (finish_function_handler_sequence): Likewise.
221 (finish_handler_parms): Set TREE_TYPE on the handler.
222 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
223 * search.c (get_base_distance_recursive): If protect>1, ignore
224 special access.
225 (get_base_distance): Don't reduce watch_access.
226
227 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
228
229 * lex.c: #include diagnostic.h.
230 (lang_init_options): Set default prefixing rules.
231
232 * lang-options.h: Add -fdiagnostics-show-location=.
233
234 * decl2.c: #include diagnostic.h.
235 (lang_decode_option): Handle -fdiagnostics-show-location=.
236
237 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
238
239 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
240 * vec.cc: Revert my 2000-05-07 change.
241
242 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
243
244 * class.c (check_field_decls): Complain about non-static data
245 members with same name as class in class with constructor.
246
247 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
248
249 * decl.c (grokdeclarator): Allow non-static data members with
250 same name as class.
251
252 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
253
254 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
255 and pending_inline.filename. Update prototypes.
256 * decl.c (define_label): Constify filename parameter.
257 * decl2.c (warn_if_unknown_interface): Constify local char *.
258 * input.c Constify input_source.filename. Don't declare
259 input_filename or lineno. Constify filename parameter to feed_input.
260 * lex.c (init_parse): Constify parameter and return value.
261 (cp_pragma_interface, cp_pragma_implementation): Constify
262 filename argument.
263 (reinit_parse_for_method, reinit_parse_for_block,
264 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
265 Constify local char *.
266 * pt.c: Don't declare lineno or input_filename.
267 (print_template_context, tsubst_friend_function, tsubst_decl,
268 tsubst, instantiate_decl): Constify local char *.
269 * semantics.c (expand_body): Constify local char *.
270 * tree.c (build_srcloc): Constify filename parameter.
271 * typeck.c (c_expand_asm_operands): Constify filename
272 parameter.
273
274 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
275
276 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
277 offsetof expansion.
278
279 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
280
281 * inc/cxxabi.h: Fix typos in comment.
282 (__base_class_info::__offset): Use a static_cast.
283
284 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
285
286 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
287 of std::size_t and std::ptrdiff_t respectively.
288 * tinfo.cc: Likewise.
289 * vec.cc: Likewise.
290
291 2000-05-06 Richard Henderson <rth@cygnus.com>
292
293 * typeck.c (build_c_cast): Don't warn integer->pointer size
294 mismatch for constants.
295
296 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
297
298 * rtti.c (ptmd_initializer): Set non-public, if class is
299 incomplete.
300
301 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
302 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
303 __cxa_vec_delete): Likewise.
304 * tinfo.cc (__dynamic_cast): Likewise.
305 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
306 __cxa_vec_delete): Likewise.
307
308 2000-05-04 Mark Mitchell <mark@codesourcery.com>
309
310 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
311 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
312 (lang_decl_flags): Add vcall_offset.
313 (THUNK_VCALL_OFFSET): Use it.
314 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
315 * method.c (make_thunk): Create the lang_decl here, not in
316 emit_thunk.
317 (emit_thunk): Make generic thunks into ordinary functions once
318 they have been fed to expand_body.
319 * semantics.c (expand_body): Set current_function_is_thunk here.
320
321 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
322
323 * class.c (update_vtable_entry_for_fn): Prototype.
324
325 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
326 and `tmpl'.
327
328 * search.c (dfs_build_inheritance_graph_order): Prototype.
329
330 2000-05-04 Mark Mitchell <mark@codesourcery.com>
331
332 * cp-tree.h (special_function_kind): Add various kinds of
333 destructors.
334 (special_function_p): New function.
335 * class.c (overrides): Don't let one kind of destructor override
336 another.
337 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
338 whether or not to instantiate a template.
339 * tree.c (special_function_p): Define.
340
341 2000-05-03 Mark Mitchell <mark@codesourcery.com>
342
343 * cp-tree.def (THUNK_DECL): Remove.
344 * cp-tree.h (DECL_THUNK_P): New macro.
345 (DECL_NON_THUNK_FUNCTION_P): Likewise.
346 (DECL_EXTERN_C_FUNCTION_P): Likewise.
347 (SET_DECL_THUNK_P): Likewise.
348 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
349 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
350 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
351 * decl.c (decls_match): Use DECL_EXTERN_C_P.
352 (duplicate_decls): Likewise.
353 (pushdecl): Likewise. Adjust thunk handling.
354 (grokfndecl): Use DECL_EXTERN_C_P.
355 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
356 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
357 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
358 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
359 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
360 DECL_NO_STATIC_CHAIN.
361 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
362 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
363 * search.c (covariant_return_p): Remove THUNK_DECL handling.
364 * ir.texi: Update.
365
366 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
367
368 * tree.c (walk_tree): Set lineno.
369
370 2000-05-01 Mark Mitchell <mark@codesourcery.com>
371
372 * exception.cc: Update license notice.
373 * new.cc: Likewise.
374 * new1.cc: Likewise.
375 * new2.cc: Likewise.
376 * tinfo.cc: Likewise.
377 * tinfo2.cc: Likewise.
378 * vec.cc: Likewise.
379 * inc/cxxabi.h: Likewise.
380 * inc/exception: Likewise.
381 * inc/new: Likewise.
382 * inc/new.h: Likewise.
383 * inc/typeinfo: Likewise.
384
385 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
386
387 * tree.c (build_target_expr_with_type): If we already have a
388 TARGET_EXPR, just return it.
389
390 * optimize.c (initialize_inlined_parameters): Don't generate an
391 EXPR_STMT if we can just use DECL_INITIAL.
392 * decl.c (emit_local_var): Only make the initialization a
393 full-expression if stmts_are_full_exprs_p.
394
395 2000-05-01 Mark Mitchell <mark@codesourcery.com>
396
397 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
398 macro.
399 * call.c (standard_conversion): Use it.
400 (direct_reference_binding): Likewise.
401 (build_over_call): Likewise.
402 (is_properly_derived_from): Likewise.
403 (compare_ics): Likewise.
404 * class.c (resolves_to_fixed_type_p): Likewise.
405 * optimize.c (declare_return_variable): Likewise.
406 * pt.c (is_specialization_of): Likewise.
407 (unify): Likewise.
408 * typeck.c (comp_target_parms): Likeiwse.
409 (build_static_cast): Likewise.
410 (build_reinterpret_cast): Likewise.
411 (build_const_cast): Likewise.
412 (comp_ptr_ttypes_real): Likewise.
413 (comp_ptr_ttypes_const): Likewise.
414 * typeck2.c (process_init_constructor): Likewise.
415
416 2000-04-30 Scott Snyder <snyder@fnal.gov>
417
418 * decl.c (finish_destructor_body): Use the base destructor when
419 destroying virtual bases.
420
421 2000-04-30 Mark Mitchell <mark@codesourcery.com>
422
423 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
424 STMT_EXPRs.
425 * optimize.c (struct inline_data): Add target_exprs field.
426 (declare_return_variable): When a function returns an aggregate,
427 use the variable declared in the TARGET_EXPR as the remapped
428 DECL_RESULT.
429 (expand_call_inline): Update the pending target_exprs stack.
430 (optimize_function): Initialize the stack.
431
432 * decl2.c (finish_file): Fix typo in comment.
433
434 * method.c (emit_thunk): Don't try to return a `void' value.
435
436 * optimize.c (initialize_inlined_parameters): If the parameter is
437 addressable, we need to make a new VAR_DECL, even if the
438 initializer is constant.
439
440 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
441
442 * decl.c (grok_op_properties): Add an extra check of argtypes.
443
444 2000-04-27 Mark Mitchell <mark@codesourcery.com>
445
446 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
447 variables.
448 (initialize_inlined_parameters): Try to avoid creating new
449 VAR_DECLs.
450
451 2000-04-27 Alex Samuel <samuel@codesourcery.com>
452
453 * lex.c (my_get_run_time): Remove.
454 (init_filename_times): Use get_run_time instead of my_get_run_time.
455 (check_newline): Likewise.
456 (dump_time_statistics): Likewise.
457 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
458 of computing elapsed time explicitly.
459
460 2000-04-26 Mark Mitchell <mark@codesourcery.com>
461
462 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
463 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
464 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
465 before calling decl_constant_value.
466 * class.c (check_bitfield_decl): Likewise.
467 * cvt.c (ocp_convert): Likewise.
468 (convert): Likewise.
469 * decl.c (compute_array_index_type): Likewise.
470 (build_enumerator): Likewise.
471 * decl2.c (check_cp_case_value): Likewise.
472 * pt.c (convert_nontype_argument): Likewise.
473 (tsubst): Likewise.
474 * typeck.c (decay_conversion): Likewise.
475 (build_compound_expr): Likewise.
476 (build_reinterpret_cast): Likewise.
477 (build_c_cast): Likewise.
478 (convert_for_assignment): Likewise.
479
480 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
481
482 * decl.c (finish_function): Don't play games with DECL_INLINE.
483
484 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
485
486 * ir.texi: Correct typo.
487
488 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
489
490 * decl.c (grokdeclarator): Reject VLAs as members.
491
492 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
493
494 * call.c (standard_conversion): Accept conversion between
495 COMPLEX_TYPEs.
496
497 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
498
499 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
500
501 * decl2.c (finish_file): Remove double setup for accounting
502 compile time.
503
504 2000-04-24 Robert Lipe <robertlipe@usa.net>
505
506 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
507
508 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
509
510 * new.cc (set_new_handler): Needs to be in std::.
511
512 2000-04-23 Mark Mitchell <mark@codesourcery.com>
513
514 * cp-tree.h (lang_decl): Remove pretty_function_p.
515 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
516 language-specific node.
517 * decl.c (cp_make_fname_decl): Use build_decl, not
518 build_lang_decl, to build the variables.
519 (grokvardecl): Don't call build_lang_decl for local variables in
520 templates.
521 (grokdeclarator): Don't call build_lang_decl for local type
522 declarations in templates.
523 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
524 zero'd memory, rather than calling memset.
525 * pt.c: Include hashtab.h.
526 (local_specializations): New variable.
527 (retrieve_local_specialization): Use it.
528 (register_local_specialization): Likewise.
529 (tsubst_decl): Don't assume local variables have
530 DECL_LANG_SPECIFIC.
531 (instantiate_decl): Set up local_specializations.
532 * Makefile.in (HTAB_H): New variable.
533
534 2000-04-23 Richard Henderson <rth@cygnus.com>
535
536 * typeck.c (c_expand_asm_operands): Restore the original
537 contents of the output list.
538
539 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
540
541 * ir.texi: Document complex number representation.
542
543 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
544
545 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
546 (target_incomplete_p): New function.
547 (tinfo_base_init): Create comdat NTBS name variable.
548 (ptr_initializer): Add non_public parameter. Calculate it.
549 (ptmd_initializer): Likewise.
550 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
551 (create_real_tinfo_var): Add non_public parameter. Use it.
552 Push proxy into global namespace.
553 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
554 New enumeration.
555 * inc/typeinfo (type_info::before, type_info::operator==):
556 Compare __name addresses.
557
558 * tinfo2.cc: Remove new-abi builtins comment.
559
560 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
561
562 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
563
564 * call.c (joust): Exit early if we get the same function, too.
565
566 * decl2.c (key_method): Return NULL_TREE for template classes.
567 (import_export_class): Don't need to check for template classes.
568
569 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
570
571 * lex.c: Remove references to cccp.c.
572
573 2000-04-18 Mark Mitchell <mark@codesourcery.com>
574
575 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
576 volatile_memfunc. Add destructor_attr. Adjust dummy.
577 (DECL_DESTRUCTOR_P): Use destructor_attr.
578 (DECL_CONST_MEMFUNC_P): Reimplement.
579 (DECL_VOLATILE_MEMFUNC_P): Remove.
580 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
581 (overrides): Use DECL_DESTRUCTOR_P.
582 (check_for_override): Likewise.
583 * decl.c (start_function): Likewise.
584 * decl2.c (grokfclassfn): Likewise.
585 (check_classfn): Likewise.
586 (grok_function_init): Likewise.
587
588 2000-04-17 Mark Mitchell <mark@codesourcery.com>
589
590 * decl2.c (grokfield): Issue error on illegal data member
591 declaration.
592
593 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
594
595 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
596
597 2000-04-16 Mark Mitchell <mark@codesourcery.com>
598
599 * class.c (build_vtable_entry): Don't build thunks for type-info
600 functions.
601
602 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
603
604 * decl.c (decls_match): Allow a redeclaration of a builtin to
605 specify args while the builtin did not.
606
607 2000-04-15 Mark Mitchell <mark@codesourcery.com>
608
609 * cp-tree.def (THUNK_DECL): Add to documentation.
610 * cp-tree.h (flag_huge_objects): Declare.
611 * class.c (modify_vtable_entry): Tidy.
612 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
613 Calculate delta appropriately for the new ABI.
614 (dfs_modify_vtables): Use it.
615 (modify_all_vtables): Fix thinko in code to add overriding copies
616 of functions to primary vtables.
617 (build_clone): Fix typo in comment.
618 (clone_function_decl): Correct order of destructors in vtable.
619 (build_vbase_offset_vtbl_entries): Adjust comment.
620 (dfs_vcall_offset_queue_p): Remove.
621 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
622 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
623 (build_vtable_entry): Correct check for pure virtual functions.
624 Don't declare flag_huge_objects.
625 * decl.c (flag_huge_objects): Remove declaration.
626 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
627 Use int_size_in_bytes.
628 (emit_thunk): Handle vcall offset thunks.
629
630 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
631
632 * decl2.c (parse_time, varconst_time): Delete declarations.
633 (finish_file): Delete LINENO declaration.
634 START_TIME and THIS_TIME now long.
635
636 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
637
638 * class.c (build_base_field): Reformat comment.
639
640 * inc/cxxabi.h (stddef.h): Comment inclusion.
641 (__base_class_info::__offset): Comment shift.
642
643 2000-04-12 Mark Mitchell <mark@codesourcery.com>
644
645 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
646 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
647 (cp_push_exception_identifier): New macro.
648 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
649 (DECL_BASE_DESTRUCTOR_P): Likewise.
650 (DECL_DELETING_DESTRUCTOR_P): Likewise.
651 (get_vtbl_decl_for_binfo): Fix formatting.
652 (in_charge_arg_for_name): New macro.
653 (maybe_build_cleanup_and_delete): Remove declaration.
654 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
655 (in_charge_arg_for_name): New function.
656 (build_new_method_call): Use it. Handle cloned destructors.
657 (build_clone): Don't make the base constructor virtual.
658 Automatically defer generated functions.
659 (clone_function_decl): Handle destructors, too.
660 (clone_constructors_and_destructors): Likewise.
661 (create_vtable_ptr): Don't create a vtable entry for a cloned
662 function.
663 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
664 (initialize_predefined_identifiers): Update appropriately.
665 (finish_destructor_body): Simplify.
666 (maybe_build_cleanup_and_delete): Remove.
667 * except.c (expand_throw): Handle new-ABI destructors.
668 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
669 (build_dtor_call): New function.
670 (build_delete): Use it. Simplify.
671 * optimize.c (maybe_clone_body): Handle destructors.
672 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
673
674 * exception.cc (cleanup_fn): New typedef.
675 (CALL_CLEANUP): New macro.
676 (cp_eh_info): Use them.
677 (__cp_push_exception): Likewise.
678 (__cp_pop_exception): Likewise.
679
680 2000-04-11 Mark Mitchell <mark@codesourcery.com>
681
682 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
683 (complete_dtor_identifier): New macro.
684 (CLASSTYPE_FIRST_CONVERSION): Remove.
685 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
686 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
687 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
688 (CLASSTYPE_CONSTRUCTORS): Likewise.
689 (CLASSTYPE_DESTRUCTORS): Likewise.
690 (lang_decl): Add cloned_function.
691 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
692 (DECL_BASE_CONSTRUCTOR_P): Likewise.
693 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
694 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
695 (DECL_CLONED_FUNCTION_P): Likewise.
696 (DECL_CLONED_FUNCTION): Likewise.
697 (clone_function_decl): Declare.
698 (maybe_clone_body): Likewise.
699 * call.c (build_user_type_conversion_1): Call complete object
700 constructors in the new ABI.
701 (build_new_method_call): Don't add in-charge parameters under the
702 new ABI.
703 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
704 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
705 CLASSTYPE_DESTRUCTOR_SLOT.
706 (build_clone): New function.
707 (clone_function_decl): Likewise.
708 (clone_constructors_and_destructors): Likewise.
709 (check_bases_and_members): Use it.
710 * decl.c (iniitialize_predefined_identifiers): Initialize
711 complete_dtor_identifier.
712 (finish_function): Don't add extra code to a clone.
713 (lang_mark_tree): Mark cloned_function.
714 * decl2.c (mark_used): Don't bother trying to instantiate things
715 we synthesized.
716 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
717 * method.c (set_mangled_name_for_decl): Don't treat clones as
718 constructors.
719 (synthesize_method): Sythesize cloned functions, not the clones.
720 * optimize.c (inline_data): Update comment on ret_label.
721 (remap_block): Don't assume DECL_INITIAL exists.
722 (copy_body_r): Allow ret_label to be NULL.
723 (maybe_clone_body): Define.
724 * pt.c (tsubst_decl): Handle clones.
725 (instantiate_clone): New function.
726 (instantiate_template): Use it.
727 (set_mangled_name_for_template_decl): Don't treat clones as
728 constructors.
729 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
730 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
731 * semantics.c (expand_body): Clone function bodies as necessary.
732
733 * optimize.c (remap_decl): Avoid sharing structure for arrays
734 whose size is only known at run-time.
735 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
736
737 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
738 to has_in_charge_parm_p.
739 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
740 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
741 (DECL_COPY_CONSTRUCTOR_P): New macro.
742 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
743 (build_user_type_conversion_1): Likewise.
744 (convert_like_real): Likewise.
745 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
746 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
747 (copy_args_p): Likewise.
748 (grok_ctor_properties): Likewise.
749 (start_function): Likewise.
750 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
751 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
752 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
753 * method.c (do_build_copy_constructor): Use
754 DECL_HAS_IN_CHARGE_PARM_P.
755 (synthesize_method): Likewise.
756 * pt.c (instantiate_template): Remove goto.
757 * tree.c (build_cplus_method_type): Remove mention of obstacks in
758 comment.
759
760 * cp-tre.h (finish_function): Change prototype.
761 * decl.c (end_cleanup_fn): Adjust caller.
762 (finish_function): Take only one parameter.
763 * decl2.c (finish_objects): Adjust caller.
764 (finish_static_storage_duration_function): Likewise.
765 * method.c (emit_thunk): Likewise.
766 * parse.y: Likewise.
767 * parse.c: Regenerated.
768 * pt.c (instantiate_decl): Likewise.
769 * rtti.c (synthesize_tinfo_fn): Likewise.
770 * semantics.c (expand_body): Likewise.
771
772 * cp-tree.h (copy_decl): New function.
773 * class.c (finish_struct_1): Use it.
774 * lex.c (copy_decl): Define it.
775 * pt.c (tsubst_decl): Likewise.
776 * tree.c (copy_template_template_parm): Likewise.
777
778 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
779 has_nonpublic_assign_ref.
780 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
781 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
782 * class.c (finish_struct_methods): Don't set
783 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
784 (interface_only): Don't declare.
785 (interface_unknown): Likewise.
786
787 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
788
789 * tree.h (HAVE_TEMPLATES): Remove definition.
790 * lang-options.h (-fthis-is-variable): Remove documentation.
791
792 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
793
794 * class.c (instantiate_type): Handle object-relative template-id.
795
796 * semantics.c (finish_expr_stmt): Call convert_to_void here.
797 * decl.c (cplus_expand_expr_stmt): Not here.
798
799 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
800 Initialize exprtype earlier.
801
802 * parse.y (fn.def1): Check for defining types in return types.
803
804 * decl.c (check_tag_decl): Notice extra fundamental types.
805 Diagnose empty decls in classes, too.
806
807 * decl.c (grokdeclarator): Don't override an anonymous name if no
808 declarator was given.
809
810 * cvt.c (convert_to_void): Call resolve_offset_ref.
811
812 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
813
814 * decl2.c (decl_namespace): Handle getting a type.
815
816 * typeck.c (build_c_cast): Re-enable warning for cast between
817 pointer and integer of different size.
818
819 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
820
821 * inc/cxxabi.h (__pointer_type_info): Add restrict and
822 incomplete flags.
823 (__pointer_type_info::__pointer_catch): New virtual function.
824 (__pointer_to_member_type_info): Derive from
825 __pointer_type_info. Adjust.
826 (__pointer_to_member_type_info::__do_catch): Remove.
827 (__pointer_to_member_type_info::__is_pointer_p): Declare.
828 (__pointer_to_member_type_info::__pointer_catch): Declare.
829 * rtti.c (qualifier_flags): Add restrict flag.
830 (ptmd_initializer): Reorder members.
831 (create_tinfo_types): Expand comments. Reorder
832 ptmd_desc_type_node members.
833 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
834 Implement.
835 (__pointer_type_info::__do_catch): Move specific code into
836 __pointer_catch. Call it.
837 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
838 specific catch checking. Fix void conversion check.
839 (__pointer_to_member_type_info::__do_catch): Remove.
840 (__pointer_to_member_type_info::__pointer_catch): Implement.
841
842 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
843
844 * lex.c (init_parse): Remove traces of classof and headof.
845 * decl2.c (flag_operator_names): Default to 1.
846 (lang_decode_option): Do not set it for -ansi.
847
848 2000-04-09 Mark Mitchell <mark@codesourcery.com>
849
850 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
851 (DECL_MAIN_VARIANT): Remove.
852 * decl.c (duplicate_decls): Don't set it.
853 (start_function): Likewise.
854 (lang_mark_tree): Don't mark it.
855 * decl2.c (defer_fn): Don't use it.
856 * lex.c (retrofit_lang_decl): Don't set it.
857 * pt.c (tsubst_decl): Likewise.
858 * ptree.c (print_lang_decl): Don't print it.
859 * typeck.c (mark_addressable): Don't use it.
860
861 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
862
863 * vec.cc: Include <new> and <exception>.
864 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
865 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
866 terminate.
867 (__cxa_vec_delete): Catch dtor exceptions.
868
869 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
870
871 Prepend __ to implementation defined names.
872 * inc/typeinfo (type_info): Rename _name to __name.
873 (type_info::type_info): Rename parameter.
874 (type_info::operator==, type_info::operator!=,
875 type_info::before): Likewise.
876 (type_info::is_pointer_p, type_info::is_function_p,
877 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
878 parameters.
879 * inc/cxxabi.h
880 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
881 (__pointer_type_info::__pointer_type_info): Likewise.
882 (__pointer_type_info::is_pointer_p,
883 __pointer_type_info::do_catch): Prepend __. Rename parameters.
884 (__array_type_info::__array_type_info): Rename parameters.
885 (__function_type_info::__function_type_info): Likewise.
886 (__function_type_info::is_function_p): Prepend __.
887 (__enum_type_info::__enum_type_info): Rename parameters.
888 (__pointer_to_member_type_info::__pointer_to_member_type_info):
889 Likewise.
890 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
891 parameters.
892 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
893 (__class_type_info::__class_type_info): Rename parameters.
894 (__class_type_info::sub_kind): Prepend __. Adjust member names.
895 (__class_type_info::upcast_result,
896 __class_type_info::dyncast_result): Prepend __. Move definition
897 into tinfo.cc.
898 (__class_type_info::do_upcast, __class_type_info::do_catch,
899 __class_type_info::find_public_src,
900 __class_type_info::do_dyncast,
901 __class_type_info::do_find_public_src): Prepend __. Rename
902 parameters.
903 (__si_class_type_info::__si_class_type_info): Rename parameters.
904 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
905 __si_class_type_info::do_find_public_src): Prepent __. Rename
906 parameters.
907 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
908 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
909 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
910 parameters.
911 (__dynamic_cast): Rename parameters.
912 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
913 type_info::do_catch, type_info::do_upcast): Prepend __.
914 (contained_p, public_p, virtual_p, contained_public_p,
915 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
916 (__class_type_info::do_catch,
917 __class_type_info::do_upcast): Prepend __. Adjust.
918 (__class_type_info::__upcast_result,
919 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
920 Adjust.
921 (__class_type_info::find_public_src): Prepend __. Adjust.
922 (__class_type_info::do_find_public_src,
923 __si_class_type_info::do_find_public_src,
924 __vmi_class_type_info::do_find_public_src): Likewise.
925 (__class_type_info::do_dyncast,
926 __si_class_type_info::do_dyncast,
927 __vmi_class_type_info::do_dyncast): Likewise.
928 (__class_type_info::do_upcast,
929 __si_class_type_info::do_upcast,
930 __vmi_class_type_info::do_upcast): Likewise.
931 (__dynamic_cast): Adjust.
932 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
933 (__function_type_info::is_function_p): Likewise.
934 (__pointer_type_info::do_catch): Likewise. Adjust.
935 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
936 (__throw_type_match_rtti_2): Adjust.
937 (__is_pointer): Adjust.
938
939 2000-04-08 Mark Mitchell <mark@codesourcery.com>
940
941 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
942 (complete_ctor_identifier): New macro.
943 (special_function_kind): Add sfk_copy_constructor and
944 sfk_assignment_operator.
945 (LOOKUP_HAS_IN_CHARGE): Remove.
946 (cons_up_default_function): Rename to ...
947 (implicitly_declare_fn): ... this.
948 * call.c (build_new_method_call): Add in-charge parameters for
949 constructors here.
950 * class.c (add_implicitly_declared_members): Change parameter name
951 from cant_have_assignment to cant_have_const_assignment.
952 Replace calls to cons_up_default_function to implicitly_declare_fn.
953 * cvt.c (ocp_convert): Use complete_ctor_identifier.
954 * decl.c (initialize_predefined_identifiers): Initialize it.
955 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
956 complex expression.
957 * init.c (expand_default_init): Don't calculate the in-charge
958 parameter here.
959 (build_new_1): Likewise.
960 * lex.c (cons_up_default_function): Move to method.c.
961 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
962 (implicitly_declare_fn): New function.
963 * typeck.c (build_static_cast): Use complete_ctor_identifier.
964 (build_modify_expr): Likewise.
965 * typeck2.c (build_functional_cast): Likewise.
966
967 Under the new ABI, constructors don't return `this'.
968 * cp-tree.h (warn_reorder): Declare.
969 (special_function_kind): New enum.
970 (global_base_init_list): Remove declaration.
971 (emit_base_init): Don't return a value.
972 (check_base_init): Don't declare.
973 (is_aggr_typedef): Likewise.
974 * decl.c (check_special_function_return_type): New function.
975 (return_types): Remove.
976 (grokdeclarator): Use check_special_function_return_type.
977 (start_function): Don't initialize ctor_label under the new ABI.
978 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
979 * init.c (begin_init_stmts): Move to top of file.
980 (finish_init_stmts): Likewise.
981 (warn_reorder): Don't declare.
982 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
983 value.
984 (check_base_init): Remove.
985 (is_aggr_typedef): Likewise.
986 (build_new_1): Don't use the return value of a constructor.
987 * semantics.c (setup_vtbl_ptr): Don't use the return value
988 of emit_base_init.
989 * typeck.c (check_return_expr): Don't magically convert return
990 statements into `return this' in constructors under the new ABI.
991
992 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
993 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
994 (base_ctor_identifier): New macro.
995 (base_dtor_identifier): Likewise.
996 (deleting_dtor_identifier): Likewise.
997 * decl.c: Don't include obstack.h.
998 (obstack_chunk_alloc): Don't define.
999 (obstack_chunk_free): Likewise.
1000 (struct predefined_identifier): New type.
1001 (initialize_predefined_identifiers): New function.
1002 (init_decl_processing): Use it.
1003 (debug_temp_inits): Remove.
1004 (start_method): Don't call preserve_data.
1005 (hack_incomplete_structures): Update comment.
1006 * init.c (init_init_processing): Don't initialize
1007 nelts_identifier.
1008 (build_offset_rf): Remove dead code.
1009 (build_delete): Use CLASSTYPE_N_BASECLASSES.
1010 * search.c (init_search_processing): Don't initialize
1011 vptr_identifier.
1012
1013 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1014
1015 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
1016 some sign_compare warnings.
1017
1018 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
1019
1020 Rename abi::__vmi_class_type_info members.
1021 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
1022 base_list, detail_masks members to vmi_flags, vmi_base_count,
1023 vmi_bases and vmi_flags_masks respectively.
1024 (__vmi_class_type_info::vmi_flags_masks): Rename
1025 details_unknown_mask to flags_unknown_mask.
1026 * tinfo.cc (__class_type_info::do_upcast): Adjust.
1027 (__vmi_class_type_info::do_find_public_src): Adjust.
1028 (__vmi_class_type_info::do_dyncast): Adjust.
1029 (__vmi_class_type_info::do_upcast): Adjust.
1030
1031 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
1032
1033 * tinfo.cc (convert_to_base): New function.
1034 (get_vbase_offset): Remove. Move into convert_to_base.
1035 (__vmi_class_type_info::do_find_public_src): Adjust.
1036 (__vmi_class_type_info::do_dyncast): Adjust.
1037 (__vmi_class_type_info::do_upcast): Adjust.
1038
1039 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
1040
1041 * tinfo.cc (operator=): Use __builtin_strcmp.
1042 * tinfo2.cc (before): Likewise.
1043
1044 2000-04-06 Mark Mitchell <mark@codesourcery.com>
1045
1046 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
1047 (DECL_SAVED_INLINE): Rename to ...
1048 (DECL_DEFERRED_FN): ... this.
1049 (in_function_p): Remove declaration.
1050 (mark_inline_for_output): Rename to ...
1051 (defer_fn): ... this.
1052 * decl.c (finish_function): Adjust call to mark_inline_for_output.
1053 (in_function_p): Remove definition.
1054 * decl2.c (saved_inlines): Rename to ...
1055 (deferred_fns): ... this.
1056 (saved_inlines_used): Rename to ...
1057 (deferred_fns_used): ... this.
1058 (mark_inline_for_output): Rename to ...
1059 (defer_fn): ... this.
1060 (finish_file): Adjust accordingly.
1061 (init_decl2): Likewise.
1062 * lex.c (cons_up_default_function): Likewise.
1063 * pt.c (mark_decl_instantiated): Likewise.
1064 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
1065 circumstances.
1066 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
1067 * semantics.c (expand_body): Defer more functions.
1068
1069 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
1070
1071 * vec.cc: New file.
1072 * Make-lang.in (CXX_LIB2FUNCS): Add it.
1073 (vec.o): Build it.
1074 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
1075 __cxa_vec_delete): Declare.
1076
1077 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
1078
1079 * rtti.c (dfs_class_hint_mark): New static function.
1080 (dfs_class_hint_unmark): New static function.
1081 (class_hint_flags): Use them.
1082
1083 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
1084
1085 * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
1086
1087 2000-04-05 Mark Mitchell <mark@codesourcery.com>
1088
1089 * cp-tree.h (instantiate_decl): Change prototype.
1090 * decl2.c (mark_used): Adjust call.
1091 * optimize.c (inlinable_function_p): Adjust handling of templates.
1092 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
1093 (do_type_instantiation): Likewise.
1094 (instantiate_decl): Defer more templates.
1095 (instantiate_pending_templates): Adjust logic to handle inline
1096 friend functions.
1097
1098 * Makefile.in (GGC_H): New variable. Use it throughout in place
1099 of ggc.h.
1100
1101 * call.c: Don't include obstack.h. Include ggc.h.
1102 (obstack_chunk_alloc): Don't define.
1103 (obstack_chunk_free): Likewise.
1104 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
1105 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
1106 (pop_switch): Free it.
1107
1108 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
1109
1110 * dump.c (dequeue_and_dump): Don't try to print the bit_position
1111 if we don't have a DECL_FIELD_OFFSET.
1112
1113 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
1114
1115 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
1116 special_function_p.
1117
1118 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1119
1120 * cfns.gperf (hash, libc_name_p): Prototype.
1121
1122 * rtti.c (build_dynamic_cast_1): Constification.
1123
1124 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
1125
1126 * semantics.c (deferred_type_access_control): Prototype.
1127
1128 2000-04-04 Mark Mitchell <mark@codesourcery.com>
1129
1130 Correct many new ABI issues regarding vbase and vcall offset
1131 layout.
1132 * cp-tree.h (BINFO_VTABLE): Document.
1133 (struct lang_type): Tweak formatting.
1134 (BINFO_PRIMARY_BINFO): Add to documentation.
1135 (CLASSTYPE_VSIZE): Fix typo in comment.
1136 (CLASSTYPE_VBASECLASSES): Update documentation.
1137 (BINFO_VBASE_MARKED): Remove.
1138 (SET_BINFO_VBASE_MARKED): Likewise.
1139 (CLEAR_BINFO_VBASE_MARKED): Likewise.
1140 (BINFO_FIELDS_MARKED): Remove.
1141 (SET_BINFO_FIELDS_MARKED): Likewise.
1142 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
1143 (enum access_kind): New enumeration.
1144 (num_extra_vtbl_entries): Remove declaration.
1145 (size_extra_vtbl_entries): Likewise.
1146 (get_vtbl_decl_for_binfo): New function.
1147 (dfs_vbase_unmark): Remove declaration.
1148 (mark_primary_bases): Likewise.
1149 * class.c (SAME_FN): Remove.
1150 (struct vcall_offset_data_s): Move definition.
1151 (build_vbase_pointer): Use `build', not `build_binary_op', to
1152 access the vbase pointer under the new ABI.
1153 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
1154 (build_primary_vtable): Likewise.
1155 (dfs_mark_primary_bases): Move here from search.c.
1156 (mark_primary_bases): Likewise.
1157 (determine_primary_bases): Under the new ABI, don't make a base
1158 class a primary base just because we don't yet have any virtual
1159 functions.
1160 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
1161 (num_vfun_entries): Remove.
1162 (dfs_count_virtuals): Likewise.
1163 (num_extra_vtbl_entries): Likewise.
1164 (size_extra_vtbl_entries): Likewise.
1165 (layout_virtual_bases): Iterate in inheritance graph order under
1166 the new ABI.
1167 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
1168 indicate that a vfield is present.
1169 (init_class_processing): Initialize access_public_node, etc., from
1170 ak_public, etc.
1171 (get_vtbl_decl_for_binfo): New function.
1172 (dump_class_hierarchy_r): Likewise.
1173 (dump_class_hierarchy): Use it.
1174 (finish_vtbls): Build the vtbls in inheritance graph order.
1175 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
1176 (initialize_vtable): Use get_vtbl_decl_for_binfo.
1177 (accumulate_vtbl_inits): Add comments explaining why a pre-order
1178 walk is required.
1179 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
1180 where the vptr points, even for primary vtables.
1181 (build_vtbl_initializer): Adjust handling of vbase and vcall
1182 offsets.
1183 (build_vcall_and_vbase_vtable_entries): New function.
1184 (dfs_build_vbase_offset_vtbl_entries): Remove.
1185 (build_vbase_offset_vtbl_entries): Reimplement.
1186 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
1187 were already handled in a primary base class vtable.
1188 (build_vcall_offset_vtbl_entries): Adjust.
1189 (build_rtti_vtbl_entries): Adjust.
1190 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
1191 * init.c (expand_virtual_init): Simplify.
1192 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
1193 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
1194 * search.c (BINFO_ACCESS): New macro.
1195 (SET_BINFO_ACCESS): Likewise.
1196 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
1197 (access_in_type): Likewise.
1198 (dfs_accessible_p): Likewise.
1199 (protected_accessible_p): Likewise.
1200 (lookup_fnfields_1): Adjust documentation.
1201 (dfs_mark_primary_bases): Move to class.c
1202 (mark_primary_bases): Likewise.
1203 (dfs_vbase_unmark): Remove.
1204 (virtual_context): Use BINFO_FOR_VBASE.
1205 (dfs_get_vbase_types): Simplify.
1206 (dfs_build_inheritance_graph_order): New function.
1207 (get_vbase_types): Use it.
1208 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
1209
1210 * tinfo.cc (get_vbase_offset): New function.
1211 (__vmi_class_type_info::do_find_public_src): Use it.
1212 (__vmi_class_type_info::do_dyncast): Likewise.
1213 (__vmi_class_type_info::do_upcast): Likewise.
1214
1215 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
1216
1217 * lang-specs.h: Pass -fno-show-column to the preprocessor.
1218
1219 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
1220
1221 * rtti.c (class_hint_flags): Rename flags.
1222 (class_initializer): Remove flags.
1223 (synthesize_tinfo_var): Combine offset and flags. Add flags
1224 for __vmi_class_type_info.
1225 (create_tinfo_types): Remove flags from __class_type_info and
1226 __si_class_type_info. Merge flags and offset from
1227 base_class_type_info.
1228 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
1229 (__base_class_info::is_virtual_p): Adjust.
1230 (__base_class_info::is_public_p): Adjust.
1231 (__base_class_info::offset): New accessor.
1232 (__class_type_info::details): Remove member.
1233 (__class_type_info::__class_type_info): Lose details.
1234 (__class_type_info::detail_masks): Remove.
1235 (__si_class_type_info::__si_class_type_info): Lose details.
1236 (__vmi_class_type_info::details): New member.
1237 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
1238 (__vmi_class_type_info::detail_masks): New member.
1239 * tinfo.cc (__class_type_info::do_upcast): Initialize result
1240 with unknown_details_mask.
1241 (__vmi_class_type_info::do_find_public_src): Adjust
1242 (__vmi_class_type_info::do_dyncast): Adjust.
1243 (__vmi_class_type_info::do_upcast): Set result details, if
1244 needed. Adjust.
1245 (__dynamic_cast): Temporarily #if out optimization.
1246
1247 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
1248
1249 * rtti.c (get_tinfo_decl): Mark used.
1250 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
1251 mark as dealt with, if we output it.
1252
1253 2000-03-28 Mark Mitchell <mark@codesourcery.com>
1254
1255 * class.c: Reorganize to put virtual function table initialization
1256 machinery at the end of the file.
1257
1258 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
1259
1260 * class.c (finish_struct): Use bitsize_zero_node.
1261 * pt.c (instantiate_class_template): Likewise.
1262
1263 2000-03-28 Mark Mitchell <mark@codesourcery.com>
1264
1265 Put RTTI entries at negative offsets in new ABI.
1266 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
1267 vbase offset at index -3, not -1.
1268 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
1269 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
1270 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
1271 (build_rtti_vtbl_entries): New function.
1272 (set_rtti_entry): Remove.
1273 (build_primary_vtable): Don't use it.
1274 (build_secondary_vtable): Likewise.
1275 (start_vtable): Remove.
1276 (first_vfun_index): New function.
1277 (set_vindex): Likewise.
1278 (add_virtual_function): Don't call start_vtable. Do call
1279 set_vindex.
1280 (set_primary_base): Rename parameter.
1281 (determine_primary_base): Likewise.
1282 (num_vfun_entries): Don't use skip_rtti_stuff.
1283 (num_extra_vtbl_entries): Include RTTI information.
1284 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
1285 (skip_rtti_stuff): Remove.
1286 (dfs_modify_vtables): Don't use it.
1287 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
1288 (layout_nonempty_base_or_field): Update size handling.
1289 (create_vtable_ptr): Tweak.
1290 (layout_class_type): Adjust parameter names.
1291 (finish_struct_1): Simplify.
1292 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
1293 (skip_rtti_stuff): Remove.
1294 (first_vfun_index): New function.
1295 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
1296 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
1297 (marked_vtable_pathp): Declare.
1298 (unmarked_vtable_pathp): Likewise.
1299 * error.c (dump_expr): Use first_vfun_index to calculate vtable
1300 offsets.
1301 * rtti.c (build_headof): Look for RTTI at negative offsets.
1302 (get_tinfo_decl_dynamic): Likewise.
1303 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
1304 here.
1305 (create_pseudo_type_info): Do it here instead. Adjust so that
1306 vptr points at first virtual function.
1307 * search.c (marked_vtable_pathp): Make it global.
1308 (unmarked_vtable_pathp): Likewise.
1309 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
1310 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
1311 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
1312 (get_pure_virtuals): Likewise.
1313 (expand_upcast_fixups): Likewise.
1314 * tree.c (debug_binfo): Likewise.
1315 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
1316 negative offset.
1317
1318 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1319
1320 * class.c (check_field_decl): Fix typo.
1321 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
1322 (check_methods): Likewise.
1323 (check_field_decls): Likewise.
1324 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
1325 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
1326 Use DECL_RESULT_FLD, not DECL_RESULT.
1327 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
1328 * lex.c (identifier_type): Likewise.
1329 * pt.c (determine_specialization, lookup_template_class): Likewise.
1330 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
1331 (resolve_overloaded_unification, more_specialized): Likewise.
1332 * semantics.c (finish_member_declaration): Likewise.
1333 * typeck.c (build_x_function_call): Likewise.
1334
1335 2000-03-26 Mark Mitchell <mark@codesourcery.com>
1336
1337 * class.c (layout_empty_base): Handle empty bases with non-byte
1338 alignment.
1339 (build_base_field): Likewise.
1340 (layout_virtual_bases): Likewise.
1341
1342 * class.c (finish_struct_1): Fix typo in this change:
1343
1344 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1345
1346 2000-03-25 Mark Mitchell <mark@codesourcery.com>
1347
1348 * decl.c (grokdeclarator): Count partial specializations when
1349 keeping track of how many template classes have been seen.
1350
1351 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
1352
1353 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1354
1355 * class.c (build_vbase_pointer_fields): layout_field now place_field.
1356 (get_vfield_offset): Use byte_position.
1357 (set_rtti_entry): Set OFFSET to ssizetype zero.
1358 (get_binfo_offset_as_int): Deleted.
1359 (dfs_record_base_offsets): Use tree_low_cst.
1360 (dfs_search_base_offsets): Likewise.
1361 (layout_nonempty_base_or_field): Reflect changes in RLI format
1362 and call byte_position.
1363 (layout_empty_base): Convert offset to ssizetype.
1364 (build_base_field): use rli_size_unit_so_far.
1365 (dfs_propagate_binfo_offsets): Do computation in proper type.
1366 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
1367 (layout_class_type): Reflect changes in RLI names and fields.
1368 (finish_struct_1): Set DECL_FIELD_OFFSET.
1369 * dump.c (dequeue_and_dump): Call bit_position.
1370 * expr.c (cplus_expand_constant): Use byte_position.
1371 * rtti.c (expand_class_desc): Use bitsize_one_node.
1372 * typeck.c (build_component_addr): Use byte_position and don't
1373 special case for zero offset.
1374
1375 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
1376
1377 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
1378
1379 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
1380 tinfo object.
1381 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
1382 vtable.
1383
1384 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1385
1386 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
1387 DECL_P macros.
1388 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
1389 make_typename_type, check_initializer, cp_finish_decl,
1390 xref_tag): Likewise.
1391 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
1392 decl_namespace, arg_assoc_template_arg, arg_assoc,
1393 validate_nonmember_using_decl, do_class_using_decl): Likewise.
1394 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
1395 args_to_string): Likewise.
1396 * friend.c (is_friend): Likewise.
1397 * lex.c (note_got_semicolon, note_list_got_semicolon,
1398 is_global): Likewise.
1399 * method.c (build_overload_nested_name, build_overload_value,
1400 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
1401 * parse.y (typename_sub, typename_sub1): Likewise.
1402 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
1403 process_partial_specialization, convert_template_argument,
1404 template_args_equal, add_pending_template, lookup_template_class,
1405 for_each_template_parm_r, maybe_fold_nontype_arg,
1406 tsubst, instantiate_template, type_unification_real, unify,
1407 instantiate_pending_templates, set_mangled_name_for_template_decl):
1408 Likewise.
1409 * repo.c (repo_get_id, repo_template_used): Likewise.
1410 * search.c (lookup_field_1): Likewise.
1411 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
1412 * xref.c (classname): Likewise.
1413
1414 2000-03-22 Mark Mitchell <mark@codesourcery.com>
1415
1416 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
1417 (CANONICAL_BINFO): New macro.
1418 (BINFO_NEW_VTABLE_MARKED): Use it.
1419 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
1420 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
1421 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
1422 not TREE_TYPE.
1423 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
1424 (build_secondary_vtable): Likewise.
1425 (dfs_finish_vtbls): Likewise.
1426 (dfs_accumulate_vtbl_inits): Likewise.
1427 (accumulate_vtbl_inits): New function.
1428 (finish_vtbls): Make sure that virtual bases come after
1429 non-virtual bases in the vtable group.
1430 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
1431 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
1432 * search.c (struct vbase_info): Move definition.
1433 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
1434 (unmarked_new_vtable_p): Likewise.
1435 (dfs_mark_vtable_path): Remove.
1436 (dfs_mark_new_vtable): Remove.
1437 (dfs_unmark_new_vtable): Likewise.
1438 (dfs_clear_search_slot): Likewise.
1439 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
1440 (dfs_clear_vbase_slots): Likewise.
1441 (init_vbase_pointers): LIkewise.
1442
1443 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
1444
1445 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
1446 SIZETYPE to a non-SIZETYPE.
1447
1448 2000-03-21 Mark Mitchell <mark@codesourcery.com>
1449
1450 * class.c (layout_virtual_bases): Adjust names in conditionally
1451 compiled code.
1452
1453 * class.c (record_base_offsets): New function.
1454 (layout_conflict_p): Likewise.
1455 (layout_nonempty_base_or_field): Use it.
1456 (layout_empty_base): New function.
1457 (build_base_field): Use it.
1458 (build_base_fields): Update comment.
1459 (layout_virtual_bases): Fold in a little code form
1460 layout_basetypes. Use layout_empty_base.
1461 (layout_basetypes): Remove.
1462 (end_of_class): New function.
1463 (layout_class_type): Use it. Adjust.
1464
1465 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
1466 (fntype_p): Remove.
1467 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
1468 comment.
1469 (dfs_skip_nonprimary_vbases_markedp): Likewise.
1470 * typeck.c (fntype_p): Remove.
1471
1472 * cp-tree.h (TI_SPEC_INFO): Remove.
1473 (CLASSTYPE_TI_SPEC_INFO): Likewise.
1474 * pt.c (process_partial_specialization): Likewise.
1475
1476 * class.c (build_base_field): Fix thinko in computation of binfo
1477 offsets.
1478
1479 * tree.c (mark_local_for_remap_p): Mark variables declared in
1480 TARGET_EXPRs as well.
1481
1482 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
1483
1484 * typeck.c (require_complete_type, complete_type,
1485 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
1486 build_array_ref, convert_arguments, pointer_diff,
1487 build_x_unary_op, build_unary_op, build_c_cast,
1488 build_modify_expr): Use COMPLETE_TYPE_P etc.
1489 * call.c (is_complete, convert_like_real,
1490 build_new_method_call): Likewise.
1491 * class.c (build_vbase_pointer_fields, check_bases,
1492 build_base_field, finish_struct_1, pushclass): Likewise.
1493 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
1494 * decl.c (maybe_process_template_type_declaration, pushtag,
1495 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
1496 layout_var_decl, check_initializer, cp_finish_decl,
1497 grokdeclarator, require_complete_types_for_parms,
1498 grok_op_properties, xref_tag, xref_basetypes,
1499 check_function_type): Likewise.
1500 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
1501 * friend.c (do_friend): Likewise.
1502 * init.c (build_offset_ref): Likewise.
1503 * parse.y (structsp): Likewise.
1504 * pt.c (maybe_process_partial_specialization,
1505 tsubst_friend_function, instantiate_class_template, tsubst,
1506 do_type_instantiation, instantiate_pending_templates): Likewise.
1507 * repo.c (repo_get_id): Likewise.
1508 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
1509 synthesize_tinfo_var, emit_support_tinfos): Likewise.
1510 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
1511 * semantics.c (begin_class_definition): Likewise.
1512 * tree.c (build_cplus_method_type): Likewise.
1513 * typeck2.c (digest_init, build_functional_cast,
1514 add_exception_specifier): Likewise.
1515 * parse.h, parse.c: Regenerated.
1516
1517 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
1518
1519 * inc/cxxabi.h: New header file. Define new-abi entry points.
1520 (__pointer_type_info::target): Rename member to ...
1521 (__pointer_type_info::type): ... here.
1522 (__base_class_info::type): Rename member to ...
1523 (__base_class_info::base): ... here.
1524 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
1525 * cp-tree.h (CPTI_ABI): New global tree enumeration.
1526 (abi_node): New global tree node.
1527 * decl.c (abi_node): Document.
1528 (init_decl_processing): Initialize abi_node.
1529 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
1530 (get_vmi_pseudo_type_info): Likewise.
1531 (create_tinfo_types): Likewise.
1532 (emit_support_tinfos): Likewise.
1533 * tinfo.h (cxxabi.h): Include for new-abi.
1534 Move rtti class definitions to new header file.
1535 * tinfo.cc (abi): Use the namespace.
1536 (std): Move new abi rtti classes from here ...
1537 (__cxxabiv1): ... to here.
1538 * tinfo2.cc (cxxabi.h): Include for new-abi.
1539 Move rtti class definitions to new header file.
1540 (std): Move new abi rtti classes from here ...
1541 (__cxxabiv1): ... to here.
1542 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
1543 namespace.
1544
1545 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
1546 Jason Merrill <jason@casey.cygnus.com>
1547
1548 * method.c (build_overload_int): Use host_integerp.
1549
1550 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1551
1552 * init.c (build_offset_ref): Handle the case of a templated member
1553 function.
1554
1555 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1556
1557 * except.c (expand_exception_blocks): Clear catch_clauses_last.
1558
1559 2000-03-18 Mark Mitchell <mark@codesourcery.com>
1560
1561 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
1562 * class.c (check_bitfield_decl): Turn illegal bitfields into
1563 non-bitfields.
1564 (dfs_propagate_binfo_offsets): Adjust for new size_binop
1565 semantics.
1566 (dfs_offset_for_unshared_vbases): Likewise.
1567 * cvt.c (cp_convert_to_pointer): Convert NULL to a
1568 pointer-to-member correctly under the new ABI.
1569 * expr.c (cplus_expand_constant): Don't use cp_convert when
1570 turning an offset into a pointer-to-member.
1571 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
1572 when dereferencing them under the new ABI.
1573 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
1574 of pointers-to-members under the new ABI.
1575
1576 * class.c (check_bitfield_decl): Remove restriction on really long
1577 bitfields.
1578 (layout_class_type): Implement new ABI handling of bitfields
1579 longer than their types.
1580
1581 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1582
1583 * parse.y (extdefs): Call ggc_collect.
1584 * parse.c: Regenerated.
1585
1586 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
1587
1588 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
1589 (note_name_declared_in_class): Use OVL_CURRENT to get at a
1590 potential overload.
1591
1592 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1593
1594 * class.c (build_vbase_path): Use integer_zerop.
1595 (build_vtable_entry): Use tree_low_cst.
1596 (get_vfield_offset): Use bit_position.
1597 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
1598 Use tree_low_cst.
1599 (check_bitfield_decl): Set DECL_SIZE using convert.
1600 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
1601 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
1602 Use tree_low_cst.
1603 (finish_struct_1): Use bit_position.
1604 (dump_class_hierarchy): Use tree_low_cst.
1605 * cp-tree.h (min_precision): Add declaration.
1606 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
1607 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
1608 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
1609 * expr.c (cplus_expand_constant): Use bit_position.
1610 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
1611 * rtti.c (get_base_offset): Use bit_position.
1612 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
1613 host_integerp, and tree_low_cst.
1614 (pointer_int_sum): Use integer_zerop.
1615 (build_component_addr): Use bit_position.
1616
1617 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
1618
1619 * typeck.c (require_complete_type): Don't assume size_zero_node.
1620 (complete_type_or_else): Likewise.
1621
1622 2000-03-16 Steven Grady <grady@digitaldeck.com>
1623 Jason Merrill <jason@casey.cygnus.com>
1624
1625 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
1626
1627 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
1628
1629 * decl2.c (grokfield): Bail out if type is error_mark_node.
1630
1631 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
1632
1633 * tinfo2.cc (__ptr_to_member_data): Rename to ...
1634 (__pointer_to_member_data): ... here. Adjust.
1635 * rtti.c (create_tinfo_types): Adjust.
1636
1637 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
1638
1639 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
1640 * decl.c (ref_desc_type_node): Undocument.
1641 * rtti.c (ptr_ref_initializer): Rename to ...
1642 (ptr_initializer): ... here. Adjust comments.
1643 (ptmd_initializer): Fix comment thinko.
1644 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
1645 (create_tinfo_types): Remove ref_desc_type_node init.
1646 * tinfo2.cc (__reference_type_info): Remove.
1647
1648 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
1649
1650 * decl.c (cp_finish_decl): Remove obsolete comment.
1651
1652 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
1653
1654 2000-03-14 Mark Mitchell <mark@codesourcery.com>
1655
1656 * cp-tree.h: Tweak documentation.
1657 * class.c (build_vbase_pointer_fields): Layout the fields, too.
1658 (avoid_overlap): Remove.
1659 (get_binfo_offset_as_int): New function.
1660 (dfs_serach_base_offsets): Likewise.
1661 (layout_nonempty_base_or_field): Likewise.
1662 (build_base_field): Layout fields here. Avoid placing two objects
1663 of the same type at the same address, under the new ABI.
1664 (build_base_fields): Adjust accordingly.
1665 (create_vtable_ptr): Return the new field, but don't attach it to
1666 TYPE_FIELDS.
1667 (remove_base_field): Remove.
1668 (remove_base_fields): Remove.
1669 (layout_basetypes): Adjust accordingly.
1670 (layout_class_type): Call layout_field for each field, rather than
1671 just making a wholesale call to layout_type.
1672
1673 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
1674
1675 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
1676
1677 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
1678
1679 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
1680
1681 * except.c (dtor_nothrow): New fn.
1682 (do_pop_exception): Use it. Take type parm.
1683 (push_eh_cleanup): Take type parm.
1684 (expand_start_catch_block): Pass it.
1685 (build_eh_type_type_ref): Accept null type.
1686
1687 2000-03-12 Mark Mitchell <mark@codesourcery.com>
1688
1689 * cp-tree.h (revert_static_member_fn): Change prototype.
1690 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
1691 (grok_op_properties): Likewise.
1692 (start_function): Likewise.
1693 (revert_static_member_fn): Simplify.
1694 * pt.c (check_explicit_specialization): Adjust call to
1695 revert_static_member_fn.
1696
1697 2000-03-11 Mark Mitchell <mark@codesourcery.com>
1698
1699 * cp-tree.h (scope_kind): New type.
1700 (tmpl_spec_kind): Likewise.
1701 (declare_pseudo_global_level): Remove.
1702 (pseudo_global_level_p): Rename to template_parm_scope_p.
1703 (pushlevel): Remove declaration.
1704 (begin_scope): New function.
1705 (finish_scope): Likewise.
1706 (current_tmpl_spec_kind): Likewise.
1707 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
1708 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
1709 Add template_spec_p.
1710 (toplevel_bindings_p): Adjust.
1711 (declare_pseudo_global_level): Remove.
1712 (pseudo_global_level_p): Rename to template_parm_scope_p.
1713 (current_tmpl_spec_kind): New function.
1714 (begin_scope): Likewise.
1715 (finish_scope): Likewise.
1716 (maybe_push_to_top_level): Adjust.
1717 (maybe_process_template_type_declaration): Likewise.
1718 (pushtag): Likewise.
1719 (pushdecl_nonclass_level): Likewise.
1720 (lookup_tag): Likewise.
1721 (grokfndecl): Handle member template specializations. Share
1722 constructor and non-constructor code.
1723 * decl2.c (check_classfn): Handle member template specializations.
1724 * pt.c (begin_template_parm_list): Use begin_scope.
1725 (begin_specialization): Likewise.
1726 (end_specialization): Likewise.
1727 (check_explicit_specialization): Use current_tmpl_spec_kind.
1728 Handle member template specializations.
1729 (end_template_decl): Use finish_scope. Remove call to
1730 get_pending_sizes.
1731 (push_template_decl_real): Remove bogus error message.
1732 (tsubst_decl): Fix typo in code contained in comment.
1733 (instantiate_template): Handle member template specializations.
1734 (most_general_template): Likewise.
1735
1736 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
1737
1738 * lex.c (whitespace_cr): Compress consecutive calls to warning().
1739 (do_identifier): Ditto for error().
1740
1741 * pt.c (convert_nontype_argument): Ditto for cp_error().
1742 (convert_template_argument): Ditto for cp_pedwarn().
1743
1744 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
1745
1746 * exception.cc (__check_null_eh_spec): New fn.
1747 * except.c (expand_end_eh_spec): Call it if the spec is throw().
1748
1749 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
1750
1751 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
1752 * except.c (expand_end_eh_spec): Add the return type.
1753 * rtti.c (throw_bad_cast): Add the parmtypes.
1754 (throw_bad_typeid): Likewise.
1755
1756 * semantics.c (expand_stmt): Only leave out rtl for unused
1757 artificials, and set DECL_IGNORED_P on them as well.
1758 * decl.c (wrapup_globals_for_namespace): Likewise.
1759
1760 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
1761
1762 * decl.c (maybe_commonize_var): Skip all artificial decls.
1763 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
1764
1765 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
1766
1767 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
1768 * cp-tree.h: Declare flag_enforce_eh_specs.
1769 * decl.c (store_parm_decls, finish_function): Check it.
1770
1771 C library functions don't throw.
1772 * Makefile.in (cfns.h): New target.
1773 (except.o): Depend on it.
1774 * Make-lang.in (cc1plus): Depend on cfns.gperf.
1775 * cfns.gperf: New file.
1776 * cfns.h: Generated.
1777 * except.c: Include it.
1778 (nothrow_libfn_p): New fn.
1779 * decl.c (grokfndecl): Use it.
1780 * cp-tree.h: Declare it.
1781
1782 * decl.c (push_overloaded_decl_1, auto_function,
1783 define_function): Lose.
1784 (build_library_fn_1): New static fn.
1785 (builtin_function): Use it.
1786 (get_atexit_node): Use build_library_fn_ptr.
1787 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
1788 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
1789 push_void_library_fn, push_throw_library_fn): New fns.
1790 * cp-tree.h: Declare them.
1791 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
1792 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
1793 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
1794 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
1795 * rtti.c (build_runtime_decl): Lose.
1796 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
1797 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
1798 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
1799
1800 * call.c (build_call): Remove result_type parm.
1801 Call mark_used on unused artificial fns.
1802 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
1803
1804 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
1805
1806 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
1807 appropriate.
1808 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
1809 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
1810 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
1811 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
1812 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
1813 expand_generic_desc): Likewise.
1814
1815 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
1816
1817 * exception.cc (__cp_pop_exception): Cleanup the original object.
1818
1819 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
1820
1821 * decl.c (grok_op_properties): Merge conversion to void warning
1822 with other silly op warnings.
1823
1824 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
1825
1826 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
1827 array CONSTRUCTOR elements. Don't use expr_tree_cons.
1828
1829 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
1830
1831 * decl.c (cp_make_fname_decl): New function.
1832 (wrapup_globals_for_namespace): Don't emit unused static vars.
1833 (init_decl_processing): Remove comment about use of
1834 array_domain_type. Set make_fname_decl.
1835 (cp_finish_decl): Remove __FUNCTION__ nadgering.
1836 * semantics.c (begin_compound_stmt): Remove
1837 current_function_name_declared flagging.
1838 (expand_stmt): Don't emit unused local statics.
1839 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
1840 specially.
1841
1842 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
1843
1844 * typeck.c (convert_for_assignment): Don't look at array
1845 initializer.
1846 * call.c (convert_like_real): Likewise.
1847
1848 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
1849
1850 Add initial support for '\uNNNN' specifier.
1851 * lex.c (read_ucs): New fn.
1852 (readescape, skip_white_space): Call it.
1853 (is_extended_char, is_extended_char_1): New fns.
1854 (utf8_extend_token): New fn, #if 0'd out.
1855 (real_yylex): Treat extended chars like letters.
1856
1857 * search.c (note_debug_info_needed): Walk the bases even if we
1858 weren't deferring the type itself.
1859
1860 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1861
1862 * decl2.c (finish_objects): Constify a char*.
1863
1864 * method.c (emit_thunk): Likewise.
1865
1866 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
1867
1868 * typeck.c (dubious_conversion_warnings): Look through
1869 REFERENCE_TYPE.
1870
1871 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1872
1873 * class.c (dfs_modify_vtables): I is now unsigned.
1874 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
1875 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
1876 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
1877 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
1878 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
1879 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
1880 Call integer_all_onesp.
1881 * typeck2.c (process_init_constructor): Use compare_tree_int.
1882
1883 * lang-specs.h (as): Don't call if -syntax-only.
1884
1885 2000-03-06 Mark Mitchell <mark@codesourcery.com>
1886
1887 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
1888 RTL_EXPR_HAS_NO_SCOPE after all.
1889
1890 2000-03-05 Mark Mitchell <mark@codesourcery.com>
1891
1892 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
1893 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
1894 RTL_EXPR_HAS_NO_SCOPE.
1895
1896 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
1897 later.
1898
1899 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
1900
1901 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
1902
1903 * call.c (convert_like): Macrofy.
1904 (convert_like_with_context): New macro.
1905 (convert_like_real): Renamed from convert_like. Add calling
1906 context parameters, for diagnostics. Add recursive flag. Call
1907 dubious_conversion_warnings for outer conversion.
1908 (build_user_type_conversion): Use convert_like_with_context.
1909 (build_over_call): Likewise. Don't warn about dubious
1910 conversions here. Adjust convert_default_arg calls.
1911 (convert_default_arg): Add context parameters for diagnostics.
1912 Pass throught to convert_like_with_context.
1913 * cp-tree.h (convert_default_arg): Add context parameters.
1914 (dubious_conversion_warnings): Prototype new function.
1915 * typeck.c (convert_arguments): Adjust convert_default_arg call.
1916 (dubious_conversion_warnings): New function, broken
1917 out of convert_for_assignment.
1918 (convert_for_assignment): Adjust.
1919
1920 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
1921
1922 * decl2.c (key_method): Break out from...
1923 (import_export_vtable, import_export_class): ...here.
1924
1925 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
1926 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
1927
1928 * search.c (note_debug_info_needed, dfs_debug_mark,
1929 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
1930 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
1931
1932 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
1933
1934 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
1935 typos.
1936
1937 2000-03-02 Mark Mitchell <mark@codesourcery.com>
1938
1939 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
1940 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
1941 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
1942 (lang_type): Split gets_new into has_new and has_array_new.
1943 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
1944 (TYPE_GETS_NEW): Split into ...
1945 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
1946 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
1947 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
1948 (build_op_new_call): Don't declare.
1949 (build_new_1): Likewise.
1950 * call.c (build_op_new_call): Remove.
1951 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
1952 instead of TYPE_NEEDS_DESTRUCTOR.
1953 (finish_struct_bits): Likewise.
1954 (add_implicitly_declared_members): Likewise.
1955 (check_field_decl): Likewise.
1956 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
1957 correctly under the new ABI.
1958 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
1959 instead of TYPE_NEEDS_DESTRUCTOR.
1960 (initialize_local_var): Likewise.
1961 (destroy_local_var): Likewise.
1962 (cp_finish_decl): Likewise.
1963 (register_dtor_fn): Likewise.
1964 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
1965 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
1966 TYPE_VEC_DELETE_TAKES_SIZE here.
1967 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
1968 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
1969 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
1970 (finish_destructor_body): Likewise.
1971 (maybe_build_cleanup_1): Likewise.
1972 * decl2.c (do_static_destruction): Likewise.
1973 * init.c (build_new_1): Make it static.
1974 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
1975 (expand_cleanup_for_base): Likewise.
1976 (get_cookie_size): New function.
1977 (build_new_1): Handle array-new cookies correctly under the new
1978 ABI.
1979 (build_vec_delete_1): Likewise.
1980 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
1981 (build_delete): Likewise.
1982 (build_vec_delete): Handle array-new cookies correctly under the new
1983 ABI.
1984 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
1985 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
1986 TYPE_HAS_ARRAY_NEW_OPERATOR.
1987 * ptree.c (print_lang_type): Check them.
1988 * search.c (context_for_name_lookup): Fix typo in comment.
1989 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
1990 * tree.c (break_out_cleanups): Likewise.
1991 (build_cplus_array_test_1): Likewise.
1992 (cp_build_qualified_type_real): Likewise.
1993 * typeck.c (complete_type): Likewise.
1994
1995 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
1996 the command-line, not the end.
1997
1998 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
1999
2000 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
2001
2002 2000-03-02 Tom Tromey <tromey@cygnus.com>
2003
2004 * cp-tree.h (build_java_class_ref): Declare.
2005 * init.c (build_java_class_ref): No longer static.
2006 * except.c (expand_throw): Generate a Java-style `throw' if the
2007 thrown object is a "Java" object.
2008 (initialize_handler_parm): Generate a Java-style lookup of
2009 exception info if the caught object is a "Java" object.
2010 (catch_language, catch_language_init): New globals.
2011 (decl_is_java_type): New function.
2012 (expand_start_catch_block): Don't call push_eh_info() or
2013 push_eh_cleanup() when handling a Java-style "catch". Pass Java
2014 class reference to build_catch_block.
2015
2016 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2017
2018 * typeck.c (comptypes): Treat sizetype like its language equivalent.
2019
2020 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
2021
2022 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
2023 to merge reference/pointer code and fix incorrect warnings.
2024
2025 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
2026
2027 * search.c (protected_accessible_p): Use context_for_name_lookup.
2028
2029 * init.c (construct_virtual_bases): Fix thinko.
2030 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
2031
2032 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
2033
2034 * decl.c (current_function_decl): Move to toplev.c.
2035
2036 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
2037
2038 * pt.c (fn_type_unification): Unify return type, whenever
2039 provided.
2040 (get_bindings_real): Only pass return type when necessary.
2041 Remove explicit return type check.
2042 * class.c (resolve_address_of_overloaded_function): Pass desired
2043 return type to fn_type_unification.
2044
2045 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2046
2047 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
2048 DECL_FIELD_SIZE.
2049 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
2050 DECL_FIELD_SIZE.
2051 * rtti.c (expand_class_desc): Likewise.
2052 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
2053 (THUNK_VCALL_OFFSET): Likewise.
2054 (THUNK_DELTA): Reflect changes in ../tree.h.
2055
2056 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
2057
2058 * search.c (protected_accessible_p): Also allow the access if
2059 the member is public in DERIVED. Lose TYPE parm.
2060 (friend_accessible_p): Lose TYPE parm.
2061 (accessible_p): Adjust.
2062
2063 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2064
2065 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
2066 on things that are not sizes; ssize_binop deleted.
2067 Call size_diffop when appropriate.
2068 (dfs_build_vcall_offset_vtbl_entries): Likewise.
2069 (build_primary_vtable, build_secondary_vtable): Likewise.
2070 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
2071 Variable I is HOST_WIDE_INT.
2072 (get_vfield_offset): Pass proper types to size_binop.
2073 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
2074 (finish_struct_1): Likewise.
2075 (skip_rtti_stuff): Arg N is now pointer to signed.
2076 (layout_class_type): Use size_zero_node.
2077 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
2078 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
2079 * decl.c (complete_arry_type): Pass proper types to size_binop.
2080 (xref_basetypes): BINFO_OFFSET is sizetype.
2081 * error.c (dump_expr): Don't use size_binop non-sizes.
2082 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
2083 * init.c (construct_virtual_bases): Fix type error.
2084 (build_vec_delete_1): Pass proper type to size_binop and don't
2085 fold result.
2086 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
2087 * rtti.c (get_base_offset): Pass proper type to size_binop.
2088 * search.c (dfs_find_vbases): Fix type error.
2089 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
2090 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
2091 * tree.c (debug_binfo): Variable N is signed.
2092 Use HOST_WIDE_INT_PRINT_DEC.
2093 * typeck.c (comptypes): sizetype is same as equivalent integer type.
2094 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
2095 size_one_node and size_zero_node.
2096 (c_alignof): Use size_one_node.
2097 (build_component_addr): Pass proper types to size_binop.
2098 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
2099
2100 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
2101
2102 Implement class scope using-declarations for functions.
2103 * class.c (handle_using_decl): Call add_method for used functions.
2104 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
2105 (add_method): Used functions are hidden by local functions.
2106 (check_bases_and_members): Handle using-decls before finalizing
2107 CLASSTYPE_METHOD_VEC.
2108 * call.c (add_function_candidate): Add ctype parm; if non-zero,
2109 override the type of 'this' accordingly.
2110 (add_template_candidate, add_template_candidate_real): Add ctype parm.
2111 (convert_class_to_reference, build_user_type_conversion_1,
2112 build_new_function_call, build_object_call, build_new_op,
2113 build_new_method_call): Pass ctype parm.
2114
2115 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
2116 the baselink.
2117 * call.c (convert_class_to_reference, build_user_type_conversion_1,
2118 build_new_function_call, build_object_call, build_new_op,
2119 build_new_method_call, build_op_delete_call): Don't get basetype_path
2120 from a baselink.
2121 * typeck.c (build_component_ref): Likewise.
2122 * init.c (build_offset_ref): Likewise.
2123 (resolve_offset_ref): Don't call enforce_access.
2124 Call build_scoped_ref.
2125 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
2126 would cause an error or if -pedantic.
2127 * class.c (alter_access): Lose binfo parm.
2128
2129 2000-02-26 Mark Mitchell <mark@codesourcery.com>
2130
2131 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
2132 types.
2133
2134 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
2135
2136 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
2137 pseudo_type_info creation into the std namespace
2138
2139 2000-02-26 Mark Mitchell <mark@codesourcery.com>
2140
2141 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
2142 (import_export_class): Remove declaration.
2143 * decl2.c (import_export_class): Make it static.
2144 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
2145 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
2146 EXPR_WITH_FILE_LOCATION.
2147 * lex.c (check_newline): Tweak filename/lineno setting.
2148 * semantics.c (begin_while_stmt): Fix typo in comment.
2149
2150 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2151
2152 * lang-options.h (-fmessage-length=): Add missing option.
2153
2154 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
2155
2156 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
2157
2158 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
2159
2160 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
2161
2162 * optimize.c (expand_call_inline): Emit the return label before
2163 evaluating the return value.
2164
2165 2000-02-24 Mark Mitchell <mark@codesourcery.com>
2166
2167 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
2168 than duplicating functionality here.
2169 * optimize.c: Include input.h.
2170 (expand_call_inline): Use push_srcloc and pop_srcloc.
2171 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
2172 * parse.c: Regenerated.
2173 * Makefile.in (lex.o): Depend on input.h.
2174 (optimize.o): Likewise.
2175
2176 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
2177
2178 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
2179 function type, rather than ICE.
2180
2181 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
2182
2183 * decl.c (grokdeclarator): Call decl_type_access_control.
2184 * parse.y (parse_end_decl): Don't call decl_type_access_control if
2185 decl is null.
2186
2187 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
2188
2189 * decl.c (decls_match): Remove obsolete static member nadgering.
2190
2191 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2192
2193 * decl.c (grokdeclarator): Change ANSI to ISO.
2194 * lex.c (consume_string, readescape, do_identifier): Likewise.
2195 (parse_float, real_yylex): Likewise.
2196 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
2197 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
2198 new_type_id, maybe_label_decls, simple_stmt,
2199 for.init.statement): Likewise.
2200 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
2201 * semantics.c (finish_named_return_value): Likewise.
2202 * parse.c: Regenerate.
2203
2204 2000-02-21 Mark Mitchell <mark@codesourcery.com>
2205
2206 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
2207 (CPTI_CLASS_STAR_TYPE): Remove.
2208 (vtable_index_type): Likewise.
2209 (class_star_type_node): Remove.
2210 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
2211 (build_binary_op_nodefault): Remove.
2212 * call.c (build_new_op): Use build_binary_op instead of
2213 build_binary_op_nodefault.
2214 * decl.c (init_decl_processing): Remove class_star_type_node
2215 initialization. Make delta_type_node ptrdiff_type_node under the
2216 new ABI. Initialize vtable_index_type.
2217 (build_ptrmemfunc_type): Build different structures for the new
2218 ABI.
2219 (build_enumerator): Use build_binary_op instead of
2220 build_binary_op_nodefault.
2221 * method.c (build_overload_value): Mangle pointers-to-members
2222 appropriately under the new ABI.
2223 * typeck.c (build_array_ref): Use build_binary_op instead of
2224 build_binary_op_nodefault.
2225 (get_member_function_from_ptrfunc): Adjust for the new ABI.
2226 (build_binary_op_nodefault): Rename to ...
2227 (build_binary_op): ... this. Remove old version. Adjust for
2228 pointer-to-member comparisons under the new ABI.
2229 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
2230 (build_ptrmemfunc): Adjust for the new ABI.
2231 (expand_ptrmemfunc_cst): Likewise.
2232 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
2233 (pfn_from_ptrmemfunc): Adjust for the new ABI.
2234
2235 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
2236
2237 * call.c (build_object_call): Compress consecutive calls to
2238 cp_error.
2239 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
2240 (build_op_delete_call): Adjust message formatting.
2241
2242 * class.c (check_bases): Compress consecutive calls to
2243 cp_pedwarn.
2244 (finish_struct_anon): Say 'ISO C++'.
2245
2246 * decl.c (start_decl): Same here.
2247 (grok_reference_init): Likewise.
2248 (grokfndecl): Correct message formatting.
2249 (grokfndecl): Improve diagnostic.
2250 (check_static_variable_definition): Likewise. Say 'ISO C++'
2251 (compute_array_index_type): Say 'ISO C++'
2252 (create_array_type_for_decl): Compress consecutive calls to
2253 cp_error.
2254 (grokdeclarator): Say 'ISO C++'
2255 (grok_op_properties): Likewise.
2256
2257 * decl2.c (delete_sanity): Clairify diagnostic.
2258 (check_member_template): Same here.
2259 (grok_function_init): Use consistent terminology.
2260
2261 * expr.c (do_case): Say 'ISO C++'
2262
2263 * friend.c (do_friend): Compress consecutive calls to warning.
2264
2265 2000-02-20 Mark Mitchell <mark@codesourcery.com>
2266
2267 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
2268 * class.c (build_secondary_vtable): Reorganize. Don't create a
2269 new vtable under the new ABI.
2270 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
2271 computing the size.
2272 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
2273 the initializing elements.
2274 (initialize_vtable): New function.
2275 (dfs_finish_vtbls): Use it.
2276 (dfs_accumulate_vtbl_inits): New function.
2277 (finish_vtbls): Merge primary and secondary vtables under the new
2278 ABI.
2279 (finish_struct_1): Remove redundant call to layout_vtable_decl.
2280 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
2281 aren't VAR_DECLs.
2282
2283 * class.c (build_vtable): New function, split out from ...
2284 (get_vtable_decl): ... here, and ...
2285 (build_secondary_vtable): ... here.
2286
2287 * pt.c (tsubst_decl): Fix formatting.
2288
2289 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2290
2291 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
2292 (avoid_overlap, build_base_field): Likewise.
2293 (build_base_field, build_base_fields, is_empty_class):
2294 Test DECL_SIZE with integer_zero.
2295 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
2296 * cp-tree.h (struct lang_type): New field size_unit.
2297 (CLASSTYPE_SIZE_UNIT): New macro.
2298 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
2299 (cp_finish_decl): Delete -Wlarger-than processing.
2300 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
2301 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
2302 * tree.c (make_binfo): binfo vector is one entry longer.
2303 (walk_tree): Walk DECL_SIZE_UNIT.
2304
2305 2000-02-19 Mark Mitchell <mark@codesourcery.com>
2306
2307 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
2308 comment.
2309 (build_vtable_entry): Don't assume all vtable entries are
2310 functions.
2311 (build_vtbl_initializer): Adjust accordingly.
2312 (get_vtable_decl): Fix formatting.
2313
2314 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
2315
2316 * semantics.c (deferred_type_access_control): Walk the entire
2317 type_lookups list.
2318 (save_type_access_control): Rename from
2319 initial_deferred_type_access_control. Just remember the value.
2320 (decl_type_access_control): New fn.
2321 (begin_function_definition): Use deferred_type_access_control, after
2322 we've started the function. Set type_lookups to error_mark_node.
2323 * parse.y (frob_specs, fn.def1): Adjust.
2324 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
2325 (parse_end_decl, parse_bitfield0, parse_method): New fns.
2326 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
2327 (after_type_component_declarator0): Likewise.
2328 (after_type_component_declarator): Likewise.
2329 (notype_component_declarator): Likewise.
2330 * cp-tree.h: Adjust.
2331
2332 * decl.c (redeclaration_error_message): Allow redeclaration of
2333 namespace-scope decls.
2334
2335 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
2336
2337 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
2338
2339 2000-02-17 Mark Mitchell <mark@codesourcery.com>
2340
2341 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
2342 * decl2.c (grokclassfn): Likewise.
2343
2344 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
2345
2346 * decl2.c (lang_decode_option): Don't set default message length
2347 here.
2348 * lex.c (lang_init_options): Set it here.
2349
2350 2000-02-16 Mark Mitchell <mark@codesourcery.com>
2351
2352 Make DECL_CONTEXT mean the class in which a member function was
2353 declared, even for a virtual function.
2354 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
2355 (DECL_FRIEND_CONTEXT): New macro.
2356 (DECL_REAL_CONTEXT): Remove.
2357 (SET_DECL_FRIEND_CONTEXT): Likewise.
2358 (DECL_VIRTUAL_CONTEXT): Adjust.
2359 (DECL_CLASS_SCOPE_P): Use TYPE_P.
2360 (add_friends): Remove.
2361 (hack_decl_function_context): Likewise.
2362 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
2363 CP_DECL_CONTEXT.
2364 (build_over_call): Fix indentation. Use DECL_CONTEXT
2365 instead of DECL_CLASS_CONTEXT.
2366 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
2367 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
2368 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
2369 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
2370 (build_base_field): Likewise.
2371 (finish_struct_1): Likewise.
2372 (build_self_reference): Likewise.
2373 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
2374 DECL_REAL_CONTEXT.
2375 (pushtag): Use decl_function_context, not
2376 hack_decl_function_context.
2377 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
2378 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
2379 (pushdecl): Remove bogus code.
2380 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
2381 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
2382 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
2383 Use decl_function_context, nothack_decl_function_context.
2384 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
2385 (grokdeclarator): Likewise. Use decl_function_context, not
2386 hack_decl_function_context.
2387 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
2388 (start_function): Use DECL_FRIEND_CONTEXT, not
2389 DECL_CLASS_CONTEXT. Use decl_function_context, not
2390 hack_decl_function_context.
2391 (finish_function): Use decl_function_context, not
2392 hack_decl_function_context.
2393 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
2394 DECL_CLASS_CONTEXT.
2395 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
2396 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
2397 (grokfield): Likewise.
2398 (finish_builtin_type): Likewise.
2399 (finish_vtable_vardec): Use decl_function_context, not
2400 hack_decl_function_context.
2401 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
2402 (start_static_initialization_or_destruction): Likewise.
2403 (finish_static_initialization_or_destruction): Likewise.
2404 (mark_used): Adjust logic for deciding when to synthesize methods.
2405 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
2406 DECL_REAL_CONTEXT.
2407 * error.c (dump_function_decl): Use DECL_CONTEXT, not
2408 DECL_CLASS_CONTEXT.
2409 * friend.c (is_friend): Likewise.
2410 (add_friends): Remove.
2411 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
2412 * lex.c (begin_definition_of_inclass_inline): Use
2413 decl_function_context, not hack_decl_function_context.
2414 (process_next_inline): Likewise.
2415 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
2416 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
2417 DECL_CLASSS_CONTEXT.
2418 (hack_identifier): Likewise.
2419 (synthesize_method): Use decl_function_context, not
2420 hack_decl_function_context.
2421 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
2422 DECL_REAL_CONTEXT.
2423 (is_member_template): Use decl_function_context, not
2424 hack_decl_function_context. Use DECL_CONTEXT, not
2425 DECL_CLASS_CONTEXT.
2426 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
2427 DECL_CLASS_CONTEXT.
2428 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
2429 DECL_REAL_CONTEXT.
2430 (push_template_decl_real): Likewise.
2431 (instantiate_class_template): Don't call add_friends.
2432 (tsubst_default_argument): Use DECL_CONTEXT, not
2433 DECL_REAL_CONTEXT.
2434 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
2435 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
2436 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
2437 DECL_CLASS_CONTEXT.
2438 * repo.c (repo_inline_used): Likewise.
2439 * search.c (current_scope): Adjust for new _CONTEXT macros.
2440 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
2441 DECL_REAL_CONTEXT.
2442 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
2443 (lookup_fnfields_here):Likewise.
2444 (check_final_overrider): Likewise.
2445 (init_vbase_pointers): Likewise.
2446 (virtual_context): Likewise.
2447 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
2448 (expand_body): Use decl_function_context, not
2449 hack_decl_function_context.
2450 * tree.c (hack_decl_function_context): Remove.
2451 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
2452 DECL_CLASS_CONTEXT.
2453 * typeck2.c (error_not_base_type): Likewise.
2454
2455 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
2456
2457 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
2458
2459 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2460
2461 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
2462
2463 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
2464
2465 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
2466
2467 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
2468
2469 * decl2.c (lang_decode_option): Enable automatic line wrapping.
2470
2471 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
2472
2473 * parse.y (frob_specs): Split out...
2474 (parse_decl): From here.
2475 (fn.def2): Call initial_deferred_type_access_control.
2476 (after_type_component_declarator0): Call frob_specs.
2477 (notype_component_declarator0): Likewise.
2478 * search.c (friend_accessible_p): Nested classes are friends of their
2479 enclosing classes.
2480
2481 2000-02-10 Mark Mitchell <mark@codesourcery.com>
2482
2483 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
2484 used to create an implicit temporary.
2485
2486 * class.c (dfs_modify_vtables): Tweak calculation of functions to
2487 override.
2488
2489 2000-02-08 Nathan Sidwell <nathan@acm.org>
2490
2491 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
2492 strip array element qualifiers too.
2493
2494 2000-02-07 Mark Mitchell <mark@codesourcery.com>
2495
2496 * decl.c (store_parm_decls): Don't build cleanups for parameters
2497 while processing_template_decl.
2498
2499 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
2500
2501 * cp-tree.h (struct saved_scope): Add incomplete field.
2502 (namespace_scope_incomplete): New macro.
2503 * decl.c (pushdecl): Use it.
2504 (hack_incomplete_structures): Use it. See through artificial
2505 binding levels.
2506 (mark_saved_scope): Mark it.
2507
2508 Implement access control for nested types.
2509 * search.c (type_access_control): New fn.
2510 (accessible_p): Now we do perform access control for types.
2511 * semantics.c (deferred_type_access_control): New fn.
2512 (initial_deferred_type_access_control): New fn.
2513 (begin_function_definition): Call it. Add lookups parm.
2514 * decl.c (struct binding_level): Add this_class field.
2515 (pushlevel_class): Set it.
2516 (mark_binding_level): Mark it.
2517 (lookup_name_real): Use it. Call type_access_control.
2518 (mark_saved_scope): Mark lookups field.
2519 * cp-tree.h (flagged_type_tree): Add lookups field.
2520 (struct saved_scope): Add lookups field.
2521 (type_lookups): New macro.
2522 * parse.y (declmods): Now <ftype>.
2523 (parse_decl): Add lookups parm. Call
2524 initial_deferred_type_access_control.
2525 (lang_extdef): Clear type_lookups.
2526 (typed_declspecs, declmods, typespec): Set lookups field.
2527 (initdcl): Call deferred_type_access_control.
2528 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
2529 component_decl_1, named_parm): Adjust.
2530 * friend.c (is_friend): Nested classes are friends of their
2531 enclosing classes.
2532
2533 * class.c (currently_open_derived_class): New fn.
2534 * method.c (hack_identifier): Use it.
2535
2536 * lex.c (do_identifier): Remove obsolete code.
2537
2538 * parse.y (typed_typespecs): Propagate new_type_flag properly.
2539
2540 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
2541
2542 * tinfo.h: Remove apostrophes from C++ comment (xgettext
2543 thinks this file is plain C).
2544
2545 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2546
2547 * Makefile.in (call.o): Depend on $(EXPR_H).
2548
2549 * call.c: Include "expr.h".
2550
2551 * class.c (dump_class_hierarchy): Add prototype.
2552
2553 * search.c (dfs_get_pure_virtuals): Likewise.
2554
2555 2000-02-1 Ulrich Drepper <drepper@redhat.com>
2556
2557 * parse.y (simple_stmt): Allow :: token in asm parameter list.
2558 * parse.c: Rebuilt.
2559
2560 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
2561
2562 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
2563 Store it in DECL_FCONTEXT.
2564 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
2565
2566 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
2567
2568 * tinfo.h (old abi): #include "tconfig.h".
2569 * tinfo.cc (convert_to_base): Move into old abi section.
2570
2571 2000-01-31 Mark Mitchell <mark@codesourcery.com>
2572
2573 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
2574 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
2575 (BINFO_PRIMARY_BINFO): New macro.
2576 (BF_DELTA): Rename to ...
2577 (BV_DELTA): ... this.
2578 (BF_VCALL_INDEX): Rename to ...
2579 (BV_VCALL_INDEX): ... this.
2580 (BF_FN): Rename to ...
2581 (BV_FN): ... this.
2582 * class.c (build_vbase_path): Adjust for changes to reverse_path.
2583 (set_rtti_entry): Rename BF_ macros to BV_ variants.
2584 (modify_vtable_entry): Simplify.
2585 (add_virtual_function): Rename BF_ macros to BV_ variants.
2586 (build_vtable_initializer): Likewise.
2587 (get_class_offset_1): Remove.
2588 (dfs_get_class_offset): Likewise.
2589 (get_class_offset): Likewise.
2590 (dfs_find_final_overrider): New function.
2591 (find_final_overrider): Likewise.
2592 (modify_one_vtable): Remove.
2593 (dfs_find_base): New function.
2594 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
2595 find_final_overrider.
2596 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
2597 virtuals.
2598 (dfs_fixup_vtable_deltas): Remove.
2599 (override_one_vtable): Remove.
2600 (merge_overrides): Likewise.
2601 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
2602 unreal chilren of virtual bases.
2603 (finish_struct_1): Don't use merge_overrides. Don't use
2604 dfs_fixup_vtable_deltas.
2605 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
2606 BINFOs.
2607
2608 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
2609 Jason Merrill <jason@yorick.cygnus.com>
2610
2611 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
2612
2613 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
2614
2615 * exception.cc (__throw_bad_typeid): Add missing std::.
2616
2617 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2618
2619 * cp-tree.h (make_thunk): PROTO -> PARAMS.
2620
2621 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
2622
2623 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
2624
2625 Runtime support for new-abi rtti.
2626 * inc/typeinfo (type_info::operator!=): Define in class.
2627 (type_info::before, type_info::name, type_info::operator==,
2628 type_info::operator!=): Define new ABI implementations.
2629 (type_info::is_pointer_p, type_info::is_function_p): Declare
2630 new virtual functions.
2631 (type_info::do_catch, type_info::do_upcast): Likewise.
2632
2633 * tinfo.h (__base_class_info): Define new class.
2634 (__class_type_info): Likewise.
2635 (__si_class_type_info): Likewise.
2636 (__vmi_class_type_info): Likewise.
2637 (__dynamic_cast): Prototype.
2638
2639 * tinfo.cc: Conditionalize old and new rtti mechanisms.
2640 (type_info::is_pointer_p): Define new function.
2641 (type_info::is_function_p): Likewise.
2642 (type_info::do_catch): Likewise.
2643 (type_info::do_upcast): Likewise.
2644 (vtable_prefix): New structure for vtable access.
2645 (adjust_pointer): Define new template function.
2646 (contained_p, public_p, virtual_p, contained_public_p,
2647 contained_nonpublic_p, contained_nonvirtual_p): Define new
2648 functions.
2649 (nonvirtual_base_type): New local variable.
2650 (__class_type_info::~__class_type_info): Define.
2651 (__si_class_type_info::~__si_class_type_info): Likewise.
2652 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
2653 (__class_type_info::do_catch): Define new function.
2654 (__class_type_info::do_upcast): Likewise.
2655 (__class_type_info::find_public_src): Likewise.
2656 (__class_type_info::do_find_public_src): Likewise.
2657 (__si_class_type_info::do_find_public_src): Likewise.
2658 (__vmi_class_type_info::do_find_public_src): Likewise.
2659 (__class_type_info::do_dyncast): Likewise.
2660 (__si_class_type_info::do_dyncast): Likewise.
2661 (__vmi_class_type_info::do_dyncast): Likewise.
2662 (__class_type_info::do_upcast): Likewise.
2663 (__si_class_type_info::do_upcast): Likewise.
2664 (__vmi_class_type_info::do_upcast): Likewise.
2665 (__dynamic_cast): Likewise.
2666
2667 * tinfo2.cc (__fundamental_type_info): Define new class.
2668 (__pointer_type_info): Likewise.
2669 (__reference_type_info): Likewise.
2670 (__array_type_info): Likewise.
2671 (__function_type_info): Likewise.
2672 (__enum_type_info): Likewise.
2673 (__ptr_to_member_type_info): Likewise.
2674 (__fundamental_type_info::~__fundamental_type_info): Define.
2675 (__pointer_type_info::~__pointer_type_info): Likewise.
2676 (__reference_type_info::~__reference_type_info): Likewise.
2677 (__array_type_info::~__array_type_info): Likewise.
2678 (__function_type_info::~__function_type_info): Likewise.
2679 (__enum_type_info::~__enum_type_info): Likewise.
2680 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
2681 (__pointer_type_info::do_catch): Define new function.
2682 (__ptr_to_member_type_info::do_catch): Define new function.
2683
2684 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
2685 (__is_pointer): Likewise.
2686
2687 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
2688
2689 2000-01-30 Mark Mitchell <mark@codesourcery.com>
2690
2691 * cp/class.c (build_vtable): Rename to build_primary_vtable.
2692 (prepare_fresh_vtable): Rename to build_secondary_vtable.
2693 (make_new_vtable): New function.
2694 (modify_vtable_entry): Handle generation of new vtables correctly.
2695 (modify_one_vtable): Remove unused parameter.
2696 (dfs_fixup_vtable_deltas): Likewise.
2697 (override_one_vtable): Use build_secondary_vtable.
2698 (finish_struct_1): Use build_primary_vtable and
2699 build_secondary_vtable.
2700
2701 2000-01-28 Ulrich Drepper <drepper@redhat.com>
2702
2703 * cp/decl.c: Adjust variable names, comments, help strings.
2704
2705 2000-01-29 Nathan Sidwell <nathan@acm.org>
2706
2707 * new2.cc (operator delete[]): Use operator delete, don't assume
2708 implementation.
2709
2710 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
2711
2712 * class.c (build_vtbl_initializer): Add argument to
2713 build_vtable_entry call.
2714
2715 2000-01-27 Mark Mitchell <mark@codesourcery.com>
2716
2717 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
2718 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
2719 (BF_DELTA): New macro.
2720 (BF_VCALL_INDEX): Likewise.
2721 (BF_FN): Likewise.
2722 (THUNK_VCALL_OFFSET): Likewise.
2723 (make_thunk): Change prototype.
2724 * class.c (build_vtable_entry): Integrate
2725 build_vtable_entry_for_fn. Handle vcall indices.
2726 (build_vtable_entry_for_fn): Remove.
2727 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
2728 BF_VCALL_INDEX, BF_FN.
2729 (modify_vtable_entry): Integrate common code from
2730 modify_one_vtable and dfs_fixup_vtable_deltas.
2731 (add_virtual_function): Set BF_VCALL_INDEX.
2732 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
2733 and BF_FN.
2734 (modify_one_vtable): Simplify.
2735 (dfs_fixup_vtable_deltas): Likewise.
2736 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
2737 * method.c (make_thunk): Handle vcall indices.
2738
2739 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
2740
2741 Compiler side new abi rtti (not enabled).
2742 * cp-tree.h (new_abi_rtti_p): New macro.
2743 (emit_support_tinfos): Prototype new function.
2744 (tinfo_decl_p): Likewise.
2745 (emit_tinfo_decl): Likwise.
2746 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
2747 macros.
2748 (doing_runtime): New local static.
2749 (init_rtti_processing): Add new-abi initializer.
2750 (get_tinfo_decl): Add new-abi logic.
2751 (tinfo_from_decl): Likewise.
2752 (build_dynamic_cast_1): Likewise.
2753 (qualifier_flags): New static function.
2754 (tinfo_base_init): Likewise.
2755 (generic_initializer): Likewise.
2756 (ptr_ref_initializer): Likewise.
2757 (ptmd_initializer): Likewise.
2758 (class_hint_flags): Likewise.
2759 (class_initializer): Likewise.
2760 (synthesize_tinfo_var): Likewise.
2761 (create_real_tinfo_var): Likewise.
2762 (create_pseudo_type_info): Likewise.
2763 (get_vmi_pseudo_type_info): Likewise.
2764 (create_tinfo_types): Likewise.
2765 (emit_support_tinfos): New global function.
2766 (tinfo_decl_p): New global predicate.
2767 (emit_tinfo_decl): New global function.
2768 * class.c (set_rtti_entry): Generalize for old and new rtti.
2769 (build_vtbl_initializer): Likewise.
2770 * decl2.c (finish_file): Likewise.
2771
2772 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
2773
2774 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
2775 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
2776
2777 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
2778
2779 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
2780 for scopes.
2781
2782 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
2783
2784 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
2785
2786 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
2787
2788 * optimize.c (calls_setjmp_r): Supply new argument
2789 to special_function_p.
2790
2791 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2792
2793 * call.c: PROTO -> PARAMS.
2794 * class.c: Likewise.
2795 * cp-tree.h: Likewise.
2796 * cvt.c: Likewise.
2797 * decl.c: Likewise.
2798 * decl.h: Likewise.
2799 * decl2.c: Likewise.
2800 * dump.c: Likewise.
2801 * errfn.c: Likewise.
2802 * error.c: Likewise.
2803 * except.c: Likewise.
2804 * expr.c: Likewise.
2805 * init.c: Likewise.
2806 * input.c: Likewise.
2807 * lex.c: Likewise.
2808 * lex.h: Likewise.
2809 * method.c: Likewise.
2810 * optimize.c: Likewise.
2811 * parse.y: Likewise.
2812 * pt.c: Likewise.
2813 * repo.c: Likewise.
2814 * rtti.c: Likewise.
2815 * search.c: Likewise.
2816 * semantics.c: Likewise.
2817 * spew.c: Likewise.
2818 * tree.c: Likewise.
2819 * typeck.c: Likewise.
2820 * typeck2.c: Likewise.
2821 * xref.c: Likewise.
2822
2823 2000-01-25 Richard Henderson <rth@cygnus.com>
2824
2825 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
2826
2827 2000-01-25 Mark Mitchell <mark@codesourcery.com>
2828
2829 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
2830 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
2831 (struct vcall_offset_data_s): New type.
2832 (dfs_vcall_offset_queue_p): New function.
2833 (dfs_build_vcall_offset_vtbl_entries): Likewise.
2834 (build_vcall_offset_vtbl_entries): Likewise.
2835 (layout_vtable_decl): Likewise.
2836 (num_vfun_entries): Likewise.
2837 (num_extra_vtbl_entries): Add the entries for vcall offsets.
2838 (build_vtbl_initializer): Likewise.
2839 (dfs_finish_vtabls): Use layout_vtable_decl.
2840 (modify_one_vtables): Always duplicate vtables under the new ABI.
2841 (finish_struct_1): Use layout_vtable_decl.
2842
2843 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2844
2845 * decl.c (member_function_or_else): Change third arg from a format
2846 specifier to an `enum overload_flags'. Callers changed.
2847
2848 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
2849
2850 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
2851 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
2852 build_const_cast, get_delta_difference, check_return_expr): Avoid
2853 ANSI string concatenation usage.
2854
2855 2000-01-24 Mark Mitchell <mark@codesourcery.com>
2856
2857 * class.c (layout_class_type): Put the fields required to make a
2858 class non-empty at the end, not the beginning, of the TYPE_FIELDs
2859 list.
2860
2861 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
2862
2863 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
2864 template.
2865
2866 * decl2.c (mark_used): Do instantiate inlines that have been
2867 explicitly instantiated.
2868
2869 2000-01-24 Richard Henderson <rth@cygnus.com>
2870
2871 * call.c (build_over_call): Use expand_tree_builtin.
2872 * typeck.c (build_function_call_real): Likewise.
2873 (build_binary_op_nodefault): Handle unordered compares.
2874
2875 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
2876
2877 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
2878 cp_tree_index values.
2879 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
2880 New global node #defines for them.
2881 * rtti.c (call_void_fn): Replace with ...
2882 (build_runtime_decl): ... new static function.
2883 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
2884 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
2885 (build_dynamic_cast_1): Always produce correctly typed result.
2886 Explicitly produce type_info addresses. Use dynamic_cast_node.
2887 * exception.cc (__throw_bad_cast): Return `void *'.
2888 (__throw_bad_typeid): Return `const type_info &'.
2889
2890 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
2891
2892 * cp-tree.h (get_vtable_decl): Prototype new function.
2893 * class.c (get_vtable_decl): New function. Broken out from ...
2894 (build_vtable): ... here. Use it.
2895 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
2896 by get_vtable_decl.
2897
2898 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
2899
2900 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
2901 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
2902 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
2903 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
2904 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
2905 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
2906 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
2907 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
2908 (CPTI_TINFO_VAR_ID): New enumeration.
2909 (__tp_desc_type_node, __access_mode_type_node,
2910 __bltn_desc_type_node, __user_desc_type_node,
2911 __class_desc_type_node, __ptr_desc_type_node,
2912 __attr_desc_type_node, __func_desc_type_node,
2913 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
2914 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
2915 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
2916 enum_desc_type_node, class_desc_type_node,
2917 si_class_desc_type_node, vmi_class_desc_type_node,
2918 ptmd_desc_type_node, base_desc_type_node): New #defines.
2919 (tinfo_fn_id, tinfo_fn_type): Rename to ...
2920 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
2921 (tinfo_var_id): New enumeration.
2922 (DECL_TINFO_FN_P): Augment comment.
2923 * decl.c (cp_global_trees): Adjust documentation.
2924 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
2925 tinfo_decl_type and tinfo_var_id.
2926 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
2927 (build_typeid): Remove unused variable.
2928 (get_tinfo_var): Use tinfo_var_id.
2929 (tinfo_name): New static function.
2930 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
2931 (tinfo_from_decl): Likewise.
2932 (get_base_offset): New static function, broken out of
2933 expand_class_desc.
2934 (expand_si_desc): Use tinfo_name.
2935 (expand_class_desc): Likewise. Lose local static variable.
2936 Use base_desc_type_node. Use get_base_offset.
2937 (expand_ptr_desc): Use tinfo_name.
2938 (expand_attr_desc): Likewise.
2939 (expand_generic_desc): Likewise.
2940
2941 * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
2942 * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
2943
2944 2000-01-23 Mark Mitchell <mark@codesourcery.com>
2945
2946 * cp-tree.h (__eprintf): Remove declaration.
2947 * tree.c (__eprintf): Remove definition.
2948
2949 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
2950 Mark Mitchell <mark@codesourcery.com>
2951
2952 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
2953 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
2954
2955 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
2956
2957 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
2958
2959 2000-01-23 Mark Mitchell <mark@codesourcery.com>
2960
2961 * cp-tree.h (register_dtor_fn): New function.
2962 * decl.c (destroy_local_static): Rename to ...
2963 (register_dtor_fn): ... this. Give it external linkage.
2964 (expand_static_init): Use it.
2965 * decl2.c (do_static_initialization): Likewise, if using
2966 __cxa_atexit.
2967 (do_static_destruction): Check that __cxa_atexit is not in use.
2968 (finish_file): Don't call do_static_destruction if using
2969 __cxa_atexit.
2970
2971 * typeck.c (convert_arguments): Restore two-message error
2972 reporting.
2973
2974 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
2975
2976 Remap dynamic cast hint values to be consistent across ABIs.
2977 * search.c (dynamic_cast_base_recurse): Remap generated value.
2978 (get_dynamic_cast_base_type): Adjust documentation.
2979 * tinfo.h (__user_type_info::dyncast): Likewise.
2980 (__user_type_info::find_public_subobj): Remap BOFF meaning.
2981 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
2982 (__class_type_info::do_dyncast): Likewise.
2983 (__class_type_info::do_find_public_subobj): Likewise.
2984 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
2985
2986 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
2987
2988 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
2989
2990 * typeck2.c (incomplete_type_error): Restore previous
2991 cp_error and cp_error_at call sequence.
2992
2993 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
2994
2995 * class.c (dump_class_hierarchy): Make format agree with argument;
2996 cast pointer to unsigned long and print with %lx.
2997
2998 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
2999
3000 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
3001
3002 * typeck.c (composite_pointer_type, common_type,
3003 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
3004 build_function_call_real, convert_arguments,
3005 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
3006 build_unary_op, mark_addressable, build_compound_expr,
3007 build_static_cast, build_reinterpret_cast, build_const_cast,
3008 build_c_cast, build_modify_expr, get_delta_difference,
3009 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
3010 'ISO C++'. Fusion consecutive calls to diagnotic message routines
3011 into a single one.
3012 * typeck2.c (readonly_error, abstract_virtuals_error,
3013 process_init_constructor, check_for_new_type): Likewise.
3014
3015 2000-01-19 Mark Mitchell <mark@codesourcery.com>
3016
3017 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
3018 VAR_DECLs.
3019
3020 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
3021
3022 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
3023 (build_x_typeid): Likewise.
3024 (get_tinfo_fn): Likewise.
3025 (get_tinfo_fn_unused): Rename to ...
3026 (get_tinfo_decl): ... here.
3027 * rtti.c (build_headof): Replace logic error with assertion.
3028 (get_tinfo_fn_dynamic): Rename to ...
3029 (get_tinfo_decl_dynamic): ... here. Make static. Use
3030 complete_type_or_else.
3031 (build_x_typeid): Move into ...
3032 (build_typeid): ... here. Adjust call to
3033 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
3034 throw_bad_typeid expression.
3035 (get_tinfo_fn_unused): Rename to ...
3036 (get_tinfo_decl): ... here. Adjust comment.
3037 (get_tinfo_fn): Delete.
3038 (tinfo_from_decl): New static function.
3039 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
3040 (get_typeid): Use complete_type_or_else.
3041 (build_dynamic_cast_1): Adjust calls to
3042 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
3043 * parse.y (primary): Adjust call to build_typeid.
3044 * except.c (build_eh_type_type_ref): Adjust call to
3045 get_tinfo_decl. Mark as used.
3046 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
3047 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
3048 * parse.c: Regenerated.
3049
3050 2000-01-17 Mark Mitchell <mark@codesourcery.com>
3051
3052 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
3053 calling convention.
3054 (resolves_to_fixed_type_p): Document calling convention.
3055 * rtti.c (build_x_typeid): Initialize NONNULL.
3056
3057 * cp-tree.h (build_shared_int_cst): New function.
3058 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
3059 * class.c (modify_vtable_entry): Likewise.
3060 (add_virtual_function): Split out code to generated shared
3061 INTEGER_CSTs to build_share_int_cst.
3062 (modify_all_vtables): Handle all the overridden functions here.
3063 Add overridden functions from non-primary virtual bases to the
3064 primary vtable.
3065 (finish_struct_1): Adjust call to modify_all_vtables. Add
3066 overridden functions from non-primary bases to the vtable.
3067 * tree.c (build_shared_int_cst): New function.
3068
3069 * cp-tree.h (scratchalloc): Remove.
3070 (build_scratch_list): Likewise.
3071 * call.c (convert_class_to_reference): Replace build_scratch_list
3072 and build_expr_list with build_tree_list.
3073 (add_candidate): Replace scratchalloc with expralloc. Note memory
3074 leak.
3075 (build_user_type_conversion_1): Replace build_scratch_list
3076 and build_expr_list with build_tree_list.
3077 (build_new_op): Likewise.
3078 (build_op_delete_call): Likewise.
3079 (convert_like): Likewise.
3080 * cvt.c (ocp_convert): Likewise.
3081 * decl.c (start_decl): Likewise.
3082 (start_function): Likewise.
3083 (finish_destructor_body): Likewise.
3084 (maybe_build_cleanup_1): Likewise.
3085 * decl2.c (reparse_decl_as_expr): Likewise.
3086 * init.c (perform_member_init): Likewise.
3087 (expand_cleanup_for_base): Likewise.
3088 (build_builtin_delete_call): Likewise.
3089 (build_new_1): Likewise.
3090 (build_delete): Likewise.
3091 * method.c (do_build_assign_ref): Likewise.
3092 * parse.y (already_scoped_stmt): Likewise.
3093 (nontrivial_exprlist): Likewise.
3094 (net_initializer): Likewise.
3095 (initlist): Likewise.
3096 * parse.c: Regenerated.
3097 * rtti.c (build_x_typeid): Likewise.
3098 (build_dynamic_cast_1): Likewise.
3099 * typeck.c (build_x_compound_expr): Likewise.
3100 (build_static_cast): Likewise.
3101 (build_modify_expr): Likewise.
3102
3103 * cp-tree.h (DECL_VINDEX): Add documentation.
3104 * class.c (build_vtable_entry): Likewise.
3105 (start_vtable): Add comment.
3106 (add_virtual_function): Replace pending_hard_virtuals with
3107 overridden_virtuals and pending_virtuals with new_virtuals.
3108 Replace redundant assignments with assertions.
3109 (check_for_override): Add comment.
3110 (check_bases_and_members): Replace pending_hard_virtuals with
3111 overridden_virtuals and pending_virtuals with new_virtuals.
3112 (create_vtbl_ptr): Likewise.
3113 (layout_class_type): Likewise.
3114 (finish_struct_1): Likewise. Add comments.
3115
3116 2000-01-16 Mark Mitchell <mark@codesourcery.com>
3117
3118 * class.c (finish_struct_1): Replace redundant code with
3119 assertions.
3120
3121 * cp-tree.h (flag_new_abi): Move.
3122 (flag_use_cxa_atexit): Likewise.
3123 (flag_honor_std): Likewise.
3124 (flag_rtti): Likewise.
3125 (vbase_offsets_in_vtable_p): Define.
3126 (vptrs_present_everywhere_p): Likewise.
3127 (TYPE_CONTAINS_VPTR_P): Likewise.
3128 (dfs_walk_real): Declare.
3129 * class.c (build_vbase_pointer_fields): Check
3130 vbase_offsets_in_vtable_p.
3131 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
3132 BINFO_VPTR_FIELD.
3133 (build_vbase_offset_vtbl_entries): Simplify.
3134 (build_vbase_offset_vtbl_entries): Adjust.
3135 (build_vbase_pointer): Add ability to look up vbase offsets in
3136 vtable.
3137 (start_vtable): New function.
3138 (add_virtual_function): Use it.
3139 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
3140 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
3141 (build_vtbl_initializer): Take the type of the complete object as
3142 input. Use it to correctly calculate vbase offsets.
3143 (dfs_finish_vtbls): Pass the complete type to
3144 build_vtbl_initializer.
3145 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
3146 (create_vtable_ptr): Create a vtable even if there are no
3147 new virtual functions, under the new ABI.
3148 (finish_struct_1): Likewise.
3149 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
3150 * decl.c (exapnd_static_init): Remove call to
3151 preserve_initializer.
3152 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
3153 vtables.
3154 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
3155 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
3156 (construct_virtual_bases): Don't initialize virtual base pointers
3157 under the new ABI.
3158 (build_aggr_init): Clean up comment.
3159 (expand_aggr_init_1): Likewise.
3160 * rtti.c (expand_class_desc): Store the virtual function table
3161 index where the vbase offset lives in the offset field.
3162 * search.c (dfs_walk_real): Make it global.
3163 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
3164 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
3165
3166 * tinfo.h (USItype): Make it signed under the new ABI.
3167 * tinfo.cc (convert_to_base): New function. Encapsulate base
3168 conversion logic here.
3169 (__class_type_info::do_upcast): Use it.
3170 (__class_type_info::do_dyncast): Likewise.
3171 (__class_type_info::do_find_public_subobj): Likewise.
3172
3173 * init.c (construct_virtual_bases): Don't look up the addresses of
3174 virtual bases at run-time.
3175
3176 * class.c (build_vbase_pointer): Relocate.
3177 (build_vbase_pointer_fields): Likewise.
3178 (dfs_build_vbase_offset_vtbl_entries): Likewise.
3179 (build_vbase_offset_vtbl_entries): Likewise.
3180
3181 * decl.c (init_decl_processing): Complain if -fnew-abi
3182 -fno-vtable-thunks is used.
3183
3184 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
3185 flag_new_abi.
3186
3187 2000-01-15 Mark Mitchell <mark@codesourcery.com>
3188
3189 * cp-tree.h (num_extra_vtbl_entries): New function.
3190 (size_extra_vtbl_entries): Likewise.
3191 (dfs_vtable_path_unmark): Likewise.
3192 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
3193 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
3194 * class.c (num_extra_vtbl_entries): New function.
3195 (size_extra_vtbl_entries): Likewise.
3196 (dfs_build_vbase_offset_vtbl_entries): New function.
3197 (build_vbase_offset_vtbl_entries): Likewise.
3198 (build_vtbl_initializer): Use it.
3199 (finish_struct_1): Adjust vtable sizes (using
3200 num_extra_vtbl_entries).
3201 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
3202 THUNK_DECL is non-NULL before expanding it.
3203 * init.c (expand_virtual_init): Adjust the vtable pointer by
3204 size_extra_vtbl_entries before storing it.
3205 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
3206 Handle TREE_LIST parameters here, not in the dfs_* functions.
3207 (dfs_unmarked_real_bases_queue_p): Adjust.
3208 (dfs_marked_real_bases_queue_p): Likewise.
3209 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
3210 (dfs_vtable_path_marked_real_bases_queue_p): New function.
3211 (dfs_vtable_path_unmark): Likewise.
3212
3213 2000-01-14 Mark Mitchell <mark@codesourcery.com>
3214
3215 * optimize.c (copy_body_r): Clear the operand three of a
3216 TARGET_EXPR when copying it.
3217
3218 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3219
3220 * method.c (build_decl_overload_real): Check whether we are in ::
3221 before returning __builtin_new/delete.
3222
3223 2000-01-13 Mark Mitchell <mark@codesourcery.com>
3224
3225 * pt.c (tsubst_friend_function): Improve comment.
3226 (instantiate_decl): Avoid crashing when a "nested" function is
3227 instantiated from the top level.
3228
3229 * dump.c (dqeueue_and_dump): Dump
3230 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
3231
3232 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3233
3234 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
3235
3236 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
3237
3238 * g++spec.c (lang_specific_driver): Add -fnew-abi if
3239 ENABLE_NEW_GXX_ABI defined.
3240 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
3241 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
3242 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
3243
3244 2000-01-12 Mark Mitchell <mark@codesourcery.com>
3245
3246 * decl.c (start_cleanup_fn): Call pushdecl.
3247
3248 * call.c (convert_class_to_reference): Fix typos.
3249 (build_conditional_expr): Handle errors gracefully.
3250 * class.c (push_nested_class): Likewise.
3251 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
3252 (DECL_THIS_EXTERN): Use it.
3253 (DECL_THIS_STATIC): Likewise.
3254 * cvt.c (convert_to_void): Handle errors gracefully.
3255 (build_expr_type_conversion): Likewise.
3256 * decl.c (maybe_push_decl): Likewise.
3257 (start_decl_1): Likewise.
3258 (require_complete_types_for_parms): Likewise.
3259 * parse.y (structsp): Likewise.
3260 (base_class): Likewise.
3261 * parse.c: Regenerated.
3262 * pt.c (finish_member_template_decl): Likewise.
3263 * typeck.c (decay_conversion): Likewise.
3264
3265 * cp-tree.h (dfs_skip_vbases): New function.
3266 (find_vbase_instance): Likewise.
3267 * class.c (determine_primary_base): Allow a nearly empty base to
3268 serve as a primary base class under the new ABI.
3269 (get_class_offset_1): Rename to ...
3270 (dfs_get_class_offset): ... this. Simplify. Don't issue error
3271 messages here.
3272 (get_class_offset): Use it. Issue error messages here.
3273 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
3274 find the right copies of virtual bases.
3275 (fixup_vtable_deltas1): Rename to ...
3276 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
3277 bases as primary bases.
3278 (fixup_vtable_deltas): Remove.
3279 (override_one_vtable): Handle virtual bases as primary bases.
3280 (merge_overrides): Likewise.
3281 (finish_struct_1): Likewise.
3282 (dump_class_hierarchy): Dump primary-ness of bases as well.
3283 * search.c (mark_primary_bases): Use a pre-order traversal to
3284 handle primary virtual bases.
3285 (dfs_skip_vbases): New fiunction.
3286 (expand_upcast_fixups): Adjust to handle primary virtual bases.
3287 (fixup_virtual_upcast_offsets): Likewise.
3288 (fixup_all_virtual_upcast_offsets): Likewise.
3289 (dfs_find_vbase_instances): New function.
3290 (find_vbase_instance): Likewise.
3291
3292 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
3293
3294 * lex.c (DIR_SEPARATOR): Delete macro.
3295
3296 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
3297
3298 * decl2.c (lang_decode_option): Handle automatic line wrapping
3299 option.
3300
3301 2000-01-11 Mark Mitchell <mark@codesourcery.com>
3302
3303 * friend.c (do_friend): Don't resolve scopes when processing
3304 template declarations, even if the qualifying scope doesn't
3305 involve template parameters.
3306
3307 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
3308
3309 * class.c (dfs_modify_vtables_queue_p): Remove.
3310 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
3311 and dfs_marked_real_bases_queue_p instead of
3312 dfs_modify_vtables_queue_p.
3313
3314 * class.c (build_vbase_path): Simplify.
3315 (dfs_propagate_binfo_offsets): New function.
3316 (propagate_binfo_offsets): Use it.
3317 (remove_base_field): Simplify.
3318 (dfs_set_offset_for_vbases): Remove.
3319 (dfs_set_offset_for_shared_vbases): New function.
3320 (dfs_set_offset_for_unshared_vbases): Likewise.
3321 (layout_virtual_bases): Use them.
3322 (layout_basetypes): Don't call propagate_binfo_offsets.
3323 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
3324 for the vbases.
3325
3326 * class.c (build_base_field): New function, split out from ...
3327 (build_base_fields): ... here. Use it. Allocate primary bases
3328 first, under the new ABI.
3329 (get_vtable_entry): Remove.
3330 (remove_base_field): New function, split out from ...
3331 (remove_base_fields): ... here. Adjust since primary bases come
3332 first under the new ABI.
3333
3334 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
3335 (initialize_vtbl_ptrs): New function.
3336 (expand_indirect_vtbls_init): Change prototype.
3337 (convert_pointer_to_vbase): Declare.
3338 * init.c (expand_direct_vtbls_init): Remove.
3339 (dfs_initialize_vtbl_ptrs): New function.
3340 (initialize_vtbl_ptrs): Likewise.
3341 (emit_base_init): Use initialize_vtbl_ptrs.
3342 * search.c (convert_pointer_to_vbase): Make it global.
3343 (expand_indirect_vtbls_init): Remove vtable initialization code.
3344 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
3345
3346 * class.c (dfs_finish_vtbls): New function.
3347 (finish_vtbls): Use it.
3348 (dump_class_hierarchy): New function.
3349
3350 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
3351 (BINFO_VBASE_PRIMARY_P): New macro.
3352 (BINFO_VIRTUALS): Add to documentation.
3353 (SET_BINFO_PRIMARY_MARKED_P): Remove.
3354 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
3355 (dfs_mark_primary_bases_queue_p): Likewise.
3356 (dfs_unmarked_real_bases_queue_p): New function.
3357 (dfs_marked_real_bases_queue_p): Likewise.
3358 * search.c (dfs_mark_primary_bases): Adjust.
3359 (mark_primary_bases): Likewise.
3360 (get_shared_vbase_if_not_primary): New function.
3361 (dfs_unmarked_real_bases_queue_p): Likewise.
3362 (dfs_marked_real_bases_queue_p): Likewise.
3363 (dfs_get_pure_virtuals): Simplify.
3364 (get_pure_virtuals): Likewise.
3365
3366 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3367
3368 * lex.c: Include tm_p.h.
3369
3370 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
3371
3372 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
3373
3374 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
3375
3376 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
3377 * pt.c (instantiate_decl): Defer comdat templates that might not be
3378 needed.
3379
3380 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
3381 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
3382 (finish_file): Likewise.
3383
3384 * decl2.c (import_export_class): Undo 12/14 change.
3385
3386 * error.c (dump_decl): operator new, not operatornew.
3387
3388 * class.c (field_decl_cmp): A nontype is "greater" than a type.
3389 * search.c (lookup_field_1): Look for the last field with the
3390 desired name.
3391
3392 2000-01-05 Nathan Sidwell <nathan@acm.org>
3393
3394 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
3395 FUNCTION_DECL.
3396
3397 2000-01-05 Nathan Sidwell <nathan@acm.org>
3398
3399 * typeck.c (build_static_cast): Don't strip target qualifiers
3400 when casting from a class.
3401
3402 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3403
3404 * class.c (warn_hidden): Initialize variable `fndecl'.
3405
3406 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
3407
3408 * decl.c (flag_isoc9x): New variable to be able to use code in
3409 c-common.c. For now always zero.
3410
3411 2000-01-03 Mark Mitchell <mark@codesourcery.com>
3412
3413 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
3414 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
3415 or unshare_base_binfos for virtual bases here.
3416 * search.c (dfs_get_vbase_types): Do it here.
3417 (get_vbase_types): Adjust.
3418
3419 2000-01-02 Mark Mitchell <mark@codesourcery.com>
3420
3421 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
3422 (BINFO_PRIMARY_MARKED_P): Use flag 5.
3423 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
3424 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
3425 (unmark_primary_bases): Remove declaration.
3426 (unmarkedp): Declare.
3427 (dfs_vbase_unmark): Likewise.
3428 * class.c (determine_primary_base): Return immediately if there
3429 are no base classes. Call mark_primary_bases here.
3430 (modify_all_direct_vtables): Remove.
3431 (modify_all_indirect_vtables): Remove.
3432 (dfs_modify_vtables_queue_p): New function.
3433 (dfs_modify_vtables): New function.
3434 (modify_all_vtables): Use them.
3435 (build_base_fields): Build FIELD_DECLs for primary virtual base
3436 classes.
3437 (create_vtable_ptr): Don't call determine_primary_base here.
3438 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
3439 (dfs_set_offset_for_vbases): ... this.
3440 (layout_virtual_bases): Use it.
3441 (layout_class_type): Call determine_primary_base here.
3442 * search.c (unmarkedp): Make it global.
3443 (shared_marked_p): Simplify.
3444 (shared_unmarked_p): Likewise.
3445 (dfs_primary_bases_queue_p): Remove.
3446 (dfs_unmark_primary_bases): Likewise.
3447 (unmark_primary_bases): Likewise.
3448 (mark_primary_bases): Simplify.
3449 (get_pure_virtuals): Don't call mark_primary_bases here.
3450 (dfs_vbase_unmark): New function.
3451 (get_vbase_types): Simplify.
3452
3453 * class.c (struct base_info): Remove.
3454 (determine_primary_base): Take has_virtual_p rather than a
3455 base_info as input. Don't calculate max_has_virtual.
3456 (finish_struct_bits): Remove max_has_virtual argument.
3457 (create_vtable_ptr): Remove max_has_virtual_p argument.
3458 (layout_virtual_bases): Remove max argument.
3459 (layout_basetypes): Likewise.
3460 (layout_class_type): Remove max_has_virtual_p argument.
3461 (finish_struct_1): Remove max_has_virtual.
3462
3463 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
3464 (layout_basetypes): Remove.
3465 * class.c (propagate_binfo_offsets): Moved here from tree.c.
3466 Update to handle primary virtual bases.
3467 (remove_base_fields): New function, split out from
3468 layout_basetypes.
3469 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
3470 (layout_virtual_bases): New function, split out from
3471 layout_basetypes. Update to handle primary virtual bases.
3472 (layout_basetypes): Moved here from tree.c. Use
3473 remove_base_fields and layout_virtual_bases.
3474 * search.c (dfs_mark_primary_bases_queue_p): New function.
3475 (mark_primary_bases): Use it.
3476 * tree.c (CEIL): Remove.
3477 (propagate_binfo_offsets): Remove.
3478 (layout_basetypes): Remove.
3479
3480 2000-01-01 Mark Mitchell <mark@codesourcery.com>
3481
3482 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
3483 (BINFO_PRIMARY_MARKED_P): New macro.
3484 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
3485 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
3486 (mark_primary_bases): New function.
3487 (unmark_primary_bases): Likewise.
3488 * search.c (get_abstract_virtuals_1): Remove.
3489 (dfs_mark_primary_bases): New function.
3490 (mark_primary_bases): Likewise.
3491 (dfs_unmark_primary_bases): Likewise.
3492 (unmark_primary_bases): Likewise.
3493 (dfs_get_pure_virtuals): Likewise.
3494
3495 2000-01-01 Mark Mitchell <mark@codesourcery.com>
3496
3497 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
3498 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
3499 (modify_one_vtable): Adjust.
3500 (fixup_vtable_deltas1): Likewise.
3501 (override_one_vtable): Likewise.
3502 * search.c (get_abstract_virtuals_1): Likewise.
3503 (get_pure_virtuals): Likewise.
3504 (expand_upcast_fixups): Likewise.
3505 * tree.c (debug_binfo): Likewise.
3506
3507 * class.c (build_vtable): Don't return a value. Don't rebuild
3508 vtables for bases that have already been handled.
3509 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
3510 already been handled.
3511 (modify_one_vtable): Adjust accordingly.
3512 (fixup_vtable_deltas1): Likewise.
3513 (finish_struct_1): Likewise.
3514
3515 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3516
3517 * call.c (build_new_method_call): Also check destructors.
3518
3519 1999-12-31 Mark Mitchell <mark@codesourcery.com>
3520
3521 * cp-tree.h (VF_NORMAL_VALUE): Remove.
3522 * class.c (struct base_info): Remove vfield, vfields, and rtti.
3523 (set_primary_base): New function, split out from ...
3524 (finish_base_struct): ... here. Rename to ...
3525 (determine_primary_base): ... this. Simplify.
3526 (create_vtable_ptr): Tweak accordingly.
3527 (finish_struct_1): Simplify.
3528
3529 * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation.
3530 (CLASSTYPE_N_BASECLASSES): Likewise.
3531 (BINFO_FOR_VBASE): New macro.
3532 (get_vbase_types): Change prototype.
3533 * class.c (build_vbase_path): Use BINFO_FOR_VBASE.
3534 (prepare_fresh_vtable): Likewise.
3535 (finish_vtbls): Likewise.
3536 (get_class_offset_1): Likewise.
3537 (modify_all_indirect_vtables): Likewise.
3538 (build_vbase_pointer_fields): Likewise.
3539 * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here.
3540 * init.c (sort_base_init): Use BINFO_FOR_VBASE.
3541 (expand_member_init): Likewise.
3542 * search.c (get_base_distance): Likewise.
3543 (lookup_field_queue_p): Likewise.
3544 (virtual_context): Likewise.
3545 (get_vbase_types): Don't return a value. Set
3546 CLASSTYPE_VBASECLASSES here.
3547 * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE.
3548
3549 1999-12-30 Mark Mitchell <mark@codesourcery.com>
3550
3551 * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS.
3552
3553 1999-12-29 Mark Mitchell <mark@codesourcery.com>
3554
3555 * class.c (create_vtable_ptr): Put the vtable at the beginning of
3556 the class, not the end, in the new ABI.
3557 * tree.c (propagate_binfo_offsets): Do the right thing for the new
3558 ABI.
3559
3560 1999-12-29 Mark Mitchell <mark@codesourcery.com>
3561
3562 * cp-tree.h (lang_type): Add nearly_empty_p. Adjust dummy.
3563 (CLASSTYPE_NEARLY_EMPTY_P): New macro.
3564 * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P.
3565 (check_field_decls): Likewise.
3566 (check_bases_and_members): Likewise.
3567
3568 1999-12-28 Mark Mitchell <mark@codesourcery.com>
3569
3570 * cp-tree.h (do_inline_function_hair): Remove.
3571 * class.c (layout_class_type): New function, split out from
3572 finish_struct_1.
3573 (fixup_pending_inline): Likewise.
3574 (fixup_inline_methods): New function.
3575 * method.c (fixup_pending_inline): Remove.
3576 (do_inline_function_hair): Likewise.
3577
3578 * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
3579 new ABI.
3580
3581 * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals.
3582 (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ...
3583 (CLASSTYPE_PURE_VIRTUALS): ... this.
3584 (lang_decl_flags): Replace abstract_virtual with pure_virtual.
3585 (DECL_ABSTRACT_VIRTUAL_P): Rename to ...
3586 (DECL_PURE_VIRTUAL_P): ... this.
3587 (get_abstract_virtuals): Rename to ...
3588 (get_pure_virtuals): ... this.
3589 * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with
3590 DECL_ABSTRACT_VIRTUAL_P. Replace CLASSTYPE_ABSTRACT_VIRTUALS with
3591 CLASSTYPE_PURE_VIRTUALS.
3592 * class.c (build_vtable_entry): Likewise.
3593 (finish_struct_bits): Likewise. Call get_pure_virtuals, not
3594 get_abstract_virtuals.
3595 (build_vtbl_initializer): Likewise.
3596 (override_one_vtable): Likewise.
3597 (check_methods): Likewise.
3598 * decl.c (duplicate_decls): Likewise.
3599 (redeclaration_error_message): Likewise.
3600 (lang_mark_tree): Likewise.
3601 * decl2.c (grok_function_init): Likewise.
3602 (import_export_vtable): Likewise.
3603 (import_expor_class): Likewise.
3604 * typeck2.c (abstract_virtuals_error): Likewise.
3605 * xref.c (GNU_xref_member): Likewise.
3606 * search.c (get_abstract_virtuals): Rename to get_pure_virtuals.
3607
3608 1999-12-26 Zack Weinberg <zack@wolery.cumb.org>
3609
3610 * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
3611 throughout.
3612
3613 1999-12-26 Mark Mitchell <mark@codesourcery.com>
3614
3615 * decl.c (store_return_init): Use mode of old RTL generated for
3616 DECL_RESULT, not the mode of DECL_RESULT itself.
3617 * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE
3618 for functions that used named return values.
3619
3620 1999-12-24 Mark Mitchell <mark@codesourcery.com>
3621
3622 * semantics.c (expand_body): Use
3623 note_deferral_of_defined_inline_function.
3624
3625 1999-12-22 Mark Mitchell <mark@codesourcery.com>
3626
3627 * dump.c (dequeue_and_dump): Handle CTOR_STMTs.
3628
3629 1999-12-22 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
3630
3631 * error.c (dump_decl): Support named return values.
3632
3633 1999-12-20 Mark Mitchell <mark@codesourcery.com>
3634
3635 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments.
3636 (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro.
3637 (CLASSTYPE_PRIMARY_BINFO): Likewise.
3638 * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF,
3639 TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here.
3640 (check_bases_and_members): Set them here instead.
3641 (create_vtable_ptr): New function, split out from ...
3642 (finish_struct_1): ... here. Use it. Tidy. Use
3643 CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO.
3644 * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as
3645 the first field in the class.
3646 * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES. Handle
3647 seeing TYPE_VFIELD as the first field in the class.
3648
3649 * cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
3650 (TYPE_POLYMORPHIC_P): ... this.
3651 (TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
3652 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
3653 (TREE_CALLS_NEW): Remove.
3654 (TREE_MANGLED): Likewise.
3655 * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
3656 and TYPE_POLYMORPHIC_P.
3657 * class.c (check_bases): Likewise.
3658 (finish_base_struct): Likewise.
3659 (finish_struct_bits): Likewise.
3660 (check_for_override): Likewise.
3661 (finish_struct_1): Likewise.
3662 (get_vfield_name): Likewise.
3663 * decl.c (xref_basetypes): Likewise.
3664 * decl2.c (import_export_class): Likewise.
3665 (import_export_decl): Likewise.
3666 * error.c (dump_function_decl): Likewise.
3667 * pt.c (instantiate_class_template): Likewise.
3668 * repo.c (repo_inline_used): Likewise.
3669 * rtti.c (build_headof): Likewise.
3670 (get_tinfo_fn_dynamic): Likewise.
3671 (build_x_typeid): Likewise.
3672 (get_tinfo_var): Likewise.
3673 (build_dynamic_cast_1): Likewise.
3674 (synthesize_tinfo_fn): Likewise.
3675 * search.c (lookup_field_1): Likewise.
3676 (dfs_debug_mark): Likewise.
3677 (maybe_suppress_debug_info): Likewise.
3678 * typeck.c (build_component_ref): Likewise.
3679 (build_component_addr): Likewise.
3680 * typeck2.c (process_init_constructor): Likewise.
3681
3682 1999-12-20 Nathan Sidwell <nathan@acm.org>
3683
3684 * typeck.c (strip_all_pointer_quals): New static function.
3685 (build_static_cast): Use it. Don't use at_least_as_qualified_p.
3686
3687 1999-12-16 Mark Mitchell <mark@codesourcery.com>
3688
3689 * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE.
3690 (dso_handle_node): New macro.
3691 (flag_use_cxa_atexit): New variable.
3692 (declare_global_var): New function.
3693 (start_anon_func): Remove declaration.
3694 (end_anon_func): Likewise.
3695 * decl.c (get_atexit_node): New function, split out from
3696 destroy_local_static. Handle flag_use_cxa_atexit.
3697 (get_dso_handle_node): Likewise.
3698 (start_cleanup_fn): Renamed from start_anon_func. Moved here from
3699 except.c. Handle flag_use_cxa_atexit.
3700 (end_cleanup_fn): Renamed from end_anon_func. Moved here from
3701 except.c.
3702 (declare_global_var): New variable.
3703 (destroy_local_static): Handle flag_use_cxa_atexit.
3704 * decl2.c (flag_use_cxa_atexit): New variable.
3705 (lang_f_options): Likewise.
3706 * except.c (start_anon_func): Remove.
3707 (end_anon_func): Liekwise.
3708 * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit.
3709 * rtti.c (get_tinfo_var): Use declare_global_var.
3710
3711 1999-12-16 Mark Mitchell <mark@codesourcery.com>
3712
3713 * class.c (check_field_decls): Don't return a value.
3714 (avoid_overlap): Moved here from tree.c.
3715 (build_base_fields): Likewise.
3716 (check_bases): New function, split out from finish_base_struct.
3717 (check_bases_and_members): New function, split out from
3718 finish_struct_1.
3719 (struct base_info): Remove cant_have_default_ctor,
3720 cant_have_const_ctor, cant_have_asn_ref.
3721 (finish_base_struct): Split semantic analysis into check_bases.
3722 (finish_struct_methods): Fix bogus assertion.
3723 (check_field_decls): Call finish_struct_anon here.
3724 (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES.
3725 (finish_struct_1): Use check_bases_and_members. Reorganize.
3726 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
3727 (build_base_fields): Don't declare.
3728 * tree.c (avoid_overlap): Remove.
3729 (build_base_fields): Likewise.
3730
3731 * optimize.c (struct inline_data): Remove scope_stmt.
3732 (remap_block): Don't use insert_block_after_note. Don't update
3733 scope_stmt.
3734 (expand_call_inline): Don't update scope_stmt.
3735 (optimize_function): Don't initialize scope_stmt.
3736 * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
3737 NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.
3738
3739 1999-12-15 Mark Mitchell <mark@codesourcery.com>
3740
3741 * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS
3742 out of the class, rather than taking them as parameters.
3743 (build_vbase_pointer_fields): Move here from tree.c.
3744 (build_vtbl_or_vbase_field): New function.
3745 (check_methods): Likewise.
3746 (remove_zero_width_bitfields): Likewise.
3747 (add_virtual_function): Use tree_cons instead of temp_tree_cons.
3748 (delete_duplicate_fields_1): Tidy. Don't delete duplicate
3749 USING_DECLs here.
3750 (finish_struct_methods): Handle the case where there are no
3751 methods here.
3752 (get_basefndecls): Use tree_cons instead of temp_tree_cons.
3753 (check_field_decls): Call delete_duplicate_fields here.
3754 (finish_struct_1): Tidy. Use check_methods and
3755 remove_zero_width_bitfields.
3756 * cp-tree.h (build_vbase_pointer_fields): Remove.
3757 * decl.c (grokdeclarator): Use tree_cons instead of
3758 temp_tree_cons.
3759 * decl2.c (qualified_lookup_using_namespace): Use tree_cons
3760 instead of temp_tree_cons.
3761 * lex.c (cons_up_default_function): Remove dead code.
3762 * method.c (fixup_pending_inline): New function, split out from ...
3763 (do_inline_function_hair): ... here.
3764 * tree.c (build_vbase_pointer_fields): Remove.
3765
3766 1999-12-15 Jason Merrill <jason@casey.cygnus.com>
3767
3768 * tree.c (walk_tree): Walk operand subtrees in forward order.
3769 * optimize.c (expand_call_inline): Likewise.
3770 (optimize_function): Initialize id->scope_stmt to something useful.
3771 (remap_block): Assume id->scope_stmt has a useful value.
3772
3773 1999-12-15 Nathan Sidwell <nathan@acm.org>
3774
3775 * typeck.c (build_c_cast): Expand warning message. Move pointer
3776 alignment warning to after the cast. Don't warn about pointer
3777 alignment when given a pointer to incomplete.
3778
3779 1999-12-15 Richard Henderson <rth@cygnus.com>
3780
3781 * cp-tree.h (make_aggr_type): Declare.
3782 * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
3783 (make_aggr_type): New.
3784
3785 * decl.c (build_typename_type, init_decl_processing): Use it.
3786 (build_ptrmemfunc_type, xref_tag): Likewise.
3787 * except.c (call_eh_info): Likewise.
3788 * init.c (init_init_processing): Likewise.
3789 * pt.c (process_template_parm, lookup_template_class): Likewise.
3790 * rtti.c (expand_class_desc): Likewise.
3791 * semantics.c (begin_class_definition, finish_typeof): Likewise.
3792 * tree.c (copy_template_template_parm): Likewise.
3793
3794 1999-12-15 Jason Merrill <jason@yorick.cygnus.com>
3795
3796 * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
3797 sizeof (struct tree_common).
3798
3799 1999-12-14 Jason Merrill <jason@casey.cygnus.com>
3800
3801 * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the
3802 outermost block to point to the inlined function decl.
3803
3804 * error.c (dump_decl): operator==, not operator ==.
3805 (op_to_string): Likewise.
3806
3807 * decl.c (compute_array_index_type): Handle null name.
3808
3809 * decl2.c (ambiguous_decl): Fix to match comment.
3810 (lookup_using_namespace): Adjust.
3811
3812 * decl2.c (import_export_class): Don't ignore dllimport.
3813
3814 1999-12-14 Mark Mitchell <mark@codesourcery.com>
3815
3816 * class.c (check_field_decls): Split out from ...
3817 (finish_struct_1): ... here. Use it. Tidy.
3818
3819 * cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
3820 * optimize.c (copy_body_r): Pass it.
3821 * tree.c (remap_save_expr): Clear walk_subtrees for an
3822 already-handled SAVE_EXPR.
3823 (cp_unsave_r): Pass walk_subtrees to remap_save_expr.
3824
3825 * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
3826 * ir.texi (DECL_NAMESPACE_ALIAS): Document it.
3827
3828 * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION.
3829
3830 1999-12-14 Mumit Khan <khan@xraylith.wisc.edu>
3831
3832 * class.c (finish_base_struct): Allow multiple COM base classes
3833 as well as non-COM bases as long as it's not the leftmost.
3834
3835 1999-12-13 Mumit Khan <khan@xraylith.wisc.edu>
3836
3837 * lex.c (saving_parse_to_obstack): New global.
3838 (reinit_parse_for_block): Use.
3839 (reinit_parse_for_expr): Use.
3840 (check_newline): Use.
3841
3842 1999-12-13 Mark Mitchell <mark@codesourcery.com>
3843
3844 * optimize.c (initialize_inlined_parameters): Take FN to which the
3845 parameters belong as an argument.
3846 (expand_call_inline): Expand calls into the parameter
3847 initializations before pushing the function onto the list of
3848 functions we are presently expanding.
3849
3850 1999-12-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3851
3852 * class.c (get_vtable_name): Use a literal format string and
3853 VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT.
3854 (prepare_fresh_vtable): Likewise.
3855
3856 * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of
3857 VTABLE_NAME_FORMAT.
3858
3859 * decl.c (make_rtl_for_local_static): Remove unused variable `type'.
3860
3861 * init.c (build_vec_init): Initialize variable `try_body'.
3862
3863 * lex.c (yyerror): Don't call a variadic function with a
3864 non-literal format string.
3865
3866 * optimize.c (optimize_function): Call memset, not bzero.
3867
3868 * pt.c (for_each_template_parm_r): Add static prototype.
3869
3870 1999-12-09 Andreas Jaeger <aj@suse.de>
3871
3872 * except.c (expand_throw): Add static attribute to match
3873 prototype.
3874
3875 * Makefile.in (semantics.o): Add dependency on output.h.
3876 * semantics.c: Include output.h for declaration of
3877 make_function_rtl.
3878
3879 1999-12-09 Mark Mitchell <mark@codesourcery.com>
3880
3881 * decl.c (init_decl_processing): Reenable inlining on trees.
3882 (finish_function): Likewise.
3883 * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
3884 * semantics.c (simplify_aggr_init_exprs): New function.
3885 (expand_body): Use it.
3886 * tree.c (walk_tree): Special-case TARGET_EXPRs since they
3887 sometimes present the same sub-tree twice.
3888
3889 * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not
3890 `csl'.
3891
3892 * semantics.c (finish_switch_cond): Do conversions here, not ...
3893 * typeck.c (c_expand_start_case): Here.
3894
3895 * semantics.c (do_poplevel): Remove unused variable.
3896
3897 1999-12-06 Mark Mitchell <mark@codesourcery.com>
3898
3899 * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
3900 unless we're declaring the variable in question.
3901
3902 1999-12-06 Mark Mitchell <mark@codesourcery.com>
3903
3904 * decl.c (init_decl_processing): #if 0 last patch.
3905 (finish_function): Likewise.
3906
3907 1999-12-05 Mark Mitchell <mark@codesourcery.com>
3908
3909 * decl.c (init_decl_processing): Set flag_inline_trees if
3910 !flag_no_inline.
3911
3912 * cp-tree.h (calls_setjmp_p): Declare.
3913 * decl.c (finish_function): Mark functions that call setjmp as
3914 uninlinable.
3915 * optimize.c (calls_setjmp_r): New function.
3916 (calls_setjmp_p): Likewise.
3917
3918 1999-12-04 Mark Mitchell <mark@codesourcery.com>
3919
3920 * optimize.c (expand_call_inline): Wrap the expanded call in an
3921 EXPR_WITH_FILE_LOCATION node to get correct line numbers for
3922 inlined functions.
3923
3924 * optimize.c (inline_data): Remove fns_top. Add scope_stmt. Add
3925 in_target_cleanup_p.
3926 (remap_decl): New function.
3927 (remap_block): Likewise.
3928 (copy_scope_stmt): Likewise.
3929 (copy_body_r): Use remap_decl and copy_scope_stmt.
3930 (copy_body): Use VARRAY_TOP_TREE.
3931 (initialize_inlined_parameters): Likewise.
3932 (declare_return_variable): Likewise.
3933 (inlinable_function_p): Check flag_inline_trees.
3934 (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
3935 specially. Use VARRAY_PUSH_TREE. Create a BLOCK for the
3936 parameters of the inlined function.
3937 (optimize_function): Prevent recursion into partially complete
3938 functions.
3939
3940 * cp-tree.def (SCOPE_STMT): Take one operand.
3941 * cp-tree.h (SCOPE_STMT_BLOCK): New macro.
3942 (SCOPE_NULLIFIED_P): Redefine.
3943 (SCOPE_NO_CLEANUPS_P): New macro.
3944 (add_scope_stmt): Change prototype.
3945 * decl.c (poplevel): Tidy. Warn about unused variables here.
3946 Record SCOPE_STMT_BLOCKs.
3947 (finish_function): Keep DECL_INITIAL for functions that might be
3948 inlined.
3949 * ir.texi: Document SCOPE_NO_CLEANUPS_P.
3950 * semantics.c: Include rtl.h.
3951 (add_scope_stmt): Return the new scope statement and, for an
3952 end-of-scope statement, its matching begin statement. Don't set
3953 SCOPE_NULLIFIED_P.
3954 (do_pushlevel): Simplify, now that we are always
3955 function-at-a-time.
3956 (do_poplevel): Likewise. Record SCOPE_STMT_BLOCKs.
3957 (expand_stmt): Don't call expand_start_bindings or
3958 expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
3959 * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
3960 SCOPE_NULLIFIED_P.
3961 * Makefile.in (semantics.o): Depend on RTL_H.
3962
3963 * decl2.c (pending_statics_used): Make it a macro.
3964 (saved_inlines_used): Likewise.
3965 (finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
3966 (mark_inline_for_output): Likewise.
3967 (ssdf_decls_used): Remove.
3968 (start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
3969 (generate_ctor_or_dtor_function): Adjust accordingly.
3970
3971 1999-11-24 Geoffrey Keating <geoffk@cygnus.com>
3972 Greg McGary <gkm@gnu.org>
3973
3974 * decl.c (duplicate_decls): Merge
3975 DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
3976 DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
3977
3978 1999-12-02 Mike Stump <mrs@wrs.com>
3979
3980 * init.c (perform_member_init): Handle parse errors better.
3981
3982 1999-12-01 Mark Mitchell <mark@codesourcery.com>
3983
3984 * cp-tree.h (min_tree_cons): Remove.
3985 (scratch_ovl_cons): Likewise.
3986 * decl.c (saveable_obstack): Don't declare.
3987 (duplicate_decls): Tweak error-message.
3988 (initialize_local_var): Explicitly mark the definition as static.
3989 (finish_function): Call permanent_allocation, just so
3990 that the middle-end sees the obstacks it expects.
3991 (mark_cp_function_context): Likewise.
3992 * init.c (build_new): Don't use min_tree_cons.
3993 * lex.c (permanent_obstack): Don't declare.
3994 (current_obstack, saveable_obstack): Likewise.
3995 * spew.c (current_obstack, saveable_obstack): Likewise.
3996 * tree.c (current_obstack, saveable_obstack): Likewise.
3997 (scratch_ovl_cons): Remove.
3998 (build_min_nt): Don't mess with obstacks.
3999 (build_min): Likewise.
4000 (min_tree_cons): Remove
4001 * typeck.c (build_component_ref): Don't use scratch_ovl_cons.
4002 (build_x_function_call): Likewise.
4003 (build_c_cast): Don't use min_tree_cons.
4004
4005 1999-11-29 Mark Mitchell <mark@codesourcery.com>
4006
4007 * pt.c (tsubst_decl): Robustify.
4008
4009 1999-11-27 Mark Mitchell <mark@codesourcery.com>
4010
4011 * decl2.c (finish_file): Call expand_body for inline functions
4012 that will be written out but that do not yet have RTL.
4013 * semantics.c (expand_body): Do not generate RTL For inline
4014 functions that do not yet need to be written out.
4015
4016 1999-11-25 Mark Mitchell <mark@codesourcery.com>
4017
4018 * Make-lang.in (CXX_SRCS): Add optimize.c.
4019 * Makefile.in (CXX_OBJS): Add optimize.o.
4020 (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
4021 (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
4022 (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
4023 (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
4024 (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
4025 (dump.o): Likewise.
4026 (optimize.o): New target.
4027 * class.c: Don't include splay-tree.h.
4028 * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.
4029 * cp-tree.h: Include splay-tree.h.
4030 (DECL_UNINLINABLE): New macro.
4031 (CTOR_BEGIN_P, CTOR_END_P): New macros.
4032 (flag_inline_trees): New variable.
4033 (local_variable_p): New function.
4034 (nonstatic_local_decl_p): Likewise.
4035 (optimize_function): Likewise.
4036 (cplus_unsave_expr_now): Remove.
4037 (copy_tree_r): Declare.
4038 (remap_save_expr): Likewise.
4039 * decl.c (local_variable_p): Don't
4040 make it static.
4041 (local_variable_p_walkfn): New function.
4042 (make_rtl_for_local_static): Remove code to try to avoid writing
4043 out static constants.
4044 (emit_local_var): Fix indentation.
4045 (nonstatic_local_decl_p): New function.
4046 (check_default_argument): Use local_variable_p_walkfn, not
4047 local_variable_p, when walking the tree.
4048 (start_function): Set the DECL_CONTEXT for automatically generated
4049 labels.
4050 (finish_constructor_body): Use CTOR_STMT to mark the end of a
4051 constructor.
4052 * decl2.c: Don't include splay-tree.h.
4053 (flag_inline_trees): Define.
4054 * dump.c: Don't include
4055 splay-tree.h.
4056 * except.c (expand_end_catch_block): Fix comment formatting.
4057 (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
4058 (expand_throw): Tidy comment.
4059 * init.c (build_vec_delete_1): Use create_temporary_var.
4060 * lex.c (cplus_tree_code_type): Make it static.
4061 (cplus_tree_code_length): Likewise.
4062 (cplus_tree_code_name): Likewise.
4063 * optimize.c: New file.
4064 * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
4065 with computed gotos.
4066 (setup_vtbl_ptr): Mark the beginnings of constructors with
4067 CTOR_STMT.
4068 (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
4069 (expand_body): Call optimize_function. Save bodies if we're doing
4070 inlining on trees.
4071 * tree.c: Don't include splay-tree.h. Include insn-config.h and
4072 integrate.h.
4073 (copy_tree_r): Make it public.
4074 (statement_code_p): New function.
4075 (mark_local_for_remap_r): Likewise.
4076 (cp_usave_r): Likewise.
4077 (cp_unsave): Likewise.
4078 (build_cplus_new): Set DECL_CONTEXT for temporary variables.
4079 (walk_tree): Walk into `s' class nodes. Walk statement chains.
4080 (copy_tree_r): Handle 's' class nodes. Restore chains for
4081 statements. Nullify scopes. Don't copy types.
4082 (init_tree): Set lang_unsave to cp_unsave.
4083 (remap_save_expr): Define.
4084 * ir.texi: Document CTOR_STMT.
4085
4086 1999-11-24 Jason Merrill <jason@casey.cygnus.com>
4087
4088 * search.c (note_debug_info_needed): Do perform this optimization
4089 for dwarf2.
4090 (maybe_suppress_debug_info): Likewise. Start by clearing
4091 TYPE_DECL_SUPPRESS_DEBUG.
4092
4093 1999-11-24 Mark Mitchell <mark@codesourcery.com>
4094
4095 * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
4096
4097 * decl2.c (finish_vtable_vardecl): Don't prune vtables here.
4098
4099 1999-11-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4100
4101 * decl.c (pushdecl, grokdeclarator): Don't call a variadic
4102 function with a non-literal format string.
4103
4104 * lex.c (do_identifier): Likewise.
4105
4106 * typeck.c (build_unary_op): Likewise.
4107
4108 1999-11-23 Mark Mitchell <mark@codesourcery.com>
4109
4110 * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
4111
4112 1999-11-22 Mark Mitchell <mark@codesourcery.com>
4113
4114 * cp-tree.def (CTOR_COMPLETE): New tree node.
4115 * decl.c (finish_constructor_body): Add it, to mark the end of the
4116 constructor.
4117 (finish_function): Don't call end_protect_partials here.
4118 * ir.texi (CTOR_COMPLETE): Document it.
4119 * semantics.c (expand_stmt): Handle it.
4120
4121 * cp-tree.def (FUNCTION_NAME): New tree node.
4122 * cp-tree.h (current_function_name_declared): Tweak documentation.
4123 (lang_decl_flags): Add pretty_function_p, adjust dummy.
4124 (DECL_PRETTY_FUNCTION_P): New macro.
4125 * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
4126 etc., in a template function. Use at_function_scope_p instead of
4127 expanding it inline.
4128 * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
4129 specially.
4130 (tsubst): Handle FUNCTION_NAME.
4131 (tsubst_copy): Likewise.
4132 (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
4133 etc. in instantiation.
4134 * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
4135 even in template functions.
4136 (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
4137 conditional scope at the top of a destructor.
4138
4139 * error.c (dump_function_decl): Use `[ with ... ]' syntax for
4140 specializations too.
4141
4142 1999-11-22 Nathan Sidwell <nathan@acm.org>
4143
4144 * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
4145 when actually negative.
4146
4147 * typeck.c (convert_for_assignment): Expand comment about
4148 strange NULL check, moved from ...
4149 (convert_for_initialization): ... here. Remove unneeded
4150 code.
4151
4152 1999-11-21 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
4153
4154 * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
4155 * init.c (build_vec_delete, build_vec_delete_1): Likewise.
4156 Always destruct virtual bases of array components, but never
4157 delete them.
4158 (build_vec_init): Adjust invocations.
4159 (build_delete): Likewise.
4160 * decl2.c (delete_sanity): Likewise.
4161
4162 1999-11-19 Nathan Sidwell <nathan@acm.org>
4163
4164 * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
4165 * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
4166 * decl2.c (grok_method_quals): Accept `restrict' as applying to
4167 the object pointer. Return such qualifiers.
4168 (grokclassfn): Apply this pointer qualifiers. Cleanup unused
4169 variables.
4170
4171 1999-11-18 Mark Mitchell <mark@codesourcery.com>
4172
4173 * except.c (expand_end_catch_block): Fix typo.
4174 (expand_exception_blocks): Simplify. Don't call
4175 expand_leftover_cleanups.
4176
4177 1999-11-15 Jason Merrill <jason@casey.cygnus.com>
4178
4179 * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
4180 * pt.c (tsubst, case INTEGER_TYPE): Call it.
4181 Check uses_template_parms.
4182
4183 * class.c (finish_struct): If we're a local class in a template
4184 function, add a TAG_DEFN.
4185 * pt.c (lookup_template_class): If this is a local class in a
4186 template function, call pushtag.
4187 (tsubst_expr, case TAG_DEFN): Handle classes, too.
4188
4189 Emit debug info with the vtable.
4190 * search.c (maybe_suppress_debug_info): New function...
4191 * class.c (finish_struct_1): ...split out from here.
4192 * cp-tree.h: Declare it.
4193 * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
4194 if we're writing out the vtable.
4195 * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p,
4196 note_debug_info_needed): #if 0 out.
4197
4198 1999-11-14 Mark Mitchell <mark@codesourcery.com>
4199
4200 * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
4201 * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
4202 TREE_PERMANENT.
4203 * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
4204 * decl2.c (lookup_arg_dependent): Use it.
4205
4206 * cp-tree.h (cp_finish_decl): Change prototype.
4207 (finish_static_data_member_decl): Likewise.
4208 (push_permanent_obstack): Remove declaration.
4209 (push_expression_obstack): Likewise.
4210 (push_scratch_obstack): Likewise.
4211 (DECL_TEMPLATE_PARM_P): Robustify.
4212 (SET_DECL_TEMPLATE_PARM_P): New macro.
4213 * class.c (add_method): Don't manipulate obstacks.
4214 (finish_vtbls): Likewise.
4215 * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
4216 * decl.c (binding_for_name): Don't manipulate obstacks.
4217 (maybe_push_to_top_level): Likewise.
4218 (pop_from_top_level): Likewise.
4219 (duplicate_decls): Likewise.
4220 (pushdecl): Likewise.
4221 (implicitly_declare): Likewise.
4222 (build_typename_type): Likewise.
4223 (start_decl): Likewise.
4224 (cp_finish_decl): Likewise.
4225 (finish_decl): Likewise.
4226 (destroy_local_static): Likewise.
4227 (expand_static_init): Likewise.
4228 (complete_array_type): Likewise.
4229 (grokvardecl): Likewise.
4230 (build_ptrmemfnc_type): Likewise.
4231 (grokdeclarator): Likewise.
4232 (xref_tag): Likewise.
4233 (xref_basetypes): Likewise.
4234 (start_enum): Likewise.
4235 (finish_enum): Likewise.
4236 (start_function): Likewise.
4237 (finish_function): Likewise.
4238 (start_method): Adjust call to cp_finish_decl.
4239 * decl2.c (finish_static_data_member_decl): Don't manipulate
4240 obstacks.
4241 (grokfield): Likewise.
4242 (grokbitfield): Likewise.
4243 (get_temp_name): Likewise.
4244 (get_sentry): Likewise.
4245 (fnish_file): Likewise.
4246 (lookup_arg_dependent): Likewise.
4247 * except.c (call_eh_info): Likewise.
4248 (push_eh_info): Likewise.
4249 (do_pop_exception): Likewise.
4250 (initialize_handler_parm): Likewise.
4251 (expand_end_eh_spec): Likewise.
4252 (alloc_eh_object): Likewise.
4253 (expand_throw): Likewise.
4254 * expr.c (extract_scalar_init): Likewise.
4255 * init.c (build_java_class_ref): Likewise.
4256 * lex.c (get_time_identifier): Likewise.
4257 (snarf_defarg): Likewise.
4258 (add_defarg_fn): Likewise.
4259 (is_global): Simplify.
4260 (do_identifier): Don't check TREE_PERMANENT.
4261 * method.c (emit_thunk): Don't manipulate obstacks.
4262 * parse.y (condition): Adjust call to cp_finish_decl.
4263 (primary): Likewise.
4264 (initdcl): Likewise.
4265 (initdcl0_innards): Likewise.
4266 (nomods_initdcl0): Likewise.
4267 * pt.c (push_inline_template_parms_recursive): Use
4268 SET_DECL_TEMPLATE_PARM_P.
4269 (process_template_parm): Likewise.
4270 (lookup_template_class): Don't manipulate obstacks.
4271 (instantiate_class_template): Adjust call to
4272 finish_static_data_member_decl.
4273 (tsubst_decl): Don't manipulate obstacks.
4274 (tsubst_expr): Likewise.
4275 (instantiate_template): Likewise.
4276 (instantiate_decl): Adjust calls to cp_finish_decl.
4277 * rtti.c (call_void_fn): Don't manipulate obstacks.
4278 (get_tinfo_var): Likewise.
4279 (get_tinfo_fn_unused): Likewise.
4280 (build_dynamic_cast_1): Likewise.
4281 (expand_si_desc): Likewise.
4282 (expand_class_desc): Likewise.
4283 (expand_ptr_desc): Likewise.
4284 (expand_attr_desc): Likewise.
4285 (expand_generic_desc): Likewise.
4286 (synthesize_tinfo_fn): Likewise.
4287 * search.c (expand_upcast_fixups): Likewise.
4288 * semantics.c (finish_asm_stmt): Likewise.
4289 (finish_named_return_value): Likewise.
4290 (begin_class_definition): Likewise.
4291 (finish_class_definition): Likewise.
4292 (finish_typeof): Likewise.
4293 * tree.c (build_cplus_method_type): Likewise.
4294 (reverse_path): Likewise.
4295 (copy_template_template_parm): Likewise.
4296 (build_expr_ptr_wrapper): Likewise.
4297 (push_expression_obstack): Remove.
4298 (push_permanent_obstack): Likewise.
4299 * typeck.c (mark_addressable): Likewise.
4300
4301 1999-11-13 Mark Mitchell <mark@codesourcery.com>
4302
4303 * call.c (build_conditional_expr): Use build_target_expr_with_type.
4304 (convert_like): Likewise.
4305 (build_over_call): Likewise.
4306 * cp-tree.h (build_target_expr): Remove.
4307 (build_target_expr_with_type): New function.
4308 * cvt.c (build_up_reference): Use get_target_expr.
4309 * decl.c (build_target_expr): Move to ...
4310 * tree.c (build_target_expr): Here. Make it static.
4311 (build_target_expr_with_type): New function. Set DECL_CONTEXT on
4312 the temporary VAR_DECLs.
4313 (get_target_expr): Use it.
4314
4315 1999-11-13 Jason Merrill <jason@yorick.cygnus.com>
4316
4317 * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
4318 * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
4319 * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
4320 * class.c (set_rtti_entry): Use it.
4321
4322 1999-11-12 Mark Mitchell <mark@codesourcery.com>
4323
4324 * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
4325 here.
4326 * semantics.c (finish_expr_stmt): Call it here instead. Move
4327 default_conversion logic to semantic-analysis time.
4328
4329 1999-11-12 Jason Merrill <jason@yorick.cygnus.com>
4330
4331 * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
4332
4333 Fri Nov 12 12:56:32 MST 1999 Diego Novillo <dnovillo@cygnus.com>
4334
4335 * init.c (init_init_processing): Re-instated Nov 11 patch after
4336 approval.
4337
4338 Fri Nov 12 10:42:02 MST 1999 Diego Novillo <dnovillo@cygnus.com>
4339
4340 * init.c (init_init_processing): Undo patch from Nov 11, 1999.
4341 Patch had not been approved yet.
4342
4343 1999-11-12 Mark Mitchell <mark@codesourcery.com>
4344
4345 * decl.c (compute_array_index_type): New function, split out from
4346 grokdeclarator.
4347 (create_array_type_for_decl): Likewise.
4348 (grokdeclarator): Use them.
4349
4350 * semantics.c (expand_stmt): Don't suspend_momentary or
4351 resume_momentary.
4352
4353 Thu Nov 11 12:42:11 MST 1999 Diego Novillo <dnovillo@cygnus.com>
4354
4355 * init.c (init_init_processing): Header information for
4356 arrays allocated via `new' should have the same alignment used by
4357 malloc.
4358
4359 1999-11-10 Mark Mitchell <mark@codesourcery.com>
4360
4361 * error.c (dump_function_name): Don't crash if given a friend
4362 pseudo-instantiation.
4363
4364 * cp-tree.h (build_enumerator): Change prototype.
4365 * decl.c (enum_next_value): Remove.
4366 (enum_overflow): Likewise.
4367 (init_decl_processing): Don't register enum_next_value as a root.
4368 (start_enum): Clear TYPE_VALUES for a redefined enum.
4369 (finish_enum): Reset the type of enumeration constants.
4370 (build_enumerator): Fix indentation. Don't copy CONST_DECLs when
4371 we don't need to. Maintain the TYPE_VALUES list and look there
4372 for the previously defined enumeration constant. Let enumeration
4373 constants have the type of their values until the enumeration type
4374 is complete.
4375 * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
4376 (structsp): Adjust.
4377 * parse.c: Regenerated.
4378 * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
4379
4380 Wed Nov 10 12:43:21 1999 Philippe De Muyter <phdm@macqel.be>
4381 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4382
4383 * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
4384
4385 1999-11-09 Mark Mitchell <mark@codesourcery.com>
4386
4387 * cp-tree.h (language_function): Remove x_last_dtor_insn and
4388 x_last_parm_cleanup_insn.
4389 * decl.c (last_dtor_insn): Remove.
4390 (last_parm_cleanup_insn): Likewise.
4391 (expand_start_early_try_stmts): Don't set them.
4392 (store_parm_decls): Likewise.
4393 (save_function_data): Or save them.
4394 (mark_lang_function): Or mark them.
4395
4396 1999-11-08 Mark Mitchell <mark@codesourcery.com>
4397
4398 * decl.c (store_parm_decls): Generate cleanup code at
4399 semantic-analysis time. Destroy objects in the correct order.
4400
4401 1999-11-07 Mark Mitchell <mark@codesourcery.com>
4402
4403 * cp-tree.h (begin_new_placement): Remove.
4404 (finish_new_placement): Likewise.
4405 * class.c (finish_struct_1): Don't suspend_momentary or
4406 resume_momentary.
4407 * decl.c (grokdeclarator): Likewise.
4408 (maybe_build_cleanup_1): Likewise.
4409 * except.c (push_eh_cleanup): Likewise.
4410 (build_terminate_handler): Likewise.
4411 * init.c (build_new_1): Likewise.
4412 * parse.y (parse_decl): Change prototype.
4413 (initdecls, notype_initdecls, initdcl): Don't return int.
4414 (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
4415 (.begin_new_placement): Remove.
4416 (.finish_new_placement): Likewise.
4417 (nonmomentary_expr): Likewise.
4418 (suspend_mom): Likewise.
4419 (condition): Don't suspend_momentary, resume_momentary, or keep
4420 track of need to resume.
4421 (unary_expr): Likewise.
4422 (new_placement): Likewise.
4423 (decl): Likewise.
4424 (structsp): Likewise.
4425 (new_type_id): Likewise.
4426 (maybe_parmlist): Likewise.
4427 (direct_after_type_declaration): Likewise.
4428 (direct_new_declarator): Likewise.
4429 (direct_abstract_declaration): Likewise.
4430 * parse.c: Regenerated.
4431 * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
4432 * semantics.c (begin_new_placement): Remove.
4433 (finish_new_placement): Likewise.
4434
4435 1999-11-05 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4436
4437 * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
4438 (DECL_TEMPLATE_INFO): Use it.
4439 * decl.c (warn_extern_redeclared_static): Do nothing for
4440 TEMPLATE_DECLs.
4441 * decl2.c (mark_used): Explicitly check for function or variable.
4442 * semantics.c (finish_unary_op_expr): Check whether result is also
4443 an INTEGER_CST.
4444
4445 1999-11-05 Mark Mitchell <mark@codesourcery.com>
4446
4447 * Makefile.in (typeck2.o): Depend on output.h.
4448 * typeck2.c: Include output.h.
4449
4450 * decl.c (flag_ansi): Remove declaration.
4451
4452 * pt.c (tinst_level_tick): Make it static.
4453 (last_template_error_tick): Likewise.
4454
4455 * cp-tree.h (mapcar): Remove declaration.
4456 (search_tree): Likewise.
4457 (walk_tree_fn): New typedef.
4458 (walk_tree): New function.
4459 * tree.c (bot_manip): Change prototype. Adjust to be called via
4460 walk_tree.
4461 (bot_replace): Likewise.
4462 (no_linkage_helper): Likewise.
4463 (copy_tree_r): New function.
4464 (search_tree): Rename, and adjust, to become ...
4465 (walk_tree): New function.
4466 (mapcar): Remove.
4467 (target_remap): Remove.
4468 (target_remap_count): Likewise.
4469 (break_out_target_exprs): Use walk_tree.
4470 * decl.c (local_variable_p): Change prototype.
4471 (check_default_argument): Use walk_tree.
4472 * pt.c (for_each_template_parm_r): New function, split out from ...
4473 (for_each_template_parm): Here. Use it, via walk_tree.
4474
4475 1999-11-03 Mark Mitchell <mark@codesourcery.com>
4476
4477 * class.c (check_bitfield_decl): New function, split out from
4478 finish_stuct_1.
4479 (check_field_decl): Likewise. Recursively examine members of
4480 anonymous structs.
4481 (finish_struct_1): Use them.
4482 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
4483
4484 1999-11-02 Mark Mitchell <mark@codesourcery.com>
4485
4486 * decl.c (grokfndecl): Remove dead code.
4487
4488 * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
4489
4490 1999-11-02 Scott Snyder <snyder@fnal.gov>
4491
4492 * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
4493 IMAGPART_EXPR.
4494 * pt.c (tsubst_copy): Likewise.
4495
4496 1999-11-01 Jason Merrill <jason@yorick.cygnus.com>
4497
4498 * decl2.c (maybe_make_one_only): Always make things comdat on
4499 ELF targets, too.
4500
4501 1999-10-31 Mark Mitchell <mark@codesourcery.com>
4502
4503 * decl.c (finish_function): Call free_after_parsing for functions
4504 we are not immediately turning into RTL.
4505
4506 1999-10-31 Brendan Kehoe <brendan@cygnus.com>
4507
4508 * cp-tree.h (flag_dump_translation_unit): Add decl.
4509
4510 Sat Oct 30 22:42:50 1999 Stephen L Moshier <moshier@mediaone.net>
4511
4512 * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
4513
4514 1999-10-30 Mark Mitchell <mark@codesourcery.com>
4515
4516 * decl.c (pop_cp_function_context): Don't call free on a NULL
4517 pointer.
4518 * semantics.c: Include ggc.h.
4519 (expand_body): Do garbage-collection after processing a template
4520 function. Clear DECL_SAVED_TREE after generating RTL for a
4521 function.
4522 * Makefile.in (semantics.o): Depend on ggc.h.
4523
4524 1999-10-29 Mark Mitchell <mark@codesourcery.com>
4525
4526 * cp-tree.h (make_typename_type): Change prototype.
4527 * decl.c (make_typename_type): Only complain if so requested.
4528 * parse.y (nested_name_specifier): Adjust calls.
4529 (typename_sub0): Likewise.
4530 (typename_sub1): Likewise.
4531 * parse.c: Regenerated.
4532 * pt.c (convert_template_argument): Pass complain to
4533 make_typename_type.
4534 (tsubst): Likewise.
4535
4536 1999-10-28 Mark Mitchell <mark@codesourcery.com>
4537
4538 * semantics.c (finish_handler): End the scope of the handler
4539 before attaching it to the statement-tree.
4540
4541 1999-10-28 Ian Lance Taylor <ian@zembu.com>
4542
4543 * rtti.c (build_dynamic_cast_1): Give a better error message for
4544 an attempt to dynamic_cast from a non-polymorphic type.
4545
4546 1999-10-27 Mark Mitchell <mark@codesourcery.com>
4547
4548 * cp-tree.h (make_temp_vec): Remove.
4549 (make_scratch_vec): Likewise.
4550 * call.c (add_function_candidate): Use make_tree_vec.
4551 (add_conv_candidate): Likewise.
4552 (build_builtin_candidate): Likewise.
4553 (add_template_candidate_real): Likewise.
4554 * class.c (resolve_address_of_overloaded_function): Likewise.
4555 * decl.c (start_function): Don't fool with the momentary obstack.
4556 (finish_function): Likewise.
4557 * init.c (expand_direct_vtbls_init): Likewise.
4558 (begin_init_stmts): Likewise.
4559 (finish_init_stmts): Likewise.
4560 * pt.c (add_to_template_args): Use make_tree_vec.
4561 (check_explicit_specialization): Likewise.
4562 (coerce_template_parms): Likewise.
4563 (lookup_template_class): Don't fool with the momentary obstack.
4564 (instantiate_class_template): Likewise.
4565 (tsubst_template_arg_vector): Use make_tree_vec.
4566 (tsubst_aggr_type): Don't fool with the momentary obstack.
4567 (tsubst_decl): Likewise. Use make_tree_vec.
4568 (try_one_overload): Likewise.
4569 (try_class_unification): Don't fool with the momentary obstack.
4570 (get_bindings_real): Use make_tree_vec.
4571 (set_mangled_name_for_template_decl): Likewise.
4572 * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
4573 * semantics.c (finish_expr_stmt): Likewise.
4574 (finish_do_stmt): Likewise.
4575 (finish_for_expr): Likewise.
4576 (finish_switch_cond): Likewise.
4577 (do_pushlevel): Likewise.
4578 (do_poplevel): Likewise.
4579 * tree.c (make_temp_vec): Remove.
4580
4581 * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs. Dump
4582 CLEANUP_P for a TRY_BLOCK.
4583 * ir.texi: Document SAVE_EXPR.
4584
4585 Tue Oct 26 23:29:56 1999 Jeffrey A Law (law@cygnus.com)
4586
4587 * call.c (build_over_call): Check that the built-in function is
4588 of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
4589 * typeck.c (build_function_call_real): Similarly.
4590
4591 1999-10-26 Mark Mitchell <mark@codesourcery.com>
4592
4593 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS. Don't call
4594 remember_end_note.
4595
4596 1999-10-24 Mark Mitchell <mark@codesourcery.com>
4597
4598 * decl.c (push_overloaded_decl_1): Use pushdecl.
4599
4600 * decl.c (auto_function): Replace #ifdef'd __inline with just
4601 plain inline.
4602 * lex.c (my_get_run_time): Likeise.
4603 (yyprint): Likewise.
4604 (identifier_type): Likewise.
4605 * method.c (start_squangling): Likewise.
4606 (end_squangling): Likewise.
4607 (icat): Likewise.
4608 (old_backref_index): Likewise.
4609 (flush_repeats): Likewise.
4610 (issue_ktype): Likewise.
4611 * parse.y (empty_parms): Likewise.
4612 * parse.c: Regenerated.
4613
4614 1999-10-21 Mark Mitchell <mark@codesourcery.com>
4615
4616 * dump.c (dequeue_and_dump): Replace several uses of
4617 queue_and_dump_index with dump_child.
4618
4619 1999-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4620
4621 * expr.c: Include tm_p.h.
4622
4623 1999-10-21 Mark Mitchell <mark@codesourcery.com>
4624
4625 * cp-tree.h (SCOPE_PARTIAL_P): New macro.
4626 (pushlevel_temporary): Remove.
4627 (add_scope_stmt): New function.
4628 * decl.c (pushlevel_temporary): Remove.
4629 (poplevel): Use add_scope_stmt.
4630 (start_decl_1): Likewise.
4631 * semantics.c (add_scope_stmt): New function.
4632 (do_pushlevel): Use it.
4633 (do_poplevel): Use it.
4634 (expand_stmt): Check SCOPE_PARTIAL_P.
4635
4636 * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
4637 * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
4638 * expr.c (cplus_expand_expr): Expand it.
4639 * ir.texi: Document EMPTY_CLASS_EXPR.
4640
4641 1999-10-20 Mark Mitchell <mark@codesourcery.com>
4642
4643 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
4644 parameters as having namespace scope.
4645
4646 1999-10-19 Mark Mitchell <mark@codesourcery.com>
4647
4648 * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
4649 (mangling_flags): New type.
4650 (build_overload_int): Change prototype.
4651 (build_overload_value): Likewise.
4652 (numeric_output_need_bar): Improve comment.
4653 (mangle_expression): New function, broken out from ...
4654 (build_overload_int): Here.
4655 (build_overload_value): Adjust for use of mangling flags. Don't
4656 warn about real-valued template parameters here. Do handle
4657 complex expressions involving real-valued template parameters.
4658 (build_template_parm_names): Encase non-type template parameters
4659 in underscores, if necessary.
4660 (process_overload_item): Remove conditional on
4661 PARM_CAN_BE_ARRAY_TYPE.
4662
4663 1999-10-17 Mark Mitchell <mark@codesourcery.com>
4664
4665 * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
4666
4667 * ir.texi: Clean up documentation of RETURN_INIT.
4668
4669 1999-10-15 Greg McGary <gkm@gnu.org>
4670
4671 * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
4672 (lang_init): Set default for flag_bounds_check if still "unspecified".
4673
4674 1999-10-13 Andrew Haley <aph@cygnus.com>
4675
4676 * class.c (finish_struct_1): Force alignment of non-bitfields to
4677 BITS_PER_UNIT.
4678
4679 Wed Oct 13 22:01:35 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
4680
4681 * typeck2.c (process_init_constructor): Handle empty constructors.
4682
4683 1999-10-13 Jason Merrill <jason@yorick.cygnus.com>
4684
4685 * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
4686
4687 * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
4688 array error.
4689
4690 1999-10-13 Mark Mitchell <mark@codesourcery.com>
4691
4692 * decl.c (make_rtl_for_local_static): Don't create register RTL
4693 for addressable constants.
4694
4695 1999-10-13 Nathan Sidwell <nathan@acm.org>
4696
4697 * cp-tree.h (build_x_va_arg): Prototype new function.
4698 * call.c (build_x_va_arg): Define it.
4699 * parse.y (unary_expr): Call build_x_va_arg.
4700
4701 * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
4702 * call.c (convert_type_from_ellipsis): Define it.
4703 * decl.c (init_decl_processing): Set lang_type_promotes_to.
4704
4705 * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
4706
4707 1999-10-11 Jason Merrill <jason@yorick.cygnus.com>
4708
4709 * class.c (fixed_type_or_null): Always set *nonnull.
4710
4711 1999-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4712
4713 * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
4714 __GNUC__ and __GNUC_MINOR__.
4715
4716 1999-10-09 Mark Mitchell <mark@codesourcery.com>
4717
4718 * cp-tree.h (make_rtl_for_local_static): New function.
4719 * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
4720 local statics ...
4721 (make_rtl_for_local_static): Here.
4722 * semantics.c (expand_stmt): Use make_rtl_for_local_static.
4723
4724 1999-10-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4725
4726 * method.c: Include tm_p.h.
4727
4728 1999-10-7 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
4729
4730 * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
4731 * lex.c (cp_make_lake_type): Likewise.
4732 * tree.c (init_tree): Init make_lang_type_fn.
4733
4734 1999-10-07 Mark Mitchell <mark@codesourcery.com>
4735
4736 * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
4737 paramter.
4738
4739 * semantics.c (expand_stmt): Don't pretend to have asmspecs for
4740 local statics if we don't really have them.
4741
4742 * ir.texi: Improve documentation for STMT_EXPR. Describe
4743 CLEANUP_POINT_EXPR.
4744
4745 1999-10-07 Jason Merrill <jason@yorick.cygnus.com>
4746
4747 * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
4748
4749 1999-10-07 Greg McGary <gkm@gnu.org>
4750
4751 * class.c (finish_struct_1): Use simpler method of
4752 removing elements of a singly-linked list which doesn't
4753 lose for classes without data members.
4754
4755 1999-10-07 Mark Mitchell <mark@codesourcery.com>
4756
4757 * friend.c (make_friend_class): Robustify.
4758
4759 * semantics.c (finish_object_call_expr): Reject calls to template
4760 types.
4761
4762 1999-10-06 Mark Mitchell <mark@codesourcery.com>
4763
4764 * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
4765
4766 * cp-tree.h (CLASSTYPE_VFIELD): Remove.
4767 * call.c (build_vfield_ref): Use TYPE_VFIELD, not
4768 CLASSTYPE_VFIELD.
4769 * class.c (get_vfield_offset): Likewise.
4770 (finish_base_struct): Likewise.
4771 (modify_one_vtable): Likewise.
4772 (fixup_vtable_deltas): Likewise.
4773 (finish_struct_1): Likewise.
4774 * init.c (expand_virtual_init): Likewise.
4775 * search.c (lookup_field_1): Likewise.
4776 (expand_upcast_fixups): Likewise.
4777 * typeck.c (build_component_ref): Likewise.
4778 (build_binary_op_nodefault): Likewise.
4779
4780 * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
4781 * ir.texi: Document TYPE_VFIELD.
4782
4783 1999-10-06 Brendan Kehoe <brendan@cygnus.com>
4784
4785 * decl.c (grokdeclarator): Only warn about non-zero arrays if
4786 !in_system_header (linux socketbits.h can give this for
4787 __cmsg_data, which is using a GNU extension).
4788
4789 1999-10-05 Mark Mitchell <mark@codesourcery.com>
4790
4791 * decl2.c (start_static_storage_duration_function): Push the
4792 function declaration so it ends up in namespace scope.
4793
4794 * dump.c (DUMP_CHILDREN): Remove.
4795 (DUMP_BINFO): Adjust.
4796 (struct dump_node_info): Remove dump_children_p.
4797 (queue_and_dump_type): Remove dump_children_p parameter.
4798 (queue): Don't set dump_children_p.
4799 (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
4800 queue_and_dump_index.
4801 (dequeue_and_dump): Unconditionally print children. Adjust calls
4802 to functions mentioned above.
4803 (dump_node): Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
4804
4805 * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
4806 * dump.c (dequeue_and_dump): Dump them.
4807
4808 * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
4809
4810 * decl.c (start_function): Set current_in_charge_parm for
4811 constructors, too, where appropriate.
4812 * search.c (fixup_all_virtual_upcast_offsets): New function.
4813 (expand_indirect_vtbls_init): Use it.
4814
4815 1999-10-04 Nathan Sidwell <nathan@acm.org>
4816
4817 * decl2.c (grok_alignof): Don't decay lvalues.
4818
4819 * init.c (build_new): Remove unused variable.
4820
4821 1999-10-04 Mark Mitchell <mark@codesourcery.com>
4822
4823 * cp-tree.h (struct language_function): Remove static_labelno.
4824 (static_labelno): Remove macro.
4825 * method.c (build_overload_nested_name): Make static_labelno
4826 static here.
4827
4828 * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
4829 to decide whether or not a function is defined.
4830
4831 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
4832 situations where make_node will do it automatically.
4833 * decl.c (grok_reference_init): Likewise.
4834 (expand_static_init): Likewise.
4835 (do_static_initialization): Likewise.
4836 * init.c (perform_member_init): Likewise.
4837 (expand_aggr_init_1): Likewise.
4838 (build_new_1): Likewise.
4839 * method.c (do_build_copy_constructor): Likewise.
4840 (do_build_assign_ref): Likewise.
4841 * search.c (expand_upcast_fixups): Likewise.
4842 * semantics.c (finish_stmt_expr): Likewise.
4843 * typeck.c (build_unary_op): Likewise.
4844 (check_return_expr): Likewise.
4845
4846 1999-10-04 Jason Merrill <jason@yorick.cygnus.com>
4847
4848 * init.c (build_vec_delete_1): Fold COND_EXPRs.
4849
4850 1999-10-03 Mark Mitchell <mark@codesourcery.com>
4851
4852 * cp-tree.def (VEC_INIT_EXPR): Remove.
4853 * cp-tree.h (struct stmt_tree): New type.
4854 (struct saved_scope): Remove firstobj. Add x_saved_tree,
4855 x_stmt_tree.
4856 (class_cache_firstobj): Remove.
4857 (struct language_function): Remove stmts_are_full_exprs_p,
4858 x_last_tree, and x_last_expr_type. Add x_stmt_tree.
4859 (current_stmt_tree): New macro.
4860 (last_tree): Adjust.
4861 (last_expr_type): Likewise.
4862 (doing_semantic_analysis_p): Simplify.
4863 (stmts_are_full_exprs_p): Adjust.
4864 (begin_tree): Remove prototype.
4865 (end_tree): Likewise.
4866 (begin_stmt_tree): Change prototype.
4867 (finish_stmt_tree): Likewise.
4868 (building_stmt_tree): Simplify.
4869 * decl.c (mark_stmt_tree): New function.
4870 (mark_saved_scope): Use it.
4871 (start_function): Rearrange slightly to call begin_stmt_tree
4872 earlier.
4873 (save_function_data): Tweak.
4874 (finish_function): Adjust call to finish_stmt_tree.
4875 (mark_lang_function): Use mark_stmt_tree.
4876 * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
4877 * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
4878 (build_vec_init): Remove creation of stand-in intializer.
4879 * pt.c (begin_tree): Remove.
4880 (end_tree): Likewise.
4881 * semantics.c (SET_LAST_STMT): New macro. Use it throughout.
4882 (begin_compound_stmt): Handle a compound-statement outside of a
4883 function.
4884 (begin_stmt_expr): Handle a statement-expression outsidef of a
4885 function.
4886 (finish_stmt_expr): Likewise.
4887 (begin_class_definition): Don't call begin_tree.
4888 (finish_inline_definitions): Don't call end_tree.
4889 (begin_stmt_tree): Take a pointer to tree, not a function as input.
4890 (finish_stmt_tree): Likewise.
4891 * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
4892 (mapcar): Likewise.
4893
4894 * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
4895 * parse.c: Regenerated.
4896
4897 * dump.c (dqueue_and_dump): Dump bitfieldness.
4898
4899 * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
4900 bitfields, rather than DECL_BIT_FIELD.
4901 * ir.texi: Document how to tell whether or not a field is a
4902 bitfield.
4903
4904 * lex.c (make_lang_type): Fix typo in comment.
4905
4906 1999-10-01 Jason Merrill <jason@yorick.cygnus.com>
4907
4908 * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
4909
4910 1999-10-01 Mark Mitchell <mark@codesourcery.com>
4911
4912 * pt.c (tsubst_decl): If the type of a template instantiation is
4913 bogus, so is the whole instantiation.
4914
4915 1999-09-30 Mark Mitchell <mark@codesourcery.com>
4916
4917 * decl.c (initialize_local_var): Handle static variables here.
4918 (cp_finish_decl): Tweak handling of function-scope static
4919 variables.
4920 * semantics.c (expand_stmt): Handle DECL_STMTs for static
4921 variables.
4922
4923 * method.c (emit_thunk): Don't crash when -fsyntax-only.
4924
4925 * cp-tree.h (lang_decl_flags): Add global_ctor_p and
4926 global_dtor_p. Add init_priority.
4927 (DECL_ACCESS): Adjust accordingly.
4928 (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
4929 (GLOBAL_INIT_PRIORITY): Likewise.
4930 * decl.c (lang_mark_tree): Adjust accordingly.
4931 (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P,
4932 and GLOBAL_INIT_PRIORITY.
4933 * dump.c (dequeue_and_dump): Print them.
4934 * ir.texi: Document them.
4935
4936 * decl2.c (struct priority_info_s): Remove initialization_sequence
4937 and destruction_sequence.
4938 (start_static_storage_duration_function): Return the body of the
4939 function. Convert for function-at-a-time mode.
4940 (generate_inits_for_priority): Remove.
4941 (finish_static_storage_duration_function): Change prototype.
4942 Adjust for function-at-a-time mode.
4943 (do_static_initialization): Likewise.
4944 (do_static_destruction): Likewise.
4945 (do_static_initialization_and_destruction): Remove.
4946 (start_static_initialization_or_destruction): New function.
4947 (finish_static_initialization_or_destruction): Likewise.
4948 (get_priority_info): Don't manipulation initialization_sequence or
4949 destruction_sequence.
4950 (prune_vars_needing_no_initialization): New function.
4951 (write_out_vars): Likewise.
4952 (finish_file): Use the various new functions instead of the old.
4953
4954 Thu Sep 30 00:13:27 1999 Dirk Zoller <duz@rtsffm.com>
4955
4956 * cp-tree.h (warn_float_equal): Declare.
4957 * decl2.c (warn_float_equal): Define.
4958 (lang_decode_option): Recognize -W[no-]float-equal.
4959 * typeck.c (build_binary_op_nodefault): Conditionally warn
4960 about equality tests of floating point types.
4961
4962 1999-09-29 Jason Merrill <jason@yorick.cygnus.com>
4963
4964 Support normal type_info-based EH mechanisms with -fno-rtti.
4965 * except.c (build_eh_type_type): Remove special -fno-rtti handling.
4966 (build_eh_type_type_ref): Likewise.
4967 (build_eh_type): Remove.
4968 (expand_throw): Call build_eh_type_type, not build_eh_type.
4969 * decl2.c (import_export_decl): Don't associate the tinfo fn with
4970 the vtable if -fno-rtti.
4971 * decl.c (init_decl_processing): Always init_rtti_processing.
4972
4973 * rtti.c (get_typeid): Don't complain about -fno-rtti.
4974
4975 * class.c (class_cache_obstack, class_obstack): Remove.
4976 (init_class_processing): Don't initialize class_obstack.
4977 (push_cache_obstack): Remove.
4978 (pushclass): Don't call it.
4979 * cp-tree.h: Remove prototype for push_cache_obstack.
4980 * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
4981 (pushlevel_class): Don't push_decl_level.
4982 (poplevel_class): Don't pop_stack_level.
4983 (push_class_level_binding): Don't push_cache_obstack.
4984 (init_decl_processing): Don't intialize decl_obstack.
4985 * search.c (push_class_decls): Don't push_cache_obstack.
4986 * tree.c (list_hash_add): Put hash node on permanent_obstack.
4987 (hash_tree_cons): Don't mess with obstacks.
4988 (print_lang_statistics): Don't print stats for class_obstack and
4989 decl_obstack.
4990
4991 1999-09-29 Mark Mitchell <mark@codesourcery.com>
4992
4993 * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
4994 * ir.texi: Document DECL_EXTERNAL.
4995
4996 * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
4997 * ir.texi: Document THUNK_DECLs.
4998
4999 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
5000 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
5001 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
5002 * error.c (dump_template_bindings): Remove unused parameter.
5003 Handle multiple levels of template parameters.
5004 (dump_template_decl): Use `parms', not `args', for template
5005 parameters. Fix thinko.
5006 (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION. Don't pass
5007 flags to dump_template_bindings.
5008 * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
5009 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
5010 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
5011 (tsubst_copy): Clarify variable name.
5012 (most_general_template): Robustify.
5013
5014 1999-09-29 Nathan Sidwell <nathan@acm.org>
5015
5016 * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
5017 to change primary template rendering.
5018
5019 1999-09-29 Mark Mitchell <mark@codesourcery.com>
5020
5021 * cp-tree.h (UPT_TEMPLATE): Remove.
5022 (UPT_PARMS): Likewise.
5023 (DECL_NEEDED_P): New macro.
5024 * decl2.c (finish_vtable_vardecl): Use it.
5025 (finish_objects): Don't crash with -fsyntax-only.
5026 (finish_file): Use DECL_NEEDED_P. Don't prune vtables when
5027 -fsyntax-only.
5028 * pt.c (tsubst_friend_function): Remove FIXME that talks about
5029 obstacks.
5030 (tsubst_expr): Correct handling of function try-blocks.
5031 * semantics.c: Include flags.h.
5032 (expand_body): Don't do RTL generation if -fsyntax-only.
5033 * Makefile.in (semantics.o): Depends on flags.h.
5034
5035 1999-09-28 Gabriel Dos Reis <gdr@codesourcery.com>
5036
5037 * pt.c (most_general_template): Adjust declaration.
5038
5039 * cp-tree.h: (most_general_template): Declare.
5040
5041 * error.c (dump_template_value): Rename to ...
5042 (dump_template_argument): This.
5043 (dump_template_argument_list): New function.
5044 (dump_type): Use it.
5045 (dump_template_parameter): New function.
5046 (dump_template_decl): Use it.
5047 (dump_template_bindings): New function.
5048 (dump_function_decl): Use it. Pretty print function template
5049 instantiations.
5050
5051 1999-09-28 Nathan Sidwell <nathan@acm.org>
5052
5053 * decl.c (grokdeclarator): Distinguish parameter context for
5054 diagnostics. Tidy up missing type diagnostic.
5055 Diagnose `explicit' in one place. Diagnose `mutable' in one place.
5056
5057 1999-09-28 Mark Mitchell <mark@codesourcery.com>
5058
5059 * ir.texi: Improve documentation for TARGET_EXPR.
5060
5061 1999-09-27 Nathan Sidwell <nathan@acm.org>
5062
5063 Augment stringification of trees.
5064 * cp-tree.h (tree_string_flags): New error stringifying enumeration.
5065 (fndecl_as_string, type_as_string_real, args_as_string,
5066 code_as_string, language_as_string, parm_as_string,
5067 op_as_string, assop_as_string, cv_as_string): Remove.
5068 (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
5069 (context_as_string): Declare new function.
5070 * error.c (cp_printers): Move definition.
5071 (OB_UNPUT): Remove.
5072 (OB_END_TEMPLATE_ID): Adjust.
5073 (interesting_scope_p): Remove.
5074 (dump_scope): New static function.
5075 (dump_qualifiers): Adjust prototype, reimplement.
5076 (dump_template_value): Use tree_string_flags.
5077 (dump_type_real): Move back to dump_type.
5078 (dump_type): Adjust prototype. Use tree_string_flags.
5079 (dump_aggr_type): Likewise. Use dump_template_parms.
5080 (dump_type_prefix): Adjust prototype. Use tree_string_flags.
5081 Return pad flag.
5082 (dump_type_suffix): Adjust prototype. Use tree_string_flags.
5083 (dump_simple_decl): Likewise.
5084 (dump_decl): Likewise. Use dump_template_decl.
5085 (dump_template_decl): New static function broken out of dump_decl.
5086 (dump_function_decl): Adjust prototype. Use tree_string_flags.
5087 (dump_parameters): Likewise. Prefix space.
5088 (dump_exception_spec): Adjust prototype. Use tree_string_flags.
5089 (dump_function_name): Likewise. Use dump_template_parms.
5090 (dump_template_parms): New static function broken out of
5091 dump_function_name.
5092 (dump_expr_list): Adjust prototype. Use tree_string_flags.
5093 (dump_expr): Likewise.
5094 (fndecl_as_string): Removed
5095 (type_as_string_real): Removed
5096 (dump_binary_op): Adjust prototype. Use tree_string_flags.
5097 (dump_unary_op): Likewise.
5098 (type_as_string): Likewise.
5099 (expr_as_string): Likewise.
5100 (decl_as_string): Likewise.
5101 (context_as_string): New function.
5102 (lang_decl_name): Adjust.
5103 (decl_to_string): New static print callback.
5104 (expr_to_string): Likewise.
5105 (fndecl_to_string): Likewise.
5106 (code_as_string): Renamed to ...
5107 (code_to_string): ... here. Adjust.
5108 (language_as_string): Renamed to ...
5109 (language_to_string): ... here. Adjust.
5110 (parm_as_string): Renamed to ...
5111 (parm_to_string): ... here.
5112 (op_as_string): Renamed to ...
5113 (op_to_string): ... here.
5114 (assop_as_string): Renamed to ...
5115 (assop_to_string): ... here.
5116 (type_to_string): New static print callback.
5117 (args_as_string): Renamed to ...
5118 (args_to_string): ... here. Adjust.
5119 (cv_as_string): Renamed to ...
5120 (cv_to_string): ... here. Adjust.
5121 * pt.c (mangle_class_name_for_template): Use tree_string_flags.
5122 (print_template_context): Likewise.
5123
5124 1999-09-26 Mark Mitchell <mark@codesourcery.com>
5125
5126 * cp-tree.h (expand_throw): Remove prototype.
5127 * except.c (expand_throw): Make it static. Use tree-generation
5128 functions, rather than RTL-generation functions.
5129 (build_throw): Use it.
5130 * expr.c: Include except.h.
5131 (cplus_expand_expr): Don't call expand_throw here.
5132 * Makefile.in (expr.o): Depend on except.h.
5133 * ir.texi: Update documentation for THROW_EXPR.
5134
5135 * decl.c (start_function): Set x_dont_save_pending_sizes rather
5136 than calling get_pending_sizes.
5137 * init.c (build_new): Don't save and restore
5138 immediate_size_expand; instead, assert that it has the expected
5139 value already.
5140
5141 1999-09-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5142
5143 * lex.c (compiler_error): Add missing call to va_end().
5144
5145 1999-09-25 Mark Mitchell <mark@codesourcery.com>
5146
5147 * dump.c (dequeue_and_dump): Handle RESULT_DECL.
5148 * ir.texi: Document RESULT_DECL and DECL_RESULT.
5149
5150 * cp-tree.h (check_return_expr): New function.
5151 * decl.c (finish_constructor_body): New function.
5152 (pushdecl): Put global friend functions in namespace binding
5153 level, not the class binding level.
5154 (finish_destructor_body): Make sure the dtor_label is always
5155 defined. Fix typo in comment.
5156 (finish_function): Move generation of constructor-termination code
5157 to semantic-analysis time. Move generation of implicit `main'
5158 return value to semantic-analysis time.
5159 * semantics.c (finish_return_stmt): Generate goto's to
5160 ctor_label/dtor_label here. Use check_return_expr to do semantic
5161 analysis on the returned expression.
5162 * typeck.c (maybe_warn_about_returning_address_of_local): New
5163 function split out from c_expand_return.
5164 (check_return_expr): Likewise.
5165 (c_expand_return): Just generate the RTL for the return.
5166
5167 1999-09-24 Mark Mitchell <mark@codesourcery.com>
5168
5169 * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
5170 (cleanup_type): Likewise.
5171 (search_tree): Change prototype.
5172 * decl.c (local_variable_p): Adjust for new interface to
5173 search_tree.
5174 (check_default_argument): Likewise.
5175 * error.c (dump_expr): Handle INIT_EXPR.
5176 * except.c (expand_throw): Don't make cleanup_type a local static.
5177 * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
5178 * init.c (build_new): Call build_new_1 directly, rather than
5179 building a NEW_EXPR.
5180 (build_new_1): Tidy. Don't build a VEC_INIT_EXPR except when
5181 processing file-scope initializers.
5182 * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
5183 * tree.c: Include splay-tree.h
5184 (no_linkage_helper): Adjust for new interface to search_tree.
5185 (search_tree): Pass around pointers to tree nodes, rather than the
5186 nodes themselves. Handle VEC_INIT_EXPR.
5187 (no_linkage_check): Adjust for new interface to search_tree.
5188 (mapcar): Handle VEC_INIT_EXPR.
5189 (target_remap): New variable.
5190 (bot_manip): Use it.
5191 (bot_replace): New function.
5192 (break_out_target_exprs): Use it to remap all variables used in a
5193 default argument expression.
5194 * typeck.c (build_modify_expr): Don't crash when outside a
5195 function and presented with an INIT_EXPR assignment
5196 * Makefile.in (tree.o): Depend on splay-tree.h.
5197
5198 Fri Sep 24 10:48:10 1999 Bernd Schmidt <bernds@cygnus.co.uk>
5199
5200 * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
5201 DECL_BUILT_IN.
5202 (builtin_function): New arg CLASS. Arg CODE now of type int. All
5203 callers changed.
5204 Set the builtin's DECL_BUILT_IN_CLASS.
5205
5206 1999-09-24 Mark Mitchell <mark@codesourcery.com>
5207
5208 * decl.c (pushdecl): Don't make local declarations of extern
5209 variables give the variable a DECL_CONTEXT for the function.
5210 (make_rtl_for_nonlocal_decl): Don't fuss with obstacks. Simplify.
5211 Don't accidentally make RTL for local declarations.
5212 (emit_local_var): Handle declarations with asm-specifiers here.
5213
5214 1999-09-23 Mark Mitchell <mark@codesourcery.com>
5215
5216 * ir.texi: Improve documentation for TARGET_EXPRs. Discuss
5217 STMT_IS_FULL_EXPR_P.
5218
5219 * cp-tree.h (language_function): Add cannot_inline.
5220 * decl.c (start_function): Restore current_function_cannot_inline
5221 from the saved value.
5222 (save_function_data): Save current_function_cannot_inline.
5223 * decl2.c (start_objects): Change prototype. Build the function
5224 in function-at-a-time mode.
5225 (finish_objects): Likewise.
5226 (generate_ctor_or_dtor_function): Adjust accordingly.
5227
5228 * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
5229 * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
5230 Don't call expand_anon_union_decl here
5231 * semantics.c (exapnd_stmt): Call it here, instead.
5232 * typeck.c (mark_addressable): Addressed variables are implicitly
5233 used.
5234
5235 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5236
5237 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
5238 (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
5239 (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
5240 * cp-tree.h: Add tree checking macros to various tree access
5241 macros.
5242 * ptree.c (print_lang_decl): Test for function or variable
5243 before accessing template info.
5244
5245 1999-09-23 Jason Merrill <jason@yorick.cygnus.com>
5246
5247 * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
5248 * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
5249 * decl2.c (lang_f_options): Add -fshort-wchar.
5250 * cp-tree.h: Declare flag_short_wchar.
5251 * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned
5252 int' for wchar_t.
5253
5254 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5255
5256 * ir.texi: Fix formatting errors and typos.
5257
5258 1999-09-22 Mark Mitchell <mark@codesourcery.com>
5259
5260 * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
5261
5262 * decl.c (pushdecl): Do create a binding for extern "C" functions,
5263 but not for their DECL_ASSEMBLER_NAMEs.
5264 (lookup_name_current_level): Fix formatting.
5265 (xref_tag): Likewise.
5266 * decl2.c (start_objects): Mark static constructors and
5267 destructors as used.
5268
5269 1999-09-22 Jason Merrill <jason@yorick.cygnus.com>
5270
5271 * decl.c (define_case_label): Don't crash if we're not in a switch.
5272
5273 * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
5274 * lang-options.h: Restore -fthis-is-variable. Remove help strings
5275 for unsupported flags.
5276
5277 1999-09-21 Jason Merrill <jason@yorick.cygnus.com>
5278
5279 * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
5280 Accept and warn about -fthis-is-variable.
5281
5282 1999-09-21 Mark Mitchell <mark@codesourcery.com>
5283
5284 * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
5285 CLEANUP_STMT, and SCOPE_STMT.
5286
5287 * decl2.c (lang_decode_option): Adjust, in the wake of recent
5288 changes to option processing.
5289
5290 1999-09-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5291
5292 * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
5293 function pointer from pmfs with no object given.
5294 (convert_for_assignment): Do not return error when converting
5295 pmfs.
5296
5297 1999-09-21 Alex Samuel <samuel@codesourcery.com>
5298
5299 * lex.c (internal_filename): New variable.
5300 (INTERNAL_FILENAME): New macro.
5301 (init_parse): Allocate internal_filename and mark as root. Use it
5302 instead of a string constant.
5303
5304 1999-09-21 Nathan Sidwell <nathan@acm.org>
5305
5306 Reimplement dynamic cast and catch matching.
5307 * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
5308 * search.c (dynamic_cast_base_recurse): New function.
5309 (get_dynamic_cast_base_type): New function for dynamic cast.
5310 * rtti.c (build_dynamic_cast_1): Determine source and target
5311 class relationship. Call __dynamic_cast_2.
5312 * tinfo.h (__user_type_info::upcast): New catch dispatcher.
5313 (__user_type_info::dyncast): New dynamic cast dispatcher.
5314 (__user_type_info::sub_kind): New nested enumeration.
5315 (__user_type_info::contained_p): sub_kind predicate.
5316 (__user_type_info::contained_public_p): Likewise.
5317 (__user_type_info::contained_nonpublic_p): Likewise.
5318 (__user_type_info::contained_nonvirtual_p: Likewise.
5319 (__user_type_info::upcast_result): New nested struct.
5320 (__user_type_info::dyncast_result): New nested struct.
5321 (*::do_upcast): New catch function.
5322 (*::do_dyncast): New dynamic cast function.
5323 (__user_type_info::find_public_subobj): New dynamic cast
5324 helper dispatcher.
5325 (*::do_find_public_subobj): New dynamic cast helper function.
5326 * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
5327 (__user_type_info::dyncast): Define dynamic cast dispatcher.
5328 (*::do_upcast): Define catch function.
5329 (*::do_dyncast): Define dynamic cast function.
5330 (*::do_find_public_subobj): Define dynamic cast helper function.
5331 * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
5332 (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
5333 (__dynamic_cast_2): New dynamic cast runtime.
5334
5335 1999-09-20 Mark Mitchell <mark@codesourcery.com>
5336
5337 * cp-tree.h (finish_stmt_expr): Change prototype.
5338 * expr.c (cplus_expand_expr): Adjust call accordingly.
5339 * init.c (finish_init_stmts): Likewise.
5340 * parse.y (primary): Likewise.
5341 * pt.c (tsubst_copy): Likewise.
5342 * semantics.c (finish_stmt_expr): Don't take two parameters.
5343 Don't remove generated BLOCKs from the block-tree.
5344
5345 Remove support for assigning to `this'.
5346 * NEWS: Note that fact.
5347 * class.c (build_vbase_path): Don't check flag_this_is_variable.
5348 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
5349 (language_function): Remove assigns_this, just_assigned_this, and
5350 x_base_init_expr. Add x_vcalls_possible_p. Add vtbls_set_up_p.
5351 (base_init_expr): Remove.
5352 (current_vcalls_possible_p): New macro.
5353 (vtbls_set_up_p): Likewise.
5354 (emit_base_init): Change prototype.
5355 * decl.c (finish_destructor_body): New function, split out from
5356 finish_function.
5357 (current_function_assigns_this): Remove.
5358 (current_function_just_assigned_this): Likewise.
5359 (start_function): Don't set them.
5360 (finish_function): Don't check them. Don't emit
5361 base-initialization code here. Generate code for destructors when
5362 doing semantic analysis.
5363 (finish_stmt): Don't check current_function_just_assigned_this.
5364 * decl2.c (lang_f_options): Remove this-is-variable.
5365 (lang_decode_option): Likewise.
5366 (grokclassfn): Don't check flag_this_is_variable.
5367 * init.c (emit_base_init): Return the expression generated.
5368 (construct_virtual_bases): Don't push/pop obstacks. Fix
5369 typo.
5370 (build_new_1): Don't check flag_this_is_variable.
5371 (get_temp_regvar): Don't set DECL_REGISTER.
5372 (build_vec_init): Don't call use_variable.
5373 * lang-options.h: Remove "-fthis-is-variable" and
5374 "-fno-this-is-variable".
5375 * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
5376 * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
5377 expand_expr_stmt.
5378 * semantics.c (finish_expr_stmt_real): Rename to ...
5379 (finish_expr_stmt): This. Remove assigned_this parameter.
5380 (begin_if_stmt): Call do_pushlevel before starting the statement.
5381 (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
5382 blocks.
5383 (setup_vtbl_ptr): Emit initialization code for bases and members
5384 at semantic-analysis time. Emit code to initialize vtables in
5385 destructors here.
5386 (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
5387 Don't handle CTOR_INITIALIZER any more.
5388 * typeck.c (build_modify_expr): Don't check for assignments to
5389 this.
5390 (c_expand_return): Don't suggest assigning to `this'.
5391
5392 * Makefile.in (decl.o): Depend on RTL_H.
5393 (decl2.o): Likewise.
5394 (class.o): Likewise.
5395 (call.o): Likewise.
5396 (method.o): Likewise.
5397 (search.o): Likewise.
5398 (tree.o): Likewise.
5399 (pt.o): Likewise.
5400
5401 * decl.c (duplicate_decls): When a builtin function is redeclared
5402 as static, make sure it is mangled correctly.
5403
5404 * ir.texi (CTOR_INITIALIZER): Remove mention. Fix typo. Add
5405 detail about the statement-tree.
5406
5407 1999-09-20 Nathan Sidwell <nathan@acm.org>
5408
5409 * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
5410
5411 1999-09-20 Nick Clifton <nickc@cygnus.com>
5412
5413 * decl2.c (lang_decode_option): Extend comment.
5414
5415 Mon Sep 20 10:49:05 1999 Bernd Schmidt <bernds@cygnus.co.uk>
5416
5417 * typeck.c: Include "tm_p.h".
5418
5419 1999-09-19 Mark Mitchell <mark@codesourcery.com>
5420
5421 * ir.texi: New file.
5422
5423 1999-09-19 Paul Burchard <burchard@pobox.com>
5424
5425 * semantics.c (expand_stmt): Initialize return value.
5426
5427 1999-09-18 Paul Burchard <burchard@pobox.com>
5428
5429 * gxxint.texi: G++ now implements namespaces.
5430
5431 1999-09-18 Mark Mitchell <mark@codesourcery.com>
5432
5433 * decl.c (pop_label): Don't warn about unused labels more than
5434 once.
5435 * semantics.c (finish_goto_stmt): Always marked used labels as
5436 used.
5437
5438 * decl.c (layout_var_decl): Change prototype. Call layout_decl
5439 even when the declaration is external.
5440 (cp_finish_decl): Adjust call to layout_var_decl.
5441 * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
5442
5443 1999-09-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
5444
5445 * typeck.c (get_member_function_from_ptrfunc): Always consider
5446 virtuality inside member pointer.
5447
5448 1999-09-17 Mark Mitchell <mark@codesourcery.com>
5449
5450 Turn on function-at-a-time processing.
5451 * cp-tree.h (doing_semantic_analysis_p): New macro.
5452 (SF_DEFAULT): Define to zero, not SF_EXPAND.
5453 (start_handler_parms): Change prototype.
5454 (expand_start_catch_block): Likewise.
5455 (expand_end_catch_block): Likewise.
5456 (expand_start_eh_spec): Likewise.
5457 (expand_end_eh_spec): Declare.
5458 (finish_handler_parms): Change prototype.
5459 (begin_catch_block): Declare.
5460 (finish_handler): Change prototype.
5461 (do_pushlevel): Declare.
5462 (do_poplevel): Likewise.
5463 * decl.c (pushlevel): Don't create
5464 binding levels when not doing semantic analysis.
5465 (poplevel): Don't pop them.
5466 (pushdecl): Assert that we are never called when not doing
5467 semantic analysis.
5468 (pushdecl_top_level): Use push_to_top_level.
5469 (make_label_decl): Don't fiddle with obstacks. Make RTL For the
5470 label when expanding.
5471 (cp_finish_decl): Only inject for-scope variables when doing
5472 semantic analysis. Add comments.
5473 (start_handler_parms): Return the handler parm.
5474 (start_function): Reorganize. Don't clear DECL_INITIAL if it is
5475 already set. Reinitialize from saved function data if available.
5476 Don't pushlevel when not doing semantic analysis.
5477 (store_parm_decls): Only generate RTL when expanding. Only
5478 pushdecl when doing semantic analysis. Set
5479 current_eh_spec_try_block if appropriate.
5480 (finish_function): Simplify. Use do_pushlevel and do_poplevel.
5481 Combine common code. Don't poplevel when not doing semantic
5482 analysis.
5483 (push_cp_function_context): Don't expand functions without an
5484 explicit call to expand_body.
5485 (mark_lang_function): Make eh_spec_try_block and
5486 x_scope_stmt_stack.
5487 * except.c (expand_end_eh_spec): Don't
5488 declare.
5489 (process_start_catch_block): Likewise.
5490 (push_eh_cleanup): Use finish_decl_cleanup.
5491 (initialize_handler_parm): New function.
5492 (expand_start_catch_block): Use it.
5493 (expand_end_catch_block): Use tree-generation functions, not
5494 RTL-generation functions.
5495 (expand_start_eh_spec): Likewise.
5496 (expand_end_eh_spec): Likewise.
5497 (expand_exception_blocks): Simplify.
5498 (start_anon_func): Use do_pushlevel.
5499 (end_anon_func): Use do_poplvel. Call expand_body for the
5500 function.
5501 * expr.c (do_case): Don't call define_case_label.
5502 * init.c (create_temporary_var): Set DECL_CONTEXT for local
5503 variables.
5504 * method.c (emit_thunk): Call expand_body for the
5505 thunk.
5506 (sythesize_method): Likewise.
5507 * parse.y (handler_args): Give it ttype.
5508 (eat_saved_input): Call expand_body.
5509 (base_init): Use do_pushlevel.
5510 (pending_inline): Call expand_body.
5511 (handler): Adjust calls to finish_handler_parms and
5512 finish_handler.
5513 (handler_args): Don't call expand_start_catch_block. Return the
5514 catch parameter. * pt.c (tsubst_expr): Adjust HANDLER handling.
5515 * parse.c: Regenerated.
5516 * rtti.c (synthesize_tinfo_fn): Call finish_function.
5517 * semantics.c (do_pushlevel): Give it external linkage. Build
5518 SCOPE_STMTs.
5519 (do_poplevel): Likewise.
5520 (finish_case_label): Call define_case_label when doing semantic
5521 analysis.
5522 (finish_goto_stmt): Create RTL for labels.
5523 (finish_function_try_block): Set in_function_try_handler
5524 unconditionally.
5525 (finish_function_handler_sequence): Unset it.
5526 (finish_handler_parms): Use expand_start_catch_block even when
5527 building a statement-tree.
5528 (begin_catch_block): New function.
5529 (finish_handler): Move a little RTL-generation logic here.
5530 (finish_decl_cleanup): Allow cleanups for empty declarations.
5531 (finish_named_return_value): Don't pushdecl when not doing
5532 semantic analysis.
5533 (expand_stmt): Don't do semantic analysis for variable
5534 declarations. Handle START_CATCH_STMT. Call expand_label
5535 directly for a LABEL_STMT. Tweak handling of GOTO_STMT. Adjust
5536 HANDLERs. Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
5537 (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
5538 RETURN_INIT and function try blocks.
5539
5540 * cp-tree.h (language_function): Add x_eh_spec_try_block. Add
5541 x_scope_stmt_stack. Add x_in_charge_parm.
5542 (current_eh_spec_try_block): New macro.
5543 (current_scope_stmt_stack): Likewise.
5544 (current_in_charge_parm): Likewise.
5545 * decl.c (start_function): Initialize current_in_charge_parm.
5546 (finish_function): Use current_in_charge_parm rather than looking
5547 up __in_chrg.
5548 * search.c (expand_indirect_vtbls_init): Likewise.
5549
5550 * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
5551 (TRY_BLOCK): Likewise.
5552 (HANDLER): Likewise.
5553 (START_CATCH_STMT): New tree node.
5554 (SCOPE_STMT): Likewise.
5555 * cp-tree.h (SCOPE_BEGIN_P): New macro.
5556 (SCOPE_NULLIFIED_P): Likewise.
5557 (struct lang_decl_flags): Add pending_inline_p. Adjust dummy.
5558 (struct lang_decl): Add saved_language_function.
5559 (DECL_PENDING_INLINE_INFO): Adjust documentation.
5560 (DECL_PENDING_INLINE_P): New macro.
5561 (TYPE_TI_ARGS): Fix typo in comment.
5562 (DECL_SAVED_TREE): Add to documentation.
5563 (DECL_SAVED_FUNCTION_DATA): New macro.
5564 (START_CATCH_TYPE): Likewise.
5565 (SCOPE_END_P): New macro.
5566 (declare_parm_level): Don't declare.
5567 * decl.c (mark_lang_function): New function, split out from
5568 mark_cp_function_context.
5569 (save_function_data): New function.
5570 (declare_parm_level): Remove.
5571 (finish_function): Use save_function_data to squirrel away
5572 important stuff for later use.
5573 (mark_cp_function_context): Use mark_function_data.
5574 (lang_mark_tree): Likewise.
5575 * lex.c (begin_definition_of_inclass_inline): Set
5576 DECL_PENDING_INLINE_P.
5577 (store_pending_inline): Clear it.
5578 * pt.c (tsubst_decl): Likewise.
5579
5580 1999-09-17 Nathan Sidwell <nathan@acm.org>
5581
5582 * call.c (perform_implicit_conversion): Deal with error_mark_node.
5583
5584 1999-09-17 Mark Mitchell <mark@codesourcery.com>
5585
5586 * decl.c (warn_extern_redeclared_static): Don't get confused by
5587 static member functions.
5588 (duplicate_decls): Merge DECL_THIS_STATIC.
5589
5590 * decl.c (expand_static_init): Make sure assignments to local
5591 statics actually occur.
5592
5593 1999-09-17 Mark Mitchell <mark@codesourcery.com>
5594
5595 * cp-tree.h (poplevel_class): Declare.
5596 * class.c (popclass): Use poplevel_class, not poplevel.
5597 * decl.c (poplevel_class): Don't make it static. Don't return a
5598 value.
5599 (poplevel): Don't call poplevel_class; abort in a class
5600 binding level is seen.
5601 * semantics.c (finish_translation_unit): Use pop_everything.
5602 * parse.y (member_init): Allow errors.
5603 (pending_inline): Call finish_function.
5604 * parse.c: Regenerated.
5605 * Makefile.in (CONFLICTS): Adjust.
5606
5607 1999-09-17 Gabriel Dos Reis <gdr@codesourcery.com>
5608
5609 * error.c: Reduce code duplication.
5610 (dump_template_value): New function.
5611 (dump_type_real): Use it.
5612 (dump_decl): Likewise.
5613 (dump_function_name): Likewise.
5614 (dump_function_decl): Don't be too talkative about function return
5615 type variety.
5616
5617 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5618
5619 * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
5620
5621 * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
5622
5623 1999-09-16 Jason Merrill <jason@yorick.cygnus.com>
5624
5625 * decl2.c (finish_file): Also call check_global_declarations for
5626 the pending_statics list.
5627
5628 1999-09-15 Jason Merrill <jason@yorick.cygnus.com>
5629
5630 * lex.c (cp_pragma_implementation): Allow #pragma implementation
5631 in header files.
5632
5633 1999-09-15 Richard Henderson <rth@cygnus.com>
5634
5635 * lex.c (mark_impl_file_chain): Follow the next chain.
5636
5637 1999-09-15 Mark Mitchell <mark@codesourcery.com>
5638
5639 * decl.c (warn_extern_redeclared_static): Simplify. Catch
5640 problems with extern "C" functions redeclared as static.
5641 (duplicate_decls): When a builtin is redeclared static, make the
5642 new function have internal linkage.
5643
5644 1999-09-15 Mark Mitchell <mark@codesourcery.com>
5645
5646 * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
5647 * pt.c (tsubst_copy): Likewise.
5648 * tree.c (search_tree): Likewise.
5649 (mapcar): Likewise.
5650
5651 1999-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5652
5653 * typeck2.c (ack): Don't declare progname.
5654
5655 1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
5656
5657 * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
5658 filenames with ggc_alloc_string.
5659
5660 1999-09-14 Mark Mitchell <mark@codesourcery.com>
5661
5662 * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the
5663 TARGET_EXPR.
5664 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
5665 the TARGET_EXPR.
5666 * cvt.c (build_up_reference): Likewise.
5667 * tree.c (build_cplus_new): Likewise.
5668 (get_target_expr): Likewise.
5669
5670 Tue Sep 14 01:45:10 1999 Marc Espie <espie@cvs.openbsd.org>
5671
5672 * Makefile.in: Prepend $(SHELL) to move-if-change calls.
5673
5674 1999-09-13 Mark Mitchell <mark@codesourcery.com>
5675
5676 * cp-tree.h (build_target_expr): New function.
5677 * call.c (build_conditional_expr): Use build_target_expr.
5678 (convert_like): Likewise.
5679 (build_over_call): Likewise.
5680 * cvt.c (build_up_reference): Likewise.
5681 * decl.c (build_cleanup_on_safe_obstack): Fold into ...
5682 (destroy_local_var): Here.
5683 (build_target_expr): New function.
5684 * tree.c (build_cplus_new): Use it.
5685 (get_target_expr): Likewise.
5686
5687 1999-09-13 Nathan Sidwell <nathan@acm.org>
5688
5689 * typeck.c (expr_sizeof): Don't decay arrays and functions.
5690 Remove misleading comment.
5691 (build_compound_expr): Don't decay arrays.
5692
5693 1999-09-13 Jason Merrill <jason@yorick.cygnus.com>
5694
5695 * call.c (build_conditional_expr): Always use a TARGET_EXPR for
5696 class rvalues again.
5697
5698 Sun Sep 12 23:29:07 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5699
5700 * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
5701
5702 * g++spec.c: Include gcc.h.
5703 (lang_specific_driver): Constify a char*. Call xcalloc, not
5704 xmalloc/bzero. All calls to the function pointer parameter now
5705 explicitly call `fatal'.
5706
5707 1999-09-12 Mark Mitchell <mark@codesourcery.com>
5708
5709 * call.c (implicit_conversion): Robustify. Handle OFFSET_REFs.
5710 * cvt.c (ocp_convert): Complete the from and destination types.
5711 Adjust warning about functions always being `true' in conditionals.
5712 * decl.c (duplicate_decls): Don't play funny games with abort.
5713 * error.c (dump_expr): Handle OVERLOADs.
5714 * spew.c (probe_obstack): Remove.
5715 * typeck.c (condition_conversion): Use perform_implicit_conversion.
5716
5717 1999-09-12 Bernd Schmidt <bernds@cygnus.co.uk>
5718
5719 * cp-tree.h (auto_function, define_function): Adjust prototypes.
5720 * decl.c (define_function): Lose FUNCTION_CODE arg. All callers
5721 changed.
5722 (auto_function): Likewise, for CODE arg.
5723 Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
5724 (builtin_function): ... here.
5725
5726 1999-09-11 Mark Mitchell <mark@codesourcery.com>
5727
5728 * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
5729 (init_decl_processing): Don't set TREE_PERMANENT for the
5730 error_mark_node.
5731 (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
5732 (grokdeclarator): Likewise.
5733 (grokparms): Don't check TREE_PERMANENT when building up lists.
5734 * decl2.c (grokfield): Don't assert TREE_PERMANENT.
5735 (mark_inline_for_output): Likewise.
5736 * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
5737 * init.c (build_offset_ref): Don't check TREE_PERMANENT.
5738 * lex.c (check_newline): Don't check ggc_p; it is always one.
5739 * pt.c (process_template_parm): Don't check TREE_PERMANENT.
5740 * spew.c (yylex): Don't copy_node or probe_obstacks for
5741 non-permanent CONSTANTs and STRINGs.
5742 * tree.c (build_cplus_array_type_1): Don't fuss with
5743 TREE_PERMANENT on ARRAY_TYPEs.
5744
5745 * cp-tree.def (CLEANUP_STMT): New node.
5746 * cp-tree.h (language_function): Add name_declared.
5747 (current_function_name_declared): New macro.
5748 (CLEANUP_DECL): New macro.
5749 (CLEANUP_EXPR): Likewise.
5750 (emit_local_var): Likewise.
5751 (finish_decl_cleanup): New function.
5752 * cvt.c (build_up_reference): Simplify.
5753 (ocp_convert): Remove dead code.
5754 * decl.c (start_decl): Remove call to add_decl_stmt.
5755 (grok_reference_init): Adjust, to handle bindings temporaries to
5756 references. Remove dead code.
5757 (initialize_local_var): Don't generate RTL for
5758 declarations here, or build cleanups here. Don't fuss with
5759 obstacks. Replace expand_start_target_temps calls with explicit
5760 setting of stms_are_full_exprs_p.
5761 (destroy_local_var): New function.
5762 (emit_local_var): Likewise.
5763 (cp_finish_decl): Use them, as appropriate.
5764 (start_function): Announce template functions.
5765 (store_parm_decls): Don't call declare_function_name here.
5766 (finish_stmt): Don't start emit base-initialization code when just
5767 building the statement-tree.
5768 * init.c (create_temporary_var): Move add_decl_stmt call ...
5769 (get_temp_regvar): Here.
5770 * pt.c (tsubst_expr): Make DECL_INITIAL look like what
5771 cp_finish_decl would expect. Don't call add_decl_stmt.
5772 * semantics.c (begin_compound_stmt): Call declare_function_name,
5773 if appropriate.
5774 (finish_decl_cleanup): New function.
5775 (expand_stmt): Use emit_local_var to output variables.
5776 (expand_body): Set current_funtion_name_declared.
5777
5778 1999-09-10 Mark Mitchell <mark@codesourcery.com>
5779
5780 * cp-tree.h (finish_cleanup_try_block): New function.
5781 * semantics.c (finish_cleanup_try_block): Add comment.
5782
5783 Fri Sep 10 10:32:32 1999 Bernd Schmidt <bernds@cygnus.co.uk>
5784
5785 * cp-tree.h: Delete declarations for all tree nodes now moved to
5786 global_trees.
5787 * decl.c: Delete their definitions.
5788 (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
5789 FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
5790 provide defaults.
5791 (init_decl_processing): Call build_common_tree_nodes and
5792 build_common_tree_nodes_2 instead of building their nodes here.
5793 Don't add gc roots for them.
5794
5795 1999-09-10 Mark Mitchell <mark@codesourcery.com>
5796
5797 * cp-tree.h (language_function): Rename expanding_p to
5798 x_expanding_p. Rename named_label_uses to x_named_label_uses.
5799 (expanding_p): Adjust accordingly.
5800 (TREE_VIA_PRIVATE): Fix typo in comment.
5801 (DECL_REFERENCE_SLOT): Remove.
5802 (SET_DECL_REFERENCE_SLOT): Likewise.
5803 * decl.c (named_label_uses): Adjust. Remove chicken comment.
5804 (push_overloaded_decl): Don't truncate the chain of bindings when
5805 adding an overloaded function.
5806 (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
5807 (initialize_local_var): Fix typo in comment.
5808 (store_parm_decls): Don't set DECL_REFERENCE_SLOT. Tidy up.
5809 * decl2.c (start_objects): Make the fact that we are expanding
5810 the generated function right away explicit.
5811 (start_static_storage_duration_function): Likewise.
5812 (finish_file): Fix typo in comment.
5813 * init.c (build_vec_init): Correct bugs in handling cleanups.
5814 * semantics.c (maybe_convert_cond): New function.
5815 (FINISH_COND): Always store the condition, even if there's
5816 a declaration.
5817 (finish_if_stmt_cond): Use maybe_convert_cond.
5818 (finish_while_stmt_cond): Likewise.
5819 (finish_do_stmt): Likewise.
5820 (finish_for_cond): Likewise.
5821 (expand_cond): Adjust.
5822
5823 * cp-tree.h (FN_TRY_BLOCK_P): New macro.
5824 * init.c (perform_member_init): Remove obstack machinations.
5825 (expand_cleanup_for_base): Likewise.
5826 (finish_init_stmts): Mark the statement-expression as used.
5827 * method.c (emit_thunk): Use tree-generating functions, not
5828 RTL.
5829 (do_build_copy_constructor): Likewise.
5830 (do_build_assign_ref): Likewise.
5831 (synthesize_method): Likewise. Keep track of line numbers.
5832 * pt.c (tsubst_expr): Handle various kinds of try blocks.
5833 * semantics.c (expand_stmts): Remove.
5834 (begin_function_try_block): Set FN_TRY_BLOCK_P.
5835 (finish_function_try_block): Be careful rechaining
5836 function try blocks.
5837 (expand_stmt): Loop through all the statements at a given level.
5838 (exapnd_body): Be careful with line-numbers here too. Prepare for
5839 being called directly from the parser.
5840
5841 * cp-tree.h (finish_function): Adjust prototype.
5842 * decl.c (finish_function): Return the function compiled.
5843 * pt.c (instantiate_decl): Don't play games with obstacks.
5844 * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
5845 (search_tree): Likewise.
5846 * typeck.c: Fix typo in comment.
5847 * typeck2.c (store_init_value): Add comment.
5848
5849 * cp-tree.h (CPTI_ATEXIT): New macro.
5850 (atexit_node): Likewise.
5851 * decl.c (destroy_local_static): New function, broken out from ...
5852 (expand_static_init): Here.
5853
5854 * rtti.c (get_tinfo_var): These should always be global
5855 (expand_si_desc): Use tree, not RTL, functions to generate code.
5856 (expand_class_desc): Likewise.
5857 (expand_ptr_desc): Likewise.
5858 (expand_attr_desc): Likewise.
5859 (expand_generic_desc): Likewise.
5860 (synthesize_tinfo_fn): Likewise.
5861
5862 1999-09-09 Mark Mitchell <mark@codesourcery.com>
5863
5864 * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
5865 (RECHAIN_STMTS_FROM_LAST): Remove. Replace all uses with
5866 RECHAIN_STMTS.
5867 (RECHAIN_STMST_FROM_CHAIN): Likewise.
5868
5869 * parse.y (simple_stmt): Fix typo in last change.
5870
5871 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
5872 (STMT_IS_FULL_EXPR_P): Likewise.
5873 (STMT_LINENO_FOR_FN_P): Likewise.
5874 (prep_stmt): New function.
5875 (building_stmt_tree): Tweak for safety.
5876 * pt.c (tsubst_expr): Use prep_stmt throughout.
5877 (add_tree): Move it to semantics.c
5878 * semantics.c (add_tree): Move it here.
5879 (finish_expr_stmt_real): New function.
5880 (finish_expr_stmt): Use it.
5881 (finish_if_stmt_cond): Use FINISH_COND.
5882 (finish_while_stmt_cond): Likewise.
5883 (finish_for_cond): Likewise.
5884 (finish_stmt_tree): Tweak line-number handling.
5885 (prep_stmt): New function.
5886 (expand_stmt): Use it.
5887
5888 * cp-tree.h (begin_switch_stmt): Adjust prototype.
5889 (finish_switch_cond): Likewise.
5890 * parse.y (simple_stmt): Adjust accordingly.
5891 * parse.c: Regenerated.
5892 * pt.c (tsubst_expr): Adjust accordingly.
5893 * semantics.c (expand_cond): New function.
5894 (FINISH_COND): New macro.
5895 (begin_switch_stmt): Build the SWITCH_STMT here.
5896 (finish_switch_stmt_cond): Not here.
5897 (expand_stmt): Adjust calls to begin_switch_stmt and
5898 finish_switch_cond. Use expand_cond throughout.
5899
5900 * dump.c (dequeue_and_dump): Dump types for constants.
5901 Describe DECL_ARG_TYPE more intuitively.
5902 Handle ARRAY_REF.
5903
5904 * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
5905 (lang_cleanup_tree): Remove.
5906 * lex.c (make_lang_type): Use ggc_alloc to allocate
5907 TYPE_LANG_SPECIFIC.
5908
5909 Reorganize per-function data.
5910 * cp-tree.h (saved_scope): Add function_decl, bindings.
5911 (language_function): Rename binding_level to bindings.
5912 (cp_function_chain): Use the current_function, not the
5913 outer_function_chain.
5914 (current_class_ptr): Make it work, even when there's no
5915 current function.
5916 (current_class_ref): Likewise.
5917 (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New
5918 macros.
5919 (clear_temp_name): Remove.
5920 * decl.c (check_function_type): New function, broken out from
5921 start_function.
5922 (current_binding_level): Adjust definition.
5923 (pushlevel): Simplify.
5924 (poplevel): Don't use named_label_uses when we're outside
5925 a function scope.
5926 (mark_saved_scope): Mark function_decl and bindings.
5927 (maybe_push_to_top_level): Don't unconditionally push a new
5928 function context. Save bindings and the current_function_decl.
5929 Don't clear named_labels.
5930 (pop_from_top_level): Pop function context if appropriate.
5931 (init_decl_processing): Set init_lang_status and free_lang_status,
5932 rather than save_lang_status and restore_lang_status.
5933 (start_function): Take SF_* flags. Don't clear per-function data.
5934 Reorder and simplify to use new per-function data code. Add
5935 asserts.
5936 (store_parm_decls): Don't call init_function_start here.
5937 (finish_function): Adjust for new handling of per-function data.
5938 (push_cp_function_context): Simplify.
5939 (mark_cp_function_context): Change binding_level to bindings.
5940 * decl2.c (clear_temp_name): Remove.
5941 (start_objects): Use SF flags to start_function.
5942 (start_static_storage_duration_function): Likewise.
5943 * except.c (start_anon_func): Remove redundant calls to
5944 push_function_context_to. Use SF flags to start function.
5945 (end_anon_func): Remove redundant call to pop_function_context
5946 from.
5947 * lex.c (reinit_parse_for_function): Don't initialize per-function
5948 data.
5949 * method.c (emit_thunk): Clear current_function after calling
5950 assemble_end_function. Use SF flags for start_function.
5951 (synthesize_method): Use SF flags for start_function.
5952 * parse.c: Regenerated.
5953 * parse.y (fn.defpen): Likewise.
5954 (pending_inline): Clear current_function, even if something goes
5955 wrong.
5956 * pt.c (instantiate_decl): Use SF flags to start_function.
5957 Don't save and restore expanding_p.
5958 (add_tree): Handle the case where we are outside any function.
5959 (end_tree): Likewise.
5960 * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
5961 * semantics.c (begin_function_definition): Likewise.
5962 (expand_body): Likewise.
5963
5964 1999-09-09 Nathan Sidwell <nathan@acm.org>
5965
5966 * cp-tree.h (convert_to_void): Prototype new function.
5967 (require_complete_type_in_void): Remove prototype.
5968 * cvt.c (convert_to_void): New function.
5969 (ocp_convert): Use convert_to_void.
5970 * decl.c (cplus_expand_expr_stmt): Likewise, for complete
5971 expressions.
5972 * typeck.c (require_complete_type_in_void): Remove function.
5973 (build_compound_expr): Use convert_to_void.
5974 (build_static_cast): Likewise.
5975 (build_c_cast): Likewise.
5976 * semantics.c (finish_expr_stmt): Do not decay full expressions.
5977
5978 * typeck.c (build_x_compound_expr): Add FIXME.
5979
5980 1999-09-08 Mark Mitchell <mark@codesourcery.com>
5981
5982 * cp-tree.h (scratch_tree_cons): Remove.
5983 * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
5984 and perm_tree_cons with plain tree_cons.
5985 * class.c: Likewise.
5986 * decl.c: Likewise.
5987 * decl2.c: Likewise.
5988 * except.c: Likewise.
5989 * expr.c: Likewise.
5990 * init.c: Likewise.
5991 * lex.c: Likewise.
5992 * method.c: Likewise.
5993 * parse.y: Likewise.
5994 * pt.c: Likewise.
5995 * repo.c: Likewise.
5996 * rtti.c: Likewise.
5997 * search.c: Likewise.
5998 * typeck.c: Likewise.
5999 * parse.c: Regenerated.
6000 * tree.c (build_srcloc): Simplify.
6001
6002 1999-09-08 Bruce Korb autogen@linuxbox.com
6003
6004 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
6005
6006 1999-09-08 Mark Mitchell <mark@codesourcery.com>
6007
6008 * cp-tree.h (lang_decl_flags): Remove permanent_attr.
6009 Remove next.
6010 (LANG_DECL_PERMANENT): Remove.
6011 * decl.c (duplicate_decls): Don't mess about with obstacks trying
6012 to free memory.
6013 (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
6014 * lex.c (free_lang_decl_chain): Remove.
6015 (build_lang_decl): Don't use obstacks.
6016 (retrofit_lang_decl): Likewise.
6017 (copy_lang_decl): Likewise.
6018
6019 * cp-tree.h (saved_scope): Remove old_binding_level and
6020 function_decl. Tidy up.
6021 * decl.c (mark_saved_scope): Don't set them.
6022 (maybe_push_to_top_level): Clear memory.
6023
6024 * decl.c (layout_var_decl): Change prototype. Don't complete
6025 types for external objects.
6026 (check_initializer): Likewise. Tidy.
6027 (initialize_local_var): Complete types here.
6028 (cp_finish_decl): Not here. Reorganize a little.
6029 (grokvardecl): Don't complete types here.
6030
6031 * decl.c (start_function): Clear last_dtor_insn and
6032 last_parm_cleanup_insn.
6033 (push_cp_function_context): Just copy over a little of
6034 the old context, not all of it.
6035
6036 * cp-tree.h (copy_to_permanent): Remove.
6037 (permanent_p): Likewise.
6038 * decl.c (building_typename_type): Don't use copy_to_permanent.
6039 (start_decl): Likewise.
6040 (grok_reference_init): Likewise.
6041 (cp_finish_decl): Likewise.
6042 * init.c (build_new_1): Don't use mapcar.
6043 (build_vec_delete_1): Don't use copy_to_permanent.
6044 (build_vec_init): Likewise.
6045 * parse.y (primary): Likewise.
6046 * parse.c: Regenerated.
6047 * pt.c (push_template_decl_real): Don't use copy_to_permanent.
6048 (lookup_template_class): Likewise.
6049 (tsubst_friend_function): Likewise.
6050 (instantiate_class_template): Likewise.
6051 (tsubst_decl): Likewise.
6052 (tsubst): Likewise.
6053 (instantiate_template): Likewise.
6054 (unify): Likewise.
6055 * rtti.c (get_tinfo_fn): Likewise.
6056 (build_dynamic_cast): Likewise.
6057 * semantics.c (finish_if_stmt_cond): Likewise.
6058 (finish_while_stmt_cond): Likewise.
6059 (finish_do_stmt): Likewise.
6060 (finish_for_cond): Likewise.
6061 (finish_for_expr): Likewise.
6062 (finish_cleanup): Likewise.
6063 (add_decl_stmt): Likewise.
6064 (finish_named_return_value): Likewise.
6065 (finish_qualified_call_expr): Likewise.
6066 * tree.c (perm_manip): Remove.
6067 (build_exception_variant): Don't use copy_to_permanent.
6068 (permanent_p): Remove.
6069 (copy_to_permament): Remove.
6070 (build_min_nt): Don't use copy_to_permanent.
6071 (build_min): Likewise.
6072 (min_tree_cons): Likewise.
6073 * typeckc.c (build_static_cast): Likewise.
6074 (build_reinterpret_cast): Likewise.
6075 (build_const_cast): Likewise.
6076
6077 1999-09-07 Mark Mitchell <mark@codesourcery.com>
6078
6079 * decl.c (ggc_p): Set it to 1.
6080 (mark_saved_scope): Add prototype.
6081
6082 1999-09-07 Richard Henderson <rth@cygnus.com>
6083
6084 * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
6085 * typeck.c (self_promoting_args_p): Delete.
6086
6087 1999-09-07 Jason Merrill <jason@yorick.cygnus.com>
6088
6089 * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
6090 (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
6091
6092 1999-09-07 Mark Mitchell <mark@codesourcery.com>
6093
6094 * Makefile.in (tree.o): Depend on ggc.h.
6095 * class.c (make_method_vec): Remove.
6096 (free_method_vec): Likewise.
6097 (free_method_vecs): Remove.
6098 (add_method): Don't use them.
6099 * cp-tree.def (PTRMEM_CST): Make it longer.
6100 (TEMPLATE_PARM_INDEX): Make it shorter.
6101 * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
6102 (template_parm_index): Remove RTL field.
6103 (ptrmem_cst): Add RTL field.
6104 (finish_function): Removed parameter.
6105 (process_next_inline): Change prototype.
6106 (init_cplus_unsave): Rename to init_tree.
6107 (binding_init): Remove.
6108 * decl.c (free_binding_nodes): Remove.
6109 (push_binding): Don't use them. Set BINDING_HAS_LEVEL_P.
6110 (pop_binding): Don't use free_binding_nodes.
6111 (free_binding_vecs): Remove.
6112 (store_bindings): Don't use them.
6113 (pop_from_top_level): Likewise.
6114 (lookup_namespace_name): Simplify.
6115 (build_typename_type): Don't use obstack_free.
6116 (unqualified_namespace_lookup): Simplify.
6117 (lookup_name_real): Simplify.
6118 (start_function): Remove comment about leaks.
6119 (finish_function): Removed nested parameter. Call
6120 expand_end_bindings even when building_stmt_tree.
6121 Call ggc_push_context and ggc_pop_context around
6122 rest_of_compilation, if necessary.
6123 (mark_cp_function_context): Handle a NULL language-context.
6124 (lang_mark_false_label_stack): Fix typo.
6125 (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
6126 TEMPLATE_PARM_INDEX. Handle the funny TYPE_LANG_SPECIFIC on
6127 pointer to method types.
6128 (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
6129 * decl2.c (finish_objects): Adjust call to finish_function.
6130 (finish_static_store_duration_function): Likewise.
6131 (do_nonmember_using_decl): Remove call to binding_init.
6132 * except.c (end_anon_func): Adjust call to finish_function.
6133 * lex.c (mark_impl_file_chain): New function.
6134 (init_parse): Call init_tree, not init_cplus_unsave.
6135 Add GC roots.
6136 (cp_pramga_interface): Use xmalloc, not permalloc.
6137 (cp_pragma_implementation): Likewise.
6138 (begin_definition_of_inclass_inline): Simplify.
6139 (process_next_inline): Adjust prototype.
6140 (do_scoped_id): Don't call binding_init.
6141 (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
6142 * method.c (emit_thunk): Adjust call to finish_function.
6143 (synthesize_method): Likewise.
6144 * parse.y (%union): Add a new `pi' variant.
6145 (PRE_PARSED_FUNCTION_DECL): Use it.
6146 (fn.defpen): Likewise.
6147 (fndef): Adjust call to finish_function.
6148 * pt.c (instantiate_decl): Likewise.
6149 * rtti.c (syntheisze_tinfo_fn): Likewise.
6150 * semantics.c (expand_body): Likewise.
6151 * tree.c: Include ggc.h.
6152 (mark_list_hash): New function.
6153 (binding_init): Remove.
6154 (init_cplus_unsave): Rename to ...
6155 (init_tree): This. Add GC roots.
6156
6157 1999-09-05 Mark Mitchell <mark@codesourcery.com>
6158
6159 Get ready for garbage collection.
6160 * Makefile.in (CXX_TREE_H): Add varray.h
6161 (lex.o): Depend on ggc.h.
6162 (decl.o): Likewise.
6163 (decl2.o): Likewise.
6164 (method.o): Likewise.
6165 (search.o): Likewise.
6166 (pt.o): Likewise.
6167 (repo.o): Likewise.
6168 * class.c: Include ggc.h.
6169 (current_class_name): Remove.
6170 (current_class_type): Likewise.
6171 (current_access_specifier): Likewise.
6172 (previous_class_type): Likewise.
6173 (previous_class_values): Likewise.
6174 (class_cache_firstobj): Likewise.
6175 (current_lang_base): Likewise.
6176 (current_lang_stack): Likewise.
6177 (current_lang_stacksize): Likewise.
6178 (lang_name_c): Likewise.
6179 (lang_name_cplusplus): Likewise.
6180 (lang_name_java): Likewise.
6181 (current_lang_name): Likewise.
6182 (base_layout_decl): Likewise.
6183 (access_default_node): Likewise.
6184 (access_public_node): Likewise.
6185 (access_protected_node): Likewise.
6186 (access_private_node): Likewise.
6187 (access_default_virtual_node): Likewise.
6188 (access_public_virtual_node): Likewise.
6189 (access_protected_virtual_node): Likewise.
6190 (access_private_virtual_node): Likewise.
6191 (signed_zero_node): Likewise.
6192 (init_class_processing): Don't build base_layout_decl.
6193 (push_lang_context): Adjust now that current_lang_base is a varray.
6194 (pop_lang_context): Likewise.
6195 * cp-tree.h: Include varray.h.
6196 (cp_global_trees): Add access_default, access_public,
6197 access_protected, access_private, access_default_virtual,
6198 access_public_virtual, access_protected_virtual,
6199 access_private_virtual, ctor_identifier, delta2_identifier,
6200 delta_identifier, dtor_identifier, in_charge_identifier,
6201 index_identifier, nelts_identifier, this_identifier,
6202 pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
6203 lang_name_c, lang_name_cplusplus, lang_name_java,
6204 empty_except_spec, null, jclass, minus_one, terminate.
6205 (saved_scope): Move here from decl.c. Define globals in terms of
6206 saved_scope: current_namespace, current_class_name,
6207 current_class_type, current_access_specifier, current_lang_stack,
6208 current_lang_base, current_lang_name, current_function_parms,
6209 current_template_parms, processing_template_decl,
6210 processing_specialization, processing_explicit_instantiation,
6211 previous_class_type, previous_class_values, class_cache_firstobj.
6212 (scope_chain): New variable.
6213 (init_pt): New function.
6214 * decl.c (current_namespace): Remove.
6215 (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
6216 (dtor_identifier, pfn_identifier, index_identifier): Likewise.
6217 (delta_identifier, delta2_identifier): Likewise.
6218 (pfn_or_delta2_identifier, tag_identifier): Likewise
6219 (vt_off_identifier, empty_except_spec, null_node): Likewise.
6220 (current_function_parms, current_lang_base): Remove.
6221 (current_lang_stack, previous_class_values): Remove.
6222 (class_binding_level): Macroize.
6223 (saved_scope): Remove.
6224 (current_saved_scope): Rename to scope_chain.
6225 (mark_saved_scope): Adjust for new scope structure.
6226 (maybe_push_to_top_level): Likewise.
6227 (pop_from_top_level): Likewise.
6228 (duplicate_decls): Adjust now that current_lang_base is a varray.
6229 (build_typename_type): Call ggc_add_tree_hash_table_root.
6230 (init_decl_processing): Call init_pt. Call push_to_top_level to
6231 set up globals. Add GC roots.
6232 (xref_basetypes): Adjust now that current_lang_base is a varray.
6233 * decl.h (this_identifier): Remove.
6234 (in_charge_identifier): Likewise.
6235 * decl2.c: Don't include varray.h.
6236 (current_namespace): Remove.
6237 (init_decl2): Add GC roots.
6238 * except.c (Terminate): Remove.
6239 (init_exception_processing): Use terminate_node instead.
6240 (build_terminate_handler): Likewise.
6241 * init.c (nc_nelts_field_id): Remove.
6242 (minus_one): Likewise.
6243 (init_init_processing): Use minus_one_node and nelts_identifier
6244 instead. Add GC roots.
6245 (jclass_node): Remove.
6246 (build_new_1): Use nelts_identifier.
6247 (build_vec_init): Likewise.
6248 (build_vec_delete): Likewise.
6249 * lex.c: Include ggc.h.
6250 (defarg_fn): Move declaration early.
6251 (defarg_parms): Likewise.
6252 (init_parse): Add GC roots.
6253 (handle_cp_pragma): Remove redundant declaration of
6254 pending_vtables.
6255 * method.c: Include ggc.h.
6256 (btypelist): Make it a varray. All uses changed.
6257 (ktypelist): Likewise.
6258 (init_method): Add GC roots.
6259 * pt.c: Don't include varray.h. Include ggc.h.
6260 (current_template_parms): Remove.
6261 (processing_template_decl): Likewise.
6262 (processing_specialization): Likewise.
6263 (processing_explicit_instantiation): Likewise.
6264 (init_pt): New function.
6265 * repo.c: Include ggc.h.
6266 (init_repo): Add GC roots.
6267 * search.c: Don't include varray.h.
6268 (_vptr_name): Remove.
6269 (lookup_field_1): Use vtpr_identifier instead.
6270 (expand_indirect_vtbls_init): Remove redundant declaration of
6271 in_charge_identifier.
6272 (init_search_processing): Use vptr_identifier.
6273
6274 1999-09-05 Richard Henderson <rth@cygnus.com>
6275 Bernd Schmidt <bernds@cygnus.co.uk>
6276 Mark Mitchell <mark@codesourcery.com>
6277
6278 * Makefile.in (parse.o): Depend on ggc.h.
6279 (decl2.o): Depend on ggc.h.
6280 (init.o): Depend on ggc.h.
6281 * cp-tree.h (init_decl2): Declare.
6282 (cp_parse_init): Likewise.
6283 * decl.c (ggc_p): Define to zero.
6284 (mark_saved_scope): New function.
6285 (init_decl_processing): Call cp_parse_init, and cp_decl2.
6286 Register GC roots.
6287 (expand_static_init): Add GC roots.
6288 * decl2.c: Include ggc.h.
6289 (init_decl2): New function.
6290 * init.c: Include ggc.h.
6291 (init_init_processing): Add GC roots.
6292 * parse.y: Include ggc.h.
6293 (cp_parse_init): New function.
6294
6295 1999-09-04 Mark Mitchell <mark@codesourcery.com>
6296
6297 * decl.c (init_decl_processing): Set mark_lang_status.
6298 (lang_mark_false_label_stack): Adjust prototype.
6299 * decl2.c (grok_function_init): Remove extraneous declaration of
6300 abort_fndecl.
6301
6302 * Make-lang.in (cc1plus): Remove dependency on GGC.
6303 * Makefile.in (OBJS): Don't mention ggc-simple.o.
6304 (OBJDEPS): Don't mention ggc-simple.o.
6305
6306 * Make-lang.in (cc1plus): Depend on $(GGC).
6307 * Makefile.in (OBJS): Add ggc-simple.o.
6308 (OBJDEPS): Likewise.
6309 * cp-tree.h (language_function): Rename members to `x_' versions;
6310 we now have x_named_labels, x_ctor_label, x_dtor_label,
6311 x_base_init_list, x_member_init_list, x_base_init_expr,
6312 x_current_class_ptr, x_current_class_ref, x_last_tree,
6313 x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
6314 x_result_rtx.
6315 (dtor_label, ctor_label, current_base_init_list,
6316 current_member_init_list, base_init_expr, current_class_ptr,
6317 current_class_ref, last_tree, last_expr_type): Adjust accordingly.
6318 * decl.c: Include ggc.h.
6319 (last_dtor_insn): Adjust to use x_ names.
6320 (last_parm_cleanup_insn): Likewise.
6321 (original_result_rtx): Likewise.
6322 (named_labels): Likewise.
6323 (mark_binding_level): New function.
6324 (mark_cp_function_context): Likewise.
6325 (mark_false_label_stack): Likewise.
6326 (lang_mark_tree): Likewise.
6327 (lang_cleanup_tree): Likewise.
6328
6329 1999-09-03 Mark Mitchell <mark@codesourcery.com>
6330
6331 * Makefile.in (CXX_TREE_H): Include function.h.
6332 (decl.o): Don't depend on function.h.
6333 (decl2.o): Likewise.
6334 (typeck.o): Likewise.
6335 (init.o): Likewise.
6336 (method.o): Likewise.
6337 * cp-tree.h: Include function.h.
6338 (cp_function): Rename to language_function. Remove next.
6339 (cp_function_chain): Make it a macro, not a variable.
6340 (push_cp_function_context): Don't declare.
6341 (pop_cp_function_context): Likewise.
6342 * decl.c: Don't include function.h.
6343 (push_cp_function_context): Make it static. Make it suitable for
6344 a save_lang_status callback.
6345 (pop_cp_function_context): Likewise.
6346 (maybe_push_to_top_level): Call push_function_context_to, not
6347 push_cp_function_context.
6348 (pop_from_top_level): Call pop_function_context_from, not
6349 pop_cp_function_context.
6350 (init_decl_processing): Set save_lang_status and
6351 restore_lang_status. Call push_function_context_to, not
6352 push_cp_function_context.
6353 (cp_function_chain): Remove.
6354 * decl2.c: Don't include function.h.
6355 * except.c: Don't include function.h.
6356 (start_anon_func): Call push_function_context_to, not
6357 push_cp_function_context.
6358 (end_anon_func): Call pop_function_context_from, not
6359 pop_cp_function_context.
6360 * init.c: Don't include function.h.
6361 * lex.c (begin_definition_of_inclass_inline): Call
6362 push_function_context_to, not push_cp_function_context.
6363 (process_next_inline): Call pop_function_context_from, not
6364 pop_cp_function_context.
6365 * method.c: Don't include function.h.
6366 (synthesize_method): Call push_function_context_to, not
6367 push_cp_function_context. Call pop_function_context_from, not
6368 pop_cp_function_context.
6369 * typeck.c: Don't include function.h.
6370
6371 * decl.c (expand_static_init): Tweak handling of static
6372 initializations for objects without constructors.
6373
6374 1999-09-03 Nathan Sidwell <nathan@acm.org>
6375
6376 * typeck.c (build_indirect_ref): Reject dereference of pointer to
6377 void.
6378
6379 1999-09-02 Mark Mitchell <mark@codesourcery.com>
6380
6381 * cp-tree.h (cp_function): Move here, from decl.c.
6382 (cp_function_chain): Declare.
6383 (dtor_label): New macro, instead of variable.
6384 (ctor_label): Likewise.
6385 (current_base_init_list): Likewise.
6386 (current_member_init_list): Likewise.
6387 (base_init_expr): Likewise.
6388 (current_class_ptr): Likewise.
6389 (current_class_ref): Likewise.
6390 (last_tree): Likewise.
6391 (last_expr_type): Likewise.
6392 (current_function_returns_value): Likewise.
6393 (current_function_returns_null): Likewise.
6394 (current_function_just_assigned_this): Likewise.
6395 (current_function_parms_stored): Likewise.
6396 (temp_name_counter): Likewise.
6397 (static_labelno): Likewise.
6398 (expanding_p): Likewise.
6399 (stmts_are_full_exprs_p): Likewise.
6400 (in_function_try_handler): Likewise.
6401 (lang_type): Remove nested type_flags. All uses changed.
6402 * call.c (ctor_label): Remove.
6403 (dtor_label): Likewise.
6404 * class.c (current_class_ptr): Remove.
6405 (current_class_ref): Likewise.
6406 * decl.c (static_labelno): Remove.
6407 (dtor_label): Likewise.
6408 (last_dtor_insn): New macro, instead of variable.
6409 (last_parm_cleanup_insn): Likewise.
6410 (original_result_rtx): Likewise.
6411 (in_function_try_handler): Remove.
6412 (named_label_uses): New macro, instead of variable.
6413 (named_labels): Likewise.
6414 (current_function_returns_value): Remove.
6415 (current_function_returns_null): Likewise.
6416 (current_function_assigns_this): New macro, instead of variable.
6417 (current_function_just_assigned_this): Likewise.
6418 (current_binding_level): Likewise.
6419 (init_decl_processing): Call push_cp_function_context.
6420 (cp_function): Move to cp-tree.h
6421 (cp_function_chain): Make it global.
6422 (temp_name_counter): Remove.
6423 (push_cp_function_context): Simplify.
6424 (pop_cp_function_context): Likewise.
6425 * decl2.c (temp_name_counter): Remove.
6426 * init_c (current_base_init_list): Likewise.
6427 (current_member_init_list): Likewise.
6428 (base_init_expr): Likewise.
6429 * method.c (static_labelno): Likewise.
6430 * pt.c (last_tree): Likewise.
6431 * semantics.c (expanding_p): Likewise.
6432 (stmts_are_full_exprs_p): Likewise.
6433 (last_expr_type): Likewise.
6434 * typeck.c (dtor_label): Likewise.
6435 (ctor_label): Likewise.
6436
6437 1999-09-01 Alex Samuel <samuel@codesourcery.com>
6438
6439 * decl2.c (arg_assoc_template_arg): New prototype. New function.
6440 (arg_assoc_class): Use arg_assoc_template_arg for template
6441 arguments.
6442 (arg_assoc): Likewise.
6443 * pt.c (mangle_class_name_for_template): Allow member template
6444 template arguments.
6445
6446 1999-09-02 Nathan Sidwell <nathan@acm.org>
6447
6448 * call.c (build_conditional_expr): Warn on enum mismatches.
6449 (convert_arg_to_ellipsis): Move non-pod check to after
6450 conversion.
6451
6452 1999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6453
6454 * gxx.gperf (hash, is_reserved_word): Add prototypes.
6455
6456 * init.c (build_vec_init): Initialize variable `try_block'.
6457
6458 * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
6459 Likewise for bzero/memset.
6460 (token_getch, token_put_back): Add static prototypes. Remove
6461 `inline' from the definitions.
6462 (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
6463
6464 1999-09-01 Mark Mitchell <mark@codesourcery.com>
6465
6466 * cp-tree.h (lang_type): Move align into type_flags.
6467 (CLASSTYPE_ALIGN): Adjust accordingly.
6468 * call.c (direct_reference_binding): Remove misleading comment.
6469
6470 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6471
6472 * parse.y (language_string): Constify.
6473
6474 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6475
6476 * repo.c (getpwd): Don't prototype.
6477 * xref.c (getpwd): Likewise
6478
6479 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6480
6481 * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
6482 Remove hacks for stuff which now comes from libiberty.
6483
6484 1999-08-30 Jason Merrill <jason@yorick.cygnus.com>
6485
6486 * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
6487
6488 1999-08-30 Mark Mitchell <mark@codesourcery.com>
6489
6490 * cp-tree.h (begin_init_stmts): Declare.
6491 (finish_init_stmts): Likewise.
6492 * cvt.c (build_up_reference): Wrap the declaration of a temporary
6493 in a statement-expression so that we will see it when expanding
6494 tree structure later.
6495 * init.c (begin_init_stmts): Don't make it static.
6496 (finish_init_stmts): Likewise.
6497
6498 * cp-tree.h (start_handler_parms): New function.
6499 (expand_start_catch_block): Take only one parameter.
6500 (start_handler_parms): New function.
6501 * decl.c (start_handler_parms): Define it.
6502 * except.c (process_start_catch_block): Take only one parameter.
6503 Don't call grokdeclarator here.
6504 (expand_start_catch_block): Don't call grokdeclarator here,
6505 either.
6506 * parse.y (handler_args): Adjust call to
6507 expand_start_catch_block. Use start_handler_parms.
6508 * pt.c (push_template_decl_real): Make permanent lists have
6509 permanent elements.
6510 (tsubst_expr): Adjust calls to expand_start_catch_block
6511 appropriately.
6512 * semantics.c (expand_stmt): Likewise.
6513
6514 1999-08-29 Alex Samuel <samuel@codesourcery.com>
6515
6516 * pt.c (push_template_decl_real): Use template declaration from
6517 class type if it exists.
6518
6519 1999-08-29 Mark Mitchell <mark@codesourcery.com>
6520
6521 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
6522 (maybe_inject_for_scope_var): Declare it.
6523 (initialize_local_var): Likewise.
6524 * decl.c (maybe_inject_for_scope_var): Make it global.
6525 (initialize_local_var): Likewise. Move cleanup handling here,
6526 from cp_finish_decl.
6527 (make_rtl_for_nonlocal_decl): Use
6528 push_obstacks_nochange/pop_obstacks, rather than
6529 end_temporary_allocation/resume_temporary_allocation.
6530 (cp_finish_decl): Try to complete the type of a variable when it
6531 is declared. Move cleanup-handling to initialize_local_var.
6532 (expand_static_init): Use tree-building code, rather than
6533 RTL-building code.
6534 * decl2.c (get_temp_name): Assert non-initializedness of
6535 temporaries.
6536 * init.c (create_temporary_var): Move RTL-assigning code to ...
6537 (get_temp_regvar): Here.
6538 * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here.
6539 * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just
6540 call initialize_local_var to generate initialization code.
6541
6542 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6543
6544 * cp-tree.h (fndecl_as_string, type_as_string,
6545 type_as_string_real, args_as_string, decl_as_string,
6546 expr_as_string, code_as_string, language_as_string,
6547 parm_as_string, op_as_string, assop_as_string, cv_as_string,
6548 lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
6549
6550 * errfn.c (cp_printer): Likewise.
6551
6552 * error.c (cp_printer, fndecl_as_string, type_as_string_real,
6553 type_as_string, expr_as_string, decl_as_string, lang_decl_name,
6554 cp_file_of, code_as_string, language_as_string, parm_as_string,
6555 op_as_string, assop_as_string, args_as_string, cv_as_string):
6556 Likewise.
6557
6558 * tree.c (lang_printable_name): Likewise.
6559
6560 1999-08-28 Richard Henderson <rth@cygnus.com>
6561
6562 * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
6563
6564 1999-08-28 Mark Mitchell <mark@codesourcery.com>
6565
6566 * cp-tree.h (strip_array_types): New function.
6567 * decl.c (maybe_deduce_size_from_array_init): New function, split
6568 out from cp_finish_decl.
6569 (layout_var_decl): Likewise.
6570 (maybe_commonize_var): Likewise.
6571 (maybe_inject_for_scope_var): Likewise.
6572 (initialize_local_var): Likewise.
6573 (build_cleanup_on_safe_obstack): Likewise.
6574 (check_initializer): Likewise.
6575 (make_rtl_for_nonlocal_decl): Likewise.
6576 (cp_finish_decl): Use them.
6577 * typeck.c (strip_array_types): New function.
6578
6579 * cp-tree.def (LABEL_STMT): New tree node.
6580 * cp-tree.h (LABEL_STMT_LABEL): New macro.
6581 (shadow_label): Remove.
6582 (declare_local_label): New function.
6583 (finish_label_decl): Likewise.
6584 * decl.c (make_label_decl): New function, split out from
6585 lookup_label.
6586 (shadowed_labels): Remove.
6587 (binding_level): Add shadowed_labels.
6588 (clear_binding_level): Remove.
6589 (push_binding_level): Just bzero the new binding level.
6590 (pushlevel): Fix indentation.
6591 (pop_label): New function.
6592 (pop_labels): Likewise, split out from poplevel.
6593 (poplevel): Pop local labels. Use pop_labels.
6594 (maybe_push_to_top_level): Don't clear shadowed_labels.
6595 (lookup_label): Use make_label_decl.
6596 (shadow_label): Remove.
6597 (declare_local_label): New function.
6598 (define_label): Simplify.
6599 (start_function): Don't clear shadowed_labels.
6600 (cp_function): Remove shadowed_labels.
6601 (push_cp_function_context): Don't save shadowed_labels.
6602 (pop_cp_function_context): Don't restore it.
6603 * dump.c (dequeue_and_dump): Handle LABEL_STMT.
6604 * parse.y (label_decl): Use finish_label_decl.
6605 * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
6606 declarations.
6607 * semantics.c (finish_label_stmt): Add a LABEL_STMT when
6608 building_stmt_tree.
6609 (finish_label_decl): New function.
6610 (expand_stmt): Handle LABEL_STMTs and local label declarations.
6611
6612 1999-08-26 Mark Mitchell <mark@codesourcery.com>
6613
6614 * decl.c (lookup_label): Build labels on the permanent obstack
6615 when building statement trees. Don't build RTL for labels when
6616 building statement trees.
6617 * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
6618 building statement trees.
6619 (finish_label_stmt): Likewise.
6620 (expand_stmt): Adjust accordingly.
6621 * pt.c (tsubst_expr); Likewise.
6622 (do_decl_instantiation): Robustify.
6623
6624 * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
6625 * tree.c (build_cplus_new): Set it.
6626 * expr.c (cplus_expand_expr): Use it.
6627 * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
6628
6629 * decl.c (store_parm_decls): Reset immediate_size_expand.
6630 (finish_function): Likewise.
6631
6632 * tree.c (cplus_unsave_expr_now): Don't return a value.
6633
6634 * semantics.c (do_poplevel): Always initialize the return value.
6635
6636 1999-08-26 Gavin Romig-Koch <gavin@cygnus.com>
6637
6638 * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
6639 * tree.h (cplus_unsave_expr_now) : Same.
6640
6641 1999-08-25 Mark Mitchell <mark@codesourcery.com>
6642
6643 * decl.c (grokdeclarator): Amend comment.
6644 * except.c (expand_start_catch_block): Call push_template_decl for
6645 catch-block parameters.
6646 * method.c (synthesize_method): Build an empty compound statement
6647 for the body of a constructor.
6648
6649 1999-08-25 Jason Merrill <jason@yorick.cygnus.com>
6650
6651 * tree.c (cp_build_qualified_type_real): If we're asking for the
6652 same quals we already have, just return.
6653
6654 1999-08-25 Mark Mitchell <mark@codesourcery.com>
6655
6656 * cp-tree.def (SUBOBJECT): New tree node.
6657 * cp-tree.h (CLEANUP_P): New macro.
6658 (SUBOBJECT_CLEANUP): Likewise.
6659 (keep_next_level): Add parameter.
6660 (get_temp_regvar): Don't declare.
6661 (emit_base_init): Remove parameter.
6662 (expand_aggr_init): Rename to build_aggr_init.
6663 (expand_vec_init): Rename to build_vec_init.
6664 (do_pushlevel): Remove.
6665 (do_poplevel): Likewise.
6666 (finish_cleanup): New function.
6667 (finish_subobject): Likewise.
6668 (stmts_are_full_exprs_p): New variable.
6669 * decl.c (keep_next_level): Add parameter.
6670 (cp_finish_decl): Use build_aggr_init, not
6671 expand_aggr_init. Use finish_expr_stmt to expand the code.
6672 (expand_static_init): Use tree-generating, not RTL-generating,
6673 functions to handle the initialization.
6674 (start_function): Remove dead code. Always have a momentary
6675 obstack inside the function, even before hitting the first curly
6676 brace.
6677 (cplus_expand_expr_stmt): Move calls to
6678 expand_{start,end}_target_temps into semantics.c.
6679 (cp_function): Add stmts_are_full_exprs_p.
6680 (push_cp_function_context): Save it.
6681 (pop_cp_function_context): Restore it.
6682 * decl2.c (get_temp_regvar): Move to init.c.
6683 (do_static_initialization): Use build_{aggr,vec}_init.
6684 (do_static_destruction): Fix typo in comment.
6685 * dump.c (dequeue_and_dump): Handle INIT_EXPR.
6686 * except.c (expand_throw): Use create_temporary_var.
6687 * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
6688 * init.c (expand_vec_init_try_block): Remove.
6689 (expand_vec_init_catch_clause): Likewise.
6690 (get_temp_regvar): New function.
6691 (begin_init_stmts): Likewise.
6692 (finish_init_stmts): Likewise.
6693 (perform_member_init): Use build_{aggr,vec}_init. Build up tree
6694 structure here.
6695 (emit_base_init): Likewise. Remove unused parameter.
6696 (expand_virtual_init): Likewise.
6697 (expand_cleanup_for_base): Use finish_subobject.
6698 (expand_aggr_vbase_init_1): Simplify.
6699 (construct_virtual_bases): Use tree-generating functions to build
6700 up initialization.
6701 (expand_aggr_init): Likewise. Rename to build_aggr_init.
6702 (expand_default_init): Likewise.
6703 (expand_aggr_init_1): Likewise.
6704 (expand_vec_init): Rename to build_vec_init.
6705 * method.c (do_build_copy_constructor): Use tree-generating
6706 functions. Don't call clear_last_expr.
6707 (do_build_assign_ref): Likewise.
6708 (synthesize_method): Call clear_last_expr here.
6709 * parse.y (base_init): Don't call clear_last_expr here.
6710 (nodecls): Likewise.
6711 * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
6712 * semantics.c (do_pushlevel): Move to here.
6713 (do_poplevel): Likewise.
6714 (stmts_are_full_exprs_p): New variable.
6715 (finish_expr_stmt): Handle logic for temoprary cleanup here.
6716 (finish_for_stmt): Use finish_expr_stmt.
6717 (finish_cleanup): New function.
6718 (finish_function_try_block): Fix indentation.
6719 (finish_subobject): New function.
6720 (setup_vtbl_ptr): Call keep_next_level here.
6721 (finish_stmt_expr): Handle a block with no scope inside the
6722 statement-expression.
6723 (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle
6724 SUBOBJECT.
6725 * tree.c (search_tree): Handle INIT_EXPR.
6726 (mapcar): Likewise.
6727 * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
6728 * typeck2.c (store_init_value): Change expand_aggr_init to
6729 build_aggr_init in comment.
6730
6731 1999-08-25 Mark Mitchell <mark@codesourcery.com>
6732
6733 * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
6734
6735 1999-08-25 Nathan Sidwell <nathan@acm.org>
6736
6737 * decl2.c (handle_class_head): Be graceful about additional
6738 scope qualifiers. Adjust comments to reflect reality.
6739
6740 1999-08-24 Jason Merrill <jason@yorick.cygnus.com>
6741
6742 * call.c (build_conditional_expr): Fix typo.
6743 * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
6744 lvalue before trying to mess with the sides.
6745
6746 * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
6747
6748 Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu>
6749
6750 * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
6751
6752 1999-08-23 Jason Merrill <jason@yorick.cygnus.com>
6753
6754 * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
6755 Return arbitrary pointer or NULL.
6756 (check_eh_spec): Call __throw_type_match_rtti_2.
6757 * tinfo.h (*::dcast): Return int. Add valp parm.
6758 * tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers.
6759 * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
6760 (__throw_type_match_rtti): Now just a wrapper.
6761
6762 * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
6763 (init_exception_processing): Don't initialize them.
6764
6765 1999-08-23 Paul Burchard <burchard@pobox.com>
6766
6767 * decl.c (check_default_argument): Fix typo.
6768
6769 1999-08-22 Mark Mitchell <mark@codesourcery.com>
6770
6771 * cp-tree.def (STMT_EXPR): Fix typo in node name.
6772
6773 * dump.c (dump_next_stmt): New function.
6774 (dequeue_and_dump): Use it.
6775
6776 * pt.c (tsubst_copy): Make sure to initialize return value for a
6777 STMT_EXPR, even when processing_template_decl.
6778 * semantics.c (finish_stmt_expr): A statement-expression whose
6779 last statement is not an expression-statement has type `void'.
6780
6781 1999-08-20 Mark Mitchell <mark@codesourcery.com>
6782
6783 * semantics.c (finish_stmt_expr): Fix typo in comment.
6784 * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
6785 (mapcar): Likewise.
6786 * init.c (build_vec_delete_1): Make the children of a permanent
6787 BIND_EXPR permanent.
6788 * pt.c (register_specialization): Don't register a specialization
6789 more than once.
6790
6791 1999-08-18 Andrew Haley <aph@cygnus.com>
6792
6793 * method.c (process_overload_item): Call build_mangled_C9x_name ()
6794 for all integer parameter types larger than long long.
6795
6796 1999-08-19 Mark Mitchell <mark@codesourcery.com>
6797
6798 * pt.c (redeclare_class_template): Merge default template
6799 arguments in both directions.
6800
6801 * typeck.c (common_type): Undo 1999-08-18 change. Remove
6802 compiler_error message.
6803
6804 1999-08-19 Jason Merrill <jason@yorick.cygnus.com>
6805
6806 * cp-tree.h: Declare flag_use_repository.
6807 * pt.c (do_decl_instantiation): Don't complain about duplicate
6808 instantiation with -frepo.
6809 (do_type_instantiation): Likewise.
6810
6811 * pt.c (push_template_decl_real): Complain about everything
6812 that isn't a valid template.
6813
6814 * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
6815 affect inlines.
6816
6817 1999-08-19 Mark Mitchell <mark@codesourcery.com>
6818
6819 * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
6820 * decl2.c (build_expr_from_tree): Handle it.
6821 * error.c (dump_expr): Likewise.
6822 * pt.c (for_each_template_parm): Likewise.
6823 (tsubst_copy): Likewise.
6824 * tree.c (search_tree): Likewise.
6825 * semantics.c (finish_pseudo_destructor_call): Create it.
6826
6827 1999-08-18 Mark Mitchell <mark@codesourcery.com>
6828
6829 * search.c (setup_class_bindings): Robustify.
6830 * typeck.c (common_type): Use same_type_p, not pointer equality,
6831 to compare types.
6832
6833 * cp-tree.h (build_lang_field_decl): Remove.
6834 * class.c (build_vtable): Replace calls to build_lang_field_decl
6835 with build_lang_decl.
6836 (prepare_fresh_vtable): Likewise.
6837 (finish_struct_1): Likewise.
6838 (init_class_processing): Likewise.
6839 * decl.c (push_using_decl): Likewise.
6840 (init_decl_processsing): Likewise.
6841 (grokvardecl): Likewise.
6842 (build_ptrmemfunc_type): Likewise.
6843 (grokdeclarator): Likewise.
6844 (build_enumerator): Likewise.
6845 * decl2.c (grok_x_components): Likewise.
6846 (do_class_using_decl): Likewise.
6847 * except.c (call_eh_info): Likewise.
6848 * init.c (init_init_processing): Likewise.
6849 * rtti.c (expand_class_decl): Likewise.
6850 * tree.c (build_base_fields): Likewise.
6851 (build_vbase_pointer_fields): Likewise.
6852 * lex.c (build_lang_decl): Build declarations on the permanent
6853 obstack if we're building statmeent trees.
6854 (retrofit_lang_decl): Handle both the full lang_decl and also the
6855 smaller lang_decl_flags here.
6856 (build_lang_field_decl): Remove.
6857 * pt.c (push_template_decl_real): Issue errors for variable
6858 declarations that are not static members.
6859
6860 1999-08-18 Richard Henderson <rth@cygnus.com>
6861
6862 * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
6863 (mapcar): Likewise.
6864
6865 1999-08-17 Mark Mitchell <mark@codesourcery.com>
6866
6867 * cp-tree.h (back_end_hook): New variable.
6868 * decl2.c (back_end_hook): Define it.
6869 (finish_file): If it's non-NULL, call it.
6870
6871 * decl.c (add_decl_to_level): New function.
6872 (push_local_binding): Use it.
6873 (find_binding): Fix typo in comment.
6874 (pushdecl): Use add_decl_to_level. Put templates on the
6875 corresponding namespace-scope binding levels.
6876 * dump.c (dequeue_and_dump): Print the specializations of a
6877 template.
6878 * pt.c (push_template_decl_real): Don't push a template multiple
6879 times.
6880
6881 1999-08-17 Mark Mitchell <mark@codesourcery.com>
6882
6883 * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
6884 (CALL_DECLARATOR_QUALS): Likewise.
6885 (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
6886 * decl.c (grokdeclarator): Adjust to use them.
6887 * decl2.c (grokfield): Likewise.
6888 (reparse_absdcl_as_casts): Likewise.
6889 * lex.c (make_call_declarator): Likewise.
6890 (set_quals_and_spec): Likewise.
6891 * pt.c (tsubst): Likewise.
6892 * tree.c (mapcar): Remove special hack to handle third operand of
6893 a CALL_EXPR.
6894
6895 1999-08-16 Mark Mitchell <mark@codesourcery.com>
6896
6897 * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
6898 * class.c (build_vtable): Use build_lang_field_decl to build the
6899 VAR_DECLs for vtables.
6900 (prepare_fresh_vtable): Likewise.
6901 * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
6902 CAN_HAVE_FULL_LANG_DECL_P.
6903 (push_using_decl): Use build_lang_decl to build USING_DECLs.
6904 (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
6905 * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
6906 (build_lang_field_decl): Likewise.
6907 (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
6908 to copy.
6909
6910 * cp-tree.def (STMT_EXPR): New tree node.
6911 * cp-tree.h (STMT_EXPR_STMT): New macro.
6912 (store_return_init): Change prototype.
6913 (finish_named_return_value): New function.
6914 (expand_stmt): Likewise.
6915 (expand_body): Likewise.
6916 (begin_stmt_tree): Likewise.
6917 (finish_stmt_tree): Likewise.
6918 (expanding_p): New variable.
6919 (last_expr_type): Likewise.
6920 (building_stmt_tree): New macro.
6921 * decl.c (start_function): Use building_stmt_tree, not
6922 processing_template_decl, where appropriate.
6923 (store_parm_decls): Likewise.
6924 (store_return_init): Move most of the body to semantics.c.
6925 (finish_function): Use building_stmt_tree.
6926 (finish_stmt): Clear last_expr_type here.
6927 (cp_function): Add expanding_p, last_tree, last_expr_type.
6928 (push_cp_function_context): Save them.
6929 (pop_cp_function_context): Restore them.
6930 * decl2.c (setup_vtbl_ptr): Move to semantics.c.
6931 * error.c (dump_expr): Handle STMT_EXPR.
6932 * except.c (expand_start_catch_block): Use building_stmt_tree.
6933 Use add_decl_stmt.
6934 * expr.c (cplus_expand_expr): Handle STMT_EXPR.
6935 (do_case): Move add_tree call to semantics.c.
6936 * parse.y (return_init): Use finish_named_return_value.
6937 (for.init.statement): Use finish_expr_stmt.
6938 * parse.c: Regenerated.
6939 * pt.c (do_pushlevel): Move to semantics.c.
6940 (do_poplevel): Likewise.
6941 (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
6942 (tsubst_expr): Don't expand all the way to RTL here. Handle
6943 RETURN_INIT and CTOR_INITIALIZER.
6944 (instantiate_decl): Call expand_body after tsubst'ing into
6945 DECL_SAVED_TREE.
6946 * semantics.c (expand_stmts): New function.
6947 (expanding_p): New variable.
6948 (last_expr_type): Likewise.
6949 (finish_expr_stmt): Use building_stmt_tree.
6950 (begin_if_stmt): Likewise.
6951 (finish_if_stmt_cond): Likewise.
6952 (finish_then_clause): Likewise.
6953 (begin_else_clause): Likewise.
6954 (finish_else_clause): Likewise.
6955 (begin_while_stmt): Likewise.
6956 (finish_while_stmt_cond): Likewise.
6957 (finish_while_stmt): Likewise.
6958 (finish_do_body): Likewise.
6959 (finish_do_stmt): Likewise.
6960 (finish_return_stmt): Likewise.
6961 (begin_for_stmt): Likewise.
6962 (fnish_for_init_stmt): Likewise.
6963 (finish_for_cond): Likewise.
6964 (finish_for_expr): Likewise.
6965 (finish_for_stmt): Likewise.
6966 (finish_break_stmt): Likewise.
6967 (finish_continue_stmt): Likewise.
6968 (finish_switch_cond): Likewise.
6969 (finish_switch_stmt): Likewise.
6970 (finish_case_label): Call add_tree here if necessary.
6971 (finish_goto_statement): Use building_stmt_tree.
6972 (begin_try_block): Likewise.
6973 (begin_function_try_block): Likewise.
6974 (finish_try_block): Likewise.
6975 (finish_function_try_block): Likewise.
6976 (finish_handler_sequence): Likewise.
6977 (finish_function_handler_sequence): Likewise.
6978 (begin_handler): Likewise.
6979 (finish_handler_parms): Likewise.
6980 (finish_handler): Likewise.
6981 (begin_compound_stmt): Likewise.
6982 (finish_compound_stmt): Likewise.
6983 (finish_asm_stmt): Likewise.
6984 (finish_label_stmt): Likewise.
6985 (finish_named_return_value): New function.
6986 (setup_vtbl_ptr): Moved here from decl2.c.
6987 (do_pushlevel): Moved here from pt.c.
6988 (do_poplevel): Likewise.
6989 (begin_stmt_expr): Use building_stmt_tree.
6990 (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR,
6991 when building_stmt_tree.
6992 (begin_stmt_tree): New function.
6993 (finish_stmt_tree): Likewise.
6994 (expand_stmt): Likewise.
6995 (expand_body): Likewise.
6996 * tree.c (build_cplus_method_type): Make sure the argument types
6997 end up on the same obstack as the METHOD_TYPE.
6998 (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
6999 THROW_EXPR, STMT_EXPR.
7000 (mapcar): Break out common cases. Handle COMPOUND_EXPR,
7001 MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than
7002 sorry, if an unsupported node is encountered.
7003 * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
7004 (c_expand_return): Don't call add_tree here.
7005
7006 1999-08-15 Mark Mitchell <mark@codesourcery.com>
7007
7008 * pt.c (check_default_tmpl_args): Don't check in local scopes.
7009 (tsubst_decl): Make sure the declaration is on a saveable
7010 obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
7011 variable.
7012 (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
7013
7014 1999-08-14 Jason Merrill <jason@yorick.cygnus.com>
7015
7016 Speed up Koenig lookup.
7017 * decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm
7018 to return namespaces we've looked at.
7019 * decl2.c (lookup_using_namespace): Likewise.
7020 (add_function): Don't call ovl_member.
7021 (lookup_arg_dependent): Initialize k.namespaces to the list of
7022 namespaces seen in unqualified lookup.
7023 * call.c (equal_functions): Move here from tree.c.
7024 (joust): Use it to handle duplicate candidates.
7025 * tree.c (ovl_member): Use ==.
7026
7027 1999-08-13 Mark Mitchell <mark@codesourcery.com>
7028
7029 * cp-tree.def (DECL_STMT): Make it smaller.
7030 * cp-tree.h (lang_decl_flags): Move saved_tree to ...
7031 (lang_decl): ... here. Add next.
7032 (DECL_SAVED_TREE): Adjust accordingly.
7033 (DECL_IMPLICIT_TYPEDEF_P): New macro.
7034 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
7035 (DECL_STMT_DECL): Likewise.
7036 (create_implicit_typedef): New function.
7037 (maybe_push_decl): Likewise.
7038 (tsubst_default_argument): New function.
7039 (at_function_scope_p): Likewise.
7040 (add_decl_stmt): Likewise.
7041 (push_permanent_obstack): Likewise.
7042 * call.c (convert_default_arg): Use tsubst_default_argument.
7043 * class.c (add_method): Use push_permanent_obstack.
7044 (build_self_reference): Create a TEMPLATE_DECL for the
7045 self-reference, if necessary.
7046 * decl.c (pseudo_global_level_p): Only look at the current binding
7047 level.
7048 (push_binding): Use push_permanent_obstack.
7049 (create_implicit_typedef): New function.
7050 (pushtag): Use it.
7051 (duplicate_decls): Use push_permanent_obstack.
7052 (maybe_push_decl): New function.
7053 (start_decl): Use it. Remove dead code. Use add_decl_stmt.
7054 (start_decl_1): Remove dead code.
7055 (cp_finish_decl): Remove DECL_STMT handling here. Don't use
7056 pseudo_global_level_p.
7057 (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
7058 template.
7059 (grokdeclarator): Likewise, for TYPE_DECLs. Don't use
7060 pseudo_global_level_p.
7061 * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
7062 a template.
7063 (get_sentry): Use push_permanent_obstack.
7064 * dump.c (dequeue_and_dump): Enable DECL_STMT.
7065 * except.c (call_eh_info): Use push_permanent_obstack.
7066 (build_eh_type_ref): Likewise.
7067 (do_pop_exception): Likewise.
7068 (expand_eh_spec): Likewise.
7069 (alloc_eh_object): Likewise.
7070 (expand_throw): Likewise.
7071 * init.c (build_java_class_ref): Likewise.
7072 * lex.c (get_time_identifier): Likewise.
7073 (free_lang_decl_chain): Correct type.
7074 (retrofit_lang_decl): Adjust accordingly.
7075 (build_lang_field_decl): Likewise.
7076 * lex.h (free_lang_decl_chain): Likewise.
7077 * parse.y (lang_extdef): Don't use pseudo_global_level_p.
7078 * parse.c: Regenerated.
7079 * pt.c (tsubst_default_arguments): New function.
7080 (retrieve_local_specialization): Likewise.
7081 (register_local_specialization): Likewise.
7082 (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use
7083 pseudo_global_level_p to determine whether or not a template is
7084 primary.
7085 (lookup_template_class): Likewise. Use create_implicit_typedef.
7086 (instantiate_class_template): Call tsubst_default_arguments for
7087 member functions, if appropriate.
7088 (tsubst_default_argument): New function.
7089 (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs.
7090 * search.c (at_function_scope_p): New function.
7091 * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
7092 (finish_label_stmt): Likewise.
7093 (add_decl_stmt): New function.
7094 (begin_class_definition): Likewise.
7095 (finish_typeof): Likewise.
7096 * tree.c (copy_template_template_parm): Likewise.
7097 (copy_to_permanent): Likewise.
7098 (push_permanent_obstack): Define.
7099 (mark_addressable): Use it.
7100 * typeck.c (mark_addressable): Likewise.
7101
7102 1999-08-13 Gavin Romig-Koch <gavin@cygnus.com>
7103
7104 * cp-tree.h (init_cplus_unsave): New.
7105 (cplus_unsave_expr_now): New.
7106 * lex.c (init_parse): Call init_cplus_unsave.
7107 * tree.c (init_cplus_unsave): New.
7108 (cplus_unsave_expr_now): New.
7109
7110 1999-08-13 Mark Mitchell <mark@codesourcery.com>
7111
7112 * pt.c (tsubst): Back out 1999-08-06 patch. Use fold and
7113 decl_constant_value to simplify array bounds.
7114
7115 1999-08-11 Jason Merrill <jason@yorick.cygnus.com>
7116
7117 * lang-options.h: Add -fms-extensions.
7118 * cp-tree.h: Declare flag_ms_extensions.
7119 * decl2.c: Define it.
7120 * class.c (instantiate_type): Don't complain about taking the address
7121 of a bound member function if -fms-extensions.
7122 * typeck.c (build_unary_op): Likewise.
7123 * decl.c (grokdeclarator): Or about implicit int.
7124 * init.c (resolve_offset_ref): Or about implicit '&'.
7125
7126 1999-08-11 Mark Mitchell <mark@codesourcery.com>
7127
7128 * cp-tree.h (minimal_parse_mode): Remove.
7129 (finish_label_stmt): New function.
7130 * decl.c (saved_scope): Remove minimal parse mode.
7131 (maybe_push_to_top_level): Don't save it.
7132 (pop_from_top_level): Don't restore it.
7133 (define_label): Split out template-handling code to semantics.c.
7134 (start_decl): Don't use minimal_parse_mode.
7135 (cp_finish_decl): Likewise.
7136 (start_function): Don't increment it.
7137 (store_return_init): Don't use it.
7138 (finish_function): Don't decrement it.
7139 * parse.y (label_colon): Use finish_label_stmt throughout.
7140 * parse.c: Regenerated.
7141 * pt.c (minimal_parse_mode): Don't define it.
7142 (tsubst_expr): Use finish_label_stmt.
7143 * semantics.c (finish_label_stmt): New function.
7144
7145 * dump.c (queue): Be careful when computing bitmasks.
7146 (dequeue_and_dump): Describe binfos as binfos, not as
7147 vectors.
7148
7149 * parse.y (pedantic): Give it itype. Adjust usage accordingly
7150 throughout.
7151 * parse.c: Regenerated.
7152
7153 * Make-lang.in (CXX_SRCS): Remove sig.c.
7154 * Makefile.in (CXX_OBJS): Remove sig.o.
7155 (sig.o): Remove.
7156 * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
7157 (CPTI_SIGNATURE_TYPE): Likewise.
7158 (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
7159 (opaque_type_node): Likewise.
7160 (signature_type_node): Likewise.
7161 (sigtable_entry_type): Likewise.
7162 (flag_handle_signatures): Likewise.
7163 (lang_type): Remove is_signature, is_signature_pointer,
7164 is_signature_reference, has_opaque_typedecls,
7165 sigtables_has_been_generated. Adjust dummy. Remove signature,
7166 signature_pointer_to, signature_reference_to.
7167 (IS_SIGNATURE): Remove.
7168 (SET_SIGNATURE): Remove.
7169 (CLEAR_SIGNATURE): Remove.
7170 (IS_SIGNATURE_POINTER): Remove.
7171 (IS_SIGNATURE_REFERENCE): Remove.
7172 (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
7173 (SIGTABLE_HAS_BEEN_GENERATED): Remove.
7174 (CLASSTYPE_SIGNATURE): Remove.
7175 (SIGNATURE_TYPE): Remove.
7176 (SIGNATURE_METHOD_VEC): Remove.
7177 (SIGNATURE_POINTER_TO): Remove.
7178 (SIGNATURE_REFERENCE_TO): Remove.
7179 (lang_decl_flags): Remove is_default_implementation. Rename
7180 memfunc_pointer_to to saved_tree.
7181 (IS_DEFAULT_IMPLEMENTATION): Remove.
7182 (DECL_MEMFUNC_POINTER_TO): Remove.
7183 (DECL_MEMFUNC_POINTING_TO): Remove.
7184 (DECL_SAVED_TREE): Adjust definition.
7185 (tag_types): Remove signature_type_node.
7186 (SIGNATURE_FIELD_NAME): Remove.
7187 (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
7188 (SIGNATURE_OPTR_NAME): Likewise.
7189 (SIGNATURE_SPTR_NAME): Likewise.
7190 (SIGNATURE_POINTER_NAME): Likewise.
7191 (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
7192 (SIGNATURE_REFERENCE_NAME): Likewise.
7193 (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
7194 (SIGTABLE_PTR_TYPE): Likewise.
7195 (SIGTABLE_NAME_FORMAT): Likewise.
7196 (SIGTABLE_NAME_FORMAT_LONG): Likewise.
7197 (SIGTABLE_TAG_NAME): Likewise.
7198 (SIGTABLE_VB_OFF_NAME): Likewise.
7199 (SIGTABLE_VT_OFF_NAME): Likewise.
7200 (finish_base_specifiers): Change prototype.
7201 (build_signature_pointer_type): Remove.
7202 (build_signature_reference_type): Remove.
7203 (build_signature_pointer_constructor): Remove.
7204 (build_signature_method_call): Remove.
7205 (build_optr_ref): Likewise.
7206 (append_signature_fields): Likewise.
7207 (signature_error): Likewise.
7208 * call.c (build_this): Remove signature support.
7209 (build_over_call): Likewise.
7210 (build_new_method_call): Likewise.
7211 * class.c (add_implicitly_declared_members): Likewise.
7212 (finish_struct_1): Likewise.
7213 (finish_struct): Likewise.
7214 * cvt.c (cp_convert_to_pointer): Likewise.
7215 (convert_to_pointer_force): Likewise.
7216 (ocp_convert): Likewise.
7217 * decl.c (sigtable_decl_p): Remove.
7218 (init_decl_processing): Remove support for signatures.
7219 (cp_finish_decl): Likewise.
7220 (grokdeclarator): Likewise.
7221 (grokparms): Likewise.
7222 (xref_tag): Likewise.
7223 (start_function): Likewise.
7224 (start_method): Likewise.
7225 * decl2.c (finish_sigtable_vardecl): Remove.
7226 (flag_handle_signatures): Remove.
7227 (lang_f_options): Remove handle-signatures.
7228 (grokfield): Remove support for signatures.
7229 (grokbitfield): Likewise.
7230 (finish_file): Likewise.
7231 (reparse_absdcl_as_casts): Likewise.
7232 * error.c (dump_type_real): Likewise.
7233 (dump_function_decl): Likewise.
7234 * friend.c (make_friend_class): Likewise.
7235 * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
7236 * hash.h: Regenerated.
7237 * init.c (build_new_1): Remove support for signatures.
7238 * lang-options.h: Remove -fhandle-signatures,
7239 -fno-handle-signatures.
7240 * lex.c (init_parse): Remove support for signatures.
7241 (yyprint): Likewise.
7242 * lex.h (rid): Remove RID_SIGNATURE.
7243 * method.c (build_decl_overload_real): Remove support for
7244 signatures.
7245 (hack_identifier): Likewise.
7246 * parse.y (base_class): Likewise.
7247 (base_class.1): Likewise.
7248 (access_specifier): Likewise.
7249 * search.c (lookup_member): Likewise.
7250 * semantics.c (finish_qualified_object_call_expr): Likewise.
7251 (finish_template_type_parm): Likewise.
7252 (begin_class_definition): Likewise.
7253 (finish_base_specifier): Likewise.
7254 * sig.c: Remove.
7255 * tree.c (build_cplus_method_type): Remove support for signatures.
7256 * typeck.c (require_complete_type): Likewise.
7257 (c_sizeof): Likewise.
7258 (c_alignof): Likewise.
7259 (build_object_ref): Likewise.
7260 (build_component_ref): Likewise.
7261 (build_indirect_ref): Likewise.
7262 (build_c_cast): Likewise.
7263 (build_modify_expr): Likewise.
7264 (convert_for_initialization): Likewise.
7265 * typeck2.c (signature_error): Remove.
7266 (store_init_value): Remove support for signatures.
7267 (digest_init): Likewise.
7268 (build_x_arrow): Likewise.
7269 (build_functional_cast): Likewise.
7270 * xref.c (GNU_xref_decl): Likewise.
7271
7272 1999-08-10 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
7273
7274 * lex.c (do_identifier): Remove unnecessary lookup of class field.
7275
7276 1999-08-09 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
7277
7278 * decl2.c (set_decl_namespace): Do not complain about non-matching
7279 decls if processing a template.
7280
7281 1999-08-09 Mark Mitchell <mark@codesourcery.com>
7282
7283 * decl.c (build_ptrmemfunc_type): Handle qualified
7284 pointer-to-member types here.
7285 * tree.c (cp_build_qualified_type_real): Simplify handling here.
7286
7287 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7288
7289 * lex.c (lang_identify): Likewise.
7290
7291 1999-08-09 Bernd Schmidt <bernds@cygnus.co.uk>
7292
7293 * Makefile.in: Update dependencies.
7294 * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
7295 NULL_RTX.
7296 * decl.c: Include "function.h"
7297 (cleanup_label, return_label): Delete declarations.
7298 (store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX.
7299 (finish_function): Rename last_parm_insn variable to
7300 fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX.
7301 * decl2.c: Include "function.h".
7302 (rtl_expr_chain): Delete declaration.
7303 * method.c: Include "function.h"
7304 * tree.c (build_vbase_pointer_fields): Don't initialize
7305 DECL_SAVED_INSNS with NULL_RTX.
7306 * typeck.c: Include "function.h"
7307
7308 1999-08-09 Jason Merrill <jason@yorick.cygnus.com>
7309
7310 * semantics.c (begin_function_try_block, finish_function_try_block,
7311 finish_function_handler_sequence): New fns.
7312 * parse.y (function_try_block): Use them.
7313 * pt.c (instantiate_decl): Likewise.
7314
7315 * cp-tree.h: Declare in_function_try_handler.
7316 * decl.c: Define it.
7317 (start_function): Clear it.
7318 (struct cp_function, push_cp_function_context): Save it.
7319 (pop_cp_function_context): Restore it.
7320 * parse.y (function_try_block): Set and clear it.
7321 * except.c (expand_end_catch_block): Rethrow if we reach the end
7322 of a function-try-block handler in a ctor or dtor.
7323 * typeck.c (c_expand_return): Complain about returning from a
7324 function-try-block handler of a ctor.
7325
7326 * parse.y (function_try_block): Call end_protect_partials
7327 before expand_start_all_catch.
7328
7329 1999-08-08 Jason Merrill <jason@yorick.cygnus.com>
7330
7331 * decl.c (struct binding_level): Add eh_region field.
7332 (push_binding_level): Set it.
7333 (define_label): Complain about jumping into an EH block.
7334
7335 * ptree.c (print_lang_type): Print the real type of a PMF.
7336 Print what exceptions a fn type throws.
7337
7338 1999-08-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7339
7340 * class.c (count_fields, add_fields_to_vec): Add static prototype.
7341
7342 * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
7343 get_id_2, composite_pointer_type, dump_node_to_file): Constify a
7344 char*.
7345
7346 * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
7347 Constify a char*.
7348
7349 * decl2.c (finish_static_data_member_decl, grokfield): Constify a
7350 char*.
7351
7352 * dump.c (queue_and_dump_index, dump_int, dump_string,
7353 dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
7354 a char*.
7355 (dump_stmt): Add static prototype.
7356
7357 * errfn.c (cp_thing): Constify a char*.
7358
7359 * error.c (dump_unary_op, dump_binary_op, aggr_variety,
7360 dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
7361 dump_expr): Constify a char*.
7362
7363 * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
7364 read_line_number): Add static prototype.
7365 (opname_tab, assignop_tab, operator_name_string): Constify a char*.
7366 (real_yylex): Move label `letter' into the scope where it is used.
7367
7368 * method.c (build_mangled_template_parm_index, build_overload_int,
7369 build_decl_overload_real, get_id_2): Constify a char*.
7370
7371 * search.c (check_final_overrider): Make static.
7372
7373 * typeck.c (composite_pointer_type): Constify a char*.
7374
7375 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
7376
7377 * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
7378 we're looking at a class.
7379
7380 * decl.c (lookup_name_real): Set the complain flag if we're
7381 looking for a namespace member.
7382
7383 * lex.c (real_yylex): We can have a number with no digits.
7384
7385 * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
7386
7387 * search.c (binfo_from_vbase): New fn.
7388 * cp-tree.h: Declare it.
7389 * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
7390 from pointer to member of virtual base.
7391 * typeck.c (get_delta_difference): Likewise.
7392
7393 1999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br>
7394
7395 * pt.c (tsubst): Use build_index_type to build in-template array
7396 index type. Fixes g++.oliva/dwarf1.C.
7397 * decl.c (grokdeclarator): Likewise, just for consistency, as it
7398 doesn't seem to trigger the bug without it.
7399
7400 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
7401
7402 * typeck2.c (add_exception_specifier): Use complete_type.
7403
7404 1999-08-06 Mark Mitchell <mark@codesourcery.com>
7405
7406 * error.c (dump_expr): Handle EXACT_DIV_EXPR.
7407 (dump_binary_op): Bulletproof.
7408 * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
7409 * tree.c (search_tree): Don't enumerate all the nodes of classes
7410 `1', `2', and `<'; handle them generically. Don't be sorry about
7411 "unrecognized tree codes"; just abort.
7412 (no_linkage_check): Don't do linkage checks for templates.
7413
7414 * tree.c (cp_build_qualified_type_real): Handle
7415 pointer-to-member-function types correctly.
7416
7417 1999-08-05 Jason Merrill <jason@yorick.cygnus.com>
7418
7419 * decl.c (pushdecl): Only give an error for shadowing a parm
7420 from *this* function.
7421
7422 Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com)
7423
7424 * typeck2.c: Update URLs and mail addresses.
7425
7426 1999-08-04 Nathan Sidwell <nathan@acm.org>
7427
7428 * cp-tree.h (empty_except_spec): New global var.
7429 (compexcepttypes): Remove prototype.
7430 (comp_except_specs): Prototype new global function.
7431 (add_exception_specifier): Prototype new global function.
7432 * decl.c (empty_except_spec): Define new global var.
7433 (duplicate_decls): Use comp_except_specs, reword error message.
7434 (init_decl_processing): Initialize empty_except_spec.
7435 Adjust build_exception_variant calls.
7436 * parse.y (exception_specification_opt): Use empty_except_spec.
7437 (ansi_raise_identifier): Call check_for_new_type.
7438 (ansi_raise_identifiers): Use add_exception_specifier.
7439 * pt.c (tsubst): Use add_exception_specifier to build exception
7440 specifier.
7441 * search.c (check_final_overrider): New static function, broken
7442 out of get_matching_virtual. Check throw specifiers, reword
7443 diagnostics.
7444 (get_matching_virtual): Use check_final_overrider.
7445 * tree.c (build_exception_variant): Use comp_except_specs.
7446 * typeck.c (compexcepttypes): Remove.
7447 (comp_except_types): New static function, helper for
7448 comp_except_specs. Compare two types as exception specifiers.
7449 (comp_except_specs): New global function, compare two exception
7450 specifiers.
7451 (comptypes): Adjust for comp_except_specs.
7452 * typeck2.c (add_exception_specifier): New global function.
7453
7454 * class.c (check_for_override): Reword error message.
7455
7456 1999-08-03 Nathan Sidwell <nathan@acm.org>
7457
7458 * call.c (convert_arg_to_ellipsis): Use pod_type_p.
7459 * cp-tree.h (struct lang_type): Added non_pod_class flag.
7460 (CLASSTYPE_NON_POD_P): New macro to access it.
7461 * class.c (finish_struct_1): Determine non-PODness.
7462 Check for arrays of pointers (-Weffc++).
7463 Remove array inspection duplicated code.
7464 * tree.c (pod_type_p): Detect non-pod non-aggregate types.
7465 Use CLASSTYPE_NON_POD_P.
7466
7467 1999-08-03 Nathan Sidwell <nathan@acm.org>
7468
7469 * class.c (duplicate_tag_error): Preserve template information.
7470
7471 1999-08-03 Nathan Sidwell <nathan@acm.org>
7472
7473 * decl.c (start_enum): Show location of previous definition.
7474 * parse.y (enumlist_opt): New reduction.
7475 (structsp): Simplify enum rules to use enumlist_opt.
7476
7477 1999-08-03 Jason Merrill <jason@yorick.cygnus.com>
7478
7479 * lex.c (yyprint): Handle PFUNCNAME.
7480
7481 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
7482 build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
7483
7484 1999-08-03 Mumit Khan <khan@xraylith.wisc.edu>
7485
7486 * decl.c (start_decl): Set attributes before duplicate_decls call.
7487
7488 1999-08-02 Mark Mitchell <mark@codesourcery.com>
7489
7490 * Make-lang.in (CXX_SRCS): Add dump.c.
7491 * Makefile.in (CXX_OBJS): Add dump.o.
7492 (dump.o): New target.
7493 * cp-tree.h (DECL_CONV_FN_P): Document.
7494 (DECL_OVERLOADED_OPERATOR_P): New function.
7495 (TYPE_PTRMEM_CLASS_TYPE): New macro.
7496 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
7497 (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
7498 (ASM_VOLATILE_P): New macro.
7499 (STMT_LINENO): Likewise.
7500 (cp_namespace_decls): New function.
7501 (dump_node_to_file): New function.
7502 * decl.c (cp_namespace_decls): New function.
7503 (walk_namespaces_r): Use it.
7504 (wrapup_globals_for_namespace): Likewise.
7505 * decl2.c (flag_dump_translation_unit): New variable.
7506 (lang_decode_option): Handle -fdump-translation-unit.
7507 (finish_file): If flag_dump_translation_unit is set, dump the
7508 translation unit.
7509 * dump.c: New file.
7510 * lang-options.h: Add -fdump-translation-unit.
7511 * pt.c (tsubst_template_parms): Robustify.
7512 (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
7513 (tsubst_expr): Use STMT_LINENO.
7514 * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check
7515 for invalid cv-qualifiers even while building templates.
7516
7517 1999-08-02 Richard Henderson <rth@cygnus.com>
7518
7519 * call.c: Include defaults.h instead of expr.h.
7520 * decl.c: Likewise.
7521 * pt.c: Likewise.
7522 * typeck.c: Include defaults.h.
7523
7524 1999-08-02 Mark Mitchell <mark@codesourcery.com>
7525
7526 * lex.c (errorcount, sorrycount): Don't declare.
7527 * repo.c (errorcount, sorrycount): Likewise.
7528 * typeck2.c (errorcount, sorrycount): Likewise.
7529
7530 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
7531
7532 * call.c (convert_default_arg, build_over_call): Change all uses of
7533 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
7534 Ensure expr.h is included.
7535 * decl.c (grokparams): Ditto.
7536 * pt.c (tsubst_decl): Ditto.
7537 * typeck.c (convert_arguments): Ditto.
7538
7539 1999-08-02 Jason Merrill <jason@yorick.cygnus.com>
7540
7541 * class.c (mark_overriders): Fix order of args to overrides.
7542 (warn_hidden): Likewise. Fix for having virtual and non-virtual
7543 functions with the same name.
7544
7545 1999-08-02 Richard Henderson <rth@cygnus.com>
7546
7547 * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
7548
7549 1999-08-01 Mark Mitchell <mark@codesourcery.com>
7550
7551 * call.c (build_conditional_expr): Fix typo in comment.
7552
7553 1999-08-01 Bernd Schmidt <bernds@cygnus.co.uk>
7554
7555 * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
7556 case_stack; use in_control_zone_p.
7557 * typeck.c (c_expand_return): Likewise.
7558
7559 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
7560
7561 * except.c (catch_clauses): Delete declaration.
7562
7563 1999-07-30 Mark Mitchell <mark@codesourcery.com>
7564
7565 * call.c (build_conditional_expr): Call convert_from_reference to
7566 avoid reference/non-reference type confusion. Fix typo.
7567
7568 1999-07-30 Richard Henderson <rth@cygnus.com>
7569
7570 * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
7571 * cp-tree.h (initializer_constant_valid_p): Remove.
7572
7573 1999-07-28 Mark Mitchell <mark@codesourcery.com>
7574
7575 * call.c (conditional_conversion): Don't build BASE_CONVs for
7576 conversions between things that have the same type.
7577 (build_conditional_expr): Tweak.
7578 (convert_like): Some BASE_CONVs really do require the generation
7579 of code.
7580
7581 * init.c (perform_member_init): Don't go through build_modify_expr
7582 for simple initializations.
7583
7584 1999-07-27 Jason Merrill <jason@yorick.cygnus.com>
7585
7586 * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
7587 * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
7588 virtual functions and MI. Simplify.
7589
7590 * method.c: Remove prototype for largest_union_member.
7591 * pt.c (determine_specialization): Fix uninitialized warning.
7592 * lex.c (real_yylex): Likewise.
7593
7594 1999-07-27 Mark Mitchell <mark@codesourcery.com>
7595
7596 * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
7597 here too.
7598
7599 * cp-tree.h (BINFO_VIRTUALS): Document new format.
7600 * class.c (modify_one_vtable): Change prototype accordingly.
7601 (modify_all_vtables): Likewise.
7602 (modify_all_direct_vtables): Likewise.
7603 (modify_all_indirect_vtables): Likewise.
7604 (build_vtable_entry_for_fn): New function.
7605 (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
7606 (modify_vtable_entry): Likewise.
7607 (add_virtual_function): Likewise.
7608 (build_vtbl_initializer): New function.
7609 (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
7610 (fixup_vtable_deltas1): Likewise.
7611 (fixup_vtable_deltas): Likewise.
7612 (override_one_vtable): Likewise.
7613 (finish_struct_1): Likewise.
7614
7615 * error.c (dump_expr): Likewise.
7616 * search.c (get_abstract_virtuals_1): Likewise.
7617 (get_abstract_virtuals): Likewise.
7618 (expand_upcast_fixups): Likewise.
7619 * tree.c (debug_binfo): Likewise.
7620 * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
7621 __pure_virtual here.
7622
7623 1999-07-26 Mark Mitchell <mark@codesourcery.com>
7624
7625 * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
7626 as per 1999-07-26 change.
7627
7628 * typeck.c (c_sizeof): Don't allow non-static data members.
7629 (expr_sizeof): Likewise.
7630
7631 1999-07-26 Jason Merrill <jason@yorick.cygnus.com>
7632
7633 * input.c (feed_input): Only touch lineno and input_filename
7634 if !USE_CPPLIB. Save the old values before setting the new ones.
7635
7636 * input.c (feed_input): Add file, line parms.
7637 * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
7638 (real_yylex): Check linemode before input_redirected().
7639
7640 * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
7641 from op new to warning.
7642
7643 1999-07-26 Mark Mitchell <mark@codesourcery.com>
7644
7645 * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
7646 * call.c: All uses changed.
7647 * typeck.c: Likewise.
7648
7649 1999-07-26 Nathan Sidwell <nathan@acm.org>
7650
7651 * exception.cc (__cplus_type_matcher): Match __eh_matcher
7652 prototype.
7653
7654 1999-07-26 Mark Mitchell <mark@codesourcery.com>
7655
7656 * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
7657 (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
7658 (strip_top_quals): Declare.
7659 (ncp_convert): Likewise.
7660 (type_after_usual_arithmetic_converions): Likewise.
7661 (composite_pointer_type): Likewise.
7662 * call.c (strip_top_quals): Don't make it static.
7663 (promoted_arithmetic_type_p): New function.
7664 (conditional_conversion): Likewise.
7665 (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
7666 (standard_conversion): Use same_type_p. Don't build BASE_CONVs
7667 for converting a type to itself.
7668 (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
7669 (implicit_conversion): Make sure the from and to types are
7670 complete.
7671 (add_builtin_candidate): Correct handling of ?: operator.
7672 (add_builtin_candidates): Improve documentation.
7673 (build_conditional_expr): New function.
7674 (can_convert): Implement in terms of can_convert_arg.
7675 (ncp_convert): New function.
7676 * typeck.c (type_after_usual_arithmetic_conversions): New
7677 function, split out from common_type.
7678 (composite_pointer_type): New function, split out from
7679 build_conditional_expr.
7680 (common_type): Use type_after_usual_arithmetic_conversions.
7681 Remove redundant attribute merging.
7682 (comptypes): Tidy. Handle COMPLEX_TYPE.
7683 (build_binary_op_nodefault): Use null_ptr_cst_p.
7684 (build_conditional_expr): Remove.
7685 (convert_for_assignment): Use new conversion functions.
7686
7687 * cp-tree.h (abstract_virtuals_error): Change declaration.
7688 * typeck2.c (abstract_virtuals_error): Check to see if an error
7689 ocurred, and return a boolean value accordingly.
7690 (build_functional_cast): Adjust accordingly.
7691 * class.c (finish_struct_1): Likewise.
7692 * cvt.c (ocp_convert): Likewise.
7693 * decl.c (cp_finish_decl): Likewise.
7694 (grokparams): Likewise.
7695 (grok_op_properties): Likewise.
7696 (start_function): Likewise.
7697 * init.c (build_new_1): Likewise.
7698
7699 * pt.c (unify): Don't get confused by pointers-to-member functions.
7700
7701 * search.c (build_cplus_new): Robustify.
7702
7703 1999-07-24 Richard Henderson <rth@cygnus.com>
7704
7705 * gxx.gperf (__builtin_va_arg): New.
7706 * parse.y (VA_ARG): New token.
7707 (unary_expr): Recognize it.
7708
7709 Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com)
7710
7711 * g++FAQ.texi: Deleted per Joe Buck's request.
7712 * Makefile.in: Corresponding changes.
7713
7714 1999-07-23 Jason Merrill <jason@yorick.cygnus.com>
7715
7716 * lex.c: Sync with C frontend.
7717 (whitespace_cr): New fn.
7718 (skip_white_space): Use it.
7719 (init_parse): Reorder.
7720 (yyprint): Support CONSTANT.
7721 (pragma_getc, pragma_ungetc): Bring back.
7722 (read_line_number): Change in_system_header directly.
7723 (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
7724 (parse_float): Update to C version.
7725 (yylex): Handle '$' under the letter case.
7726 Remove looking_for_typename handling.
7727 Support hex floating point constants.
7728 Follow C's lead for choosing type of integer constants.
7729 Rearrange stuff to match C frontend.
7730 (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
7731 * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
7732
7733 1999-07-23 Mark Mitchell <mark@codesourcery.com>
7734
7735 * call.c (reference_binding): Tweak.
7736 (mayble_handle_implicit_object): Use direct_reference_binding to
7737 create the right implicit conversion sequence.
7738
7739 1999-07-22 Mark Mitchell <mark@codesourcery.com>
7740
7741 * pt.c (convert_nontype_argument): Don't call decl_constant_value
7742 if we're converting to a reference type.
7743
7744 * call.c (NEED_TEMPORARY_P): New macro.
7745 (standard_conversion): Set it, for derived-to-base conversions.
7746 (reference_related_p): New function.
7747 (reference_compatible_p): Likewise.
7748 (convert_class_to_reference): Likewise.
7749 (direct_reference_binding): Likewise.
7750 (reference_binding): Rework for standards-compliance.
7751 (convert_like): Adjust accordingly.
7752 (maybe_handle_ref_bind): Simplify; the right conversion sequences
7753 are now built up in reference_binding.
7754 (initialize_reference): New function.
7755 * cp-tree.h (ICS_USER_FLAG): Document.
7756 (ICS_THIS_FLAG): Likewise.
7757 (ICS_BAD_FLAG): Likewise.
7758 (NEED_TEMPORARY_P): Likewise.
7759 (cp_lvalue_kind): New type.
7760 (real_lvalue_p): Return it.
7761 * error.c (dump_expr): Provide more accurate representation for
7762 AGGR_INIT_EXPRs.
7763 * init.c (expand_default_init): Do not try to perform implicit
7764 conversions for a brace-enclosed initializer.
7765 * search.c (lookup_conversions): Document.
7766 * tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate
7767 appropriately.
7768 (real_lvalue_p): Adjust accordingly.
7769 (lvalue_p): Likewise.
7770 (build_cplus_new): Don't allow the creation of an abstract class.
7771 * typeck.c (convert_for_initialization): Use initialize_reference.
7772
7773 1999-07-21 Gavin Romig-Koch <gavin@cygnus.com>
7774
7775 * lex.c (real_yylex) : Correct the test for overflow when lexing
7776 integer literals.
7777
7778 1999-07-20 Jason Merrill <jason@yorick.cygnus.com>
7779
7780 * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
7781 not DECL_BUILT_IN, to determine if a function is internally declared.
7782 (duplicate_decls): Likewise. Improve handling of builtins.
7783 (push_overloaded_decl): Remove special handling of builtins.
7784
7785 * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
7786
7787 * decl.c (grokdeclarator): Pull out decl_constant_value in
7788 templates, too.
7789
7790 * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
7791 * cp-tree.h, pt.c, semantics.c: Adjust.
7792 * method.c (largest_union_member): Remove.
7793
7794 * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
7795
7796 * lex.c (token_getch, token_put_back): New fns.
7797 (real_yylex): Use them.
7798
7799 * lex.c (lang_init): Generalize.
7800 (lang_init_options): Tell cpplib this is C++.
7801 (nextchar): Remove. Replace uses with put_back.
7802 (skip_white_space): Handle linemode here. Optimize for cpplib.
7803 (extend_token_buffer_to): New fn.
7804 (extend_token_buffer): Use it.
7805 (read_line_number, check_newline): Just deal with tokens.
7806 (real_yylex): More cpplib optimizations. Simplify. Don't produce
7807 EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
7808 * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
7809 * parse.y (PAREN_STAR_PAREN): Remove.
7810 * input.c: Don't use the putback machinery with cpplib.
7811 (sub_getch): Fold back into getch.
7812 (getch): Don't handle linemode here.
7813 (feed_input): Unget any text in the token buffer.
7814
7815 * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
7816 nextyychar, nextyylval): Remove.
7817
7818 1999-07-20 Michael Tiemann <tiemann@holodeck.cygnus.com>
7819 Jason Merrill <jason@yorick.cygnus.com>
7820
7821 * lex.c (indent_level): New variable.
7822 (init_parse): Set cpp_token to CPP_DIRECTIVE.
7823 (consume_string): Make this smart about USE_CPPLIB.
7824 (yyungetc): Use put_back function.
7825 (pragma_getc, pragma_ungetc): Functions deleted.
7826 (check_newline): Rewrite to be intelligent about USE_CPPLIB.
7827 Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
7828 pragma_ungetc.
7829 (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
7830 Also, clean up cases where we redundantly set token_buffer[0].
7831 (read_line_number): New fn.
7832 * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
7833 (end_input): Call cpp_pop_buffer if USE_CPPLIB.
7834 (sub_getch): Conditionalize out code that's not appropriate if
7835 USE_CPPLIB.
7836 (put_back): Rewrite in case USE_CPPLIB is defined.
7837 (input_redirected): Ditto.
7838
7839 Tue Jul 20 11:24:19 1999 Bernd Schmidt <bernds@cygnus.co.uk>
7840
7841 * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
7842 c_global_trees and accessor macros defined in c-common.h.
7843 (cp_tree_index): New enumeration.
7844 (cp_global_trees): Declare new array. Add accessor macros for it, and
7845 delete declarations of tree nodes replaced by it.
7846 (builtin_function): Delete macro, add declaration for new function.
7847 Include c-common.h.
7848 * decl.c: Delete definitions for tree nodes that were replaced by
7849 cp_global_trees and c_global_trees.
7850 (init_decl_processing): Call c_common_nodes_and_builtins; delete code
7851 to generate the common builtins here.
7852 (builtin_function): New function.
7853 * decl2.c (abort_fndecl): Delete declaration.
7854 * except.c (expand_builtin_return_address): Delete declaration.
7855 (builtin_return_address_fndecl): Delete variable.
7856 (const_ptr_type_node): Delete declaration.
7857 * lex.c (cons_up_default_function): Delete declaration of
7858 void_list_node.
7859 * parse.y (void_list_node): Delete declaration.
7860 * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
7861 Delete variables.
7862 (const_string_type_node): Delete declaration.
7863 * search.c (abort_fndecl): Delete declaration.
7864 * Makefile.in: Update dependencies.
7865
7866 1999-07-19 Mark Mitchell <mark@codesourcery.com>
7867
7868 * pt.c (check_default_tmpl_args): Move test for missing default
7869 arguments here, from ...
7870 (end_template_parm_list): Here.
7871
7872 1999-07-18 Mark Mitchell <mark@codesourcery.com>
7873
7874 * decl.c (lookup_nested_type): Remove.
7875 (pushtag): Don't call it.
7876
7877 Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com)
7878
7879 * Makefile.in (INTERFACE): Bump to 2.
7880
7881 1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
7882
7883 * typeck2.c (my_friendly_abort): Updated URL with bug reporting
7884 instructions to gcc.gnu.org. Removed e-mail address.
7885
7886 1999-07-17 Mark Mitchell <mark@codesourcery.com>
7887
7888 * pt.c (determine_specialization): Tighten error-checking.
7889 (end_template_parm_list): Likewise.
7890
7891 1999-07-14 Mark Mitchell <mark@codesourcery.com>
7892
7893 * pt.c (check_default_tmpl_args): Handle friends defined in the
7894 class just like member functions defined in the class.
7895
7896 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
7897 Jason Merrill <jason@yorick.cygnus.com>
7898
7899 * cp-tree.h (struct lang_decl): Added field for storing sorted
7900 FIELD_DECLs (used in TYPE_DECLs).
7901 (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
7902 (DECL_SORTED_FIELDS): New macro.
7903 * class.c (method_name_cmp): New function.
7904 (finish_struct_methods): Modified to support sorting and searching
7905 methods.
7906 (finish_struct_anon): Changed code in inner loop to use ELT rather
7907 than UELT (which required an extra indirection for every reference).
7908 (field_decl_cmp): New function to support sorting FIELD_DECLs.
7909 (finish_struct_1): Sort fields.
7910 * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
7911 (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
7912 Also, switch to using array indexing rather than a changing pointer.
7913 * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
7914 DECL_SORTED_FIELDS.
7915
7916 1999-07-09 Jason Merrill <jason@yorick.cygnus.com>
7917
7918 * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
7919 casts in system headers or extern "C" blocks.
7920
7921 * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
7922 errors to pedwarn.
7923
7924 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
7925
7926 * decl2.c (write_virtuals): Deleted declaration.
7927 * cp-tree.h (write_virtuals): Deleted extern declaration.
7928 * class.c (finish_struct_1): Removed #if 0'd code that mentions
7929 write_virtuals.
7930 * semantics.c (begin_class_definition): Rewrite code to not depend
7931 on write_virtuals.
7932
7933 * lex.c (cp_pragma_interface): New function.
7934 (cp_pragma_implementation): Likewise.
7935 (handle_cp_pragma): Call them.
7936
7937 * typeck.c (comptypes): Simplify C code in look_hard.
7938
7939 * xref.c (PALLOC): Use xcalloc, not calloc.
7940 (SALLOC): Use xmalloc, not malloc.
7941
7942 * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
7943
7944 * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
7945 is NO_DEBUG.
7946
7947 * decl.c (duplicate_decls): If a redeclaration doesn't match the
7948 initial declaration, then don't save the inline info and by all
7949 means don't mark the function as a builtin function.
7950
7951 * decl.c (lookup_name_real): Set NONCLASS to 1 if
7952 CURRENT_CLASS_TYPE is 0.
7953
7954 * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
7955 NULL_TREE.
7956
7957 * ptree.c (print_lang_type): Added vtable-needs-writing.
7958
7959 Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
7960
7961 * decl2.c (mark_vtable_entries): Fix check for rtti offset.
7962
7963 1999-07-06 Gavin Romig-Koch <gavin@cygnus.com>
7964
7965 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
7966 Merged into c-common.
7967
7968 1999-07-05 Dave Brolley <brolley@cygnus.com>
7969
7970 * lex.c (errorcount): Declare it.
7971 (finish_parse): Update errorcount for when using CPPLIB.
7972
7973 1999-07-05 Mark Mitchell <mark@codesourcery.com>
7974
7975 * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
7976 parameters.
7977 (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
7978 * decl.c (push_class_binding): Use it.
7979 (lookup_name_real): Likewise.
7980
7981 1999-07-02 Gavin Romig-Koch <gavin@cygnus.com>
7982
7983 * cp-tree.h (widest_integer_literal_type_node,
7984 widest_unsigned_literal_type) : New.
7985 * decl.c (widest_integer_literal_type_node,
7986 widest_unsigned_literal_type) : New.
7987 (init_decl_processing): Handle/use the two new types.
7988 * lex.c (real_yylex): Same.
7989 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
7990 Same.
7991
7992 1999-07-01 Mark Mitchell <mark@codesourcery.com>
7993
7994 * decl.c (grokdeclarator): Don't give names "for linkage purposes"
7995 to anonymous cv-qualified types.
7996
7997 1999-07-01 Gavin Romig-Koch <gavin@cygnus.com>
7998
7999 * lex.c (real_yylex) : Change integer literal overflow handling to
8000 be like c-lex.c.
8001
8002 * lex.c (real_yylex): Improve 'integer constant out of range' messages.
8003
8004 1999-06-28 Richard Henderson <rth@cygnus.com>
8005
8006 * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
8007
8008 1999-06-28 Jason Merrill <jason@yorick.cygnus.com>
8009
8010 * error.c (dump_type_real): Handle TREE_LIST again.
8011
8012 * typeck.c (comp_target_parms): Don't complain about
8013 converting from () to (...) if !flag_strict_prototype.
8014
8015 * decl.c (grokdeclarator): Update the names of all variants when
8016 de-anonymizing.
8017
8018 1999-06-21 Mark Mitchell <mark@codesourcery.com>
8019
8020 * init.c (expand_aggr_vbase_init): Rename to
8021 construct_virtual_bases. Conditionalize construction here,
8022 rather than ...
8023 (emit_base_init): Here.
8024
8025 1999-06-19 Mark Mitchell <mark@codesourcery.com>
8026
8027 * semantics.c (finish_asm_stmt): Apply decay conversions to
8028 input operands.
8029
8030 * decl.c (expand_static_init): When building an anonymous function
8031 for use with atexit, compute its body before and after entering
8032 the function.
8033
8034 * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
8035 EXIT_EXPR.
8036
8037 1999-06-18 Mark Mitchell <mark@codesourcery.com>
8038
8039 * init.c (expand_aggr_vbase_init): Add flag parameter.
8040 (build_partial_cleanup_for): Remove, inlining into ..
8041 (expand_cleanup_for_base): ... here. Take flag parameter.
8042 (emit_base_init): Pass the in_chrg parameter to
8043 emit_aggr_vbase_init.
8044 (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
8045
8046 1999-06-16 Mark Mitchell <mark@codesourcery.com>
8047
8048 * decl2.c (import_export_decl): Use same_type_p, rather than
8049 relying on pointer-equality for types.
8050
8051 * method.c (do_build_copy_constructor): Simplify.
8052
8053 * call.c (build_method_call): Remove bogus code for two-argument
8054 delete.
8055 * init.c (build_new_1): Expand on comment, and remove dead code.
8056
8057 * init.c (expand_cleanup_for_base): New function, split out
8058 from ...
8059 (emit_base_init): Here.
8060 (expand_aggr_vbase_init): Use it.
8061
8062 1999-06-15 Mark Mitchell <mark@codesourcery.com>
8063
8064 * cp-tree.h (class_cache_firstobj): Declare.
8065 (maybe_push_cache_obstack): Rename to push_cache_obstack.
8066 * class.c (permanent_obstack): Remove declaration.
8067 (class_cache_firstobj): Make it global.
8068 (add_method): Don't use permanent_obstack directly.
8069 (pushclass): Only free the class_cache_obstack if we know how far
8070 back to free it.
8071 (maybe_push_cache_obstack): Rename to push_cache_obstack.
8072 * decl.c: Remove dead comment.
8073 (saved_scope): Add class_cache_firstobj.
8074 (push_to_top_level): Save it.
8075 (pop_from_top_level): Restore it.
8076 (push_class_level_binding): Use push_cache_obstack, not
8077 maybe_push_cache_obstack.
8078 * search.c (push_class_decls): Likewise.
8079
8080 1999-06-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
8081
8082 * pt.c (tsubst_friend_function): Push into namespace of friend
8083 function before pushdecl'ing it.
8084
8085 1999-06-14 Nathan Sidwell <nathan@acm.org>
8086
8087 * call.c (build_new_op): Remove REF_BIND from all operands.
8088
8089 1999-06-13 Alexandre Oliva <oliva@dcc.unicamp.br>
8090
8091 * init.c (build_new_1): Look up operator delete even if there was
8092 no explicit new placement.
8093
8094 1999-06-08 Nathan Sidwell <nathan@acm.org>
8095
8096 * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
8097 of ...
8098 (build_throw): ... here. Call it.
8099 (process_start_catch_block): Call it.
8100
8101 1999-06-07 Mark Mitchell <mark@codesourcery.com>
8102
8103 * search.c (convert_pointer_to_single_level): Reimplement without
8104 using get_binfo.
8105
8106 1999-06-06 Mark Mitchell <mark@codesourcery.com>
8107
8108 * method.c (is_back_referenceable_type): Back-reference bools when
8109 not squangling.
8110
8111 1999-06-07 Dave Brolley <brolley@cygnus.com>
8112
8113 * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
8114 * input.c (putback_buffer): New structure type.
8115 (putback): Replaces putback_char member.
8116 (putback): Replaces putback_char static variable.
8117 (feed_input): Use putback.
8118 (end_input): Use putback.
8119 (sub_getch): Use putback.
8120 (put_back): Use putback.
8121
8122 1999-06-05 Mark Mitchell <mark@codesourcery.com>
8123
8124 * decl.c (grokdeclarator): Fix typo in last change.
8125
8126 1999-06-04 Jason Merrill <jason@yorick.cygnus.com>
8127
8128 * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
8129 (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
8130
8131 1999-06-04 Nathan Sidwell <nathan@acm.org>
8132
8133 * except.c (build_throw): Check throw expression validity.
8134
8135 1999-06-03 Mark Mitchell <mark@codesourcery.com>
8136
8137 * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
8138 just because flag_signed_bitfields is false.
8139
8140 1999-06-03 Nathan Sidwell <nathan@acm.org>
8141
8142 * semantics.c (begin_class_definition): Update the struct's
8143 location here ...
8144 * class.c (finish_struct): ... rather than here.
8145
8146 * decl.c (make_typename_type): Don't rely on uninitialized
8147 variable.
8148
8149 1999-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8150
8151 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
8152
8153 1999-05-31 Mark Mitchell <mark@codesourcery.com>
8154
8155 * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
8156 and friends rather than messing with current_obstack directly.
8157 (cp_build_qualified_type_real): Rework ARRAY_TYPE
8158 allocation to match practice throughout the rest of the
8159 compiler.
8160
8161 1999-05-30 Mark Mitchell <mark@codesourcery.com>
8162
8163 * lex.c (make_lang_type): Create TYPE_BINFO for
8164 TEMPLATE_TYPE_PARMs just like for non-template types.
8165
8166 * decl.c (start_decl): Move checks on initialization to ...
8167 (cp_finish_decl): Here. Tidy formatting slightly.
8168
8169 1999-05-28 Mark Mitchell <mark@codesourcery.com>
8170
8171 * decl.c (add_binding): Don't complain about a redeclaration of a
8172 semantically identical typedef in a local scope.
8173
8174 1999-05-28 Nathan Sidwell <nathan@acm.org>
8175
8176 * decl.c (complete_array_type): Allocate off same obstack. Fix
8177 DO_DEFAULT comment to match reality.
8178
8179 * friend.c (make_friend_class): Fix diagnostic typo.
8180
8181 1999-05-28 Mark Mitchell <mark@codesourcery.com>
8182
8183 * decl.c (lookup_namespace_name): Handle getting a
8184 TEMPLATE_ID_EXPR.
8185 (expand_static_init): Don't call pushdecl for implicitly declared
8186 `atexit' used to register destructors.
8187
8188 1999-05-25 Mark Mitchell <mark@codesourcery.com>
8189
8190 * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
8191 intialize a vtable.
8192
8193 * cp-tree.h (NAMESPACE_LEVEL): Reformat.
8194 (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes
8195 by combining TEMPLATE_INFO and LEVEL into a single union.
8196 (DECL_TEMPLATE_INFO): Reformat.
8197 (DECL_SAVED_TREE): Document.
8198 (DECL_TEMPLATE_INJECT): Remove.
8199 * class.c (finish_struct): Remove code to deal with
8200 DECL_TEMPLATE_INJECT.
8201
8202 * decl.c (maybe_process_template_type_declaration): Handle all new
8203 types in templates uniformly.
8204 * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
8205 DECL_CONTEXT.
8206 * pt.c (lookup_template_class): Inject template instantiations of
8207 forward-declarations.
8208 (instantiate_class_template): Remove code processing
8209 DECL_TEMPLATE_INJECT.
8210
8211 * pt.c (lookup_template_class): Tweak lookup to find member
8212 templates.
8213
8214 * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
8215 ASM_CV_QUAL.
8216 * semantics.c (finish_asm_stmt): Make strings permanent if they're
8217 used in a template.
8218
8219 1999-05-25 Jason Merrill <jason@yorick.cygnus.com>
8220
8221 * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
8222 parts of pointer to data member types.
8223
8224 1999-05-24 Mark Mitchell <mark@codesourcery.com>
8225
8226 * decl2.c (mark_vtable_entries): Don't make a copy of a function,
8227 and then make it look like `abort'. Just use `abort' instead.
8228
8229 * typeck.c (build_static_cast): Don't allow static_casts that cast
8230 away constness.
8231 (casts_away_constness_r): New function.
8232 (casts_away_constness): Likewise.
8233
8234 * decl.c (lookup_tag): Remove code no longer needed after
8235 name-lookup improvements.
8236 * decl2.c (handle_class_head): Make error-recovery more robust.
8237 * friend.c (make_friend_class): Reject templated typename types.
8238 * lex.c (is_global): A template parameter isn't global.
8239 * parse.y (class_head): Robustify.
8240 * parse.c: Regenerated.
8241
8242 1999-05-22 Mark Mitchell <mark@codesourcery.com>
8243
8244 * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
8245 INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs.
8246
8247 * cp-tree.h (push_nested_namespace): Declare.
8248 (pop_nested_namespace): Likewise.
8249 * decl.c (push_nested_namespace): New function.
8250 (pop_nested_namespace): Likewise.
8251 * pt.c (instantiate_class_template): Use them.
8252
8253 * tree.c (mapcar): Handle NON_LVALUE_EXPR.
8254
8255 * cp-tree.h (cplus_expand_constant): Declare.
8256 * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
8257 converted from one pointer-to-object type to another.
8258 * expr.c (cplus_expand_constant): Don't make it static.
8259 * typeck.c (build_component_ref): Don't crash when presented with
8260 a component which is a TEMPLATE_DECL.
8261 (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a
8262 cast from a pointer-to-member constant to its own type does not
8263 result in a valid non-type template argument.
8264
8265 1999-05-21 Mark Mitchell <mark@codesourcery.com>
8266 Nathan Sidwell <nathan@acm.org>
8267
8268 * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
8269 * cp-tree.h: Fix typo in documentation on pointers-to-members.
8270 (cp_build_qualified_type): Make it a macro.
8271 (cp_build_qualified_type_real): Declare.
8272 * decl.c (grokdeclarator): Remove misleading comment. Avoid
8273 problem with template parameters and restrict-qualification.
8274 * gxx.gperf: Replace NORID with RID_UNUSED throughout.
8275 * hash.h: Regenerated.
8276 * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
8277 the enumeration.
8278 (NORID): Remove definition.
8279 * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
8280 (tsubst): Likewise. Remove special handling for FUNCTION_TYPEs.
8281 (fn_type_unification): Check that the function type resulting from
8282 the deduction is legal.
8283 (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
8284 (unify): Use cp_build_qualified_type_real.
8285 * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
8286 (cp_build_qualified_type): Rename to ...
8287 (cp_build_qualified_type_real): Add additional COMPLAIN parameter
8288 and modify appropriately.
8289
8290 * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
8291 reveal optimization opportunities.
8292
8293 * pt.c (tsubst): Don't issue error messages when we're not
8294 complaining, even if we see a qualified function type.
8295 (check_cv_quals_for_unify): Don't allow a qualified function
8296 type.
8297
8298 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
8299
8300 * class.c (instantiate_type): Downgrade errors for object-dependent
8301 memfn refs to pedwarn.
8302
8303 1999-05-20 Mark Mitchell <mark@codesourcery.com>
8304
8305 * decl.c (grokdeclarator): Don't treat [] as indicating a
8306 zero-sized array in a typedef.
8307
8308 * call.c (build_object_call): Don't look at DECL_NAME for a type.
8309 (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
8310 (typeck.c): Or TYPE_MAIN_VARIANT for a type.
8311
8312 * pt.c (for_each_template_parm): Rework to match documentation.
8313 Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
8314
8315 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
8316
8317 * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
8318
8319 * class.c (finish_base_struct): Allow non-COM bases for COM classes
8320 except at the leftmost position.
8321 (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
8322 Pass the binfo's class, not the most derived, to skip_rtti_stuff.
8323 * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
8324
8325 * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
8326 (build_cplus_new): Make sure that what we return is of the right type.
8327
8328 1999-05-20 Mark Mitchell <mark@codesourcery.com>
8329
8330 * cp-tree.h (make_ptrmem_cst): New function.
8331 * expr.c (cplus_expand_constant): Split out from ...
8332 (cplus_expand_expr): Here. Use cplus_expand_constant.
8333 (init_cplus_expand): Set lang_expand_constant.
8334 * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
8335
8336 * tree.c (make_ptrmem_cst): Define.
8337 * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
8338 * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
8339
8340 1999-05-19 Mark Mitchell <mark@codesourcery.com>
8341
8342 * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
8343
8344 * decl2.c (start_static_storage_duration_function): Fix comment.
8345 (finish_file): Create static storage duration functions lazily.
8346
8347 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
8348
8349 Implement anonymous structs.
8350 * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
8351 * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
8352 * class.c (finish_struct_1): Remove redundant check for anon struct.
8353 * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
8354 (check_tag_decl): Check for anonymous struct here.
8355 * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
8356 * init.c (sort_member_init, emit_base_init): Handle getting fields
8357 as well as names in current_member_init_list.
8358 (perform_member_init): Handle getting an anon aggr.
8359 * method.c (do_build_assign_ref): Don't descend into anon aggrs.
8360 (do_build_copy_constructor): Likewise.
8361
8362 1999-05-19 Mark Mitchell <mark@codesourcery.com>
8363
8364 * tree.c (cp_build_qualified_type): Don't allow qualified function
8365 types.
8366
8367 Wed May 19 02:50:53 1999 Arvind Sankar <arvinds@mit.edu>
8368
8369 * gxxint.texi: Fix typo.
8370
8371 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
8372
8373 * call.c (find_scoped_type, resolve_scope_to_name): Lose.
8374 * class.c (finish_struct_1): Use CLASS_TYPE_P.
8375 * ptree.c (print_lang_type): Likewise.
8376 * typeck.c (build_modify_expr, c_expand_asm_operands): Use
8377 IS_AGGR_TYPE_CODE.
8378 * typeck2.c (digest_init): Likewise.
8379
8380 1999-05-18 Jason Merrill <jason@yorick.cygnus.com>
8381
8382 * call.c (joust): Compare the types of the conv ops, not the
8383 target types of the conversions.
8384
8385 Tue May 18 00:21:34 1999 Zack Weinberg <zack@rabi.phys.columbia.edu>
8386
8387 * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
8388 was not given.
8389
8390 1999-05-17 Mark Mitchell <mark@codesourcery.com>
8391
8392 * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
8393 * decl.c (grokfndecl): Don't allow inline declarations of friend
8394 template specializations, or friend template specializations with
8395 default arguments.
8396 * pt.c (tsubst): Handle substitution into array types that does
8397 not yield a fixed upper bound, even when not processing a
8398 template.
8399 (tsubst_copy): Deal with the fact that the second operand to a
8400 TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
8401 * search.c (marked_pushdecls_p): Don't descend into
8402 TEMPLATE_TYPE_PARMs and the like.
8403 (unmarked_pushdecls_p): Likewise.
8404
8405 * call.c (build_over_call): Don't throw away
8406 initializations/copies of empty classes; use MODIFY_EXPR and
8407 INIT_EXPR as for non-empty classes.
8408 * class.c (finish_struct_1): Put the padding byte for an empty
8409 class on the TYPE_NONCOPIED_PARTS list for the class.
8410
8411 1999-05-16 Mark Mitchell <mark@codesourcery.com>
8412
8413 * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
8414 indicate a reference to a field that is a qualified name.
8415
8416 1999-05-16 Jason Merrill <jason@yorick.cygnus.com>
8417
8418 * decl2.c (finish_objects): Don't use .?tors.* if we don't have
8419 ASM_OUTPUT_CONSTRUCTOR.
8420
8421 * friend.c (do_friend): Add attrlist arg. Remove support for
8422 getting a non-decl as 'decl'.
8423 * decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or
8424 rtl.
8425 (grokdeclarator): Adjust.
8426 * cp-tree.h: Adjust.
8427
8428 1999-05-16 Mark Mitchell <mark@codesourcery.com>
8429
8430 * cp-tree.h (permanent_p): New function.
8431 * init.c (build_new_1): Use mapcar, not copy_node, to copy a
8432 possibly complex tree node.
8433 * tree.c (mapcar): Adjust comments, and follow coding standards in
8434 conditional.
8435 (permanent_p): New function.
8436
8437 1999-05-13 Per Bothner <bothner@cygnus.com>
8438
8439 * class.c (push_lang_context): Turn off DECL_IGNORED_P for
8440 primitive Java types, if we actually see `extern "Java"'.
8441
8442 1999-05-10 18:21 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
8443
8444 * lang-specs.h: Pass -$ to the preprocessor.
8445
8446 1999-05-10 Jason Merrill <jason@yorick.cygnus.com>
8447
8448 * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
8449 Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
8450 (resolve_offset_ref): Don't handle a raw baselink.
8451 * cvt.c (build_expr_type_conversion): Likewise.
8452 * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
8453 convert_for_initialization): Likewise.
8454 * class.c (instantiate_type): Handle seeing a baselink under an
8455 OFFSET_REF.
8456 * error.c (dump_expr): Likewise.
8457 * pt.c (for_each_template_parm): Likewise.
8458 (resolve_overloaded_unification): Likewise.
8459 * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
8460 * typeck.c (expr_sizeof): Also complain about other permutations
8461 of overloaded functions.
8462
8463 1999-05-07 Jason Merrill <jason@yorick.cygnus.com>
8464
8465 * init.c (resolve_offset_ref): Don't return a raw method.
8466 Use BASELINK_P.
8467 * typeck.c (decay_conversion): Don't handle a raw method.
8468 Resolve all OFFSET_REFs.
8469 (get_member_function_from_ptrfunc): 0 is a valid vtable index.
8470 (build_binary_op_nodefault): Handle resolving overloaded fns. Use
8471 same_type_p for pmf bits. Don't use build_binary_op to compare
8472 raw pointers to methods.
8473 (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
8474 to decide when to call resolve_offset_ref.
8475 (build_c_cast, convert_for_initialization): Likewise.
8476 * cvt.c (build_expr_type_conversion): Likewise.
8477
8478 1999-05-06 Nathan Sidwell <nathan@acm.org>
8479
8480 * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
8481
8482 1999-05-05 Mark Mitchell <mark@codesourcery.com>
8483
8484 * decl2.c (start_objects): Don't let static constructors and
8485 destructors get inlined.
8486
8487 * parse.y (nested_name_specifier): Make sure ordinary types are
8488 complete, just like template types.
8489 * parse.c: Regenerated.
8490
8491 * pt.c (check_explicit_specialization): Improve error messages.
8492
8493 1999-05-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
8494
8495 * typeck.c (string_conv_p): Use same_type_p to check whether we
8496 try to convert between char and wchar_t.
8497
8498 1999-05-03 Mark Mitchell <mark@codesourcery.com>
8499
8500 * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
8501 lookup to error_mark_node here.
8502 (lookup_member): Revise documentation. Add comments. Don't set
8503 the TREE_TYPE to error_mark_node here, and don't build up an extra
8504 TREE_LIST for ambiguous lookups.
8505 (setup_class_bindings): Adjust accordingly.
8506 (push_class_decls): Revise out-of-date comments.
8507
8508 * typeck.c (build_const_cast): Tighten checks for legality.
8509
8510 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
8511
8512 * init.c (build_member_call): Lookup names coming from
8513 namespace-scoped LOOKUP_EXPR.
8514
8515 1999-05-03 Jim Blandy <jimb@zwingli.cygnus.com>
8516
8517 * gxxint.texi: Add documentation for 'I'.
8518
8519 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
8520
8521 * tinfo.cc (operator==): Qualify type_info with std::.
8522
8523 1999-05-02 Mark Mitchell <mark@codesourcery.com>
8524
8525 * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy.
8526 (DECL_COMDAT): Remove definition.
8527
8528 1999-05-01 Mark Mitchell <mark@codesourcery.com>
8529
8530 * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
8531 change.
8532
8533 1999-04-30 Mark Mitchell <mark@codesourcery.com>
8534
8535 * class.c (build_vtable): Use build_lang_decl when building
8536 vtables, not just build_decl.
8537 (prepare_fresh_vtable): Likewise.
8538 * decl.c (wrapup_globals_for_namespace): Mark vtables as
8539 DECL_EXTERNAL when calling wrapup_global_declarations.
8540 * decl2.c (priority_info_s): Add initializations_p and
8541 destructions_p members.
8542 (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
8543 when deciding what vtables to write out.
8544 (ssdf_decls): New variable.
8545 (ssdf_decls_used): Likewise.
8546 (start_static_storage_duration_function): Deal with being called
8547 multiple times. Avoid inlining this function.
8548 (generate_inits_for_priority): Deal with reuse of priority map.
8549 (get_priority_info): Clear initializations_p and destructions_p.
8550 (do_static_initialization): Tweak comment.
8551 (do_static_destruction): Likewise. Fix condition on sentries for
8552 destruction.
8553 (generate_ctor_or_dtor_function): Call all of the static storage
8554 duration functions.
8555 (generate_ctor_or_dtor_function_for_priority): Check
8556 initializations_p and destructions_p to see what priorities need
8557 initialization functions.
8558 (finish_file): Rework to generate multiple static storage duration
8559 functions, rather than just one.
8560
8561 * typeck.c (build_const_cast): Tweak last change to handle
8562 templates correctly.
8563
8564 * typeck.c (build_const_cast): Disallow use of const_cast to
8565 anything but a pointer or reference type.
8566
8567 1999-04-30 Nathan Sidwell <nathan@acm.org>
8568
8569 * decl.c (cp_finish_decl): Don't permit arrays of abstract or
8570 signature type.
8571
8572 1999-04-29 Mark Mitchell <mark@codesourcery.com>
8573
8574 * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
8575 (finish_file): Indent comments properly.
8576
8577 1999-04-29 Richard Henderson <rth@cygnus.com>
8578
8579 * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
8580 (do_static_destruction): Likewise.
8581
8582 1999-04-29 Nathan Sidwell <nathan@acm.org>
8583
8584 * cp-tree.h (TYPE_NOTHROW_P): New macro.
8585 * decl2.c (delete_sanity): Warn on deleting void *.
8586 * init.c (build_new_1): Use TYPE_NOTHROW_P.
8587 * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
8588 throwing operator new.
8589
8590 1999-04-28 Nathan Sidwell <nathan@acm.org>
8591
8592 * cp-tree.h (build_component_addr): Remove prototype.
8593 * typeck.c (build_component_addr): Make static. Remove MSG
8594 argument.
8595 (build_component_addr): Remove MSG parameter, clean up
8596 comment.
8597 (build_x_function_call): Use cp_error.
8598 (build_unary_op): Adjust call of build_component_addr.
8599
8600 1999-04-28 Mark Mitchell <mark@codesourcery.com>
8601
8602 * pt.c (tsubst_friend_class): Check for NULL.
8603
8604 Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
8605
8606 * search.c (binfo_for_vtable): Initialize bfvi.var.
8607
8608 1999-04-27 Nathan Sidwell <nathan@acm.org>
8609
8610 * rtti.c (build_x_typeid): Check rtti is enabled.
8611
8612 1999-04-26 Mark Mitchell <mark@codesourcery.com>
8613
8614 * search.c (is_subobject_of_p): Make sure we're looking at the
8615 right baseclasses.
8616
8617 1999-04-26 Marc Espie <espie@cvs.openbsd.org>
8618
8619 * Make-lang.in (cplib2.ready): Don't depend on phony targets.
8620
8621 1999-04-23 Mark Mitchell <mark@codesourcery.com>
8622
8623 * decl2.c (finish_file): Tweak handling of extern inlines so that
8624 they are not unnecessarily put out.
8625
8626 * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
8627 such as base classes.
8628
8629 1999-04-22 Brendan Kehoe <brendan@cygnus.com>
8630
8631 * tree.c (build_exception_variant): Fix typo: use the chain of U,
8632 not trying V, while cycling through U.
8633
8634 1999-04-22 Mark Mitchell <mark@codesourcery.com>
8635
8636 * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
8637 preserves_first_arg. Enlarge dummy accordingly.
8638 (DECL_TINFO_FN_P): New macro.
8639 (SET_DECL_TINFO_FN_P): Likeiwse.
8640 (DECL_RETURNS_FIRST_ARG): Remove.
8641 (DECL_PRESERVES_THIS): Likewise.
8642 (DECL_INIT_PRIORITY): New macro.
8643 (finish_struct_1): Change prototype.
8644 (cat_namespace_levels): Remove prototype.
8645 (vtable_decl_p): New prototype.
8646 (vtype_decl_p): Likewise.
8647 (sigtable_decl_p): Likewise.
8648 (walk_globals_pred): New typedef.
8649 (walk_globals_fn): Likewise.
8650 (walk_globals): New prototype.
8651 (walk_namespaces_fn): New typedef.
8652 (walk_namespaces): New prototype.
8653 (wrapup_globals_for_namespace): Likewise.
8654 (walk_vtables): Remove prototype.
8655 (walk_sigtables): Likewise.
8656 (instantiate_pending_templates): New prototype.
8657 * class.c (finish_struct_1): Don't return a value.
8658 * decl.h (pending_statics): Remove declaration.
8659 * decl.c (walk_namespaces_r): New function.
8660 (walk_globals_r): Likewise.
8661 (vtable_decl_p): Likewise.
8662 (vtype_decl_p): Likewise.
8663 (sigtable_decl_p): Likewise.
8664 (walk_namespaces): Likewise.
8665 (walk_globals_data): New type.
8666 (walk_globals): New function.
8667 (wrapup_globals_for_namespace): Likewise.
8668 (expand_static_init): Remove assertion. Remove redundancy in
8669 conditional. Don't put static data members in static_aggregates
8670 Tidy.
8671 (finish_function): Remove redundancy in conditional. Don't set
8672 DECL_RETURNS_FIRST_ARG.
8673 (cat_namespace_levels): Remove.
8674 * decl2.c: Include splay-tree.h and varray.h.
8675 (priority_info_s): New structure.
8676 (finish_vtable_vardecl): Change prototype. Adjust for new calling
8677 conventions.
8678 (prune_vtable_vardecl): Likewise.
8679 (finish_sigtable_vardecl): Likewise.
8680 (setup_initp): Remove.
8681 (do_dtors): Remove.
8682 (do_ctors): Remove.
8683 (start_static_storage_duration_function): New function.
8684 (generate_inits_for_priority): Likewise.
8685 (finish_static_storage_duration_function): Likewise.
8686 (get_priority_info): Likewise.
8687 (do_static_initialization): Likewise.
8688 (do_static_destruction): Likewise.
8689 (do_static_initialization_and_destruction): Likewise.
8690 (generate_ctor_or_dtor_function): Likewise.
8691 (generate_ctor_and_dtor_functions_for_priority): Likewise.
8692 (pending_statics): Make it a varray.
8693 (pending_statics_used): New variable.
8694 (saved_inlines): Make it a varray.
8695 (saved_inlines_used): New variable.
8696 (finish_static_data_member): Change method of updating
8697 pending_statics.
8698 (mark_inline_for_output): Remove #if 0'd code. Change method of
8699 updating saved_inlines.
8700 (walk_vtables): Remove.
8701 (walk_sigtables): Likewise.
8702 (import_export_decl): Use DECL_TINFO_FN_P.
8703 (pending_templates): Remove declaration.
8704 (maybe_templates): Likewise.
8705 (static_aggregates_initp): Likewise.
8706 (setup_initp): Likewise.
8707 (finish_objects): Simplify.
8708 (INITIALIZE_P_IDENTIFIER): New macro.
8709 (PRIORITY_IDENTIFIER): New macro.
8710 (SSDF_IDENTIFIER): New macro.
8711 (initialize_p_decl): New variable.
8712 (priority_decl): Likewise.
8713 (ssdf_decl): Likewise.
8714 (priority_info_map): Likewise.
8715 (finish_file): Recode output of static intializers and other
8716 file-scope finalization tasks.
8717 * error.c (OB_END_TEMPLATE_ID): New macro.
8718 (dump_type_real): Use it.
8719 (dump_decl): Likewise.
8720 (dump_function_name): Likewise.
8721 * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
8722 interface.
8723 (check_newline): Use walk_globals, not walk_vtables.
8724 * pt.c (pending_tempalte_expansions): Remove.
8725 (set_vardecl_interface_info): Likewise.
8726 (pending_templates): Make static.
8727 (maybe_templates): Likewise.
8728 (instantiate_class_template): Adjust call to finish_struct_1.
8729 (instantiate_pending_templates): New function.
8730 * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
8731 * tree.c (static_aggregates_initp): Remove.
8732 (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
8733 instead.
8734 * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
8735
8736 * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
8737 with the RTL code RETURN.
8738 * hash.h: Regenerated.
8739 * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
8740 * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
8741 * parse.c: Regenerated.
8742 * pt.c: Include varray.h. Include rtl.h since varray.h requires
8743 it.
8744 (inline_parm_levels): New variable.
8745 (inline_parm_levels_used): Likewise.
8746 (maybe_begin_member_template_processing): Update them.
8747 (maybe_end_member_template_processing): Use them, rather than
8748 guessing how many levels to pop.
8749
8750 * decl.c (make_typename_type): Tighten error-checking.
8751
8752 1999-04-20 Mark Mitchell <mark@codesourcery.com>
8753
8754 * cp-tree.h (build_binary_op): Remove unneeded parameter.
8755 * class.c (build_vrable_entry_ref): Adjust call to
8756 build_binary_op.
8757 * decl.c (expand_static_init): Likewise.
8758 (grokdeclarator): Likewise.
8759 (finish_function): Likewise.
8760 * decl2.c (delete_sanity): Likewise.
8761 (do_dtors): Likewise.
8762 (do_ctors): Likewise.
8763 * error.c (dump_type_suffix): Likewise.
8764 * expr.c (cplus_expand_expr): Likewise.
8765 * init.c (resolve_offset_ref): Likewise.
8766 (build_new): Likewise.
8767 (build_new_1): Likewise.
8768 (build_vec_delete_1): Likewise.
8769 (expand_vec_init_catch_clause): Likewise.
8770 (build_delete): Likewise.
8771 * pt.c (tsubst): Likewise.
8772 * rtti.c (synthesize_tinfo_fn): Likewise.
8773 * search.c (expand_upcast_fixups): Likewise.
8774 (expand_direct_vtbls_init): Likewise.
8775 * typeck.c (get_member_function_from_ptrfunc): Likewise.
8776 (build_binary_op_nodefault): Likewise.
8777 (point_int_sum): Likewise.
8778 (pointer_diff): Likewise.
8779 (build_unary_op): Likewise.
8780 (build_modify_expr): Likewise.
8781 (get_delta_difference): Likewise.
8782 (build_ptrmemfunc): Likewise.
8783 (expand_ptrmemfunc_cst): Likewise.
8784
8785 1999-04-20 Jason Merrill <jason@yorick.cygnus.com>
8786
8787 * decl.c (grokfndecl): Always call cplus_decl_attributes.
8788 * decl2.c (grokfield): Pass attrlist to grokdeclarator.
8789
8790 1999-04-19 Mark Mitchell <mark@codesourcery.com>
8791
8792 * cp-tree.h (finish_static_data_member_decl): New function.
8793 * decl2.c (finish_static_data_member_decl): Split out from ...
8794 (grokfield): Here.
8795 * pt.c (instantiate_class_template): Use it here instead of
8796 trying to fake it.
8797 (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
8798 finish_static_data_member_decl will do that. Explicit set
8799 DECL_EXTERNAL to match non-template processing.
8800
8801 1999-04-18 Mark Mitchell <mark@codesourcery.com>
8802
8803 * cp-tree.h (finish_class_definition): Add parameter.
8804 * parse.y (structsp): Use it. Don't call pop_scope here.
8805 * parse.c: Regenerated.
8806 * semantics.c (finish_class_definition): Pop it here.
8807
8808 1999-04-17 Mark Mitchell <mark@codesourcery.com>
8809
8810 * decl.c (xref_tag): Revise handling of nested template
8811 declarations.
8812 * pt.c (check_explicit_specialization): Tweak handling of friend
8813 templates in template classes.
8814 (tsubst_friend_class): Handle friend declarations for nested
8815 member template classes.
8816
8817 1999-04-16 Mark Mitchell <mark@codesourcery.com>
8818
8819 * class.c (finish_struct): Remove unused variable.
8820 (pushclass): Likewise.
8821 (invalidate_class_lookup_cache): Likewise.
8822 * cp-tree.def (TYPENAME_TYPE): Improve documentation.
8823 * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
8824 doesn't get obliterated.
8825 (make_typename_type): Handle template classes correctly.
8826
8827 * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
8828 (storetags): Declare.
8829 * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
8830 (pushclass): Likewise. Use storetags to install tag declarations,
8831 not pushtag.
8832 (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
8833 * decl.c (storetags): Make it global.
8834 (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
8835 implicit typename declaration.
8836 (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG.
8837 * method.c (hack_identifier): Likewise.
8838 * search.c (lookup_member): Likewise.
8839
8840 * decl.c (warn_about_implicit_typename_lookup): New function.
8841 (lookup_name_real): Use it. Rework handling of implicit typename
8842 extension.
8843
8844 1999-04-15 Mark Mitchell <mark@codesourcery.com>
8845
8846 * cp-tree.h (lookup_nested_field): Remove.
8847 * class.c (push_nested_class): Handle UNION_TYPEs.
8848 (pop_nested_class): Likewise.
8849 * decl.c (lookup_name_real): Don't call lookup_nested_field.
8850 (start_decl): Use push_nested_class, not just pushclass.
8851 (cp_finish_decl): Use pop_nested_class, not just popclass.
8852 * search.c (lookup_nested_field): Remove.
8853
8854 * cp-tree.h (lang_type): Add documentation.
8855 * decl2.c (handle_class_head): Create template declarations here,
8856 as appropriate.
8857 * parse.y (class_head): Return whether or not we entered a new
8858 scope, as well as the type named.
8859 (named_class_head): Likewise.
8860 (named_complex_class_head_sans_basetype): Likewise.
8861 (structsp): Adjust accordingly. Pop scope when required.
8862 * parse.c: Regenerated.
8863 * pt.c (check_default_tmpl_args): Robustify.
8864 (redeclare_class_template): Likewise.
8865 (instantiate_class_template): An instantiation of an
8866 anonymous union is itself an anonymous union.
8867 * semantics.c (begin_class_definition): Don't create template
8868 declarations here.
8869
8870 1999-04-15 Jason Merrill <jason@yorick.cygnus.com>
8871
8872 * parse.y (after_type_declarator_intern): New nonterminal.
8873 (after_type_declarator): Use it.
8874 (direct_after_type_declarator): Likewise. Move above
8875 nonnested_type to fix reduce/reduce conflict resolution.
8876 (declmods): Reducing from just 'attributes' has EMPTY precedence.
8877 * Makefile.in (CONFLICTS): Update.
8878
8879 * decl.c (define_label): Downgrade error for jumping over a
8880 non-POD decl to pedwarn.
8881
8882 1999-04-14 Mark Mitchell <mark@codesourcery.com>
8883
8884 * cp-tree.h (popclass): Change declaration.
8885 (pop_nested_class): Likewise.
8886 (poplevel_class): Remove declaration.
8887 * call.c (convert_default_argument): Pass no arguments to
8888 popclass.
8889 * class.c (finish_struct_1): Likewise.
8890 (finish_struct): Likewise.
8891 (popclass): Remove argument. Simplify code accordingly.
8892 (pop_nested_class): Likewise.
8893 * decl.c (poplevel_class): Declare it here, and make it static.
8894 (poplevel): Handle class scopes.
8895 (poplevel_class): Don't take an rgument. Simplify.
8896 (pop_everything): Pass no arguments to pop_nested_class.
8897 (cp_finish_decl): Pass no arguments to popclass.
8898 (grokdeclarator): Pass no arguments to pop_nested_class.
8899 (finish_function): Likewise.
8900 * decl2.c (grokfield): Likewise.
8901 (pop_scope): Pass no arguments to popclass.
8902 * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
8903 * pt.c (instantiate_class_template): Move call to pushclass, and
8904 document. Pass no arguments to popclass.
8905 (regenerate_decl_from_template): Likewise.
8906
8907 1999-04-14 Jason Merrill <jason@yorick.cygnus.com>
8908
8909 * typeck.c (build_unary_op): Handle taking the address of a unique
8910 bound non-static member function.
8911
8912 1999-04-13 Martin von Loewis <loewis@informatik.hu-berlin.de>
8913
8914 * lang-options.h (-Wdeprecated): New flag.
8915 * decl2.c (warn_deprecated): New flag.
8916 (lang_decode_option): Deprecated this-is-variable,
8917 external-templates, alt-external-templates.
8918 Support -Wdeprecated.
8919 * errfn.c (cp_deprecated): New function.
8920
8921 1999-04-13 Jason Merrill <jason@yorick.cygnus.com>
8922
8923 * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
8924 of the decls themselves.
8925
8926 * pt.c (tsubst_function_type): Copy attributes over.
8927
8928 * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority
8929 and com_interface.
8930 * cp-tree.h: Add prototype.
8931 * decl.c (init_decl_processing): Set valid_lang_attribute.
8932
8933 1999-04-13 Mark Mitchell <mark@codesourcery.com>
8934
8935 * class.c (finish_struct_1): Look at the const-ness of the field's
8936 type, not the TREE_READONLY-ness of the declaration.
8937 * method.c (synthesize_method): Likewise.
8938 * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
8939 creating new declarations.
8940
8941 1999-04-13 Mike Stump <mrs@wrs.com>
8942
8943 * decl2.c (import_export_decl): Because vtables always reference
8944 virtual functions, even if they are inlined, don't allow
8945 -fno-implement-inlines to not emit them, instead, emit them with
8946 the vtable.
8947 * decl.c (start_function): Likewise.
8948
8949 1999-04-12 Jason Merrill <jason@yorick.cygnus.com>
8950
8951 * cp-tree.h (struct lang_type): Add com_interface.
8952 (CLASSTYPE_COM_INTERFACE): New macro.
8953 * class.c (set_rtti_entry): COM interface classes have no RTTI
8954 entries in their vtables; adjust.
8955 (add_virtual_function, finish_base_struct, skip_rtti_stuff,
8956 modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
8957 finish_struct_1): Likewise.
8958 * decl2.c (mark_vtable_entries): Likewise.
8959 * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
8960 * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
8961 expand_upcast_fixups): Likewise.
8962 * tree.c (debug_binfo): Likewise.
8963
8964 * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
8965 * typeck.c (comptypes): If we get it, ignore attributes.
8966 * class.c (instantiate_type): Use BASELINK_P. Change complain
8967 parameter to flags; 2 means ignore attributes.
8968 * call.c (build_op_delete_call): Pass it.
8969
8970 * decl.c (xref_tag): Only complain once about using a typedef-name
8971 with 'struct'. Downgrade to pedwarn.
8972
8973 * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
8974
8975 * parse.y (absdcl_intern): New nonterminal.
8976 (absdcl, direct_abstract_declarator): Use it.
8977
8978 * pt.c (lookup_template_class): Look through implict typename.
8979
8980 1999-04-11 Mark Mitchell <mark@codesourcery.com>
8981
8982 * friend.c (add_friend): Deal gracefully with error_mark_node.
8983 * method.c (build_overload_value): Handle pointers-to-members as
8984 template parameters.
8985
8986 * decl.c (push_binding): Fix typo in comment.
8987
8988 1999-04-10 Mark Mitchell <mark@codesourcery.com>
8989
8990 * error.c (dump_type_real): If a typename is a template-id, put
8991 out the template arguments.
8992 (dump_expr): Handle TEMPLATE_ID_EXPR.
8993 * pt.c (lookup_template_class): Now that full arguments are
8994 available everywhere, remove code that tried to guess them.
8995
8996 1999-04-09 Mark Mitchell <mark@codesourcery.com>
8997
8998 * decl.c (make_typename_type): Complain if we don't find a type
8999 when trying to make a typename type for a non-template type.
9000
9001 1999-04-09 Jason Merrill <jason@yorick.cygnus.com>
9002
9003 * decl.c (start_decl): Pass attributes to grokdeclarator.
9004 (grokdeclarator): Handle attributes on constructor-syntax
9005 initializers.
9006
9007 1999-04-08 Mark Mitchell <mark@codesourcery.com>
9008
9009 * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
9010 don't have types.
9011
9012 * search.c (template_self_reference_p): Tweak.
9013
9014 1999-04-07 Mark Mitchell <mark@codesourcery.com>
9015
9016 * init.c (build_offset_ref): Don't build yet another weird data
9017 structure to describe overloaded functions.
9018
9019 1999-04-06 Mark Mitchell <mark@codesourcery.com>
9020
9021 * cp-tree.h (BASELINK_P): New macro.
9022 (SET_BASELINK_P): Likewise.
9023 * init.c (build_member_call): Remove needless assignment in if
9024 statement.
9025 * search.c (lookup_field_r): Fix handling when we are looking
9026 specifically for a type; these are not hidden by functions and
9027 variables.
9028 (lookup_member): Use SET_BASELINK_P.
9029 * tree.c (is_overloaded_fn): Use BASELINK_P.
9030 (really_overloaed_fn): Likewise.
9031 (get_first_fn): Likewise.
9032
9033 1999-04-05 Mark Mitchell <mark@codesourcery.com>
9034
9035 * decl.c (lookup_name_current_level): Tweak, and improve
9036 documentation.
9037
9038 * class.c (maybe_fixup_vptrs): Remove declaration.
9039 (build_class_init_list): Likewise.
9040 * decl.c (pushdecl_class_level): Call check_template_shadow here
9041 ...
9042 (push_class_level_binding): ... not here.
9043 * search.c (dfs_push_type_decls): Only avoid
9044 template-self-reference TYPE_DECLs if they are from base classes.
9045
9046 1999-04-04 Mark Mitchell <mark@codesourcery.com>
9047
9048 * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
9049 nodes. Tidy.
9050
9051 1999-04-03 Jason Merrill <jason@yorick.cygnus.com>
9052
9053 * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
9054 (finish_struct_1): Don't call build_class_init_list.
9055
9056 1999-04-02 Mark Mitchell <mark@codesourcery.com>
9057
9058 * tinfo.h (__class_type_info): Fix illegal declaration.
9059
9060 * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
9061 * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
9062 (IDENTIFIER_CLASS_VALUE): Improve documentation.
9063 (is_properly_derived_from): Declare.
9064 (invalidate_class_lookup_cache): Likewise.
9065 (maybe_maybe_note_name_used_in_class): Likewise.
9066 (note_name_declared_in_class): Likewise.
9067 (push_using_decl): Remove duplicate declaration.
9068 (id_in_current_class): Remove declaration.
9069 (push_class_binding): Change prototype.
9070 (clear_identitifer_class_values): Declare.
9071 * call.c (is_properly_derived_from): Make it global.
9072 (build_new_function_call): Be careful about updating candidates.
9073 (build_new_method_call): Handle COMPONENT_REFs. Don't crash when
9074 asked to make illegal calls.
9075 * class.c: Include splay-tree.h.
9076 (class_stack_node): Add names_used slot.
9077 (check_member_decl_is_same_in_complete_scope): Remove.
9078 (add_method): Fix comment. Push the declaration into class
9079 scope.
9080 (finish_struct_1): When popping the class, pop the bindings too.
9081 Remove check for data member/function member conflict.
9082 (finish_struct): Remove calls to
9083 check_member_decl_is_same_in_complete_scope. Change calls to
9084 popclass.
9085 (pushclass): Clear names_used in the class stack entry.
9086 Use invalidate_class_lookup_cache to remove cached entries, rather
9087 than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE
9088 before entering a new class. Remove dead code. Don't mess with
9089 current_function_decl when pushing declarations.
9090 (invalidate_class_lookup_cache): New function, split out from ...
9091 (popclass): Here. Clean up names_used on our way out.
9092 (instantiate_type): Adjust.
9093 (build_self_reference): Don't push the declaration here.
9094 (maybe_note_name_used_in_class): New function.
9095 (note_name_declared_in_class): Likewise.
9096 * decl.c (add_binding): Change prototype.
9097 (find_class_binding_level): New function.
9098 (innermost_nonclass_level): Likewise.
9099 (current_binding_level): Update documentation.
9100 (inner_binding_level): Remove. Replace with current_binding_level
9101 throughout.
9102 (push_binding_level): Remove special handling of
9103 class_binding_level.
9104 (pop_binding_level): Likewise. Use find_class_binding_level.
9105 (suspend_binding_level): Likewise.
9106 (global_bindings_p): Use innermost_nonclass_level.
9107 (toplevel_bindings_p): Likewise.
9108 (namespace_bindings_p): Likewise.
9109 (pseudo_global_level_p): Likewise.
9110 (push_binding): Clear INHERITED_VALUE_BINDING_P.
9111 (add_binding): Check for illegal multiple declarations. Return a
9112 value indicating whether or not the new binding was legal.
9113 (push_local_binding): Skip over class binding levels. Check
9114 return value from add_binding.
9115 (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call
9116 note_name_declared_in_class.
9117 (pushlevel_class): Remove "fake out the rest of the compiler"
9118 code.
9119 (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
9120 (clear_identifier_class_values): New function.
9121 (pop_from_top_level): Use it.
9122 (pop_everything): Tweak.
9123 (maybe_process_template_type_declaration): Don't push the
9124 declaration for the template here.
9125 (pushtag): Don't push tag declarations into class scope here.
9126 (pushdecl): Apply DeMorgan's law for readability.
9127 (pushdecl_class_level): Remove special-case code for
9128 TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions.
9129 (push_class_level_bindng): Deal with inherited bindings.
9130 (lookup_name_real): Remove special-case code for
9131 TYPE_BEING_DEFINED, and some implicit typename magic.
9132 (grokdeclarator): Handle COMPONENT_REF for a template function.
9133 (build_enumerator): Don't call pushdecl_class_level here.
9134 (id_in_current_class): Remove.
9135 * decl2.c (grokfield): Don't call pushdecl_class_level or
9136 check_template_shadow.
9137 * errfn.c (cp_file_of): Don't declare.
9138 (cp_line_of): Likewise.
9139 * error.c (dump_decl): Handle an OVERLOAD.
9140 (cp_file_of): Likewise.
9141 (cp_line_of): Likewise.
9142 * init.c (build_member_call): Handle a COMPONENT_REF.
9143 * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
9144 pushdecl_class_level.
9145 * method.c (hack_identifier): Build COMPONENT_REFs for references
9146 to member templates as well as member functions. Remove dead
9147 code.
9148 * parse.y (left_curly): Remove.
9149 (nonnested_type): Call maybe_note_name_used_in_class, not
9150 pushdecl_class_level.
9151 * parse.c: Regenerated.
9152 (nested_name_specifier_1): Likewise.
9153 * pt.c (check_explicit_specialization): Adjust, for robustness.
9154 (check_template_shadow): Handle OVERLOADs.
9155 (build_template_decl): Set DECL_CONSTRUCTOR_P on the
9156 TEMPLATE_DECL, if appropriate.
9157 * search.c (envelope_add_decl): Remove.
9158 (dfs_pushdecls): Likewise.
9159 (dfs_compress_decls): Likewise.
9160 (dfs_push_decls): New function.
9161 (dfs_push_type_decls): Likewise.
9162 (setup_class_bindings): Likewise.
9163 (template_self_reference_p): Likewise.
9164 (lookup_field_r): Use it.
9165 (looup_member): Remove old comment. Deal with ambiguity.
9166 (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
9167 and remove envelope processing.
9168 * semantics.c (begin_class_definition): Let pushclass push
9169 declarations for base classes.
9170 (finish_member_declaration): Push declarations into class scope.
9171 * typeck.c (build_component_ref): Just put an OVERLOAD into the
9172 COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
9173 (build_x_function_call): Deal with OVERLOAD. Handle template-ids.
9174 * Makefile.in (class.o): Depend on splay-tree.h.
9175
9176 Wed Mar 31 11:30:43 1999 Nathan Sidwell <nathan@acm.org>
9177
9178 * cvt.c (convert_pointer_to_real): Use same_type_p.
9179 * typeck.c (comp_target_types): Use same_type_p.
9180
9181 1999-03-31 Jason Merrill <jason@yorick.cygnus.com>
9182
9183 * semantics.c (begin_inline_definitions,
9184 finish_inline_definitions): Rename from finish_default_args and
9185 begin_inline_definitions, respectively, to something that isn't a
9186 total lie. :)
9187 * parse.y (structsp): Adjust.
9188
9189 * tree.c (hash_tree_cons): Remove obsolete via_* parms.
9190 (list_hash_lookup): Likewise.
9191 (hash_tree_chain): Adjust.
9192 * pt.c (tsubst): Adjust.
9193 (tsubst_arg_types): Use plain hash_tree_cons.
9194 * cp-tree.h (hash_tree_cons_simple): Lose.
9195 * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
9196
9197 Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9198
9199 * Makefile.in (hash.h): Generate using gperf language 'C', not
9200 'KR-C', so gperf uses the `const' keyword on strings.
9201
9202 * gxx.gperf (resword): Const-ify a char*.
9203
9204 1999-03-30 Jason Merrill <jason@yorick.cygnus.com>
9205
9206 * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
9207 CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
9208 CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
9209 CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
9210 CLASSTYPE_BINFO_AS_LIST): Remove cruft.
9211 * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
9212 tree.c: Adjust.
9213
9214 1999-03-29 Jason Merrill <jason@yorick.cygnus.com>
9215
9216 * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
9217
9218 1999-03-28 Jason Merrill <jason@yorick.cygnus.com>
9219
9220 * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
9221
9222 1999-03-27 Mark Mitchell <mark@codesourcery.com>
9223
9224 * cp-tree.h (add_friend): Declare.
9225 (add_friends): Likewise.
9226 * friend.c (add_friend): Make it global. Don't add to
9227 DECL_BEFRIENDING_CLASSES if the befriending class is a template.
9228 (add_friends): Make it global.
9229 (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
9230 befriending class is a template.
9231 * parse.y (component_decl_1): Fix typo in comment.
9232 * parse.c: Regenerated.
9233 * pt.c (instantiate_class_template): Use add_friend and
9234 add_friends rather that duplicating some of their functionality
9235 here.
9236
9237 1999-03-27 Jason Merrill <jason@yorick.cygnus.com>
9238
9239 * call.c (build_field_call): Unify 'this' and non-'this' cases.
9240
9241 * typeck.c (build_indirect_ref): Check for 'this' sooner.
9242
9243 Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9244
9245 * call.c (op_error): Const-ify a char*.
9246 (add_candidate, source_type, add_warning): Add static prototype.
9247 (print_z_candidates): Const-ify a char*.
9248
9249 * class.c (resolve_address_of_overloaded_function,
9250 fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
9251 (get_vtable_name, finish_struct_1): Const-ify a char*.
9252
9253 * cvt.c (convert_to_reference): Likewise.
9254
9255 * decl.c (redeclaration_error_message, record_builtin_type,
9256 record_unknown_type, member_function_or_else, bad_specifiers):
9257 Likewise.
9258 (find_binding, select_decl, unqualified_namespace_lookup,
9259 lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
9260 Add static prototype.
9261 (warn_extern_redeclared_static, duplicate_decls, pushdecl,
9262 implicitly_declare, record_builtin_java_type, define_function,
9263 grok_op_properties, tag_name): Const-ify a char*.
9264
9265 * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
9266 (define_function, finish_builtin_type): Const-ify a char*.
9267 (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
9268 cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
9269 (file_name_nondirectory): Const-ify a char*.
9270 (init_filename_times): Don't prototype.
9271 (compiler_error): Prototype.
9272 (yyerror, init_repo): Const-ify a char*.
9273 (build_srcloc): Don't prototype.
9274 (build_x_indirect_ref, build_indirect_ref, build_component_addr):
9275 Const-ify a char*.
9276 (warn_for_assignment): Don't prototype.
9277 (convert_for_initialization, readonly_error, check_for_new_type,
9278 GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
9279 Const-ify a char*.
9280
9281 * decl2.c (acceptable_java_type, output_vtable_inherit,
9282 setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
9283 merge_functions, decl_namespace, validate_nonmember_using_decl,
9284 do_nonmember_using_decl): Add static prototype.
9285 (lang_f_options): Const-ify a char*.
9286 (finish_builtin_type): Likewise.
9287 (add_function, arg_assoc_namespace, arg_assoc_class): Add static
9288 prototype.
9289
9290 * errfn.c: Include cp-tree.h.
9291 (cp_thing): Add static prototype.
9292 (compiler_error): Don't protoptype.
9293 (cp_compiler_error): Cast `compiler_error' to `errorfn' before
9294 passing it to `cp_thing'.
9295
9296 * error.c (interesting_scope_p): Add static prototype.
9297
9298 * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
9299 a char*.
9300
9301 * init.c (compiler_error): Don't prototype.
9302 (member_init_ok_or_else): Const-ify a char*.
9303 (build_java_class_ref): Add static prototype.
9304
9305 * lex.c (compiler_error): Don't prototype.
9306 (get_time_identifier, interface_strcmp, extend_token_buffer,
9307 handle_cp_pragma): Const-ify a char*.
9308 (is_global, init_filename_times): Add static prototype.
9309 (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
9310 (compiler_error): Change from fixed args to variable args.
9311 (yyerror): Const-ify a char*.
9312
9313 * parse.y (cond_stmt_keyword): Const-ify a char*.
9314 (parse_decl): Add static prototype.
9315
9316 * pt.c (template_args_equal, print_template_context): Likewise.
9317 (print_candidates, check_default_tmpl_args): Const-ify a char*.
9318 (instantiate_class_template): Likewise.
9319
9320 * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
9321
9322 * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
9323 expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
9324
9325 * search.c (lookup_field_info, lookup_member): Likewise.
9326 (lookup_member): Cast the first argument of `bzero' to a PTR.
9327
9328 * sig.c (compiler_error): Don't prototype.
9329 (build_signature_pointer_or_reference_nam): Const-ify a char*.
9330 (get_sigtable_name, build_member_function_pointer): Likewise.
9331
9332 * tree.c (compiler_error): Don't prototype.
9333 (no_linkage_helper, build_srcloc): Add static prototype.
9334 (build_vbase_pointer_fields): Const-ify a char*.
9335 (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
9336
9337 * typeck.c (compiler_error): Don't prototype.
9338 (convert_for_assignment): Const-ify a char*.
9339 (comp_cv_target_types): Add static prototype.
9340 (build_x_indirect_ref, build_indirect_ref, convert_arguments,
9341 build_component_addr, build_unary_op, convert_for_initialization):
9342 Const-ify a char*.
9343
9344 * typeck2.c (ack): Add static prototype and change from fixed args
9345 to variable args.
9346 (readonly_error, check_for_new_type): Const-ify a char*.
9347
9348 * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
9349 fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
9350 (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'.
9351 (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
9352 gen_assign, GNU_xref_member): Const-ify a char*.
9353
9354 1999-03-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
9355
9356 * gxxint.texi: Remove old discussion on copying virtual bases.
9357
9358 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
9359
9360 * Make-lang.in: Remove all references to g++.o/g++.c.
9361 Link g++ from gcc.o.
9362
9363 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
9364
9365 * decl2.c (comdat_linkage): Treat vtables like functions.
9366
9367 1999-03-25 Mark Mitchell <mark@codesourcery.com>
9368
9369 * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
9370
9371 1999-03-25 Nathan Sidwell <nathan@acm.org>
9372
9373 * decl.c (init_decl_processing): Add `signed' type as a synonym
9374 for `int'.
9375
9376 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
9377
9378 * typeck.c (common_type): Handle cv-qual unification for pointers
9379 to members.
9380
9381 * decl.c (unqualified_namespace_lookup): Return error_mark_node
9382 on error.
9383 (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
9384 * lex.c (do_identifier): If we got error_mark_node, call
9385 lookup_name again.
9386
9387 1999-03-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
9388
9389 * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
9390 classes.
9391
9392 1999-03-24 Jason Merrill <jason@yorick.cygnus.com>
9393
9394 * decl.c (lookup_name_real): Do nested field lookup regardless of
9395 TYPE_BEING_DEFINED.
9396
9397 1999-03-24 Mark Mitchell <mark@codesourcery.com>
9398
9399 * cp-tree.h (lang_type): Remove has_assignment and
9400 has_real_assignment. Add befriending_classes.
9401 (TYPE_HAS_ASSIGNMENT): Remove.
9402 (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
9403 (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
9404 (lang_decl): Document.
9405 (DECL_BEFRIENDING_CLASSES): New macro.
9406 (FRIEND_NAME): Move declaration to more obvious location.
9407 (FRIEND_DECLS): Likewise.
9408 * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
9409 * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
9410 (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
9411 (grok_op_properties): Likewise.
9412 * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
9413 (add_friend): Likewise. Don't do weird things with assignment
9414 operators. Update DECL_BEFRIENDING_CLASSES.
9415 (add_friends): Don't do weird things with assignment operators.
9416 (make_friend_class): Likewise. Update
9417 CLASSTYPE_BEFRIENDING_CLASSES.
9418 * pt.c (instantiate_class_template): Don't set
9419 TYPE_HAS_ASSIGNMENT.
9420 (tsubst_copy): Substitute the TREE_TYPE for more unary
9421 expressions.
9422 * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
9423 * search.c (protected_accessible_p): New function.
9424 (friend_accessible_p): Likewise.
9425 (accessible_p): Use them.
9426
9427 1999-03-23 Mark Mitchell <mark@codesourcery.com>
9428
9429 * pt.c (convert_nontype_argument): Don't create things that aren't
9430 PTRMEM_CSTs when applying a qualification conversion to a
9431 PTRMEM_CST.
9432
9433 1999-03-23 Mark Mitchell <mark@codesourcery.com>
9434
9435 * Makefile.in (OBJS): Don't mention hash.o.
9436 (OBJDEPS): Likewise.
9437
9438 1999-03-23 Jason Merrill <jason@yorick.cygnus.com>
9439
9440 * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
9441 * decl.c (expand_static_init): Make sure we don't add any after
9442 then.
9443
9444 * decl.c (cp_finish_decl): Move intelligence about handling
9445 DECL_COMDAT for variables from here...
9446 * decl2.c (comdat_linkage): ...to here.
9447 (maybe_make_one_only): Tweak.
9448 (import_export_decl): Call comdat_linkage for variables, too.
9449 (finish_file): Handle template statics properly.
9450
9451 1999-03-22 Mark Mitchell <mark@codesourcery.com>
9452
9453 * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
9454 Document internals of pointer-to-member-functions.
9455 (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
9456 (PFN_FROM_PTRMEMFUNC): Likewise.
9457 (build_type_conversion): Remove unused parameter.
9458 (build_ptrmemfunc1): Declare.
9459 (expand_ptrmemfunc_cst): New function.
9460 (delta2_from_ptrmemfunc): Likewise.
9461 (pfn_from_ptrmemfunc): Likewise.
9462 * cvt.c (cp_convert_to_pointer): Remove unused parameter to
9463 build_type_conversion. Use TYPE_PTRMEM_P for readability.
9464 (convert_to_reference): Remove unused parameter to
9465 build_type_conversion.
9466 (ocp_convert): Likewise.
9467 (build_user_type_conversion): Likewise.
9468 * error.c (dump_expr): Handle NULL pointer-to-member functions.
9469 * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
9470 * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
9471 open when handling pointer-to-member functions.
9472 * pt.c (convert_nontype_argument): Clean up error messages. Be
9473 more stringent with pointers-to-members.
9474 * typeck.c (build_ptrmemfunc1): Don't declare. Make it global.
9475 (build_unary_op): Tidy ever-so-slightly.
9476 (build_conditional_expr): Remove extra parameter to
9477 build_type_conversion.
9478 (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
9479 we're using.
9480 (expand_ptrmemfunc_cst): Define.
9481 (delta2_from_ptrmemfunc): Likewise.
9482 (pfn_from_ptrmemfunc): Likewise.
9483
9484 1999-03-19 Mark Mitchell <mark@codesourcery.com>
9485
9486 * init.c (build_member_call): Handle template-id expressions
9487 correctly.
9488 * typeck.c (build_x_function_call): Likewise.
9489
9490 1999-03-19 Chip Salzenberg <chip@perlsupport.com>
9491
9492 * friend.c (make_friend_class): Avoid core dump when
9493 not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
9494
9495 1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
9496
9497 * decl.c (start_function): Suppress normal linkage heuristics
9498 for #pragma interface under MULTIPLE_SYMBOL_SPACES.
9499
9500 1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br>
9501
9502 * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
9503 ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
9504
9505 1999-03-17 Martin von Löwis <loewis@informatik.hu-berlin.de>
9506
9507 * parse.y (named_complex_class_head_sans_basetype):
9508 Do not push a scope for error_mark_node.
9509 (maybe_base_class_list): Likewise.
9510
9511 * decl.c (start_decl): Check for error_mark_node as a type.
9512 Detected by g++.brendan/array-refs.C.
9513 (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C.
9514 (maybe_build_cleanup_1): Likewise. Detected by
9515 g++.jason/incomplete1.C.
9516
9517 * tree.c (build_dummy_object): Use void_zero_node instead of the
9518 error_mark_node.
9519 (is_dummy_object): Check for such a node.
9520 Detected by g++.bob/inherit1.C
9521
9522 1999-03-16 Jason Merrill <jason@yorick.cygnus.com>
9523
9524 * method.c (old_backref_index): Split out...
9525 (flush_repeats): From here. Rename back from try_old_backref.
9526 (build_mangled_name): Put back some old-style repeat handling.
9527
9528 Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9529
9530 * lex.c: Don't include setjmp.h.
9531 (parse_float): New static function.
9532 (pf_args): New struct.
9533 (real_yylex): Use them in call to `do_float_handler'.
9534
9535 1999-03-15 Mark Mitchell <mark@markmitchell.com>
9536
9537 * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
9538 * tree.c (layout_basetypes): Not here.
9539 * search.c (dfs_search): Remove; no longer used.
9540
9541 1999-03-12 Mark Mitchell <mark@markmitchell.com>
9542
9543 * decl2.c (validate_nonmember_using_decl): Issue sensible
9544 error-messages on bogus qualifiers.
9545
9546 1999-03-14 Jason Merrill <jason@yorick.cygnus.com>
9547
9548 * call.c (add_function_candidate): Fix uninitialized variable.
9549
9550 * Makefile.in (search.o): Add dependency on varray.h.
9551
9552 1999-03-13 Jason Merrill <jason@yorick.cygnus.com>
9553
9554 * decl.c (duplicate_decls): Use same_type_p.
9555 * method.c (try_old_backref): Renamed from flush_repeats. Use
9556 same_type_p. Don't try to handle repeats. Return success.
9557 (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support
9558 calls from old-style code, too.
9559 (check_ktype): Use same_type_p.
9560 (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT.
9561 (build_qualified_name): Simplify logic.
9562 (process_overload_item): Strip typedefs and quals at the top.
9563 (build_mangled_name_for_type_with_Gcode): Remove call to
9564 type_canonical_variant.
9565 (build_mangled_name): Likewise. Remove support for old-style
9566 repeats, which have been disabled since 2.7.2. Don't mess with
9567 TREE_USED.
9568 (build_decl_overload_real): Don't mess with TREE_USED.
9569
9570 1999-03-13 Nathan Sidwell <nathan@acm.org>
9571
9572 * error.c (cp_printers): Add 'F' escape character.
9573 (dump_type_real): Remove TREE_LIST (fnargs) printing.
9574 Functionality moved to dump_parameters.
9575 (dump_type_suffix): Use dump_parameters and dump_exception_spec.
9576 (dump_function_decl): Extend meaning of V parameter. Use
9577 dump_parameters and dump_exception_spec.
9578 (dump_parameters): New static function.
9579 (dump_exception_spec): New static function.
9580 (fndecl_as_string): Change argument semantics. Use
9581 dump_function_decl directly.
9582
9583 * sig.c (build_signature_table_constructor): Use cp_error.
9584
9585 1999-03-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
9586
9587 * semantics.c (finish_switch_cond): Handle error cases gracefully.
9588 Detected by g++.law/enum5.C.
9589
9590 * typeck.c (build_modify_expr): Check for errors after resolving
9591 offsets. Detected by g++.brendan/static1.C.
9592
9593 * decl.c (complete_array_type): Ignore initial_value if it is an
9594 error. Detected by g++.benjamin/17930.C.
9595
9596 * typeck2.c (process_init_constructor): Return error if one argument
9597 is in error. Detected by g++.benjamin/13478.C.
9598
9599 1999-03-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
9600
9601 * decl.c (select_decl): Allow class templates when we need types.
9602 * decl2.c (ambiguous_decl): Likewise.
9603
9604 1999-03-12 Mark Mitchell <mark@markmitchell.com>
9605
9606 * lex.c (do_identifier): Correct call to enforce_access.
9607 * search.c (accessible_p): Tweak comment.
9608
9609 1999-03-10 Mark Mitchell <mark@markmitchell.com>
9610
9611 * semantics.c (begin_class_definition): Call build_self_reference.
9612 (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
9613
9614 * search.c (assert_canonical_unmarked): Fix typo in prototype.
9615
9616 * search.c (dfs_canonical_queue): New function.
9617 (dfs_assert_unmarked_p): Likewise.
9618 (assert_canonical_unmarked): Likewise.
9619 (access_in_type): Use it.
9620 (accessible_p): Likewise. Walk the whole tree when umarking.
9621
9622 * sig.c (build_signature_table_constructor): Use accessible_p
9623 instead of compute_access.
9624
9625 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
9626
9627 * call.c (add_builtin_candidates): Handle overloaded conversion ops.
9628
9629 1999-03-09 Mark Mitchell <mark@markmitchell.com>
9630
9631 * cp-tree.h (flag_access_control): Declare.
9632 (TREE_VIA_PPUBLIC): Document.
9633 (DECL_NONSTATIC_MEMBER_P): New macro.
9634 (enforce_access): Return an indication of whether or not access
9635 was permitted.
9636 (build_self_reference): Change prototype.
9637 (compute_access): Replace with ...
9638 (accessible_p): New function.
9639 (dfs_walk): Change prototype.
9640 (dfs_unmark): Likewise.
9641 (markedp): Likewise.
9642 * call.c (enforce_access): Use accessible_p.
9643 * class.c (build_self_reference): Insert the declaration into the
9644 list of members for this type, and make it public.
9645 * decl.c (xref_basetypes): Avoid ill-timed recursion.
9646 * init.c (build_offset_ref): Use lookup_member, not three separate
9647 name-lookups. Call enforce_access rather than checking for
9648 illegal accesses here.
9649 (resolve_offset_ref): Likewise.
9650 * lex.c (do_identifier): Likewise.
9651 * method.c (hack_identifier): Likewise.
9652 * parse.y (self_reference): Remove.
9653 (opt_component_decl_list): Don't use it.
9654 * parse.c: Regenerated.
9655 * pt.c (print_candidates): Generalize to handle lists of
9656 overloaded functions.
9657 (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
9658 not set.
9659 (get_template_base): Use new calling convention for dfs_walk.
9660 * search.c: Include varray.h. Add prototypes.
9661 (dfs_walk): Accept a data pointer to pass to the work functions.
9662 All callers changed. All work functions changed.
9663 (breadth_first_search): Rename to bfs_walk, and make consistent
9664 with dfs_walk.
9665 (dfs_walk_real): New function.
9666 (canonical_binfo): New function.
9667 (context_for_name_lookup): Likewise.
9668 (shared_marked_p): Likewise.
9669 (shared_unmarked_p): Likewise.
9670 (lokup_field_queue_p): Likewise.
9671 (lookup_field_r): Generalize to handle both functions and fields.
9672 (lookup_field): Just call lookup_member.
9673 (lookup_fnfields): Likewise.
9674 (lookup_member): Move body of lookup_field here and generalize.
9675 (dfs_accessible_queue_p): Likewise.
9676 (dfs_accessible_p): Likewise.
9677 (dfs_access_in_type): Likewise.
9678 (access_in_type): Likewise.
9679 (compute_access): Remove, and replace with ...
9680 (accessible_p): New function.
9681 (vbase_types): Remove.
9682 (vbase_decl_ptr_intermediate): Likewise.
9683 (vbase_decl_ptr): Likewise.
9684 (vbase_init_result): Likewise.
9685 (closed_envelopes): Likewise.
9686 (bvtable): Likewise.
9687
9688 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
9689
9690 * call.c (add_function_candidate): Check for proper number of args
9691 before checking the validity of those args.
9692
9693 1999-03-06 Jason Merrill <jason@yorick.cygnus.com>
9694
9695 * cp-tree.h (struct lang_type): Add anon_union field.
9696 (ANON_UNION_TYPE_P): Use it instead of examining type.
9697 (SET_ANON_UNION_TYPE_P): New macro.
9698 * decl.c (check_tag_decl): Use it.
9699
9700 * search.c (compute_access): Handle non-type contexts earlier, and
9701 handle NULL_TREE.
9702
9703 * tree.c (build_exception_variant): Use copy_to_permanent.
9704
9705 * decl2.c (setup_initp): Give statics with no priority the default
9706 priority here.
9707 (do_dtors, do_ctors, finish_file): Remove special handling of
9708 non-prioritized statics.
9709
9710 1999-03-05 Mark Mitchell <mark@markmitchell.com>
9711
9712 * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
9713 * decl.c (make_typename_type): Don't issue an error if an
9714 immediate lookup fails; it migt be resolved later.
9715 * friend.c (is_friend): Add comment.
9716 * search.c (breadth_first_search): Add POSTFN and DATA
9717 parameters. Tidy. All callers changed.
9718 (lookup_field_queue_p): New function.
9719 (lookup_field_r): Likewise.
9720 (lookup_field_post): Likewise.
9721 (lookup_field): Use them, via breadth_first_search, instead of
9722 duplicating logic.
9723 (compute_access): Robustify.
9724 (lookup_fnfield_info): New structure.
9725
9726 1999-03-05 Jason Merrill <jason@yorick.cygnus.com>
9727
9728 * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
9729
9730 1999-03-03 Jason Merrill <jason@yorick.cygnus.com>
9731
9732 * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
9733 cc happy.
9734
9735 * decl2.c (import_export_class): Also return if
9736 CLASSTYPE_INTERFACE_ONLY is set.
9737
9738 1999-03-03 Martin von Löwis <loewis@informatik.hu-berlin.de>
9739
9740 * decl.c (push_overloaded_decl): Only overwrite the old binding if
9741 there was one.
9742 * decl2.c (do_local_using_decl): Fix loop termination.
9743
9744 1999-03-02 Mark Mitchell <mark@markmitchell.com>
9745
9746 * cp-tree.h (determine_specialization): Don't declare.
9747 * pt.c (determine_specialization): Make it static. Eliminate
9748 complain parameter. Note that decl is always non-NULL now, and
9749 simplify accordingly.
9750
9751 * decl.c (maybe_push_to_top_level): Always call
9752 push_cp_function_context.
9753 (pop_from_top_level): Always call pop_cp_function_context.
9754
9755 1999-02-26 Nathan Sidwell <nathan@acm.org>
9756
9757 * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
9758 diagnostics.
9759 * cp-tree.h (complete_type_or_else): Added VALUE parameter.
9760 * init.c (build_new_1): Extra arg to complete_type_or_else.
9761 (build_delete): Likewise.
9762 * typeck.c (require_complete_type): Likewise.
9763 (pointer_int_sum): Likewise.
9764 (pointer_diff): Likewise.
9765 (build_component_ref): Likewise.
9766
9767 * typeck2.c (incomplete_type_error): Always use cp_error.
9768 Show declaration of undefined type, if appropriate.
9769 Deal with UNKNOWN_TYPE nodes.
9770
9771 * typeck.c (require_complete_type): Use TYPE_SIZE as
9772 size_zero_node to mean incomplete type.
9773 (require_complete_type_in_void): New function.
9774 (build_compound_expr): Call complete_type_in_void for LHS.
9775 (build_c_cast): Call complete_type_in_void for void cast.
9776 * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
9777 * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
9778 require_complete_type_in_void. Call it.
9779 * cp-tree.h (require_complete_type_in_void): Prototype new function.
9780
9781 * typeck.c (convert_arguments): Use alternative format for
9782 function decls. Don't require_complete_type here. Simplify
9783 diagnostic printing.
9784 (convert_for_initialization): Don't require_complete_type on RHS yet.
9785 * call.c (convert_arg_to_ellipsis): Call require_complete_type.
9786
9787 * call.c (build_over_call): Cope with qualified void return type.
9788 * semantics.c (finish_call_expr): Likewise.
9789 * typeck.c (build_function_call_real): Likewise.
9790 (c_expand_return): Likewise.
9791 * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
9792
9793 * call.c (print_z_candidates): Use alternate print format, to be
9794 consistent with (pt.c) print_candidates.
9795 * method.c (hack_identifier): List candidate members.
9796 * search.c (lookup_field): Build ambiguous list, and show it, if
9797 ambiguous.
9798
9799 1999-02-26 Mark Mitchell <mark@markmitchell.com>
9800
9801 * typeck.c (decay_conversion): Don't confuse constant array
9802 variables with their initializers.
9803
9804 * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
9805 merging decls.
9806 * pt.c (regenerate_decl_from_template): Tweak for clarity.
9807 (instantiate_decl): Mark a decl instantiated before regenerating
9808 it to avoid recursion.
9809 * tree.c (mapcar): Don't call decl_constant_value unless we know
9810 something is TREE_READONLY_DECL_P.
9811
9812 * class.c (check_for_override): Don't stop checking when we find
9813 the first overridden function. Delete #if 0'd code.
9814 * search.c (get_matching_virtual): Likewise.
9815
9816 1999-02-25 Richard Henderson <rth@cygnus.com>
9817
9818 * lang-specs.h: Define __FAST_MATH__ when appropriate.
9819
9820 1999-02-24 Mike Stump <mrs@wrs.com>
9821
9822 * typeck.c (convert_for_assignment): Allow boolean integral constant
9823 expressions to convert to null pointer.
9824
9825 1999-02-24 Martin von Loewis <loewis@informatik.hu-berlin.de>
9826
9827 * decl.c (lookup_namespace_name): Resolve namespace aliases.
9828
9829 * class.c (push_nested_class): Allow namespaces.
9830
9831 * decl2.c (set_decl_namespace): Add friendp parameter.
9832 * decl.c (grokfndecl): Pass it.
9833 (grokvardecl): Likewise.
9834 * cp-tree.h: Change declaration.
9835
9836 1999-02-24 Jason Merrill <jason@yorick.cygnus.com>
9837
9838 * pt.c (tsubst): Allow an array of explicit size zero.
9839
9840 1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
9841
9842 * errfn.c: Change varargs code to look like toplev.c.
9843
9844 * method.c (process_modifiers): Don't prepend 'U' for char or
9845 wchar_t.
9846
9847 1999-02-20 Craig Burley <craig@jcb-sc.com>
9848
9849 * Make-lang.in (cplib2.ready): Don't consider updating
9850 cplib2 stuff if the current directory isn't writable, as
9851 it won't work (such as during a `make install').
9852
9853 Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
9854
9855 * decl2.c (start_objects): Make file scope constructors and
9856 destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
9857 ASM_OUTPUT_DESTRUCTOR are defined.
9858
9859 1999-02-19 Mark Mitchell <mark@markmitchell.com>
9860
9861 * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
9862 (fn_type_unification): Adjust prototype.
9863 (lookup_fnfields_1): Declare.
9864 * call.c (add_template_candidate_real): Adjust call to
9865 fn_type_unification.
9866 * class.c (add_method): Don't allow duplicate declarations of
9867 constructors or destructors.
9868 (resolve_address_of_overloaded_function): Remove unused variable.
9869 Adjust call to fn_type_unification.
9870 * decl.c (grokfndecl): Be more robust in the face of illegal
9871 specializations.
9872 * decl2.c (check_classfn): Remove hokey handling of member
9873 templates.
9874 * pt.c (determine_specialization): Improve comments. Adjust to
9875 handle template argument deduction as per the standard.
9876 (check_explicit_specialization): Fix comment spacing. Handle
9877 type-conversion operators correctly. Improve error-recovery.
9878 (fn_type_unification): Remove EXTRA_FN_ARG parameter.
9879 (get_bindings_real): Simplify handling of static members.
9880 * search.c (lookup_fnfields_1): Make it have external linkage.
9881 * typeck.c (compparms): Fix comment.
9882 (build_unary_op): Don't try to figure out which template
9883 specialization is being referred to when when the address-of
9884 operator is used with a template function.
9885
9886 Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9887
9888 * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
9889 keyword to match an analogous change at the top level.
9890
9891 * tree.c (lvalue_or_else): Likewise.
9892
9893 1999-02-17 Mark Mitchell <mark@markmitchell.com>
9894
9895 * decl.c (xref_basetypes): Comment.
9896 * pt.c (instantiate_class_template): Use xref_basetypes.
9897
9898 1999-02-16 Mark Mitchell <mark@markmitchell.com>
9899
9900 * cp-tree.h (tsubst): Change prototype.
9901 (tsubst_expr): Likewise.
9902 (tsubst_copy): Likewise.
9903 (type_unification): Remove prototype.
9904 * call.c (convert_default_arg): Adjust call to tsubst_expr.
9905 * class.c (resolve_address_of_overloaded_function): Just use
9906 fn_type_unification.
9907 * decl.c (grokdeclarator): Adjust call to tsubst.
9908 * method.c (build_template_parm_names): Likewise.
9909 * pt.c (GTB_VIA_VIRTUAL): New macro.
9910 (GTB_IGNORE_TYPE): Likewise.
9911 (resolve_overloaded_unification): Add `complain' parameter.
9912 (try_one_overload): Likewise.
9913 (tsubst_template_arg_vector): Likewise.
9914 (tsubst_template_parms): Likewise.
9915 (tsubst_aggr_type): Likewise.
9916 (tsubst_arg_types): Likewise.
9917 (tsubst_call_declarator_parms): Likewise.
9918 (unify): Remove explicit_mask.
9919 (type_unification_real): Likewise.
9920 (get_template_base_recursive): Likewise.
9921 (coerce_template_template_parms): Provide prototype.
9922 (tsubst_function_type): Likewise.
9923 (try_class_unification): New function.
9924 All callers changed to use new complain parameter.
9925 (get_template_base): Use try_class_unification.
9926 (unify): Adjust handling of classes derived from template types.
9927 (fn_type_unification): Substitute explicit arguments before
9928 unification.
9929
9930 1999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
9931
9932 * decl.c (pushdecl): Remove dead code.
9933
9934 1999-02-16 Jason Merrill <jason@yorick.cygnus.com>
9935
9936 * decl2.c (finish_objects): Fix code I missed in previous change.
9937
9938 1999-02-13 Jason Merrill <jason@yorick.cygnus.com>
9939
9940 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
9941 (grokdeclarator): Don't expect error_mark_node from grokfndecl.
9942
9943 * pt.c (maybe_process_partial_specialization): Complain about
9944 'template <>' on non-specialization.
9945
9946 1999-02-10 Jason Merrill <jason@yorick.cygnus.com>
9947
9948 * decl.c (grokdeclarator): Catch wierd declarators.
9949 * decl2.c (finish_file): Don't abort because of namespace parsing
9950 failure.
9951 (check_decl_namespace): Remove.
9952
9953 1999-02-09 Mark Mitchell <mark@markmitchell.com>
9954
9955 * cp-tree.h (get_template_base): Don't declare.
9956 (dfs_walk): Declare.
9957 (dfs_unmark): Likewise.
9958 (markedp): Likewise.
9959 * pt.c (unify): Remove duplicate declaration. Pass tparms and
9960 targs to get_template_base.
9961 (get_template_base_recursive): Move here from search.c. Check to
9962 see that the base found can be instantiated to form the desired
9963 type.
9964 (get_template_base): Likewise.
9965 (get_class_bindings): Simplify.
9966 * search.c (get_template_base_recursive): Move to pt.c.
9967 (get_template_base): Likewise.
9968 (markedp): Make it global.
9969 (dfs_walk): Likewise.
9970 (dfs_unmark): Likewise.
9971
9972 1999-02-07 Jason Merrill <jason@yorick.cygnus.com>
9973
9974 * pt.c (maybe_process_partial_specialization): Complain about
9975 specialization in wrong namespace.
9976 * tree.c (decl_namespace_context): New fn.
9977
9978 1999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
9979
9980 * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
9981 * pt.c (coerce_template_template_parms): Handle nested
9982 template template parameters.
9983
9984 Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com)
9985
9986 * typeck2.c: Update email addresses.
9987
9988 1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
9989
9990 * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
9991 turned off.
9992
9993 1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
9994
9995 * lex.c (retrofit_lang_decl): Split out...
9996 (build_lang_decl): From here.
9997 * decl.c (pushdecl): Call it for functions generated by the middle
9998 end that don't have DECL_LANG_SPECIFIC.
9999 * cp-tree.h: Declare it.
10000
10001 * decl2.c: Remove flag_init_priority. Always enable initp stuff.
10002 (start_objects, finish_objects): Only use special
10003 init_priority code if the user specified a priority.
10004 (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
10005 objects.
10006
10007 Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
10008
10009 * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
10010 mkstemp.o. Get them from libiberty now.
10011 (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
10012
10013 Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10014
10015 * decl2.c (lang_decode_option): Use read_integral_parameter.
10016
10017 1999-02-01 Mark Mitchell <mark@markmitchell.com>
10018
10019 * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
10020 before calling complete_type_or_else.
10021
10022 Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10023
10024 * input.c (inline): Don't define, its handled by system.h.
10025
10026 Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
10027
10028 * decl2.c: Don't define flag_no_ident here. Don't process
10029 -f(no-)ident here.
10030 * cp-tree.h: Don't declare flag_no_ident here.
10031 * lang-specs.h: Map -Qn to -fno-ident.
10032
10033 1999-01-28 Jason Merrill <jason@yorick.cygnus.com>
10034
10035 * cp-tree.h (struct tree_binding): Replace scope field with a union.
10036 (BINDING_SCOPE): Adjust.
10037 * decl.c (BINDING_LEVEL): Adjust.
10038
10039 1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
10040
10041 * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
10042 member constants.
10043
10044 * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
10045 a ctor initializer.
10046
10047 * tree.c (equal_functions): Fix name in prototype.
10048
10049 * decl.c (push_local_binding): Add FLAGS argument.
10050 (pushdecl, push_overloaded_decl): Pass it.
10051 * decl2.c (do_local_using_decl): Likewise.
10052 * cp-tree.h: Adjust prototype.
10053 * decl.c (poplevel): Fix logic.
10054
10055 * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
10056 (poplevel): Handle that. Fix logic for removing TREE_LISTs.
10057 (cat_namespace_levels): Don't loop forever.
10058
10059 1999-01-25 Richard Henderson <rth@cygnus.com>
10060
10061 * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
10062
10063 1999-01-25 Jason Merrill <jason@yorick.cygnus.com>
10064
10065 * class.c (resolve_address_of_overloaded_function): Mark the
10066 chosen function used.
10067
10068 * call.c (build_call): Make sure that a function coming in has
10069 been marked used already.
10070 * decl.c (expand_static_init): Call mark_used instead of
10071 assemble_external.
10072 * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
10073 alloc_eh_object, expand_throw): Likewise.
10074 * init.c (build_builtin_delete_call): Likewise.
10075 * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
10076 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
10077 expand_generic_desc): Likewise.
10078
10079 1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
10080
10081 * tree.c (equal_functions): New function.
10082 (ovl_member): Call it.
10083
10084 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
10085
10086 * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
10087
10088 1999-01-25 Martin von Loewis <loewis@informatik.hu-berlin.de>
10089
10090 * decl.c (decls_match): Return 1 if old and new are identical.
10091 (push_overloaded_decl): Set OVL_USED when PUSH_USING.
10092
10093 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
10094
10095 * decl.c (start_function): Make member functions one_only on windows.
10096 * decl2.c (import_export_decl): Likewise.
10097
10098 * decl.c (grokdeclarator): Don't complain about implicit int in
10099 a system header. Change same-name field check to not complain in
10100 a system header instead of within extern "C".
10101
10102 1999-01-21 Mark Mitchell <mark@markmitchell.com>
10103
10104 * cp-tree.h (PUSH_GLOBAL): New macro.
10105 (PUSH_LOCAL): Likewise.
10106 (PUSH_USING): Likewise.
10107 (namespace_bindings_p): Declare.
10108 (push_overloaded_decl): Likewise.
10109 * decl.c (push_overloaded_decl): Don't make it static. Check for
10110 illegal declarations after using declarations here.
10111 (namespace_bindings_p): Likewise.
10112 (duplicate_decls): Don't consider declarations from different
10113 namespaces to be the same.
10114 (pushdecl): Use symbolic PUSH_ constants in calls to
10115 push_overloaded_decl.
10116 (push_overloaded_decl_1): Likewise.
10117 * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
10118 (do_nonmember_using_decl): Check for illegal using declarations
10119 after ordinary declarations here.
10120 (do_local_using_decl): Call pushdecl to insert declarations.
10121
10122 1999-01-21 Jason Merrill <jason@yorick.cygnus.com>
10123
10124 * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
10125
10126 1999-01-21 Mark Mitchell <mark@markmitchell.com>
10127
10128 * tree.c (build_cplus_array_type_1): Don't call build_array_type
10129 for types involving template parameters.
10130
10131 * cp-tree.h (PARM_DECL_EXPR): Delete.
10132 (convert_default_arg): Change prototype.
10133 (check_default_argument): Declare.
10134 (search_tree): Likewise.
10135 * call.c (convert_default_arg): Take the function to which the
10136 default argument belongs as a parameter, and do any necessary
10137 instantiation here, instead of ...
10138 (build_over_call): Here.
10139 * decl.c (local_variable_p): New function.
10140 (check_default_argument): Likewise, split out and tidied from ...
10141 (grokparms): Here.
10142 * error.c (dump_expr): Don't set PARM_DECL_EXPR.
10143 * pt.c (tsubst_call_declarator_parms): New function.
10144 (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing
10145 with CALL_EXPRs, rather than trying to be clever.
10146 (tsubst): Use tsubst_call_declarator_parms.
10147 * tree.c (search_tree): Don't make it static.
10148 * typeck.c (convert_arguments): Use new interface to
10149 convert_default_arg.
10150
10151 1999-01-20 Mark Mitchell <mark@markmitchell.com>
10152
10153 * error.c (dump_function_decl): Don't print the argument types for
10154 a function when the verbosity level is negative.
10155
10156 * call.c (build_over_call): Check format attributes at call-time.
10157
10158 * pt.c (tsubst_copy): Fix comment.
10159 (unify): Don't allow unification with variable-sized arrays.
10160
10161 * semantics.c (finish_stmt_expr): When processing a template make
10162 the BIND_EXPR long-lived.
10163
10164 1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
10165
10166 * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
10167 (import_export_vtable): Not here.
10168
10169 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
10170
10171 * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
10172 non-static member function.
10173
10174 1999-01-18 Nathan Sidwell <nathan@acm.org>
10175
10176 * class.c (instantiate_type): Only diagnose illegal address of member
10177 function if complaining.
10178
10179 * decl.c (lookup_name_real): Remove duplicate code.
10180
10181 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
10182
10183 * tree.c (copy_template_template_parm): Use permanent_obstack.
10184
10185 1999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
10186
10187 * pt.c (unify): Remove restrictions on deduction of argument
10188 of template template parameters.
10189
10190 1999-01-18 Nathan Sidwell <nathan@acm.org>
10191
10192 * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
10193
10194 * class.c (resolve_address_of_overloaded_function): Show list of
10195 all candidates, when none of them match.
10196
10197 1999-01-18 Chip Salzenberg <chip@perlsupport.com>
10198
10199 * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
10200 definition of 'casting away const' in reinterpret_cast<>.
10201
10202 1999-01-18 Graham <grahams@rcp.co.uk>
10203
10204 * cvt.c: Add include for decl.h, remove extern for
10205 static_aggregates which is now provided by decl.h.
10206
10207 * Makefile.in (cvt.o): Add dependency for decl.h and missing
10208 dependencies for convert.h and flags.h.
10209
10210 1999-01-18 Nathan Sidwell <nathan@acm.org>
10211
10212 * decl2.c (do_dtors): Set current location to that of the
10213 decl, for sensible diagnostics and debugging.
10214 (check_classfn): Issue `incomplete type' error, if
10215 class is not defined.
10216
10217 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
10218
10219 * cp-tree.h: Add prototype for bound_pmf_p.
10220
10221 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
10222 Manfred Hollstein <manfred@s-direktnet.de>
10223
10224 * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
10225 -Wreturn-type.
10226
10227 1999-01-16 Nathan Sidwell <nathan@acm.org>
10228
10229 * cp-tree.h (struct lang_type): Added has_mutable flag.
10230 (CLASSTYPE_HAS_MUTABLE): New macro to access it.
10231 (TYPE_HAS_MUTABLE_P): New macro to read it.
10232 (cp_has_mutable_p): Prototype for new function.
10233 * class.c (finish_struct_1): Set has_mutable from members.
10234 * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
10235 it contains a mutable.
10236 * typeck.c (cp_has_mutable_p): New function.
10237
10238 1999-01-15 Mark Mitchell <mark@markmitchell.com>
10239
10240 * pt.c (process_template_parm): Ignore top-level qualifiers on
10241 non-type parameters.
10242
10243 * decl.c (start_function): Use current_function_parms in the call
10244 to require_complete_type_for_parms, not the probably empty
10245 DECL_ARGUMENTS.
10246
10247 1999-01-14 Jason Merrill <jason@yorick.cygnus.com>
10248
10249 * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
10250
10251 * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
10252 that we don't suppress the other copies.
10253 * lex.c (handle_cp_pragma): Likewise.
10254
10255 1999-01-13 Mark Mitchell <mark@markmitchell.com>
10256
10257 * decl.c (grokdeclarator): Undo 1998-12-14 change.
10258 * tree.c (build_cplus_array_type_1): Likewise.
10259 * pt.c (instantiate_class_template): Remove misleading comment.
10260 (tsubst_aggr_type): Substitute if there are template parameters,
10261 regardless of whether or not they use template arguments.
10262 (unify): Likewise, but for unification.
10263
10264 1999-01-12 Richard Henderson <rth@cygnus.com>
10265
10266 * cp-tree.h (flag_permissive): Declare extern.
10267
10268 1999-01-06 Mark Mitchell <mark@markmitchell.com>
10269
10270 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
10271 here.
10272 (lang_type): Add is_partial_instantiation. Decrease width of
10273 dummy.
10274 (PARTIAL_INSTANTIATION_P): New macro.
10275 (OPERATOR_TYPENAME_P): Remove.
10276 * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
10277 OPERATOR_TYPENAME_P.
10278 (grok_op_properties): Likewise.
10279 * friend.c (do_friend): Handle friends that are member functions
10280 correctly.
10281 * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
10282 * pt.c (instantiate_class_template): Rework for clarity. Avoid
10283 leaving TYPE_BEING_DEFINED set in obscure cases. Don't do
10284 any more partial instantiation than is absolutely necessary for
10285 implicit typename. Set PARTIAL_INSTANTIATION_P.
10286 (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
10287 * semantics.c (begin_class_definition): Handle partial
10288 specializations of a type that was previously partially
10289 instantiated.
10290
10291 Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
10292
10293 * g++spec.c (LIBSTDCXX): Provide default definition.
10294 (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
10295
10296 Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10297
10298 * Make-lang.in (g++.o): Depend on prefix.h.
10299
10300 1999-01-04 Jason Merrill <jason@yorick.cygnus.com>
10301
10302 * tree.c (bound_pmf_p): New fn.
10303 * typeck.c (build_c_cast): Use it.
10304
10305 * decl.c (grok_op_properties): Use same_type_p.
10306
10307 Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10308
10309 * Makefile.in (cvt.o): Depend on toplev.h.
10310
10311 * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
10312
10313 * cvt.c: Include toplev.h.
10314
10315 * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
10316 definitions.
10317
10318 * init.c (expand_vec_init): Initialize variable `itype'.
10319
10320 * lex.c (yyerror): Cast the argument passed to a ctype function to
10321 an unsigned char.
10322
10323 * method.c (build_mangled_C9x_name): Wrap prototype and definition
10324 in "HOST_BITS_PER_WIDE_INT >= 64".
10325
10326 * typeck.c (build_binary_op): Mark parameter `convert_p' with
10327 ATTRIBUTE_UNUSED.
10328
10329 1998-12-22 Mark Mitchell <mark@markmitchell.com>
10330
10331 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
10332 * tree.c (build_exception_variant): Don't crash on empty throw
10333 specs.
10334
10335 1998-12-18 DJ Delorie <dj@cygnus.com>
10336
10337 * cvt.c (convert_to_reference): Check for both error_mark_node
10338 and NULL_NODE after call to convert_for_initialization.
10339
10340 1998-12-17 Jason Merrill <jason@yorick.cygnus.com>
10341
10342 * error.c (interesting_scope_p): New fn.
10343 (dump_simple_decl): Use it.
10344 (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
10345 (dump_expr, case OFFSET_REF): Print ->* if appropriate.
10346
10347 1998-12-16 Mark Mitchell <mark@markmitchell.com>
10348
10349 * class.c (resolve_address_of_overloaded_function): Do conversion
10350 to correct type here, rather than ...
10351 (instantiate_type): Here.
10352
10353 * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
10354 (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
10355 (decl_template_parm_p): Remove.
10356 * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
10357 parameter.
10358 * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
10359 * pt.c (push_inline_template_parms_recursive): Set it.
10360 (decl_template_parm_p): Remove.
10361 (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
10362 (process_template_parm): Set it.
10363
10364 Wed Dec 16 16:33:58 1998 Dave Brolley <brolley@cygnus.com>
10365
10366 * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
10367 if configured with cpplib.
10368
10369 1998-12-15 Mark Mitchell <mark@markmitchell.com>
10370
10371 * decl.c (poplevel): Make sure ns_binding is initialized.
10372
10373 * decl.c (finish_function): Undo inadvertent change in previous
10374 patch.
10375
10376 1998-12-14 Mark Mitchell <mark@markmitchell.com>
10377
10378 * class.c (pushclass): Tweak handling of class-level bindings.
10379 (resolve_address_of_overloaded_function): Update pointer-to-member
10380 handling.
10381 (instantiate_type): Likewise.
10382 * cvt.c (cp_convert_to_pointer): Likewise.
10383 * decl.c (pop_binding): Take the DECL to pop, not just the name.
10384 Deal with `struct stat' hack.
10385 (binding_level): Add to documentation.
10386 (push_binding): Clear BINDING_TYPE.
10387 (add_binding): New function.
10388 (push_local_binding): Use it.
10389 (push_class_binding): Likewise.
10390 (poplevel): Adjust calls to pop_binding.
10391 (poplevel_class): Likewise.
10392 (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
10393 declarations to current binding level.
10394 (push_class_level_binding): Likewise.
10395 (push_overloaded_decl): Adjust handling of OVERLOADs in local
10396 bindings.
10397 (lookup_namespace_name): Don't crash when confronted with a
10398 TEMPLATE_DECL.
10399 (lookup_name_real): Do `struct stat' hack in local binding
10400 contexts.
10401 (build_ptrmemfunc_type): Adjust documentation.
10402 (grokdeclarator): Don't avoid building real array types when
10403 processing templates unless really necessary.
10404 (finish_method): Adjust calls to pop_binding.
10405 * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
10406 not reparse_decl_as_expr.
10407 (build_expr_from_tree): Deal with a template-id as the function to
10408 call in a METHOD_CALL_EXPR.
10409 * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
10410 (maybe_adjust_types_For_deduction): Don't do peculiar things with
10411 METHOD_TYPEs here.
10412 (resolve_overloaded_unification): Handle COMPONENT_REFs. Build
10413 pointer-to-member types where necessary.
10414 * tree.c (build_cplus_array_type_1): Don't avoid building real
10415 array types when processing templates unless really necessary.
10416 (build_exception_variant): Compare the exception lists correctly.
10417
10418 1998-12-13 Mark Mitchell <mark@markmitchell.com>
10419
10420 * cp-tree.def (CPLUS_BINDING): Update documentation.
10421 * cp-tree.h (LOCAL_BINDING_P): New macro.
10422 (lang_identifier): Rename local_value to bindings.
10423 (tree_binding): Make `scope' of type `void*', not `tree'.
10424 (BINDING_SCOPE): Update documentation.
10425 (IDENTIFIER_LOCAL_VALUE): Remove.
10426 (IDENTIFIER_CLASS_VALUE): Document.
10427 (IDENTIFIER_BINDING): New macro.
10428 (IDENTIFIER_VALUE): Likewise.
10429 (TIME_IDENTIFIER_TIME): Likewise.
10430 (TIME_IDENTIFIER_FILEINFO): Likewise.
10431 (IMPLICIT_TYPENAME_P): Likewise.
10432 (set_identifier_local_value): Remove.
10433 (push_local_binding): New function.
10434 (push_class_binding): Likewise.
10435 * class.c (pushclass): Update comments; use push_class_binding.
10436 * decl.c (set_identifier_local_value_with_scope): Remove.
10437 (set_identifier_local_value): Likewise.
10438 (push_binding): New function.
10439 (pop_binding): Likewise.
10440 (binding_level): Update documentation. Remove shadowed.
10441 (BINDING_LEVEL): New macro.
10442 (free_binding_nodes): New variable.
10443 (poplevel): Adjust for new name-lookup scheme. Don't mess up
10444 BLOCK_VARs when doing for-scope extension. Remove effectively
10445 dead code.
10446 (pushlevel_class): Tweak formatting.
10447 (poplevel_class): Adjust for new name-lookup scheme.
10448 (print_binding_level): Likewise.
10449 (store_bindings): Likewise.
10450 (pushdecl): Likewise.
10451 (pushdecl_class_level): Likewise.
10452 (push_class_level_binding): Likewise.
10453 (push_overloaded_decl): Update comments. Adjust for new
10454 name-lookup scheme.
10455 (lookup_name_real): Likewise.
10456 (lookup_name_current_level): Likewise.
10457 (cp_finish_decl): Likewise.
10458 (require_complete_types_for_parms): Likewise. Remove misleading
10459 #if 0'd code.
10460 (grok_parms): Likewise. Don't call
10461 require_complete_types_for_parms here.
10462 (grok_ctor_properties): Don't treat templates as copy
10463 constructors.
10464 (grop_op_properties): Or as assignment operators.
10465 (start_function): Document. Adjust for new name-lookup scheme.
10466 (finish_function): Likewise.
10467 * decl2.c (do_local_using_decl): Use push_local_binding.
10468 * lex.c (begin_definition_of_inclass_inline): New function, split
10469 out from ...
10470 (do_pending_inlines): Here, and ...
10471 (process_next_inline): Here.
10472 (get_time_identifier): Use TIME_IDENTIFIER_* macros.
10473 (init_filename_times): Likewise.
10474 (extract_interface_info): Likewise.
10475 (ste_typedecl_interface_info): Likewise.
10476 (check_newline): Likewise.
10477 (dump_time_statistics): Likewise.
10478 (handle_cp_pragma): Likewise.
10479 (do_identifier): Adjust for new name-lookup scheme.
10480 * parse.y (function_try_block): Return ctor_initializer_opt value.
10481 (fndef): Use it.
10482 (fn.defpen): Pass appropriate values to start_function.
10483 (pending_inline): Use functor_try_block value, and pass
10484 appropriate values to finish_function.
10485 * pt.c (is_member_template): Update documentation; remove handling
10486 of FUNCTION_DECLs. As per name, this function should deal only in
10487 TEMPLATE_DECLs.
10488 (decl_template_parm_p): Change name of olddecl parameter to decl.
10489 (check_template_shadow): Adjust for new name-lookup scheme.
10490 (lookup_template_class): Likewise.
10491 (tsubst_decl): Tweak so as not to confuse member templates with
10492 copy constructors and assignment operators.
10493 (unify): Handle UNION_TYPEs.
10494 * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
10495 (lang_print_xnode): Adjust for new name-lookup scheme.
10496 * typeck.c (mark_addressable): Likewise.
10497 (c_expand_return): Likewise.
10498
10499 1998-12-08 Jason Merrill <jason@yorick.cygnus.com>
10500
10501 * decl.c (grokdeclarator): Allow field with same name as class
10502 in extern "C".
10503
10504 * decl.c (lookup_name_real): Don't limit field lookup to types.
10505 * class.c (check_member_decl_is_same_in_complete_scope): No error
10506 if icv and x are the same.
10507 * lex.c (do_identifier): Tweak error message.
10508
10509 1998-12-10 Mark Mitchell <mark@markmitchell.com>
10510
10511 * decl.c (start_enum): Use push_obstacks, not
10512 end_temporary_allocation.
10513 (finish_enum): Call pop_obstacks.
10514
10515 1998-12-10 Mark Mitchell <mark@markmitchell.com>
10516
10517 * class.c (instantiate_type): Return error_mark_node rather than
10518 junk.
10519
10520 1998-12-09 Mark Mitchell <mark@markmitchell.com>
10521
10522 * cp-tree.h (most_specialized_instantiation): New function.
10523 (print_candidates): Likewise.
10524 * class.c (validate_lhs): Remove.
10525 (resolve_address_of_overloaded_function): New function, split out
10526 and then substantially reworked, from ...
10527 (instantiate_type): Use it. Simplify.
10528 * cvt.c (convert_to_reference): Complain when caller has indicated
10529 that's the right thing to do. Don't crash if instantiate_type
10530 fails.
10531 * pt.c: Substitute `parameters' for `paramters' throughout.
10532 (print_candidates): Don't make it static.
10533 (most_specialized_instantiation): Split out from ...
10534 (most_specialized): Here.
10535
10536 Wed Dec 9 15:33:01 1998 Dave Brolley <brolley@cygnus.com>
10537
10538 * lex.c (lang_init_options): Initialize cpplib.
10539 * decl2.c (parse_options,cpp_initialized): Removed.
10540 (lang_decode_option): Move initialization of cpplib to
10541 lang_init_options.
10542
10543 1998-12-09 Mark Mitchell <mark@markmitchell.com>
10544
10545 * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
10546 well as the TYPE_DECL, when a typedef name is assigned to a
10547 previously anonymous type.
10548
10549 1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
10550
10551 * cp/except.c (call_eh_info): Use __start_cp_handler instead of
10552 __cp_eh_info for getting the eh info pointer. Add table_index to
10553 field list.
10554 (push_eh_cleanup): Don't increment 'handlers' data field.
10555 (process_start_catch_block): Don't set the 'caught' field.
10556
10557 * cp/exception.cc (CP_EH_INFO): New macro for getting the
10558 exception info pointer within library routines.
10559 (__cp_eh_info): Use CP_EH_INFO.
10560 (__start_cp_handler): Get exception info pointer, set caught field,
10561 and increment the handlers field. Avoids this being done by handlers.
10562 (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
10563 (uncaught_exception): Use CP_EH_INFO macro.
10564
10565 Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com)
10566
10567 * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
10568
10569 Mon Dec 7 17:56:06 1998 Mike Stump <mrs@wrs.com>
10570
10571 * lex.c (check_newline): Add support for \ as `natural'
10572 characters in file names in #line to be consistent with #include
10573 handling. We support escape processing in the # 1 "..." version of
10574 the command. See also support in cp/lex.c.
10575
10576 1998-12-07 Zack Weinberg <zack@rabi.phys.columbia.edu>
10577
10578 * cp/decl2.c: s/data/opts/ when initializing cpp_reader
10579 structure.
10580
10581 1998-12-07 Jason Merrill <jason@yorick.cygnus.com>
10582
10583 * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
10584
10585 * error.c (dump_simple_decl): Also print namespace context.
10586 (dump_function_decl): Likewise.
10587
10588 * decl2.c (ambiguous_decl): Don't print old value if it's
10589 error_mark_node.
10590
10591 * decl.c (lookup_name_real): Fix handling of local types shadowed
10592 by a non-type decl. Remove obsolete code.
10593 * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
10594
10595 * lang-options.h: Add -fpermissive.
10596 * decl2.c: Likewise.
10597 * cp-tree.h: Add flag_permissive.
10598 * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
10599 were specified, set flag_pedantic_errors.
10600 * call.c (build_over_call): Turn dropped qualifier messages
10601 back into pedwarns.
10602 * cvt.c (convert_to_reference): Likewise.
10603 * typeck.c (convert_for_assignment): Likewise.
10604
10605 1998-12-05 Jason Merrill <jason@yorick.cygnus.com>
10606
10607 * decl2.c (coerce_new_type): Use same_type_p.
10608 (coerce_delete_type): Likewise.
10609
10610 * call.c (check_dtor_name): Return 1, not error_mark_node.
10611
10612 1998-12-04 Jason Merrill <jason@yorick.cygnus.com>
10613
10614 * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
10615 if MULTIPLE_SYMBOL_SPACES.
10616
10617 * pt.c (check_template_shadow): New fn.
10618 * decl2.c (grokfield): Use it.
10619 * decl.c (pushdecl): Likewise.
10620 (pushdecl_class_level): Likewise.
10621 (start_method): Likewise.
10622 (xref_tag): Don't try to use 't' if we're defining.
10623
10624 * call.c (check_dtor_name): Just return an error_mark_node.
10625 * pt.c (lookup_template_class): Complain about using non-template here.
10626 * parse.y (apparent_template_type): Not here.
10627
10628 * pt.c (check_explicit_specialization): Complain about specialization
10629 with C linkage.
10630
10631 * lang-options.h: Add -f{no-,}implicit-inline-templates.
10632
10633 * pt.c (convert_nontype_argument): Don't assume that any integer
10634 argument is intended to be a constant-expression.
10635
10636 1998-12-03 Mark Mitchell <mark@markmitchell.com>
10637
10638 * class.c (handle_using_decl): Fix comment. Don't lookup
10639 constructors in base classes.
10640 (validate_lhs): Fix typo in comment.
10641 * search.c (lookup_field_1): Don't return a USING_DECL.
10642
10643 * cp-tree.h (DECL_ACCESS): Improve documentation.
10644
10645 * decl.c (expand_static_init): Don't set the initialization-done
10646 flag until the initialization is done.
10647
10648 1998-12-02 Mark Mitchell <mark@markmitchell.com>
10649
10650 * decl2.c (validate_nonmember_using_decl): Complain about using
10651 declarations for class members.
10652
10653 1998-11-29 Jason Merrill <jason@yorick.cygnus.com>
10654
10655 * typeck2.c (process_init_constructor): Use same_type_p.
10656
10657 * decl.c (check_tag_decl): Don't warn about null decl inside a
10658 class.
10659
10660 * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
10661 UNIFY_ALLOW_NONE.
10662 (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
10663 (resolve_overloaded_unification): Strip baselinks.
10664
10665 Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10666
10667 * g++spec.c: Don't prototype xmalloc.
10668
10669 1998-11-25 Jason Merrill <jason@yorick.cygnus.com>
10670
10671 * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
10672
10673 * decl.c (check_tag_decl): Do complain about null friend decl at
10674 file scope.
10675
10676 1998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
10677
10678 * lex.c (make_lang_type): Clear the whole struct lang_type, not
10679 only the first multiple of sizeof (int).
10680
10681 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
10682
10683 * decl.c (start_decl): An explicit specialization of a static data
10684 member is only a definition if it has an initializer.
10685
10686 * except.c (expand_throw): Use cp_finish_decl for the throw temp.
10687 * cvt.c (build_up_reference): Pass DIRECT_BIND down into
10688 cp_finish_decl.
10689 * init.c (expand_default_init): Check for DIRECT_BIND instead of
10690 DECL_ARTIFICIAL.
10691
10692 * call.c (build_over_call): Use build_decl.
10693
10694 * except.c (expand_throw): Just use convert, not
10695 build_reinterpret_cast.
10696
10697 * lex.c (handle_generic_pragma): Use token_buffer.
10698
10699 * decl.c (check_tag_decl): Don't complain about null friend decl.
10700
10701 1998-11-24 Dave Pitts <dpitts@cozx.com>
10702
10703 * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
10704 first position.
10705 * lex.c (check_newline): Use ISALPHA.
10706 (readescape): Use ISGRAPH.
10707 (yyerror): Use ISGRAPH.
10708
10709 1998-11-24 Nathan Sidwell <nathan@acm.org>
10710
10711 * search.c (get_abstract_virtuals): Do not use initial
10712 CLASSTYPE_ABSTRACT_VIRTUALS.
10713 * typeck2.c (abstract_virtuals_error): Show location of abstract
10714 declaration.
10715 * call.c (build_new_method_call): Use
10716 CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
10717 * class.c (finish_struct_bits): Don't bother working out whether
10718 get_abstract_virtuals will do anything, just do it.
10719
10720 1998-11-24 Graham <grahams@rcp.co.uk>
10721
10722 * typeck.c (build_component_ref): Remove unused statement.
10723
10724 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
10725
10726 * class.c (add_method): Catch invalid overloads.
10727
10728 * class.c (add_method): Build up OVERLOADs properly for conversion ops.
10729 * search.c (lookup_conversions): Handle getting real OVERLOADs.
10730 (add_conversions): Likewise. Revert last change.
10731 * call.c (add_conv_candidate): Pass totype to add_candidate instead
10732 of fn. Don't add a new candidate if the last one was for the same
10733 type.
10734 (print_z_candidates): Handle getting a type as a function.
10735 (joust): If we got two conversion candidates to the same type,
10736 just pick one.
10737 (build_object_call): Lose 'templates'.
10738 (build_user_type_conversion_1): Handle getting real OVERLOADs.
10739
10740 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
10741
10742 * typeck2.c (process_init_constructor): If there are elements
10743 that don't have initializers and they need to have constructors
10744 run, supply them with initializers.
10745
10746 * class.c (finish_struct_1): A class with a 0-width bitfield is
10747 still empty.
10748
10749 1998-11-23 Mark Mitchell <mark@markmitchell.com>
10750
10751 * pt.c (instantiate_class_template): Don't try to figure out what
10752 specialization to use for a partial instantiation. Correct
10753 typos in a couple of comments. Avoid calling uses_template_parms
10754 multiple times.
10755
10756 1998-11-23 Benjamin Kosnik <bkoz@cygnus.com>
10757
10758 * method.c (process_overload_item): Add call to
10759 build_mangled_C9x_name for intTI_type_nodes.
10760 (build_mangled_C9x_name): Add prototype, define.
10761 * decl.c (init_decl_processing): Add names for
10762 TImode_type_node.
10763
10764 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
10765
10766 * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
10767
10768 * class.c (finish_struct_1): Set things up for 0-width bitfields
10769 like we do for others.
10770
10771 * decl.c (check_tag_decl): New fn.
10772 (shadow_tag): Split out from here.
10773 * decl2.c (grok_x_components): Call it.
10774
10775 1998-11-22 Jason Merrill <jason@yorick.cygnus.com>
10776
10777 * decl.c: Lose warn_about_return_type.
10778 (grokdeclarator): Always complain about implicit int, except for
10779 `main () { ... }'.
10780
10781 * decl.c (tag_name): New fn.
10782 (xref_tag): Complain about using typedef-name after class-key.
10783
10784 * init.c (expand_vec_init): Also keep going if from_array.
10785
10786 * tree.c (is_overloaded_fn): Also handle the output of
10787 build_offset_ref.
10788
10789 * decl.c (grokdeclarator): Use constructor_name when comparing
10790 field name against enclosing class.
10791 * class.c (finish_struct_anon): Likewise.
10792
10793 1998-11-22 Mark Mitchell <mark@markmitchell.com>
10794
10795 * decl.c (poplevel): Remove code to handle KEEP == 2.
10796 (finish_function): Don't confuse BLOCK-order when
10797 processing a destructor.
10798
10799 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
10800
10801 * decl.c (require_complete_types_for_parms): Call layout_decl
10802 after we've completed the type.
10803
10804 1998-11-21 Martin von Löwis <loewis@informatik.hu-berlin.de>
10805
10806 * decl2.c (validate_nonmember_using_decl): Allow using templates
10807 from the global namespace.
10808
10809 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
10810
10811 Handle specifying template args to member function templates.
10812 * tree.c (build_overload): Always create an OVERLOAD for a template.
10813 * search.c (add_conversions): Handle finding an OVERLOAD.
10814 * decl2.c (check_classfn): Likewise.
10815 * lex.c (identifier_type): See through a baselink.
10816 * parse.y (do_id): Don't call do_identifier if we got a baselink.
10817 * class.c (instantiate_type, case TREE_LIST): Recurse.
10818
10819 * decl.c (grokdeclarator): Allow a boolean constant for array
10820 bounds, odd as that sounds.
10821
10822 * pt.c (unify): Be more strict about non-type parms, except for
10823 array bounds.
10824 (UNIFY_ALLOW_INTEGER): New macro.
10825
10826 1998-11-19 Manfred Hollstein <manfred@s-direktnet.de>
10827
10828 * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
10829
10830 1998-11-19 Jason Merrill <jason@yorick.cygnus.com>
10831
10832 * semantics.c (begin_class_definition): Call
10833 maybe_process_partial_specialization before push_template_decl.
10834 Don't call push_template_decl for a specialization.
10835 * search.c (lookup_field): Do return a member template class.
10836 * decl2.c (handle_class_head): Handle member template classes.
10837
10838 * decl.c (grokdeclarator): A parm type need not be complete.
10839
10840 * pt.c (convert_nontype_argument): Fix thinko.
10841
10842 1998-11-18 Mark Mitchell <mark@markmitchell.com>
10843
10844 * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
10845 (global_delete_fndecl): New variable.
10846 * decl.c (global_delete_fndecl): Define it.
10847 (init_decl_processing): Set it.
10848 * init.c (build_builtin_delete_call): Use it.
10849 * tree.c (mapcar): Recursively call mapcar for the type of EXPR
10850 nodes.
10851
10852 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
10853
10854 * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
10855 type.
10856
10857 * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
10858 * call.c (build_object_call): Also support references to functions.
10859 * typeck.c (convert_for_initialization): Don't decay a function
10860 if the target is a reference to function.
10861
10862 * search.c (add_conversions): Get all the overloads from a class.
10863
10864 * decl.c (grok_ctor_properties): Complain about any constructor
10865 that will take a single arg of the class type by value.
10866
10867 * typeck2.c (build_functional_cast): Can't create objects of
10868 abstract classes this way.
10869 * cvt.c (ocp_convert): Likewise.
10870
10871 * decl.c (grokfndecl): Member functions of local classes are not
10872 public.
10873
10874 1998-11-18 Mark Mitchell <mark@markmitchell.com>
10875
10876 * Make-lang.in (cc1plus): Add dependency on hash.o.
10877
10878 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
10879
10880 * search.c (get_abstract_virtuals): Complain about virtuals with
10881 no final overrider.
10882 * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
10883 with no final overrider.
10884 * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
10885 on virtuals with no final overrider.
10886
10887 * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
10888
10889 * class.c (finish_struct_1): Don't remove zero-width bit-fields until
10890 after layout_type.
10891
10892 * friend.c (do_friend): Don't set_mangled_name_for_decl.
10893
10894 * class.c (finish_struct_anon): Complain about non-fields.
10895 * decl2.c (build_anon_union_vars): Likewise.
10896
10897 * decl.c (grokdeclarator): Normal data members can't have the same
10898 name as the class, either.
10899 * class.c (finish_struct_anon): Neither can members of an
10900 anonymous union.
10901
10902 1998-11-17 Mark Mitchell <mark@markmitchell.com>
10903
10904 * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
10905 (TYPE_BINFO): Likewise.
10906 (IS_AGGR_TYPE): Tweak.
10907 (SET_IS_AGGR_TYPE): New macro.
10908 (CLASS_TYPE_P): Tweak.
10909 (lang_type): Group mark bitfields together. Remove linenum.
10910 (CLASSTYPE_SOURCE_LINE): Remove macro.
10911 (CLASSTYPE_MARKED_N): New macro.
10912 (SET_CLASSTYPE_MARKED_N): Likewise.
10913 (CLEAR_CLASSTYPE_MARKED_N): Likewise.
10914 (CLASS_TYPE_MARKED_*): Use them.
10915 (SET_CLASSTYPE_MARKED_*): Likewise.
10916 (CLEAR_CLASSTYPE_MARKED_*): Likewise.
10917 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
10918 (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
10919 (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
10920 * class.c (class_cache_obstack): New variable.
10921 (class_cache_firstobj): Likewise.
10922 (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
10923 (pushclass): Free the cache, when appropriate.
10924 (popclass): Tidy.
10925 (maybe_push_cache_obstack): Use class_cache_obstack.
10926 * decl.c (include hash.h).
10927 (typename_hash): New function.
10928 (typename_compare): Likewise.
10929 (build_typename_type): Check the hash table to avoid creating
10930 duplicates.
10931 (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
10932 (grokdeclarator): Use CLASS_TYPE_P.
10933 (xref_basetypes): Likewise.
10934 (start_function): Likewise. Don't put current_class_ref on the
10935 permanent obstack.
10936 * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
10937 and TYPE_TI_ARGS.
10938 * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
10939 (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
10940 fields for types other than class types. Do clear TYPE_ALIAS_SET
10941 for types other than class types, though.
10942 * method.c (build_overload_identifier): Use CLASS_TYPE_P and
10943 TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10944 * pt.c (process_template_parm): Don't set
10945 CLASSTYPE_GOT_SEMICOLON.
10946 (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10947 Coerce arguments on the momentary obstack.
10948 (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10949 (instantiate_class_template): Calculate template arguments on the
10950 momentary obstack. Tidy.
10951 (tsubst_template_arg_vector): Use make_temp_vec.
10952 (tsubst_aggr_type): Put template arguments on the momentary
10953 obstack.
10954 (tsubst_decl): Likewise.
10955 (tsubst): Copy the array bounds index to the permanent obstack
10956 before building index types. Use new macros.
10957 (unify): Use new macros.
10958 (do_type_instantiation): Likewise.
10959 * search.c (lookup_fnfields_1): Use new macros.
10960 (dfs_pushdecls): Build envelopes on the cache obstack.
10961 (dfs_compress_decls): Use new macros.
10962 (push_class_decls): Build on the cache obstack.
10963 * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
10964 * sign.c (build_signature_pointer_or_reference_type): Use
10965 SET_IS_AGGR_TYPE.
10966 * tree.c (make_binfo): Check CLASS_TYPE_P.
10967 (copy_template_template_parm): Adjust.
10968 (make_temp_vec): Use push_expression_obstack.
10969 * typeck.c (complete_type): Use new macros.
10970 (comptypes): Likewise.
10971
10972 1998-11-17 Jason Merrill <jason@yorick.cygnus.com>
10973
10974 * pt.c (tsubst): Add diagnostics for invalid array, reference
10975 and pointer to member types.
10976
10977 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
10978
10979 * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
10980
10981 * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
10982 Simplify.
10983
10984 * parse.y (structsp): Fix cut-and-paste error.
10985
10986 * init.c (build_new): Complain about non-integral size.
10987
10988 * parse.y (unary_expr): Complain about defining types in sizeof.
10989
10990 * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
10991
10992 * rtti.c (build_x_typeid): Complain about typeid without
10993 including <typeinfo>.
10994 (get_typeid): Likewise. Complain about typeid of incomplete type.
10995 (get_tinfo_fn_dynamic): Likewise.
10996 (get_typeid_1): Not static anymore.
10997 * except.c (build_eh_type_type): Use get_typeid_1.
10998
10999 * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
11000 ambiguous or private bases. Fix warning for reference cast.
11001
11002 1998-11-16 Mark Mitchell <mark@markmitchell.com>
11003
11004 * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
11005 * decl.c (duplicate_decls): Remove special-case code to deal with
11006 template friends, and just do the obvious thing.
11007 * pt.c (register_specialization): Tweak for clarity, and also to
11008 clear DECL_INITIAL for an instantiation before it is merged with a
11009 specialization.
11010 (check_explicit_specialization): Fix indentation.
11011 (tsubst_friend_function): Handle both definitions in friend
11012 declaration and outside friend declarations.
11013 (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
11014 (regenerate_decl_from_template): Tweak accordingly.
11015 (instantiate_decl): Likewise.
11016
11017 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
11018
11019 * decl.c (cplus_expand_expr_stmt): Promote warning about naked
11020 member function reference to error.
11021 * cvt.c (ocp_convert): Complain about converting an overloaded
11022 function to void.
11023
11024 * init.c (build_offset_ref): Just return a lone static member
11025 function.
11026
11027 * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
11028 not internal ones.
11029
11030 * typeck.c (build_binary_op_nodefault): Improve error handling.
11031
11032 * decl.c (grokfndecl): Complain about making 'main' a template.
11033
11034 * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
11035
11036 * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
11037 TYPE_DECL in a template.
11038
11039 1998-11-15 Jason Merrill <jason@yorick.cygnus.com>
11040
11041 * typeck2.c (my_friendly_abort): Add URL in the other case, too.
11042
11043 * decl.c (struct cp_function): Add named_label_uses.
11044 (push_cp_function_context): Save it.
11045 (pop_cp_function_context): Restore it.
11046 (define_label): Also complain about jumping into the scope of
11047 non-POD objects that don't have constructors.
11048 * tree.c (pod_type_p): New fn.
11049
11050 * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
11051 * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
11052 (get_tinfo_fn): Not here.
11053 * repo.c (repo_get_id): Abort if we get called for an incomplete
11054 type.
11055
11056 1998-11-13 Mark Mitchell <mark@markmitchell.com>
11057
11058 * except.c (expand_throw): Make sure first argument to
11059 __cp_push_exception is of type `void*' to avoid spurious error
11060 messages.
11061
11062 1998-11-11 Jason Merrill <jason@yorick.cygnus.com>
11063
11064 * pt.c (try_one_overload): Take orig_targs again. Only check for
11065 mismatches against them; we don't care what a previous call found.
11066 (resolve_overloaded_unification): Adjust.
11067
11068 * search.c (lookup_field): Don't return anything for a non-type
11069 field from a dependent type.
11070 * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
11071 in an array declarator.
11072 (start_decl): Push into the class before looking for the field.
11073
11074 1998-11-08 Mark Mitchell <mark@markmitchell.com>
11075
11076 * method.c (build_overload_value): Handle REFERENCE_TYPE.
11077
11078 1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
11079
11080 * decl.c (grokdeclarator): Allow namespace-scoped members if they
11081 are friends.
11082
11083 1998-11-08 Jason Merrill <jason@yorick.cygnus.com>
11084
11085 * pt.c (tsubst_decl): Don't mess with the global value of an
11086 un-mangled DECL_ASSEMBLER_NAME.
11087
11088 1998-11-03 Christopher Faylor <cgf@cygnus.com>
11089
11090 * decl.c (init_decl_processing): Remove CYGWIN conditional
11091 since CYGWIN is now able to deal with trapping signals.
11092
11093 Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11094
11095 * cp-tree.h: Don't include gansidecl.h.
11096 * exception.cc: Include gansidecl.h (since we don't include config.h)
11097 * g++spec.c: Don't include gansidecl.h.
11098
11099 1998-11-06 Mark Mitchell <mark@markmitchell.com>
11100
11101 * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease
11102 size of dummy.
11103 (DECL_DEFINED_IN_CLASS_P): New macro.
11104 (TEMPLATE_PARMS_FOR_INLINE): Document.
11105 (check_static_variable_definition): New function.
11106 * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
11107 appropriate.
11108 (check_static_variable_definition): Split out from ...
11109 (grokdeclarator): Here.
11110 * pt.c (check_default_tmpl_args): New function, split out from ...
11111 (push_template_decl_real): Here.
11112 (instantiate_template): Fix comment.
11113
11114 1998-11-04 Mark Mitchell <mark@markmitchell.com>
11115
11116 * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
11117 (CP_TYPE_VOLATILE_P): Likewise.
11118 (CP_TYPE_RESTRICT_P): Likewise.
11119
11120 1998-11-03 Mark Mitchell <mark@markmitchell.com>
11121
11122 * pt.c (tsubst): Use build_index_type, not build_index_2_type.
11123
11124 1998-11-02 Jason Merrill <jason@yorick.cygnus.com>
11125
11126 * class.c (instantiate_type): Be more helpful.
11127
11128 * decl2.c (import_export_decl): Call import_export_class.
11129
11130 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
11131 * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
11132 * pt.c (tsubst_copy): Likewise.
11133
11134 1998-11-02 Mark Mitchell <mark@markmitchell.com>
11135
11136 * init.c (expand_vec_init): Fix off-by-one error.
11137
11138 1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
11139
11140 * parse.y (apparent_template_type): New type.
11141 (named_complex_class_head_sans_basetype): Use it.
11142 * Makefile.in (CONFLICTS): One new conflict.
11143 * parse.c: Regenerated.
11144
11145 1998-11-01 Mark Mitchell <mark@markmitchell.com>
11146
11147 * cp-tree.h (COMPARE_STRICT): New macro.
11148 (COMPARE_BASE): Likewise.
11149 (COMPARE_RELAXED): Likewise.
11150 (COMPARE_REDECLARATION): Likewise.
11151 (same_type_p): Likewise.
11152 (same_or_base_type_p): Likewise.
11153 * call.c (standard_conversion): Use them, in place of comptypes
11154 with numeric arguments.
11155 (reference_binding): Likewise.
11156 (convert_like): Likewise.
11157 (build_over_call): Likewise.
11158 (is_subseq): Likewise.
11159 (is_properly_derived_from): Likewise.
11160 (compare_ics): Likewise.
11161 (joust): Likewise.
11162 * class.c (delete_duplicate_fields_1): Likewise.
11163 (resolves_to_fixed_type_p): Likewise.
11164 (instantiate_type): Likewise. Remove #if 0'd code.
11165 * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here.
11166 (pushdecl): Likewise.
11167 (lookup_name_real): Likewise.
11168 (grokdeclarator): Likewise. Check for illegal array declarations.
11169 (grokparms): Likewise.
11170 (grok_op_properties): Likewise.
11171 * decl2.c (check_classfn): Likewise.
11172 * friend.c (is_friend): Likewise.
11173 (make_friend_class): Likewise.
11174 * init.c (expand_aggr_init): Likewise.
11175 (expand_vec_init): Likewise.
11176 * pt.c (is_member_template_class): Remove declaration.
11177 (is_specialization_of): Use COMPARE_* and new macros.
11178 (comp_template_parms): Likewise.
11179 (convert_nontype_argument): Likewise.
11180 (coerce_template_template_parms): Likewise.
11181 (template_args_equal): Likewise.
11182 (lookup_template_class): Likewise.
11183 (type_unification_real): Likewise.
11184 (unify): Likewise.
11185 (get_bindings_real): Likewise.
11186 * search.c (covariant_return_p): Likewise.
11187 (get_matching_virtual): Likewise.
11188 * sig.c (match_method_types): Likewise.
11189 * tree.c (vec_binfo_member): Likewise.
11190 (cp_tree_equal): Likewise.
11191 * typeck.c (common_type): Likewise.
11192 (comp_array_types): Likewise. Get issues involving unknown array
11193 bounds right.
11194 (comptypes): Update comments. Use new flags.
11195 (comp_target_types): Use new macros.
11196 (compparms): Likewise.
11197 (comp_target_parms): Likewise.
11198 (string_conv_p): Likewise.
11199 (build_component_ref): Likewise.
11200 (build_indirect_ref): Likewise.
11201 (build_conditional_expr): Likewise.
11202 (build_static_cast): Likewise.
11203 (build_reinterpret_cast): Likewise.
11204 (build_const_cast): Likewise.
11205 (build_modify_expr): Likewise.
11206 (convert_for_assignment): Likewise.
11207 (comp_ptr_ttypes_real): Likewise.
11208 (ptr_reasonably_similar): Likewise.
11209 (comp_ptr_ttypes_const): Likewise.
11210
11211 1998-10-31 Jason Merrill <jason@yorick.cygnus.com>
11212
11213 * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
11214
11215 1998-10-30 Mark Mitchell <mark@markmitchell.com>
11216
11217 * decl2.c (delete_sanity): Pass integer_zero_node, not
11218 integer_two_node, to build_vec_delete.
11219 * init.c (build_array_eh_cleanup): Remove.
11220 (expand_vec_init_try_block): New function.
11221 (expand_vec_init_catch_clause): Likewise.
11222 (build_vec_delete_1): Don't deal with case that auto_delete_vec
11223 might be integer_two_node anymore.
11224 (expand_vec_init): Rework for initialization-correctness and
11225 exception-correctness.
11226 * typeck2.c (process_init_constructor): Make mutual exclusivity
11227 of cases more obvious.
11228
11229 1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
11230
11231 * decl.c (lookup_name_real): OK, only warn if not lexing.
11232 Simplify suggested fix.
11233
11234 * cp-tree.h (IDENTIFIER_MARKED): New macro.
11235 * search.c (lookup_conversions): Use breadth_first_search.
11236 (add_conversions): Avoid adding two conversions to the same type.
11237 (breadth_first_search): Work with base binfos, rather
11238 than binfos and base indices.
11239 (get_virtual_destructor): Adjust.
11240 (tree_has_any_destructor_p): Adjust.
11241 (get_matching_virtual): Adjust.
11242
11243 * pt.c (push_template_decl_real): Generalize check for incorrect
11244 number of template parms.
11245 (is_member_template_class): #if 0.
11246
11247 1998-10-29 Richard Henderson <rth@cygnus.com>
11248
11249 * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
11250 last.
11251
11252 1998-10-28 Zack Weinberg <zack@rabi.phys.columbia.edu>
11253
11254 * lex.c: Call check_newline from lang_init always. After
11255 calling cpp_start_read, set yy_cur and yy_lim to read from the
11256 cpplib token buffer.
11257
11258 1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
11259
11260 * class.c (instantiate_type): Don't consider templates for a normal
11261 match.
11262
11263 * class.c (finish_struct_1): Don't complain about non-copy
11264 assignment ops in union members.
11265
11266 * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
11267 (prepare_fresh_vtable): Likewise.
11268 (finish_struct_1): Don't call import_export_class.
11269 * decl2.c (finish_vtable_vardecl): Do import/export stuff.
11270 (finish_prevtable_vardecl): Lose.
11271 (finish_file): Don't call it.
11272 * pt.c (instantiate_class_template): Likewise.
11273 * cp-tree.h: Remove it.
11274
11275 * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
11276 * decl.c (finish_function): Not here.
11277 (start_function): Do set DECL_INITIAL.
11278
11279 * pt.c (push_template_decl_real): Complain about default template
11280 args for enclosing classes.
11281
11282 * call.c (add_function_candidate): Treat conversion functions
11283 as coming from the argument's class.
11284 * cp-tree.h (DECL_CONV_FN_P): New fn.
11285 (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
11286 * class.c (add_method): Use DECL_CONV_FN_P.
11287 * decl2.c (check_classfn): Likewise.
11288 * error.c (dump_function_name): Likewise.
11289 (dump_function_decl): Likewise.
11290 * pt.c (fn_type_unification): Likewise.
11291 * search.c (add_conversions): Likewise.
11292
11293 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
11294
11295 * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
11296 * method.c (hack_identifier): Also check for using RESULT_DECL
11297 from outer context.
11298
11299 1998-10-27 Mark Mitchell <mark@markmitchell.com>
11300
11301 * decl.c (grokdeclarator): Use type_quals, rather than constp,
11302 consistently.
11303
11304 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
11305
11306 * call.c (standard_conversion): instantiate_type here.
11307 (reference_binding): And here.
11308 (implicit_conversion): Not here.
11309 (build_op_delete_call): No need to cons up an OVERLOAD.
11310 * cvt.c (cp_convert_to_pointer): instantiate_type here.
11311 (convert_to_reference): And here.
11312 * decl.c (grok_reference_init): Not here.
11313 (grokparms): Or here.
11314 * typeck2.c (digest_init): Or here.
11315 * typeck.c (decay_conversion): Take the address of overloaded
11316 functions, too.
11317 (require_instantiated_type): Lose.
11318 (convert_arguments): Don't handle unknown types here.
11319 (build_c_cast): Likewise.
11320 (build_binary_op): Gut.
11321 (build_conditional_expr): Don't require_instantiated_type.
11322 (build_modify_expr): Likewise.
11323 (build_static_cast): Don't instantiate_type.
11324 (build_reinterpret_cast): Likewise.
11325 (build_const_cast): Likewise.
11326 (convert_for_initialization): Likewise.
11327 (build_ptrmemfunc): Use type_unknown_p.
11328 (convert_for_assignment): Also do default_conversion on overloaded
11329 functions. Hand them off to ocp_convert.
11330
11331 1998-10-26 Mark Mitchell <mark@markmitchell.com>
11332
11333 * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
11334 VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type.
11335
11336 * class.c (finish_struct_1): Use build_cplus_array_type to build
11337 array types.
11338 * decl.c (init_decl_processing): Likewise.
11339 * except.c (expand_end_eh_spec): Likewise.
11340 * search.c (expand_upcast_fixups): Simplify very slightly.
11341
11342 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
11343
11344 * decl.c (grokdeclarator): Complain about a variable using
11345 constructor syntax coming back null from start_decl.
11346
11347 * friend.c (make_friend_class): Complain about trying to make
11348 a non-class type a friend.
11349
11350 * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
11351 (start_function): Not here.
11352
11353 1998-10-26 Brendan Kehoe <brendan@cygnus.com>
11354
11355 * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
11356
11357 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
11358
11359 * typeck2.c (process_init_constructor): Only skip anonymous fields
11360 if they are bitfields.
11361
11362 * cp-tree.def (TYPEOF_TYPE): New code.
11363 * error.c (dump_type_real): Handle it.
11364 * pt.c (tsubst): Likewise.
11365 * tree.c (search_tree): Likewise.
11366 * semantics.c (finish_typeof): New fn.
11367 * parse.y (typespec): Use it.
11368 * cp-tree.h: Declare it.
11369
11370 1998-10-26 Manfred Hollstein <manfred@s-direktnet.de>
11371
11372 * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
11373
11374 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
11375
11376 * typeck.c (convert_arguments): Don't handle pmf references
11377 specially.
11378
11379 * init.c (build_member_call): Don't try to convert to the base type
11380 if it's ambiguous or pedantic.
11381
11382 * typeck2.c (check_for_new_type): Only depend on pedantic for
11383 C-style casts.
11384
11385 1998-10-25 Mark Mitchell <mark@markmitchell.com>
11386
11387 * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
11388 non-converting constructors.
11389
11390 1998-10-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
11391
11392 * gxxint.texi: Correct documentation for n, N, Q, and B.
11393
11394 1998-10-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
11395
11396 * parse.y (condition): Convert VAR_DECL from reference to indirect
11397 reference.
11398
11399 1998-10-23 Andrew MacLeod <amacleod@cygnus.com>
11400
11401 * exception.cc (__cp_pop_exception): Free the original exception
11402 value, not the potentially coerced one.
11403
11404 1998-10-23 Mark Mitchell <mark@markmitchell.com>
11405
11406 * Makefile.in (hash.h): Run gperf when necessary.
11407
11408 * cp-tree.h (CP_TYPE_READONLY): Remove.
11409 (CP_TYPE_VOLATILE): Likewise.
11410 (CP_TYPE_QUALS): New macro.
11411 (CP_TYPE_CONST_P): Likewise.
11412 (CP_TYPE_VOLATILE_P): Likewise.
11413 (CP_TYPE_RESTRICT_P): Likewise.
11414 (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
11415 (cp_build_type_variant): Rename to ...
11416 (cp_build_qualified_type): New function.
11417 (c_apply_type_quals_to_decl): Declare.
11418 (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
11419 (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
11420 (cp_type_qual_from_rid): New function.
11421 (compparms): Remove unused parameter. All callers changed.
11422 (cp_type_quals): New function.
11423 (at_least_as_qualified_p): Likewise.
11424 (more_qualified_p): Likewise.
11425
11426 * call.c (standard_conversion): Replace calls to
11427 cp_build_type_variant with cp_build_qualified_type. Use
11428 CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
11429 compare them. Use CP_TYPE_* macros to check qualifiers.
11430 (reference_binding): Likewise.
11431 (implicit_conversion): Likewise.
11432 (add_builtin_candidates): Likewise.
11433 (build_over_call): Likewise.
11434 * class.c (overrides): Compare all qualifiers, not just `const',
11435 on method declarations.
11436 * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
11437 (convert_pointer_to_real): Likewise.
11438 (type_promotes_to): Likewise.
11439 * decl.c (check_for_uninitialized_const_var): New function.
11440 (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
11441 (cp_finish_decl): Use check_for_uninitialized_const_var.
11442 (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to
11443 handle `restrict'.
11444 (grok_ctor_properties): Likewise.
11445 (grok_op_properties): Likewise.
11446 (start_function): Likewise.
11447 (rever_static_member_fn): Likewise.
11448 * decl2.c (grok_method_quals): Likewise.
11449 (grokfield): Likewise.
11450 * error.c (dump_readonly_or_volatile): Rename to ...
11451 (dump_qualifiers): New function. Handle `restrict'.
11452 (dump_type_real): Use it.
11453 (dump_aggr_type): Likewise.
11454 (dump_type_prefix): Likewise.
11455 (dump_type_suffix): Likewise.
11456 (dump_function_decl): Likewise.
11457 (cv_as_string): Likewise.
11458 * gxx.gperf: Add __restrict and __restrict__.
11459 * gxxint.texi: Document `u' as used for `__restrict', and a few
11460 other previously undocumented codes.
11461 * hash.h: Regenerated.
11462 * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
11463 (build_member_call): Likewise.
11464 (build_new_1): Likewise.
11465 * lex.c (init_parse): Add entry for RID_RESTRICT.
11466 (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
11467 (cp_type_qual_from_rid): Define.
11468 * lex.h (enum rid): Add RID_RESTRICT.
11469 * method.c (process_modifiers): Deal with `restrict'.
11470 * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
11471 * parse.c: Regenerated.
11472 * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
11473 (tsubst_aggr_type): Likewise.
11474 (tsubst): Likewise.
11475 (check_cv_quals_for_unify): Likewise.
11476 (unify): Likewise.
11477 * rtti.c (init_rtti_processing): Likewise.
11478 (build_headof): Likewise.
11479 (get_tinfo_var): Likewise.
11480 (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling.
11481 (expand_class_desc): Likewise.
11482 (expand_attr_desc): Likewise.
11483 (synthesize_tinfo_fn): Likewise.
11484 * search.c (covariant_return_p): Likewise. Fix `volatile' handling.
11485 (get_matching_virtual): Likewise.
11486 (expand_upcast_fixups): Likewise.
11487 * sig.c (build_signature_pointer_or_reference_name): Take
11488 type_quals, not constp and volatilep.
11489 (build_signature_pointer_or_reference_type): Likewise.
11490 (match_method_types): More CP_TYPE_QUALS conversion, etc.
11491 (build_signature_pointer_constructor): Likewise.
11492 (build_signature_method_call): Likewise.
11493 * tree.c (build_cplus_array_type): Likewise.
11494 (cp_build_type_variant): Rename to ...
11495 (cp_build_qualified_type): New function. Deal with `__restrict'.
11496 (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
11497 (build_exception_variant): Likewise.
11498 (mapcar): Likewise.
11499 * typeck.c (qualif_type): Likewise.
11500 (common_type): Likewise.
11501 (comptypes): Likewise.
11502 (comp_cv_target_types): Likewise.
11503 (at_least_as_qualified_p): Define.
11504 (more_qualified_p): Likewise.
11505 (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
11506 (compparms): Likewise.
11507 (inline_conversion): Likewise.
11508 (string_conv_p): Likewise.
11509 (build_component_ref): Likewise.
11510 (build_indirect_ref): Likewise.
11511 (build_array_ref): Likewise.
11512 (build_unary_op): Likewise.
11513 (build_conditional_expr): Likewise.
11514 (build_static_cast): Likewise.
11515 (build_c_cast): Likewise.
11516 (build_modify_expr): Likewise.
11517 (convert_For_assignment): Likewise.
11518 (comp_ptr_ttypes_real): Likewise.
11519 (cp_type_quals): New function.
11520
11521 1998-10-23 Jason Merrill <jason@yorick.cygnus.com>
11522
11523 * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
11524 (CP_TYPE_VOLATILE): Likewise.
11525 * decl.c (grokdeclarator): Use them.
11526 * tree.c (canonical_type_variant): Likewise.
11527
11528 1998-10-22 Martin von Löwis <loewis@informatik.hu-berlin.de>
11529
11530 * parse.y (named_class_head): Push into class while parsing the
11531 base class list.
11532 * decl2.c (push_scope, pop_scope): New functions.
11533 * cp-tree.h: Declare them.
11534 * init.c (build_new_1): Delay cleanup until end of full expression.
11535
11536 1998-10-21 Jason Merrill <jason@yorick.cygnus.com>
11537
11538 * typeck.c (build_component_ref): Use of a type here is an error.
11539
11540 1998-10-19 Jason Merrill <jason@yorick.cygnus.com>
11541
11542 Revamp references to member functions.
11543 * method.c (hack_identifier): Call build_component_ref for a
11544 reference to a member function.
11545 * typeck.c (build_component_ref): Only return a single function
11546 if it's static. Otherwise, return a COMPONENT_REF.
11547 (build_x_function_call): Handle a COMPONENT_REF.
11548 (build_unary_op): Handle all unknown-type things.
11549 * decl2.c (arg_assoc): Handle COMPONENT_REF.
11550 * class.c (instantiate_type): Complain if the function we get is a
11551 nonstatic member function. Remove code for finding "compatible"
11552 functions.
11553 * pt.c (tsubst_copy): Handle NOP_EXPR.
11554 * tree.c (build_dummy_object): New fn.
11555 (maybe_dummy_object): New fn.
11556 (is_dummy_object): New fn.
11557 * cp-tree.h: Declare them.
11558 * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
11559 * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
11560 * init.c (build_member_call): Use maybe_dummy_object and
11561 is_dummy_object.
11562 (build_offset_ref): Use maybe_dummy_object.
11563 (resolve_offset_ref): Use is_dummy_object.
11564 * typeck.c (build_x_function_call): Call build_dummy_object.
11565 (unary_complex_lvalue): Call is_dummy_object.
11566
11567 * typeck.c (build_component_addr): Make sure field is a field.
11568
11569 * call.c (build_new_op): Delete obsolete code.
11570
11571 * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
11572
11573 1998-10-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
11574
11575 * decl2.c (validate_nonmember_using_decl): Fix using-directives of
11576 std if std is ignored.
11577
11578 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
11579
11580 * decl.c (grokvardecl): Fix thinko.
11581
11582 * decl.c (grokdeclarator): Embedded attrs bind to the right,
11583 not the left.
11584
11585 * parse.y (fn.def2): Fix 'attrs' format.
11586
11587 1998-10-18 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
11588
11589 * Makefile.in (CONFLICTS): Update.
11590 * parse.y (expr_or_declarator_intern): New rule.
11591 (expr_or_declarator, direct_notype_declarator, primary,
11592 functional_cast): Use it.
11593 (notype_declarator_intern): New rule.
11594 (notype_declarator, complex_notype_declarator): Use it.
11595
11596 1998-10-17 Jason Merrill <jason@yorick.cygnus.com>
11597
11598 * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
11599 (grokvardecl): Likewise.
11600
11601 Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11602
11603 * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
11604 (add_method): Likewise for arguments 1 & 2 of `bcopy'.
11605
11606 * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
11607
11608 * pt.c (process_partial_specialization): Cast 1st argument of
11609 `bzero' to (PTR).
11610
11611 * tree.c (build_base_fields): Cast `base_align' to (int) when
11612 comparing against one.
11613
11614 1998-10-16 Mark Mitchell <mark@markmitchell.com>
11615
11616 * decl.c (lookup_name_real): Handle template parameters for member
11617 templates where said parameters have the same name as the
11618 surrounding class.
11619
11620 * decl.c (expand_static_init): Build cleanups before entering the
11621 anonymous function used to do them to avoid access-checking
11622 confusion.
11623
11624 * decl.c (grokfndecl): Add back call to cplus_decl_attributes
11625 accidentally removed by previous change, and make DECL_RTL here.
11626 * class.c (add_method): Don't make DECL_RTL here.
11627
11628 * pt.c (for_each_template_parm): Don't examine uninstantiated
11629 default arguments.
11630
11631 1998-10-16 Dave Brolley <brolley@cygnus.com>
11632
11633 * lex.c (real_yylex): Fix unaligned access of wchar_t.
11634
11635 1998-10-16 Mark Mitchell <mark@markmitchell.com>
11636
11637 * class.c (add_method): Fix documentation to reflect previous
11638 changes. Check for duplicate method declarations here.
11639 * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
11640 correctly; such things never match.
11641 (grokfndecl): Don't look for duplicate methods here.
11642 * decl2.c (check_classfn): Don't assume names are mangled.
11643 Don't add bogus member function declarations to a class before the
11644 class type is complete.
11645 (grokfield): Reformat error message.
11646 * method.c (set_mangled_name_for_decl): Don't mangle names while
11647 processing_template_decl.
11648
11649 1998-10-16 Jason Merrill <jason@yorick.cygnus.com>
11650
11651 * typeck.c (build_indirect_ref): Complain about a pointer to data
11652 member, too.
11653 * typeck2.c (build_m_component_ref): Don't indirect a pointer to
11654 data member.
11655 * init.c (resolve_offset_ref): Don't undo the above.
11656
11657 * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
11658 (struct lang_decl_flags): Add `bitfield'.
11659 * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
11660 DECL_BIT_FIELD.
11661 * decl2.c (grokbitfield, grok_alignof): Likewise.
11662 * init.c (build_offset_ref): Likewise.
11663 * typeck.c (build_component_addr, expr_sizeof): Likewise.
11664 * cvt.c (build_up_reference): Don't crash if taking the address
11665 returns error_mark_node.
11666
11667 * decl.c (grokfndecl): Also check ctype when checking for ::main().
11668
11669 1998-10-15 Jason Merrill <jason@yorick.cygnus.com>
11670
11671 * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
11672 Do mangling here.
11673 (grokdeclarator): Instead of here.
11674 * friend.c (do_friend): Lose special handling of ::main and
11675 __builtin_*.
11676 * cp-tree.h (DECL_MAIN_P): Check for C linkage.
11677
11678 * spew.c (yylex): Clear looking_for_typename if we got
11679 'enum { ... };'.
11680
11681 1998-10-15 Mark Mitchell <mark@markmitchell.com>
11682
11683 * class.c (maybe_warn_about_overly_private_class): Improve error
11684 messages for class with only private constructors.
11685
11686 * cp-tree.def (TYPENAME_TYPE): Add to documentation.
11687 * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
11688 (build_typename_type): New function.
11689 * decl.c (build_typename_type): Broken out from ...
11690 (make_typename_type): Use it.
11691 * search.c (lookup_field): Likewise.
11692
11693 1998-10-14 Benjamin Kosnik <bkoz@rhino.cygnus.com>
11694
11695 * pt.c (convert_nontype_argument): Check against type_referred_to.
11696 * decl.c (grokvardecl): Check for declarator name before building
11697 DECL_ASSEMBLER_NAME.
11698
11699 1998-10-14 Mark Mitchell <mark@markmitchell.com>
11700
11701 * pt.c (lookup_template_class): Add comment.
11702 (instantiate_class_template): Don't mark the _TYPE node for
11703 member class templates as an instantiation.
11704
11705 1998-10-14 Jason Merrill <jason@yorick.cygnus.com>
11706
11707 * decl.c (grokfndecl): Fix my thinko.
11708
11709 1998-10-13 Jason Merrill <jason@yorick.cygnus.com>
11710
11711 * tinfo2.cc (fast_compare): Remove.
11712 (before): Just use strcmp.
11713 * tinfo.cc (operator==): Just use strcmp.
11714
11715 1998-10-13 Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
11716
11717 * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
11718 declarations.
11719
11720 1998-10-13 Mark Mitchell <mark@markmitchell.com>
11721
11722 * cp-tree.h (specializations_of_same_template_p): Remove.
11723 * search.c (get_template_base): Don't use it.
11724 (get_template_base_recursive): Likewise.
11725 * pt.c (specializations_of_same_template_p): Remove.
11726 (unify): Don't use it.
11727 (lookup_template_class): Find the correct parent when setting
11728 CLASSTYPE_TI_TEMPLATE.
11729
11730 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
11731
11732 * tinfo.cc (operator==): Always compare names.
11733
11734 1998-10-12 Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
11735
11736 * decl.c (start_function): Fix cut-and-paste error.
11737
11738 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
11739
11740 * inc/typeinfo: Add #pragma interface.
11741 (operator!=): Just call operator==.
11742 * tinfo.cc: Add #pragma implementation.
11743 (operator==): Move from inc/typeinfo and tinfo2.cc.
11744 Check __COMMON_UNRELIABLE instead of _WIN32.
11745
11746 * typeck2.c (my_friendly_abort): Add URL.
11747
11748 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
11749
11750 * decl.c (start_method): Added extra parameter for attributes.
11751 * cp-tree.h (start_method): Update prototype.
11752 * parse.y (fn.def2): Update start_method parameter list.
11753
11754 1998-10-11 Mark Mitchell <mark@markmitchell.com>
11755
11756 * cp-tree.h (specializations_of_same_template_p): Declare.
11757 * pt.c (specializations_of_same_template_p): New function.
11758 (unify): Use it.
11759 * search.c (get_template_base): Use it.
11760 (get_template_base_recursive): Likewise.
11761
11762 1998-10-10 Manfred Hollstein <manfred@s-direktnet.de>
11763
11764 * decl2.c (start_objects): Add new variable `joiner' and
11765 initialize it properly.
11766
11767 1998-10-09 Mark Mitchell <mark@markmitchell.com>
11768
11769 * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
11770 change to vtable types.
11771
11772 * cvt.c (ocp_convert): Avoid infinite recursion caused by
11773 1998-10-03 change.
11774
11775 1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
11776
11777 * pt.c (resolve_overloaded_unification): New fn.
11778 (try_one_overload): Likewise.
11779 (unify): Don't fail on unknown type.
11780 (type_unification_real): Likewise. Use resolve_overloaded_unification
11781 to handle an overloaded argument.
11782 (template_args_equal): Split out...
11783 (comp_template_args): From here.
11784 (determine_specialization): Also allow a template with more
11785 parms than were explicitly specified.
11786 * cp-tree.h: Add template_args_equal.
11787 * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
11788
11789 Thu Oct 8 15:58:30 1998 Anthony Green <green@cygnus.com>
11790
11791 * semantics.c (finish_asm_stmt): Revert my 1998-09-28
11792 change.
11793
11794 Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com)
11795
11796 * typeck.c (unsigned_type): Only return TItype nodes when
11797 HOST_BITS_PER_WIDE_INT is >= 64 bits.
11798 (signed_type): Likewise.
11799 * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
11800 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
11801 (init_decl_processing): Only create TItype nodes when
11802 HOST_BITS_PER_WIDE_INT is >= 64 bits.
11803 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
11804 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
11805
11806 Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11807
11808 * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
11809 (gxx.gperf): Update comments describing invocation flags.
11810 (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
11811
11812 1998-10-07 Mark Mitchell <mark@markmitchell.com>
11813
11814 * class.c (finish_struct_1): Add commentary on previous change.
11815
11816 * cp-tree.h (vtbl_ptr_type_node): New variable.
11817 * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
11818 already of the right type.
11819 (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
11820 Simplify code to grow vtable.
11821 * decl.c (vtbl_ptr_type_node): Define.
11822 (init_decl_processing): Initialize it.
11823
11824 1998-10-06 Mark Mitchell <mark@markmitchell.com>
11825
11826 * cp-tree.def (PTRMEM_CST): New tree node.
11827 * cp-tree.h (ptrmem_cst): New type.
11828 (lang_type): Remove local_typedecls.
11829 (dummy): Increase to 12 bits from 11.
11830 (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
11831 (PTRMEM_CST_CLASS): New macro.
11832 (PTRMEM_CST_MEMBER): Likewise.
11833 (current_access_specifier): New variable.
11834 (current_class_type): Remove duplicate declaration.
11835 (finish_struct): Change prototype.
11836 (unreverse_member_declarations): New function.
11837 (pushdecl_class_level): Change prototype.
11838 (grok_enum_decls): Remove.
11839 (fixup_anonymous_union): New function.
11840 (grok_x_components): Change prototype.
11841 (tsubst_chain): Remove.
11842 (finish_member_template_decl): Likewise.
11843 (check_explicit_specialization): Fix indentation.
11844 (finish_class_definition): Change prototype.
11845 (finish_member_class_template): Likewise.
11846 (finish_member_declaration): New function.
11847 (check_multiple_declarators): Likewise.
11848 * class.c (class_stack_node_t): New type.
11849 (current_class_base): Remove.
11850 (current_class_stack): Change type.
11851 (current_access_specifier): New variable.
11852 (grow_method): Remove.
11853 (check_member_decl_is_same_in_complete_scope): Break out from
11854 finish_struct.
11855 (make_method_vec): New function.
11856 (free_method_vec): Likewise.
11857 (add_implicitly_declared_members): Break out from finish_struct_1.
11858 (free_method_vecs): New variable.
11859 (add_method): Rework for direct use from parser.
11860 (handle_using_decl): Watch for NULL_TREE while iterating through
11861 CLASSTYPE_METHOD_VEC.
11862 (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
11863 just do some error-checking.
11864 (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
11865 (finish_struct_1): Simplify. Use add_implicitly_declared_members.
11866 (finish_struct): Change prototype. Simplify; fields and methods
11867 are already set up at this point.
11868 (init_class_processing): Set up current_class_stack.
11869 (pushclass): Save current_access_specifier.
11870 (popclass): Restore it.
11871 (currently_open_class): Simplify.
11872 (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
11873 * decl.c (saved_scope): Add access_specifier.
11874 (maybe_push_to_top_level): Save it.
11875 (pop_from_top_level): Restore it.
11876 (maybe_process_template_type_declaration): Use
11877 finish_member_declaration.
11878 (pushtag): Likewise.
11879 (pushdecl_class_level): Don't return a value.
11880 (fixup_anonymous_union): Break out from grok_x_components.
11881 (shadow_tag): Use it.
11882 (xref_tag): Complain about using an elaborated type specifier to
11883 reference a template type parameter or typedef name.
11884 (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
11885 (current_local_enum): Remove.
11886 (build_enumerator): Call finish_member_declaration.
11887 (grok_enum_decls): Remove.
11888 * decl2.c (grok_x_components): Simplify.
11889 (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
11890 (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
11891 (merge_functions): Add to comment.
11892 (arg_assoc_type): Prototype.
11893 (arg_assoc): Pass as many arguments as there are parameters.
11894 * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of
11895 OFFSET_REF.
11896 * expr.c (cpls_expand_expr): Remove dead code. Handle
11897 PTRMEM_CST.
11898 * friend.c (do_friend): Lookup friends when in nested classes.
11899 Change comments.
11900 * init.c (build_offset_ref): Do lookup even for classes that are
11901 only partially defined.
11902 (decl_constant_value): Remove dead code.
11903 * method.c (build_overload_value): Remove hack where by TYPE was
11904 not a TYPE. Handle PTRMEM_CST.
11905 (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
11906 should go.
11907 * parse.y (components, notype_components, component_decl,
11908 component_decl_1, component_declarator, component_declarator0):
11909 Now all are itype rather than ttype. Rework to add members to
11910 classes on the fly.
11911 (typesqpecqual_reserved): Use check_multiple_declarators.
11912 (structsp): Update class to finish_class_definition.
11913 (do_xref_defn): Unsplit into named_class_head.
11914 (access_specifier): Set current_access_specifier.
11915 * pt.c (set_current_access_from_decl): New function.
11916 (finish_member_template_decl): Don't take the parameters.
11917 (comp_template_args): Make more robust.
11918 (lookup_template_class): Don't use current_local_enum.
11919 (for_each_template_parm): Handle PTRMEM_CST.
11920 (instantiate_class_template): Use set_current_access_from_decl,
11921 finish_member_declaration and unreverse_member_declarations. Set
11922 lineno/input_filename before generating implicit member functions.
11923 (type_unification_real): Don't assume back-unification happens
11924 only for the last argument.
11925 (regenerate_decl_from_template): Call pushclass a bit earlier.
11926 (tsubst_chain): Remove.
11927 (tsubst_enum): Use set_current_access_from_decl.
11928 (set_mangled_name_for_template_decl): Fix indentation.
11929 * search.c (lookup_fnfields_1): Change iteration through
11930 CLASSTYPE_METHOD_VEC.
11931 (dfs_pushdecls): Likewise.
11932 (dfs_compress_decls): Likewise.
11933 (add_conversions): Likewise.
11934 * semantics.c (finish_class_definition): Don't take components.
11935 Change call to finish_struct.
11936 (finish_member_declaration): New function.
11937 (finish_member_class_template): Don't take template parameters.
11938 Change call to grok_x_components. Call finish_member_template_decl.
11939 (check_multiple_declarators): New function.
11940 * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
11941 a passed in fieldlist.
11942 * tree.c (search_tree): Handle PTRMEM_CST.
11943 (mapcar): Likewise.
11944 * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
11945 INTEGER_CSTs, for pointer-to-data members.
11946
11947 * call.c (resolve_args): Resolve template specializations, if
11948 possible.
11949
11950 Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11951
11952 * Makefile.in (spew.o): Depend on toplev.h.
11953
11954 * call.c (compare_ics): Initialize variables `deref_from_type2',
11955 `deref_to_type1' and `deref_to_type2'.
11956
11957 * except.c (get_eh_type): Hide prototype and definition.
11958 (process_start_catch_block_old): Remove unused static prototype.
11959
11960 * pt.c (tsubst_decl): Initialize variable `argvec'.
11961
11962 * spew.c: Include toplev.h.
11963
11964 1998-10-05 Jason Merrill <jason@yorick.cygnus.com>
11965
11966 * pt.c (instantiate_decl): Do save and restore file position.
11967
11968 1998-10-05 Martin von Löwis <loewis@informatik.hu-berlin.de>
11969
11970 * method.c (build_decl_overload_real): Clear
11971 numeric_output_need_bar after __.
11972
11973 1998-10-05 Nathan Sidwell <nathan@acm.org>
11974
11975 * call.c (build_new_method_call): Issue 'incomplete type' error,
11976 if class is not defined.
11977
11978 1998-10-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11979
11980 * call.c (build_object_call): Move declaration of variable
11981 `fn' into the scope where it is used. Don't access variable
11982 `fn' when it is uninitialized, instead use `fns'.
11983
11984 1998-10-04 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11985
11986 * errfn.c (cp_thing): Print buf as a string not as a printf format
11987 to avoid problems with the operator%. Consequently, `%%' sequences
11988 in format are copied as `%' in buf.
11989
11990 1998-10-04 Jason Merrill <jason@yorick.cygnus.com>
11991
11992 * pt.c (pop_tinst_level): Call extract_interface_info.
11993 (instantiate_decl): Don't save and restore file position.
11994
11995 * decl.c (cp_finish_decl): Make statics in extern inlines and
11996 templates common, if possible and the target doesn't support weak
11997 symbols.
11998
11999 * decl.c (grokdeclarator): Remove redundant calls to
12000 build_type_variant and some duplicated code.
12001 * sig.c (build_signature_reference_type): Only take the type parm.
12002 (build_signature_pointer_type): Likewise.
12003 * tree.c (build_cplus_method_type): Adjust.
12004 * cp-tree.h: Update.
12005
12006 1998-10-04 Mark Mitchell <mark@markmitchell.com>
12007
12008 * call.c (build_over_call): Make pedwarns about dropped qualifiers
12009 into full-fledged errors.
12010 * cvt.c (convert_to_reference): Likewise.
12011 * typeck.c (convert_for_assignment): Likewise.
12012
12013 * search.c (expand_upcast_vtables): In addition to unsetting
12014 TREE_READONLY, remove top-level const type qualifier.
12015
12016 1998-10-03 Mark Mitchell <mark@markmitchell.com>
12017
12018 * class.c (current_class_ptr, current_class_ref): Clarify
12019 documentation.
12020 * cvt.c (ocp_convert): Don't expect fold to remove all trivial
12021 NOP type conversions.
12022 * decl.c (decls_match): Use comptypes directly; ignore
12023 qualifiers on the DECL.
12024 (duplicate_decls): Remove qualifier checks on DECL.
12025 (grokdeclarator): Make the type built up include top-level
12026 qualifiers.
12027 * decl2.c (do_dtors): Fix spelling error.
12028 * error.c (dump_simple_decl): Don't look at qualifiers on the decl
12029 when printing type information.
12030 * init.c (build_new_1): Add documentation. Deal with the fact
12031 that type of allocated memory now contains qualifiers.
12032 * lex.c (is_global): Improve error-recovery.
12033 * sig.c (build_member_function_pointer): Don't cast away const
12034 on fields of sigtable_entry_type.
12035 * tree.c (lvalue_type): Don't look at top-level qualifiers on
12036 expressions.
12037 * typeck.c (decay_conversion): Likewise.
12038 (build_component_ref): Make sure the type of the COMPONENT_REF
12039 contains top-level qualifiers, as appropriate. Improve
12040 error-handling.
12041 (build_indirect_ref): Simplify. Don't strip top-level qualifiers.
12042 (build_array_ref): Likewise.
12043 (build_unary_op): Improve error-recovery.
12044 (unary_complex_lvalue): Make taking the address a bound member
12045 function an error, not a sorry.
12046 (build_conditional_expr): Look at the type qualifiers, not the
12047 qualifiers on the expression itself.
12048
12049 1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
12050
12051 * decl2.c (merge_functions): Remove duplicates.
12052
12053 * decl2.c: Add -f{no-,}implicit-inline-templates.
12054 (import_export_decl): Check it.
12055
12056 * decl.c (lookup_name_real): Template parms also take precedence
12057 over implicit typename. Only warn if yylex.
12058
12059 * typeck.c (build_conditional_expr): Only fold if ifexp is an
12060 INTEGER_CST.
12061
12062 * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
12063 instead of linkage.
12064
12065 1998-10-01 Jason Merrill <jason@yorick.cygnus.com>
12066
12067 * cp-tree.h (FORMAT_VBASE_NAME): New macro.
12068 * class.c (build_vbase_pointer): Use it.
12069 * rtti.c (expand_class_desc): Likewise.
12070 * tree.c (build_vbase_pointer_fields): Likewise.
12071
12072 Thu Oct 1 10:43:45 1998 Nick Clifton <nickc@cygnus.com>
12073
12074 * decl.c (start_decl): Add invocation of
12075 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
12076 (start_function): Add invocation of
12077 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
12078
12079 * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
12080 HANDLE_GENERIC_PRAGMAS.
12081
12082 1998-09-28 Anthony Green <green@cygnus.com>
12083
12084 * semantics.c (finish_asm_stmt): Always permit volatile asms.
12085
12086 1998-09-28 Mark Mitchell <mark@markmitchell.com>
12087
12088 * decl.c (grokdeclarator): Tighten checks for invalid
12089 destructors. Improve error-messages and error-recovery.
12090 * decl2.c (check_classfn): Don't assume that mangled destructor
12091 names contain type information.
12092
12093 1998-09-25 Jason Merrill <jason@yorick.cygnus.com>
12094
12095 * search.c (get_base_distance): Remove assert.
12096
12097 * decl2.c (build_anon_union_vars): Don't process a field with no
12098 name.
12099 (finish_anon_union): Also complain about local anon unions with no
12100 members.
12101
12102 1998-09-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
12103
12104 * decl.c (lookup_namespace_name): If the name is a namespace,
12105 return it immediately.
12106
12107 Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12108
12109 * cp-tree.h (define_case_label): Remove unused parameter.
12110 (check_java_method): Likewise.
12111 (grokclassfn): Likewise.
12112 (expand_aggr_init): Likewise.
12113 (build_x_delete): Likewise.
12114 (maybe_end_member_template_processing): Likewise.
12115 (unshare_base_binfos): Add prototype.
12116 (string_conv_p): Likewise.
12117 (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
12118
12119 * cvt.c (build_up_reference): Remove unused parameter
12120 `checkconst', all callers changed.
12121 (build_type_conversion): Mark parameter `code' with
12122 ATTRIBUTE_UNUSED.
12123 (build_expr_type_conversion): Initialize variable `conv'.
12124
12125 * decl.c (push_namespace): Initialize variable `d'.
12126 (define_case_label): Remove unused parameter `decl', all callers
12127 changed.
12128
12129 * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
12130 `argc' with ATTRIBUTE_UNUSED.
12131 (grokclassfn): Remove unused parameter `cname', all callers
12132 changed.
12133 (check_java_method): Likewise for parameter `ctype'.
12134 (copy_assignment_arg_p): Mark parameter `virtualp' with
12135 ATTRIBUTE_UNUSED.
12136 (finish_prevtable_vardecl): Likewise for parameter `prev'.
12137
12138 * expr.c (extract_init): Likewise for parameters `decl' and `init'.
12139
12140 * init.c (expand_aggr_init_1): Remove unused parameter
12141 `alias_this', all callers changed.
12142 (expand_aggr_init): Likewise.
12143 (expand_default_init): Likewise.
12144 (build_new_1): Initialize variable `susp'.
12145 (build_x_delete): Remove unused parameter `type', all callers
12146 changed.
12147
12148 * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
12149 ATTRIBUTE_UNUSED.
12150 (readescape): Use (unsigned) value in shift.
12151 (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when
12152 comparing to a signed quantity.
12153
12154 * pt.c (maybe_end_member_template_processing): Remove unused
12155 parameter `decl', all callers changed.
12156 (check_explicit_specialization): Add braces around empty body in
12157 an else-statement.
12158 (current_template_args): Initialize variable `args'.
12159 (lookup_template_class): Likewise for variable `prev_local_enum'.
12160 (tsubst_decl): Likewise for variable `r'.
12161 (set_mangled_name_for_template_decl): Initialize variable
12162 `context'.
12163
12164 * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
12165 Likewise for variable `i'.
12166 (yylex): Initialize variable `trrr'.
12167
12168 * typeck.c (compparms): Mark variable `strict' with
12169 ATTRIBUTE_UNUSED.
12170
12171 * xref.c (simplify_type): Cast argument of ctype function to
12172 `unsigned char'.
12173
12174 1998-09-24 Mark Mitchell <mark@markmitchell.com>
12175
12176 * cp-tree.h (language_lvalue_valid): Remove.
12177 * decl.c (grokdeclarator): Don't disallow references to functions.
12178 * tree.c (lvalue_p_1): New function, combining duplicated
12179 code from ...
12180 (lvalue_p): Use it.
12181 (real_lvalue_p): Likewise.
12182 * typeck.c (language_lvalue_valid): Remove.
12183 (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
12184 they don't have TREE_READONLY set.
12185 * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
12186
12187 1998-09-24 Benjamin Kosnik <bkoz@loony.cygnus.com>
12188
12189 * spew.c (yylex): Give diagnostic.
12190 * hash.h (is_reserved_word): Add export.
12191 * gxx.gperf: Likewise.
12192 * lex.h (rid): Add RID_EXPORT.
12193 * lex.c (init_parse): Likewise.
12194
12195 Tue Sep 22 21:01:19 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
12196
12197 * friend.c (do_friend): Make warning a full sentence.
12198
12199 1998-09-22 Mark Mitchell <mark@markmitchell.com>
12200
12201 * parse.y (component_decl_list): Improve error-recovery.
12202
12203 1998-09-22 Benjamin Kosnik <bkoz@loony.cygnus.com>
12204
12205 * decl.c (make_typename_type): Move error to point where name
12206 variable can be used by dump_type.
12207
12208 1998-09-22 Mark Mitchell <mark@markmitchell.com>
12209
12210 * decl.c (grokfndecl): Improve error-recovery.
12211 * decl2.c (grokfield): Likewise.
12212 * pt.c (finish_member_template_decl): Likewise.
12213
12214 1998-09-20 Martin von Löwis <loewis@informatik.hu-berlin.de>
12215
12216 * method.c (hack_identifier): Finding multiple members is always
12217 an error.
12218
12219 1998-09-21 Per Bothner <bothner@cygnus.com>
12220
12221 * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o.
12222
12223 Mon Sep 21 01:53:05 1998 Felix Lee <flee@cygnus.com>
12224
12225 * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
12226
12227 1998-09-20 Mark Mitchell <mark@markmitchell.com>
12228
12229 * class.c (maybe_warn_about_overly_private_class): Reformat.
12230
12231 1998-09-17 Andrew MacLeod <amacleod@cygnus.com>
12232
12233 * exception.cc (__cplus_type_matcher): Realign some code.
12234
12235 1998-09-16 Mark Mitchell <mark@markmitchell.com>
12236
12237 * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
12238 (tinfo2.o): Likewise.
12239 (exception.o): Likewise.
12240 (new.o): Likewise.
12241 (opnew.o): Likewise.
12242 (opnewnt.o): Likewise.
12243 (opvnew.o): Likewise.
12244 (opvnewnt.o): Likewise.
12245 (opdel.o): Likewise.
12246 (opdelnt.o): Likewise.
12247 (opvdel.o): Likewise.
12248 (opvdelnt.o): Likewise.
12249
12250 1998-09-16 Richard Henderson <rth@cygnus.com>
12251
12252 * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
12253
12254 1998-09-15 Alexandre Oliva <oliva@dcc.unicamp.br>
12255
12256 * call.c (build_field_call): Handle static data members too.
12257
12258 * typeck.c (comptypes): When comparing pointer types, check
12259 whether referred types match even in strictest modes.
12260
12261 1998-09-15 Mark Mitchell <mark@markmitchell.com>
12262
12263 * cp-tree.h: Revert previous change.
12264 (finish_struct_methods): Remove declaration.
12265 * class.c: Revert previous change.
12266 (maybe_warn_about_overly_private_class): New function.
12267 (finish_struct_methods): Declare here, and make static. Remove
12268 unnecessary parameters. Tidy slightly. Use
12269 maybe_warn_about_overly_private_class.
12270 (finish_struct_1): Adjust. Remove check for private constructors,
12271 now done elsewhere.
12272 (finish_struct): Adjust.
12273
12274 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
12275
12276 * except.c (expand_start_catch_block): No need to check for new
12277 exception model.
12278 (process_start_catch_block_old): Deleted.
12279 (process_start_catch_block): Add call to start_decl_1().
12280 (expand_end_catch_block): Add call to end_catch_handler().
12281 * exception.cc (__cplus_type_matcher): Only check the exception
12282 language if there is an exception table.
12283
12284 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
12285
12286 * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
12287 as used to prevent conflicts with virtual function tables.
12288
12289 1998-09-14 Mark Mitchell <mark@markmitchell.com>
12290
12291 * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
12292 (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
12293 * class.c (maybe_class_too_private_p): New function.
12294 (finish_struct_methods): Use it.
12295 (finish_struct_1): Likewise.
12296 (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
12297 appropriate.
12298
12299 * pt.c (check_specialization_scope): Fix spelling error.
12300 (check_explicit_specialization): Remove code to handle explicit
12301 specializations in class scope; they are now correctly diagnosed
12302 as errors.
12303
12304 1998-09-10 Mark Mitchell <mark@markmitchell.com>
12305
12306 * decl.c (pushdecl): Don't copy types if the
12307 DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
12308 type.
12309
12310 1998-09-09 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
12311
12312 * class.c (get_enclosing_class): New function.
12313 (is_base_of_enclosing_class): Likewise.
12314 * cp-tree.h (get_enclosing_class): Declare.
12315 (is_base_of_enclosing_class): Likewise.
12316 * pt.c (coerce_template_parms): Use them.
12317
12318 1998-09-09 Jason Merrill <jason@yorick.cygnus.com>
12319
12320 * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
12321 null to decide whether to use it.
12322
12323 * error.c (dump_type_real): Handle NAMESPACE_DECL.
12324 * parse.y (base_class.1): Avoid crash on error.
12325
12326 1998-09-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
12327
12328 * decl.c (make_typename_type): If context is a namespace, the code
12329 is in error.
12330
12331 1998-09-08 Mumit Khan <khan@xraylith.wisc.edu>
12332
12333 * parse.y (nomods_initdcl0): Set up the parser stack correctly.
12334
12335 1998-09-08 Mark Mitchell <mark@markmitchell.com>
12336
12337 * cp-tree.h (anonymous_namespace_name): Declare.
12338 * decl.c: Define it.
12339 (push_namespace): Use anonymous_namespace_name, rather than local
12340 static anon_name.
12341 * error.c (dump_decl): If a namespace is named
12342 anonymous_namespace_name, call it {anonymous}.
12343
12344 * decl.c (grokparms): Distinguish between references and pointers
12345 in error message.
12346
12347 1998-09-08 Richard Henderson <rth@cygnus.com>
12348 Mark Mitchell <mark@markmitchell.com>
12349
12350 * pt.c (process_partial_specialization): Consistently allocate
12351 and zero tpd.parms based on ntparms. Use tpd2.parms, not
12352 tpd.parms, where appropriate.
12353
12354 Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com)
12355
12356 * Makefile.in (INCLUDES): Update after recent toplevel gcc
12357 reorganizations.
12358
12359 1998-09-05 Mark Mitchell <mark@markmitchell.com>
12360
12361 * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
12362 * class.c (finish_struct): Remove hackery to deal with explicit
12363 specializations in class scope.
12364 * decl.c (grokfndecl): Improve error-recovery.
12365 * decl2.c (grokfield): Likewise.
12366 * pt.c (check_specialization_scope): New function.
12367 (begin_specialization): Call it.
12368 (process_partial_specialization): New function, split out from
12369 push_template_decl. Check partial specializations more
12370 stringently.
12371 (push_template_decl): Call it.
12372 (check_explicit_specialization): Don't attempt to handle explicit
12373 specializations in class scope.
12374 (template_parm_data): Document. Add current_arg and
12375 arg_uses_template_parms.
12376 (mark_template_parm): Set it.
12377 (tsubst_arg_types): Remove unused variable.
12378 * semantics.c (begin_class_definition): Tweak.
12379
12380 1998-09-04 Mark Mitchell <mark@markmitchell.com>
12381
12382 * inc/typeinfo (type_info::type_info(const char*)): Make
12383 `explicit'.
12384
12385 * cp-tree.h (hash_tree_cons_simple): New macro.
12386 * pt.c (tsubst_arg_types): New function. Use hash_tree_cons.
12387 (coerce_template_parms): Use make_temp_vec, instead of
12388 make_tree_vec. Document this behavior.
12389 (lookup_template_class): Likewise.
12390 (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
12391 Remove dead code (and add assertion to check its deadness). Fix
12392 bug w.r.t. exception specifications.
12393
12394 1998-09-03 Jason Merrill <jason@yorick.cygnus.com>
12395
12396 * decl2.c (import_export_vtable): Always make artificials comdat.
12397 (import_export_decl): Likewise.
12398 * pt.c (mark_decl_instantiated): Likewise.
12399
12400 1998-09-03 Mark Mitchell <mark@markmitchell.com>
12401
12402 * cp-tree.h (finish_globally_qualified_member_call_expr):
12403 Rename to ...
12404 (finish_qualified_call_expr).
12405 * semantics.c: Likewise.
12406 * parse.y (primary): Use it.
12407 * method.c (hack_identifier): Remove redundant code.
12408
12409 * init.c (resolve_offset_ref): Call convert_from_reference to
12410 handle members of reference type. Improve error recovery.
12411
12412 1998-09-03 Benjamin Kosnik <bkoz@cygnus.com>
12413
12414 * cp-tree.h: Declare warn_nontemplate_friend.
12415 * decl2.c (lang_decode_option): Set.
12416 * lang-options.h: Add -Wnon-template-friend.
12417 * friend.c (do_friend): Use to toggle non-template function warning.
12418
12419 1998-09-03 Mark Mitchell <mark@markmitchell.com>
12420
12421 * decl.c (finish_enum): Don't resolve CONST_DECLs to their
12422 corresponding INTEGER_CSTs when processing_template_decl.
12423 * pt.c (tsubst_enum): Tweak accordingly.
12424
12425 1998-09-03 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12426
12427 * decl.c (pushdecl_class_level): Add warning here.
12428 (pushdecl): Tweak.
12429
12430 1998-09-02 Jason Merrill <jason@yorick.cygnus.com>
12431
12432 * cvt.c (convert_pointer_to_real): Tidy.
12433 * search.c (get_base_distance_recursive): Simplify.
12434 (get_base_distance): Likewise.
12435
12436 * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
12437 parms.
12438
12439 Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
12440
12441 * lex.c (check_newline): Call HANDLE_PRAGMA before
12442 HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages
12443 if unknown pragmas are encountered.
12444 (handle_sysv_pragma): Interpret return code from
12445 handle_pragma_token (). Return success/failure indication rather
12446 than next unprocessed character.
12447 (pragma_getc): New function: retrieves characters from the
12448 input stream. Defined when HANDLE_PRAGMA is defined.
12449 (pragma_ungetc): New function: replaces characters back into the
12450 input stream. Defined when HANDLE_PRAGMA is defined.
12451
12452 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
12453
12454 * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
12455 * class.c (build_vtable_entry_ref): Likewise.
12456
12457 1998-09-01 Mark Mitchell <mark@markmitchell.com>
12458
12459 * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
12460 * decl2.c (import_export_decl): Likewise.
12461 * pt.c (instantiate_decl): Use it.
12462
12463 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
12464
12465 * decl.c (lookup_name_real): Also do implicit typename thing for
12466 artificial TYPE_DECLs.
12467 * search.c (lookup_field): Likewise.
12468 (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
12469 * semantics.c (begin_constructor_declarator): Use enter_scope_of.
12470 (enter_scope_of): Extract type from implicit typename.
12471 (begin_class_definition): Likewise.
12472 * lex.c (identifier_type): Handle implicit typename when checking
12473 for SELFNAME.
12474
12475 * cp-tree.h: Declare flag_strict_prototype.
12476 * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
12477 -fstrict-prototype.
12478 * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
12479 specified, set it to the value of pedantic.
12480
12481 1998-09-01 Mark Mitchell <mark@markmitchell.com>
12482
12483 * decl2.c (arg_assoc): Handle template-id expressions as arguments.
12484
12485 1998-08-31 Mark Mitchell <mark@markmitchell.com>
12486
12487 * decl.c (finish_enum): Handle member enums of classes declared in
12488 template functions.
12489
12490 * decl2.c (grok_x_components): Strip attributes before calling
12491 groktypename.
12492
12493 1998-08-31 Jason Merrill <jason@yorick.cygnus.com>
12494
12495 * cp-tree.h, decl2.c: Remove support for -fall-virtual,
12496 -fenum-int-equivalence and -fno-nonnull-objects.
12497 * class.c (check_for_override): Remove support for -fall-virtual.
12498 (finish_struct_1): Likewise.
12499 * call.c (build_new_op): Remove support for -fenum-int-equivalence.
12500 * typeck.c (build_binary_op_nodefault): Likewise.
12501 * cvt.c (ocp_convert): Likewise.
12502 * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
12503 * class.c (build_vbase_path): Likewise.
12504
12505 Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org)
12506
12507 * Makefile.in (INTERFACE): New, set to 1.
12508
12509 1998-08-30 Mark Mitchell <mark@markmitchell.com>
12510
12511 * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
12512 comparing with global_namespace.
12513 (dump_aggr_type): Likewise.
12514
12515 * decl.c (grokfndecl): Issue error on declaration of friend
12516 templates with explicit template arguments.
12517
12518 * pt.c (convert_template_argument): New function, split out
12519 from...
12520 (coerce_template_parms): Here.
12521 (tsubst): Attempt better error-recovery.
12522
12523 1998-08-28 Benjamin Kosnik <bkoz@loony.cygnus.com>
12524
12525 * pt.c (decl_template_parm_p): Add checks for
12526 TEMPLATE_TEMPLATE_PARM.
12527
12528 1998-08-28 Mark Mitchell <mark@markmitchell.com>
12529
12530 * lex.c (do_identifier): Fix thinko in previous change.
12531
12532 1998-08-28 Jason Merrill <jason@yorick.cygnus.com>
12533
12534 * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
12535 * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
12536
12537 1998-08-28 Richard Henderson <rth@cygnus.com>
12538
12539 Add support for discarding unused virtual functions.
12540 * lang-options.h: Add -fvtable-gc.
12541 * cp-tree.h: Add flag_vtable_gc.
12542 * decl2.c (output_vtable_inherit): New fn.
12543 (finish_vtable_vardecl): Call it.
12544 * class.c (build_vtable_entry_ref): New fn.
12545 (build_vtbl_ref): Call it.
12546
12547 1998-08-28 Mark Mitchell <mark@markmitchell.com>
12548
12549 * cp-tree.h (build_enumerator): Take the enumeration type as a
12550 parameter.
12551 * decl.c (finish_enum): Don't set the TREE_TYPE for the
12552 enumeration constant values if we're processing_template_decls.
12553 Don't set the type for the CONST_DECLs either; that's done in
12554 build_enumerator.
12555 (build_enumerator): Take the enumeration type as a
12556 parameter.
12557 * lex.c (do_identifier): Don't resolve enumeration constants while
12558 processing template declarations, even if they happen to be
12559 TEMPLATE_PARM_INDEXs.
12560
12561 * parse.y (current_enum_type): New variable.
12562 (primary): Don't allow statement-expression in local classes just
12563 as we don't in global classes.
12564 (structsp): Use current_enum_type.
12565 (enum_list): Likewise.
12566 * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
12567 finish_enum; they no longer occur.
12568
12569 * cp-tree.h (finish_base_specifier): New function.
12570 * parse.y (base_class): Use it.
12571 * semantics.c (finish_base_specifier): Define it.
12572
12573 * parse.y (structsp): Warn on use of typename outside of template
12574 declarations.
12575
12576 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
12577
12578 * lex.c (handle_cp_pragma): Remove #pragma vtable.
12579 * lang-options.h: Remove +e options.
12580 * decl2.c (lang_decode_option): Likewise.
12581 (import_export_vtable): Don't check write_virtuals.
12582 (finish_vtable_vardecl, finish_file): Likewise.
12583 * search.c (dfs_debug_mark): Likewise.
12584 * semantics.c (begin_class_definition): Likewise.
12585 * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
12586
12587 * call.c (build_over_call): Check flag_elide_constructors.
12588 * decl2.c: flag_elide_constructors defaults to 1.
12589 * typeck.c (convert_arguments): Remove return_loc parm.
12590 (build_function_call_real): Adjust.
12591
12592 * search.c: Tear out all mi_matrix and memoize code.
12593 (lookup_field, lookup_fnfields): Use scratch_tree_cons.
12594 * lang-options.h: Remove documentation for -fhandle-exceptions,
12595 -fmemoize-lookups and -fsave-memoized.
12596 * cp-tree.h: Lose mi_matrix and memoize support.
12597 * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
12598 * class.c: Lose struct class_level.
12599 (pushclass, popclass): Lose memoize support.
12600 * init.c (build_offset_ref): Likewise.
12601
12602 Never change BINFO_INHERITANCE_CHAIN.
12603 * init.c (emit_base_init): Change modification of
12604 BINFO_INHERITANCE_CHAIN to an assert.
12605 * search.c (get_base_distance_recursive): Likewise.
12606 (get_base_distance): Likewise.
12607 (lookup_member): Likewise.
12608 (convert_pointer_to_single_level): Likewise.
12609 (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs.
12610 (lookup_fnfields): Likewise.
12611 * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
12612 (unshare_base_binfos): Don't call propagate_binfo_offsets.
12613 (layout_basetypes): Call propagate_binfo_offsets instead of
12614 unshare_base_binfos.
12615 * decl.c (xref_basetypes): Call unshare_base_binfos.
12616 * pt.c (instantiate_class_template): Likewise.
12617 * tree.c (reverse_path): Remove 'copy' parm; always make a
12618 temporary copy.
12619 * class.c (build_vbase_path): Just call it.
12620 * search.c (compute_access): Likewise. Don't re-reverse.
12621
12622 1998-08-27 Mark Mitchell <mark@markmitchell.com>
12623
12624 * class.c (build_vbase_path): Use reverse_path.
12625 (finish_base_struct): Move warnings for inaccessible bases to
12626 layout_basetypes.
12627 (modify_one_vtable): Remove check of TREE_USED (binfo).
12628 (fixup_vtable_deltas1): Likewise.
12629 * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
12630 (xref_tag): Remove binfos parameter.
12631 (make_binfo): Remove chain parameter.
12632 (reverse_path): Add copy parameter.
12633 * decl.c (init_decl_processing): Change calls to xref_tag.
12634 (xref_tag): Remove binfos parameter.
12635 (xref_basetypes): Change calls to make_binfo.
12636 * decl2.c (grok_x_components): Change calls to xref_tag.
12637 (handle_class_head): Likewise.
12638 * friend.c (do_friend): Likewise.
12639 * lex.c (make_lang_type): Change calls to make_binfo.
12640 * parse.y (structsp): Change calls to xref_tag.
12641 (named_complex_class_head_sans_basetype): Likewise.
12642 (named_class_head): Likewise.
12643 * rtti.c (init_rtti_processing): Likewise.
12644 * search.c (compute_access): Change calls to reverse_path.
12645 (dfs_get_vbase_types): Change calls to make_binfo.
12646 (get_vbase_types): Remove dead code.
12647 * tree.c (unshare_base_binfos): Change calls to make_binfo.
12648 (layout_basetypes): Warn here about inaccessible bases.
12649 (make_binfo): Remove chain parameter.
12650 (reverse_path): Add copy parameter.
12651
12652 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
12653
12654 * class.c: #if 0 complete_type_p.
12655 * init.c (build_java_class_ref, build_new_1): Remove unused locals.
12656 * method.c (process_overload_item): Likewise.
12657 * typeck.c (comp_target_types): Likewise.
12658
12659 Stop sharing binfos for indirect virtual bases.
12660 * tree.c (propagate_binfo_offsets): Unshare vbases, too.
12661 (layout_basetypes): Likewise.
12662 (unshare_base_binfos): Copy vbases, too.
12663 * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
12664 BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
12665 (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
12666 CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
12667 * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
12668 reference to BINFO_VIA_PUBLIC.
12669 (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
12670 (push_class_decls): Use them.
12671 (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
12672 (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
12673
12674 1998-08-27 Mark Mitchell <mark@markmitchell.com>
12675
12676 * decl.c (build_enumerator): Set DECL_CONTEXT for the
12677 CONST_DECLs.
12678
12679 1998-08-26 Mark Mitchell <mark@markmitchell.com>
12680
12681 * cp-tree.h (finish_enum): Change prototype.
12682 * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
12683 VALUES parameter. Don't try to compute mins/maxs if
12684 processing_template_decl.
12685 * parse.y (structsp): Use new calling sequence for finish_enum.
12686 * pt.c (tsubst_enum): Likewise. Take the new type as input.
12687 (lookup_template_class): Remove unused variables. Tweak.
12688 Register enums on instantiation list before substituting
12689 enumeration constants.
12690 (tsubst_decl): Remove unused variables.
12691 (regenerate_decl_from_template): Likewise.
12692
12693 * decl.c (duplicate_decls): Don't obliterate the
12694 DECL_TEMPLATE_INFO for a template if we're not replacing it with
12695 anything.
12696
12697 * lex.c (do_identifier): Fix typo in comment.
12698
12699 Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12700
12701 * errfn.c: Remove stdarg.h/varargs.h.
12702 * tree.c: Likewise.
12703
12704 1998-08-25 Brendan Kehoe <brendan@cygnus.com>
12705
12706 * pt.c (tsubst_copy): Only do typename overloading on an
12707 IDENTIFIER_NODE that happens to look like a typename if it actually
12708 has a type for us to use.
12709
12710 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
12711
12712 * typeck.c (comp_cv_target_types): Split out...
12713 (comp_target_types): From here. Don't allow cv-qual changes under
12714 a pointer if nptrs == 0. Fix OFFSET_TYPE handling.
12715 (build_ptrmemfunc): Pass 1 to nptrs.
12716 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
12717
12718 1998-08-25 Mark Mitchell <mark@markmitchell.com>
12719
12720 * search.c (dependent_base_p): Don't compare a binfo to
12721 current_class_type; use the TREE_TYPE of the binfo instead.
12722
12723 * cp-tree.h (CLASS_TYPE_P): Revise definition.
12724
12725 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
12726
12727 * decl.c (duplicate_decls): Don't complain about different
12728 exceptions from an internal decl even if pedantic.
12729
12730 * typeck.c (convert_for_assignment): Converting from pm of vbase
12731 to derived is an error, not a sorry.
12732
12733 * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
12734 * class.c (fixed_type_or_null): Rename from
12735 resolves_to_fixed_type_p. Return the dynamic type of the
12736 expression, if fixed, or null.
12737 (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type
12738 does not match the static type.
12739 (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use
12740 resolves_to_fixed_type_p again.
12741
12742 1998-08-24 Mark Mitchell <mark@markmitchell.com>
12743
12744 * pt.c (tsubst_decl): Move special case code for dealing with
12745 tricky friend templates here from ...
12746 (regenerate_decl_from_template): Here.
12747
12748 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
12749
12750 * decl.c (start_decl): Remove redundant linkage check.
12751
12752 1998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
12753
12754 * typeck.c (c_expand_return): Handle the case that valtype
12755 is wider than the functions return type.
12756
12757 1998-08-24 Mark Mitchell <mark@markmitchell.com>
12758
12759 * cp-tree.h (CLASS_TYPE_P): New macro.
12760 * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
12761 * pt.c (process_template_parm): Undo previous change.
12762
12763 1998-08-24 Benjamin Kosnik <bkoz@cygnus.com>
12764
12765 * cp-tree.h: Declare.
12766 * pt.c (decl_template_parm_p): New function.
12767 * decl.c (pushdecl): Check decls for redeclaring template parms.
12768 (xref_tag): Make redeclaration an error, print decl.
12769 * decl2.c (grokfield): Check field_decls for redeclaration as well.
12770
12771 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
12772
12773 * parse.y (primary): Fix up the type of string constants.
12774
12775 1998-08-24 Mark Mitchell <mark@markmitchell.com>
12776
12777 * typeck.c (convert_for_initialization): Move check for odd uses
12778 of NULL to avoid duplicate warnings.
12779
12780 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
12781
12782 * tree.c (lvalue_type): Fix for arrays.
12783 * typeck.c (string_conv_p): New fn.
12784 (convert_for_assignment): Use it.
12785 (build_unary_op): Use lvalue_type.
12786 * call.c (standard_conversion, convert_like): Use string_conv_p.
12787 (add_function_candidate): Use lvalue_type.
12788 * cvt.c (convert_to_reference): Likewise.
12789 * decl2.c (lang_decode_option): Ignore -traditional.
12790 * decl.c (init_decl_processing): flag_writable_strings inhibits
12791 flag_const_strings.
12792
12793 1998-08-24 Andrew MacLeod <amacleod@cygnus.com>
12794
12795 * lang-options.h (lang_options): Add fconst-strings to the list
12796 of valid options.
12797 * decl2.c (lang_f_options, lang_decode_option): Likewise.
12798
12799 1998-08-24 Nathan Sidwell <nathan@acm.org>
12800
12801 * lex.c (real_yylex): Don't warn about long long constants if
12802 we're allowing long long.
12803
12804 1998-08-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
12805
12806 * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
12807 accessing bindings directly.
12808
12809 * search.c (my_tree_cons): Reimplement.
12810
12811 * lang-specs.h: Remove __HONOR_STD.
12812 * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
12813
12814 1998-08-23 Mark Mitchell <mark@markmitchell.com>
12815
12816 * decl.c (grokdeclarator): Complain about in-class initialization
12817 of aggregates and/or references.
12818 * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
12819 TEMPLATE_TYPE_PARMs.
12820
12821 * decl2.c (grok_array_decl): Add comment.
12822 (mark_used): Don't instantiate an explicit instantiation.
12823 * friend.c (make_friend_class): Remove bogus comment. Fix check
12824 for partial specializations.
12825 * pt.c (check_explicit_specialization): Don't
12826 SET_DECL_EXPLICIT_INSTANTIATION here.
12827 (mark_decl_instantiated): Or here.
12828 (do_decl_instantiation): Do it here, instead. Add checks for
12829 duplicate explicit instantiations, etc. Tidy.
12830 (do_type_instantiation): Likewise.
12831 (instantiate_decl): Improve comments. Complain about explicit
12832 instantiations where no definition is available.
12833
12834 * cp-tree.h (ansi_null_node): Remove.
12835 * call.c (build_over_call): Warn about converting NULL to an
12836 arithmetic type.
12837 * cvt.c (build_expr_type_conversion): Likewise. Use
12838 null_ptr_cst_p instead of expanding it inline.
12839 * decl.c (ansi_null_node): Remove.
12840 (init_decl_processing): Make null_node always have integral type.
12841 * except.c (build_throw): Warn about converting NULL to an
12842 arithmetic type.
12843 * lex.c (init_parse): Remove handling of ansi_null_node.
12844 * pt.c (type_unification_real): Don't convert NULL to void* type.
12845 * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
12846 (convert_for_assignment): Warn about converting NULL to an
12847 arithmetic type.
12848 (convert_for_initialization): Likewise.
12849
12850 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
12851
12852 * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
12853 * pt.c (coerce_template_parms): Use no_linkage_check.
12854 * decl.c (grokvardecl): Likewise.
12855 (grokfndecl): Likewise. Members of anonymous types have no linkage.
12856
12857 * method.c (process_overload_item): Remove useless code.
12858
12859 1998-08-20 Per Bothner <bothner@cygnus.com>
12860
12861 Handle new'ing of Java classes.
12862 * init.c (build_class_classref): New function.
12863 (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject;
12864 constructor does not return this; don't need to exception-protect.
12865
12866 * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag.
12867 * decl2.c (acceptable_java_type): Handle template-derived types.
12868
12869 1998-08-20 Per Bothner <bothner@cygnus.com>
12870
12871 * decl2.c (import_export_vtable): Suppress vtables for Java classes.
12872
12873 1998-08-20 Mark Mitchell <mark@markmitchell.com>
12874
12875 * decl.c (duplicate_decls): Always merge the old and new patterns
12876 for templates, regardless of whether or not the new one has
12877 DECL_INITIAL. Don't throw away specializations. Merge
12878 DECL_SAVED_TREE.
12879 * pt.c (tsubst_decl): Use the right pattern when calculating the
12880 complete args for a new template instance.
12881 (do_decl_instantiation): Fix typo in comment.
12882 (regenerate_decl_from_template): Deal with tricky friend template
12883 case.
12884 (instantiate_decl): Likewise.
12885
12886 Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com)
12887
12888 * init.c (build_builtin_delete_call): Add missing assemble_external
12889 call.
12890
12891 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
12892
12893 * parse.y (notype_unqualified_id): Also accept ~A<int>.
12894
12895 1998-08-19 Mark Mitchell <mark@markmitchell.com>
12896
12897 * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
12898 arithmetic.
12899 * except.c (build_throw): Warn when NULL is thrown, even with
12900 -ansi. Use ansi_null_node, rather than integer_zero_node, in the
12901 thrown expression.
12902
12903 * cp-tree.h (ansi_null_node): New variable.
12904 * decl.c (ansi_null_node): New variable.
12905 (init_decl_processing): Initialize its type.
12906 * lex.c (init_parse): Initialize its value. Use ansi_null_node
12907 for null_node in non-ANSI mode.
12908 * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
12909 place of null_node to avoid spurious errors.
12910
12911 1998-08-17 Mark Mitchell <mark@markmitchell.com>
12912
12913 * cp-tree.h (enter_scope_of): New function.
12914 * parse.y (complex_direct_notype_declarator): Use it.
12915 * semantics.c (enter_scope_of): New function.
12916
12917 1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
12918
12919 * decl.c (grokparms): No, here.
12920
12921 * decl.c (grokdeclarator): Catch parm with pointer to array of
12922 unknown bound here...
12923 * method.c (process_overload_item): ...not here.
12924
12925 * gxxint.texi: Remove obsolete documentation of overloading code.
12926
12927 * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
12928 * class.c (finish_struct_bits): Likewise.
12929
12930 * tree.c (lvalue_type): Fix for arrays.
12931 * typeck.c (build_unary_op): Use lvalue_type.
12932 * call.c (add_function_candidate): Likewise.
12933 * cvt.c (convert_to_reference): Likewise.
12934
12935 * decl2.c (lang_decode_option): Ignore -traditional.
12936
12937 * init.c (build_offset_ref): Don't mess with error_mark_node.
12938 * lex.c (do_scoped_id): Use cp_error.
12939
12940 * rtti.c (get_tinfo_fn): Don't mess with the context for now.
12941
12942 1998-08-17 Benjamin Kosnik <bkoz@loony.cygnus.com>
12943
12944 * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
12945
12946 Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com)
12947
12948 * cp-tree.h (set_identifier_local_value): Provide prototype.
12949
12950 * decl2.c (do_namespace_alias): Remove unused variables `binding'
12951 and `old'.
12952
12953 Fri Aug 14 16:42:27 1998 Nick Clifton <nickc@cygnus.com>
12954
12955 * Makefile.in: Rename BBISON to BISON so that it can be properly
12956 inherited from the parent makefile.
12957
12958 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
12959
12960 * lang-options.h: Add -finit-priority.
12961 * decl2.c: Likewise. Check flag_init_priority instead of
12962 USE_INIT_PRIORITY.
12963
12964 * decl2.c (setup_initp): New fn.
12965 (start_objects, finish_objects, do_ctors): Handle init_priority.
12966 (do_dtors, finish_file): Likewise.
12967
12968 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
12969
12970 * pt.c (tsubst_copy): Hush warning.
12971
12972 * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
12973
12974 1998-08-12 Mark Mitchell <mark@markmitchell.com>
12975
12976 * pt.c (print_template_context): Don't abort when instantiating a
12977 synthesized method.
12978
12979 * decl.c (grokdeclarator): Issue errors on namespace qualified
12980 declarators in parameter lists or in class scope.
12981
12982 1998-08-09 Mark Mitchell <mark@markmitchell.com>
12983
12984 * pt.c (check_explicit_specialization): Don't abort on bogus
12985 explicit instantiations.
12986
12987 1998-08-07 Mark Mitchell <mark@markmitchell.com>
12988
12989 * typeck.c (require_complete_type): Use complete_type_or_else.
12990 (complete_type_or_else): Always return NULL_TREE on failure, as
12991 documented.
12992
12993 * pt.c (tsubst_aggr_type): Prototype.
12994 (tsubst_decl): New function, split out from tsubst. Set
12995 input_filename and lineno as appropriate.
12996 (pop_tinst_level): Restore the file and line number saved in
12997 push_tinst_level.
12998 (instantiate_class_template): Set input_filename and lineno as
12999 appropriate.
13000 (tsubst): Move _DECL processing to tsubst_decl. Make sure the
13001 context for a TYPENAME_TYPE is complete.
13002
13003 * decl2.c (grokbitfield): Issue errors on bitfields declared with
13004 function type.
13005 (do_dtors): As in do_ctors, pretend to be a member of the same
13006 class as a static data member while generating a call to its
13007 destructor.
13008
13009 * cvt.c (cp_convert_to_pointer): Handle NULL pointer
13010 conversions, even in complex virtual base class hierarchies.
13011
13012 1998-08-06 Mark Mitchell <mark@markmitchell.com>
13013
13014 * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
13015 (TYPE_TEMPLATE_INFO): Likewise.
13016 (SET_TYPE_TEMPLATE_INFO): Likewise.
13017 (ENUM_TI_TEMPLATE): Likewise.
13018 (ENUM_TI_ARGS): Likewise.
13019 (lookup_nested_type_by_name): Remove.
13020 * decl.c (maybe_process_template_type_declaration): Handle enums.
13021 (start_enum): Don't check for primary-template enum declarations
13022 here.
13023 (finish_enum): Clean up, document. Make sure template enum
13024 constants get the correct type.
13025 (build_enumerator): Copy initializers for template enumerations,
13026 too.
13027 (grok_enum_decls): Document.
13028 * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
13029 better. Build LOOKUP_EXPRs for local variables, even if they are
13030 TREE_PERMANENT.
13031 * pt.c (tsubst_enum): Remove field_chain parameter.
13032 (template_class_depth): Include the depth of surrounding function
13033 contexts.
13034 (push_template_decl): Check for primary-template enum declarations
13035 here. Deal with enumeration templates.
13036 (lookup_template_class): Likewise.
13037 (for_each_template_parm): Likewise.
13038 (instantiate_class_template): Don't call tsubst_enum directly,
13039 call tsubst instead, to instantiate enums. Deal with all
13040 field_chain issues here, not in tsubst_enum.
13041 (lookup_nested_type_by_name): Remove.
13042 (tsubst_aggr_type): Revise handling of enumeration types.
13043 (tsubst): Likewise.
13044 (tsubst_copy): Likewise.
13045 (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
13046
13047 1998-08-04 Mark Mitchell <mark@markmitchell.com>
13048
13049 * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
13050 uses template parameters.
13051 * method.c (build_template_parm_names): Use the full set of
13052 template arguments for tsubst'ing.
13053 (build_overload_identifier): Pass the full set of template
13054 arguments to build_template_parm_names, not just the
13055 innermost_args.
13056 * pt.c (TMPL_ARGS_DEPTH): Define using
13057 TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
13058 (NUM_TMPL_ARGS): New macro.
13059 (add_outermost_template_args): Deal with the case where the outer
13060 args will be completely discarded.
13061 (coerce_template_parms): Use the full set of template arguments
13062 for tsubst'ing. Simplify. Add some asserts. Improve
13063 error messages.
13064 (lookup_template_class): Pass the full set of template arguments
13065 to coerce_template_parms.
13066 (tsubst): Add assertion.
13067 (do_type_instantiation): Don't instantiate member template
13068 classes.
13069
13070 * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
13071 name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
13072
13073 1998-08-03 Jason Merrill <jason@yorick.cygnus.com>
13074
13075 * method.c (set_mangled_name_for_decl): Change return type to void.
13076
13077 * decl.c (lookup_name_real): A namespace-level decl takes priority
13078 over implicit typename. Avoid doing the same lookup twice.
13079
13080 * search.c (dependent_base_p): New fn.
13081 (dfs_pushdecls, dfs_compress_decls): Use it.
13082
13083 * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
13084 virtual functions if the type doesn't have any.
13085
13086 1998-08-03 Mark Mitchell <mark@markmitchell.com>
13087
13088 * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
13089 uses template parameters.
13090
13091 1998-08-02 Mark Mitchell <mark@markmitchell.com>
13092
13093 * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument.
13094 * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
13095 * lex.c (do_identifier): Don't use a second argument, or a type,
13096 when building LOOKUP_EXPRs.
13097 (do_identifier): Likewise.
13098 (do_scoped_id): Likewise.
13099 * method.c (hack_identifier): Improve error message.
13100 * pt.c (lookup_template_function): Don't needlessly call
13101 copy_to_permanent or build_min.
13102 (tsubst_copy): Remove #if 0'd code. tsubst into LOOKUP_EXPRs if
13103 necessary.
13104 (do_decl_instantiation): Improve error message.
13105 * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
13106 (build_min): Copy the type to the permanent obstack, too.
13107
13108 1998-08-01 Jason Merrill <jason@yorick.cygnus.com>
13109
13110 * init.c (init_init_processing): Remove BI* handling.
13111 (build_builtin_call): Remove.
13112 (build_builtin_delete_call): New fn.
13113 (build_delete): Use it.
13114
13115 1998-07-31 Mark Mitchell <mark@markmitchell.com>
13116
13117 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
13118 (maybe_check_template_type): New function.
13119 * decl.c (maybe_process_template_type_declaration): New function,
13120 split out from pushtag Call maybe_check_template_type.
13121 (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P.
13122 (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
13123 * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
13124 * pt.c (template_class_depth_real): Generalization of ...
13125 (template_class_depth): Use it.
13126 (register_specialization): Use duplicate_decls for duplicate
13127 declarations of specializations.
13128 (maybe_check_template_type): New function.
13129 (push_template_decl_real): Fix comment.
13130 (convert_nontype_argument): Likewise.
13131 (lookup_template_class): Likewise. Avoid an infinite loop on
13132 erroneous code.
13133 (tsubst_friend_function): Fix comment.
13134 (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
13135 an IDENTIFIER_NODE.
13136 * semantics.c (begin_function_definition): Use
13137 reset_specialization to note that template headers don't apply
13138 directly to declarations after the opening curly for a function.
13139
13140 1998-07-29 Jason Merrill <jason@yorick.cygnus.com>
13141
13142 * decl.c (push_overloaded_decl): Use current_namespace instead of
13143 DECL_CONTEXT (decl) to determine where we go.
13144
13145 * decl.c (lookup_name_real): Fix typo.
13146
13147 1998-07-28 Mark Mitchell <mark@markmitchell.com>
13148
13149 * friend.c (is_friend): Be lenient with member functions to deal
13150 with nested friends.
13151
13152 1998-07-28 Jason Merrill <jason@yorick.cygnus.com>
13153
13154 * class.c (finish_struct_1): Convert integer_zero_node to
13155 ssizetype before passing it to set_rtti_entry.
13156 * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
13157 of any size to a pointer.
13158
13159 1998-07-27 Mark Mitchell <mark@markmitchell.com>
13160
13161 * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
13162 (build_template_decl_overload): Remove.
13163 (set_mangled_name_for_decl): New function.
13164 (innermost_args): Remove is_spec parameter.
13165 (most_specialized, most_specialized_class): Remove declarations.
13166 (lookup_template_class): Add entering_scope parameter.
13167 (maybe_process_partial_specialization): New function.
13168 (finish_template_decl): Likewise.
13169 (finish_template_type): Likewise.
13170 * class.c (finish_struct): Clean up processing of member template
13171 specializations.
13172 * decl.c (pushtag): Fix formatting.
13173 (lookup_tag): Improve handling of pseudo-global levels.
13174 (make_typename_type): Adjust call to lookup_template_class.
13175 (shadow_tag): Use maybe_process_partial_specialization.
13176 (xref_tag): Improve handling of member friends.
13177 (start_function): Call push_nested_class before
13178 push_template_decl. Don't call push_template_decl for
13179 specializations.
13180 * decl2.c (grok_x_components): Don't call xref_tag for
13181 template instantiations. Handle UNION_TYPEs like RECORD_TYPEs.
13182 (grokclassfn): Use set_mangled_name_for_decl.
13183 (arg_assoc_class): Adjust call to innermost_args.
13184 (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
13185 * error.c (dump_function_name): Improve printing of template
13186 function names.
13187 * friend.c (is_friend): Don't compare types of decls to determine
13188 friendship, unless flag_guiding_decls.
13189 (make_friend_class): Partial specializations cannot be friends.
13190 (do_friend): Use set_mangled_name_for_decl. Call
13191 push_template_decl_real instead of push_template_decl.
13192 * method.c (build_decl_overload_real): Remove prototype. Give it
13193 external linkage.
13194 (build_overload_identififer): Adjust call to innermost_args.
13195 (build_template_decl_overload): Remove.
13196 (set_mangled_name_for_decl): New function.
13197 * parse.y (.finish_template_type): New non-terminal.
13198 (template_def): Use finish_template_decl. Use template_extdef
13199 instead of extdef.
13200 (template_extdef, template_datadef): New non-terminals, containing
13201 only those rules for things which can be templates.
13202 (datadef): Tidy.
13203 (template_type, self_template_type): Use .finish_template_type.
13204 (named_class_head): Use maybe_process_partial_specialization.
13205 * pt.c (mangle_class_name_for_template): Remove context parameter.
13206 (get_class_bindings): Remove outer_args parameter.
13207 (complete_template_args): Remove.
13208 (add_outermost_template_args): New function.
13209 (register_specialization): Return the specialization.
13210 (unregister_specialization): New function.
13211 (tsubst_template_parms): Likewise.
13212 (most_specialized, most_specialized_class): Prototype here as
13213 static.
13214 (original_template): Rename to most_general_template.
13215 (tsubst_template_parms): New function.
13216 (set_mangled_name_for_template_decl): Likewise.
13217 (TMPL_ARGS_DEPTH): New macro.
13218 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
13219 (TMPL_ARGS_LEVEL): New macro.
13220 (SET_TMPL_ARGS_LEVEL): Likewise.
13221 (TMPL_ARG): Likewise.
13222 (SET_TMPL_ARG): Likewise.
13223 (TMPL_ARGS_DEPTH): Likewise.
13224 (finish_member_template_decl): Use finish_template_decl.
13225 (maybe_process_partial_specialization): New function, split out
13226 from tsubst.
13227 (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
13228 (maybe_begin_member_template_processing): Use new macros.
13229 (is_member_template): Likewise.
13230 (is_member_template_class): Likewise.
13231 (add_to_template_args): Likewise. Deal with multiple levels of
13232 args.
13233 (maybe_process_partial_specialization): New function.
13234 (retrieve_specialization): Add consistency check.
13235 (determine_specialization): Return full argument list.
13236 (check_explicit_specialization): Tweak friend handling. Use full
13237 argument lists. Simplify.
13238 (current_template_args): Use new macros.
13239 (push_template_decl_real): Change ill-named mainargs to specargs.
13240 Check that a partial specialization actually specializes at least
13241 one parameter. Improve friend handling. Modify for full
13242 template arguments.
13243 (classtype_mangled_name): Don't mangle the names of
13244 specializations.
13245 (lookup_template_class): Add entering_scope parameter. Use it to
13246 avoid finding a template type when an instantiation is required.
13247 Simplify. Use full template arguments.
13248 (tsubst_friend_function): Use unregister_specialization. Use new
13249 macros. Use full template arguments.
13250 (tsubst_friend_class): Substitute, using tsubst_template_parms,
13251 into the template parameters before passing them to
13252 redeclare_class_template.
13253 (instantiate_class_template): Simplify. Use full template
13254 arguments. Adjust calls to get_class_bindings. Use
13255 SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling.
13256 (innermost_args): Use new macros.
13257 (tsubst_aggr_type): New function, split out from tsubst.
13258 (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
13259 conventions for lookup_template_class. Refine handling of partial
13260 instantiations. Remove calls to complete_template_args.
13261 Simplify. Add consistency checks. Use set_mangled_name_for_decl
13262 and set_mangled_name_for_template_decl.
13263 (tsubst_copy): Use tsubst_aggr_type.
13264 (instantiate_template): Use full template arguments.
13265 (more_specialized): Improve formatting.
13266 (more_specialized_class): Adjust calls to get_class_bindings.
13267 (get_bindings_real): Don't call complete_template_args.
13268 (most_specialized): Don't overwrite input; create a new list.
13269 (most_specialized_class): Use most_general_template.
13270 (regenerate_decl_from_template): Use unregister_specialization.
13271 Use full template arguments.
13272 (instantiate_decl): Use full template arguments.
13273 (set_mangled_name_for_template_decl): New function.
13274 * semantics.c (begin_class_definition): Use
13275 maybe_process_partial_specialization.
13276 (finish_member_class_template): New function.
13277 (finish_template_decl): Likewise.
13278 (finish_template_type): Likewise.
13279 (typeck.c): Don't crash after issuing a compiler_error.
13280 * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
13281
13282 1998-07-27 Jason Merrill <jason@yorick.cygnus.com>
13283
13284 * typeck2.c (build_functional_cast): Handle default-initialization.
13285
13286 * call.c (build_over_call): Pass 1 to popclass.
13287
13288 * parse.y (direct_notype_declarator): Add precedence declaration
13289 to notype_unqualified_id case.
13290 * Makefile.in (EXPECT): Adjust.
13291
13292 * tree.c (ovl_member): Fix for single function in OVL.
13293
13294 1998-07-27 Dave Brolley <brolley@cygnus.com>
13295
13296 * c-lex.c (yylex): Fix boundary conditions in character literal and
13297 string literal loops.
13298
13299 1998-07-24 Jason Merrill <jason@yorick.cygnus.com>
13300
13301 * decl.c (lookup_name_real): OK, do return the from_obj value
13302 unless got_object depends on template parms.
13303
13304 * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
13305
13306 * pt.c (coerce_template_parms): Also complain about local enums.
13307
13308 * cp-tree.h: Add prototype for set_identifier_local_value.
13309 * decl.c (set_identifier_local_value_with_scope): Make static,
13310 prototype.
13311 * search.c (covariant_return_p): Likewise.
13312 * except.c (build_terminate_handler, alloc_eh_object): Likewise.
13313
13314 * call.c (build_method_call): Only pull out the type of a destructor
13315 if it's a template type parm.
13316 * decl.c (lookup_name_real): Never return the from_obj value.
13317
13318 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
13319
13320 * except.c (process_start_catch_block_old): Call start_decl_1 for
13321 catch parm.
13322 * decl.c (start_decl_1): Avoid duplicate error.
13323
13324 * init.c (expand_default_init): Only perform the initialization if
13325 it will do something.
13326
13327 1998-07-23 H.J. Lu (hjl@gnu.org)
13328
13329 * parse.y (base_class): Check for invalid base class.
13330
13331 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
13332
13333 * decl2.c (import_export_template): Fold in...
13334 (import_export_class): ...to here. Handle dllimport/export.
13335
13336 * class.c (build_vtable): Pass at_eof to import_export_vtable.
13337 (prepare_fresh_vtable): Likewise.
13338 * decl2.c (import_export_class): Split out...
13339 (finish_prevtable_vardecl): From here.
13340 * class.c (finish_struct_1): Call import_export_class if at_eof.
13341
13342 * decl.c (start_function): #if 0 mysterious code I wrote and have
13343 forgotten why.
13344 * rtti.c (get_tinfo_fn): If this is for a class type, set
13345 DECL_CONTEXT.
13346
13347 1998-07-22 Jason Merrill <jason@yorick.cygnus.com>
13348
13349 * inc/exception: Change terminate and unexpected to ().
13350
13351 * parse.y (named_class_head_sans_basetype_defn): A
13352 named_class_head_sans_basetype followed by '{' or ':' is a defn.
13353
13354 1998-07-21 Jason Merrill <jason@yorick.cygnus.com>
13355
13356 * tree.c (canonical_type_variant): New fn to handle arrays.
13357 * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
13358 * pt.c (unify, default case): Also fold arg. Fix array bounds case.
13359 * method.c (process_overload_item): Use build_overload_value for
13360 arrays.
13361
13362 1998-07-20 Dave Brolley <brolley@cygnus.com>
13363
13364 * lex.c (mbchar.h): #include it.
13365 (GET_ENVIRONMENT): New macro.
13366 (init_parse): Set character set based on LANG environment variable.
13367 (real_yylex): Handle multibyte characters in character literals.
13368 (real_yylex): Handle multibyte characters in string literals.
13369
13370 1998-07-19 Jason Merrill <jason@yorick.cygnus.com>
13371
13372 * lex.c (do_identifier): Look for class value even if we don't
13373 have a global value. Do implicit declaration if parsing is 2.
13374 * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
13375 lookup.
13376
13377 1998-07-19 Mark Mitchell <mark@markmitchell.com>
13378
13379 * decl.c (pushtag): Revert previous change.
13380 * pt.c (lookup_template_class): Don't put out debugging
13381 information for types that use template parameters.
13382
13383 * decl.c (pushtag): Don't put out debugging information for
13384 compiler-generated typedefs.
13385
13386 * error.c (dump_type_real): Don't crash when presented with
13387 intQI_type_node or the like.
13388
13389 * semantics.c (finish_translation_unit): Fix spelling error in
13390 comment.
13391
13392 1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
13393
13394 * decl.c (lookup_name_real): Pull out single function here.
13395 (select_decl): Not here.
13396 (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
13397
13398 * decl.c (qualify_lookup): Tweak again.
13399
13400 * pt.c (lookup_template_class): Don't mess with the context of the
13401 instantiation.
13402 * decl2.c (current_decl_namespace): Remove special handling for
13403 templates.
13404
13405 * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
13406 a member template specialization.
13407
13408 * tree.c (ovl_member): Use decls_match to compare functions.
13409 * decl.c (decls_match): Check the context of a function.
13410
13411 * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
13412 in Koenig lookup support rules.
13413 * semantics.c (finish_call_expr): Handle the new cases.
13414
13415 * typeck.c (build_x_function_call): Handle overloaded methods.
13416
13417 * decl.c (grokvardecl): Don't call build_static_name for extern "C".
13418
13419 1998-07-16 Mark Mitchell <mark@markmitchell.com>
13420
13421 * semantics.c (finish_object_call_expr): Revert previous change.
13422 * call.c (build_new_method_call): Likewise. Instead, convert
13423 TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
13424
13425 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
13426
13427 * decl.c (qualify_lookup): Handle templates.
13428
13429 * decl2.c (do_using_directive): Don't pass ancestor.
13430 * decl.c (push_using_directive): Calculate ancestor.
13431
13432 * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
13433 * decl.c (pushdecl): Move type shadowing handling from here...
13434 (duplicate_decls): ...to here.
13435 * decl.c (set_identifier_local_value_with_scope): New fn.
13436 (pushdecl): Use it.
13437 (set_identifier_local_value, lookup_type_current_level): New fns.
13438 * decl2.c (do_local_using_decl): Handle types and binding level
13439 stuff properly.
13440
13441 * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
13442 * decl.c (select_decl): Extract a lone function from an OVERLOAD.
13443 (lookup_namespace_name): Likewise.
13444 * typeck.c (build_unary_op): Not here anymore.
13445
13446 * decl2.c (do_class_using_decl): Make sure we get an identifier.
13447 * class.c (handle_using_decl): Ignore TYPE_DECLs.
13448
13449 * decl.c (qualify_lookup): New fn.
13450 (lookup_name_real): Use it.
13451
13452 1998-07-16 Martin v. Loewis <loewis@informatik.hu-berlin.de>
13453
13454 * decl2.c (add_using_namespace): When directly using a namespace
13455 that was indirect before, promote it.
13456
13457 * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
13458 LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
13459 LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
13460 * decl.c (select_decl): Replace two flag parameters by one.
13461 (unqualified_namespace_lookup): Likewise, pass flag.
13462 (lookup_flags): New function.
13463 (lookup_name_real): Compute flags, pass them.
13464 (lookup_namespace_name): Call with zero-flag.
13465 * decl2.c (ambiguous_decl): Add flag parameter, complain only
13466 according to flags.
13467 (lookup_using_namespace, qualified_lookup_using_namespace):
13468 Add flag parameter, pass them through.
13469 * lex.c (do_scoped_id): Call with zero-flag.
13470
13471 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
13472
13473 * typeck.c (convert_for_assignment): Use comptypes.
13474
13475 1998-07-16 Mark Mitchell <mark@markmitchell.com>
13476
13477 * semantics.c (finish_object_call_expr): Move test for the
13478 function called being a TYPE_DECL to ...
13479 * call.c (build_new_method_call): Here.
13480
13481 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
13482
13483 * decl2.c (arg_assoc_class): Also look at template arguments, if any.
13484 (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
13485
13486 * lex.c (looking_for_typename): Don't initialize.
13487
13488 * decl2.c (ambiguous_decl): Clarify error message.
13489
13490 * decl.c (push_using_directive): Iterate over namespaces used
13491 indirectly.
13492
13493 1998-07-15 Martin v. Löwis <loewis@informatik.hu-berlin.de>
13494
13495 * decl2.c (add_using_namespace): Iterate over namespaces used
13496 indirectly.
13497
13498 * decl.c (lookup_name_real): Accept namespace aliases as locals.
13499 (cat_namespace_levels): Ignore aliases.
13500 (duplicate_decls): Ignore duplicate aliases.
13501 * decl2.c (do_namespace_alias): Process block level namespace
13502 aliases. Store alias with pushdecl. Remove odr errors.
13503 * parse.y (namespace_alias): New non-terminal.
13504 (extdef): Use it.
13505
13506 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
13507
13508 * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
13509 Handle TEMPLATE_TYPE_PARM.
13510 (arg_assoc): Rewrite.
13511
13512 * pt.c (complete_template_args): Don't look at the context unless
13513 we have to.
13514
13515 * method.c (build_decl_overload_real): Fix namespace handling.
13516
13517 * typeck.c (build_unary_op): Extract a lone function from an
13518 OVERLOAD.
13519
13520 * call.c (build_scoped_method_call): Handle getting a namespace
13521 for basetype in a destructor call.
13522 (check_dtor_name): Handle enums.
13523
13524 * parse.y (using_directive): New nonterminal.
13525 (extdef, simple_stmt): Use it.
13526
13527 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
13528
13529 * decl2.c (add_function): Move error message ...
13530 (arg_assoc_namespace): ... from here.
13531
13532 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
13533
13534 * parse.y (namespace_qualifier): Fix multiple level handling.
13535 * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
13536 (arg_assoc): Don't skip the first argument of a function.
13537
13538 Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com)
13539
13540 * search.c (my_tree_cons): Clean up.
13541
13542 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
13543
13544 * call.c (joust): Don't warn about "confusing" conversions to the
13545 same type.
13546
13547 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
13548
13549 * class.c (push_nested_class): Complain about namespaces.
13550 * decl.c (start_decl): Enter the object's namespace.
13551 (cp_finish_decl): Leave it.
13552 (grokdeclarator): Likewise.
13553 * decl2.c (check_decl_namespace): New function.
13554 (finish_file): Call it.
13555 * parse.y (complex_direct_notype_declarator): Set complexity
13556 of namespace-qualified ids to -1, enter the namespace.
13557
13558 * method.c (build_template_decl_overload): Expect _DECL as first
13559 parameter. Put context temporarily into current_namespace.
13560 * pt.c (check_explicit_specialization): Change caller.
13561 (tsubst): Likewise.
13562
13563 * init.c (build_offset_ref): Call mark_used and
13564 convert_from_reference for namespace members.
13565
13566 Mon Jul 13 23:25:28 1998 Martin von Löwis <loewis@informatik.hu-berlin.de>
13567
13568 * search.c (my_tree_cons): The bitfield is at index 2.
13569
13570 Mon Jul 13 17:21:01 1998 Nick Clifton <nickc@cygnus.com>
13571
13572 * lang-options.h: Format changed to work with new --help support
13573 in gcc/toplev.c
13574
13575 1998-07-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
13576
13577 * decl2.c (build_expr_from_tree): Change calls of do_identifier.
13578 Do Koenig lookup in CALL_EXPR.
13579 (arg_assoc): Handle error_mark.
13580 * lex.c (is_global): New function.
13581 (do_identifier): Expect arguments for Koenig lookup.
13582 * parse.y (primary): Add rules for calls of unqualified function calls.
13583 (do_id): Change call of do_identifier.
13584 * pt.c (finish_stmt_expr): Likewise.
13585 * semantics.c (finish_id_expr): Likewise.
13586 (finish_call_expr): Add integer parameter to indicate
13587 argument-dependent lookup.
13588
13589 * decl.c (struct binding_level): New field using_directives.
13590 (push_using_decl): Not sorry anymore.
13591 (push_using_directive): New function.
13592 (lookup_tag): Use CP_DECL_CONTEXT to iterate.
13593 (unqualified_namespace_lookup): New function, code from ...
13594 (lookup_name_real): ... here.
13595 * decl2.c (lookup_using_namespace): Pass using list instead of
13596 initial scope.
13597 (validate_nonmember_using_decl): New function.
13598 (do_nonmember_using_decl): New function.
13599 (do_toplevel_using_decl): Use them.
13600 (do_local_using_decl): New function.
13601 (do_using_directive): Support block-level directives.
13602 * parse.y (simple_stmt): Support using declarations and
13603 directives.
13604 (namespace_qualifier, namespace_using_decl): New non-terminals.
13605
13606 * xref.c (classname): New function.
13607 (GNU_xref_hier): Change class and base parameters to tree.
13608 * decl.c (xref_baseypes): Change caller.
13609 * friend.c (make_friend_class): Likewise.
13610
13611 1998-07-12 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
13612
13613 * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
13614 comparison.
13615
13616 * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
13617 template template parameter, record its use.
13618 (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
13619 its template arguments if exists.
13620
13621 * pt.c (coerce_template_template_parms): New function equivalent
13622 to coerce_template_parms when IS_TMPL_PARM is true.
13623 (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter,
13624 all callers changed.
13625
13626 (coerce_template_parms): Access ARGLIST properly when creating a
13627 new vector. Only accept implicit TYPE_DECL as valid argument for
13628 a template template parameter when it is a base class of
13629 current_class_type. Don't display error message when COMPLAIN is
13630 false.
13631
13632 1998-07-12 Klaus Kaempf (kkaempf@progis.de)
13633
13634 * repo.c (get_base_filename): Use file_name_nondirectory.
13635 (open_repo_file): Likewise.
13636 * cp-tree.h (file_name_nondirectory): Add prototype.
13637
13638 1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
13639
13640 * friend.c (do_friend): Pull the identifier out of declarator.
13641 Use cp_error and friends.
13642 * decl2.c (qualified_lookup_using_namespace): Fix call to
13643 purpose_member.
13644 * decl.c (lookup_name_real): Don't call complete_type on a namespace.
13645 (grokvardecl): Use DECL_CLASS_SCOPE_P.
13646 * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
13647 * class.c (warn_hidden): Fix for OVERLOAD.
13648 From grahams@rcp.co.uk:
13649 * cp-tree.h (DEFARG_NODE_CHECK): New macro.
13650 (DEFARG_LENGTH, DEFARG_POINTER): Use it.
13651
13652 Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com)
13653
13654 * g++.1 (-traditional): Remove duplicated documentation.
13655
13656 1998-07-11 Mark Mitchell <mark@markmitchell.com>
13657
13658 * method.c (flush_repeats): Add nrepeats parameter.
13659 (issue_nrepeats): Likewise.
13660 (is_back_referenceable_type): New function. Don't back-reference
13661 TEMPLATE_TYPE_PARMs as well as simple types like integers.
13662 (build_mangled_name_for_type): Likewise.
13663 (build_mangled_name_for_type_with_Gcode): Likewise.
13664 (lasttype): Remove.
13665 (nrepeats): Likewise.
13666 (Nrepeats): Likewise.
13667 (start_squangling): Don't clear the variables removed above.
13668 (end_squangling): Likewise.
13669 (flush_repeats): Tidy. Use nrepeats parameter rather than
13670 Nrepeats global.
13671 (issue_nrepeats): Likewise, but with nrepeats global. Use
13672 is_backreferenceable_type.
13673 (build_overload_nested_name): Tidy. Add comment. Use
13674 build_mangled_name_for_type.
13675 (build_underscore_int): Comment.
13676 (build_overload_scope_ref): Use build_mangled_name_for_type.
13677 (build_overload_int): Likewise.
13678 (build_template_template_parm_names): Tidy.
13679 (build_template_parm_names): Use build_mangled_name_for_type.
13680 (build_overload_identifier): Add comments.
13681 (build_mangled_name_for_type_with_Gcode): Split out from
13682 build_mangled_name.
13683 (build_mangled_name_for_type): Use it.
13684 (build_mangled_name): Rework to use build_mangled_name_for_type
13685 and to not use global nrepeats/Nrepeats. Tidy.
13686 (process_modifiers): Tidy.
13687 (check_btype): Use is_backreferenceable_type. Add comment.
13688 Rename `node' to `type'.
13689 (process_overload_item): Set numeric_output_need_bar here.
13690 Use build_mangled_name_for_type. Tidy.
13691 (build_decl_overload_real): Tidy. Don't use Nrepeats. Use
13692 build_mangled_name_for_type.
13693
13694 * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
13695 for TYPE_DECLs.
13696
13697 1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com>
13698
13699 * cp-tree.h (warn_long_long): Define.
13700 * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
13701 warning "ANSI C++ does not support `long long'".
13702 * decl2.c (warn_long_long): Define.
13703 (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
13704
13705 1998-07-07 Jason Merrill <jason@yorick.cygnus.com>
13706
13707 * decl.c (xref_tag): Handle attributes between 'class' and name.
13708 * parse.y (aggr): Likewise.
13709 * semantics.c (finish_class_definition): Likewise.
13710 * Makefile.in (EXPECTED): Adjust.
13711
13712 * cp-tree.h: Declare flag_optional_diags and warn_multichar.
13713 * decl2.c: Define them.
13714 (lang_decode_option): Handle them.
13715 * lang-options.h: Add -foptional-diags.
13716 * class.c (finish_struct): Don't complain about multiple meanings of
13717 name if -fno-optional-diags.
13718 * decl.c (pushdecl_class_level): Likewise.
13719 * lex.c (real_yylex): Check warn_multichar.
13720
13721 1998-07-06 Jason Merrill <jason@yorick.cygnus.com>
13722
13723 * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
13724
13725 * tree.c (make_binfo): Fix length.
13726
13727 1998-06-30 Benjamin Kosnik <bkoz@bliss.nabi.net>
13728
13729 * decl2.c (lang_decode_option): Remove warn_template_debugging.
13730 * lang-options.h: Likewise.
13731
13732 Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13733
13734 * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
13735 (process_start_catch_block): Likewise for variables
13736 `false_label_rtx', `call_rtx' and `return_value_rtx'.
13737
13738 1998-06-29 Brendan Kehoe <brendan@cygnus.com>
13739
13740 * tree.c (build_srcloc): Make sure we allocate this node on the
13741 permanent obstack.
13742
13743 Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com>
13744
13745 * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
13746 (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
13747 (lang_specific_driver): Only add -lm automatically if need_math is
13748 nonzero.
13749
13750 Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com)
13751
13752 * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o
13753
13754 Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13755
13756 * Makefile.in (EXPR_H): New dependency variable.
13757 (decl2.o): Depend on $(EXPR_H).
13758 (typeck.o): Likewise.
13759 (init.o): Likewise.
13760 (expr.o): Likewise.
13761
13762 1998-06-25 Benjamin Kosnik <bkoz@lisa.cygnus.com>
13763
13764 * decl.c (start_enum): Put local enums on permanent_obstack.
13765
13766 1998-06-25 Mark Mitchell <mark@markmitchell.com>
13767
13768 * cp-tree.h (c_get_alias_set): Declare.
13769 * decl.c (init_decl_processing): Set lang_get_alias_set.
13770
13771 1998-06-25 Andrew MacLeod <amacleod@cygnus.com>
13772
13773 * cp-tree.h (mark_all_runtime_matches): Add function prototype.
13774 * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
13775 flag for all function decls which are in the exception table.
13776 * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
13777 * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
13778 code is emitted for any referenced rtti function.
13779
13780 1998-06-25 Dave Brolley <brolley@cygnus.com>
13781
13782 * lang-specs.h: Use new | syntax to eliminate
13783 string concatenation.
13784
13785 1998-06-25 Jason Merrill <jason@yorick.cygnus.com>
13786
13787 * cp-tree.h (CP_DECL_CONTEXT): New macro.
13788 * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
13789 * method.c (build_overload_nested_name): Likewise.
13790 * sig.c (build_signature_pointer_or_reference_type): Don't set
13791 DECL_CONTEXT.
13792
13793 1998-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
13794
13795 Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
13796 * cp-tree.h (FROB_CONTEXT): New macro.
13797 (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
13798 * decl.c (namespace_binding): Replace NULL_TREE with
13799 global_namespace.
13800 (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
13801 * decl2.c (is_namespace_ancestor, lookup_using_namespace):
13802 Likewise.
13803 * decl.c (pushtag): Use FROB_CONTEXT.
13804 (pushdecl, make_typename_type, define_function, grokdeclarator):
13805 Likewise.
13806 * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
13807 * pt.c (push_template_decl_real, lookup_template_class, tsubst):
13808 Likewise.
13809 * decl2.c (decl_namespace): Return global_namespace if no context.
13810 * method.c (build_overload_nested_name): Expect null as context.
13811 * pt.c (mangle_class_name_for_template): Do nothing for null
13812 contexts.
13813 (lookup_template_class): Allow for null id_context.
13814
13815 1998-06-25 Richard Henderson <rth@cygnus.com>
13816
13817 * method.c (emit_thunk): Set current_function_is_thunk for the
13818 ASM_OUTPUT_MI_THUNK case as well.
13819
13820 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
13821
13822 * exception.cc (__cplus_type_matcher): Get a match_info pointer
13823 instead of an exception table entry as a parameter.
13824
13825 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
13826
13827 * parse.y (function_try_block): Don't call start_catch_handler.
13828 * except.c (call_eh_info): Remove coerced field from declaration.
13829 (build_eh_type_type_ref): New function to create an address of a
13830 rtti function for the new style exception tables.
13831 (expand_start_catch_block): Split function, this contains the
13832 common part.
13833 (process_start_catch_block_old): New function to perform the rest
13834 of expand_start_catch_block under old style exceptions.
13835 (process_start_catch_block_old): New function to perform the rest
13836 of expand_start_catch_block under new style exceptions.
13837 (expand_end_catch_block): Only pop the false label off the stack under
13838 the old style of exceptions.
13839 * semantics.c (finish_try_block): Don't call start_catch_handler.
13840 * exception.cc (struct cp_eh_info): Add original_value field.
13841 (__cplus_type_matcher): Perform type matching on the original exception
13842 value, and if we have a match, set the current value.
13843 (__cp_push_exception): Set the original exception value.
13844
13845 1998-06-23 Jason Merrill <jason@yorick.cygnus.com>
13846
13847 * call.c (joust): Fix confusing conversion warning.
13848
13849 * call.c (build_op_delete_call): Add placement parm. Check
13850 LOOKUP_SPECULATIVELY.
13851 * cp-tree.h, decl2.c, init.c: Adjust.
13852 * decl.c (finish_function): Use it.
13853
13854 * pt.c (tsubst): Diagnose creating void fields or variables.
13855
13856 Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13857
13858 * call.c (build_scoped_method_call): Remove unused variable `tmp'.
13859
13860 * cp-tree.h (check_dtor_name): Add prototype.
13861
13862 * init.c (expand_member_init): Remove unused variables
13863 `ptr_type_node', `parm' and `rval'.
13864
13865 * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
13866 in call to fprintf.
13867 (lang_print_xnode): Likewise.
13868
13869 * typeck2.c (enum_name_string): Cast argument to sprintf to long
13870 and use %ld specifier.
13871
13872 * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
13873 specifier in call to fprintf.
13874 (GNU_xref_member): Cast argument to sprintf to int.
13875
13876 Fri Jun 19 23:22:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
13877
13878 * typeck2.c (pop_init_level): Warn about implicit zero initialization
13879 of struct members.
13880
13881 Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13882
13883 * cp-tree.h: Prototype function `check_java_method'.
13884
13885 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
13886
13887 * class.c (finish_struct): Make conflicting use of id a pedwarn.
13888 * decl.c (pushdecl_class_level): Likewise.
13889
13890 1998-06-17 Mark Mitchell <mark@markmitchell.com>
13891
13892 * pt.c (convert_nontype_argument): Issue an error when presented
13893 with an integer (real) constant that cannot be simplified to an
13894 INT_CST (REAL_CST).
13895
13896 * cp-tree.h (c_get_alias_set): Remove declaration added in
13897 1998-06-13 change that should never have been checked in.
13898
13899 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
13900
13901 * typeck.c (build_binary_op_nodefault): Change % in format strings
13902 to %%.
13903
13904 * decl.c (grokvardecl): Don't build_static_name for decls that
13905 aren't at namespace scope.
13906
13907 * init.c (perform_member_init): Catch default-initialization of
13908 references.
13909
13910 1998-06-17 Mark Mitchell <mark@markmitchell.com>
13911
13912 * errfn.c (cp_thing): Handle the `%%' formatting sequence.
13913
13914 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
13915
13916 * method.c (hack_identifier): Complain about getting a namespace
13917 or class template.
13918 * typeck.c (decay_conversion): Remove check for namespaces.
13919 * typeck2.c (incomplete_type_error): Likewise.
13920 * parse.y (template_arg): Add PTYPENAME expansion.
13921
13922 1998-06-16 Andrew MacLeod <amacleod@cygnus.com>
13923
13924 * decl.c (grokvardecl): Don't build external assembler names for
13925 TYPENAMEs in other namespaces as there is no declarator.
13926 * error.c (cp_file_of, cp_line_of): Don't extract file or line number
13927 info from DECL_CONTEXT if it is NULL.
13928
13929 1998-06-16 Jason Merrill <jason@yorick.cygnus.com>
13930
13931 * call.c (check_dtor_name): Split out.
13932 (build_scoped_method_call): Use it.
13933 (build_method_call): Use it.
13934 * init.c (build_offset_ref): Use it.
13935
13936 * typeck.c (build_static_cast): Fix handling of pointers to members.
13937
13938 * decl.c (finish_function): Just return nothing from a constructor.
13939 * typeck.c (c_expand_return): Complain about returning a void
13940 expression from a destructor.
13941
13942 1998-06-13 Mark Mitchell <mark@markmitchell.com>
13943
13944 * class.c (alter_access): Accept a BINFO explaining how to get
13945 from the entity whose accessed is being altered to the type doing
13946 the altering.
13947 (handle_using_decl): New function containing code split out from ...
13948 (finish_struct_1): Here.
13949
13950 * cp-tree.h (complete_type_or_else): Declare.
13951 * init.c (build_new_1, build_delete): Use it.
13952 * typeck.c (require_complete_type): Use complete_type, rather than
13953 expanding it inline.
13954 (complete_type_or_else): New function.
13955 (build_component_ref): Use it.
13956 (pointer_int_sum): Make sure the type pointed to is complete.
13957 (pointer_diff): Likewise.
13958
13959 * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
13960 types.
13961
13962 * search.c (get_matching_virtual): Note that member templates
13963 cannot override virtual functions.
13964
13965 1998-06-12 Brendan Kehoe <brendan@cygnus.com>
13966
13967 * pt.c (check_explicit_specialization): If DECLARATOR turned into
13968 an error_mark_node from lookup_template_function, return the same.
13969 (determine_specialization): Also make sure TEMPLATE_ID isn't an
13970 error_mark_node, before we try to read its operands.
13971 * decl.c (grokdeclarator): If we got an error_mark_node from
13972 check_explicit_specialization, just return it right back.
13973
13974 1998-06-12 Mark Mitchell <mark@markmitchell.com>
13975
13976 * class.c (instantiate_type): Don't treat template-ids that don't
13977 specify any template arguments as equivalent to ordinary
13978 identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to
13979 pointer-to-members for member templates. Tidy slightly.
13980 * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
13981 * init.c (build_offset_ref): Handle template-ids like ordinary
13982 identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
13983 offset part of the OFFSET_REF.
13984 * typeck.c (build_unary_op): Change check for unknown types to
13985 look for OFFSET_REFs, not SCOPE_REFs.
13986
13987 1998-06-11 Mark Mitchell <mark@markmitchell.com>
13988
13989 * pt.c (is_member_template_class): New function.
13990 (push_template_decl_real): Use it.
13991
13992 1998-06-11 Benjamin Kosnik <bkoz@elmo.cygnus.com>
13993
13994 * friend.c (do_friend): Add support for nested classes using
13995 member functions of the enclosing class as friends.
13996
13997 1998-06-10 Mark Mitchell <mark@markmitchell.com>
13998
13999 * call.c (convert_default_arg): Make global, not static.
14000 (convert_arg_for_ellipsis): Split out from ...
14001 (build_over_call): Here.
14002 * cp-tree.h (convert_default_arg); Declare.
14003 (convert_arg_to_ellipsis): Likewise.
14004 (do_member_init): Remove.
14005 * init.c (do_member_init): Remove; this code is dead.
14006 (expand_member_init): Remove much of this code; it is dead.
14007 * typeck.c (convert_arguments): Use convert_default_arg and
14008 convert_arg_for_ellipsis, rather than duplicating here.
14009
14010 * call.c (convert_like): Don't fail silently if
14011 build_user_type_conversion fails. Always return error_mark_node
14012 for failure.
14013
14014 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
14015
14016 * search.c (covariant_return_p): Complain about ambiguous base.
14017
14018 * typeck.c (build_component_ref): Diagnose ref to nested type.
14019
14020 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
14021
14022 * decl.c (grokparms): Check that INIT isn't an error_mark_node
14023 before giving error about invalid type for default arg.
14024
14025 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
14026
14027 * call.c (build_method_call): Fix thinko.
14028
14029 1998-06-10 Dave Brolley <brolley@cygnus.com>
14030
14031 * decl2.c (lang_decode_option): New argc/argv interface.
14032 * cp-tree.h (lang_decode_option): New argc/argv interface.
14033 * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
14034 specified for cpplib-enabled compilers.
14035 * lex.c (lang_init): Don't check_newline for cpplib.
14036 (init_parse): Don't initialize cpplib here.
14037
14038 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
14039
14040 * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
14041 piece before checking DECL_MUTABLE_P.
14042
14043 1998-06-10 John Carr <jfc@mit.edu>
14044
14045 * tree.c (debug_binfo): Make printf format match arguments.
14046
14047 * error.c (OB_PUTI): Make printf format match arguments.
14048
14049 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
14050
14051 * init.c (perform_member_init): Handle default-initialization.
14052
14053 * except.c (build_throw): Handle throwing NULL.
14054
14055 * typeck.c (build_x_function_call): Use resolve_offset_ref.
14056
14057 * search.c (compute_access): Only strip an anonymous union
14058 for a FIELD_DECL.
14059
14060 * call.c (add_builtin_candidates): Tweak.
14061
14062 * cvt.c (build_expr_type_conversion): Restore code for conversion
14063 from class types.
14064 * decl2.c (delete_sanity): Use it. Clean up.
14065
14066 * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
14067
14068 1998-06-10 Branko Cibej <branko.cibej@hermes.si>
14069
14070 * typeck.c (c_expand_return): Don't warn about void expressions on
14071 return statements in functions returning void.
14072
14073 1998-06-09 Mark Mitchell <mark@markmitchell.com>
14074
14075 * pt.c (fn_type_unification): Revise documentation. Tidy.
14076 (type_unification): Likewise.
14077
14078 1998-06-09 Andrew MacLeod <amacleod@cygnus.com>
14079
14080 * semantics.c (finish_try_block): Rename expand_start_catch, and delete
14081 expand_end_catch.
14082 * parse.y (function_try_block): Rename expand_start_catch, and delete
14083 expand_end_catch.
14084 * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
14085 expand_end_catch.
14086
14087 1998-06-09 Jason Merrill <jason@yorick.cygnus.com>
14088
14089 * search.c (lookup_member): New fn.
14090 * class.c (finish_struct_1): Use it.
14091 * decl.c (lookup_name_real): Use it.
14092
14093 Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14094
14095 * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
14096
14097 * cp-tree.h: Add prototype for `maybe_print_template_context' and
14098 `maybe_make_one_only'.
14099
14100 * decl.c (auto_function): Remove unused variable `decl'.
14101
14102 * decl2.c: Include dwarf2out.h and dwarfout.h.
14103
14104 * lex.c: Remove redundant declarations of `set_float_handler' and
14105 `asm_out_file'.
14106
14107 1998-06-08 Andrew MacLeod <amacleod@cygnus.com>
14108
14109 * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
14110 time flag. Call __cp_eh_info instead of __cp_exception_info.
14111 * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
14112 (__cp_exception_info): Return offset into cp_eh_info structure to
14113 match what use to be the start of this structure.
14114 (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
14115 (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
14116 compile time flag.
14117 (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
14118 __cp_eh_info instead of __cp_exception_info.
14119
14120 1998-06-08 Jason Merrill <jason@yorick.cygnus.com>
14121
14122 * decl.c (cp_finish_decl): Disable inlining of extern inlines
14123 with static variables.
14124
14125 1998-06-08 Mark Mitchell <mark@markmitchell.com>
14126
14127 * init.c (build_offset_ref): Correct previous change to use build,
14128 not build_min.
14129
14130 1998-06-07 Mark Mitchell <mark@markmitchell.com>
14131
14132 * class.c (instantiate_type): Handle pointer-to-members where the
14133 member is a template.
14134 * init.c (build_offset_ref): Likewise.
14135 * typeck.c (build_unary_op): Likewise.
14136
14137 1998-06-07 Richard Henderson <rth@cygnus.com>
14138
14139 * lex.c (lang_init_options): New function.
14140 (lang_init): Remove flag_exceptions == 2 hack.
14141
14142 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
14143
14144 * search.c (envelope_add_decl): Tweak for implicit typename.
14145
14146 * call.c (joust): Also warn about confusing conversion op/constructor
14147 overload resolution.
14148
14149 * spew.c (yylex): Also return the TYPE_DECL if got_object.
14150 Don't clear got_object after '~'.
14151 * call.c (build_scoped_method_call): Tweak destructor handling.
14152 (build_method_call): Likewise.
14153 * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
14154 TYPE_MAIN_VARIANT for destructors.
14155 * semantics.c (finish_object_call_expr): Complain about calling a
14156 TYPE_DECL.
14157
14158 1998-06-05 Per Bothner <bothner@cygnus.com>
14159
14160 * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
14161 Define - update needed by gcc.c change.
14162
14163 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
14164
14165 * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
14166
14167 1998-06-05 Martin v. Loewis <loewis@informatik.hu-berlin.de>
14168
14169 * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
14170 * decl.c (lookup_name_real): Add namespaces_only parameter.
14171 If set, return only NAMESPACE_DECLs.
14172 (select_decl): Likewise.
14173 (identifier_type_value): Give additional parameter.
14174 (lookup_name_nonclass): Likewise.
14175 (lookup_name): Likewise.
14176 (find_binding): Skip namespace aliases.
14177 (binding_for_name): Likewise.
14178 (push_namespace): Check for namespace aliases.
14179 (lookup_name_namespace_only): New function.
14180 (begin_only_namespace_names, end_only_namespace_names): New functions.
14181 * decl2.c (set_decl_namespace): Skip namespace aliases.
14182 (do_using_directive): Likewise.
14183 (do_namespace_alias): Produce namespace aliases, fix alias
14184 redeclaration.
14185 * error.c (dump_decl): Support SCOPE_REF.
14186 * parse.y (extdef): Wrap lookup with namespace_only for namespace
14187 aliases and using declarations.
14188
14189 1998-06-04 Jason Merrill <jason@yorick.cygnus.com>
14190
14191 * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
14192
14193 * error.c (dump_expr): Clean up NEW_EXPR case.
14194
14195 1998-06-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
14196
14197 Suggested by Brendan Kehoe
14198 * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
14199 treat it as using ::decl.
14200
14201 * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
14202
14203 * tree.c (mapcar): Support NEW_EXPR.
14204
14205 * error.c (dump_expr): Support NEW_EXPR.
14206
14207 1998-06-03 Jason Merrill <jason@yorick.cygnus.com>
14208
14209 * method.c (make_thunk): Use overload machinery to make name.
14210 * search.c (covariant_return_p): New fn.
14211 (get_matching_virtual): Use it.
14212
14213 * init.c (build_new_1): Fix check for void.
14214
14215 1998-06-01 Per Bothner <bothner@cygnus.com>
14216
14217 * cp-tree.h (TYPE_FOR_JAVA): New macro.
14218 * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
14219 java_int_type_node, java_long_type_node, java_float_type_node,
14220 java_double_type_node, java_char_type_node, java_boolean_type_node):
14221 New "primitive" types, with predefined names __java_byte etc.
14222 (record_builtin_java_type): New function.
14223 (init_decl_processing): Make Java types with record_builtin_java_type.
14224 (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA".
14225 (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class.
14226 (grokfndecl): Call check_java_method for Java classes.
14227 * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA.
14228 (process_overload_item): Match types against specific
14229 java_XX_type_node types, rather than using is_java_type.
14230 * class.c (finish_struct_1): Don't add default copy constructor
14231 or operator= if TYPE_FOR_JAVA.
14232 (pop_lang_conext): Restore strict_prototyp proper if Java.
14233 * decl2.c (acceptable_java_type, check_java_method): New functions.
14234 * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern.
14235 (tsubst): Move common statement after if statement.
14236 * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match.
14237
14238 1998-06-01 Jason Merrill <jason@yorick.cygnus.com>
14239
14240 * pt.c (for_each_template_parm): Use first_rtl_op.
14241
14242 * tree.c (build_cplus_array_type_1): Also check index_type for
14243 template parms.
14244
14245 1998-05-31 Jason Merrill <jason@yorick.cygnus.com>
14246
14247 * pt.c (tsubst): Always copy BINFO_BASETYPES.
14248
14249 1998-05-29 scott snyder <snyder@d0sgif.fnal.gov>
14250
14251 * tree.c (layout_basetypes): If we change TYPE_SIZE, change
14252 TYPE_SIZE_UNIT too.
14253
14254 1998-05-29 Mark Mitchell <mark@markmitchell.com>
14255
14256 * decl.c (grokdeclarator): Don't complain about in-class
14257 initialization of static consts if we don't really know the type
14258 of the variable.
14259
14260 1998-05-29 Jason Merrill <jason@yorick.cygnus.com>
14261
14262 * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
14263 * method.c (build_destructor_name): New fn.
14264 * decl2.c (maybe_retrofit_in_chrg): Split out...
14265 (grokclassfn): From here. Reorganize.
14266 * decl.c (grok_ctor_properties): Make sure ctors for types with
14267 vbases have the in_chrg parm.
14268 * pt.c (instantiate_class_template): Update
14269 TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call
14270 grok_*_properties.
14271 (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
14272
14273 1998-05-28 Mark Mitchell <mark@markmitchell.com>
14274
14275 * pt.c (instantiate_decl): Make test for whether or not static
14276 variables should be instantiated early match its comment.
14277
14278 1998-05-28 Jason Merrill <jason@yorick.cygnus.com>
14279
14280 * decl.c (start_decl): Always pedwarn about vacuously redeclaring
14281 a member.
14282 (start_function): Call check_default_args.
14283 * decl2.c (grokfield): Don't call check_default_args.
14284 (check_default_args): Use cp_error_at.
14285 * lex.c (do_pending_defargs): Call check_default_args.
14286
14287 1998-05-27 Brendan Kehoe <brendan@cygnus.com>
14288
14289 * call.c (build_method_call): Make sure get_type_value returns
14290 something before we try to use its TYPE_MAIN_VARIANT.
14291 (build_scoped_method_call): Likewise.
14292
14293 1998-05-27 Jason Merrill <jason@yorick.cygnus.com>
14294
14295 * typeck2.c (digest_init): Complain about getting a TREE_LIST to
14296 initialize an array.
14297
14298 * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
14299 DECL_VIRTUAL_P.
14300
14301 * friend.c (do_friend): Clarify template warning.
14302
14303 1998-05-27 Mark Mitchell <mark@markmitchell.com>
14304
14305 * decl.c (shadow_label): Don't treat decls as identifiers.
14306 (maybe_push_to_top_level): Clear shadowed_labels.
14307
14308 * pt.c (instantiate_decl): Reset lineno and filename after calling
14309 regenerate_decl_from_template.
14310
14311 * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
14312 error_mark_node.
14313
14314 1998-05-27 Kevin Buhr <buhr@stat.wisc.edu>
14315
14316 * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
14317
14318 1998-05-26 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14319
14320 * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
14321 (convert_nontype_argument): Handle cases when nontype template
14322 parameters become classes after substitution.
14323
14324 1998-05-26 Mark Mitchell <mark@markmitchell.com>
14325
14326 * friend.c (is_friend): Use comptypes, rather than == to compare
14327 types. Modify for new representation of template friends.
14328 (make_friend_class): Likewise.
14329 * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak.
14330 (instantiate_class_template): Deal with template friends.
14331
14332 * decl.c (store_parm_decls): Remove redundant call to
14333 expand_main_function.
14334
14335 1998-05-26 Benjamin Kosnik <bkoz@loony.cygnus.com>
14336
14337 * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
14338 DECL_USE_TEMPLATE.
14339
14340 1998-05-26 Per Bothner <bothner@cygnus.com>
14341
14342 * language_as_string: Handle lang_java.
14343
14344 1998-05-26 Jason Merrill <jason@yorick.cygnus.com>
14345
14346 * decl.c (pushdecl): Don't copy the type_decl.
14347
14348 1998-05-26 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14349
14350 * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
14351 current_class_type.
14352 * decl.c (grokdeclarator): Put typedefs on the type's obstack.
14353
14354 * parse.y (complex_direct_notype_declarator): Use $1 to access
14355 scope of notype_qualified_id.
14356
14357 1998-05-26 Dave Brolley <brolley@cygnus.com>
14358
14359 * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
14360 (init_parse): Initialize cpplib interface.
14361
14362 * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
14363 empty continuation.
14364
14365 1998-05-26 Mark Mitchell <mark@markmitchell.com>
14366
14367 * decl.c (pushtag): Avoid crashing on erroneous input.
14368
14369 1998-05-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14370
14371 * decl.c (push_namespace): Only produce one unique name for
14372 anonymous namespaces.
14373 (get_unique_name): Remove.
14374
14375 1998-05-25 Mark Mitchell <mark@markmitchell.com>
14376
14377 * call.c (tourney): Don't do any extra comparisons.
14378
14379 * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
14380
14381 * cp-tree.h (processing_template_parmlist): Declare.
14382 * decl.c (pushtag): Don't call push_template_decl when we
14383 shouldn't.
14384 * pt.c (processing_template_parmlist): New variable.
14385 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
14386 (complete_template_args): Use it.
14387 (add_to_template_args): Likewise.
14388 (innermost_args): Likewise.
14389 (tsubst): Likewise.
14390 (begin_template_parm_list): Use processing_template_parmlist.
14391 (end_template_parm_list): Likewise.
14392
14393 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
14394 * decl.c (grokdeclarator): Use it.
14395 * decl2.c (grok_x_components): Likewise.
14396 * init.c (initializing_context): Likewise.
14397 * method.c (do_build_copy_constructor): Likewise.
14398 (do_build_assign_ref): Likewise.
14399 * search.c (compute_access): Likewise.
14400 * typeck.c (build_component_ref): Likewise.
14401
14402 * decl.c (grokdeclarator): Don't give a cv-qualified version of an
14403 unnamed type a typedef name "for linkage purposes".
14404
14405 * pt.c (lookup_template_class): Don't look at
14406 IDENTIFIER_CLASS_VALUE when there's no current_class_type.
14407
14408 * method.c (build_overload_int): Handle error cases gracefully.
14409
14410 * pt.c (instantiate_decl): Handle static member variables
14411 correctly.
14412
14413 * pt.c (tsubst): Use the tsubst'd type when producing new
14414 TEMPLATE_PARM_INDEX nodes.
14415
14416 1998-05-24 Mark Mitchell <mark@markmitchell.com>
14417
14418 * tree.c (cp_tree_equal): Handle pointers to member functions.
14419
14420 * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make
14421 sure the type of the REF_BIND is a reference type.
14422 (maybe_handle_ref_bind, compare_ics): Rename reference_type to
14423 target_type for clarity.
14424
14425 * parse.y (xcond): Move call to condition_conversion ...
14426 * semantics.c (finish_for_cond): Here.
14427 * parse.c: Regenerated.
14428
14429 1998-05-24 Jason Merrill <jason@yorick.cygnus.com>
14430
14431 * decl.c (push_namespace): Namespaces have type void.
14432 * typeck2.c (incomplete_type_error): Complain about namespace
14433 used as expression.
14434 * typeck.c (decay_conversion): Likewise.
14435
14436 1998-05-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
14437
14438 * error.c (dump_expr): Support namespaces.
14439
14440 1998-05-23 Jason Merrill <jason@yorick.cygnus.com>
14441
14442 * cp-tree.def: Add SRCLOC.
14443 * cp-tree.h: Add struct tree_srcloc and accessor macros.
14444 * tree.c (build_srcloc, build_srcloc_here): New fns.
14445 * pt.c (add_pending_template): Use build_srcloc_here.
14446 (push_tinst_level): Update last_template_error_tick before erroring.
14447 (instantiate_decl): Restore lineno and input_filename before
14448 calling add_pending_template.
14449 * decl2.c (finish_file): Set up lineno and input_filename for
14450 pending templates.
14451
14452 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
14453
14454 * decl.c (lang_print_error_function): New fn.
14455 (init_decl_processing): Set print_error_function to use it.
14456 * errfn.c (cp_thing): Don't call maybe_print_template_context here.
14457
14458 * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
14459 ICS_BAD_FLAG.
14460
14461 * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
14462 copy-initialization.
14463
14464 * class.c (build_vtable_entry): Use int_fits_type_p.
14465 (build_vtable): Pass a signed offset to build_vtable_entry.
14466 (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
14467 set_rtti_entry): Likewise.
14468
14469 1998-05-22 Per Bothner <bothner@cygnus.com>
14470
14471 * cp-tree.h: Add comments documenting which LANG_FLAGS are used.
14472 (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used.
14473
14474 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
14475
14476 * pt.c (print_template_context): Use fprintf instead of cp_error.
14477
14478 * pt.c (determine_specialization): Just return an error_mark_node.
14479 Also print the decl we want in error messages. If we complain,
14480 return error_mark_node.
14481 (tsubst_friend_function): Set lineno and input_filename so
14482 error messages will be useful.
14483 (instantiate_template): Just return an error_mark_node.
14484 (check_explicit_specialization): Don't mess with a returned
14485 error_mark_node.
14486
14487 * pt.c (print_template_context): Add new argument.
14488 (maybe_print_template_context): New fn.
14489 (push_tinst_level): Increment tinst_level_tick.
14490 (pop_tinst_level): Likewise.
14491 * errfn.c (cp_thing): Call maybe_print_template_context. Use
14492 xrealloc instead of xmalloc.
14493
14494 * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
14495
14496 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
14497
14498 * pt.c (tsubst_friend_class): Don't call redeclare_class_template
14499 if the template we looked up is the same as the one we already
14500 have.
14501
14502 Thu May 21 11:54:44 1998 Dave Brolley <brolley@cygnus.com>
14503
14504 * lex.c: (handle_sysv_pragma): FILE* parameter not used.
14505 (cpp_reader,parse_in): Add for cpplib.
14506 (check_newline): Call handle_sysv_pragma with new interface.
14507 (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
14508
14509 * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
14510 (sub_getch): Call GETC for cpplib.
14511
14512 * cp-tree.h: (get_directive_line): Different prototype for cpplib.
14513 (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
14514
14515 * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
14516
14517 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
14518
14519 * decl2.c (maybe_make_one_only): New fn.
14520 (import_export_vtable): Use it.
14521 (import_export_decl): Likewise.
14522 * pt.c (mark_decl_instantiated): Likewise.
14523
14524 1998-05-21 Mark Mitchell <mmitchell@usa.net>
14525
14526 * decl2.c (find_representative_member): Rename to ...
14527 (build_anon_union_vars): New function.
14528 (finish_anon_union): Fix stupidity of previous change.
14529
14530 1998-05-20 Jason Merrill <jason@yorick.cygnus.com>
14531
14532 * decl.c (grokfndecl): Handle definition of specialization in
14533 friend declaration.
14534
14535 * error.c (dump_decl): Fix LOOKUP_EXPR handling.
14536
14537 1998-05-20 Mark Mitchell <mmitchell@usa.net>
14538
14539 * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
14540 to look for type declarations.
14541 (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
14542 * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
14543 (finish_member_class_template): Declare.
14544 * decl.c (pushtag): Put member class templates on the
14545 CLASSTYPE_TAGS list, just as for ordinary member classes.
14546 (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
14547 (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
14548 IDENTIFIER_NAMESPACE_VALUEs.
14549 * parse.y (component_decl): Move code to ...
14550 * semantics.c (finish_member_class_template): New function.
14551 Don't put member class templates on the list of components for a
14552 class.
14553 * parse.c: Regenerated.
14554 * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
14555 In fact, don't use DECL_CONTEXT at all here.
14556
14557 1998-05-20 Martin von Loewis <loewis@informatik.hu-berlin.de>
14558
14559 * decl.c (record_unknown_type): New function.
14560 (init_decl_processing): Call it for the unknown and global type
14561 nodes.
14562
14563 1998-05-20 Mark Mitchell <mmitchell@usa.net>
14564
14565 * decl2.c (find_representative_member): New function.
14566 (finish_anon_union): Use it.
14567
14568 * cp-tree.h (MAIN_NAME_P): New macro.
14569 (DECL_MAIN_P): Likwise.
14570 * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
14571 (grokfndecl): Use the new macros.
14572 (grokdeclarator): Likewise.
14573 (start_function): Likewise.
14574 (store_parm_decls): Likewise.
14575 (finsh_function): Likewise.
14576 * friend.c (do_friend): Likewise.
14577 * typeck.c (build_function_call_real): Likewise.
14578 (build_unary_op): Likewise.
14579
14580 Wed May 20 02:16:01 1998 Jason Merrill <jason@yorick.cygnus.com>
14581
14582 * decl2.c (start_objects, finish_objects, do_dtors,
14583 do_ctors): Split out from...
14584 (finish_file): ...here.
14585
14586 Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com>
14587
14588 * tree.c (is_overloaded_fn): Don't abort on placeholders from
14589 push_class_decls.
14590
14591 Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com>
14592
14593 * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
14594
14595 * error.c (dump_expr): Handle an ARROW_EXPR.
14596
14597 Tue May 19 15:13:39 1998 Mark Mitchell <mmitchell@usa.net>
14598
14599 * decl.c (saveable_obstack): Declare.
14600 (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
14601 declare, if necessary.
14602
14603 Tue May 19 14:50:27 1998 Mark Mitchell <mmitchell@usa.net>
14604
14605 * call.c (compare_qual): Remove.
14606 (is_subseq): Tweak.
14607 (is_properly_derived_from): New function.
14608 (maybe_handle_ref_bind): Likewise.
14609 (maybe_handle_implicit_object): Likewise.
14610 (compare_ics): Modify substantially to bring into conformance with
14611 the standard.
14612 * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
14613 (comp_cv_qualification): Declare.
14614 (comp_cv_qual_signature): Likewise.
14615 * typeck.c (comp_cv_qualification): Likewise.
14616 (comp_cv_qual_signature): Likewise.
14617
14618 Tue May 19 10:05:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14619
14620 * Makefile.in (parse.o): Depend on toplev.h.
14621
14622 * class.c (typecode_p): Remove prototype and definition.
14623
14624 * cp-tree.h (currently_open_class, is_empty_class, member_p):
14625 Add prototype.
14626
14627 * decl.c (push_overloaded_decl_top_level): Remove prototype and
14628 definition.
14629
14630 * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
14631 in call to `cp_thing'.
14632 (cp_warning): Likewise for function pointer `warning'.
14633
14634 * except.c (do_function_call): Remove prototype and definition.
14635 (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
14636
14637 * method.c (is_java_type): Add prototype and make it static.
14638
14639 * parse.y: Include toplev.h.
14640
14641 * pt.c (type_unification): Remove unused variable `arg'.
14642 (instantiate_decl): Likewise for `save_ti'.
14643
14644 * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
14645
14646 Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
14647
14648 * init.c (build_member_call): Handle template_ids.
14649 * parse.y (primary): Add global_scope template_id.
14650
14651 Mon May 18 23:22:52 1998 Jason Merrill <jason@yorick.cygnus.com>
14652
14653 * decl2.c (get_sentry): Use end_temporary_allocation.
14654 Don't declare permanent_obstack.
14655
14656 Mon May 18 12:28:44 1998 Mark Mitchell <mmitchell@usa.net>
14657
14658 * parse.y (.finish_new_placement): New non-terminal.
14659 (unary_expr, new_type_id): Use it.
14660 * parse.c: Regenerated.
14661
14662 Mon May 18 12:20:27 1998 Brendan Kehoe <brendan@cygnus.com>
14663
14664 * pt.c (redeclare_class_template): Say where the original definition
14665 of the template-parameter's default argument appeared.
14666
14667 Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com>
14668
14669 * call.c (build_over_call): Tweak empty class handling.
14670
14671 * decl.c (make_typename_type): Use currently_open_class.
14672
14673 * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
14674
14675 Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
14676
14677 * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
14678 for a type unless it is one.
14679
14680 * class.c (finish_struct_1): Use OVL_CURRENT in error message.
14681
14682 Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com)
14683
14684 * Makefile.in (program_transform_name, objdir): Define.
14685
14686 * Makefile.in (BISON): Use bison from the build tree if it exists.
14687 (FLEX): Likewise.
14688
14689 Sun May 17 14:52:08 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
14690
14691 * typeck.c (type_unknown_p): Return true for TREE_LIST also.
14692
14693 * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
14694
14695 Sun May 17 14:51:41 1998 Jason Merrill <jason@yorick.cygnus.com>
14696
14697 * call.c (build_scoped_method_call): Likewise.
14698
14699 Sun May 17 13:53:48 1998 Mark Mitchell <mmitchell@usa.net>
14700
14701 * init.c (build_new_1): Call suspend_momentary around the creation
14702 of values that must be saved for exception handling.
14703 * parse.y (.build_new_placement): New non-terminal.
14704 (unary_expr, new_placement): Use it.
14705 * parse.c: Regenerated.
14706
14707 Sun May 17 12:32:08 1998 Jason Merrill <jason@yorick.cygnus.com>
14708
14709 * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
14710 old and new types.
14711
14712 * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
14713 canonical type.
14714
14715 * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
14716
14717 Fri May 15 20:28:00 1998 Jason Merrill <jason@yorick.cygnus.com>
14718
14719 * decl.c (start_decl): Revert problem change.
14720
14721 * Makefile.in (CONFLICTS): Fix.
14722
14723 Fri May 15 15:34:02 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
14724
14725 * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
14726
14727 Fri May 15 00:46:05 1998 Jason Merrill <jason@yorick.cygnus.com>
14728
14729 * class.c (finish_struct_1): Use BINFO_SIZE.
14730
14731 * decl.c (start_decl): Use 'tem'.
14732
14733 Thu May 14 16:30:47 1998 Andrew MacLeod <amacleod@cygnus.com>
14734
14735 * exception.cc: Include eh-common.h.
14736 (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
14737 (__cplus_type_matcher): First stab at new C++ runtime type matcher.
14738 (__cp_push_exception): Initialize eh_info struct as well.
14739 * except.c: Remove local structs and include eh-common.h.
14740 (init_exception_processing): Set language and version codes.
14741 (call_eh_info): Add presence of eh_info to runtime description of
14742 struct cp_eh_info.
14743 (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
14744 * semantics.c (finish_try_block): Call start_catch_block() and
14745 end_catch_block().
14746 * parse.y (function_try_block): Call start_catch_block() and
14747 end_catch_block().
14748
14749 Thu May 14 12:27:34 1998 Brendan Kehoe <brendan@cygnus.com>
14750
14751 * typeck.c (original_type): New function.
14752 (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
14753 to see if they're actually the same.
14754 * cp-tree.h (original_type): Declare.
14755
14756 Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14757
14758 * Makefile.in (lex.o): Depend on output.h.
14759
14760 * call.c (add_function_candidate): Remove unused variable `cand'.
14761 (add_conv_candidate): Likewise.
14762 (build_builtin_candidate): Likewise.
14763
14764 * cp-tree.h: Add prototype for `types_overlap_p'.
14765
14766 * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
14767
14768 * decl2.c (merge_functions): Remove unused variables `tmp' and
14769 `tempn'.
14770
14771 * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
14772 (code_as_string): Likewise.
14773 (language_as_string): Likewise.
14774 (parm_as_string): Likewise.
14775 (op_as_string): Likewise.
14776 (assop_as_string): Likewise.
14777 (cv_as_string): Likewise.
14778
14779 * lex.c: Include output.h.
14780
14781 * pt.c (type_unification): Cast first argument of `bzero' to a char*.
14782
14783 * search.c (dfs_no_overlap_yet): Mark parameter `t' with
14784 ATTRIBUTE_UNUSED.
14785
14786 * tinfo.cc (__class_type_info::dcast): Change the type of variable
14787 `i' from int to size_t.
14788
14789 * typeck.c (language_lvalue_valid): Mark parameter `exp' with
14790 ATTRIBUTE_UNUSED.
14791
14792 Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
14793
14794 * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
14795 DECL_NAMESPACE_SCOPE_P.
14796 (lang_decl_name): Likewise.
14797 * pt.c (tsubst_friend_function, tsubst): Likewise.
14798 * decl.c (pushdecl, redeclaration_error_message, start_decl,
14799 cp_finish_decl, start_function): Likewise.
14800 * class.c (finish_struct_1): Likewise.
14801 * call.c (build_over_call): Likewise.
14802 (compare_ics): Use DERIVED_FROM_P.
14803
14804 Tue May 12 07:24:18 1998 Mark Mitchell <mmitchell@usa.net>
14805
14806 * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
14807 * method.c (build_mangled_name): Use it.
14808 (build_decl_overload_real): Likewise.
14809
14810 * error.c (dump_simple_decl): New function, broken out from ...
14811 (dump_decl): Use it.
14812
14813 Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
14814
14815 * ptree.c (lang_print_xnode): Add missing `break'.
14816
14817 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
14818
14819 * call.c (add_template_candidate): Adjust for changes to
14820 fn_type_unification.
14821 (add_template_candidate_real): Likewise.
14822 (add_template_conv_candidate): Likewise.
14823 (build_user_type_conversion_1): Likewise.
14824 (build_new_function_call): Likewise.
14825 (build_object_call): Likewise.
14826 (build_new_op): Likewise.
14827 (build_new_method_call): Likewise.
14828 * class.c (instantiate_type): Likewise.
14829 * cp-tree.h (unification_kind_t): New type.
14830 (fn_type_unification): Adjust prototype.
14831 (type_unificaiton): Likewise.
14832 * pt.c (UNIFY_ALLOW_NONE): New macro.
14833 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
14834 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
14835 (UNIFY_ALLOW_DERIVED): Likewise.
14836 (unify): Change prototype.
14837 (maybe_adjust_types_for_deduction): New function.
14838 (check_cv_quals_for_unify): Likewise.
14839 (determine_specialization): Adjust.
14840 (fn_type_unification): Likewise.
14841 (type_unification): Likewise.
14842 (type_unification_real): Likewise. Use
14843 maybe_adjust_types_for_deduction. Fix mishandling of
14844 back-unification of template functions passed as arguments. Pass
14845 appropriate combination of UNIFY_ALLOW_* to unify.
14846 (unify): Remove unused NTPARMS parameter. Use
14847 check_cv_quals_for_unify. Remove bogus code that allowed
14848 too-generous unification in order to adhere more closely to standard.
14849 (get_bindings_real): Adjust.
14850 (get_class_bindings): Likewise.
14851
14852 * method.c (build_overload_identifier): Only use the innermost
14853 template arguments when mangling.
14854 * pt.c (tsubst_template_argument_vector): New function.
14855 (complete_template_args): Deal with the situation where the
14856 extra_args contain more than one level of arguments.
14857 (lookup_template_class): Deal with member template classes, which
14858 may have more than one level of arguments.
14859 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
14860 Improve handling of member template classes. Use
14861 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
14862 tsubst_template_argument_vector where appropriate.
14863 (regenerate_decl_from_template): Break out from ...
14864 (instantiate_decl): Here.
14865
14866 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
14867 * parse.h: Regenerated.
14868 * parse.c: Really regenerated.
14869
14870 * cp-tree.h (finish_unary_op_expr): New function.
14871 (finish_id_expr): Likewise.
14872 (begin_new_placement): Likewise.
14873 (finish_new_placement): Likewise.
14874 (finish_declarator): Likewise.
14875 (finish_translation_unit): Likewise.
14876 (finish_parmlist): Likewise.
14877 (begin_class_definition): Likewise.
14878 (finish_class_definition): Likewise.
14879 (finish_default_args): Likewise.
14880 (finish_inline_definitions): Likewise.
14881 * parse.y (GCC_ASM_KEYWORD): Remove.
14882 (TYPENAME_ELLIPSIS): Likewise.
14883 * parse.c: Regenerated.
14884 Use new functions in semantics.c in the actions for many rules.
14885 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
14886 * hash.h: Regenerated.
14887 * semantics.c (finish_expr_stmt): Allow NULL expr.
14888 (finish_unary_op_expr): New function, containing
14889 code previously in parse.y.
14890 (finish_id_expr): Likewise.
14891 (begin_new_placement): Likewise.
14892 (finish_new_placement): Likewise.
14893 (finish_declarator): Likewise.
14894 (finish_translation_unit): Likewise.
14895 (finish_parmlist): Likewise.
14896 (begin_class_definition): Likewise.
14897 (finish_class_definition): Likewise.
14898 (finish_default_args): Likewise.
14899 (finish_inline_definitions): Likewise.
14900
14901 Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
14902
14903 * typeck.c (build_c_cast): Don't decay arrays and functions to
14904 pointer type when converting to a class type.
14905
14906 Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
14907
14908 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
14909 (DECL_CLASS_SCOPE_P): Likewise.
14910
14911 Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
14912
14913 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
14914 * decl2.c (constructor_name_full): Likewise.
14915
14916 Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
14917
14918 * tree.c (mapcar): Add OVERLOAD support.
14919
14920 * init.c (resolve_offset_ref): We must use basetype_path before we
14921 destroy it with a call to convert_pointer_to.
14922
14923 Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
14924
14925 * class.c (currently_open_class): New fn.
14926 * decl.c (lookup_name_real): Use it.
14927 * search.c (lookup_field): Likewise.
14928
14929 Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
14930
14931 * cp-tree.def (OVERLOAD): New node.
14932 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
14933 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
14934 (NAMESPACE_BINDING): Remove.
14935 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
14936 namespace_binding.
14937 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
14938 Define.
14939 (tree_overload): New struct.
14940 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
14941 (REAL_IDENTIFIER_TYPE_VALUE): Define.
14942 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
14943 (lang_decl_flags): Remove in_namespace.
14944 (lang_decl): Remove chain.
14945 (DECL_CHAIN, DECL_NAMESPACE): Remove.
14946 (flag_honor_std): Declare extern.
14947 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
14948 namespace_binding, set_namespace_binding,
14949 lookup_function_nonclass, cat_namespace_levels,
14950 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
14951 scratch_ovl_cons, ovl_member, build_overload): Declare.
14952 (decl_list_length, get_namespace_id, current_namespace_id,
14953 overloaded_globals_p): Remove.
14954 (lookup_using_namespace, qualified_lookup_using_namespace): Change
14955 return type.
14956 (push_scratch_obstack): New macro.
14957 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
14958 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
14959 convs, fns.
14960 (build_new_function_call): Iterate using OVL_CHAIN.
14961 Print DECL_NAME in when reporting ambiguities.
14962 (build_object_call): Iterate using OVL_NEXT for fns, convs.
14963 (build_new_op): Call lookup_function_nonclass.
14964 Iterate using OVL_NEXT.
14965 (build_op_delete_call): Change detection of members.
14966 Do not wrap TREE_LIST around fields and single global functions.
14967 (build_over_call): Don't push a class level if the context is a
14968 namespace.
14969 (build_new_method_call): Iterate using OVL_NEXT.
14970 * class.c (add_method): Chain overloaded members using
14971 build_overload. Remove copying of method.
14972 (grow_method): When iterating through the obstack, expect OVERLOAD
14973 nodes. Chain overload members.
14974 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
14975 nodes in call to get_baselinks.
14976 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
14977 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
14978 fdecls that are OVERLOAD nodes.
14979 (validate_lhs): New function.
14980 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
14981 code. Use DECL_NAME in error messages. Split code between global
14982 and member function processing.
14983 * decl.c (global_type_node): New static variable.
14984 (in_std): New global.
14985 (struct binding_level): New field usings.
14986 (resume_binding_level): Assert that we are not in a class.
14987 (toplevel_bindings_p): Just check for namespace_p or
14988 pseudo_global.
14989 (resume_level): Remove.
14990 (find_binding): New function.
14991 (binding_for_name): Call it.
14992 (namespace_binding, set_namespace_binding): New functions.
14993 (push_namespace): Associate binding level with new namespace,
14994 resume_binding_level for existing namespace. Remove old code.
14995 Fake std by counting.
14996 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
14997 (maybe_push_to_top_level): Save current namespace.
14998 (pop_from_top_level): Restore saved namespace.
14999 (pop_namespace): Call suspend_binding_level. Remove old code.
15000 (cat_namespace_levels): New function.
15001 (set_identifier_type_value_with_scope): For namespace bindings,
15002 set BINDING_TYPE, and use global_type_node.
15003 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
15004 (identifier_type_value): New function.
15005 (pushtag): If no context, use current_namespace.
15006 (duplicate_decls): Don't process DECL_CHAIN.
15007 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
15008 already set. Never reset it to NULL_TREE. Lookup global variables
15009 in their namespace. Push overloaded templates if they are on
15010 namespace level.
15011 (pushdecl_namespace_level): New function.
15012 (pushdecl_top_level): Implement using pushdecl_namespace_level.
15013 (pushdecl_using_decl): New function.
15014 (overloaded_globals_p): Remove.
15015 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
15016 them. Use namespace_binding and set_namespace_value.
15017 (redeclaration_error_message): Complain if the declarations come
15018 from different namespaces.
15019 (lookup_tag): On namespace level, look in the BINDING_TYPE.
15020 (lookup_namespace_name): Pass tree_bindings from stack. Remove
15021 old code.
15022 (select_decl): New function.
15023 (lookup_name_real): Call it for qualified and unqualified lookup.
15024 Pass tree_bindings from the stack.
15025 If prefer_type is 1, also accept namespaces.
15026 (lookup_function_nonclass): New function.
15027 (init_decl_processing): Set the binding level of the global
15028 namespace to global_binding_level.
15029 Build a proper type list for __builtin_apply.
15030 Initialize std_node to "fake std" if flag_honor_std is set.
15031 Initialize global_type_node.
15032 Allocated bad_alloc in namespace std if flag_honor_std.
15033 (define_function): Set the DECL_CONTEXT to the current_namespace.
15034 (start_decl): A namespace is not considered as a context here. If
15035 the DECL_CONTEXT is a namespace, push the decl.
15036 (cp_finish_decl): Check for namespaces used as initializers.
15037 (grokfndecl): Add namespace parameter. Remove processing of
15038 DECL_CHAIN.
15039 (grokvardecl): Add namespace parameter.
15040 (grokdeclarator): Process SCOPEs that are namespaces. For
15041 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
15042 (start_function): Check for contexts that are namespaces.
15043 Set context for declarations that have not been pushed.
15044 (store_parm_decls): Check for ::main only.
15045 (finish_function): Likewise.
15046 (start_method): Check for contexts that are namespaces.
15047 (start_method): Remove DECL_CHAIN processing.
15048 * decl2.c (flag_honor_std): Declare.
15049 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
15050 (decl_namespace_list): New static global.
15051 (grok_x_components): Ignore namespaces as type contexts.
15052 (check_classfn): Expect OVERLOAD nodes.
15053 (grokfield): Remove DECL_CHAIN processing.
15054 (finish_file): Call cat_namespace_levels.
15055 (merge_functions): New function.
15056 (ambiguous_decl): Rewrite.
15057 (lookup_using_namespace): Produce tree_bindings.
15058 (qualified_lookup_using_namespace): Likewise.
15059 (set_decl_namespace, decl_namespace, current_decl_namespace,
15060 push_decl_namespace, pop_decl_namespace): New functions.
15061 (arg_lookup): New struct.
15062 (add_function, arg_assoc_namespace, arg_assoc_class,
15063 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
15064 New functions.
15065 (get_namespace_id, current_namespace_id): Remove.
15066 (do_toplevel_using_decl): Rewrite.
15067 (do_class_using_decl): Complain about namespace qualifiers.
15068 (do_using_directive): Sorry if not on namespace level. Complain
15069 about unknown namespaces.
15070 * error.c (dump_aggr_type): Check for namespace contexts.
15071 * except.c (init_exception_processing): Push terminate into std.
15072 * friend.c (is_friend): A namespace is not a context, here.
15073 * init.c (expand_member_init): Remove DECL_CHAIN processing.
15074 (build_offset_ref): Process OVERLOAD nodes.
15075 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
15076 * lex.c (identifier_type): Loop using OVL_CHAIN.
15077 (see_typename): Set looking_for_typename to 2.
15078 (real_yylex): Likewise.
15079 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
15080 (do_scoped_id): Expect OVERLOAD nodes.
15081 Change calling convention for qualified_lookup_using_namespace.
15082 (build_lang_decl): Don't set in_namespace anymore.
15083 * method.c (typevec_size): New global.
15084 (build_overload_nested_name): Return if global_namespace.
15085 Otherwise, always expect a declaration context.
15086 (build_qualified_name): Likewise.
15087 Make sure we don't write beyond typevec_size.
15088 (build_decl_overload_real): Likewise.
15089 Allocate one extra slot for the namespace.
15090 (hack_identifier): Mark code dead.
15091 Process OVERLOAD and NAMESPACE_DECL nodes.
15092 * parse.y (program): Pop namespaces until in global namespace.
15093 (extdef): In a using-declaration, don't discard the identifier if
15094 there is no declaration.
15095 (left_curly): Ignore type contexts which are namespaces.
15096 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
15097 used as scope.
15098 * pt.c (template_class_depth): Expect types to be namespaces.
15099 (determine_specialization): Simplify by expecting OVERLOAD nodes.
15100 (push_template_decl): Push into namespace level.
15101 Reset ctx if it is a namespace.
15102 Set DECL_CONTEXT to current_namespace if not set already.
15103 Ignore real contexts that are namespaces.
15104 (mangle_class_name_for_template): Skip global_namespace.
15105 Mangle other namespaces as declarations.
15106 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
15107 (lookup_template_class): Push into namespace of context.
15108 If the context is a namespace, set it to global_namespace.
15109 Use id_context for mangling.
15110 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
15111 (tsubst_friend_function): Ignore namespace contexts.
15112 Push into namespace level.
15113 (tsubst): Handle NAMESPACE_DECL nodes.
15114 Remove DECL_CHAIN processing.
15115 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
15116 * ptree.c (print_lang_identifier): Print bindings.
15117 (lang_print_xnode): Print OVERLOAD nodes.
15118 * rtti.c (init_rtti_processing): Push type_info into std.
15119 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
15120 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
15121 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
15122 lookup_fnfields_here): Likewise.
15123 Process all nodes, instead of going through TREE_CHAIN.
15124 * sig.c (build_signature_pointer_or_reference_type): Set context
15125 to global_namespace.
15126 (build_signature_table_constructor): Expect OVERLOAD nodes.
15127 * spew.c (yylex): Save old setting of looking_for_typename.
15128 * tree.c (decl_list_length): Remove.
15129 (binding_init): New function.
15130 (count_functions): Rewrite.
15131 (is_overloaded_fn): Expect OVERLOAD nodes.
15132 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
15133 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
15134 ovl_member): New functions.
15135 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
15136 (type_unknown_p): Likewise.
15137 (require_instantiated_type): Likewise.
15138 (build_component_ref): Declare code dead.
15139 (build_x_function_call): Create and expect OVERLOAD nodes.
15140 (build_function_call_real): Check for ::main only.
15141 (build_unary_op): Likewise. Expect OVERLOAD nodes.
15142 (convert_for_assignment): Check for TREE_LIST before accessing
15143 TREE_VALUE.
15144 * decl.c (duplicate_decls): Check for namespace bindings instead
15145 of global bindings.
15146 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
15147 lookup_name_current_level, start_decl, xref_tag,
15148 finish_enum): Likewise.
15149 * init.c (build_offset_ref): Likewise.
15150 * search.c (lookup_field): Likewise.
15151 (lookup_fnfields): Likewise.
15152 (dfs_debug_mark): Likewise.
15153 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
15154 (poplevel_class, pop_from_top_level): Likewise.
15155 * decl2.c (finish_method): Likewise.
15156 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
15157 * decl.c (record_builtin_type): Likewise.
15158 (init_decl_processing, grokfndecl): Likewise.
15159 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
15160 (make_lang_type): Likewise.
15161 * parse.y (make_thunk): Likewise.
15162 * pt.c (tsubst): Likewise.
15163 * tree.c (debug_binfo): Likewise.
15164 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
15165 tinfo2.cc, inc/new.h: Add std qualifications.
15166 * inc/new: Wrap with namespace std if __HONOR_STD.
15167 * inc/typeinfo: Likewise.
15168
15169 Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
15170
15171 * call.c (build_user_type_conversion_1): Handle second_conv
15172 properly for templates.
15173
15174 Thu May 7 17:09:25 1998 Andrew MacLeod <amacleod@cygnus.com>
15175
15176 * method.c (build_decl_overload_real): Set TREE_USED flag to
15177 zero for build_type_variants nodes as well.
15178
15179 Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
15180
15181 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
15182
15183 Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
15184
15185 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
15186 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
15187 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
15188 xref.o): Add toplev.h dependencies.
15189
15190 Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
15191
15192 * errfn.c (cp_error, cp_warning): Remove declarations for
15193 error and warning respectively.
15194
15195 Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15196
15197 * error.c: Convert to using ctype macros defined in system.h.
15198 * method.c: Likewise.
15199 * xref.c: Likewise.
15200 * lex.c: Likewise. Also remove redundant system header stuff.
15201
15202 Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
15203
15204 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
15205 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
15206 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
15207 xref.c: Add include of toplev.h.
15208
15209 Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
15210
15211 * tree.c (perm_manip): Also regenerate the RTL of an extern.
15212 (copy_to_permanent): Use end_temporary_allocation.
15213
15214 Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
15215
15216 * init.c (expand_vec_init): The initialization of each array
15217 element is a full-expression.
15218
15219 Tue May 5 18:24:13 1998 Andrew MacLeod <amacleod@cygnus.com>
15220
15221 * method.c (build_mangled_name): Add a call to build_type_variant
15222 to get the right type.
15223
15224 Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
15225
15226 * Makefile.in: Add .SUFFIXES.
15227
15228 * cp-tree.def: Remove NAMESPACE_DECL.
15229
15230 Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
15231
15232 * call.c (build_over_call): Do evaluate arg even if it has empty
15233 class type.
15234 * decl.c (start_function): Don't push a member function.
15235
15236 Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
15237
15238 * Makefile.in (g++FAQ.info): Put -o option before input file.
15239
15240 Thu Apr 30 13:05:33 1998 Andrew MacLeod <amacleod@cygnus.com>
15241
15242 * gxxint.texi: Add info for squangling codes K and B.
15243
15244 Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
15245
15246 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
15247 the expression in templates.
15248 (finish_stmt_expr): Likewise.
15249
15250 1998-04-28 Brendan Kehoe <brendan@cygnus.com>
15251
15252 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
15253
15254 Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
15255
15256 * decl.c (maybe_push_to_top_level): Always clear
15257 current_template_parms and processing_template_decl.
15258 (pushtag): Remove check of current_class_type and some comments,
15259 since maybe_push_to_top_level no longer creates confusion.
15260
15261 Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
15262
15263 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
15264 (DECL_CLASS_TEMPLATE_P): Likewise.
15265 (DECL_PRIMARY_TEMPLATE): Likewise.
15266 (PRIMARY_TEMPLATE_P): Use it.
15267 (push_template_decl_real): New function.
15268 (redeclare_class_template): Take new template parameters as
15269 input.
15270 (is_specialization_of): New function.
15271 (comp_template_args): Declare.
15272 * decl.c (pushtag): Handle friend template classes.
15273 (xref_tag): Likewise. Use new calling convention for
15274 redeclare_class_template.
15275 * decl2.c (grok_x_components): Handle friend templates.
15276 * friend.c (is_friend): Use is_specialization_of where
15277 appropriate. Deal with friend class templates.
15278 (make_friend_class): Let a class template be friends with itself.
15279 * pt.c (comp_template_args): Remove declaration.
15280 (tsubst_friend_class): New function.
15281 (push_template_decl_real): New function.
15282 (push_template_decl): Use it.
15283 (redeclare_class_template): Adjust for new calling convention.
15284 (comp_template_args): Give it external linkage.
15285 (instantiate_class_type): Use tsubst_friend_class to deal
15286 with friend templates.
15287 * typeck.c (comptypes): Use comp_template_args, rather than
15288 expanding it inline.
15289 * parse.y (component_decl): Handle a nested template type
15290 like other component type declarations.
15291
15292 * pt.c (check_explicit_specialization): Handle overloaded
15293 constructors correctly.
15294
15295 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
15296 (lookup_template_class): Use it.
15297
15298 Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
15299
15300 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
15301 * cp-tree.h: Add WRAPPER support.
15302 * call.c (add_candidate): Split out from add_*_candidate fns.
15303 (build_over_call): Take the candidate instead of function and args.
15304 Enforce access control here. Emit overload warnings here.
15305 (add_warning): New fn.
15306 (joust): Add WARN parm. If not set, call add_warning instead of
15307 printing a warning. Re-enable some warnings.
15308 (tourney): Pass it.
15309 (convert_like): Adjust.
15310 (build_new_op): Adjust.
15311 (build_new_function_call): Adjust.
15312 (build_user_type_conversion_1): Adjust.
15313 (USER_CONV_FN): Adjust.
15314 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
15315 build_int_wrapper): New fns.
15316
15317 Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
15318
15319 * pt.c (unify): Fix typo in previous change.
15320
15321 Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
15322
15323 * error.c (dump_type_real): Declare canonical_name.
15324
15325 * typeck.c (comp_target_types): Fix PMFs.
15326
15327 Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
15328
15329 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
15330 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
15331 TEMPLATE_DECL.
15332
15333 * pt.c (tsubst): Decrease the template-level of
15334 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
15335 TEMPLATE_PARM_INDEX.
15336 (template_decl_level): New function.
15337 (unify): Make sure to record unifications for template
15338 parameters, even when the parameters exactly match the arguments.
15339 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
15340 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
15341 aren't from the level we're currently working on.
15342
15343 Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
15344
15345 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
15346
15347 * decl2.c (check_member_template): Set DECL_IGNORED for member
15348 class templates, too.
15349
15350 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
15351
15352 Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15353
15354 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
15355
15356 Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
15357
15358 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
15359 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
15360 (init_decl_processing): Handle TI types.
15361 * typeck.c (unsigned_type, signed_type): Handle TI types.
15362
15363 Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
15364
15365 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
15366 New local added_libraries. Increment count when add library to
15367 arglist.
15368
15369 Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
15370
15371 * cp-tree.h (type_as_string_real): New function.
15372 * pt.c (mangle_class_name_for_template): Use it.
15373 * error.c (dump_aggr_type): Change prototype.
15374 (dump_type_prefix): Likewise.
15375 (dump_type_suffix): Likewise.
15376 (dump_type_real): Convert from dump_type. If desired, the
15377 "canonica" name of a typedef, i.e., the name of the underlying
15378 type, can be printed.
15379 (dump_type): Call dump_type_real.
15380
15381 Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
15382
15383 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
15384
15385 * typeck.c (comp_target_types): Tweak pedantic case.
15386 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
15387 Return -1 or 1 instead of 1 or 2.
15388 (compparms): Remove STRICT handling.
15389 (convert_for_assignment): Fix handling of pmfs.
15390
15391 Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
15392
15393 * typeck.c (comp_target_types): Handle references like pointers.
15394 (comp_target_parms): Note that return code from comp_target_types
15395 can be negative to indicate failure.
15396
15397 Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
15398
15399 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
15400 which requires a working target compiler to build.
15401
15402 Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
15403
15404 * tree.c (avoid_overlap): Add prototype.
15405
15406 * spew.c (num_tokens): Add prototype.
15407 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
15408
15409 * search.c (dfs_check_overlap): Add prototype.
15410 (dfs_no_overlap_yet): Likewise.
15411
15412 * pt.c (original_template): Add prototype.
15413 (inline_needs_template_parms): Likewise.
15414 (push_inline_template_parms_recursive): Likewise.
15415 (retrieve_specialization, register_specialization): Likewise.
15416 (print_candidates, reduce_template_parm_level): Likewise.
15417 (build_template_decl, mark_template_parm): Likewise.
15418 (tsubst_friend_function, get_bindings_real): Likewise.
15419
15420 * method.c (start_squangling): Add prototype.
15421 (end_squangling, check_ktype, issue_ktype): Likewise.
15422 (build_overloaded_scope_ref, check_btype): Likewise.
15423 (build_mangled_template_parm_index): Likewise.
15424
15425 * lex.c (init_cpp_parse): Add prototype.
15426 (handle_cp_pragma, handle_sysv_pragma): Likewise.
15427 (reduce_cmp, token_cmp): Likewise.
15428
15429 * except.c (call_eh_info): Add prototype.
15430 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
15431 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
15432
15433 * decl2.c (is_namespace_ancestor): Add prototype.
15434 (namespace_ancestor, add_using_namespace): Likewise.
15435 (ambiguous_decl): Likewise.
15436
15437 * decl.c (indent): Add prototype.
15438
15439 * call.c (add_template_candidate_real): Add prototype.
15440
15441 Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
15442
15443 * decl2.c (build_expr_from_tree): Just return a PMF.
15444
15445 Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
15446
15447 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
15448 when doing initializations.
15449
15450 * pt.c (unify): Use comptypes to compare type args.
15451
15452 Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
15453
15454 * decl.c (duplicate_decls): Fix check for when it's safe to free
15455 the new decl.
15456
15457 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
15458 to type_as_string.
15459
15460 Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
15461
15462 * pt.c (build_template_parm_index): Add prototype.
15463
15464 * search.c (my_tree_cons): Don't clear words outside the
15465 newly allocated node.
15466
15467 Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
15468
15469 * lex.c (init_parse): Now returns char* containing the filename.
15470
15471 Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
15472 Jeff Law <law@cygnus.com>
15473
15474 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
15475 than a pointer.
15476
15477 Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15478
15479 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
15480
15481 Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
15482
15483 * decl.c (duplicate_decls): Don't warn for redundant decls if
15484 friend: let add_friend take care of it.
15485
15486 Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
15487
15488 * sig.c (build_signature_pointer_constructor): Don't set
15489 TREE_HAS_CONSTRUCTOR for a signature pointer.
15490 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
15491 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
15492 here, too.
15493 * typeck.c (build_unary_op): Only allow taking the address of a
15494 real constructor.
15495 * typeck2.c (digest_init): Simplify.
15496 (store_init_value): Don't pedwarn about using { } for pmfs.
15497
15498 Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
15499
15500 * cp-tree.h (start_decl): Update prototype.
15501 * decl.c (start_decl): Like the C version, new parameters
15502 for the attributes. Call cplus_decl_attributes here,
15503 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
15504 (grokdeclarator): Pass NULL for new start_decl arguments.
15505 * pt.c (tsubst_expr): Likewise.
15506 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
15507 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
15508 * lex.c (build_lang_decl): Add lang_name_java.
15509 * class.c (push_lang_context): Add lang_name_java.
15510 * method.c (build_mangled_name): Check for is_java_type.
15511
15512 Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
15513
15514 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
15515 * call.c (build_scoped_method_call): Check for TREE_CODE for
15516 VOID_TYPE instead of type == void_type_node.
15517 (build_method_call): Likewise.
15518 * decl.c (lookup_name_real): Likewise.
15519 (grokdeclarator): Likewise.
15520 (start_decl): Likewise.
15521 (grokparms): Likewise.
15522 (start_function): Likewise.
15523 (finish_function): Likewise.
15524 (start_method): Likewise.
15525
15526 Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
15527
15528 * lex.c (finput): New variable.
15529 (init_cpp_parse): Renamed from init_parse.
15530 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
15531 (finish_parse): New function.
15532 * cp-tree.h (init_lex, init_parse): Remove declarations.
15533
15534 Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
15535
15536 * call.c (build_call): Still evaluate the actual argument.
15537 * class.c (is_empty_class): Update for -fnew-abi.
15538
15539 * decl2.c: -fnew-abi implies -fsquangle.
15540
15541 * method.c (do_build_assign_ref): Don't do anything to copy
15542 an empty class.
15543 (do_build_copy_constructor): Likewise.
15544 * call.c (build_over_call): Likewise.
15545
15546 Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
15547
15548 * tree.c (avoid_overlap): Return a value.
15549
15550 Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
15551
15552 * method.c (check_btype): Add missing argument to xrealloc.
15553 (check_ktype): Likewise.
15554
15555 Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
15556
15557 Implement empty base optimization.
15558 * class.c (finish_struct_1): Add vbase fields earlier. Set
15559 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
15560 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
15561 (types_overlap_p): New fn.
15562 * tree.c (avoid_overlap): New fn.
15563 (build_base_fields): Use it to avoid overlapping empty bases.
15564 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
15565
15566 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
15567
15568 Re-implement allocation of base class subobjects.
15569 * tree.c (unshare_base_binfos): New fn.
15570 (layout_basetypes): Use it. Now handles offsets of both virtual and
15571 non-virtual bases, after layout_type.
15572 (layout_vbasetypes): Remove.
15573 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
15574 (build_vbase_pointer_fields): Split out from old layout_basetypes.
15575 * class.c (finish_base_struct): Lose offset handling code.
15576 Move nonvdtor warning here. Don't mess with t_binfo anymore.
15577 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
15578 * cp-tree.h: Adjust.
15579
15580 Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
15581
15582 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
15583 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
15584 * class.c (duplicate_tag_error): Likewise.
15585 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
15586 * tree.c (layout_vbasetypes): Update from layout_record, remove
15587 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
15588 (layout_basetypes): Likewise.
15589
15590 Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
15591
15592 * class.c, Make sure system.h is included just after config.h.
15593 Delete lingering stdio and errno references too.
15594 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
15595
15596 Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
15597
15598 * friend.c (is_friend): Fix access control for local classes.
15599
15600 * class.c (is_empty_class): New fn.
15601 * call.c (build_call): Don't pass empty class objects to a function.
15602
15603 Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
15604
15605 * call.c (build_over_call): Do name resolution for default
15606 arguments of function templates in the scope of the templates.
15607
15608 Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
15609
15610 * call.c: Include system.h. Remove includes, declarations and
15611 defines provided by system.h.
15612 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
15613 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
15614 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
15615 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
15616 * typeck2.c, xref.c: Likewise.
15617 * Makefile.in: Dependencies updated as appropriate.
15618 * Make-lang.in: Likewise.
15619
15620 Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
15621
15622 * pt.c (fn_type_unification): Allow incomplete unification without
15623 an immediate error message.
15624
15625 Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
15626
15627 * tree.c (member_p): New fn.
15628 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
15629 initializing class members.
15630
15631 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
15632 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
15633
15634 * call.c (build_method_call): Handle non-scoped destructors, too.
15635 * pt.c (tsubst_copy): Likewise.
15636
15637 * pt.c (print_template_context): Split out...
15638 (push_tinst_level): ...from here.
15639
15640 * friend.c (is_friend): Don't pass a type to decl_function_context.
15641
15642 * typeck.c (convert_for_initialization): Always hand off
15643 conversions to class type.
15644
15645 Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
15646
15647 * friend.c (is_friend): Local classes have the same access as the
15648 enclosing function.
15649
15650 Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
15651
15652 * typeck.c (expand_target_expr): Delete dead function.
15653
15654 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
15655
15656 * repo.c (save_string): Delete dead function.
15657
15658 * method.c (thunk_printable_name): Delete dead function.
15659
15660 * lex.c (yynextch): Delete dead function.
15661
15662 * expr.c (tree_extract_aggr_init): #if 0 out.
15663
15664 * except.c (do_unwind): Delete dead function.
15665 (easy_expand_asm): Likewise.
15666
15667 * cvt.c (build_conversion_type_1): Delete dead function.
15668
15669 * cp-tree.h (push_expression_obstack): Declare.
15670
15671 * call.c (source_type): #if 0 out.
15672
15673 * class.c (alter_access): Remove unused label. Add braces
15674 around empty else clause.
15675
15676 * lex.c (yyprint): Fix argument to printf.
15677
15678 Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
15679
15680 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
15681
15682 * pt.c (instantiate_class_template): Make sure template
15683 arguments are permanent.
15684 * init.c (resolve_offset_ref): Don't go looking around in
15685 template types.
15686
15687 * semantics.c: Add routines to handle expressions, and some
15688 declaration processing.
15689 * parse.y: Use them.
15690 (current_class_depth): Move declaration to cp-tree.h.
15691 * parse.c: Regenerated.
15692 * cp-tree.h: Use them.
15693 (current_class_depth): Declare.
15694 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
15695
15696 Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
15697
15698 * error.c (dump_decl): Be a bit more explicit with template
15699 type arguments, when verbose.
15700
15701 Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
15702
15703 * inc/exception: Reorder closing braces.
15704
15705 Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
15706
15707 * pt.c (redeclare_class_template): New function.
15708 * cp_tree.h (redeclare_class_template): Declare it.
15709 * decl.c (xref_tag): Use it.
15710
15711 Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
15712
15713 * call.c (build_over_call): Check IS_AGGR_TYPE, not
15714 TYPE_LANG_SPECIFIC.
15715 * typeck.c (convert_arguments): Likewise.
15716
15717 * decl.c (grokdeclarator): Remove const and volatile from type after
15718 setting constp and volatilep.
15719
15720 * class.c (finish_struct_1): Don't warn about bool bitfield larger
15721 than one bit.
15722
15723 Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
15724
15725 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
15726
15727 Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
15728
15729 * call.c (build_object_call): Complain about ambiguous operator(),
15730 rather that crashing.
15731 (build_new_op): Likewise.
15732 (build_op_delete_call): Likewise.
15733
15734 Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
15735
15736 * cvt.c (perform_qualification_conversions): Use comp_target_types
15737 instead of comp_ptr_ttypes.
15738
15739 Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
15740
15741 * cp-tree.h (enforce_access): Declare.
15742 * call.c (enforce_access): Make it extern, not static.
15743 * class.c (alter_access): Use enforce_access; modify code for ISO
15744 compliance, rather than ARM rules.
15745
15746 Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
15747
15748 * cp-tree.h: Fix typo.
15749
15750 Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
15751
15752 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
15753 if (aggregate_value_p (type)).
15754
15755 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
15756
15757 Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
15758
15759 * tree.c (mapcar): When dealing with a DECL, use it's constant
15760 value, if any.
15761 * pt.c (lookup_template_class): Don't mangle the names of template
15762 classes whose arguments are unknown.
15763
15764 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
15765
15766 Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
15767
15768 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
15769
15770 Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
15771
15772 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
15773 boolean_type_node to 1.
15774
15775 Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
15776
15777 * error.c (dump_expr): Remove unused variable `l'.
15778
15779 * pt.c (for_each_template_parm): New function, created by
15780 converting uses_template_parms.
15781 (tree_fn_t): New typedef.
15782 (uses_template_parms): Use it.
15783 (mark_template_parm): New function.
15784 (push_template_decl): Check that the argument list of a partial
15785 specialization uses all the template parameters.
15786
15787 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
15788 with it; we might want it for debugging.
15789 * cp-tree.h (type_unification): Change interface.
15790 * class.c (finish_struct_1): Skip nested template types, just like
15791 ordinary nested types.
15792 (instantiate_type): Use new interface to type_unification.
15793 * lex.c (init_lex): Add __sz as opname for sizeof.
15794 * method.c (build_overload_scope_ref): New function.
15795 (build_overload_int): Handle complex expressions. Set
15796 numeric_output_need_bar if necessary.
15797 (build_overload_value): Handle non-PARM_DECL nodes; this
15798 routine is now used by build_overload_int. Remove some
15799 assignments to numeric_output_need_bar. Use
15800 build_overload_scope_ref.
15801 (build_qualified_name): Note that some template mangled names end
15802 with digits, and set numeric_output_need_bar appropriately. Use
15803 build_underscore_int.
15804 * pt.c (unify): Change interface.
15805 (type_unification_real): Likewise.
15806 (determine_specialization): Use new interfaces.
15807 (tsubst): Deal gracefully with situations in which the argument
15808 vector is not fully filled.
15809 (fn_type_unification): Use new interfaces.
15810 (type_unification): Likewise. Remove NOP_EXPR hack.
15811 (type_unification_real): Likewise.
15812 (unify): Likewise. Deal with unification of complex expressions.
15813
15814 Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
15815
15816 * pt.c (complete_template_args): Initialize skip properly.
15817
15818 * decl.c (make_typename_type): Revert.
15819 (make_implicit_typename): Remove.
15820 (lookup_name_real): Don't call it. Call lookup_field if we see a
15821 TYPE_DECL from a template base.
15822 * search.c (lookup_field): Do implicit typename stuff.
15823
15824 Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
15825 Geoff Noer <noer@cygnus.com>
15826
15827 * Makefile.in: Various fixes for building cygwin32 native toolchains.
15828 * Make-lang.in: Likewise.
15829
15830 Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
15831
15832 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
15833
15834 Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
15835
15836 * decl.c (make_implicit_typename): Rewrite removed code.
15837 (make_typename_type): Call it if the type we look up comes from
15838 a base that uses template parms.
15839
15840 * pt.c (complete_template_args): Rewrite.
15841 (tsubst, FUNCTION_DECL): Use it.
15842
15843 Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
15844
15845 * semantics.c (finish_asm_stmt): Fix combine strings. Call
15846 c_expand_asm_operands () if output_operands, input_operands or
15847 clobbers is not NULL_TREE.
15848
15849 Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
15850
15851 * pt.c (complete_template_args): New function.
15852 (get_bindings): Deal with specializations of function templates
15853 with return type containing parameters from outer class
15854 templates.
15855 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
15856 substitute arguments and compose a new type.
15857
15858 Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
15859
15860 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
15861 FUNCTION_DECLs.
15862
15863 Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
15864
15865 * decl.c (make_implicit_typename): Lose useless code.
15866
15867 * call.c (standard_conversion): Handle A* -> const A* properly.
15868
15869 * pt.c (get_bindings_real): Rename from get_bindings. Add
15870 check_rettype parm.
15871 (get_bindings): Pass 1.
15872 (get_bindings_overload): Pass 0.
15873
15874 Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
15875
15876 * pt.c (check_explicit_specialization): When reverting a static
15877 member function, also remove the `this' parameter from
15878 last_function_parms.
15879
15880 Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
15881
15882 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
15883 a function context.
15884
15885 * decl.c (store_bindings): Use free_binding_vecs.
15886 (pop_from_top_level): Likewise.
15887
15888 Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
15889
15890 * decl.c (make_implicit_typename): Only change the type of a
15891 TYPENAME_TYPE.
15892
15893 Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
15894
15895 * semantics.c: New file, containing routines to perform the
15896 semantic phase of parsing.
15897 * parse.y: Use it.
15898 * pt.c (tsubst_expr): Likewise.
15899 * cp-tree.h: Declare the various functions in semantics.c.
15900 Provide macros to access _STMT tree nodes.
15901 * cp-tree.def: Add ASM_STMT tree node.
15902 * Makefile.in, Make-lang.in: Add dependencies on and for
15903 semantics.c.
15904
15905 Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
15906
15907 * pt.c (push_template_decl): Only check primary templates.
15908
15909 * pt.c (check_explicit_specialization): Complain about default args
15910 in explicit specialization.
15911
15912 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
15913 constructor_declarator.
15914
15915 Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
15916
15917 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
15918 has no overloaded operator ->.
15919
15920 * call.c (build_field_call): Don't crash when presented with a
15921 field that is actually a nested type.
15922
15923 * decl.c (pushtag): Deal with friend class injection in local
15924 classes.
15925
15926 * call.c (build_object_call): Don't crash if OBJ is a
15927 pointer-to-member-function.
15928
15929 Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
15930
15931 * pt.c (push_template_decl): Complain about template with C linkage,
15932 anonymous template class.
15933
15934 Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
15935
15936 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
15937 * search.c: Likewise.
15938
15939 * lex.c (do_pending_defargs): Only call
15940 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
15941
15942 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
15943
15944 Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
15945
15946 * parse.y: Deal with CONSTRUCTORS in new_initializers.
15947
15948 Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
15949
15950 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
15951 closely mimics the behavior in parse.y.
15952 (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
15953 into a compound statement.
15954
15955 Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
15956
15957 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
15958 * pt.c (inline_needs_template_parms): New fn.
15959 (original_template): New fn.
15960 (push_inline_template_parms_recursive): New fn.
15961 (maybe_begin_member_template_processing): Use them.
15962 (maybe_end_member_template_processing): Likewise.
15963 (is_member_or_friend_template): Rename to is_member_template.
15964 Member functions of local classes are never member templates.
15965
15966 Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
15967
15968 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
15969 added in the class scope to catch redefinition error.
15970
15971 * pt.c (reduce_template_parm_level): Also copy
15972 the DECL_TEMPLATE_PARMS field.
15973
15974 Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
15975
15976 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
15977 reduced-level template type parameter.
15978
15979 Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
15980
15981 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
15982 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
15983 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
15984 * decl.c (duplicate_decls): Propagate it.
15985 * typeck2.c (abstract_virtuals_error): Use two loops to emit
15986 abstract virtual functions and virtual functions which need a
15987 final overrider separately.
15988
15989 Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
15990
15991 * lang-specs.h: Properly put brackets around array elements in
15992 initializer.
15993
15994 * typeck.c (build_binary_op_nodefault): Correctly place parens around
15995 && and || in expression.
15996
15997 Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
15998
15999 * call.c (default_parm_conversions): Remove prototype definition.
16000 (build_method_call): Remove unused variable result.
16001
16002 * cvt.c (ocp_convert): Remove unused variable conversion.
16003
16004 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
16005
16006 * except.c (do_unwind): #if 0 definition of unused variables fcall
16007 and next_pc.
16008
16009 * expr.c (extract_scalar_init): #if 0 prototype and function
16010 definition.
16011
16012 * init.c (expand_aggr_init_1): Remove unused variable init_type.
16013 (build_new_1): Remove unused variable t.
16014
16015 * pt.c (instantiate_class_template): Remove unused variable newtag;
16016 cast called function return value to void.
16017 (do_decl_instantiation): Remove unused variables name and fn.
16018
16019 * tree.c (get_type_decl): Add default return to shut up compiler from
16020 complaining control reaches end of non-void function.
16021
16022 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
16023
16024 Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
16025
16026 * call.c (default_parm_conversions): Remove prototype definition.
16027 (build_method_call): Remove unused variable result.
16028 (build_over_call): Add default case in enumeration switch.
16029
16030 Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
16031
16032 * decl2.c (lang_decode_option): Change j's type to size_t.
16033
16034 * tree.c (layout_vbasetypes): record_align and desired_align are of
16035 type unsigned int; const_size and nonvirtual_const_size likewise.
16036
16037 Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
16038
16039 * parse.y (new_initializer): Make sure all initializers are
16040 lists.
16041
16042 Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
16043
16044 * decl2.c (import_export_decl): Mark tinfo functions for
16045 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
16046
16047 Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
16048
16049 * method.c: Fix typo.
16050
16051 Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16052
16053 * method.c: Include "system.h" to get stdlib.h, stdio.h,
16054 ctype.h, string.h, etc.
16055 (issue_nrepeats): Add default case in enumeration switch.
16056 (check_btype): Likewise.
16057 (process_overload_item): Likewise.
16058
16059 * Makefile.in (method.o): Depend on system.h.
16060
16061 Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
16062
16063 * lex.c (do_scoped_id): Fix parenthesizing.
16064
16065 Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
16066
16067 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
16068 FLAG_RTTI is unset, initialize type info machinery and continue
16069 with FLAG_RTTI enabled.
16070 (get_typeid): Likewise.
16071
16072 Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
16073
16074 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
16075 from B.
16076
16077 Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
16078
16079 * pt.c (finish_member_template_decl): Deal more gracefully with
16080 invalid declarations.
16081
16082 Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
16083
16084 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
16085 cp-tree.h: Clean up more old overloading code, old RTTI code, and
16086 some formatting quirks.
16087
16088 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
16089 method.c, pt.c, ptree.c, typeck.c: Remove support for
16090 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
16091 * class.h: Remove.
16092 * Makefile.in: Adjust.
16093
16094 * pt.c (unify): Don't allow reduced cv-quals when strict.
16095
16096 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
16097 *type_unification* and unify.
16098
16099 Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
16100
16101 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
16102 (nested_name_specifier): And add it before this use.
16103 (typename_sub0): And this use. Also add use without the keyword.
16104 (typename_sub1): Likewise.
16105 * pt.c (instantiate_class_template): Don't actually instantiate
16106 anything if our type uses template parms.
16107
16108 Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
16109
16110 * decl.c (start_function): Don't call temporary_allocation for a
16111 nested function.
16112
16113 Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
16114
16115 * pt.c (instantiate_class_template): Don't mess with friends if
16116 our type uses template parms.
16117
16118 Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
16119
16120 * parse.y (nested_name_specifier): Use explicit_template_type.
16121 (typename_sub): Allow a template_type, an explicit_template_type,
16122 or an implicit template type at the end.
16123 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
16124 * decl.c (make_typename_type): Handle template-id where the name
16125 is a TEMPLATE_DECL.
16126 * call.c (build_scoped_method_call): Handle member template
16127 destructor call.
16128 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
16129 destructor is represented by the type.
16130
16131 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
16132 * parse.y (nested_name_specifier): Add 'template' case.
16133 (explicit_template_type): New rule.
16134 (typename_sub): Use it.
16135 * decl.c (make_typename_type): Handle getting a template-id for NAME.
16136 * pt.c (tsubst): Likewise.
16137
16138 Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
16139
16140 * pt.c (add_to_template_args): Fix thinko.
16141 (instantiate_class_template): Call it later.
16142
16143 * pt.c (get_class_bindings): Add outer_args parm.
16144 (most_specialized_class): Likewise.
16145 (instantiate_class_template): Pass it.
16146 (more_specialized_class): Likewise.
16147 (lookup_template_class): Get context from template if none
16148 was specified.
16149 (finish_member_template_decl): Don't do anything with a
16150 partial specialization.
16151 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
16152 AGGREGATE_TYPE_P.
16153 * class.c (finish_struct): Member class templates have already been
16154 checked for name clashes.
16155 * decl.c (pushdecl_with_scope): Handle pushing at class level.
16156
16157 Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
16158
16159 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
16160 (tsubst, *_PARM): Support multiple levels of template classes.
16161 (instantiate_class_template): Look up the pattern from the
16162 original template.
16163 (lookup_template_class): Handle getting a template for d1.
16164 (push_template_decl): Correct setting of 'primary'.
16165 (reduce_template_parm_level): Add 'levels' parm.
16166 (finish_member_template_decl): Support member class templates.
16167 (template_class_depth): Handle multiple levels.
16168 * parse.y (component_decl_1, fn.def2): Remove member template case.
16169 (component_decl): Add member template cases.
16170 * decl2.c (check_member_template): We now handle member template
16171 classes.
16172 * decl.c (pushtag): Handle member templates.
16173 * method.c (do_inline_function_hair): Don't touch
16174 IDENTIFIER_GLOBAL_VALUE.
16175 * init.c (build_offset_ref): If name isn't an identifier, just
16176 return it.
16177 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
16178
16179 * typeck.c (get_delta_difference): Do adjust for conversions to
16180 and from virtual base.
16181
16182 Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
16183
16184 * typeck.c (get_delta_difference): Give hard error for conversion
16185 from virtual base.
16186
16187 * cp-tree.h: Tweak formatting.
16188
16189 Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
16190
16191 * decl.c (push_namespace): Handle redeclaration error.
16192
16193 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
16194 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
16195 (NAMESPACE_BINDING): New macro.
16196 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
16197 * *.c: Use them.
16198
16199 * pt.c (push_template_decl): Use innermost_args.
16200
16201 * decl.c (get_unique_name): Tweak from earlier in the name.
16202
16203 Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
16204
16205 * cp-tree.def: Add CPLUS_BINDING node.
16206 * cp-tree.h (tree_binding): New struct.
16207 (BINDING_SCOPE, BINDING_VALUE): New macros.
16208 (current_namespace, global_namespace): Declare extern.
16209 (struct lang_decl_flags): New field in_namespace.
16210 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
16211 (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
16212 (TREE_INDIRECT_USING): New macro.
16213 * decl2.c (current_namespace, global_namespace): Declare. The
16214 value is a NAMESPACE_DECL now, not a TREE_LIST.
16215 (is_namespace_ancestor, namespace_ancestor): New static functions.
16216 (add_using_namespace, ambiguous_decl): Likewise.
16217 (lookup_using_namespace): New support function for lookup_name.
16218 (qualified_lookup_using_namespace): New support function for
16219 do_scoped_id and lookup_namespace_name.
16220 (get_namespace_id): Mark as obsolete.
16221 (current_namespace_id): Likewise.
16222 (do_namespace_alias): Implement.
16223 (do_using_directive): Implement as call to add_using_namespace.
16224 * decl.c (binding_for_name): New function.
16225 (push_namespace, pop_namespace): Implement.
16226 (push_decl): Don't install a FUNCTION_DECL in the global branch.
16227 (lookup_namespace_name): Implement using qualified lookup.
16228 (lookup_name_real): For global scoping, lookup in
16229 global_namespace. For namespace scoping, lookup in given
16230 namespace. For unscoped lookup, iterate over namespace,
16231 considering using directives.
16232 (init_decl_processing): Initialize global_namespace.
16233 (grokvardecl): Build assembler name as static name for globals.
16234 (grokdeclarator): Remove old namespace mangling.
16235 (xref_tag): When installing a global binding for the
16236 tag, make sure we have an identifier.
16237 * method.c (build_overload_nested_name): Mangle namespaces.
16238 (build_qualified_name): Likewise.
16239 (build_decl_overload_real): Likewise.
16240 * lex.c (build_lang_decl): Set namespace for new declaration to
16241 current_namespace.
16242 (do_scoped_id): Find global names in global or current
16243 namespace, or using qualified namespace lookup, depending on
16244 context.
16245 * init.c (build_member_call): When scope is namespace, use
16246 build_x_function_call instead.
16247 (build_offset_ref): When scope is namespace, collapse processing
16248 to lookup_namespace_name instead.
16249 * error.c (dump_decl): Support NAMESPACE_DECL.
16250 * decl.c (pushdecl): Bind globals to current namespace.
16251 (push_overloaded_decl): Likewise.
16252 (lookup_tag): Likewise.
16253 (lookup_name_current_level): Likewise.
16254 (xref_tag): Likewise.
16255 (start_function): Likewise.
16256 * lex.c (do_identifier): Likewise.
16257 (identifier_typedecl_value): Likewise.
16258 (real_yylex): Likewise.
16259 * method.c (do_inline_function_hair): Likewise.
16260 * parse.y (unscoped): Likewise.
16261 * pt.c (check_explicit_specialization): Likewise.
16262 (lookup_template_class): Likewise.
16263 * rtti.c (call_void_fn): Likewise.
16264 * sig.c (build_sigtable): Likewise.
16265 * ptree.c (lang_print_xnode): New function.
16266
16267 Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
16268
16269 * pt.c (instantiate_class_template): Don't instantiate if pedantic
16270 and the args use template parms.
16271
16272 * pt.c (push_tinst_level): If the instantiation uses template parms,
16273 fail silently.
16274 * decl.c (xref_basetypes): Do call complete_type for basetypes
16275 that involve template parameters.
16276
16277 Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
16278
16279 * typeck2.c (process_init_constructor): Fix labeled init check.
16280
16281 Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
16282
16283 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
16284 argument to tsubst and friends.
16285
16286 * pt.c (tsubst, FUNCTION_DECL): Tidy.
16287
16288 * typeck.c (build_x_function_call): Handle static member function
16289 templates like non-templates. Handle friend templates like normal
16290 function templates.
16291 * pt.c (tsubst, *_PARM): Don't use orig_level.
16292 (get_bindings): Don't call add_to_template_args.
16293 (instantiate_template): Likewise.
16294 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
16295 * ptree.c (print_lang_type): Print index/level for template parms.
16296
16297 Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
16298
16299 * Make-lang.in (cc1plus): Note that cc1plus depends on
16300 cp/cp-tree.h and cp/cp-tree.def.
16301
16302 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
16303 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
16304 position in a template parameter list.
16305 * cp-tree.h (template_parm_index): New structure, used as the tree
16306 structure for a TEMPLATE_PARM_INDEX.
16307 (TEMPLATE_PARM_IDX): New macro.
16308 (TEMPLATE_PARM_LEVEL): Likewise.
16309 (TEMPLATE_PARM_DESCENDANTS): Likewise.
16310 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
16311 (TEMPLATE_PARM_DECL): Likewise.
16312 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
16313 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
16314 (TEMPLATE_TYPE_DECL): Likewise.
16315 (TEMPLATE_CONST_IDX): Remove.
16316 (TEMPLATE_CONST_LEVEL): Likewise.
16317 (TEMPLATE_CONST_SET_INFO): Likewise.
16318 (TEMPLATE_TYPE_SET_INFO): Likewise.
16319 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
16320 node.
16321 (TEMPLATE_TYPE_LEVEL): Likewise.
16322 * decl.c (decls_match): Call comp_template_parms, rather than
16323 expanding it inline.
16324 (duplicate_decls): If two template declarations are being merged,
16325 then their TEMPLATE_INFOs should be merged as well.
16326 (grokfndecl): Save template-id information when declaring a friend
16327 with explicit template arguments. Pass arguments to
16328 check_explicit_specialization via correct convention; at some
16329 point check_explicit_specialization changed, but these call-sites
16330 did not.
16331 (grokdeclarator): Tidy up slightly.
16332 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
16333 two template functions with the same DECL_ASSEMBLER_NAME the same,
16334 since the names are not yet mangled.
16335 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
16336 TEMPLATE_CONST_PARM.
16337 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
16338 decl for a non-type parameter, rather than printing `<tparm ...>'.
16339 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
16340 (do_friend): Deal with template friends.
16341 * lex.c (do_pending_inlines): Call
16342 maybe_begin_member_template_processing, rather than
16343 conditionally calling begin_member_template_processing.
16344 (process_next_inline): Likewise. Call
16345 maybe_end_member_template_processing, rather than
16346 conditionally calling end_member_template_processing.
16347 (do_pending_defargs): Likewise.
16348 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
16349 TEMPLATE_CONST_PARM.
16350 * method.c (build_mangled_template_parm_index): New function.
16351 (build_overload_value): Use it.
16352 (build_overload_name): Likewise.
16353 * pt.c (finish_member_template_decl): Allow friend declarations.
16354 (template_class_depth): New function.
16355 (is_member_template): Rename, and modify, to become...
16356 (is_member_or_friend_template): New function.
16357 (end_member_template_processing): Rename, and modify, to become...
16358 (maybe_end_member_template_processing).
16359 (build_template_parm_index): New function.
16360 (reduce_template_parm_level): New function.
16361 (process_template_parm): Modify to use build_template_parm_index.
16362 (push_template_decl): Deal with friend templates.
16363 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
16364 TEMPLATE_CONST_PARM.
16365 (tsubst_friend_function): New function.
16366 (instantiate_class_template): Generate the DECL_FRIENDLIST
16367 for a new instantiation by using tsubst_friend_function rather
16368 than just tsubst.
16369 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
16370 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
16371 appropriate new macros. Use reduce_template_parm_level to
16372 generate lower-level template parameters. Handle tsubst'ing into
16373 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
16374 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
16375 templates. Similarly for the template parameters for a new
16376 template.
16377 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
16378 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
16379 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
16380 (get_bindings): Call add_to_template_args if necessary.
16381 (instantiate_decl): Handle instantiations of friend templates.
16382 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
16383 TEMPLATE_TYPE_PARM as a list of fields; it's not!
16384 * spew.c (yylex): Do a little manual constant propagation to
16385 clarify the code.
16386
16387 Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
16388
16389 * error.c: Include sys/types.h.
16390
16391 Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
16392
16393 * method.c (build_mangled_name): Start CPP directives in column zero.
16394
16395 Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
16396
16397 * typeck2.c (process_init_constructor): Sorry about non-trivial
16398 labeled initializers.
16399 * parse.y (initlist): Re-enable labeled initializers.
16400
16401 Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16402
16403 * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
16404 all callers changed. Rely on the new parameter instead of arg
16405 being a TREE_LIST when determine whether we are working inside
16406 template template parameter. Clean up is_type test.
16407
16408 Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
16409
16410 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
16411 * typeck2.c (initializer_constant_valid_p): Allow conversions
16412 between pointers and references.
16413
16414 1998-02-19 Brendan Kehoe <brendan@cygnus.com>
16415
16416 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
16417 if pedantic || warn_pointer_arith.
16418
16419 Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16420
16421 * pt.c (unify): Handle TEMPLATE_DECL.
16422
16423 1998-02-18 Brendan Kehoe <brendan@cygnus.com>
16424
16425 * cp-tree.h (strip_attrs): Remove decl.
16426
16427 1998-02-18 Doug Evans <devans@cygnus.com>
16428
16429 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
16430 Update olddecl's attributes too.
16431 (strip_attrs): Remove function.
16432 * typeck.c (common_type): Call merge_machine_type_attributes.
16433
16434 Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
16435
16436 * parse.y (initdcl0_innards): New grammar symbol.
16437 (nomods_initdecls, nomods_initdcl0): Change type from itype to
16438 none, since the resulting value is never used.
16439 (parse_decl): New function.
16440 (datadef): Remove redundant actions.
16441 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
16442 * parse.c: Regenerated.
16443
16444 Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
16445
16446 * parse.y (simple_stmt): Use getdecls() to check for decl.
16447
16448 Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
16449
16450 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
16451 macros.
16452 (c++.install-common): Install c++filt properly as native or as cross
16453 variant.
16454 (c++.uninstall): Add c++filt.
16455
16456 Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
16457
16458 * call.c (standard_conversion): Fix multi-level ptr conversions.
16459
16460 Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
16461
16462 * init.c (build_new): Propagate error_mark_node up.
16463
16464 Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
16465
16466 * parse.y (simple_stmt): If the condition isn't a declaration,
16467 start the controlled block after the test.
16468
16469 Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
16470
16471 * call.c (build_over_call): Convert builtin abs, labs and fabs to
16472 tree-codes.
16473 * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
16474 builtins.
16475
16476 Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
16477
16478 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
16479
16480 Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
16481
16482 * cp-tree.h: Add access_protected_virtual_node.
16483 * class.c (init_class_processing): Initialize it.
16484 * decl.c (xref_basetypes): Use it.
16485 * parse.y (base_class_access_list): Likewise.
16486
16487 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
16488 (c++.install-common): Install c++filt.
16489
16490 Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
16491
16492 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
16493
16494 Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
16495
16496 * call.c (reference_binding): Use comptypes when comparing
16497 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
16498
16499 Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
16500
16501 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
16502 (really_overloaded_fn): Move check here from is_overloaded_fn.
16503 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
16504
16505 Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
16506
16507 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
16508 conversions.
16509
16510 Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
16511
16512 * cp-tree.h (push_template_decl): Return the decl passed in, or an
16513 equivalent duplicate.
16514 * decl.c (pushtag): Use the return value from push_template_decl.
16515 (duplicate_decls): When duplicating a template declaration, merge
16516 the DECL_TEMPLATE_RESULTs as well.
16517 (make_implicit_typename): Don't try to dive into typename types to
16518 find a context for making a new implicit typename.
16519 (start_decl): Use the return value from push_template_decl.
16520 (grokdeclarator): Complain about declarations list `const operator
16521 int'. Since we don't correctly handle in-class initializations of
16522 non-static data members, complain about this (now illegal)
16523 practice. Issue an error for initializations of non-const statics
16524 since that is illegal as well, and since we don't handle that case
16525 correctly either.
16526 (start_function): Use the return value from push_template_decl.
16527 (start_method): Likewise.
16528 * decl2.c (grokfield): Likewise. Since the change to
16529 grokdeclarator ensures that all initialized fields are in fact
16530 static, remove a redundant test for TREE_PUBLIC.
16531 * parse.y (initlist): Disable labeled initializers since they do
16532 not work as per the documentation, and since they do not use the
16533 same syntax as the C front end.
16534 * pt.c (push_template_decl): Return the decl passed in, or an
16535 equivalent duplicate.
16536 (lookup_template_class): When searching in a nested context,
16537 use the right arguments.
16538 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
16539 * typeck.c (build_component_ref): Assign the correct type to the
16540 result of build_vfn_ref.
16541
16542 Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
16543
16544 * pt.c (convert_nontype_argument): Fix typo.
16545 (check_explicit_specialization): Allow old-style specialization
16546 of class template members.
16547
16548 Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
16549 Manfred Hollstein <manfred@s-direktnet.de>
16550
16551 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
16552 when deciding to override DECL_ASSEMBLER_NAME.
16553
16554 Tue Feb 10 15:30:55 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
16555
16556 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
16557 * cp-tree.h (flag_do_squangling): Add declaration.
16558 * lang-options.h: Add -fsquangle and -fno-squangle.
16559 * method.c: Add macros and static variables for squangling.
16560 (build_overload_name): Rename to build_mangled_name, add logic for B
16561 compression, and split into process_modifiers and
16562 process_overload_item.
16563 (process_modifiers): New function, to handle constant, reference,
16564 and pointer types.
16565 (process_overload_item): New function, handles issue of type codes.
16566 (build_overload_name): New function, start squangling and call
16567 build_mangled_name.
16568 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
16569 (start_squangling): New function to initialize squangling structs.
16570 (end_squangling): New function to destroy squangling structs.
16571 (nrepeats): Rename variable to Nrepeats.
16572 (issue_nrepeats): New function for issuing 'n' type repeats.
16573 (check_ktype): New function to check for type K name compression.
16574 (build_overload_nested_name): Add a check for K name compression.
16575 (build_qualified_name): Add a check for K name compression and don't
16576 use DECL_ASSEMBLER_NAME when squangling is on.
16577 (check_btype): New function, checks for B type compression.
16578 (build_static_name, build_decl_overload_real): Initiate squangling.
16579 (build_typename_overload, build_overload_with_type): Initiate
16580 squangling
16581
16582 Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
16583
16584 * method.c (make_thunk): Avoid name buffer overflow.
16585
16586 Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
16587
16588 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
16589 don't define them yet.
16590
16591 * parse.y (nomods_initdcl0): Add constructor_declarator case.
16592
16593 Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16594
16595 * config-lang.in (diff_excludes): Use basename only.
16596
16597 Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
16598
16599 * tinfo2.cc: Add tinfo for signed char.
16600
16601 Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
16602
16603 * search.c (compute_access): Handle protected constructors in derived
16604 classes as accessible.
16605
16606 Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
16607
16608 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
16609 Call convert_from_reference sooner.
16610
16611 Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
16612
16613 * cvt.c (ocp_convert): Obtain the constant values from constant
16614 decls even if the destination type is the same as the type of the
16615 decl.
16616
16617 * decl2.c (finish_file): Make sure that static inlines with
16618 definitions are not marked DECL_EXTERNAL before returning.
16619
16620 Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
16621
16622 * decl.c: Lose arg_looking_for_template.
16623 (lookup_name_real): Likewise.
16624 * parse.y: Lose processing_template_arg, template_arg1.
16625 (primary): Likewise.
16626 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
16627
16628 Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16629
16630 * error.c (dump_decl): Fix type of default arguments for template
16631 template parameters and nontype template parameters.
16632 * parse.y (template_parm): Handle invalid default template
16633 template arguments here.
16634
16635 * parse.y (template_parm): Use template_arg instead of PTYPENAME
16636 for default template template argument.
16637 * pt.c (coerce_template_parms): Merge default template argument
16638 codes. Can treat RECORD_TYPE as template name if it is implicitly
16639 created. Fix argument index in error message.
16640 * typeck.c (comptypes): Merge template argument comparison codes in
16641 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
16642
16643 Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
16644
16645 * lex.c (file_name_nondirectory): Also check for '/'.
16646
16647 Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
16648
16649 * parse.y (primary): Deal with statement-expressions in
16650 templates.
16651 * pt.c (tsubst_copy): Handle BIND_EXPR.
16652 * tree.c (mapcar): Likewise.
16653
16654 * call.c (add_template_candidate_real): Pass extra parameter to
16655 fn_type_unification.
16656 * cp-tree.h (fn_type_unification): Add parameter.
16657 * pt.c (fn_type_unification): Add additional parameter to deal with
16658 static member functions.
16659 (get_bindings): Deal with static member functions.
16660
16661 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
16662 (revert_static_member_fn): Declare.
16663 * decl.c (revert_static_member_fn): Remove declaration. Change
16664 linkage from internal to external.
16665 (cp_finish_decl): Deal with virtual functions in classes local to
16666 template functions.
16667 * decl2.c (finish_file): Don't forget to emit increment/decrement
16668 expressions in initializers for file-scope variables.
16669 * parse.y (typename_sub2): If the typename doesn't names a
16670 template, rather than a type, issue an error message.
16671 * pt.c (check_explicit_specialization): Handle specializations of
16672 static member functions.
16673 (coerce_template_parms): Handle offset references to lists of
16674 member functions.
16675 * search.c (note_debug_info_needed): Don't crash when handed a
16676 type which is being defined.
16677 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
16678 that can happen with some illegal code.
16679
16680 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16681
16682 * call.c (user_harshness): Initialize `code' to 0.
16683 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
16684 (null_ptr_cst_p): Add parentheses around && within ||.
16685 (standard_conversion): Likewise.
16686 (z_candidate): Likewise.
16687 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
16688 (build_object_call): Likewise for `mem_args'.
16689 (build_new_op): Likewise for `mem_arglist'. Add `return' from
16690 default case in enumeration switch.
16691
16692 * class.c (build_vtable_entry): Add explicit braces to avoid
16693 ambiguous `else'.
16694 (build_class_init_list): Likewise.
16695 (finish_struct_1): Initialize `width' to 0.
16696 (instantiate_type): Initialize `name' to NULL_TREE. Add
16697 explicit braces to avoid ambiguous `else'.
16698
16699 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
16700 `else'.
16701
16702 * decl.c (grok_reference_init): Eliminate unused parameter, all
16703 callers changed.
16704 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
16705 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
16706 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
16707 (grokdeclarator): Add parentheses around && within ||. Add
16708 explicit braces to avoid ambiguous `else'.
16709 (grokparms): Initialize `type' to NULL_TREE.
16710 (xref_tag): Remove unused label `just_return'.
16711 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
16712 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
16713 (hack_incomplete_structures): Add parentheses around assignment
16714 used as truth value.
16715
16716 * decl2.c (coerce_delete_type): Hide definition of `e3'.
16717
16718 * error.c: Include <stdlib.h>.
16719 (dump_expr): Change the type of `i' to size_t. Remove unused
16720 label `error'.
16721
16722 * except.c (init_exception_processing): Remove unused variable `d'.
16723 (expand_throw): Likewise for `label'.
16724
16725 * friend.c (add_friends): Add explicit braces to avoid ambiguous
16726 `else'.
16727
16728 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
16729 (sort_base_init): Likewise for `binfo'.
16730 (expand_member_init): Likewise for `rval'.
16731 (build_member_call): Add parentheses around assignment used as
16732 truth value.
16733 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
16734 (build_new): Initialize `nelts' to NULL_TREE. Initialize
16735 `old_immediate_size_expand' to 0.
16736 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
16737 (build_vec_delete_1): Remove unused variable `block'.
16738 (expand_vec_init): Initialize `itype' to NULL_TREE.
16739
16740 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
16741 declaration of `index' and `rindex' with autoconf macros.
16742 (reinit_parse_for_expr): Remove unused variables
16743 `look_for_semicolon' and `look_for_lbrac'.
16744 (cons_up_default_function): Initialize `args' to NULL_TREE.
16745 (readescape): Initialize `firstdig' to 0.
16746 (real_yylex): Add parentheses around assignment used as truth value.
16747
16748 * method.c: Include <strings.h> if we don't have <string.h>.
16749 Protect declaration of `index' with autoconf macro.
16750
16751 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
16752 Initialize `type' to NULL_TREE.
16753 (structsp): Remove unused variable `id'.
16754
16755 * pt.c (coerce_template_parms): Add explicit braces to avoid
16756 ambiguous `else'.
16757 (lookup_template_class): Initialize `template' to NULL_TREE.
16758 (instantiate_class_template): Remove unused variable `name' and `e'.
16759 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
16760 (do_poplevel): Initialize `saved_warn_unused' to 0.
16761 (type_unification): Remove unused varable `parm'.
16762 (unify): Likewise for `j'.
16763
16764 * repo.c (init_repo): Add parentheses around assignment used as
16765 truth value.
16766 (finish_repo): Remove unused varable `p'.
16767
16768 * search.c (get_binfo): Initialize `type' to NULL_TREE.
16769 (get_base_distance): Likewise.
16770 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
16771 and `new_v' to NULL_TREE.
16772 (lookup_fnfields): Likewise for `rval_binfo_h'.
16773 (breadth_first_search): Add parentheses around assignment used as
16774 truth value.
16775 (get_template_base): Initialize `type' to NULL_TREE.
16776
16777 * sig.c (append_signature_fields): Initialize `last_mfptr' to
16778 NULL_TREE.
16779 (build_signature_table_constructor): Likewise for
16780 `last_rhs_field', `pfn' and `vt_off'.
16781 (build_sigtable): Likewise for `init'.
16782
16783 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
16784 (propagate_binfo_offsets): Likewise for `delta'.
16785 (hash_tree_cons): Initialize hashcode to 0.
16786 (can_free): Likewise for `size'.
16787 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
16788
16789 * typeck.c (convert_sequence): Hide prototype.
16790 (common_type): Add explicit braces to avoid ambiguous `else'.
16791 (comp_target_types): Likewise.
16792 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
16793 (build_function_call_real): Add explicit braces to avoid ambiguous
16794 `else'.
16795 (convert_arguments): Initialize `called_thing' to 0.
16796 (convert_for_initialization): Initialize `savew' and `savee' to 0.
16797
16798 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
16799 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
16800 (build_x_arrow): Likewise for `last_rval'.
16801
16802 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
16803
16804 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
16805
16806 * decl.c (init_decl_processing): Use set_sizetype.
16807 * decl2.c (sizetype): Don't declare.
16808 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
16809 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
16810 (build_component_addr, unary_complex_lvalue): Likewise.
16811 * rtti.c (expand_class_desc): Likewise.
16812 * class.c (get_vfield_offset): Likewise.
16813
16814 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
16815
16816 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
16817 early to avoid bogus error. Handle overloaded function
16818 names provided as template arguments correctly.
16819 (coerce_template_parms): Don't mishandle overloaded functions when
16820 dealing with template template parameters.
16821 (lookup_template_class): Issue an error message, rather than
16822 crashing, when the TYPE_DECL provided is not a template type.
16823
16824 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
16825
16826 * class.c (instantiate_type): Don't just return a known type if
16827 it's wrong.
16828
16829 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
16830
16831 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
16832 since that code could never be reached.
16833
16834 * error.c (dump_decl): Avoid aborting in the midst of printing an
16835 error message about an illegal template declaration.
16836
16837 * parse.y (structsp): Print an error message, rather than crashing,
16838 when a class-head does not name a class.
16839
16840 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
16841 template arguments as a g++ extension.
16842
16843 * cp-tree.def (ALIGNOF_EXPR): New tree code.
16844 * decl2.c (grok_alignof): If processing_template_decl, just store
16845 the expression.
16846 * typeck.c (c_alignof): Likewise.
16847 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
16848 * error.c (dump_expr): Likewise.
16849 * pt.c (tsubst_copy): Likewise.
16850 * tree.c (cp_tree_equal): Likewise.
16851 * pt.c (uses_template_parms): Correctly determine whether or not a
16852 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
16853 folding can be done.
16854
16855 * cp-tree.h (grok_enum_decls): Remove type parameter.
16856 * decl.c (grok_enum_decls): Likewise.
16857 * decl2.c (grok_x_components): Call grok_enum_decls
16858 unconditionally, since it will do nothing if there is no
16859 current_local_enum. Use the new calling sequence.
16860 * pt.c (tsubst_enum): Use the new calling sequence for
16861 grok_enum_decls.
16862
16863 * decl.c (start_function): Make member functions of local classes
16864 in extern inline functions have comdat linkage here...
16865 (grokdeclarator): Rather than here.
16866
16867 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
16868
16869 * pt.c (convert_nontype_argument): Use decl_constant_value.
16870
16871 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
16872
16873 * call.c (add_template_candidate_real): New function.
16874 (add_template_candidate): Use it.
16875 (add_template_conv_candidate): Likewise.
16876 (joust): Pass extra argument to more_specialized.
16877 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
16878 (is_local_class): Remove.
16879 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
16880 * cp-tree.h (is_local_class): Remove.
16881 (perform_array_to_pointer_conversion): Likewise.
16882 (finish_member_template_decl): Add.
16883 (check_explicit_specialization): Return a tree, not an int.
16884 (more_specialized): Take additional argument.
16885 (get_bindings): Likewise.
16886 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
16887 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
16888 (perform_array_to_pointer_conversion): Remove.
16889 * decl.c (saved_scope): Add processing_specialization,
16890 processing_explicit_instantiation fields.
16891 (maybe_push_to_top_level): Save them.
16892 (pop_from_top_level): Restore them.
16893 (grokfndecl): Use new return value from
16894 check_explicit_specialization.
16895 (start_decl): Don't check flag_guiding_decls before pushing
16896 decls.
16897 (cp_finish_decl): Remove previous (bogus) change.
16898 (grok_declarator): Use decl_function_context rather than
16899 is_local_class.
16900 * decl2.c (finish_file): Pass extra argument to get_bindings.
16901 (build_expr_from_tree): Let build_x_component_ref check
16902 validity of arguments rather than doing it here.
16903 * lex.c (cons_up_default_function): Remove code fooling with
16904 processing_specialization, processing_explicit_instantiation
16905 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
16906 * method.c (build_overload_identifier): Mangle local classes in
16907 template functions correctly.
16908 * parse.y (finish_member_template_decl): Move to pt.c.
16909 * pt.c (finish_member_template_decl): Moved here from parse.y.
16910 (print_candidates): New function.
16911 (determine_specialization): Change interface. Properly look for
16912 most specialized versions of template candidates.
16913 (check_explicit_specialization): Fully process explicit
16914 instantiations.
16915 (push_template_decl): Avoid looking at CLASSTYPE fields in
16916 FUNCTION_DECLS.
16917 (determine_overloaded_function): Remove.
16918 (convert_nontype_argument): Change name from
16919 convert_nontype_parameter. Use determine_overloaded_function
16920 instead of instantiate_type.
16921 (mangle_class_name_for_template): Handle type contexts as well as
16922 function contexts.
16923 (classtype_mangled_name): Likewise.
16924 (lookup_template_class): Likewise.
16925 (tsubst): Likewise.
16926 (more_specialized): Take explict template arguments as a
16927 parameter.
16928 (most_specialized): Likewise.
16929 (get_bindings): Likewise. Check that return types match before
16930 proclaiming a function a match.
16931 (do_decl_instantiation): Remove code searching for function to
16932 instantiate; that is now done in check_explicit_specialization.
16933 (add_maybe_template): Pass extra argument to get_bindings.
16934 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
16935 implementation.
16936 * typeck.c (build_component_ref): Check for invalid arguments.
16937
16938 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
16939
16940 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
16941 return_target and call_target are equivalent.
16942
16943 * pt.c (type_unification_real): Just accept function parms that
16944 don't use any template parms.
16945
16946 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
16947
16948 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
16949 unset DECL_NOT_REALLY_EXTERN.
16950
16951 * parse.y (typename_sub*): Fix std::.
16952
16953 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
16954
16955 * error.c (dump_decl): Fix type default template args.
16956 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
16957
16958 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
16959
16960 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
16961 (file_name_nondirectory): Use.
16962
16963 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16964
16965 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
16966 that are not really present. Substitute default arguments in
16967 template template arguments. Correctly convert TEMPLATE_DECL to
16968 TEMPLATE_TEMPLATE_PARM.
16969 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
16970 are no longer treated specially here.
16971 * parse.y (template_template_parm): Fix copy error.
16972 * decl.c (grokdeclarator): Warn about missing `typename' for nested
16973 type created from template template parameters.
16974 * parse.y (bad_parm): Likewise
16975
16976 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
16977 (push_nested_class): Likewise.
16978 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
16979 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
16980 (copy_template_template_parm): Declare.
16981 * decl.c (arg_looking_for_template): New variable.
16982 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
16983 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
16984 node if arg_looking_for_template is nonzero.
16985 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
16986 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
16987 (grokdeclarator): Handle TEMPLATE_DECL.
16988 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
16989 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
16990 (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
16991 (dump_decl): Handle unnamed template type parameters.
16992 Handle template template parameters.
16993 (dump_function_name): Handle template template parameters.
16994 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
16995 Handle TEMPLATE_TEMPLATE_PARM.
16996 * method.c (build_template_template_parm_names): New function.
16997 (build_template_parm_names): Handle TEMPLATE_DECL.
16998 (build_overload_nested_name, build_overload_name):
16999 Handle TEMPLATE_TEMPLATE_PARM.
17000 * parse.y (maybe_identifier): New nonterminal.
17001 (template_type_parm): Use it.
17002 (template_template_parm, template_arg1): New nonterminal.
17003 (template_parm): Add template_template_parm rules.
17004 (template_arg): Set processing_template_arg.
17005 (template_arg1): Rules moved from template_arg.
17006 (primary, nonnested_type): Set arg_looking_for_template if we are
17007 processing template arguments.
17008 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
17009 (process_template_parm): Handle template template parameters.
17010 (coerce_template_parms, comp_template_args): Likewise.
17011 (mangle_class_name_for_template, lookup_template_class): Likewise.
17012 (uses_template_parms): Handle TEMPLATE_DECL and
17013 TEMPLATE_TEMPLATE_PARM.
17014 (current_template_args): Handle TEMPLATE_DECL.
17015 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
17016 * search.c (dfs_walk, dfs_record_inheritance):
17017 Handle TEMPLATE_TEMPLATE_PARM.
17018 * tree.c (copy_template_template_parm): New function.
17019 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
17020 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
17021
17022 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
17023
17024 * decl.c (start_decl): Don't allow duplicate definitions of static
17025 data members.
17026
17027 * call.c (build_user_type_conversion_1): Handle user-defined
17028 template conversion operators correctly.
17029
17030 * decl2.c (build_expr_from_tree): Issue an error message if the
17031 object in a COMPONENT_REF is a TEMPLATE_DECL.
17032
17033 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
17034
17035 * class.c (is_local_class): New function.
17036 * cp-tree.h (is_local_class): Declare it.
17037 (last_tree): Likewise.
17038 (begin_tree): Likewise.
17039 (end_tree): Likewise.
17040 (lookup_template_class): Change prototype.
17041 * decl.c (cp_finish_decl): Check for NULL where necessary.
17042 Consider FUNCTION_DECLS to declare objects with top-level binding,
17043 when calling make_decl_rtl.
17044 (grokdeclarator): Give members of local classes internal linkage.
17045 (start_function): Remove declaration of last_tree.
17046 (finish_function): Set flag_keep_inline_functions around call to
17047 rest_of_compilation if we are processing a member function in a
17048 local class.
17049 (start_method): Call push_template_decl for member functions of
17050 local classes in template functions.
17051 * decl2.c (import_export_decl): Don't give external linkage to
17052 instantiations of templates with internal linkage.
17053 * parse.y (last_tree): Remove declaration.
17054 (template_type): Pass extra parameter to lookup_template_class.
17055 (self_template_type): Likewise.
17056 (structsp): Move call to reset_specialization into left_curly.
17057 (left_curly): Call reset_specialization, and begin_tree.
17058 * pt.c (saved_trees): New variable.
17059 (mangle_class_name_for_template): Change prototype. Use
17060 additional function context to name local classes in templates
17061 correctly.
17062 (classtype_mangled_name): Pass the context.
17063 (push_template_decl): Handle local classes and templates, and
17064 member functions for such classes.
17065 (convert_nontype_parameter): Fix handling of pointer-to-member
17066 constants.
17067 (lookup_template_class): Handle local classes in templates.
17068 (tsubst): Likewise. Don't assume that template instantiations
17069 have external linkage; pay attention to the template declaration.
17070 (mark_decl_instantiated): Likewise.
17071 (begin_tree): New function.
17072 (end_tree): Likewise.
17073
17074 * decl.c (xref_basetypes): Don't call complete_type for basetypes
17075 that involve template parameters; that can lead to infinite
17076 recursion unnecessarily.
17077
17078 * pt.c (register_specialization): Do not register specializations
17079 that aren't ready to be registered yet.
17080 (check_explicit_specialization): Handle explicit specialization of
17081 constructors and destructors.
17082 (build_template_decl): New function.
17083 (push_template_delc): Handle out-of-class specializations of
17084 member templates.
17085
17086 * pt.c (check_explicit_specialization): Set up the template
17087 information before registering the specialization.
17088 (coerce_template_parms): Fix thinko.
17089 (tsubst): Handle specializations of member templates correctly.
17090
17091 * class.c (finish_struct_methods): Remove calls to
17092 check_explicit_specialization from here.
17093 (finish_struct): And insert them here.
17094 * cp-tree.h (perform_qualification_conversions): New function.
17095 (perform_array_to_pointer_conversion): Likewise.
17096 (begin_explicit_instantiation): Likewise.
17097 (end_explicit_instantiation): Likewise.
17098 (determine_specialization): Renamed from
17099 determine_explicit_specialization.
17100 (comp_template_parms): New function.
17101 (processing_explicit_instantiation): New variable.
17102 * cvt.c (perform_qualification_conversions): New function.
17103 (perform_array_to_pointer_conversion): Likewise.
17104 * decl.c (duplicate_decls): Don't consider template functions
17105 alike unless they have the same parameters. Refine handling of
17106 instantiation/specialization mismatches.
17107 (start_decl): Don't call pushdecl for template specializations,
17108 since they don't affect overloading.
17109 (start_function): Likewise.
17110 (grokfndecl): Call check_explicit_specialization a little later.
17111 Don't call duplicate_decls for memberm template specializations.
17112 (grokdeclarator): Don't update template_count for classes that are
17113 themselves specializations. Remove use of `2' as parameter to
17114 grokfndecl since that value isn't used.
17115 * lex.c (cons_up_default_function): Save and restore
17116 processing_explicit_instantiation around calls to grokfield.
17117 * parse.y (finish_member_template_decl): New function.
17118 (component_decl_1): Use it.
17119 (fn.def2): Likewise.
17120 (template_arg_list_opt): New nonterminal.
17121 (template_type): Use it.
17122 (self_template_type): Likewise.
17123 (template_id): Likewise.
17124 (object_template_id): Likewise.
17125 (notype_template_declarator): Likwise.
17126 (begin_explicit_instantiation): Likewise.
17127 (end_explicit_instantiation): Likewise.
17128 (explicit_instantiation): Use them.
17129 * pt.c (coerce_template_parms): Add parameters.
17130 (processing_explicit_instantiation): New variable.
17131 (convert_nontype_parameter): New function.
17132 (determine_overloaded_function): Likewise.
17133 (begin_explicit_instantiation): Likewise.
17134 (end_explicit_instantiation): Likewise.
17135 (retrieve_specialization): Likewise.
17136 (register_specialization): Likewise.
17137 (processing_explicit_specialization): Removed.
17138 (determine_specialization): Handle specializations of member
17139 functions of template class instantiations.
17140 (check_explicit_specialization): Refine to conform to standard.
17141 (comp_template_parms): New function.
17142 (coerce_template_parms): Call convert_nontype_parameter.
17143 (tsubst): Refine handling of member templates. Use
17144 register_specialization.
17145 (instantiate_template): Use retrieve_specialization.
17146 (do_decl_instantiation): Likewise.
17147 (instantiate_decl): Likewise.
17148 (type_unification): Improve handling of explict template
17149 arguments.
17150 * tree.c (mapcar): Return error_mark_node, rather than aborting,
17151 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
17152 * typeck.c (build_unary_op): Call determine_specialization, rather
17153 than determine_explicit_specialization.
17154
17155 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
17156
17157 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
17158
17159 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
17160
17161 * error.c (dump_decl): For enum tags, output the tag, not its value.
17162
17163 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
17164
17165 * decl.c (init_decl_processing): Only call init_rtti_processing
17166 FLAG_RTTI is set.
17167
17168 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
17169
17170 * init.c (build_new_1): Split out from build_new.
17171 (build_new): Just return a NEW_EXPR.
17172 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
17173
17174 * decl2.c (get_temp_regvar): Tweak.
17175
17176 * cp-tree.h (TREE_CALLS_NEW): Comment out.
17177 * class.c (resolves_to_fixed_type_p): Remove use.
17178 * method.c (build_opfncall): Likewise.
17179 * call.c (build_new_op): Likewise.
17180
17181 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
17182
17183 * exception.cc (__eh_alloc, __eh_free): New fns.
17184 (__cp_push_exception, __cp_pop_exception): Use them.
17185 (__uncatch_exception): Call terminate here if no exception.
17186 * except.c (build_terminate_handler): New fn.
17187 (expand_start_catch_block): Use it.
17188 (expand_exception_blocks): Likewise.
17189 (alloc_eh_object): New fn.
17190 (expand_throw): Use it. Protect exception init with terminate.
17191 * typeck.c (build_modify_expr): Remove code that ignores trivial
17192 methods.
17193
17194 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17195
17196 * call.c (add_builtin_candidate): Add default case in enumeration
17197 switch.
17198 (build_new_op): Likewise.
17199 (convert_like): Likewise.
17200 * cvt.c (build_expr_type_conversion): Likewise.
17201 * tree.c (real_lvalue_p): Likewise.
17202 (lvalue_p): Likewise.
17203 (cp_tree_equal): Likewise.
17204 * typeck.c (comptypes): Likewise.
17205 (build_component_ref): Likewise.
17206 (build_function_call_real): Likewise.
17207 (build_binary_op_nodefault): Likewise.
17208 (build_unary_op): Likewise.
17209 (build_modify_expr): Likewise.
17210 * typeck2.c (initializer_constant_valid_p): Likewise.
17211
17212 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
17213
17214 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
17215
17216 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
17217
17218 * pt.c (coerce_template_parms): Make sure to digest_init if
17219 possible.
17220
17221 * decl.c (duplicate_decls): Make the newdecl virtual if the
17222 olddecl was, just as is done with other attributes of olddecl.
17223
17224 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
17225
17226 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
17227 address of an OFFSET_REF.
17228
17229 * cp-tree.def: Add AGGR_INIT_EXPR.
17230 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
17231 AGGR_INIT_EXPR where appropriate.
17232 * expr.c (cplus_expand_expr): Likewise. Simplify.
17233
17234 * decl2.c (finish_file): Remove call to register_exception_table.
17235
17236 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
17237
17238 * pt.c (instantiate_class_template): Don't do injection when
17239 processing_template_decl is true, as pollutes current_binding_level
17240 for base classes.
17241
17242 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
17243
17244 * pt.c (maybe_fold_nontype_arg): Add prototype.
17245
17246 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
17247
17248 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
17249 * error.c (dump_expr): Likewise.
17250
17251 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
17252
17253 * typeck.c (build_function_call_real): Remove "inline called before
17254 definition" pedwarn.
17255
17256 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
17257
17258 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
17259
17260 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
17261
17262 * pt.c (type_unification_real): Change __null to type void* with
17263 a warning.
17264
17265 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
17266
17267 * call.c (implicit_conversion): Don't call
17268 build_user_type_conversion_1 with a NULL expr, since it will
17269 crash.
17270
17271 * pt.c (unify): Don't try to unify array bounds if either array is
17272 unbounded.
17273
17274 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
17275
17276 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
17277 Replace extern decls with casts.
17278
17279 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
17280 Update last_parm_cleanup_insn.
17281 (store_after_parms): Remove.
17282 * cp-tree.h: Adjust.
17283
17284 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
17285
17286 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
17287 (finish_file): Check DECL_COMDAT instead of weak|one_only.
17288 (import_export_vtable): Use make_decl_one_only instead of
17289 comdat_linkage for win32 tweak.
17290 (import_export_decl): Likewise.
17291 * pt.c (mark_decl_instantiated): Likewise.
17292
17293 * decl2.c (finish_file): Lose handling of templates in pending_statics.
17294
17295 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
17296
17297 * decl2.c (finish_file): Lose call to expand_builtin_throw.
17298 * except.c (expand_builtin_throw): Remove.
17299 * cp-tree.h: Remove ptr_ptr_type_node.
17300 * decl.c: Likewise.
17301
17302 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
17303
17304 * decl.c (ptr_ptr_type_node): Define.
17305 (init_decl_processing): Initialize it.
17306 * cp-tree.h: Declare it.
17307 * exception.cc (__cp_exception_info): Use __get_eh_info.
17308 (__cp_push_exception): Likewise.
17309 (__cp_pop_exception): Likewise.
17310
17311 From Scott Snyder <snyder@d0sgif.fnal.gov>:
17312 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
17313 saved_pc.
17314 (init_exception_processing): Removed saved_pc initialization.
17315
17316 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
17317
17318 * pt.c (instantiate_decl): Defer all templates but inline functions.
17319
17320 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
17321
17322 * init.c (expand_vec_init): Don't fold a list of parameters.
17323
17324 * decl.c (copy_args_p): Handle copy elision for types with virtual
17325 bases.
17326 * call.c (build_over_call): Likewise.
17327
17328 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
17329
17330 * pt.c (lookup_template_function): Copy the template arguments,
17331 not just the list containing them, to the permanent obstack.
17332
17333 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
17334
17335 * except.c (expand_start_catch_block): suspend_momentary for the
17336 terminate handler.
17337
17338 * error.c (dump_decl): Handle LOOKUP_EXPR.
17339
17340 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
17341
17342 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
17343 permanent obstack if we are processing a template decl.
17344 * typeck.c (build_static_cast): Likewise.
17345 (build_const_cast): Likewise.
17346 (build_reinterpret_cast): Likewise.
17347
17348 * pt.c (coerce_template_parms): Coerce some expressions, even
17349 when processing_template_decl.
17350
17351 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
17352
17353 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
17354 handling of pointer difference expressions.
17355
17356 * typeck.c (comp_target_types): Comparison of function/method types
17357 is independent of nptrs.
17358
17359 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
17360
17361 * pt.c (tsubst): Avoid creating pointer to reference and
17362 reference to reference types.
17363
17364 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
17365
17366 * parse.y (do_id): New nonterminal.
17367 (template_id): Use it.
17368
17369 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
17370
17371 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
17372 * spew.c (yylex): Don't do_identifier here.
17373 * decl2.c (build_expr_from_tree): Revert last change.
17374
17375 * decl2.c (build_expr_from_tree): Expand the name for a method call.
17376 * parse.y (object_template_id): Don't try to take the DECL_NAME.
17377
17378 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
17379
17380 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
17381 alloc_expr.
17382 * call.c (build_op_delete_call): Adjust.
17383
17384 * except.c (expand_end_catch_block): Lose rethrow region.
17385 (expand_start_catch_block): Likewise.
17386 (expand_end_catch_block): Don't expand_leftover_cleanups.
17387
17388 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
17389
17390 * pt.c (tsubst): Remove tree_cons call (places redundant info into
17391 DECL_TEMPLATE_INSTANTIATION).
17392
17393 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
17394
17395 * tree.c (is_overloaded_fn): Handle getting a fn template.
17396 (really_overloaded_fn): Likewise.
17397 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
17398 * pt.c (check_explicit_specialization): Tweak.
17399 (determine_explicit_specialization): Tweak.
17400
17401 * tree.c, cp-tree.h (get_target_expr): New fn.
17402
17403 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
17404
17405 * pt.c (check_explicit_specialization): Fix misspelling in
17406 diagnostic: `preceeded'.
17407 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
17408 `conversiona'.
17409
17410 1997-12-02 Mark Mitchell <mmitchell@usa.net>
17411
17412 * pt.c (determine_explicit_specialization): Avoid an internal
17413 error for bad specializations.
17414
17415 * method.c (build_overload_value): Handle SCOPE_REF.
17416
17417 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
17418
17419 * class.c (prepare_fresh_vtable): Enable even more complex MI
17420 vtable names.
17421
17422 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
17423
17424 * exception.cc (__check_eh_spec): Optimize a bit.
17425
17426 * exception.cc (__cp_pop_exception): Lose handler arg.
17427 * except.c (do_pop_exception): Likewise.
17428 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
17429 (expand_end_catch_block): Likewise.
17430
17431 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
17432
17433 * pt.c (check_explicit_specialization): Complain about using a
17434 template-id for a non-specialization.
17435
17436 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
17437
17438 * repo.c: Prototype rindex only if needed.
17439 * xref.c: Likewise.
17440
17441 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
17442
17443 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
17444
17445 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
17446
17447 * typeck.c (build_const_cast): Handle references here instead of
17448 handing off to convert_to_reference.
17449
17450 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
17451 TerminateFunctionCall.
17452 (init_exception_processing): Likewise. Terminate et al are now
17453 the fns, not ADDR_EXPRs.
17454 (various): Lose redundant assemble_external calls.
17455 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
17456
17457 * cp-tree.h (struct lang_decl_flags): Add comdat.
17458 (DECL_COMDAT): New macro.
17459 * decl.c (duplicate_decls): Propagate it.
17460 (cp_finish_decl): Handle it.
17461 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
17462
17463 * class.c: Remove static pending_hard_virtuals.
17464 (add_virtual_function): Take pointers to pending_virtuals
17465 and pending_hard_virtuals.
17466 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
17467
17468 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
17469
17470 * decl2.c (import_export_vtable): If we support one_only but not
17471 weak symbols, mark instantiated template vtables one_only.
17472 (import_export_decl): Likewise for tinfo functions.
17473 (finish_vtable_vardecl): Also write out vtables from explicitly
17474 instantiated template classes.
17475 * pt.c (mark_class_instantiated): Revert last change.
17476
17477 * except.c (expand_throw): Call mark_used on the destructor.
17478
17479 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
17480
17481 * lex.c (lang_init): Enable flag_exceptions by default if no
17482 command line switch was specified.
17483
17484 1997-11-26 Mark Mitchell <mmitchell@usa.net>
17485
17486 * pt.c (unify): Handle `void' template parameters in
17487 specializations.
17488
17489 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
17490
17491 * rtti.c (build_dynamic_cast): Handle template case here.
17492 (build_dynamic_cast_1): Not here.
17493
17494 * typeck2.c (digest_init): Make copies where appropriate.
17495
17496 * decl2.c (delete_sanity): resolve_offset_ref.
17497
17498 * except.c: Call terminate without caching so many bits.
17499
17500 * except.c (expand_start_catch_block): Fix catching a reference
17501 to pointer.
17502
17503 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
17504
17505 * init.c (build_new): Copy size to the saveable obstack.
17506
17507 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
17508 TRY_CATCH_EXPR for now.
17509
17510 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
17511
17512 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
17513 has DECL_LANG_SPECIFIC.
17514
17515 * exception.cc (struct cp_eh_info): Add handlers field.
17516 (__cp_push_exception): Initialize it.
17517 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
17518 (__throw_bad_exception): Remove.
17519 * except.c (call_eh_info): Add handlers field.
17520 (get_eh_handlers): New fn.
17521 (push_eh_cleanup): Increment handlers.
17522
17523 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
17524
17525 * except.c (expand_start_eh_spec): Use the try/catch code.
17526 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
17527 doing everything inline.
17528 (init_exception_processing): throw_type_match now takes
17529 const void pointers.
17530 * exception.cc (__check_eh_spec): New fn.
17531 * inc/exception: Neither terminate nor unexpected return.
17532 * decl.c: Make const_ptr_type_node public.
17533 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
17534
17535 * except.c (expand_start_catch_block): We only need the rethrow
17536 region for non-sjlj exceptions.
17537 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
17538
17539 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
17540
17541 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
17542 (various.o): Likewise.
17543 * inc/new: Add placement deletes. Add throw specs for default new.
17544 * new.cc (set_new_handler): Move here from libgcc2.
17545 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
17546 (new): Move from libgcc2. Throw bad_alloc.
17547 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
17548 * decl.c (init_decl_processing): Update exception specs on new and
17549 delete.
17550
17551 * method.c (build_decl_overload_real): Don't mess with global
17552 placement delete.
17553
17554 * init.c (build_new): Check for null throw spec, not nothrow_t.
17555
17556 * decl.c (duplicate_decls): Don't complain about different exceptions
17557 from an internal declaration.
17558
17559 * call.c (build_op_delete_call): Fix check for member fns again.
17560
17561 * decl2.c (import_export_decl): Interface hackery affects
17562 virtual synthesized methods.
17563
17564 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
17565
17566 * decl.c (start_decl): Don't just complain about a mismatched
17567 scope, fix it.
17568
17569 * decl.c (make_implicit_typename): Handle case where t is not
17570 actually from context.
17571 * tree.c (get_type_decl): Lose identifier case.
17572 * spew.c (yylex): Lose useless call to identifier_typedecl_value.
17573 * parse.y (nonnested_type): Just use lookup_name.
17574 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
17575
17576 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
17577
17578 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
17579 T was built in C language context (for example, by
17580 output_func_start_profiler).
17581
17582 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
17583
17584 * decl.c (make_implicit_typename): New fn.
17585 (lookup_name_real): Use it. Use current_class_type as the context.
17586
17587 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
17588
17589 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
17590
17591 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
17592
17593 * friend.c (do_friend): Warn about non-template friends in templates.
17594
17595 * call.c (build_op_delete_call): Fix handling of inherited delete.
17596
17597 * search.c (dfs_record_inheritance): Ignore template type parms.
17598
17599 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
17600
17601 * call.c (build_new_op): Fix copy error.
17602 (build_op_new_call): New fn.
17603 (build_op_delete_call): New fn.
17604 * cp-tree.h: Declare them.
17605 * init.c (build_new): Use them. Support placement delete.
17606 (build_x_delete): Use build_op_delete_call.
17607 (build_delete): Likewise.
17608 * decl2.c (delete_sanity): Likewise.
17609 (coerce_delete_type): Don't complain about placement delete.
17610
17611 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
17612
17613 * call.c (build_new_function_call): Remove unused 'obj' parm.
17614 * cp-tree.h, typeck.c: Adjust.
17615
17616 * init.c (build_new): Make the cleanup last longer.
17617 (expand_vec_init): Call do_pending_stack_adjust.
17618
17619 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
17620
17621 * pt.c (do_type_instantiation): Fix typo.
17622 (mark_class_instantiated): If we support one_only but not weak
17623 symbols, don't mark this as known.
17624
17625 * init.c (build_new): Handle vec delete in EH cleanup.
17626
17627 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
17628
17629 * call.c (build_method_call): Call complete_type before checking
17630 for destructor.
17631
17632 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
17633
17634 * decl.c (add_block_current_level): Delete.
17635 * init.c (build_vec_delete_1): Delete build_block and
17636 add_block_current_level calls.
17637
17638 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
17639
17640 * init.c (build_new): Handle freeing allocated memory when the
17641 constructor throws.
17642
17643 * call.c (build_new_method_call): Fix flags arg.
17644
17645 * pt.c (do_type_instantiation): Don't try to instantiate
17646 member templates.
17647 (mark_decl_instantiated): If we support one_only but not
17648 weak symbols, mark this one_only.
17649 * decl2.c (import_export_vtable): Don't defer handling of vtables
17650 if MULTIPLE_SYMBOL_SPACES.
17651
17652 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
17653
17654 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
17655
17656 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
17657
17658 * except.c (do_pop_exception): Return a value.
17659
17660 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
17661
17662 * call.c (build_new_method_call): Handle getting a
17663 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
17664 if we got template parms.
17665 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
17666 not just the args.
17667 * decl2.c (build_expr_from_tree): Tweak last change.
17668 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
17669 (maybe_fold_nontype_arg): Split out from tsubst_copy.
17670 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
17671
17672 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
17673
17674 * pt.c (tsubst_copy): Handle explicit template arguments in
17675 function calls.
17676 * typeck.c (build_x_function_call): Likewise.
17677 * decl2.c (build_expr_from_tree): Lookup function name if it
17678 hasn't been done.
17679
17680 * pt.c (tsubst): Instantiate template functions properly when
17681 template parameter does not appear in function arguments and return
17682 type.
17683 (comp_template_args): Handle member templates required by tsubst.
17684
17685 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
17686
17687 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
17688 previous change.
17689
17690 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
17691
17692 * pt.c (coerce_template_parms): Tweak error message.
17693
17694 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
17695 return type defaults to `int', even if there are storage-class
17696 specifiers.
17697
17698 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
17699
17700 Complete nested exception support.
17701 * except.c (do_pop_exception): Split out...
17702 (push_eh_cleanup): From here. Handle the EH region by hand.
17703 (expand_start_catch_block): Add a new level for the catch parm.
17704 Move the rethrow region outside the two cleanup regions.
17705 Protect the initializer for the catch parm with terminate.
17706 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
17707 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
17708 popping off the middle of the stack.
17709 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
17710 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
17711 (build_cplus_new): Only wrap CALL_EXPRs.
17712 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
17713 the constructor call.
17714
17715 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17716
17717 * Make-lang.in (c++.distdir): Make inc subdirectory.
17718
17719 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
17720
17721 * decl2.c (finish_file): Put back some code.
17722
17723 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
17724
17725 * decl2.c (finish_file): Remove redundant code.
17726 * method.c (emit_thunk): Don't let the backend defer generic thunks.
17727
17728 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
17729
17730 * except.c (call_eh_info): Split out...
17731 (push_eh_info): From here.
17732 (expand_builtin_throw): Use it.
17733 (expand_start_catch_block): Move region start back.
17734
17735 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
17736
17737 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
17738 (real_yylex): Record wide strings using target endianness, not host.
17739
17740 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
17741
17742 * repo.c (rindex): Add decl unconditionally.
17743 (get_base_filename, open_repo_file): Don't cast rindex.
17744 * xref.c (rindex): Add decl unconditionally.
17745 (index): Remove unused decl.
17746 (open_xref_file): Don't cast rindex.
17747
17748 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
17749
17750 * class.c (build_vbase_path): Propagate the result type properly.
17751
17752 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
17753
17754 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
17755 remaining use of saved_throw_type with a call to get_eh_type.
17756
17757 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
17758
17759 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
17760 (file_name_nondirectory): New function, doing the same as the macro.
17761 (set_typedecl_interface_info): Use it instead of the macro.
17762 (check_newline): Likewise.
17763 (handle_cp_pragma): Likewise.
17764
17765 * repo.c (get_base_filename): Cast result of rindex to char*.
17766 (open_repo_file): Likewise.
17767 * xref.c (open_xref_file): Likewise.
17768 * error.c (dump_char): Make its arg int, not char.
17769
17770 * except.c (push_eh_info): Pass the number of fields - 1 down, not
17771 the exact number of fields.
17772
17773 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
17774
17775 Support for nested exceptions.
17776 * tinfo2.cc (__is_pointer): New fn.
17777 * exception.cc (struct cp_eh_info): Define.
17778 (__cp_exception_info, __uncatch_exception): New fns.
17779 (__cp_push_exception, __cp_pop_exception): New fns.
17780 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
17781 Lose empty_fndecl.
17782 (init_exception_processing): Likewise. __eh_pc is now external.
17783 (push_eh_info): New fn.
17784 (get_eh_{info,value,type,caught}): New fns.
17785 (push_eh_cleanup): Just call __cp_pop_exception.
17786 (expand_start_catch_block): Use push_eh_info. Start the eh region
17787 sooner.
17788 (expand_end_eh_spec): Use push_eh_info.
17789 (expand_throw): Call __cp_push_exception to set up the exception info.
17790 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
17791 when we rethrow.
17792 (expand_builtin_throw): Don't refer to empty_fndecl.
17793
17794 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
17795
17796 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
17797
17798 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
17799
17800 * method.c (build_template_parm_names, build_decl_overload_real):
17801 Add static to definitions.
17802 * pt.c (add_to_template_args, note_template_header,
17803 processing_explicit_specialization, type_unification_real): Likewise.
17804 ({determine,check}_explicit_specialization): Use a single string for
17805 error messages.
17806
17807 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
17808
17809 * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
17810 (expand_end_catch_block): Likewise.
17811 (expand_end_eh_spec): Likewise.
17812
17813 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
17814
17815 * decl.c (duplicate_decls): Handle template specializations
17816 correctly.
17817 * error.c (dump_function_name): Fix printing of specializations of
17818 member functions that are not member templates.
17819 * cp-tree.h (processing_specialization): Make global.
17820 * pt.c (processing_specialization): Likewise.
17821 * lex.c (cons_up_default_function): Save and restore
17822 processing_specialization to avoid confusion.
17823
17824 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
17825
17826 * decl.c (init_decl_processing): Give null_node unknown* type.
17827 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
17828 (common_type): Likewise.
17829 * error.c (args_as_string): Recognize null_node.
17830
17831 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17832
17833 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
17834 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
17835
17836 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
17837
17838 * Make-lang.in (g++): Include prefix.o.
17839
17840 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
17841
17842 * pt.c (determine_explicit_specialization): Initialize "dummy"
17843 to keep Purify quiet.
17844
17845 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
17846
17847 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
17848 (build_overload_int): Not here.
17849
17850 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
17851
17852 * class.c (build_type_pathname): Remove.
17853 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
17854
17855 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
17856
17857 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
17858 &&label GNU extension.
17859
17860 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
17861
17862 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
17863 so as to avoid incorrect manglings.
17864 * method.c (build_decl_overload_real): Don't mangle return types
17865 for constructors.
17866
17867 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
17868
17869 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
17870 scratch_tree_cons): Define as macros for now.
17871 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
17872 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
17873 typeck2.c: Use them and the expression_obstack variants.
17874
17875 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
17876
17877 * decl.c (store_return_init): Allow classes with explicit ctors to
17878 be used with the named return values extension.
17879
17880 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
17881
17882 * pt.c (instantiate_decl): Fix previous change.
17883
17884 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
17885
17886 * pt.c (tsubst): Fix thinko.
17887 (instantiate_decl): Really use the original template.
17888
17889 * call.c (build_new_method_call): Use simple constructor_name for
17890 error messages.
17891
17892 Wed Oct 8 22:44:42 1997 Jeffrey A Law <law@cygnus.com>
17893
17894 * method.c (build_underscore_int): Don't use ANSI specific
17895 features.
17896
17897 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
17898
17899 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
17900 for our key method; it might have been inlined by -O3.
17901
17902 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
17903
17904 * decl.c (make_typename_type): Do not try to call lookup_field for
17905 non-aggregate types.
17906
17907 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
17908
17909 * typeck.c (build_reinterpret_cast): Tweak.
17910
17911 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
17912
17913 * typeck.c (build_reinterpret_cast): Converting a void pointer
17914 to function pointer with a reinterpret_cast produces a warning
17915 if -pedantic is issued.
17916
17917 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
17918
17919 * typeck.c (c_expand_return): Don't warn about returning a
17920 reference-type variable as a reference.
17921
17922 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
17923
17924 * method.c (build_static_name): Fix typo.
17925
17926 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
17927
17928 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
17929 OLDDECL before we try to do DECL_USE_TEMPLATE.
17930
17931 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
17932
17933 * decl.c (duplicate_decls): Don't warn about template instances.
17934
17935 * typeck.c (mark_addressable): Lose ancient code that unsets
17936 DECL_EXTERNAL.
17937
17938 * pt.c (do_decl_instantiation): Lose support for instantiating
17939 non-templates.
17940
17941 * call.c (build_new_function_call): Fix handling of null explicit
17942 template args.
17943 (build_new_method_call): Likewise.
17944
17945 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
17946
17947 * method.c (build_underscore_int): Fix typo.
17948
17949 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
17950
17951 * tree.c (print_lang_statistics): #if 0 call to
17952 print_inline_obstack_statistics until its definition is checked in.
17953
17954 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
17955
17956 * decl2.c (finish_file): Move dump_tree_statistics to end.
17957
17958 * pt.c (instantiate_decl): Look for the original template.
17959 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
17960 of member templates.
17961
17962 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
17963
17964 * Makefile.in (g++FAQ.*): New rules.
17965 (CONFLICTS): Update.
17966 * g++FAQ.texi: Moved from libg++.
17967
17968 * parse.y (PFUNCNAME): Only specify the type once.
17969
17970 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
17971
17972 * lex.c (real_yylex): Clean up the code to fully behave the way
17973 the c-lex.c parser does for complex and real numbers.
17974
17975 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
17976
17977 * method.c (build_decl_overload_real): Reformat.
17978
17979 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
17980
17981 * method.c (synthesize_method): If at_eof, determine our linkage.
17982
17983 1997-09-29 Paul Eggert <eggert@twinsun.com>
17984
17985 * lex.c (real_yylex): Treat `$' just like `_', except issue a
17986 diagnostic if !dollars_in_ident or if pedantic.
17987
17988 * lang-specs.h (@c++): -ansi no longer implies -$.
17989
17990 * decl2.c (lang_decode_option):
17991 -traditional and -ansi now do not mess with
17992 dollars_in_ident.
17993
17994 Mon Sep 29 19:57:51 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
17995
17996 * Makefile.in (parse.o, decl.o): Also depend on
17997 $(srcdir)/../except.h $(srcdir)/../output.h.
17998 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
17999 $(srcdir)/../except.h $(srcdir)/../output.h.
18000 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
18001 ../insn-codes.h.
18002
18003 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
18004
18005 * expr.c (cplus_expand_expr): Make it static.
18006
18007 * decl2.c, init.c, typeck.c: Include "expr.h".
18008 (expand_expr): Use proper values when calling the function.
18009
18010 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
18011
18012 * lang-options.h: New -Wold-style-cast flag.
18013 * cp-tree.h (warn_old_style_cast): New variable.
18014 * decl2.c (warn_old_style_cast): Likewise.
18015 (lang_decode_option): Support -Wold-style-cast.
18016 (reparse_absdcl_as_casts): Produce old-style-cast warning.
18017
18018 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
18019
18020 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
18021 TREE_USED, reset value based on already_used.
18022
18023 * init.c (expand_member_init): Revert change.
18024
18025 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
18026
18027 * cp-tree.h, decl.c, decl2.c, pt.c:
18028 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
18029
18030 * decl2.c (lang_decode_option): Add missing ;.
18031
18032 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
18033
18034 * friend.c (do_friend): Disable injection for all template-derived
18035 decls.
18036 * decl2.c (lang_decode_option): Handle -fguiding-decls.
18037 * parse.y (notype_template_declarator): New nonterminal.
18038 (direct_notype_declarator): Use it.
18039 (complex_direct_notype_declarator): Likewise.
18040 (object_template_id): Accept any kind of identifier after TEMPLATE.
18041 (notype_qualified_id): Don't add template declarators here.
18042
18043 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
18044
18045 * call.c (add_template_candidate): Add explicit_targs parameter.
18046 (build_scoped_method_call): Use it.
18047 (build_overload_call_real): Likewise.
18048 (build_user_type_conversion_1): Likewise.
18049 (build_new_function_call): Likewise.
18050 (build_object_call): Likewise.
18051 (build_new_op): Likewise.
18052 (build_new_method_call): Likewise.
18053 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
18054 (build_new_method_call): Likewise.
18055
18056 * class.c (finish_struct_methods): Add specialization pass to
18057 determine which methods were specializing which other methods.
18058 (instantiate_type): Handle TEMPLATE_ID_EXPR.
18059
18060 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
18061
18062 * cp-tree.h (name_mangling_version): New variable.
18063 (flag_guiding_decls): Likewise.
18064 (build_template_decl_overload): New function.
18065 (begin_specialization): Likewise.
18066 (reset_specialization): Likewise.
18067 (end_specialization): Likewise.
18068 (determine_explicit_specialization): Likewise.
18069 (check_explicit_specialization): Likewise.
18070 (lookup_template_function): Likewise.
18071 (fn_type_unification): Add explicit_targs parameter.
18072 (type_unification): Likewise.
18073
18074 * decl.c (duplicate_decls): Add smarts for explicit
18075 specializations.
18076 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
18077 specializations.
18078 (grokfndecl): Call check_explicit_specialization.
18079
18080 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
18081 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
18082 (check_classfn): Handle specializations.
18083
18084 * error.c (dump_function_name): Print specialization arguments.
18085
18086 * friend.c (do_friend): Don't call pushdecl for template
18087 instantiations.
18088
18089 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
18090
18091 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
18092 and -fno-guiding-decls.
18093
18094 * lex.c (identifier_type): Return PFUNCNAME for template function
18095 names.
18096
18097 * method.c (build_decl_overload_real): New function.
18098 (build_template_parm_names): New function.
18099 (build_overload_identifier): Use it.
18100 (build_underscore_int): New function.
18101 (build_overload_int): Use it. Add levels for template
18102 parameters.
18103 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
18104 (build_overload_nested_names): Handle template type parameters.
18105 (build_template_decl_overload): New function.
18106
18107 * parse.y (YYSTYPE): New ntype member.
18108 (nested_name_specifier): Use it.
18109 (nested_name_specifier_1): Likewise.
18110 (PFUNCNAME): New token.
18111 (template_id, object_template_id): New non-terminals.
18112 (template_parm_list): Note specializations.
18113 (template_def): Likewise.
18114 (structsp): Likewise.
18115 (fn.def2): Handle member template specializations.
18116 (component_decl_1): Likewise.
18117 (direct_notype_declarator): Handle template-ids.
18118 (component_decl_1): Likewise.
18119 (direct_notype_declarator): Handle template-ids.
18120 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
18121
18122 * pt.c (processing_specializations): New variable.
18123 (template_header_count): Likewise.
18124 (type_unification_real): New function.
18125 (processing_explicit_specialization): Likewise.
18126 (note_template_header): Likewise.
18127 (is_member_template): Handle specializations.
18128 (end_template_decl): Call reset_specialization.
18129 (push_template_decl): Handle member template specializations.
18130 (tsubst): Likewise.
18131 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
18132 (instantiate_template): Handle specializations.
18133 (instantiate_decl): Likewise.
18134 (fn_type_unification): Handle explicit_targs.
18135 (type_unification): Likewise. Allow incomplete unification
18136 without an error message, if allow_incomplete.
18137 (get_bindings): Use new calling sequence for fn_type_unification.
18138
18139 * spew.c (yylex): Handle PFUNCNAME.
18140
18141 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
18142 (really_overloaded_fn): Likewise.
18143 (get_first_fn): Handle function templates.
18144
18145 * typeck.c (build_x_function_call): Use really_overloaded_fn.
18146 Handle TEMPLATE_ID_EXPR.
18147 (build_x_unary_op): Likewise.
18148 (build_unary_op): Likewise.
18149 (mark_addressable): Templates whose address is taken are marked
18150 as used.
18151
18152 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
18153
18154 * decl.c (init_decl_processing): Declare __builtin_constant_p as
18155 accepting any kind of type, not only int.
18156
18157 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
18158
18159 * search.c (get_matching_virtual): Notice virtual bases when sorrying
18160 about covariant returns.
18161
18162 * parse.y (member_init): Also imply typename here. Remove ancient
18163 extension for initializing base members.
18164
18165 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
18166
18167 Handle multi-level typenames and implicit typename in base list.
18168 * parse.y (typename_sub{,[0-2]}): New rules.
18169 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
18170 (nonnested_type): New rule.
18171 (complete_type_name): Use it.
18172 (base_class.1): Use typename_sub and nonnested_type.
18173 (nested_name_specifier): Don't elide std:: here.
18174 * decl.c (make_typename_type): Handle getting a type for NAME.
18175 (lookup_name_real): Turn std:: into :: here.
18176
18177 Rvalue conversions were removed in London.
18178 * call.c (is_subseq): Don't consider lvalue transformations.
18179 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
18180 (joust): Re-enable ?: kludge.
18181
18182 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
18183
18184 * decl.c (start_function): Up warning of no return type to be a
18185 pedwarn.
18186
18187 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
18188
18189 * init.c (expand_member_init): Don't set TREE_USED.
18190 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
18191 set,don't clear TREE_USED wholesale.
18192
18193 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
18194
18195 * call.c (build_over_call): Do require_complete_type before
18196 build_cplus_new.
18197
18198 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
18199
18200 * search.c (lookup_field): Call complete_type in all cases.
18201
18202 * decl.c (finish_function): Just warn about flowing off the end.
18203
18204 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
18205
18206 * decl.c (grokparms): Don't bash a permanent list node if we're
18207 in a function.
18208
18209 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
18210
18211 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
18212
18213 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
18214
18215 * call.c (build_new_op): Give better error for syntactically
18216 correct, but semantically invalid, use of undeclared template.
18217
18218 * call.c (compare_qual): Handle pmfs.
18219
18220 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
18221 after the exception spec.
18222
18223 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
18224
18225 * call.c (null_ptr_cst_p): Integer type, not integral type.
18226
18227 * call.c (joust): Disable warnings until they can be moved to the
18228 right place.
18229
18230 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
18231
18232 * Makefile.in, config-lang.in: Convert to autoconf.
18233
18234 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
18235
18236 * decl.c (lookup_name_real): Add implicit 'typename' to types from
18237 base classes.
18238
18239 * pt.c (most_specialized_class): Fix typo.
18240 (tsubst): Move constant folding to TREE_VEC case.
18241
18242 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
18243
18244 * pt.c (do_poplevel): Don't warn about unused local variables
18245 while processing_template_decl since we don't always know whether
18246 or not they will need constructing/destructing.
18247
18248 * pt.c (uses_template_parms): Check the values of an enumeration
18249 type to make sure they don't depend on template parms.
18250
18251 * decl.c (make_typename_type): Don't lookup the field if the
18252 context uses template parms, even if we're not
18253 processing_template_decl at the moment.
18254
18255 * pt.c (coerce_template_parms): Avoid looking at the
18256 TYPE_LANG_DECL portion of a typename type, since there won't be
18257 one.
18258 (tsubst): Do constant folding as necessary to make sure that
18259 arguments passed to lookup_template_class really are constants.
18260
18261 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
18262
18263 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
18264 * decl2.c (finish_file): Only register exception tables if we
18265 need to.
18266
18267 * decl.c (init_decl_processing): Add __builtin_[fs]p.
18268
18269 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
18270
18271 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
18272
18273 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
18274
18275 * error.c (dump_decl): Avoid crashing when presented with a
18276 uninitialized constant, as can occur with a template parameter.
18277 (dump_expr): Make sure that there are enough levels of
18278 current_template_parms before we start diving through them.
18279
18280 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
18281
18282 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
18283 c-typeck.c.
18284
18285 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
18286
18287 * except.c (expand_throw): Call build_delete for all
18288 exception types, not just objects with destructors.
18289
18290 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
18291
18292 * decl.c (current_local_enum): Remove static.
18293 * pt.c (tsubst_enum): Save and restore value of current_local_enum
18294 in case template is expanded in enum decl.
18295 (instantiate_class_template): Use new tsubst_enum signature.
18296 (tsubst_expr): Likewise.
18297
18298 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
18299
18300 * pt.c (begin_member_template_processing): Take a function as
18301 argument, not a set of template arguments. Use the template
18302 parameters, rather than the arguments. Handle non-type parameters
18303 correctly. Push a binding level for the parameters so that multiple
18304 member templates using the same parameter names can be declared.
18305 (end_member_template_processing): Pop the binding level.
18306 (push_template_decl): Mark member templates as static when
18307 appropriate.
18308
18309 * lex.c (do_pending_inlines): Pass the function, not its template
18310 arguments, to begin_member_template_processing.
18311 (process_next_inline): Likewise.
18312 (do_pending_defargs): Likewise.
18313
18314 * error.c (dump_expr): Obtain the correct declaration for a
18315 TEMPLATE_CONST_PARM.
18316
18317 * call.c (add_template_conv_candidate): New function.
18318 (build_object_call): Handle member templates, as done in the other
18319 build_ functions.
18320
18321 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
18322
18323 * decl.c (replace_defag): Undo previous change.
18324 * lex.c (do_pending_defargs): Deal with member templates.
18325
18326 * pt.c (is_member_template): Avoid crashing when passed a
18327 non-function argument.
18328
18329 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
18330
18331 * class.c (grow_method): Remove check for redeclaration.
18332
18333 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
18334
18335 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
18336 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
18337 (PRIMARY_TEMPLATE_P): Use it.
18338 * call.c (build_overload_call_real): Use it.
18339 * class.c (instantiate_type): Likewise.
18340 * decl.c (decls_match): Likewise.
18341 * method.c (build_overload_identifier): Likewise.
18342 * pt.c (push_template_decl): Likewise.
18343 (classtype_mangled_name): Likewise.
18344 (lookup_template_class): Likewise.
18345
18346 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
18347 DECL_NTPARMS to conform to usage elsewhere.
18348 * call.c (add_template_candidate): Likewise.
18349 * class.c (instantiate_type): Likewise.
18350 * pt.c (instantiate_template): Likewise.
18351 (get_bindings): Likewise.
18352
18353 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
18354 is_member_template.
18355
18356 * pt.c (unify): Undo changes to allow multiple levels of template
18357 parameters.
18358 (type_unification): Likewise.
18359 (fn_type_unification): Likewise.
18360 (get_class_bindings): Likewise.
18361 * cp-tree.h (Likewise).
18362
18363 * decl.c (replace_defarg): Check that the type of the default
18364 parameter does not invlove a template type before complaining
18365 about the initialization.
18366
18367 * error.c (dump_expr): Deal with template constant parameters in
18368 member templates correctly.
18369
18370 * pt.c (is_member_template): Deal with class specializations
18371 correctly.
18372 (tsubst): Handle "partial instantiation" of member templates
18373 correctly.
18374
18375 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
18376
18377 * pt.c (type_unification): Change calling sequence to allow for
18378 multiple levels of template parameters.
18379 (tsubst_expr): Likewise.
18380 (tsubst): Likewise.
18381 (tsubst_copy): Likewise.
18382 (instantiate_template): Likewise.
18383 (unify): Likewise.
18384 * call.c (build_overload_call_real): Use it.
18385 (add_builtin_candidate): Use it.
18386 (build_new_method_call): Use it.
18387 * class.c (instantiate_type): Use it.
18388 * decl.c (grokdeclarator): Use it.
18389 * decl2.c (finish_file): Use it.
18390 * method.c (build_overload_identifier): Use it.
18391
18392 * call.c (add_template_candidate): Add additional parameter for
18393 the function return type. Call fn_type_unification istead of
18394 type_unification.
18395 (build_user_type_conversion_1): Handle member templates.
18396 (build_new_function_call): Likewise.
18397 (build_new_op): Likewise.
18398 (build_new_method_call): Likewise.
18399
18400 * class.c (grow_method): Don't give an error message indicating
18401 that two member templates with the same name are ambiguous.
18402 (finish_struct): Treat member template functions just like member
18403 functions.
18404
18405 * cp-tree.h (check_member_template): Add declaration.
18406 (begin_member_template_processing): Likewise.
18407 (end_member_template_processing): Likewise.
18408 (fn_type_unification): Likewise.
18409 (is_member_template): Likewise.
18410 (tsubst): Change prototype.
18411 (tsubst_expr): Likewise.
18412 (tsubst_copy): Likewise.
18413 (instantiate_template): Likewise.
18414 (get_bindings): Likewise.
18415
18416 * decl.c (decls_match): Handle multiple levels of template
18417 parameters.
18418 (pushdecl): Handle template type params just like other type
18419 declarations.
18420 (push_class_level_binding): Return immediately if the
18421 class_binding_level is NULL.
18422 (grokfndecl): If check_classfn() returns a member_template, use
18423 the result of the template, not the template itself.
18424
18425 * decl2.c (check_member_template): New function. Check to see
18426 that the entity declared to be a member template can be one.
18427 (check_classfn): Allow redeclaration of member template functions
18428 with different types; the new functions can be specializations or
18429 explicit instantiations.
18430
18431 * error.c (dump_decl): Handle multiple levels of template
18432 parameters.
18433 (dump_function_decl): Update to handle function templates.
18434
18435 * lex.c (do_pending_inlines): Set up template parameter context
18436 for member templates.
18437 (process_next_inline): Likewise.
18438
18439 * method.c (build_overload_identifier): Adjust for multiple levels
18440 of template parameters.
18441
18442 * parse.y (fn.def2): Add member templates.
18443 (component_decl_1): Likewise.
18444
18445 * pt.c (begin_member_template_processing): New function.
18446 (end_member_template_processing): Likewise.
18447 (is_member_template): Likewise.
18448 (fn_type_unification): Likewise.
18449 (current_template_parms): Return a vector of all the template
18450 parms, not just the innermost level of parms.
18451 (push_template_decl): Deal with the possibility of member
18452 templates.
18453 (lookup_template_class): Likewise.
18454 (uses_template_parms): Likewise.
18455 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
18456 TEMPLATE_CONST_PARM to deal with multiple levels of template
18457 arguments. Add processing of TEMPLATE_DECL to produce new
18458 TEMPLATE_DECLs from old ones.
18459 (do_decl_instantiation): Handle member templates.
18460
18461 * search.c (lookup_fnfields_1): Handle member template conversion
18462 operators.
18463
18464 * tree.c (cp_tree_equal): Check the levels, as well as the
18465 indices, of TEMPLATE_CONST_PARMs.
18466
18467 * typeck.c (comptypes): Check the levels, as well as the indices,
18468 fo TEMPLATE_TYPE_PARMs.
18469 (build_x_function_call): Treat member templates like member
18470 functions.
18471
18472 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
18473
18474 * typeck.c (c_expand_return): Always convert_for_initialization
18475 before checking for returning a pointer to local.
18476
18477 * pt.c (type_unification): If strict and the function parm doesn't
18478 use template parms, just compare types.
18479
18480 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
18481
18482 * method.c (build_overloaded_value): Replace direct call
18483 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
18484
18485 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
18486
18487 * typeck.c (convert_arguments): Don't arbitrarily choose the first
18488 of a set of overloaded functions.
18489
18490 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
18491
18492 * lex.c (real_yylex): Don't elide __FUNCTION__.
18493
18494 * method.c (build_overload_value): Add in_template parm.
18495 (build_overload_int): Likewise.
18496 (build_overload_identifier): Pass it.
18497
18498 * decl.c (duplicate_decls): Don't bash a previous template
18499 definition with a redeclaration.
18500
18501 * pt.c (unify): float doesn't match double.
18502
18503 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
18504 TYPE_DECL. Handle getting non-template types.
18505 * parse.y (explicit_instantiation): Use typespec instead of
18506 aggr template_type.
18507
18508 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
18509
18510 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
18511
18512 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
18513
18514 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
18515 (compare_ics): Likewise.
18516
18517 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
18518
18519 * call.c (joust): Warn about choosing one conversion op over
18520 another because of 'this' argument when the other return type is
18521 better.
18522 (source_type): New fn.
18523
18524 * call.c (build_new_op): Strip leading REF_BIND from first operand
18525 to builtin operator.
18526
18527 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
18528 use its RTL.
18529
18530 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
18531
18532 * call.c (null_ptr_cst_p): Remove support for (void*)0.
18533
18534 Wed Aug 27 02:03:34 1997 Jeffrey A Law <law@cygnus.com>
18535
18536 * typeck.c (expand_target_expr): Make definition match declaration.
18537
18538 * class.c (get_basefndecls): Make definition match declaration.
18539
18540 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
18541
18542 * input.c (sub_getch): Eventually give up and release the input file.
18543
18544 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
18545 right place.
18546
18547 * call.c (joust): Tweak message.
18548
18549 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
18550
18551 * error.c (type_as_string): Put const/volatile on template type
18552 parameters where appropriate.
18553
18554 Sat Aug 23 17:47:22 1997 Jeffrey A Law <law@cygnus.com>
18555
18556 * call.c (strictly_better): Make arguments unsigned ints.
18557
18558 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
18559
18560 * lex.c (real_yylex): Refer to __complex instead of complex.
18561
18562 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
18563
18564 * lex.c (real_yylex): Don't use getc directly.
18565
18566 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
18567
18568 * call.c (is_subseq): Don't try to be clever.
18569
18570 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
18571
18572 * parse.y, pt.c: Include "except.h".
18573 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
18574 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
18575 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
18576 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
18577 prototyping.
18578
18579 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
18580
18581 * decl2.c (mark_vtable_entries): Instead of replacing pure
18582 virtuals with a reference to __pure_virtual, copy the decl and
18583 change the RTL.
18584
18585 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
18586
18587 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
18588
18589 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
18590
18591 * pt.c (instantiate_class_template): Call repo_template_used
18592 before finish_prevtable_vardecl.
18593
18594 * call.c (is_subseq): New fn.
18595 (compare_ics): Use it.
18596
18597 * repo.c (finish_repo): Don't crash on no args.
18598
18599 * parse.y (named_complex_class_head_sans_basetype): Handle
18600 explicit global scope.
18601 * decl2.c (handle_class_head): New fn.
18602
18603 * pt.c (unify): Add CONST_DECL case.
18604
18605 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
18606
18607 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
18608
18609 * cp-tree.h (report_type_mismatch): Add prototype.
18610 * call.c (build_overload_call_real): Remove erroneous fourth
18611 argument to report_type_mismatch.
18612 (build_user_type_conversion_1): Remove erroneous second arg to
18613 tourney.
18614 (build_new_function_call): Likewise.
18615 (build_object_call): Likewise.
18616 (build_new_op): Likewise.
18617 (build_new_method_call): Likewise.
18618
18619 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
18620
18621 * error.c (dump_decl): Don't bother processing a function with no
18622 DECL_LANG_SPECIFIC.
18623
18624 * method.c (emit_thunk): Call init_function_start in the macro case.
18625
18626 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
18627
18628 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
18629 defined and used to set flag_vtable_thunks.
18630
18631 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
18632
18633 * parse.y: Don't clear the inlines from their obstack until they've
18634 all been processed.
18635
18636 * decl.c (duplicate_decls): Don't complain about exception
18637 specification mismatch if flag_exceptions is off.
18638
18639 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
18640
18641 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
18642
18643 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
18644
18645 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
18646 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
18647 Include <stdio.h> before include files that formerly used STDIO_PROTO.
18648
18649 * decl.c, g++spec.c, lex.c, method.c, repo.c:
18650 Include "config.h" first, as per autoconf manual.
18651
18652 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
18653
18654 * decl.c (duplicate_decls): Tweak wording.
18655 * lex.c (do_pending_defargs): Don't die if we see a default arg
18656 that isn't a DEFAULT_ARG.
18657 * error.c (dump_expr): Handle DEFAULT_ARG.
18658
18659 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
18660 * lang-options.h: Add -fhandle-exceptions.
18661
18662 * class.c (build_vtable): Vtables are artificial.
18663 (prepare_fresh_vtable): Likewise.
18664
18665 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
18666
18667 * cvt.c (ocp_convert): After converting to the target type, set
18668 LOOKUP_NO_CONVERSION.
18669
18670 * call.c (joust): Warn about potentially confusing promotion rules
18671 with -Wsign-promo.
18672 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
18673
18674 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
18675
18676 * exception.cc: Declare __terminate_func with noreturn attribute.
18677
18678 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
18679
18680 * parse.y: Break out eat_saved_input, handle errors.
18681 (function_try_block): Use compstmt instead of compstmt_or_error.
18682
18683 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
18684
18685 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
18686
18687 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
18688
18689 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
18690 existence of cc1plus check whether $(LANGUAGES) contains C++.
18691
18692 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
18693
18694 * method.c (do_build_copy_constructor): When copying an anonymous
18695 union member loop around to handle nested anonymous unions. Use
18696 the offset of the member relative to the outer structure, not the
18697 union.
18698
18699 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
18700
18701 * call.c (resolve_args): New fn.
18702 (build_new_function_call): Use it.
18703 (build_object_call): Likewise.
18704 (build_new_method_call): Likewise.
18705
18706 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
18707
18708 * call.c (build_over_call): tsubst all default parms from templates.
18709
18710 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
18711
18712 * decl.c (struct cp_function): Add static_labelno.
18713 (push_cp_function_context): Save it.
18714 (pop_cp_function_context): Restore it.
18715
18716 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
18717
18718 * typeck.c (build_component_ref_1): Convert from reference.
18719
18720 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
18721
18722 * parse.y (current_declspecs, prefix_attributes): Initialize to
18723 NULL_TREE.
18724
18725 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
18726 before we try to force it to be a TREE_LIST.
18727 (decl): Make sure $1.t is non-nil.
18728
18729 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
18730
18731 * pt.c (uses_template_parms): Handle template first-parse codes.
18732
18733 * decl.c (cp_finish_decl): Only warn about user-defined statics.
18734
18735 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
18736
18737 * pt.c (unify): Handle BOOLEAN_TYPE.
18738
18739 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
18740 * pt.c (tsubst): Don't set it.
18741 * call.c (build_over_call): Use uses_template_parms.
18742
18743 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
18744
18745 * method.c (build_overload_nested_name): Use static_labelno
18746 instead of var_labelno.
18747 (build_qualified_name): New fn.
18748 (build_overload_name): Split out from here.
18749 (build_static_name): Use build_qualified_name.
18750 * decl.c (cp_finish_decl): Statics in extern inline functions
18751 have comdat linkage.
18752 (start_function): Initialize static_labelno.
18753
18754 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
18755
18756 * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
18757 before "all member functions in class [] are private".
18758
18759 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
18760
18761 * lex.c (do_scoped_id): convert_from_reference.
18762 * init.c (build_offset_ref): Likewise.
18763
18764 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
18765
18766 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
18767
18768 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
18769
18770 * typeck.c (get_member_function_from_ptrfunc): Promote index
18771 before saving it.
18772
18773 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
18774
18775 * tree.c (layout_basetypes): Move non-virtual destructor warning.
18776 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
18777
18778 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
18779
18780 * decl.c (grokdeclarator): Call add_defarg_fn for the function
18781 type, too.
18782 * lex.c (add_defarg_fn): Adjust.
18783 (do_pending_defargs): Adjust. Don't skip the first parm.
18784
18785 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
18786
18787 * decl.c (build_enumerator): Global enumerators are also readonly.
18788
18789 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
18790 (build_dynamic_cast): Call it and convert_from_reference.
18791
18792 * lex.c (add_defarg_fn): New fn.
18793 (snarf_defarg): Don't add to defarg_types.
18794 (do_pending_defargs): Lose defarg_types. All fns we process now
18795 have defargs.
18796 * decl.c (grokfndecl): Call add_defarg_fn.
18797
18798 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
18799 * cp-tree.def: Add DEFAULT_ARG.
18800 * spew.c (yylex): Call snarf_defarg as appropriate.
18801 * parse.y: New tokens DEFARG and DEFARG_MARKER.
18802 (defarg_again, pending_defargs, defarg, defarg1): New rules.
18803 (structsp): Use pending_defargs.
18804 (parms, full_parm): Use defarg.
18805 * lex.c (init_lex): Initialize inline_text_firstobj.
18806 (do_pending_inlines): Never pass the obstack to feed_input.
18807 (process_next_inline): Call end_input instead of restore_pending_input.
18808 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
18809 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
18810 * input.c (end_input): New fn.
18811 (sub_getch): At the end of some fed input, just keep returning EOF
18812 until someone calls end_input.
18813 Remove 'obstack' field from struct input_source.
18814 * decl.c (grokparms): Handle DEFAULT_ARG.
18815 (replace_defarg): New fn.
18816 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
18817
18818 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
18819
18820 * call.c (implicit_conversion): If nothing else works, try binding
18821 an rvalue to a reference.
18822
18823 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
18824
18825 * decl.c (init_decl_processing): Fix Jun 30 patch -- move
18826 ifndef for Cygwin32 to include SIGSEGV.
18827
18828 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
18829
18830 * class.c (finish_struct_1): Only complain about pointers without
18831 copy stuff if there are any constructors.
18832
18833 * rtti.c (build_dynamic_cast): Call complete_type on the types.
18834
18835 * decl.c (grokfndecl): If the function we chose doesn't actually
18836 match, die.
18837
18838 * decl2.c (grokclassfn): Don't specify 'const int' for the
18839 artificial destructor parm.
18840
18841 * pt.c (type_unification): If we are called recursively, nothing
18842 decays.
18843
18844 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
18845
18846 * decl.c (init_decl_processing): Stop trying to catch signals
18847 other than SIGABRT since the Cygwin32 library doesn't support
18848 them correctly yet. This fixes a situation in which g++ causes
18849 a hang on SIGSEGVs and other such signals in our Win32-hosted
18850 tools.
18851
18852 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
18853
18854 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
18855
18856 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
18857
18858 * typeck2.c (store_init_value): Always return the value if our
18859 type needs constructing.
18860
18861 * method.c (hack_identifier): Convert class statics from
18862 reference, too.
18863
18864 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
18865
18866 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
18867
18868 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
18869
18870 * typeck.c (c_expand_return): Make sure we clean up temporaries at
18871 the end of return x;
18872
18873 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
18874
18875 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
18876
18877 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
18878
18879 * except.c (expand_builtin_throw): Add support
18880 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
18881
18882 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
18883
18884 * repo.c (extract_string): Null-terminate.
18885
18886 * cp-tree.h (TI_SPEC_INFO): New macro.
18887 (CLASSTYPE_TI_SPEC_INFO): New macro.
18888 * pt.c (push_template_decl): Correctly determine # of template parms
18889 for partial specs.
18890
18891 * call.c (compare_ics): Really fix 'this' conversions.
18892
18893 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
18894 non-template fn.
18895
18896 * pt.c (push_template_decl): Complain about mismatch in # of
18897 template parms between a class template and a member template.
18898
18899 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
18900
18901 * method.c (synthesize_method): You can't call
18902 function_cannot_inline_p after finish_function.
18903 * decl.c (finish_function): Turn on flag_inline_functions and turn
18904 off DECL_INLINE before handing a synthesized method to the
18905 backend.
18906
18907 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
18908
18909 * method.c (synthesize_method): Remove July 30 change to never set
18910 DECL_INLINE if at_eof.
18911
18912 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
18913
18914 * xref.c (GNU_xref_member): Ensure that the node has a
18915 decl_lang_specific part before checking DECL_FRIEND_P.
18916
18917 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
18918
18919 * pt.c (instantiate_class_template): Diagnose non-class types used
18920 as bases.
18921
18922 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
18923
18924 * typeck.c (build_conditional_expr): Use convert_for_initialization
18925 instead of convert_and_check.
18926
18927 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
18928
18929 * parse.y (typespec): Don't pedwarn for typeof.
18930
18931 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
18932
18933 * repo.c (finish_repo): Only check changes if we would write a
18934 repo file.
18935
18936 * call.c (compare_ics): Fix handling of 'this' conversions.
18937
18938 * pt.c (do_decl_instantiation): Support static data too. Rename
18939 from do_function_instantiation.
18940 * cp-tree.h: Adjust.
18941 * parse.y: Adjust.
18942
18943 * repo.c (extract_string): New fn.
18944 (get_base_filename): Use it.
18945 (init_repo): Compare old args with current args.
18946
18947 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
18948
18949 * Makefile.in, Make-lang.in: Protect C-ls with a comment
18950 character, idea from Paul Eggert <eggert@twinsun.com>.
18951
18952 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
18953
18954 * typeck.c (c_expand_return): Be more persistent in looking for
18955 returned temps.
18956
18957 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
18958 pointer to reference.
18959
18960 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
18961
18962 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
18963
18964 * init.c (build_member_call, build_offset_ref):
18965 Use do_scoped_id instead of do_identifier.
18966
18967 * cvt.c (convert): Remove bogosity.
18968
18969 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
18970
18971 * cvt.c (build_up_reference): Do checks of ARGTYPE and
18972 TARGET_TYPE before trying to use get_binfo.
18973
18974 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
18975
18976 * cvt.c (build_up_reference): Call get_binfo to get access control.
18977
18978 * decl2.c (import_export_decl): If we don't support weaks, leave
18979 statics undefined.
18980
18981 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
18982
18983 * except.c (expand_builtin_throw): Add support for machines that
18984 cannot access globals after throw's epilogue when
18985 -fno-sjlj-exceptions is used.
18986
18987 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
18988
18989 * parse.y: 'std::' becomes '::'.
18990 * lex.c (real_yylex): Remove 'namespace' warning.
18991 * init.c (build_member_call): Ignore 'std::'.
18992 (build_offset_ref): Likewise.
18993 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
18994 (do_toplevel_using_decl): Ignore 'using std::whatever'.
18995 * decl.c (push_namespace): Just sorry.
18996 (pop_namespace): Nop.
18997 (init_decl_processing): Declare std namespace.
18998
18999 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
19000
19001 * search.c (push_class_decls): A name which ambiguously refers to
19002 several instantiations of the same template just refers to the
19003 template.
19004
19005 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
19006
19007 * decl.c (build_enumerator): Fix problem with unsigned long
19008 enumerated values being smashed to ints, causing overflow
19009 when computing next enumerated value (for enum values around
19010 MAX_VAL).
19011
19012 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
19013
19014 * typeck.c (build_component_ref): Only call mark_used on a decl.
19015
19016 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19017
19018 * typeck.c (build_c_cast): Make the check for a ptr to function
19019 more specific before possible default_conversion call.
19020
19021 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
19022
19023 * except.c (expand_exception_blocks): Simplify and fix and make
19024 sure we don't end a region in a sequence, as expand_end_bindings
19025 doesn't like it.
19026
19027 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
19028
19029 * except.c (init_exception_processing): Mark terminate as not
19030 returning so that the optimizer can optimize better.
19031
19032 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
19033
19034 * cvt.c (convert): Don't do any extra work, if we can avoid it
19035 easily.
19036
19037 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
19038
19039 * *.[chy]: Change cp_convert to ocp_convert, change convert to
19040 cp_convert. convert is now reserved for the backend, and doesn't
19041 have the semantics a frontend person should ever want.
19042
19043 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
19044
19045 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
19046 Lose -traditional support.
19047
19048 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
19049
19050 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
19051
19052 * parse.y (self_reference): Do it for templates, too.
19053 * class.c (pushclass): Don't overload_template_name; the alias
19054 generated by build_self_reference serves the same purpose.
19055
19056 * tree.c (list_hash): Make static, take more args.
19057 (list_hash_lookup): Likewise.
19058 (list_hash_add): Make static.
19059 (list_hash_canon): Lose.
19060 (hash_tree_cons): Only build a new node if one isn't already in the
19061 hashtable.
19062 (hash_tree_chain): Use hash_tree_cons.
19063 * cp-tree.h: Adjust.
19064 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
19065 of calling lookup_name.
19066
19067 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
19068
19069 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
19070 doesn't refer to the CONST_DECLs.
19071
19072 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
19073
19074 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
19075 is bigger.
19076 (expand_class_desc): Convert the last argument to a sizetype.
19077
19078 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19079
19080 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
19081 __real__): Add reswords.
19082 * hash.h: Regenerate.
19083 * lex.h (rid): Add RID_COMPLEX.
19084 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
19085 * lex.c (init_lex): Add building of RID_COMPLEX.
19086 (real_yylex): General cleanup in line with what c-lex.c also has,
19087 sans the cruft for traditional; add handling of SPEC_IMAG, complex
19088 types, and imaginary numeric constants.
19089 * parse.y (REALPART, IMAGPART): Add tokens.
19090 (unary_expr): Add REALPART and IMAGPART rules.
19091 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
19092 * decl.c (complex_{integer,float,double,long}_type_node): Define
19093 types.
19094 (init_decl_processing): Set up the types.
19095 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
19096 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
19097 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
19098 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
19099 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
19100 COMPLEX_TYPE case.
19101 * method.c (build_overload_name): Add handling of the different
19102 COMPLEX_TYPEs, prefixing them with `J'.
19103 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
19104 as a template parm.
19105 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
19106 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
19107 (mapcar): Handle COMPLEX_CST.
19108 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
19109 (common_type): Add code for complex types.
19110 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
19111 (convert_for_assignment): Likewise.
19112 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
19113
19114 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
19115
19116 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
19117 tsubst_expr, as it might try to do overload resolution.
19118
19119 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
19120
19121 * pt.c (instantiate_class_template): Oops.
19122
19123 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
19124
19125 * cp-tree.def: Add TAG_DEFN.
19126 * pt.c (tsubst_enum): New fn.
19127 (instantiate_class_template): Use it.
19128 (tsubst_expr): Support TAG_DEFN.
19129 (tsubst): Support local enums.
19130 (tsubst_copy): Likewise.
19131 * decl.c (finish_enum): Likewise.
19132 (start_enum): If this is a local enum, switch to permanent_obstack.
19133
19134 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
19135
19136 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
19137 (finish_function): Put the base init code for constructors just
19138 after the parm cleanup insns.
19139 (struct cp_function): Add last_parm_cleanup_insn.
19140 (push_cp_function_context): Likewise.
19141 (pop_cp_function_context): Likewise.
19142
19143 Tue May 13 15:51:20 1997 Jason Merrill <jason@yorick.cygnus.com>
19144
19145 * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
19146
19147 Wed May 7 11:17:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19148
19149 * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
19150 for THUNK_FNDECL before we switch to temporary allocation.
19151
19152 Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
19153
19154 * call.c (build_new_op): Handle null arg2 for ?:.
19155
19156 Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
19157
19158 * except.c (expand_exception_blocks): Ensure that we flow through
19159 the end of the exception region for the exception specification.
19160 Move exception region for the exception specification in, so that
19161 it doesn't protect the parm cleanup. Remove some obsolete code.
19162 * decl.c (store_parm_decls): Likewise.
19163 (finish_function): Likewise.
19164
19165 Tue Apr 29 15:38:54 1997 Jason Merrill <jason@yorick.cygnus.com>
19166
19167 * init.c (build_new): Fix nothrow handling.
19168
19169 Tue Apr 29 14:29:50 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19170
19171 * init.c (emit_base_init): Don't warn about the initialization
19172 list for an artificial member.
19173
19174 Fri Apr 25 17:47:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19175
19176 * expr.c (do_case): Handle !START case for the error msg.
19177
19178 Fri Apr 25 11:55:23 1997 Jason Merrill <jason@yorick.cygnus.com>
19179
19180 * decl2.c, lang-options.h: New option -Weffc++.
19181 * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
19182 to -Weffc++.
19183
19184 * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
19185 to MULTIPLE_SYMBOL_SPACES.
19186
19187 Wed Apr 23 18:06:50 1997 Jason Merrill <jason@yorick.cygnus.com>
19188
19189 * method.c (emit_thunk, generic case): Set current_function_is_thunk.
19190
19191 * method.c (emit_thunk, macro case): Set up DECL_RESULT.
19192
19193 * typeck.c (c_expand_return): Don't complain about returning void
19194 to void in an artificial function.
19195 * method.c (make_thunk): Change settings of READONLY/VOLATILE,
19196 don't set DECL_RESULT, set DECL_ARTIFICIAL.
19197 (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
19198
19199 Wed Apr 23 14:43:06 1997 Mike Stump <mrs@cygnus.com>
19200
19201 * init.c (init_decl_processing): Add support for setjmp/longjmp based
19202 exception handling.
19203 * except.c (init_exception_processing): Likewise.
19204 (expand_end_catch_block): Likewise.
19205 (expand_exception_blocks): Likewise.
19206 (expand_throw): Likewise.
19207 * exception.cc (__default_terminate): Likewise.
19208
19209 * init.c (perform_member_init): Use new method of expr level
19210 cleanups, instead of cleanups_this_call and friends.
19211 (emit_base_init): Likewise.
19212 (expand_aggr_vbase_init_1): Likewise.
19213 (expand_vec_init): Likewise.
19214 * decl.c (cp_finish_decl): Likewise.
19215 (expand_static_init): Likewise.
19216 (store_parm_decls): Likewise.
19217 (cplus_expand_expr_stmt): Likewise.
19218 * decl2.c (finish_file): Likewise.
19219
19220 * Make-lang.in (exception.o): Ok to compile with -O now.
19221
19222 * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
19223 we know it will be done later by the backend.
19224
19225 * decl2.c (lang_f_options): Remove support for short temps.
19226 * lang-options.h: Likewise.
19227
19228 Wed Apr 23 04:12:06 1997 Jason Merrill <jason@yorick.cygnus.com>
19229
19230 * tree.c (varargs_function_p): New fn.
19231 * method.c (emit_thunk): Replace broken generic code with code to
19232 generate a heavyweight thunk function.
19233
19234 Tue Apr 22 02:45:18 1997 Jason Merrill <jason@yorick.cygnus.com>
19235
19236 * pt.c (process_template_parm): pedwarn about floating-point parms.
19237
19238 * decl.c (grokdeclarator): inline no longer implies static.
19239
19240 * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
19241
19242 Mon Apr 21 15:42:27 1997 Jason Merrill <jason@yorick.cygnus.com>
19243
19244 * class.c (check_for_override): The signature of an overriding
19245 function is not changed.
19246
19247 * call.c (build_over_call): Move setting of conv into the loop.
19248 Note: this change, along with the related changes of the 18th thru
19249 the 20th of April, fix an infinite loop problem in conversions.
19250
19251 Sun Apr 20 16:24:29 1997 Jason Merrill <jason@yorick.cygnus.com>
19252
19253 * call.c (build_user_type_conversion_1): Really ignore rvalue
19254 conversions when looking for a REFERENCE_TYPE.
19255
19256 * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
19257 * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
19258 * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
19259 (build_unary_op): Likewise.
19260 * call.c (build_over_call): See through a CONVERT_EXPR around the
19261 ADDR_EXPR for on a temporary.
19262 * typeck.c (c_expand_return): See through a CONVERT_EXPR around
19263 the ADDR_EXPR for a local variable.
19264
19265 Fri Apr 18 12:11:33 1997 Jason Merrill <jason@yorick.cygnus.com>
19266
19267 * call.c (build_user_type_conversion_1): If we're trying to
19268 convert to a REFERENCE_TYPE, only consider lvalue conversions.
19269 (build_new_function_call): Print candidates.
19270 (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
19271 (reference_binding): Binding a temporary of a reference-related type
19272 is BAD.
19273
19274 Thu Apr 17 14:37:22 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19275
19276 * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
19277 * tinfo2.cc (type_info::before): Likewise.
19278
19279 Mon Apr 14 12:38:17 1997 Jason Merrill <jason@yorick.cygnus.com>
19280
19281 * call.c (implicit_conversion): Oops.
19282
19283 Fri Apr 11 02:18:30 1997 Jason Merrill <jason@yorick.cygnus.com>
19284
19285 * call.c (implicit_conversion): Try to find a reference conversion
19286 before binding a const reference to a temporary.
19287
19288 Wed Apr 2 12:51:36 1997 Mike Stump <mrs@cygnus.com>
19289
19290 * exception.cc (__default_unexpected): Call terminate by default,
19291 so that if the user overrides terminate, the correct function will
19292 be called.
19293
19294 Wed Mar 19 14:14:45 1997 Mike Stump <mrs@cygnus.com>
19295
19296 * parse.y (left_curly): Avoid trying to use any fields of
19297 error_mark_node, as there aren't any.
19298
19299 Thu Mar 13 16:33:22 1997 Jason Merrill <jason@yorick.cygnus.com>
19300
19301 * lex.c (do_identifier): Avoid breaking on overloaded methods
19302 as default arguments.
19303
19304 Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se>
19305
19306 * call.c (add_template_candidate): Initialize the variable "dummy".
19307
19308 Mon Mar 10 15:13:14 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
19309
19310 * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
19311 before we try to use TYPE_SIZE and TREE_CONSTANT on it.
19312
19313 Fri Mar 7 13:19:36 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19314
19315 * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
19316 (debug_binfo): Delete decl, not needed.
19317
19318 * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
19319 promotes_to_aggr_type): Delete fns.
19320 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
19321 SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
19322 PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
19323
19324 * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
19325
19326 * friend.c (is_friend_type): Delete fn.
19327 * cp-tree.h (is_friend_type): Delete decl.
19328
19329 * decl.c (original_result_rtx, double_ftype_double,
19330 double_ftype_double_double, int_ftype_int, long_ftype_long,
19331 float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
19332 * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
19333
19334 * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
19335 fwd decls.
19336 * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
19337
19338 * decl.c (pushdecl_nonclass_level): #if 0, unused.
19339 * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
19340
19341 * lex.c (reinit_lang_specific): #if 0, unused.
19342 * cp-tree.h (reinit_lang_specific): #if 0 decl.
19343
19344 * decl.c (revert_static_member_fn): Make static, adding fwd decl.
19345 * cp-tree.h (revert_static_member_fn): Delete decl.
19346
19347 * class.c (root_lang_context_p): Delete fn.
19348 * cp-tree.h (root_lang_context_p): Delete decl.
19349
19350 * decl.c (set_current_level_tags_transparency): #if 0, unused.
19351 * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
19352
19353 * lex.c (set_vardecl_interface_info): Make static.
19354 * cp-tree.h (set_vardecl_interface_info): Delete decl.
19355
19356 * call.c (find_scoped_type): Make static.
19357 * cp-tree.h (find_scoped_type): Delete decl.
19358
19359 * search.c (convert_pointer_to_vbase): Make static.
19360 * cp-tree.h (convert_pointer_to_vbase): Delete decl.
19361
19362 * decl.c (const_ptr_type_node): Likewise.
19363 * cp-tree.h (const_ptr_type_node): Delete decl.
19364
19365 * typeck.c (common_base_type): Make static.
19366 * cp-tree.h (common_base_types): Delete erroneous decl.
19367
19368 * pt.c (classtype_mangled_name): Make static.
19369 * cp-tree.h (classtype_mangled_name): Delete decl.
19370
19371 * lex.c (check_newline): Make static.
19372 * cp-tree.h (check_newline): Delete decl.
19373
19374 * typeck.c (build_x_array_ref): Delete fn, same idea as
19375 grok_array_decl.
19376 * cp-tree.h (build_x_array_ref): Delete decl.
19377
19378 * lex.c (copy_decl_lang_specific): Delete fn, same idea as
19379 copy_lang_decl.
19380 * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
19381
19382 * class.c (build_vtable_entry): Make static.
19383 * cp-tree.h (build_vtable_entry): Delete decl.
19384
19385 * class.c (build_vbase_pointer): Make static.
19386 * cp-tree.h (build_vbase_pointer): Delete decl.
19387
19388 * sig.c (build_sptr_ref): Add forward decl and make static.
19389 * cp-tree.h (build_sptr_ref): Delete decl.
19390
19391 * call.c (build_new_method_call): Add forward decl and make static.
19392 * cp-tree.h (build_new_method_call): Delete decl.
19393
19394 * call.c (build_object_call): Make static.
19395 * class.c (check_for_override, complete_type_p, mark_overriders):
19396 Likewise.
19397 * decl.c (cp_function_chain): Likewise.
19398 * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
19399 Likewise.
19400 * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
19401 Likewise.
19402 * tree.c (build_cplus_array_type_1): Likewise.
19403 * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
19404 (comp_target_parms): Likewise.
19405
19406 * init.c (build_builtin_call): Make static.
19407 * cp-tree.h (build_builtin_call): Delete decl.
19408
19409 * typeck.c (binary_op_error): Delete decl.
19410 * cp-tree.h (binary_op_error): Likewise.
19411
19412 Thu Mar 6 16:13:52 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19413
19414 * call.c (build_method_call): Compare against error_mark_node
19415 directly, rather than the ERROR_MARK tree code.
19416 * cvt.c (cp_convert): Likewise.
19417 * decl.c (print_binding_level): Likewise.
19418 (duplicate_decls): Likewise.
19419 (grokdeclarator): Likewise.
19420 (grokdeclarator): Likewise.
19421 * init.c (expand_aggr_init_1): Likewise.
19422 (decl_constant_value): Likewise.
19423 * method.c (build_opfncall): Likewise.
19424 (hack_identifier): Likewise.
19425 * typeck.c (build_modify_expr): Likewise.
19426
19427 * typeck.c (build_c_cast): Don't decl TYPE as register tree.
19428
19429 Sun Mar 2 02:54:36 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
19430
19431 * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
19432
19433 * pt.c (coerce_template_parms): Add new error message.
19434
19435 * method.c (build_overload_value): Implement name mangling for
19436 floating-point template arguments.
19437
19438 * method.c (build_overload_int, icat, dicat): Fix mangling of template
19439 arguments whose absolute value doesn't fit in a signed word.
19440
19441 Mon Mar 3 12:14:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19442
19443 * friend.c: New file; put all of the friend stuff in here.
19444 * init.c: Instead of here.
19445 * Makefile.in (CXX_OBJS): Add friend.o.
19446 (friend.o): Add dependencies.
19447 * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
19448
19449 Sun Mar 2 11:04:43 1997 Jason Merrill <jason@yorick.cygnus.com>
19450
19451 * call.c (build_scoped_method_call): Complain if the scope isn't a
19452 base.
19453
19454 Wed Feb 26 11:31:06 1997 Jason Merrill <jason@yorick.cygnus.com>
19455
19456 * parse.y (left_curly): Don't crash on erroneous type.
19457
19458 * init.c (build_delete): Fix type of ref.
19459
19460 Tue Feb 25 12:41:48 1997 Jason Merrill <jason@yorick.cygnus.com>
19461
19462 * search.c (get_vbase_1): Renamed from get_vbase.
19463 (get_vbase): Wrapper, now non-static.
19464 (convert_pointer_to_vbase): Now static.
19465
19466 * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
19467 * init.c (build_delete): Pass one.
19468 (build_partial_cleanup_for): Use build_scoped_method_call.
19469 * decl.c (finish_function): Pass a binfo.
19470
19471 Mon Feb 24 15:00:12 1997 Jason Merrill <jason@yorick.cygnus.com>
19472
19473 * call.c (build_over_call): Only synthesize non-trivial copy ctors.
19474
19475 * typeck.c (build_c_cast): Lose other reference to flag.
19476
19477 * call.c (build_field_call): Don't look for [cd]tor_identifier.
19478 * decl2.c (delete_sanity): Remove meaningless use of
19479 LOOKUP_HAS_IN_CHARGE.
19480 * decl.c (finish_function): Use build_scoped_method_call instead
19481 of build_delete for running vbase dtors.
19482 * init.c (build_delete): Call overload resolution code instead of
19483 duplicating it badly.
19484
19485 Thu Feb 20 15:12:15 1997 Jason Merrill <jason@yorick.cygnus.com>
19486
19487 * call.c (build_over_call): Call mark_used before trying to elide
19488 the call.
19489
19490 * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
19491
19492 Wed Feb 19 11:18:53 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19493
19494 * typeck.c (build_modify_expr): Always pedwarn for a cast to
19495 non-reference used as an lvalue.
19496
19497 Wed Feb 19 10:35:37 1997 Jason Merrill <jason@yorick.cygnus.com>
19498
19499 * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
19500
19501 Tue Feb 18 15:40:57 1997 Jason Merrill <jason@yorick.cygnus.com>
19502
19503 * parse.y (handler): Fix template typo.
19504
19505 Sun Feb 16 02:12:28 1997 Jason Merrill <jason@yorick.cygnus.com>
19506
19507 * error.c (lang_decl_name): New fn.
19508 * tree.c (lang_printable_name): Use it.
19509
19510 Fri Feb 14 16:57:05 1997 Mike Stump <mrs@cygnus.com>
19511
19512 * g++spec.c: Include config.h so that we can catch bzero #defines
19513 from the config file.
19514
19515 Tue Feb 11 13:50:48 1997 Mike Stump <mrs@cygnus.com>
19516
19517 * new1.cc: Include a declaration for malloc, to avoid warning, and
19518 avoid lossing on systems that require one (ones that define malloc
19519 in xm.h).
19520
19521 Mon Feb 10 22:51:13 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
19522
19523 * decl2.c (max_tinst_depth): New variable.
19524 (lang_decode_option): Parse "-ftemplate-depth-NN" command line
19525 option.
19526 * pt.c (max_tinst_depth): Variable moved.
19527 * lang-options.h: Declare "-ftemplate-depth-NN" command line option
19528 as legal.
19529
19530 Fri Feb 7 15:43:34 1997 Jason Merrill <jason@yorick.cygnus.com>
19531
19532 * decl.c (xref_basetypes): Allow a base class that depends on
19533 template parms to be incomplete.
19534
19535 * decl2.c (build_expr_from_tree): Support typeid(type).
19536 * rtti.c (get_typeid): Support templates.
19537 (expand_si_desc, expand_class_desc): Fix string length.
19538 (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
19539
19540 Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
19541
19542 * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
19543
19544 * pt.c (tsubst): Put it back for -fno-ansi-overloading.
19545
19546 Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
19547
19548 * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
19549 smashes together template and non-template decls of the same
19550 signature.
19551
19552 Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
19553
19554 * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
19555
19556 Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19557
19558 * decl.c (duplicate_decls): Next route, pedwarn about different
19559 exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
19560
19561 Tue Jan 28 20:43:29 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19562
19563 * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
19564 (struct lang_type): Delete has_default_implementation member.
19565 Increase dummy to 21.
19566 * decl.c (start_method): Delete usage.
19567
19568 * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
19569 store_after_parms, start_decl_1, auto_function): Add decls.
19570 (get_arglist_len_in_bytes, declare_implicit_exception,
19571 have_exceptions_p, make_type_decl, typedecl_for_tag,
19572 store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
19573 build_component_type_expr, cplus_exception_name,
19574 {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
19575 * call.c (build_this): Make static.
19576 (is_complete): Likewise.
19577 (implicit_conversion): Likewise.
19578 (reference_binding): Likewise.
19579 (standard_conversion): Likewise.
19580 (strip_top_quals): Likewise.
19581 (non_reference): Likewise.
19582 (build_conv): Likewise.
19583 (user_harshness): Likewise.
19584 (rank_for_ideal): Likewise.
19585 * decl.c (start_decl_1): Delete forward decl.
19586 (push_decl_level): Make static.
19587 (resume_binding_level): Make static.
19588 (namespace_bindings_p): Make static.
19589 (declare_namespace_level): Make static.
19590 (lookup_name_real): Make static.
19591 (duplicate_decls): Make static. Take register off NEWDECL and
19592 OLDDECL parm decls.
19593 * decl2.c (get_sentry): Make static.
19594 (temp_name_p): Delete fn.
19595 * except.c (auto_function): Delete decl.
19596 * lex.c (handle_{cp,sysv}_pragma): Make static.
19597 (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
19598 * method.c (do_build_{copy_constructor,assign_ref}): Make static.
19599 * pt.c (tsubst_expr_values): Make static.
19600 * rtti.c (combine_strings): Delete decl.
19601
19602 Tue Jan 28 16:40:40 1997 Jason Merrill <jason@yorick.cygnus.com>
19603
19604 * pt.c (push_template_decl): Handle getting a typedef.
19605
19606 * call.c (build_new_function_call): Complain about void arg.
19607
19608 Tue Jan 28 15:25:09 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19609
19610 * decl.c (duplicate_decls): Give pedwarn of different exceptions
19611 if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
19612
19613 Mon Jan 27 19:21:29 1997 Mike Stump <mrs@cygnus.com>
19614
19615 * except.c (expand_throw): Don't expand the cleanup tree here,
19616 since we are not going to write the rtl out. Fixes problem with
19617 -g -O on SPARC.
19618
19619 Mon Jan 27 16:24:35 1997 Sean McNeil <sean@mcneil.com>
19620
19621 * Make-lang.in: Add $(exeext) as necessary.
19622
19623 Mon Jan 27 13:20:39 1997 Mike Stump <mrs@cygnus.com>
19624
19625 * parse.y (handler_seq): Must have at least one catch clause.
19626
19627 Sat Jan 25 12:00:05 1997 Jason Merrill <jason@yorick.cygnus.com>
19628
19629 * call.c (add_builtin_candidate): Restore ?: hack.
19630
19631 * decl.c (grok_op_properties): More warnings.
19632
19633 Sat Jan 25 08:50:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19634
19635 * decl.c (duplicate_decls): On second thought, do it as a pedwarn
19636 still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
19637
19638 * decl.c (duplicate_decls): Scale back to a warning, and only do
19639 'em if -pedantic.
19640
19641 Fri Jan 24 17:52:54 1997 Mike Stump <mrs@cygnus.com>
19642
19643 * decl.c (duplicate_decls): pedwarn mismatched exception
19644 specifications.
19645
19646 Thu Jan 23 18:18:54 1997 Mike Stump <mrs@cygnus.com>
19647
19648 * call.c (build_new_method_call): Don't display the invisible
19649 argument for controlling virtual bases.
19650
19651 Thu Jan 23 16:48:10 1997 Mike Stump <mrs@cygnus.com>
19652
19653 * new: Add nothrow new and delete, bad_alloc and throw specifications
19654 for delete.
19655 * decl.c (init_decl_processing): Add throw specification for delete.
19656 * new.cc (nothrow): Define.
19657 * lex.c (real_yylex): Removing warning that throw and friends are
19658 keywords.
19659 * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
19660 * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
19661 * Make-lang.in: Add new{1,2}.{cc,o}.
19662
19663 Thu Jan 23 16:39:06 1997 Jason Merrill <jason@yorick.cygnus.com>
19664
19665 * lex.c (cons_up_default_function): Fix return type of synth op=.
19666
19667 * init.c (emit_base_init): Add warnings for uninitialized members
19668 and bases.
19669
19670 * decl.c (xref_basetypes): Add warning for non-polymorphic type
19671 with destructor used as base type.
19672
19673 * decl.c (grok_op_properties): Add warning for op= returning void.
19674 * typeck.c (c_expand_return): Add warning for op= returning anything
19675 other than *this.
19676
19677 * class.c (finish_struct_1): Add warning for class with pointers
19678 but not copy ctor or copy op=.
19679
19680 * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
19681 * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
19682 (instantiate_template): If -fexternal-templates, add this
19683 instantiation to pending_templates.
19684
19685 * decl2.c (copy_assignment_arg_p): Disable old hack to support
19686 Booch components.
19687
19688 Tue Jan 21 18:32:04 1997 Mike Stump <mrs@cygnus.com>
19689
19690 * cvt.c (cp_convert): pedwarn enum to pointer conversions.
19691
19692 Mon Jan 20 17:59:51 1997 Jason Merrill <jason@yorick.cygnus.com>
19693
19694 * call.c (standard_conversion): Handle getting references. Tack
19695 on RVALUE_CONV here. Do it for non-class types, too.
19696 (reference_binding): Pass references to standard_conversion.
19697 (implicit_conversion): Likewise.
19698 (add_builtin_candidate): Disable one ?: kludge.
19699 (convert_like): Handle RVALUE_CONVs for non-class types.
19700 (joust): Disable the other ?: kludge.
19701
19702 Mon Jan 20 14:53:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19703
19704 * decl.c (init_decl_processing): Add code to build up common
19705 function types beforehand, to avoid creation then removal of
19706 things already in the hash table.
19707
19708 Mon Jan 20 14:43:49 1997 Jason Merrill <jason@yorick.cygnus.com>
19709
19710 * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
19711 the arguments.
19712
19713 * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
19714 current_template_parms.
19715
19716 Fri Jan 17 10:25:42 1997 Jason Merrill <jason@yorick.cygnus.com>
19717
19718 * search.c (lookup_field): Don't return a function, check want_type.
19719
19720 Thu Jan 16 18:14:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19721
19722 * init.c (build_new): Make sure PLACEMENT has a type.
19723
19724 Thu Jan 16 17:40:28 1997 Jason Merrill <jason@yorick.cygnus.com>
19725
19726 * init.c (build_new): Support new (nothrow).
19727
19728 Wed Jan 15 12:38:14 1997 Jason Merrill <jason@yorick.cygnus.com>
19729
19730 * pt.c (instantiate_decl): Also do push_to_top_level before setting
19731 up DECL_INITIAL.
19732
19733 * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
19734 * pt.c (tsubst): Defer instantiation of default args.
19735 * call.c (build_over_call): Until here.
19736
19737 Wed Jan 15 10:08:10 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19738
19739 * search.c (lookup_field): Make sure we have an
19740 IDENTIFIER_CLASS_VALUE before we try to return it.
19741
19742 Thu Jan 9 07:19:01 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19743
19744 * call.c (build_method_call): Delete unused var PARM.
19745 (build_overload_call_real): Likewise.
19746 (build_object_call): Delete unused var P.
19747 (build_new_op): Likewise.
19748 * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
19749 var definitions, which are never used.
19750 (shadow_tag): Delete unused var FN.
19751 * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
19752 * init.c (build_new): Delete unused var ALLOC_TEMP.
19753 * method.c (hack_identifier): Delete unused var CONTEXT.
19754 (do_build_copy_constructor): Delete unused var NAME.
19755 (synthesize_method): Delete unused var BASE.
19756 * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
19757 * rtti.c (build_headof): Delete unused var VPTR.
19758 (get_typeid): Delete unused var T.
19759 * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
19760 and ORIG_OP2.
19761 (build_ptrmemfunc): Delete unused vars U and NINDEX.
19762 * typeck2.c (build_functional_cast): Delete unused var BINFO.
19763
19764 Wed Jan 8 13:09:54 1997 Jason Merrill <jason@yorick.cygnus.com>
19765
19766 * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
19767 things in a type being defined.
19768 * decl.c (finish_enum): Reverse the values so that they are in
19769 the correct order.
19770
19771 * pt.c (instantiate_class_template): Don't initialize
19772 BINFO_BASETYPES until the vector is filled out.
19773 (unify): Don't abort on conflicting bindings, just fail.
19774 (instantiate_decl): Do push_tinst_level before any tsubsting.
19775
19776 * method.c (build_overload_value): Handle getting a
19777 TEMPLATE_CONST_PARM for a pointer.
19778
19779 Tue Jan 7 14:00:58 1997 Jason Merrill <jason@yorick.cygnus.com>
19780
19781 * init.c (expand_member_init): Don't give 'not a base' error for
19782 templates.
19783
19784 * pt.c (instantiate_decl): Call import_export_decl later.
19785
19786 * pt.c (instantiate_class_template): Return a value.
19787
19788 * parse.y (extension): New rule for __extension__.
19789 (extdef, unary_expr, decl, component_decl): Use it.
19790
19791 Tue Jan 7 09:20:28 1997 Mike Stump <mrs@cygnus.com>
19792
19793 * class.c (base_binfo): Remove unused base_has_virtual member.
19794 (finish_base_struct): Likewise.
19795 (finish_struct_1): Likewise.
19796
19797 Tue Dec 31 20:25:50 1996 Mike Stump <mrs@cygnus.com>
19798
19799 * search.c (expand_upcast_fixups): Fix bogus code generation
19800 problem where the generated code uses the wrong index into the
19801 runtime built vtable on the stack. Old code could clobber random
19802 stack values.
19803
19804 Tue Dec 31 15:16:56 1996 Mike Stump <mrs@cygnus.com>
19805
19806 * init.c (perform_member_init): Make sure the partial EH cleanups
19807 live on the function_obstack.
19808
19809 Fri Dec 27 10:31:40 1996 Paul Eggert <eggert@twinsun.com>
19810
19811 * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
19812 this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
19813
19814 Tue Dec 24 10:24:03 1996 Jeffrey A Law <law@cygnus.com>
19815
19816 * decl.c (grokvardecl): Avoid ANSI style initialization.
19817
19818 Sun Dec 22 04:22:06 1996 Jason Merrill <jason@yorick.cygnus.com>
19819
19820 * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
19821
19822 Fri Dec 20 17:09:25 1996 Jason Merrill <jason@yorick.cygnus.com>
19823
19824 * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
19825
19826 Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19827
19828 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
19829 arguments we compare against. Start the count of I at 1, not 0,
19830 since argv[0] is still the command.
19831
19832 Thu Dec 19 11:53:57 1996 Stan Shebs <shebs@andros.cygnus.com>
19833
19834 * lang-specs.h: Accept .cp as an C++ extension.
19835
19836 Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19837
19838 * cp-tree.h (ptr_reasonably_similar): Add decl.
19839
19840 Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19841
19842 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
19843 pointer. New local SPECBITS with the parm's value.
19844 (grokdeclarator): Pass &specbits down.
19845
19846 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
19847 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
19848
19849 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
19850 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
19851
19852 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
19853 not an error_mark_node.
19854
19855 Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
19856
19857 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
19858 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
19859
19860 Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
19861
19862 * decl.c (grokdeclarator): When giving an anonymous struct a name,
19863 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
19864 not affected).
19865
19866 * typeck2.c (build_m_component_ref): If component is a pointer
19867 to data member, resolve the OFFSET_REF now.
19868
19869 * call.c (convert_like): Don't go into infinite recursion.
19870
19871 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
19872
19873 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
19874 * tree.c (layout_basetypes): And on the vbase ptr.
19875
19876 Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
19877
19878 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
19879 CHAR_TYPE_SIZE so bool is always the same size as another type.
19880
19881 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
19882
19883 Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
19884
19885 * decl2.c (grok_x_components): Remove synthesized methods from
19886 TYPE_METHODS of an anonymous union, complain about member
19887 functions.
19888 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
19889 anonymous unions.
19890 (finish_function): Just clear the DECL_RTL of our arguments.
19891
19892 Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
19893
19894 * decl2.c (finish_file): Emit DWARF debugging info for static data
19895 members.
19896
19897 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
19898
19899 Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
19900
19901 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
19902 IDENTIFIER_NODE.
19903
19904 Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
19905
19906 * Make-lang.in (g++-cross$(exeext)): Fix typo.
19907
19908 Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19909
19910 Make the g++ driver now be a standalone program, rather than one
19911 that tries to run the gcc driver after munging up the options.
19912 * Make-lang.in (g++.c, g++spec.o): New rules.
19913 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
19914 added.
19915 (g++$(exeext)): New rule, based on xgcc rule.
19916 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
19917 * g++spec.c: New file.
19918 * g++.c: Removed file.
19919
19920 Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
19921
19922 * cvt.c (build_up_reference): Arrange for any temporary values
19923 that have been keep in registers until now to be put into memory.
19924
19925 Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19926
19927 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
19928 that make -j3 bootstrap works better.
19929
19930 Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
19931
19932 * decl.c (pushtag): Do pushdecl for anon tags.
19933
19934 Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
19935
19936 * typeck.c (c_expand_return): Fix logic.
19937 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
19938
19939 Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
19940
19941 * g++.c (main): Make sure arglist has a final NULL entry. Add
19942 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
19943 stdin/stdout of the invoked program are redirected to
19944 nowheresville.
19945
19946 Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
19947
19948 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
19949
19950 Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
19951
19952 * init.c (resolve_offset_ref): Handle obj.vfn better.
19953 * typeck.c (build_component_ref): Set TREE_TYPE on result from
19954 build_vfn_ref.
19955
19956 Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
19957
19958 * typeck.c (convert_for_assignment): Also handle anachronistic
19959 implicit conversions from (::*)() to cv void*.
19960 * cvt.c (cp_convert_to_pointer): Likewise.
19961
19962 Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
19963
19964 * lex.c (handle_cp_pragma): Fix bogus warning.
19965
19966 Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
19967
19968 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
19969 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
19970
19971 Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
19972
19973 * class.c (finish_struct_1): Support DWARF2_DEBUG.
19974 * search.c (dfs_debug_mark): Likewise.
19975 * decl2.c (finish_vtable_vardecl): Likewise.
19976 * decl.c (pushtag, finish_enum): Likewise.
19977 * lex.c (check_newline): Use debug_* instead of calling *out
19978 functions directly.
19979
19980 Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19981
19982 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
19983 on some picky hosts.
19984
19985 Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
19986
19987 * class.c (finish_struct_1): A class has a non-trivial copy
19988 constructor if it has virtual functions.
19989
19990 * cvt.c (cp_convert): Always call a constructor.
19991
19992 * call.c (reference_binding): Still tack on a REF_BIND
19993 for bad conversions.
19994 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
19995
19996 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
19997 (c_expand_return): Likewise.
19998 * typeck2.c (digest_init): Likewise for { }.
19999 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
20000 * cvt.c (cp_convert): Handle failure better.
20001
20002 Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20003
20004 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
20005 of GCC be path-relative.
20006
20007 Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
20008
20009 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
20010 it does need choose-temp.o and pexecute.o.
20011
20012 Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20013
20014 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
20015 that we still use it.
20016 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
20017
20018 Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
20019
20020 * init.c (expand_default_init): Avoid calling constructors to
20021 initialize reference temps.
20022
20023 * cvt.c (convert_to_reference): Fix.
20024
20025 Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
20026
20027 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
20028 (convert_to_reference): Likewise.
20029 * typeck.c (convert_for_initialization): Likewise.
20030 * init.c (expand_default_init): Likewise.
20031 (expand_aggr_init_1): Likewise.
20032 * cp-tree.h (CONV_NONCONVERTING): Lose.
20033 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
20034 * *.c: Adjust.
20035 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
20036
20037 Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
20038
20039 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
20040
20041 Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
20042
20043 * init.c (expand_aggr_init_1): Don't crash on non-constructor
20044 TARGET_EXPR.
20045
20046 Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20047
20048 * g++.c: Include gansidecl.h.
20049 (VPROTO, PVPROTO, VA_START): Delete.
20050 (choose_temp_base_try, choose_temp_base, perror_exec,
20051 run_dos) [__MSDOS__]: Delete fns.
20052 (pfatal_with_name): Delete fn.
20053 (temp_filename): Declare like in gcc.c.
20054 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
20055 (error_count, signal_count): Define.
20056 (error): Delete both definitions.
20057 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
20058 (pfatal_pexecute): Add fn from gcc.c.
20059 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
20060 code to use the pexecute stuff also used by gcc.c.
20061 (MIN_FATAL_STATUS): Define.
20062 * Make-lang.in (g++): Add dependency on and linking with
20063 choose-temp.o and pexecute.o.
20064
20065 * cp-tree.h: Include gansidecl.h.
20066 (STDIO_PROTO): Delete #undef/#define.
20067 * cvt.c (NULL): Delete #undef/#define.
20068 * expr.c (NULL): Likewise.
20069 * init.c (NULL): Likewise.
20070 * rtti.c (NULL): Likewise.
20071 * xref.c (NULL): Likewise.
20072
20073 * cp-tree.h (build_user_type_conversion): Add prototype.
20074 * call.c (build_user_type_conversion): Delete prototype. Correct
20075 decl of FLAGS arg to be an int.
20076 * cvt.c (build_user_type_conversion): Likewise.
20077
20078 Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
20079
20080 * cp-tree.def: Add TRY_BLOCK and HANDLER.
20081 * except.c (expand_start_catch_block): Support templates.
20082 * parse.y (try_block, handler_seq): Likewise.
20083 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
20084
20085 Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
20086
20087 * pt.c (current_template_args): New fn.
20088 (push_template_decl): Use it.
20089 * decl.c (grokdeclarator): Use it.
20090
20091 * decl2.c (build_expr_from_tree): Dereference ref vars.
20092
20093 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
20094 the decl-specifier-seq.
20095
20096 * decl.c (grok_op_properties): Don't force the type of a conversion
20097 op to be complete. Don't warn about converting to the same type
20098 for template instantiations.
20099
20100 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
20101 methods.
20102
20103 Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
20104
20105 * typeck.c (get_delta_difference): Remove previous bogusness.
20106 Don't give errors if force is set.
20107
20108 Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
20109
20110 * decl2.c (finish_file): Don't emit debug info.
20111 * decl.c (pushdecl): Lose obsolete code.
20112 (grokdeclarator): Still do the long long thing after complaining.
20113 * search.c (note_debug_info_needed): Don't do anything if we're in a
20114 template.
20115 * method.c (synthesize_method): For non-local classes,
20116 push_to_top_level first.
20117
20118 Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
20119
20120 * typeck.c (get_delta_difference): Add no_error parameter.
20121 (build_ptrmemfunc): Call get_delta_difference with no_error set;
20122 we don't want error messages when converting unrelated
20123 pointer-to-member functions.
20124
20125 Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
20126
20127 * error.c (dump_expr): Improve the wording on error messages that
20128 involve pointer to member functions.
20129
20130 Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
20131
20132 * cvt.c (cp_convert_to_pointer): Move code for conversions from
20133 (::*)() to void* or (*)() up a bit, so that we can convert from
20134 METHOD_TYPEs as well.
20135
20136 Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
20137
20138 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
20139 There are no 'member' types.
20140 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
20141 (build_x_typeid): Handle errors.
20142
20143 Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
20144
20145 * typeck.c (convert_for_assignment): Handle anachronistic implicit
20146 conversions from (::*)() to void* or (*)().
20147 * cvt.c (cp_convert_to_pointer): Likewise.
20148 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
20149 conversions from here.
20150 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
20151 * lang-options.h: Likewise.
20152 * decl2.c (warn_pmf2ptr): Define.
20153 * cp-tree.h: Declare it.
20154 * typeck2.c (digest_init): Allow pmfs down into
20155 convert_for_initialization.
20156
20157 Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
20158
20159 * typeck.c (c_expand_return): Fix for returning overloaded fn.
20160
20161 Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
20162
20163 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
20164 * decl.c (grok_reference_init): Pass DIRECT_BIND.
20165 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
20166 DIRECT_BIND.
20167 * call.c (convert_like): Don't pass INDIRECT_BIND.
20168 * typeck.c (convert_arguments): Likewise.
20169 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
20170
20171 Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
20172
20173 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
20174 similar code in build_up_ref.
20175 * cvt.c (build_up_reference): Drastically simplify.
20176
20177 Mon Oct 28 12:45:05 1996 Jeffrey A Law <law@cygnus.com>
20178
20179 * typeck.c (signed_or_unsigned_type): If the given type already
20180 as the correct signedness, then just return it.
20181
20182 * typeck.c ({un,}signed_type): If can't do anything, call
20183 signed_or_unsigned_type.
20184
20185 Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
20186
20187 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
20188 current_class_type is NULL.
20189
20190 Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
20191
20192 * class.c (finish_struct_1): Avoid empty structs by adding a field
20193 so layout_type gets the mode right.
20194
20195 * typeck.c (c_expand_return): Drastically simplify.
20196
20197 Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
20198
20199 * typeck.c (decay_conversion): Handle overloaded methods.
20200
20201 Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
20202
20203 * call.c (build_over_call): A TARGET_EXPR has side-effects.
20204
20205 Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
20206
20207 * cvt.c (convert_to_pointer_force): Add code to support pointer to
20208 member function to pointer to function conversions.
20209 * init.c (resolve_offset_ref): Add code to allow faked up objects,
20210 ignoring them if they are not used, and giving an error, if they
20211 are needed.
20212 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
20213 code, and so that we can give an error, if we needed an object,
20214 and one was not provided.
20215 (build_c_cast): Don't call default_conversion when we want to
20216 convert to pointer to function from a METHOD_TYPE.
20217
20218 Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
20219
20220 * Make-lang.in (cplib2.ready): Fix logic.
20221
20222 * decl.c (shadow_tag): Only complain about non-artificial function
20223 members.
20224
20225 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
20226
20227 Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
20228
20229 * expr.c (cplus_expand_expr): Pre-tweak call_target like
20230 expand_inline_function would.
20231
20232 * pt.c (mark_decl_instantiated): If extern_p, call
20233 mark_inline_for_output.
20234
20235 Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
20236
20237 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
20238 pmd conversions.
20239
20240 * typeck.c (get_delta_difference): Fix wording, as we can be used
20241 for pointer to data members.
20242
20243 Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
20244
20245 * pt.c (tsubst): If the function decl isn't a member of this
20246 template, return a copy of the decl (including copying the
20247 lang-specific part) so we don't hose ourselves later.
20248
20249 Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
20250
20251 * class.c (finish_struct): Remove DWARF-specific tag handling.
20252 * decl.c (pushtag): Likewise.
20253 (finish_function): Always clear DECL_ARGUMENTS on function decls with
20254 no saved RTX.
20255 * decl2.c (finish_file): Emit DWARF debugging info for static data
20256 members.
20257
20258 Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
20259
20260 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
20261 isn't the same as the new one before we whack it.
20262
20263 Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
20264
20265 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
20266 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
20267 warn_traditional and warn_strict_prototypes; remove ancient
20268 'overload' code; remove references to flag_traditional.
20269
20270 Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
20271
20272 * input.c (sub_getch): Handle 8-bit characters in string literals.
20273
20274 Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
20275
20276 * tree.c (mapcar): Handle CONSTRUCTORs.
20277 (copy_to_permanent): Handle expression_obstack properly.
20278
20279 * Make-lang.in (cplib2.txt): Also depend on the headers.
20280
20281 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
20282 INT_TYPE_SIZE.
20283 (expand_class_desc): Use USItype for offset field.
20284 * tinfo.h (struct __class_type_info): Likewise.
20285
20286 * method.c (build_overload_int): TYPE_PRECISION should be applied
20287 to types.
20288
20289 Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
20290
20291 * call.c (build_new_op): A COND_EXPR involving void must be a
20292 builtin.
20293
20294 Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
20295
20296 * typeck.c (build_x_component_ref): New fn.
20297 (build_object_ref): Use it.
20298 * parse.y (primary): Use it.
20299 * decl2.c (build_expr_from_tree): Use it.
20300 * cp-tree.h: Declare it.
20301
20302 * decl.c (start_decl): Variable-sized arrays cannot be initialized.
20303 * error.c (dump_type_suffix): Handle variable arrays.
20304
20305 Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20306
20307 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
20308
20309 Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
20310
20311 * decl.c (lookup_name_real): Don't try to look up anything in a
20312 TYPENAME_TYPE.
20313
20314 * tinfo2.cc (__throw_type_match_rtti): Oops.
20315
20316 Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20317
20318 * Make-lang.in (exception.o): Use -fno-PIC for now.
20319
20320 Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
20321
20322 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
20323 calling them.
20324 (get_tinfo_fn_dynamic): Extracted from build_typeid.
20325 * tinfo2.cc (__dynamic_cast): Adjust.
20326
20327 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
20328 (build_x_typeid): Likewise.
20329
20330 * parse.y: Call build_x_typeid instead of build_typeid.
20331 * cp-tree.def: Add TYPEID_EXPR.
20332 * pt.c (tsubst_copy): Handle typeid.
20333 * decl2.c (build_expr_from_tree): Likewise.
20334 * rtti.c (build_x_typeid): Throw bad_typeid from here.
20335 (build_typeid): Not here.
20336 * cp-tree.h: Declare build_x_typeid.
20337
20338 Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
20339
20340 * call.c (convert_like): Pull out constant values.
20341
20342 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
20343
20344 Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
20345
20346 * decl.c (init_decl_processing): Create short int types before
20347 creating size_t in case a machine description needs to use
20348 unsigned short for size_t.
20349
20350 Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
20351
20352 * Make-lang.in (exception.o): Turn off pic.
20353
20354 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
20355 type, multi-level ptr conversions.
20356
20357 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
20358 (throw_bad_cast): Use it.
20359 (throw_bad_typeid): New fn.
20360 (build_typeid): Throw bad_typeid as needed.
20361 Use build_call.
20362 (synthesize_tinfo_fn): Handle functions and arrays before checking
20363 for cv-quals.
20364
20365 * Remove .h from standard C++ headers, add new.h, move into inc
20366 subdirectory.
20367
20368 * exception*: Remove pointer from object, constructors. Add
20369 default exception::what that uses type_info::name. Add
20370 __throw_bad_typeid.
20371
20372 * init.c (build_new): Don't add a cookie to new (void *) T[2].
20373
20374 Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
20375
20376 * Make-lang.in: Building C++ code depends on cc1plus.
20377
20378 Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20379
20380 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
20381 a HOST_WIDE_INT, not a tree.
20382
20383 Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
20384
20385 * exception.cc: Don't include <stdlib.h>.
20386
20387 * Make-lang.in (c++.clean): Remove cplib2.*.
20388
20389 Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
20390
20391 * parse.y (component_decl_1, component_costructor_declarator case):
20392 Pass attributes/prefix_attributes in tree list.
20393
20394 Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
20395
20396 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
20397
20398 Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
20399
20400 * lex.c (do_identifier): Don't do deferred lookup in a template
20401 header.
20402
20403 * typeck2.c (store_init_value): Oops.
20404
20405 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
20406 New files for C++ lang-support library.
20407 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
20408 (CXX_LIB2FUNCS): Define.
20409 And rules for building the C++ lang-support code.
20410 * config-lang.in (headers): Define.
20411 (lib2funcs): Define.
20412
20413 Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
20414
20415 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
20416 digest_init.
20417 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
20418 * typeck2.c (store_init_value): Check for initializing pmf with { }
20419 here.
20420 (process_init_constructor): Not here.
20421
20422 Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
20423
20424 * pt.c (begin_template_parm_list): Increment
20425 processing_template_decl here.
20426 (end_template_parm_list): Not here.
20427 (process_template_parm): No need to add 1 to it now.
20428 * *.c: Use processing_template_decl instead of current_template_parms
20429 to check for being in a template.
20430
20431 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
20432 (tsubst_copy): Handle CONSTRUCTOR.
20433 (instantiate_decl): Set up context properly for variables.
20434 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
20435 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
20436
20437 Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20438
20439 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
20440
20441 Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
20442
20443 * method.c (make_thunk): Call comdat_linkage before setting the
20444 TREE_CODE.
20445
20446 * decl2.c (comdat_linkage): Use make_decl_one_only.
20447 (import_export_decl): Likewise.
20448 * decl.c (init_decl_processing): Check supports_one_only instead of
20449 SUPPORTS_WEAK.
20450
20451 Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
20452
20453 * decl2.c (grokfield): Tighten checking for access decls.
20454
20455 * decl.c (make_typename_type): Resolve references to
20456 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
20457 (lookup_name_real): Types that depend on a template parameter get
20458 an implicit 'typename' unless they're in the current scope.
20459 (start_decl_1): We don't care about incomplete types that depend
20460 on a template parm.
20461 (grokdeclarator): Resolve 'typename's in the type specifier that
20462 refer to members of the current scope.
20463
20464 * call.c (build_over_call): Remove 'inline called before
20465 definition' diagnostic.
20466 (build_method_call): Likewise.
20467 * decl.c (duplicate_decls): Downgrade 'used before declared
20468 inline' to a warning, only with -Winline.
20469
20470 Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
20471
20472 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
20473
20474 Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
20475
20476 * call.c (build_method_call): When calling a signature
20477 default implementation, as in other cases, let instance_ptr simply
20478 be instance.
20479
20480 Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
20481
20482 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
20483
20484 Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
20485
20486 * except.c (expand_start_catch_block): Add a pushlevel so that -g
20487 works on hppa and SPARC.
20488
20489 Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20490
20491 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
20492
20493 Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
20494
20495 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
20496 before testing whether it's a signature.
20497
20498 Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
20499
20500 * call.c (build_new_method_call): Don't complain about signature
20501 pointers and references not being an aggr type.
20502 (build_this): If a signature pointer or reference was passed in,
20503 just return it.
20504 (build_new_method_call): If instance is a signature pointer, set
20505 basetype to the signature type of instance.
20506 * sig.c (build_signature_method_call): Deleted basetype and
20507 instance parameters, they can be found as the DECL_CONTEXT of
20508 function and as the first argument passed in.
20509 * cp-tree.h: Changed declaration of build_signature_method_call.
20510 * call.c (build_method_call): Deleted first two arguments in call
20511 of build_signature_method_call.
20512 (build_over_call): Added call to build_signature_method_call.
20513
20514 Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
20515
20516 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
20517 target_expr.
20518
20519 Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20520
20521 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
20522
20523 Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
20524
20525 * except.c (expand_start_try_stmts): Move to except.c in the backend.
20526 (expand_end_try_stmts): Remove.
20527
20528 * init.c (perform_member_init): Use add_partial_entry () instead
20529 of directly manipulating lists.
20530 (emit_base_init): Likewise.
20531
20532 Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
20533
20534 * except.c (expand_exception_blocks): Always make sure USE and
20535 CLOBBER insns that came at the end still do, the backend relies
20536 upon this.
20537
20538 Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
20539
20540 * call.c (build_over_call): We can only use a TARGET_EXPR of the
20541 right type.
20542
20543 Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
20544
20545 * cvt.c (convert_to_reference): Revert last change, don't complain
20546 about temp without target decl.
20547
20548 Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
20549
20550 * decl.c (grokdeclarator): Don't core dump when void() is given.
20551
20552 Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
20553
20554 * decl.c (copy_args_p): Don't crash.
20555
20556 Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
20557
20558 * pt.c (tsubst): And support template args inside the exception
20559 specification.
20560
20561 * pt.c (tsubst): Add support for exception specifications in
20562 template functions.
20563
20564 Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
20565
20566 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
20567 fields now.
20568 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
20569 (start_function): Likewise.
20570 (start_method): Likewise.
20571 (grokfield): Likewise.
20572 (make_call_declarator): Add throw spec parameter.
20573 (set_quals_and_spec): Add routine.
20574 * lex.c (set_quals_and_spec): Likewise.
20575 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
20576 * decl.c (shadow_tag): Eliminate the throw spec parameter to
20577 grokdeclarator.
20578 (groktypename): Likewise.
20579 (start_decl): Eliminate the throw spec parameter. Eliminate the
20580 throw spec parameter to grokdeclarator. Eliminate the throw spec
20581 field in DECL_STMT.
20582 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
20583 (grokfndecl): Remove useless set of raises.
20584 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
20585 the throw spec parameter to start_decl. Pull the throw spec out
20586 of the call declarator.
20587 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
20588 (start_function): Eliminate the throw spec parameter. Eliminate
20589 the throw spec parameter to grokdeclarator.
20590 (start_method): Likewise.
20591 * decl2.c (grokfield): Likewise.
20592 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
20593 (grokoptypename): Likewise.
20594 (finish_file): Eliminate the throw spec parameter to
20595 start_function. Add throw spec to make_call_declarator.
20596 * except.c (init_exception_processing): Add throw spec to
20597 make_call_declarator. Eliminate the throw spec parameter to
20598 start_decl.
20599 (expand_start_catch_block): Eliminate the throw spec parameter to
20600 grokdeclarator.
20601 (expand_builtin_throw): Add throw spec to make_call_declarator.
20602 Eliminate the throw spec parameter to start_function.
20603 (start_anon_func): Likewise.
20604 * lex.c (make_call_declarator): Add throw spec parameter.
20605 (set_quals_and_spec): New routine.
20606 (cons_up_default_function): Add throw spec to make_call_declarator.
20607 Eliminate the throw spec parameter to grokfield.
20608 * method.c (synthesize_method): Eliminate the throw spec parameter
20609 to start_function.
20610 * pt.c (process_template_parm): Eliminate the throw spec parameter
20611 to grokdeclarator.
20612 (tsubst): Add throw spec to make_call_declarator.
20613 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
20614 (do_function_instantiation): Eliminate the throw spec parameter to
20615 grokdeclarator. Eliminate the throw spec parameter to
20616 start_function.
20617 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
20618 to start_function.
20619 * parse.y (datadef): Remove non-winning optimization.
20620 (decl): Likewise.
20621 (fndef): Remove ambiguous error productions uncovered by grammar
20622 fixing.
20623 (constructor_declarator): Add exception_specification_opt here.
20624 (component_constructor_declarator): Likewise.
20625 (direct_after_type_declarator): Likewise.
20626 (complex_direct_notype_declarator): Likewise.
20627 (direct_abstract_declarator): Likewise.
20628 (fn.def1): Remove exception_specification_opt.
20629 (fn.def2): Likewise.
20630 (condition): Likewise.
20631 (initdcl0): Likewise.
20632 (initdcl): Likewise.
20633 (notype_initdcl0): Likewise.
20634 (nomods_initdcl0): Likewise.
20635 (component_decl_1): Likewise.
20636 (component_declarator): Likewise.
20637 (after_type_component_declarator0): Likewise.
20638 (after_type_component_declarator): Likewise.
20639 (notype_component_declarator): Likewise.
20640
20641 Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
20642
20643 * call.c (build_over_call): Also use an INIT_EXPR when
20644 initializing anything from an rvalue.
20645
20646 * call.c (build_over_call): Call stabilize_reference when building
20647 an INIT_EXPR instead of calling the copy ctor.
20648
20649 * call.c (joust): Extend the previous change to all comparisons.
20650
20651 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
20652 NO_LINKAGE_HEURISTICS.
20653
20654 * decl2.c (finish_file): Emit any statics that weren't already.
20655
20656 * typeck.c (build_static_cast): Implement.
20657 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
20658 * decl.c (grokparms): Use can_convert_arg instead of
20659 implicit_conversion directly.
20660 (copy_args_p): New fn.
20661 * cvt.c (convert_to_reference): Don't complain about temp with
20662 static_cast.
20663 (build_up_reference): Handle TARGET_EXPRs.
20664 * call.c (build_over_call): Elide unnecessary temps.
20665 (can_convert*): Use new overloading code.
20666
20667 Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
20668
20669 * call.c: Move TYPE_PTR*_MACROS ...
20670 * cp-tree.h: To here.
20671 * typeck.c (build_reinterpret_cast): Implement.
20672
20673 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
20674 ptr_complete_ob.
20675 (joust): If we're comparing a function to a builtin and the worst
20676 conversion for the builtin is worse than the worst conversion for the
20677 function, take the function.
20678
20679 * typeck.c (build_const_cast): Implement.
20680 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
20681 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
20682
20683 Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
20684
20685 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
20686 too early. Make sure we explode if exprtype turns out to be a
20687 NULL_TREE when it shouldn't be.
20688
20689 Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
20690
20691 * cp-tree.h: New routine make_call_declarator.
20692 * lex.c (make_call_declarator): Define it.
20693 * except.c (init_exception_processing): Use it.
20694 (expand_builtin_throw): Likewise.
20695 (start_anon_func): Likewise.
20696 * decl2.c (finish_file): Likewise.
20697 * lex.c (cons_up_default_function): Likewise.
20698 * parse.y: Likewise.
20699 * pt.c (tsubst): Likewise.
20700
20701 Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
20702
20703 * decl2.c (groktypefield): Remove unused code.
20704
20705 Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
20706
20707 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
20708 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
20709 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
20710 nonempty_cv_qualifiers.
20711 * hash.h: Rebuild.
20712
20713 * lex.c (make_pointer_declarator): Change type_quals into
20714 cv_qualifiers.
20715 (make_reference_declarator): Likewise.
20716
20717 Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
20718
20719 * decl.c (start_function): Only check interface_* for templates
20720 with flag_alt_external_templates.
20721
20722 * call.c (build_new_op): Check for comparison of different enum types.
20723 (build_over_call): Fix arg # output.
20724
20725 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
20726
20727 Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
20728
20729 * call.c (build_new_op): Check for erroneous args.
20730
20731 * call.c (build_new_method_call): Add missing args to cp_error.
20732
20733 * tree.c (error_type): Don't print reference-to-array.
20734
20735 * typeck.c (convert_for_assignment): Don't say contravariance for
20736 removing const.
20737
20738 Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
20739
20740 * call.c (build_over_call): Diagnose bad convs for `this'.
20741
20742 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
20743 on _ctor_arg.
20744
20745 * call.c (convert_like): Handle bad convs.
20746 (build_over_call): Handle bad convs better.
20747
20748 * decl2.c: -fansi-overloading is now the default.
20749
20750 * call.c (build_new_method_call): Check for erroneous args.
20751
20752 * pt.c (instantiate_class_template): Propagate
20753 TYPE_USES_MULTIPLE_INHERITANCE.
20754
20755 Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
20756
20757 * call.c (enforce_access): Add static to routine.
20758
20759 Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
20760
20761 * call.c (build_user_type_conversion_1): Fix bad handling.
20762 (compare_ics): Likewise.
20763
20764 Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
20765
20766 * call.c (standard_conversion): Oops.
20767
20768 Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
20769
20770 * g++.c: Update test for win32 (&& ! cygwin32).
20771
20772 Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
20773
20774 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
20775 (ptr_reasonably_similar): New fn.
20776 * call.c (BAD_RANK): New rank.
20777 (ICS_BAD_FLAG): New macro.
20778 (standard_conversion): Handle almost-right pointer conversions.
20779 (reference_binding): Handle bad rvalue bindings.
20780 (add_*_candidate): Stuff.
20781 (build_over_call): Pass bad conversions to convert_for_initialization.
20782 (compare_ics): Handle bad convs.
20783 (joust): Likewise.
20784
20785 Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
20786
20787 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
20788 integer_type_node when computing pointer offsets.
20789
20790 Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
20791
20792 * tree.c (lvalue_type): New fn.
20793 (error_type): New fn.
20794 * call.c (op_error): Use error_type.
20795 (add_conv_candidate): Use lvalue_type.
20796 (add_builtin_candidates): Likewise.
20797 * error.c (args_as_string): Use error_type.
20798
20799 Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
20800
20801 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
20802 (tsubst): Not here.
20803
20804 * decl.c (init_decl_processing): With -ansi, __null's type is the
20805 signed integral type with the same number of bits as a pointer.
20806 Introduce a new variable null_node for it.
20807 * cp-tree.h: Adjust.
20808 * call.c (null_ptr_cst_p): Adjust.
20809
20810 Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
20811
20812 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
20813 optimize.
20814
20815 Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
20816
20817 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
20818 fns of classes without virtual functions.
20819
20820 * call.c (add_function_candidate): Handle `this' specially.
20821 (compare_ics): Likewise.
20822
20823 Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
20824
20825 * typeck.c (build_conditional_expr): Fix handling of __null.
20826
20827 * decl2.c (comdat_linkage): New fn.
20828 (import_export_vtable): Use it.
20829 (import_export_decl): Use it.
20830 * method.c (make_thunk): Use it.
20831
20832 Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
20833
20834 * pt.c (end_template_decl): If we don't actually have parms, return.
20835 * parse.y (template_header): Accept 'template <>'.
20836
20837 * errfn.c: Allow 5 args.
20838
20839 Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
20840
20841 * tree.c (make_temp_vec): New fn.
20842 * pt.c (push_template_decl): Handle partial specs.
20843 (instantiate_class_template): Likewise.
20844 (more_specialized): Use get_bindings.
20845 (more_specialized_class): New fn.
20846 (get_class_bindings): New fn.
20847 (most_specialized_class): New fn.
20848 (do_function_instantiation): List candidates for ambiguous case.
20849 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
20850 (shadow_tag): Call push_template_decl for partial specializations.
20851 * parse.y: Likewise.
20852 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
20853 DECL_TEMPLATE_MEMBERS.
20854 * call.c (print_z_candidates): Reduce duplication.
20855
20856 Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
20857
20858 * decl2.c (lang_decode_option): Allow -fansi-overloading.
20859
20860 Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
20861
20862 * pt.c (get_bindings): New fn.
20863 (most_specialized): Likewise.
20864 (do_function_instantiation): Use them.
20865 (add_maybe_template): New fn.
20866 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
20867 * call.c (build_new_op): Handle guiding decls.
20868 (build_new_function_call): Likewise.
20869 * decl2.c (finish_file): Likewise.
20870
20871 * decl2.c (mark_used): Do synthesis here.
20872 * call.c (build_method_call): Not here.
20873 (build_over_call): Or here.
20874 * typeck.c (build_function_call_real): Or here.
20875 * tree.c (bot_manip): Call mark_used on functions used in default
20876 args.
20877
20878 Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
20879
20880 * decl2.c (import_export_vtable): Delete code that disabled vtable
20881 heuristic on systems with ASM_OUTPUT_EXTERNAL.
20882
20883 Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
20884
20885 * typeck.c (build_x_function_call): Handle static call context
20886 better.
20887
20888 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
20889 the function, not its outer block.
20890
20891 * call.c (build_field_call): Pass fields on to build_opfncall
20892 regardless of TYPE_OVERLOADS_CALL_EXPR.
20893 (build_method_call): Pass on to build_new_method_call sooner.
20894
20895 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
20896 gives us.
20897 * class.c (instantiate_type): Don't put a POINTER_TYPE to
20898 METHOD_TYPE on an expression. Also make a copy of rhs instead of
20899 modifying it.
20900
20901 Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
20902
20903 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
20904 (add_builtin_candidate): Don't take enums for ++.
20905 (build_new_method_call): Handle non-aggregates and field calls.
20906 Move new overloading code from...
20907 * cvt.c: Here.
20908
20909 * decl.c (grokparms): Don't check default args in templates.
20910
20911 Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
20912
20913 * cvt.c (build_new_op): Fix args to build_unary_op.
20914 (add_builtin_candidates): Don't call type_promotes_to on float.
20915
20916 * decl.c (grokparms): Check the type of the default arg.
20917
20918 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
20919 returning NULL_TREE.
20920
20921 * typeck.c (build_x_binary_op): Avoid doing extra work.
20922 (build_x_unary_op): Likewise.
20923 (build_x_conditional_expr): Likewise.
20924 * cvt.c (build_over_call): Return.
20925 (add_builtin_candidate): Fix MEMBER_REF.
20926 (build_new_op): Likewise.
20927
20928 Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
20929
20930 * method.c (build_overload_name): Put bug fix into code but leave
20931 disabled for now so we can be bug compatible with older releases
20932 that do repeats incorrectly. In the future, we can enable it.
20933
20934 Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
20935
20936 * cvt.c (convert_like): Don't call build_cplus_new twice.
20937
20938 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
20939 Control new overloading code with -fansi-overloading.
20940
20941 Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
20942
20943 * cvt.c (build_over_call): Call build_cplus_new.
20944 * call.c (build_method_call): Likewise.
20945 * typeck.c (build_function_call_real): Likewise.
20946 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
20947 the COND_EXPR in a TARGET_EXPR so they use the same slot.
20948
20949 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
20950 recursive calls.
20951 * typeck.c (complete_type): Propagate
20952 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
20953
20954 Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
20955
20956 * cvt.c (joust): More ?: kludging. Sigh.
20957 (build_over_call): Don't try to synthesize global fns.
20958
20959 * search.c (lookup_conversions): Use binfo marking.
20960
20961 Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
20962
20963 * search.c (build_mi_matrix): Use the correct value of cid
20964 when determining the new mi_size.
20965
20966 Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
20967
20968 * cvt.c (add_builtin_candidates): Do consider type conversion ops
20969 for the first parms of += et al.
20970 (strip_top_quals): New fn.
20971 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
20972 (implicit_conversion): Likewise.
20973 (add_builtin_candidates): Be careful about arrays.
20974 (build_new_method_call): Handle vtable optimization.
20975
20976 Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
20977
20978 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
20979 * cvt.c (reference_binding): Use it.
20980 (implicit_conversion): Use it.
20981 (add_builtin_candidate, COND_EXPR): Use it.
20982
20983 * cvt.c (build_new_function_call): Check for error args.
20984
20985 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
20986
20987 * gxx.gperf: Add __null.
20988 * hash.h: Regenerate.
20989 * lex.h: Add RID_NULL.
20990 * lex.c (init_lex): Create null_pointer_node here, stick it in
20991 RID_NULL.
20992 * decl.c (init_decl_processing): Still set its type here.
20993 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
20994 (convert_to_pointer_force): Likewise.
20995 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
20996 if (! pedantic).
20997 * call.c (convert_harshness): Use null_ptr_cst_p.
20998 * typeck.c (convert_for_assignment): Likewise. Don't produce
20999 null_pointer_node.
21000
21001 * error.c (args_as_string): Handle lists of actual args, too.
21002 * cvt.c (null_ptr_cst): Support (void*)0 for now.
21003 (build_user_type_conversion_1): Improve diagnostics.
21004 (build_new_function_call): Likewise.
21005 (build_object_call): Likewise.
21006 (build_new_method_call): Likewise. Move call before def diagnostic...
21007 (build_over_call): Here.
21008
21009 * cvt.c (build_new_method_call): Don't complain about no match if
21010 LOOKUP_SPECULATIVELY.
21011 (build_over_call): Fix 'this' for virtual fn.
21012 (build_new_method_call): Add diagnostic.
21013
21014 Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
21015
21016 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
21017 constructors to be passed in.
21018 (build_over_call): Likewise.
21019 (build_user_type_conversion_1): Pass them in.
21020 (convert_like): Likewise.
21021 (build_object_call): Handle overloaded conversions.
21022 (build_over_call): Pass the right args to build_vfn_ref.
21023 (standard_conversion): Fix pmf convs.
21024 (joust): Handle comparing statics and non-statics.
21025 (build_new_method_call): New fn.
21026 * call.c (build_method_call): Call it if NEW_OVER.
21027
21028 Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
21029
21030 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
21031 %D instead.
21032
21033 Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
21034
21035 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
21036 instead of just maybe_build_cleanup so that we deallocate the
21037 thrown object.
21038
21039 Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21040
21041 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
21042 * cp-tree.h (finish_prevtable_vardecl): Add decl.
21043
21044 Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
21045
21046 * pt.c (instantiate_class_template): Call complete_type. Also, if
21047 we're at the end of the file and we just instantiated a template
21048 class with a vtable, call finish_prevtable_vardecl.
21049
21050 * error.c (dump_decl): Don't explode (or explode more gracefully
21051 as appropriate) if the object being dumped has a null type.
21052 (dump_expr): Likewise.
21053
21054 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
21055 by counting the number of nodes that we'll need before allocating
21056 the array.
21057 (lookup_fnfields): Fix comment.
21058 (breadth_first_search): Fix comment.
21059
21060 Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
21061
21062 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
21063 TYPE_ALIGN.
21064 * class.c (finish_struct): Call cplus_decl_attributes here.
21065 (finish_struct_1): Not here.
21066 * cp-tree.h: Adjust.
21067
21068 * pt.c (type_unification): New parameter STRICT.
21069 (unify): If STRICT, don't allow cv addition or base deduction.
21070 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
21071
21072 Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
21073
21074 * search.c (get_template_base{_recursive}): New fns.
21075 * pt.c (more_specialized): New fn.
21076 (do_function_instantiation): Use it.
21077 (unify): Handle base deduction.
21078 * cvt.c (joust): Use more_specialized.
21079 Don't arbitrarily choose between non-builtin candidates.
21080 (build_over_call): Call require_complete_type.
21081
21082 * decl.c (start_function): Statics are static even in a #pragma
21083 interface file.
21084
21085 * decl2.c (import_export_vtable): Disable vtable heuristic on
21086 systems with ASM_OUTPUT_EXTERNAL.
21087
21088 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
21089 (standard_conversion): No std conv to enum type.
21090
21091 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
21092 for ptm's.
21093
21094 * cvt.c (reference_binding): Bind directly to a base subobject of
21095 a class rvalue.
21096
21097 * cvt.c (build_new_op): Enforce access control.
21098
21099 Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
21100
21101 * typeck2.c (process_init_constructor): When scanning the
21102 union for a named field, skip things that aren't FIELD_DECLs.
21103
21104 * method.c (synthesize_method): Don't scan fndecl's rtl if
21105 we're at the end of the file; just assume the function can't
21106 be inlined.
21107
21108 Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
21109
21110 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
21111 it failed.
21112
21113 * cvt.c (build_user_type_conversion_1): Handle overloaded
21114 conversion ops.
21115
21116 * cvt.c (add_builtin_candidates): Don't consider type conversion
21117 operators for the first parameter of operator=.
21118
21119 Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
21120
21121 * typeck.c (complete_type): Only call layout_type if we're not
21122 expanding a template.
21123
21124 Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
21125
21126 * cvt.c (compare_ics): Oops.
21127
21128 * cvt.c (op_error): Oops.
21129
21130 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
21131 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
21132 (build_conv): Use them.
21133 (implicit_conversion): Use them.
21134 (convert_like): Handle them.
21135 (build_new_op): Handle builtin COND_EXPR again.
21136 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
21137 in lists of types for COND_EXPR.
21138 (add_builtin_candidate): Add enum candidates for COND_EXPR.
21139
21140 Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
21141
21142 * typeck.c (build_modify_expr): Always attempt to build a call to
21143 the assignment operator, even if we're using a default one.
21144 (convert_for_initialization): Call complete_type.
21145
21146 Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
21147
21148 * cvt.c (reference_binding): A REF_BIND gets the reference type.
21149 (implicit_conversion): Likewise.
21150 (convert_like): Likewise.
21151 (compare_ics): Likewise.
21152 (compare_qual): Likewise.
21153 (print_z_candidates): Handle no candidates.
21154 (build_new_op): Don't handle builtin COND_EXPR for now.
21155
21156 Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
21157
21158 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
21159
21160 Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
21161
21162 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
21163
21164 * cvt.c (build_builtin_candidate): Oops.
21165 (build_new_op): Oops.
21166
21167 * method.c (build_opfncall): Pass COND_EXPR on.
21168 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
21169 (add_builtin_candidate{,s}): Likewise.
21170 (add_builtin_candidates): Likewise.
21171 (print_z_candidates, op_error, build_new_op): Likewise.
21172 (type_decays_to): New fn.
21173 * lex.c (init_lex): Just say ?: for COND_EXPR.
21174
21175 Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
21176
21177 * typeck.c (complete_type): Call layout_type rather than building
21178 a new array type.
21179
21180 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
21181 only use ptrdiff_t.
21182
21183 Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
21184
21185 * cvt.c: Always compile the new overloading code (but don't use it).
21186 (implicit_conversion): Add a BASE_CONV when converting to
21187 the same class type.
21188 (convert_like): Handle BASE_CONV.
21189
21190 Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
21191
21192 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
21193 (add_builtin_candidate): Likewise.
21194
21195 NEW_OVER changes:
21196 * typeck.c (build_x_function_call): Try an operator function
21197 whenever we call an object of class type.
21198 * method.c (build_opfncall): Pass CALL_EXPRs through.
21199 * cvt.c (implicit_conversion): Do const-ref case first.
21200 (add_conv_candidate, build_object_call, op_error): New fns.
21201 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
21202 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
21203 builtin candidates.
21204 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
21205 Fall back on preincrement handling. Use op_error.
21206 Handle warn_synth.
21207 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
21208 an error_mark_node.
21209 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
21210 properly.
21211
21212 Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
21213
21214 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
21215
21216 Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
21217
21218 * typeck.c (build_component_ref_1): Use build_component_ref
21219 instead of open coding it here.
21220
21221 Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
21222
21223 * g++.c (main): Don't link with -lg++.
21224
21225 NEW_OVER changes:
21226 * cvt.c (convert_to_reference): Don't use convert_from_reference on
21227 result of build_type_conversion.
21228 (cp_convert): Only call build_method_call for ctors if
21229 build_type_conversion failed.
21230 (ptr_complete_ob): New function.
21231 (TYPE_PTR{,OB,MEM}_P): New macros.
21232 ({add,build}_builtin_candidate{,s}): New functions.
21233 (print_z_candidates): Handle builtins.
21234 (build_user_type_conversion_1): Don't use conversion fns for
21235 converting to a base type.
21236 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
21237 (build_user_type_conversion): Use convert_from_reference.
21238 (build_new_op): New function.
21239 (build_over_call): Fix handling of methods.
21240 (compare_ics): Handle AMBIG_CONV properly.
21241 * typeck2.c: Increment abort count.
21242 * method.c (build_opfncall): Forward most requests to build_new_op.
21243 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
21244
21245 Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21246
21247 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
21248 invalid second argument to dump_expr_list.
21249
21250 Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
21251
21252 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
21253
21254 Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
21255
21256 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
21257 ASSEMBLE_EXTERNAL.
21258
21259 Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
21260
21261 * typeck2.c (process_init_constructor): New pedwarn for using { }
21262 to initialize a pointer to member function.
21263 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
21264 we can avoid the new error.
21265
21266 Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
21267
21268 * typeck.c (build_ptrmemfunc1): New function to hide details of
21269 pointer to member functions better.
21270
21271 Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
21272
21273 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
21274 methods into the actual method, as we know the implied object is
21275 not used.
21276
21277 Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21278
21279 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
21280 inside a system header.
21281
21282 Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
21283
21284 * call.c (build_method_call): Call complete_type on the
21285 instance type.
21286
21287 Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
21288
21289 * typeck.c (build_component_ref): Always build up an OFFSET_REF
21290 for obj_ptr->func so that we can know which object to use in a
21291 method call.
21292
21293 Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
21294
21295 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
21296 around things. Also improve maintainability.
21297
21298 Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
21299
21300 * decl.c (grokdeclarator): Check for overflow when evaluating an
21301 array dimension.
21302
21303 Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
21304
21305 * cvt.c (cp_convert): Don't check for ambiguity with constructor
21306 if NEW_OVER.
21307
21308 * typeck.c (build_x_function_call): Pass function overload
21309 questions to new overloading code if NEW_OVER.
21310 * init.c (expand_aggr_init_1): Only check for type conversion ops
21311 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
21312 Don't check for ambiguity with constructor if NEW_OVER.
21313 * cvt.c (convert_to_reference): Dereference the result of a type
21314 conversion operator.
21315 (build_conv): Propagate ICS_USER_FLAG.
21316 (implicit_conversion): Call instantiate_type.
21317 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
21318 (add_function_candidate): Fix cv-quals on argtype.
21319 (print_z_candidates): New function.
21320 (build_new_function_call): Call it.
21321 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
21322 consider non-converting constructors.
21323 Call print_z_candidates.
21324 Return an AMBIG_CONV for an ambiguous conversion.
21325 (build_user_type_conversion): Handle AMBIG_CONV.
21326 (convert_like): Fix test for building TARGET_EXPR.
21327 Call instantiate_type.
21328 Handle AMBIG_CONV and LVALUE_CONV.
21329 (build_over_call): Handle 0 args and ellipsis.
21330 * cp-tree.def: Add AMBIG_CONV.
21331
21332 Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
21333
21334 * decl.c (lookup_name_real): If we find mem in obj when parsing
21335 `obj->mem', make sure we return the right value.
21336
21337 Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
21338
21339 * search.c (get_base_distance): Call complete_type.
21340
21341 Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
21342
21343 * decl.c (store_bindings): Make static.
21344
21345 Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
21346
21347 * init.c (expand_aggr_init_1): Don't check type conversions if
21348 NEW_OVER.
21349
21350 * cvt.c (z_candidate): Put back template field.
21351 (add_function_candidate): Set it.
21352 (add_template_candidate): Likewise.
21353 (joust): Use it.
21354 (compare_qual): Handle references and pointers to members.
21355 (compare_ics): Handle reference bindings.
21356
21357 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
21358
21359 Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
21360
21361 * call.c (compute_conversion_costs): Call complete_type.
21362
21363 * tree.c (vec_binfo_member): Use comptypes instead of comparing
21364 pointers, so we can handle template parameters.
21365
21366 Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
21367
21368 * cvt.c (cp_convert_to_pointer): We have to call complete_type
21369 here; let's make it explicit instead of a side effect of an
21370 error check.
21371
21372 Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
21373
21374 * cvt.c (z_candidate): Remove template field.
21375 (reference_binding): Handle binding to temporary.
21376 (implicit_conversion): Likewise.
21377 (add_function_candidate): Handle artificial constructor parms.
21378 Handle functions with too few parms.
21379 (add_template_candidate): New function.
21380 (build_user_type_conversion_1): Handle constructors.
21381 (convert_like): Likewise.
21382 (build_over_call): Likewise.
21383 (build_new_function_call): Support templates.
21384 (compare_ics): Fix reference, inheritance handling.
21385
21386 Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
21387
21388 * decl.c: Add signed_size_zero_node.
21389 (init_decl_processing): Build it.
21390 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
21391 when we're trying to make a negative delta.
21392
21393 Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21394
21395 Stop doing this damn index==strchr variable name confusion.
21396 * class.c (add_virtual_function): Change local var INDEX to be
21397 named IDX.
21398 (add_method): Likewise.
21399 * lex.c (print_parse_statistics): Likewise.
21400 * search.c (make_memoized_table_entry): Likewise.
21401 (lookup_fnfields_here): Likewise.
21402 (lookup_field): Likewise.
21403 (lookup_fnfields): Likewise.
21404 (get_baselinks): Likewise.
21405 * sig.c (build_signature_table_constructor): Likewise.
21406 (build_signature_method_call): Likewise.
21407 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
21408 (get_member_function_from_ptrfunc): Likewise.
21409 (build_ptrmemfunc): Change local var INDEX to be IDX.
21410 (c_expand_start_case): Likewise.
21411
21412 Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
21413
21414 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
21415 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
21416 (convert_to_reference): Use build_type_conversion to convert to
21417 the reference type directly.
21418 (standard_conversion): Fix void* case, non-conversions.
21419 (reference_binding): Fix expr == 0 case, non-conversions.
21420 (convert_like): Support REF_BIND.
21421 (compare_qual): Split out from compare_ics.
21422 (compare_ics): Use it, handle icses with only a qual_conv.
21423
21424 * init.c (expand_vec_init): Don't crash if decl is NULL.
21425
21426 Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
21427
21428 * mpw-config.in: New file, configury for Mac MPW.
21429 * mpw-make.sed: New file, makefile editing for MPW.
21430
21431 Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
21432
21433 * pt.c (instantiate_class_template): Call repo_template_used.
21434
21435 * search.c (lookup_conversions): Only lookup conversions in
21436 complete types.
21437
21438 Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21439
21440 * cp-tree.def: Renamed from tree.def, to avoid confusion with
21441 gcc's tree.def.
21442 * cp-tree.h, lex.c: Include cp-tree.def.
21443 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
21444
21445 Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
21446
21447 * init.c (build_vec_delete_1): Call complete_type.
21448
21449 Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
21450
21451 * except.c (start_anon_func): Make sure anonymous functions are
21452 never external.
21453
21454 Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
21455
21456 * decl.c (finish_function): If function_depth > 1, set nested.
21457
21458 * decl2.c (grokbitfield): Revert Bob's change.
21459 * class.c (finish_struct_1): Fix handling of named bitfield widths.
21460
21461 Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
21462
21463 * pt.c (add_pending_template): Handle types.
21464 (lookup_template_class): With -fexternal-templates, just add the class
21465 to pending_templates instead of instantiating it now.
21466 * decl2.c (finish_file): Handle types in pending_templates.
21467
21468 Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
21469
21470 * decl2.c (grokbitfield): Handle constant decls appropriately.
21471 Give an appropriate error message now instead of spewing core
21472 later.
21473
21474 Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
21475
21476 * decl2.c: Don't turn on thunks by default for now.
21477
21478 Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
21479
21480 * typeck.c (complete_type): Handle error_mark_node.
21481 (common_type, OFFSET_TYPE): Handle template_type_parms.
21482
21483 Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
21484
21485 * pt.c (instantiate_decl): If at_eof, call import_export_decl
21486 regardless of DECL_INLINE.
21487
21488 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
21489
21490 * class.c (finish_struct_bits): Copy TYPE_SIZE.
21491
21492 * rtti.c (build_dynamic_cast): Support templates.
21493 * tree.def: Support DYNAMIC_CAST_EXPR.
21494 * pt.c (tsubst_copy): Likewise.
21495 * decl2.c (build_expr_from_tree): Likewise.
21496
21497 Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
21498
21499 * typeck.c (build_static_cast): Support templates.
21500 (build_const_cast): Likewise.
21501 * tree.def: Support CONST/STATIC_CAST_EXPR.
21502 * pt.c (tsubst_copy): Likewise.
21503 * decl2.c (build_expr_from_tree): Likewise.
21504
21505 Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
21506
21507 * decl2.c (finish_vtable_vardecl): Don't trust
21508 TREE_SYMBOL_REFERENCED for vtables of local classes.
21509
21510 Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
21511
21512 * pt.c (tsubst_copy): Handle operator T.
21513
21514 Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21515
21516 * init.c (build_delete): Move creation of PARMS inside test of
21517 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
21518
21519 Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
21520
21521 * typeck.c (build_conditional_expr): Don't assume that
21522 the arguments to ?: are always pointers or records.
21523
21524 Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
21525
21526 * decl2.c (import_export_decl): Still emit static/weak/comdat
21527 copies of inline template functions with -fno-implicit-templates.
21528
21529 Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
21530
21531 * init.c (build_delete): Determine the complete basetype
21532 path to the destructor we're calling.
21533
21534 Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
21535
21536 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
21537 initialize the enum, because we really and truly don't know where
21538 it came from.
21539 (start_enum): Don't copy integer_zero_node because
21540 build_enumerator will do it.
21541
21542 Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
21543
21544 * decl.c (finish_function): Do access control on base destructors.
21545
21546 * pt.c (tsubst, case FUNCTION_DECL): Set up
21547 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
21548 hose us.
21549
21550 Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
21551
21552 * cvt.c (build_up_reference): If we have already extended the
21553 lifetime of the temporary, don't try it again.
21554 * typeck.c (c_expand_return): Don't try and convert the return
21555 value twice when we want a reference, once is enough.
21556
21557 Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
21558
21559 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
21560 LOOKUP_ONLYCONVERTING at all for now.
21561
21562 * search.c (add_conversions): Put the conversion function in
21563 TREE_VALUE, the basetype in TREE_PURPOSE.
21564 * cvt.c (build_type_conversion): Adjust.
21565 * cvt.c (build_expr_type_conversion): Adjust.
21566 * call.c (user_harshness): Adjust.
21567
21568 Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
21569
21570 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
21571 backend's benefit.
21572
21573 Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
21574
21575 * except.c (expand_start_catch_block): Add a dummy region, if we
21576 get an error, so that we can avoid core dumping later.
21577
21578 Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
21579
21580 * cp-tree.h (OFFSET_REF): Remove.
21581 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
21582 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
21583 * init.c (expand_aggr_init_1): Likewise.
21584 (build_new): Likewise.
21585 * typeck.c (expand_target_expr): Likewise.
21586
21587 Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
21588
21589 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
21590 TARGET_EXPR.
21591
21592 Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
21593
21594 * cvt.c (build_up_reference): Redo how and when temporaries are
21595 created.
21596 * decl.c (grok_reference_init): Don't try and be smart about
21597 running cleanups.
21598
21599 Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
21600
21601 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
21602 (TARGET_EXPR...), now that it has 4 arguments.
21603 * tree.c (build_cplus_new): Likewise.
21604
21605 Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
21606
21607 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
21608
21609 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
21610 * decl.c (struct saved_scope): Remove named_labels,
21611 {base,member}_init_list.
21612 (maybe_push_to_top_level): Don't set them. Call
21613 push_cp_function_context if appropriate.
21614 (pop_from_top_level): Likewise.
21615
21616 * method.c (do_build_assign_ref): Remove obsolete check of
21617 TYPE_HAS_ASSIGN_REF (basetype).
21618
21619 * decl.c (grokfndecl): Diagnose user definition of
21620 implicitly-declared methods.
21621
21622 Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
21623
21624 * method.c (do_build_copy_constructor): Add code to give
21625 meaningful error messages instead of crashing.
21626 (do_build_assign_ref): Don't synthesize assignment operators for
21627 classes containing reference or const members.
21628
21629 * class.c (struct base_info): Remove cant_synth_copy_ctor
21630 and cant_synth_asn_ref.
21631 (finish_base_struct): Remove the code that tries to conditionalize
21632 synthesis of copy constructors & assignment operators based on
21633 access permissions. Instead, let it fail when it tries to
21634 synthesize the copy constructor. This will give meaningful error
21635 messages instead of silently generating code to perform a bitcopy.
21636
21637 Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
21638
21639 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
21640 determining types for constant values.
21641
21642 * decl.c (struct named_label_list): Use instead of stuffing
21643 random items into a TREE_LIST node.
21644 (named_label_uses): Use the new struct.
21645 (poplevel): Likewise.
21646 (lookup_label): Likewise.
21647 (define_label): Add an error message to tell the user the line
21648 where the goto is located in addition to the destination of the
21649 goto.
21650 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
21651 named_label_uses.
21652 (finish_function): Likewise.
21653
21654 (start_decl): Complain about defining a static data member
21655 in a different type from which it was declared.
21656
21657 Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
21658
21659 * cvt.c (build_expr_type_conversion): Adjust.
21660
21661 Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
21662
21663 * call.c (build_method_call): Always convert 'this' to the
21664 appropriate type.
21665
21666 * search.c (add_conversions): Put the conversion function in
21667 TREE_VALUE, the type in TREE_PURPOSE.
21668 * cvt.c (build_type_conversion): Adjust.
21669 * call.c (user_harshness): Adjust.
21670
21671 * method.c (emit_thunk): Call temporary_allocation and
21672 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
21673
21674 * tree.c (build_cplus_array_type): Handle tweaking of
21675 TYPE_MAIN_VARIANT here.
21676 * typeck.c (common_type): Not here.
21677
21678 * typeck.c (complete_type): Only try to complete an array type if
21679 it has a domain.
21680
21681 Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
21682
21683 * decl.c (grokvardecl): Call complete_type.
21684 (grokdeclarator): Call complete_type for PARM_DECLs.
21685
21686 Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
21687
21688 * pt.c (instantiate_class_template): Re-set
21689 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
21690
21691 Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
21692
21693 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
21694 smart enough to do it right.
21695 * tree.c (cp_expand_decl_cleanup): Likewise.
21696 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
21697 cp_expand_decl_cleanup.
21698 (store_parm_decls): Likewise.
21699 (hack_incomplete_structures): Likewise.
21700 * except.c (push_eh_cleanup): Likewise.
21701
21702 Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
21703
21704 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
21705 frontend to the backend where it belongs.
21706 * tree.c (unsave_expr): Likewise.
21707 (unsave_expr_now): Likewise.
21708 * tree.def (UNSAVE_EXPR): Likewise.
21709 * cp-tree.h (unsave_expr): Likewise.
21710 (unsave_expr_now): Likewise.
21711
21712 Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
21713
21714 * init.c (emit_base_init): Make sure the partial EH cleanups live
21715 on the function_obstack.
21716
21717 Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
21718
21719 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
21720 when checking for pointer types.
21721
21722 Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
21723
21724 * pt.c (instantiate_class_template): Remove obsolete check for
21725 access declarations.
21726
21727 Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
21728
21729 * call.c (build_overload_call): Simplify calls to
21730 build_overload_call by removing last parameter.
21731 (build_method_call): Likewise.
21732 * cp-tree.h: Likewise.
21733 * method.c (build_opfncall): Likewise.
21734 * typeck.c (build_x_function_call): Likewise.
21735
21736 Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
21737
21738 * call.c (default_parm_conversions): Factor out common code.
21739 (build_method_call): Use it.
21740 (build_overload_call_real): Use it.
21741
21742 Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
21743
21744 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
21745 but pedwarn as the code is bogus.
21746 * typeck.c (decay_conversion): Likewise.
21747 (build_function_call_real): Use build_addr_func instead of
21748 default_conversion. Don't allow pointer-to-method functions down
21749 here.
21750 (build_unary_op): Use real pointer-to-member functions instead of
21751 fake ones.
21752 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
21753 (convert_for_assignment): Removed some obsolete code.
21754 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
21755 build_x_function_call instead of current_class_ptr. Only call
21756 digest_init once on an initializer, we do this just checking
21757 TREE_TYPE.
21758 (build_expr_from_tree): Pass current_class_ref to
21759 build_x_function_call instead of current_class_ptr.
21760 * init.c (build_member_call): Likewise.
21761 * pase.y: Likewise.
21762 * error.c (dump_expr): Handle OFFSET_REFs better.
21763 * pt.c (unify): Handle pointer-to-member functions better.
21764 * decl.c (finish_function): Clear out current_class_ref just like
21765 we do for current_class_ptr.
21766
21767 * typeck.c (get_delta_difference): Handle virtual bases better.
21768
21769 Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
21770
21771 * sig.c (build_signature_table_constructor): Use the delta for
21772 the original basetype for this virtual function with thunks.
21773 (build_signature_method_call): We still need to adjust 'this'
21774 with thunks.
21775
21776 Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
21777
21778 * call.c (build_addr_func): New routine. Used to get the `real'
21779 address of a function or a method. Needed to avoid getting a
21780 pointer-to-member function.
21781 (build_call): New routine to build CALL_EXPRs.
21782 (build_method_call): Use it.
21783 * cvt.c (convert_to_aggr): Likewise.
21784 * typeck.c (build_function_call_real): Likewise.
21785 * sig.c (build_signature_table_constructor): Use build_addr_func.
21786 * cp-tree.h (build_call, build_addr_func): Declare them.
21787
21788 Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
21789
21790 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
21791 * parse.y: Remove uses of LOOKUP_AGGR.
21792
21793 Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
21794
21795 * *.[chy]: Rename current_class_decl to current_class_ptr, and
21796 C_C_D to current_class_ref.
21797
21798 Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
21799
21800 * call.c (convert_harshness): Tighten up pointer conversions.
21801
21802 Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
21803
21804 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
21805 (finish_file): Likewise.
21806
21807 Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
21808
21809 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
21810
21811 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
21812 code.
21813
21814 Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
21815
21816 * decl2.c: Turn on thunks by default where supported.
21817
21818 Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
21819
21820 * cp-tree.h (build_overload_call_maybe): Removed.
21821 * call.c (build_overload_call_real): Invert meaning of last arg to
21822 be require_complete.
21823 (build_overload_call): Likewise.
21824 * typeck.c (build_x_function_call): Use build_overload_call_real
21825 instead of build_overload_call_maybe.
21826
21827 Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
21828
21829 * decl2.c (finish_file): Don't try to emit functions that haven't
21830 been compiled.
21831
21832 Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
21833
21834 * decl2.c (finish_vtable_vardecl): Oops.
21835
21836 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
21837 Also store the bindings from previous_class_values.
21838 (pop_from_top_level): Restore them.
21839
21840 Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
21841
21842 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
21843 symbol has been referenced.
21844 (finish_file): Re-join synthesis/vtable loop with inline emission
21845 loop, disable inlining when an inline is output.
21846
21847 Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
21848
21849 * except.c (init_exception_processing): Setup saved_in_catch.
21850 (push_eh_cleanup): Reset __eh_in_catch.
21851 (expand_start_catch_block): Set __eh_in_catch.
21852
21853 Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
21854
21855 * except.c (push_eh_cleanup): Add tracking for whether or not we
21856 have an active exception object.
21857 (expand_builtin_throw): Use it to make sure a rethrow without an
21858 exception object is caught.
21859
21860 Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
21861
21862 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
21863 cache.
21864
21865 Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
21866
21867 * decl2.c (finish_file): Also use sentries for vars with
21868 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
21869 created).
21870
21871 * lex.c (handle_cp_pragma): Disable #pragma
21872 interface/implementation if SUPPORTS_ONE_ONLY > 1.
21873
21874 Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
21875
21876 * method.c (emit_thunk): Wrap default case in
21877 temporary/permanent_allocation.
21878
21879 * method.c (make_thunk): Use DECL_ONE_ONLY.
21880 (emit_thunk): Call assemble_end_function.
21881
21882 Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
21883
21884 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
21885 (import_export_decl): Likewise.
21886 (finish_prevtable_vardecl): Disable vtable hack if
21887 SUPPORTS_ONE_ONLY > 1.
21888
21889 Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
21890
21891 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
21892 PREDECREMENT_EXPRs take two arguments, not one.
21893
21894 Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
21895
21896 * class.c (build_vtable_entry): Don't build thunks for abstract
21897 virtuals.
21898
21899 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
21900 frontend.
21901
21902 Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
21903
21904 * class.c (set_rtti_entry): Use size_zero_node.
21905 (build_vtable): Likewise.
21906
21907 Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
21908
21909 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
21910 (prepare_fresh_vtable): Likewise.
21911
21912 Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
21913
21914 * method.c (emit_thunk): Call mark_used on the target function.
21915
21916 * call.c (build_method_call): Don't warn about pending templates.
21917
21918 Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
21919
21920 * decl2.c (finish_file): Fix list walking logic.
21921
21922 * typeck2.c (check_for_new_type): Only warn if -pedantic.
21923
21924 Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
21925
21926 * class.c (finish_struct_1): Remove old code for
21927 dont_allow_type_definitions.
21928 * cp-tree.h: Likewise.
21929 * spew.c: Make sure cp-tree.h is included before parse.h, so the
21930 definition of flagged_type_tree is found before it is used.
21931 * lex.c: Likewise.
21932 * parse.y: Added the ftype member to the type union, and changed a
21933 number of rules to use it instead of ttype. Added calls to
21934 check_for_new_type() as appropriate.
21935 * typeck2.c (check_for_new_type): New function for checking
21936 if a newly defined type appears in the specified tree.
21937 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
21938 for check_for_new_type().
21939
21940 Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
21941
21942 * decl2.c (finish_file): Only use a sentry if the decl is public.
21943
21944 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
21945 don't pass LOOKUP_ONLYCONVERTING.
21946
21947 Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
21948
21949 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
21950 properly keeps track of const and volatile type modifiers.
21951
21952 Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
21953
21954 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
21955 * pt.c (comp_template_args): Use it.
21956
21957 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
21958 assemble_external for artificial function decls.
21959
21960 * decl.c (cp_finish_decl): Oops.
21961
21962 Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
21963
21964 * decl2.c (import_export_decl): Put static data member templates
21965 into common storage, or make them weak, depending on whether they
21966 are dynamically or statically initialized.
21967 (get_sentry): New function.
21968 (finish_file): Do import_export_decl for static data members before
21969 building the init/fini functions. Don't init/fini a variable that's
21970 EXTERNAL. Use a sentry for variables in common. Fix mismatching
21971 push/pop_temp_slots.
21972 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
21973 expand_static_init thang.
21974 * method.c (get_id_2): New function.
21975
21976 Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
21977
21978 * parse.y (empty_parms): Make sure we use C++-style prototypes
21979 when we're declaring member functions.
21980
21981 Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
21982
21983 * Makefile.in (CONFLICTS): 16 s/r conflicts.
21984 * parse.y (self_template_type): New nonterminal.
21985
21986 Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
21987
21988 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
21989 name.
21990 * parse.y (base_class.1): Allow 'typename foo::bar'.
21991
21992 * lex.c (check_newline): Remove #pragma code that plays with the
21993 input stream, since we now deal with tokens. Clear nextchar when
21994 we're done.
21995 (handle_cp_pragma): Use real_yylex.
21996 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
21997 in one place.
21998
21999 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
22000
22001 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
22002
22003 Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
22004
22005 * parse.y: New token SELFNAME for potential constructor.
22006 * spew.c (yylex): Handle it.
22007 * lex.c (identifier_type): Produce it.
22008
22009 * parse.y (complete_type_name): In :: case, don't push class binding.
22010 (complex_type_name): Likewise.
22011
22012 Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
22013
22014 * typeck.c (build_reinterpret_cast): Handle pointer to member
22015 functions.
22016
22017 Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22018
22019 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
22020 pragmas.
22021 (check_newline): Put the vtable/unit/implementation/interface pragma
22022 code into handle_cp_pragma, replacing it with a call.
22023 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
22024 args. Get the next token after handling the pragma token.
22025
22026 Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
22027
22028 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
22029 (convert_to_pointer_force): Likewise.
22030
22031 * init.c (build_new): Fix array new without -fcheck-new.
22032
22033 Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
22034
22035 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
22036 tree.c: Lose TYPE_NESTED_NAME.
22037
22038 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
22039 as identifiers.
22040
22041 * tree.def: Add VEC_INIT_EXPR.
22042 * expr.c (cplus_expand_expr): Handle it.
22043 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
22044 the extra file-scope symbol nastiness.
22045
22046 Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
22047
22048 * method.c (make_thunk): Thunks are static.
22049 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
22050
22051 * decl2.c (mark_vtable_entries): Emit thunks as needed.
22052 (finish_file): Don't emit them here.
22053
22054 Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
22055
22056 * rtti.c (build_dynamic_cast): Handle null pointers.
22057 (ifnonnull): New function.
22058
22059 Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
22060
22061 * call.c (build_method_call): Remember the original basetype we
22062 were called with. Give an error message instead of trying
22063 (incorrectly) to call a non-static member function through a
22064 non-inherited class.
22065
22066 * search.c (expand_upcast_fixups): Mark the new fixup as
22067 DECL_ARTIFICIAL.
22068
22069 Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
22070
22071 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
22072
22073 * class.c (set_rtti_entry): Fix for thunks.
22074
22075 * decl2.c (import_export_decl): Still emit typeinfo fns for
22076 cv-variants of builtin types.
22077
22078 * rtti.c (expand_class_desc): Set up base_info_type_node here.
22079 (init_rtti_processing): Instead of here.
22080
22081 Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
22082
22083 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
22084 (build_typeid): Only complain about taking dynamic typeid without
22085 -frtti.
22086
22087 * decl2.c: flag_rtti defaults to 1.
22088
22089 * rtti.c (get_tinfo_var): The general class case is now smaller.
22090 (init_rtti_processing): Pack the latter three fields of base_info
22091 into 32 bits.
22092
22093 Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
22094
22095 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
22096
22097 Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
22098
22099 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
22100 (push_memoized_context): Split out code to undefer pop_type_level to
22101 (clear_memoized_cache): here.
22102 (pop_memoized_context): We can only handle one layer of deferral of
22103 pop_type_level so clear the cache, if there was a previous level.
22104
22105 Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
22106
22107 * rtti.c (init_rtti_processing): Build up base_info_type_node.
22108 (expand_class_desc): Use one pointer to an array of base_info
22109 structs, passed using a CONSTRUCTOR.
22110
22111 Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
22112
22113 * class.c (build_vbase_path): Remove block extern for
22114 flag_assume_nonnull_objects here.
22115 (build_vfn_ref): Split out functionality into build_vtbl_ref.
22116 (build_vtbl_ref): New routine.
22117 (build_vtable): Set up rtti info here.
22118 (add_virtual_function): Note in CLASSTYPE_RTTI the best
22119 place where we can get the rtti pointers from to avoid having to
22120 search around for a place.
22121 (finish_base_struct): Likewise.
22122 (finish_struct_1): Likewise. Never create totally new vtables
22123 with totally new vtable pointers for rtti. Disable code to layout
22124 vtable pointers better until we want to break binary
22125 compatibility.
22126 * rtti.c (build_headof_sub): New routine to convert down to a
22127 sub-object that has an rtti pointer in the vtable.
22128 (build_headof): Use it. Also, use build_vtbl_ref now to be more
22129 maintainable.
22130 (build_dynamic_cast): Make sure we have saved it, if we need to.
22131 * search.c (dfs_init_vbase_pointers): Disable code that deals with
22132 a more efficient vtable layout, enable later.
22133 * call.c (flag_assume_nonnull_objects): Moved declaration to
22134 * cp-tree.h: here. Declare build_vtbl_ref.
22135 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
22136 function calls that want a tree.
22137
22138 Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
22139
22140 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
22141 other X subobjects in the most derived type. Ack.
22142
22143 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
22144 get_typeid will do it for us.
22145 (get_typeid_1): Break out call-building for expand_*_desc to use.
22146 (get_typeid): Call it.
22147 (expand_*_desc): Likewise.
22148 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
22149 and void *.
22150 (init_decl_processing): Lose builtin_type_tdescs lossage.
22151 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
22152
22153 Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
22154
22155 * pt.c (tsubst): When calling set_nested_typename, use
22156 TYPE_NESTED_NAME (current_class_type) instead of
22157 current_class_name.
22158
22159 * decl.c (pushdecl): Likewise.
22160 (pushdecl_class_level): Likewise.
22161 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
22162 set_nested_typename.
22163
22164 Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
22165
22166 * rtti.c (synthesize_tinfo_fn): Handle arrays.
22167
22168 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
22169
22170 Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
22171
22172 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
22173 (init_rtti_processing): Lose bad_cast_type.
22174 (build_dynamic_cast): Use throw_bad_cast.
22175
22176 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
22177
22178 * decl2.c (finish_file): Don't synthesize artificial functions
22179 that are external and not inline.
22180
22181 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
22182
22183 * decl2.c (finish_file): Handle having new inlines added to
22184 saved_inlines by synthesis.
22185
22186 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
22187
22188 Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
22189
22190 RTTI rewrite to initialize nodes as needed, not require that
22191 users #include <typeinfo>, complete functionality and reduce wasted
22192 space.
22193 * rtti.c (init_rtti_processing): New fn.
22194 (build_typeid): The vtable entry is now a function.
22195 (get_tinfo_var): New fn.
22196 (get_tinfo_fn): Likewise.
22197 (get_typeid): Use it.
22198 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
22199 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
22200 points __rtti_*.
22201 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
22202 (synthesize_tinfo_fn): New fn.
22203 * method.c (build_t_desc_overload): Lose.
22204 (build_overload_with_type): More generic.
22205 * decl.c (init_decl_processing): Call init_rtti_processing.
22206 * class.c (set_rtti_entry): Use get_tinfo_fn.
22207 * decl2.c (mark_vtable_entries): Mark the rtti function.
22208 (finish_prevtable_vardecl): Don't build_t_desc.
22209 (import_export_decl): Handle tinfo functions.
22210 (finish_file): Likewise.
22211 * typeck.c (inline_conversion): New fn.
22212 (build_function_call_real): Use it.
22213 * cp-tree.h: Add decls.
22214
22215 * method.c (hack_identifier): Also convert component_refs from
22216 references.
22217
22218 * lex.c (cons_up_default_function): Use the type, not the name, in
22219 declspecs.
22220
22221 * decl2.c (import_export_vtable): Fix weak vtables.
22222
22223 Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
22224
22225 * search.c (get_base_distance_recursive): Fix access checks for
22226 protected bases.
22227
22228 Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22229
22230 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
22231 cp-tree.h.
22232 (convert_harshness): Add prototypes wrapped by PROTO.
22233 * decl2.c (grok_function_init): Likewise.
22234 (do_toplevel_using_decl): Change to void return type.
22235 * class.c (build_vtable_entry): Remove decl of make_thunk.
22236 (merge_overrides): Fix order of arg definitions.
22237 (finish_vtbls): Likewise.
22238 (fixup_vtable_deltas): Likewise.
22239 (modify_all_direct_vtables): Likewise.
22240 (modify_all_indirect_vtables): Likewise.
22241 * search.c (get_base_distance_recursive): Likewise.
22242 (get_abstract_virtuals_1): Likewise.
22243 (fixup_virtual_upcast_offsets): Likewise.
22244 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
22245 * init.c (perform_member_init): Fix order of arg definitions.
22246 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
22247 * cp-tree.h (make_thunk): Add decl.
22248 (overload_template_name, push_template_decl): Add decls.
22249 (do_toplevel_using_decl): Change to void return type.
22250 (vec_binfo_member): Add decl.
22251
22252 Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22253
22254 * typeck.c (mark_addressable, convert_for_assignment,
22255 convert_for_initialization, pointer_int_sum, pointer_diff,
22256 unary_complex_lvalue): Add prototypes wrapped by PROTO.
22257 (convert_sequence): #if 0 fn decl, since definition also is.
22258
22259 Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
22260
22261 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
22262 cast to pointer types for type searching.
22263
22264 Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22265
22266 * typeck.c (get_delta_difference): Use cp_error, not error, in the
22267 case where BINFO == 0.
22268
22269 Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
22270
22271 * call.c (build_method_call): Fix wording of error messages so
22272 constructors come out right.
22273
22274 Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
22275
22276 * decl.c (push_overloaded_decl): Don't warn about hidden
22277 constructors when both the type and the function are declared
22278 in a system header file.
22279
22280 Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
22281
22282 * class.c (finish_struct_1): Propagate the TYPE_PACKED
22283 flag for the type to the type's fields.
22284
22285 Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22286
22287 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
22288
22289 Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
22290
22291 * class.c (base_info, finish_base_struct): Replace
22292 needs_virtual_dtor with base_has_virtual.
22293
22294 (finish_struct_1): Remove the old code that tried to make default
22295 destructors virtual. Use base_has_virtual when checking if we need
22296 to add a vtable entry for the rtti code.
22297
22298 Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
22299
22300 * pt.c (push_template_decl): Complain about template decl with
22301 inappropriate declaration.
22302
22303 Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
22304
22305 * typeck.c (build_x_unary_op): Remove bogus check for taking
22306 the address of a member function.
22307
22308 Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
22309
22310 * parse.y (constructor_declarator): Only push the class if
22311 we are not already in the class.
22312
22313 Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
22314
22315 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
22316 Add additional argument to INIT_CUMULATIVE_ARGS.
22317
22318 Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
22319
22320 * decl.c (shadow_tag): Fix error about anon union with methods.
22321
22322 * parse.y (self_reference): Only generate a self-reference if this
22323 is a non-template class.
22324 (opt.component_decl_list): Only use it if it was generated.
22325
22326 * parse.y (component_decl_1): Use constructor_declarator.
22327 (fn.def2): Likewise.
22328 (notype_component_declarator0): Likewise.
22329
22330 Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
22331
22332 * typeck.c (build_x_unary_op): Add checks for taking the address
22333 of a TARGET_EXPR or of a member function, and give appropriate
22334 warnings.
22335
22336 Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
22337
22338 * pt.c (process_template_parm): Allow template type parms to be
22339 used as types for template const parms.
22340
22341 Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
22342
22343 * init.c (expand_vec_init): Ensure the eh cleanups are on the
22344 function_obstack.
22345
22346 Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
22347
22348 * decl.c (lookup_name_real): Be even more picky about the
22349 ambiguous lookup warning.
22350 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
22351 * parse.y (constructor_declarator): Rather than here.
22352
22353 * parse.y (constructor_declarator): New nonterminal.
22354 (fn.def1): Use it.
22355 (explicit_instantiation): Likewise.
22356
22357 Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
22358
22359 Add implicit declaration of class name at class scope.
22360 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
22361 * parse.y (self_reference): New nonterminal.
22362 (opt.component_decl_list): Use it.
22363 (fn.def1): Add nested_name_specifier type_name cases.
22364 * class.c (build_self_reference): New function.
22365 (finish_struct): Handle access_default later, move self-reference
22366 decl to the end.
22367 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
22368 * cp-tree.h: Adjust.
22369
22370 * pt.c (do_function_instantiation): Separate handling of member
22371 functions and non-member functions properly.
22372
22373 Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
22374
22375 * pt.c (process_template_parm): Improve error for 'volatile class K'.
22376
22377 * class.c (finish_struct_1): Check the right slot for destructors.
22378
22379 * decl.c (start_enum): Complain about enum templates.
22380
22381 Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
22382
22383 * init.c (resolve_offset_ref): Offset pointers to member data by one.
22384 * typeck.c (unary_complex_lvalue): Likewise.
22385
22386 Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
22387
22388 * typeck.c (c_expand_return): Check for a returned local
22389 array name, similar to the check for an ADDR_EXPR.
22390
22391 Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
22392
22393 * decl.c (cp_finish_decl): Don't build cleanups for static
22394 variables here.
22395
22396 Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
22397
22398 * typeck.c (build_modify_expr): Fix error messages to be more
22399 accurate.
22400 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
22401 assignment operators.
22402 * error.c (assop_as_string): Likewise. Add support for `%Q' for
22403 assignment operators.
22404
22405 Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
22406
22407 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
22408 give an error if initialized. pedwarn about nested type with the
22409 same name as its enclosing class.
22410
22411 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
22412
22413 * typeck.c (require_complete_type): Be sure to instantiate the
22414 MAIN_VARIANT of the type.
22415
22416 * decl2.c (finish_file): Instantiate pending templates before
22417 processing static constructors and destructors.
22418
22419 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
22420 unless at_eof.
22421
22422 Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
22423
22424 * decl2.c (delete_sanity): If error_mark_node is passed
22425 in as an expression, quit while we're ahead.
22426
22427 * decl.c (grokdeclarator): Give an error message if `friend'
22428 is combined with any storage class specifiers.
22429
22430 Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
22431
22432 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
22433 definition of nonexistent nested type.
22434
22435 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
22436 not to say 'typedef'.
22437
22438 Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22439
22440 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
22441 * search.c (dfs_walk, dfs_init_vbase_pointers,
22442 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
22443 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
22444
22445 Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
22446
22447 * except.c (build_throw): Support minimal parse.
22448 * pt.c (tsubst_copy): Support THROW_EXPR.
22449 * decl2.c (build_expr_from_tree): Likewise.
22450
22451 * pt.c (mangle_class_name_for_template): Always allocate
22452 scratch_firstobj.
22453
22454 Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
22455
22456 * cvt.c (cp_convert_to_pointer): Give an appropriate error
22457 when trying to cast from an incomplete type.
22458
22459 Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
22460
22461 * pt.c (instantiate_class_template): Don't bother setting up
22462 CLASSTYPE_TAGS explicitly, as the nested types will add
22463 themselves.
22464
22465 Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
22466
22467 * decl.c (shadow_tag): Remove old error check for usage of
22468 an enum without a previous declaration.
22469 (xref_tag): Add error message about usage of enums without a
22470 previous declaration.
22471
22472 Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
22473
22474 * lex.c (do_identifier): Only do name consistency check if we're
22475 parsing.
22476
22477 * pt.c (push_template_decl): Don't crash if we get a member defn
22478 that doesn't match.
22479
22480 * decl.c (xref_tag_from_type): New function to do an xref without
22481 always having to figure out code_type_node.
22482 * cp-tree.h: Declare it.
22483 * pt.c (instantiate_class_template): Use it for friend classes.
22484 (lookup_template_class): Use it.
22485
22486 * typeck2.c (build_functional_cast): Pull out a single parm before
22487 passing it to build_c_cast.
22488
22489 Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
22490
22491 * expr.c (do_case): Give an error message if a pointer is
22492 given as a case value.
22493
22494 Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
22495
22496 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
22497 an overload list.
22498
22499 * lex.c (cons_up_default_function): Really, now, interface hackery
22500 does not apply to synthesized methods.
22501
22502 Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
22503
22504 * call.c (build_method_call): Ctors and dtors now have special names
22505 with respect to lookups.
22506 * class.c (add_method): Likewise.
22507 (grow_method): Likewise.
22508 (finish_struct_methods): Likewise.
22509 (warn_hidden): Likewise.
22510 (finish_struct_1): Likewise.
22511 * cvt.c (convert_to_reference): Likewise.
22512 (convert_to_aggr): Likewise.
22513 (cp_convert): Likewise.
22514 * decl2.c (check_classfn): Likewise.
22515 * init.c (expand_member_init): Likewise.
22516 (expand_default_init): Likewise.
22517 (expand_aggr_init_1): Likewise.
22518 (build_offset_ref): Likewise.
22519 (build_new): Likewise.
22520 (build_delete): Likewise.
22521 * lex.c (do_inline_function_hair): Likewise.
22522 * search.c (lookup_field_1): Likewise.
22523 (lookup_fnfields_here): Likewise.
22524 (lookup_field): Likewise.
22525 (lookup_fnfields): Likewise.
22526 (get_virtual_destructor): Likewise.
22527 (dfs_debug_mark): Likewise.
22528 (dfs_pushdecls): Likewise.
22529 (dfs_compress_decls): Likewise.
22530 * tree.c (layout_basetypes): Likewise.
22531 * typeck.c (build_component_ref): Likewise.
22532 (build_x_function_call): Likewise.
22533 (build_modify_expr): Likewise.
22534 (convert_for_initialization): Likewise.
22535 (build_functional_cast): Likewise.
22536 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
22537 (CTOR_NAME): New.
22538 (DTOR_NAME): New.
22539 * decl.c (ctor_identifier): New.
22540 (dtor_identifier): New.
22541 (init_decl_processing): Set them.
22542
22543 Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
22544
22545 * typeck.c (build_component_ref): Don't get confused by fields whose
22546 context has no type name, like pointer to member functions.
22547
22548 Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
22549
22550 * decl.c (grokdeclarator): Handle typedef without declarator.
22551
22552 * pt.c (tsubst): Handle SCOPE_REF in declarator.
22553
22554 * parse.y (bad_parm): Catch another case of missing `typename'.
22555
22556 * lex.c (yyprint): Handle TYPE_DECLs.
22557
22558 * decl.c (start_function): Don't try to be clever.
22559
22560 * lex.c: Lose compiler_error_with_decl.
22561 * typeck2.c: Lose error_with_aggr_type.
22562 (incomplete_type_error): Use cp_* instead of old functions.
22563 (readonly_error): Likewise.
22564 * typeck.c (convert_arguments): Likewise.
22565 * search.c (lookup_nested_field): Likewise.
22566 * method.c (make_thunk): Likewise.
22567 * decl.c (grokparms): Likewise.
22568 * cp-tree.h: Update.
22569
22570 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
22571 and value.
22572
22573 Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
22574
22575 * method.c (build_opfncall): When deleting a pointer to an
22576 array, build a new pointer to the tree past any ARRAY_TYPE
22577 nodes.
22578
22579 Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22580
22581 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
22582
22583 Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
22584
22585 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
22586 and ! DECL_INLINE.
22587
22588 * decl.c (finish_function): Don't set nested based on
22589 hack_decl_function_context.
22590 * parse.y (function_try_block): Check for nested function.
22591 (pending_inlines): Likewise.
22592
22593 * decl2.c (build_expr_from_tree): If a unary op already has a
22594 type, just return it.
22595
22596 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
22597
22598 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
22599 (finish_file): Check the return value of walk_vtables.
22600 (finish_prevtable_vardecl): Return int.
22601 (finish_vtable_vardecl): Likewise.
22602 (prune_vtable_vardecl): Likewise.
22603 * lex.c (set_vardecl_interface_info): Likewise.
22604 * cp-tree.h: Adjust return types.
22605
22606 * class.c (delete_duplicate_fields_1): Don't complain about
22607 duplicate nested types if they're the same type.
22608 (finish_struct): Remove check for duplicate.
22609 * decl2.c (grokfield): Don't check for typedef of anonymous type.
22610
22611 Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
22612
22613 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
22614
22615 * decl.c (grokdeclarator): Lose special handling of class-level
22616 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
22617 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
22618
22619 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
22620
22621 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
22622
22623 * search.c (compute_access): Fix handling of anonymous union
22624 members.
22625 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
22626 from anonymous unions to their members.
22627
22628 * typeck.c (build_x_function_call): For static member functions,
22629 hand off to build_member_call.
22630
22631 Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
22632
22633 * typeck.c (build_component_ref): Handle OFFSET_REFs.
22634
22635 * init.c (expand_vec_init): Fix init == 0 case.
22636
22637 Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
22638
22639 * init.c (build_new): pedwarn about init and array new.
22640 (expand_vec_init): Handle lists, use convert_for_initialization.
22641
22642 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
22643 when converting to an aggregate type.
22644 * cvt.c (cp_convert): Pass it through.
22645
22646 * typeck.c (build_conditional_expr): Handle user-defined
22647 conversions to slightly different types.
22648
22649 * decl.c (grokdeclarator): Force an array type in a parm to be
22650 permanent.
22651
22652 * decl2.c (do_using_directive): Sorry.
22653 (do_namespace_alias): Likewise.
22654 * lex.c (real_yylex): Warn about using the `namespace' keyword.
22655
22656 Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
22657
22658 * parse.y (datadef): Move call to note_list_got_semicolon up.
22659
22660 Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
22661
22662 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
22663
22664 Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
22665
22666 * decl.c (cp_finish_decl): The exception regions have to be
22667 nested, not overlapping. We start the exception region for a
22668 decl, after it has been fully built, and all temporaries for it
22669 have been cleaned up.
22670
22671 Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
22672
22673 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
22674
22675 Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
22676
22677 * tree.def: Add RETURN_INIT.
22678 * pt.c (instantiate_decl): Handle RETURN_INIT.
22679 * decl.c (store_return_init): Handle minimal_parse_mode.
22680
22681 * tree.c (cp_build_type_variant): Just return an error_mark_node.
22682 * decl.c (make_typename_type): Don't try to get the file and line
22683 of an identifier.
22684 * typeck.c (comptypes): Handle TYPENAME_TYPE.
22685
22686 Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
22687
22688 * decl.c (poplevel): Make sure we clear out and restore old local
22689 non-VAR_DECL values by default when they go out of scope.
22690
22691 Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
22692
22693 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
22694 referring to addresses of variables and functions.
22695
22696 * error.c (dump_expr): Support SIZEOF_EXPR.
22697
22698 * init.c (do_friend): Use the return value of check_classfn.
22699
22700 * typeck.c (convert_arguments): Call complete_type.
22701
22702 * method.c (hack_identifier): After giving an error, set value to
22703 error_mark_node.
22704
22705 Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
22706
22707 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
22708 lossage for local classes.
22709 * cp-tree.h: Declare it.
22710 * decl.c (lookup_name_real): Evil, painful hack for local classes.
22711 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
22712 Use hack_decl_function_context.
22713 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
22714 (start_function): Use hack_decl_function_context.
22715 (finish_function): Likewise.
22716 * method.c (synthesize_method): Likewise.
22717 * lex.c (process_next_inline): Likewise.
22718 (do_pending_inlines): Likewise.
22719 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
22720 done with it.
22721
22722 Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
22723
22724 * sig.c (build_signature_pointer_or_reference_type): Align
22725 signature pointers/references on 8-byte boundaries so they can be
22726 grabbed 2 words at a time on a Sparc.
22727
22728 Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
22729
22730 * method.c (hack_identifier): Requiring a static chain is now a
22731 hard error.
22732 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
22733 functions.
22734
22735 Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
22736
22737 * init.c (build_offset_ref): Call complete_type.
22738
22739 * decl.c (pop_from_top_level): Always pop previous_class_type.
22740
22741 * parse.y: Handle multiple decls in a for-init-statement.
22742 * pt.c (tsubst_expr): Likewise.
22743
22744 * pt.c (tsubst): Use tsubst_expr for the second operand of an
22745 ARRAY_REF.
22746
22747 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
22748 (poplevel_class): Set it here.
22749 (pop_from_top_level): Pop it here if we're returning to class scope.
22750 * class.c (pushclass): Don't set it here.
22751
22752 * decl.c (maybe_push_to_top_level): Save current_template_parms,
22753 and clear it if !pseudo.
22754 (pop_from_top_level): Restore it.
22755
22756 * decl2.c (finish_file): Push the dummy each time we walk the list
22757 of vtables.
22758
22759 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
22760 something for CAST_EXPR.
22761
22762 Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
22763
22764 * cvt.c (cp_convert): Warn about implicit conversion of the
22765 address of a function to bool, as it is always true.
22766
22767 Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
22768
22769 * typeck.c (c_expand_return): Fix warning for local externs returned.
22770
22771 Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
22772
22773 * tree.c (mapcar): Propagate const and volatile properly.
22774
22775 * typeck.c (complete_type): Be sure to instantiate the
22776 MAIN_VARIANT of the type.
22777
22778 * method.c (synthesize_method): Class interface hackery does not
22779 apply to synthesized methods.
22780
22781 Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
22782
22783 * pt.c (comp_template_args): Use comptypes rather than just
22784 checking for TEMPLATE_TYPE_PARM equivalence.
22785
22786 * typeck.c (build_x_function_call): Call complete_type before
22787 checking TYPE_OVERLOADS_CALL_EXPR.
22788
22789 Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
22790
22791 * g++.c (main): Check also for new define ALT_LIBM.
22792
22793 Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
22794
22795 * pt.c (instantiate_class_template): If we don't have a pattern
22796 yet, that's OK.
22797 (coerce_template_parms): If we see a local class, bail.
22798
22799 * decl.c (grok_reference_init): Make sure there's a type before
22800 checking its code.
22801
22802 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
22803 (push_template_decl): Likewise.
22804
22805 * parse.y (named_class_head): Set
22806 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
22807
22808 * decl.c (xref_tag): Diagnose redeclaration of template
22809 type-parameter name.
22810
22811 * error.c (dump_type): Handle anonymous template type parms.
22812
22813 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
22814 TYPE_STUB_DECL.
22815 (coerce_template_parms): Likewise.
22816
22817 Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
22818
22819 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
22820 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
22821
22822 Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
22823
22824 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
22825 before trying to get its STUB_DECL.
22826 (coerce_template_parms): Likewise.
22827
22828 * parse.y (template_type_parm): If they didn't use 'class',
22829 pretend they did after giving an error.
22830
22831 * pt.c (coerce_template_parms): Diagnose use of local class.
22832
22833 * decl.c (grok_reference_init): Use instantiate_type.
22834
22835 * error.c (dump_expr): Handle TEMPLATE_DECLs.
22836
22837 * parse.y (named_class_head): Diagnose mismatching types and tags.
22838
22839 * decl.c (pushdecl): Type decls and class templates clash with
22840 artificial type decls, not hide them.
22841
22842 * decl.c (redeclaration_error_message): Diagnose redefinition of
22843 templates properly.
22844 (duplicate_decls): Diagnose disallowed overloads for template
22845 functions, too.
22846
22847 * decl.c (start_decl): Call complete_type before checking for a
22848 destructor.
22849
22850 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
22851
22852 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
22853
22854 Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
22855
22856 * decl.c (grok_op_properties): Don't check for operator++(int) in
22857 a template.
22858
22859 * tree.c (perm_manip): Return a copy of variable and function
22860 decls with external linkage.
22861
22862 * tree.def: Change some of the min tree codes to type "1".
22863 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
22864 * method.c (build_overload_int): Emit something arbitrary for
22865 anything but an INTEGER_CST if we're in a template.
22866
22867 * decl.c (cp_finish_decl): Call complete_type before deciding
22868 whether or not to lay out the decl.
22869
22870 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
22871
22872 Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
22873
22874 * typeck2.c (build_x_arrow): Call complete_type.
22875
22876 * pt.c (add_pending_template): Broken out.
22877 (lookup_template_class): If -fexternal-templates, call it for all
22878 the methods of implemented types.
22879 (instantiate_class_template): Instead of instantiating them here.
22880 (instantiate_decl): Handle -fexternal-templates earlier.
22881
22882 Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22883
22884 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
22885 memoized lookup stuff inside GATHER_STATISTICS.
22886
22887 Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
22888
22889 * decl.c (start_decl): Complain about array of incomplete type
22890 here.
22891 (grokdeclarator): Not here.
22892
22893 * parse.y (template_parm): Expand full_parm inline so we can set
22894 the rule's precedence.
22895
22896 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
22897 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
22898 * decl2.c (grokbitfield): Don't check for integer constant here.
22899 * class.c (finish_struct_1): Check here.
22900
22901 * decl.c (define_label): Make the min decl go on permanent_obstack.
22902
22903 * pt.c (unify): Don't handle CONST_DECLs.
22904 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
22905 (tsubst_copy): Likewise.
22906
22907 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
22908 CONST_DECL for a template parm.
22909
22910 Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
22911
22912 * decl.c (grokdeclarator): Complain about array of incomplete type
22913 here.
22914 (start_decl_1): Not here.
22915
22916 * pt.c (tsubst): Handle pointer-to-function declarators.
22917
22918 * method.c (hack_identifier): If pedantic, diagnose local class
22919 methods that require a static chain.
22920
22921 * decl.c (grok_op_properties): No longer static.
22922 * cp-tree.h: Declare it.
22923 * pt.c (tsubst): Call it for operators.
22924 Use tsubst_copy for TREE_VECs.
22925
22926 * parse.y (template_arg): The expr has precedence like '>'.
22927
22928 Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
22929
22930 * pt.c (coerce_template_parms): Don't coerce an expression using
22931 template parms.
22932 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
22933 (tsubst): Don't use build_index_2_type if the max_value uses template
22934 parms.
22935 * method.c (build_overload_int): Emit something arbitrary for an
22936 expression using template parms.
22937
22938 * parse.y (template_close_bracket): New non-terminal to catch use
22939 of '>>' instead of '> >' in template class names.
22940 (template_type): Use it.
22941 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
22942
22943 * tree.def: Add CAST_EXPR.
22944 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
22945 CONVERT_EXPR for minimal_parse_mode.
22946 * typeck.c (build_c_cast): Likewise.
22947 * pt.c (tsubst_copy): Likewise.
22948 * decl2.c (build_expr_from_tree): Likewise.
22949 * error.c (dump_expr): Likewise.
22950
22951 Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22952
22953 * except.c (SetTerminate, SetUnexpected): Put back global vars.
22954 (init_exception_processing): Put back decl/init of
22955 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
22956 fns from libstdc++.
22957
22958 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
22959 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
22960 Delete unused fns.
22961 * cp-tree.h (declare_uninstantiated_type_level,
22962 uninstantiated_type_level_p): Delete prototypes.
22963
22964 Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
22965
22966 * pt.c (tsubst_expr): Add default return.
22967
22968 Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22969
22970 * error.c (fndecl_as_string): Delete unused arg CNAME.
22971 * sig.c (build_signature_table_constructor,
22972 build_signature_method_call): Fix calls.
22973
22974 * class.c (the_null_vtable_entry): Delete var definition.
22975 (init_class_processing): Delete tree the_null_vtable_entry init.
22976 * decl.c (no_print_{functions, builtins}): Declare as static.
22977 (__tp_desc_type_node): #if 0 var definition.
22978 (init_type_desc): #if 0 init of __tp_desc_type_node.
22979 (vb_off_identifier): Move var decl into init_decl_processing.
22980 (current_function_assigns_this): Declare as static.
22981 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
22982 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
22983 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
22984 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
22985 * init.c (BI_header_type, BI_header_size): Declare as static.
22986 * pt.c (template_classes): Delete unused var.
22987 (add_pending_template): Delete decl for non-existent fn.
22988 (lookup_template_class): Delete vars CODE and TAG_CODE.
22989 (instantiate_template): Delete unused var TARGS.
22990 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
22991 Delete decls.
22992 (__tp_desc_type_node): #if 0 var decl.
22993 (fndecl_as_string): Fix prototype.
22994
22995 Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
22996
22997 * tree.def: Add GOTO_STMT.
22998 * pt.c (tsubst_expr): Support goto and labels.
22999 * decl.c (define_label): Support minimal parsing.
23000 * parse.y (simple_stmt): Likewise.
23001
23002 Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23003
23004 * xref.c (GNU_xref_member): Only define/set var I if
23005 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
23006 used.
23007 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
23008 (GNU_xref_end): Fix call.
23009 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
23010 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
23011
23012 * tree.c (build_exception_variant): Delete unused vars I, A, T,
23013 T2, and CNAME.
23014 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
23015 (mapcar): Delete unused var CODE.
23016 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
23017 (break_out_cleanups): Fix call.
23018 (bot_manip): Likewise.
23019 * call.c (build_method_call): Likewise.
23020 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
23021 Likewise.
23022 * typeck.c (unary_complex_lvalue, build_modify_expr,
23023 convert_for_initialization): Likewise.
23024 * typeck2.c (build_functional_cast): Likewise.
23025 * cp-tree.h (build_cplus_new): Fix prototype.
23026
23027 * repo.c (open_repo_file): Delete unused var Q.
23028 (repo_compile_flags, repo_template_declared,
23029 repo_template_defined, repo_class_defined, repo_inline_used,
23030 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
23031 (repo_get_id, repo_vtable_used): Declare as static.
23032 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
23033 prototypes.
23034
23035 Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
23036
23037 * parse.y (pending_inlines): Add function_try_block case.
23038
23039 * pt.c (unify): Fix for template const parms.
23040
23041 Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23042
23043 * lex.c (extract_interface_info): Delete forward decl.
23044 (default_copy_constructor_body, default_assign_ref_body): Delete
23045 decls for non-existent functions.
23046 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
23047 (init_lex): Delete setting them.
23048 (cons_up_default_function): Delete unused vars FUNC_BUF,
23049 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
23050 #if 0'd synth code.
23051 (toplevel, expression_obstack): Delete unused extern decls.
23052 (tree_node_kind): Delete unused enum.
23053 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
23054 GATHER_STATISTICS.
23055 (tree_node_kind_names): Delete unused extern decl.
23056 (synth_obstack): Delete unused var.
23057 (init_lex): Don't set it.
23058 (init_parse): Add decl before use.
23059 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
23060 (current_unit_{name, language}): Delete unused vars.
23061 (check_newline): Don't bother setting them, just accept the #pragma.
23062 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
23063 (current_unit_{name, language}): Delete decls.
23064
23065 * search.c: Wrap all of the memoized functions, macros, and
23066 variables inside #ifdef GATHER_STATISTICS.
23067 (lookup_field, lookup_fnfields): Likewise.
23068 (init_search_processing): Likewise.
23069 (reinit_search_statistics): Wrap whole function.
23070 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
23071
23072 * decl.c (finish_function): Only call pop_memoized_context if
23073 GATHER_STATISTICS is defined.
23074 (start_function): Likewise for push_memoized_context.
23075 * class.c (pushclass, popclass): Likewise.
23076
23077 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
23078 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
23079
23080 * cvt.c (cp_convert): Delete unused local var FORM.
23081 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
23082 prototypes.
23083
23084 Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
23085
23086 * pt.c (do_poplevel): Oops; really return what we get from
23087 poplevel this time.
23088
23089 Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23090
23091 * cp-tree.h (is_aggr_type): Add prototype.
23092
23093 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
23094 * method.c ({push,pop}_cp_function_context): Delete decls.
23095 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
23096 (SetUnexpected, SetTerminate): Delete unused vars.
23097 (init_exception_processing): Don't set SetUnexpected or
23098 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
23099 (output_exception_table_entry): Delete unused array LABEL.
23100 (expand_internal_throw): Delete unused var PARAMS.
23101 (expand_start_catch_block): Delete unused var CLEANUP.
23102 (emit_exception_table): Delete unused var EH_NODE_DECL.
23103 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
23104 GOTO_UNWIND_AND_THROW. Don't set them.
23105 (end_eh_unwinder): Add top decl.
23106 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
23107 (exception_section, push_rtl_perm, do_function_call,
23108 lang_interim_eh, push_eh_cleanup, eh_outer_context,
23109 expand_end_eh_spec, end_eh_unwinder): Declare as static.
23110 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
23111 throw_used): Likewise.
23112 * cp-tree.h (expand_end_eh_spec): Delete prototype.
23113
23114 * search.c (dfs_mark, dfs_mark_vtable_path,
23115 dfs_unmark_vtable_path, dfs_mark_new_vtable,
23116 dfs_unmark_new_vtable, dfs_clear_search_slot,
23117 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
23118 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
23119 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
23120 functions.
23121 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
23122 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
23123 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
23124 Only define #ifdef GATHER_STATISTICS.
23125 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
23126 is defined.
23127 (vbase_decl): Delete var definition.
23128 (init_search): Delete old decl.
23129 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
23130 never actually used.
23131 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
23132 (get_base_distance_recursive): Delete unused fourth arg
23133 BASETYPE_PATH. Fix call .
23134 (get_base_distance): Fix call.
23135 (push_class_decls): Delete unused var ID.
23136 (make_memoized_table_entry): Declare as static.
23137 (breadth_first_search): Declare as static.
23138 (tree_has_any_destructor_p): Declare as static.
23139 (pop_class_decls): Delete unused arg pop_class_decls.
23140 * class.c (popclass): Fix call to pop_class_decls.
23141 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
23142 tree_has_any_destructor_p): Delete prototypes.
23143
23144 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
23145 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
23146 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
23147 (build_user_desc): Delete unused var T.
23148 (build_class_desc): Delete unused vars T and OFF.
23149 (build_t_desc): Delete unused var NAME_STRING.
23150 (build_headof): Make static.
23151 (get_bad_cast_node): Likewise.
23152 (get_def_to_follow): Likewise.
23153 * cp-tree.h (init_type_desc): Add prototype.
23154 (build_headof): Remove prototype.
23155
23156 Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
23157
23158 * pt.c (tsubst): Only look for matching decls at file scope for
23159 non-member functions.
23160
23161 * call.c (build_scoped_method_call): Handle scoped destructor
23162 calls in templates.
23163
23164 * decl.c (*_top_level): Also save previous_class_values.
23165
23166 * pt.c (tsubst_expr): Support do {} while loops.
23167 * parse.y (simple_stmt): Likewise.
23168 * tree.def: Likewise.
23169
23170 * method.c (build_overload_identifier): For a class nested in a
23171 template class, don't mangle in the template parms from our
23172 context.
23173
23174 * lex.c, cp-tree.h: Remove support for template instantiations in
23175 the pending_inlines code.
23176 * pt.c: Remove dead functions and unused arguments.
23177 (uses_template_parms): TYPENAME_TYPEs always use template parms.
23178 * parse.y: Stop passing anything to end_template_decl.
23179 * tree.c (print_lang_statistics): Only print tinst info #ifdef
23180 GATHER_STATISTICS.
23181
23182 Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23183
23184 * init.c (expand_recursive_init{,_1}): Delete decls.
23185 (sort_member_init): Delete unused var INIT.
23186 (emit_base_init): Delete unused var X.
23187 (build_offset_ref): Delete unused var CNAME.
23188 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
23189 (emit_base_init): Delete unused local var BASE. Delete extern
23190 decl of IN_CHARGE_IDENTIFIER.
23191 (build_delete): Delete unused local var VIRTUAL_SIZE.
23192
23193 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
23194 (build_delete): Fix call.
23195 * decl2.c (delete_sanity): Likewise.
23196 * cp-tree.h (build_vec_delete): Update prototype.
23197
23198 * typeck.c (common_base_type): Delete unused var TMP.
23199 (build_binary_op): Delete local var ARGS_SAVE.
23200 (build_array_ref): Delete unused var ITYPE.
23201 (c_expand_return): Delete unused var USE_TEMP.
23202
23203 * typeck.c (compexcepttypes): Delete unused arg STRICT.
23204 (comptypes): Fix calls.
23205 * decl.c (duplicate_decls): Likewise.
23206 * cp-tree.h (compexcepttypes): Delete extra arg.
23207
23208 * decl2.c (check_classfn): Delete unused second arg CNAME.
23209 * decl.c (start_decl, grokfndecl): Fix calls.
23210 * init.c (do_friend): Likewise.
23211 * cp-tree.h (check_classfn): Update prototype.
23212
23213 * cp-tree.h (signature_error, import_export_vtable,
23214 append_signature_fields, id_in_current_class, mark_used,
23215 copy_assignment_arg_p): Add decls.
23216 * decl2.c (mark_used): Delete decl.
23217
23218 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
23219
23220 * class.c (get_vtable_entry): Disable unused function.
23221 (doing_hard_virtuals): Delete unused static global var.
23222 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
23223 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
23224 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
23225 (modify_one_vtable): Delete unused var OLD_RTTI.
23226 (finish_struct_anon): Delete unused vars OFFSET and X.
23227 (finish_struct_bits): Delete unused var METHOD_VEC.
23228 (get_basefndecls): Delete unused var PURPOSE. Delete unused
23229 for-scope local variable METHODS.
23230
23231 * call.c (user_harshness): Delete unused/unneeded arg PARM.
23232 (ideal_candidate): Delete unused args BASETYPE and PARMS.
23233 (build_method_call): Delete unused args passed into ideal_candidate.
23234 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
23235 * cp-tree.h (synthesize_method): Add decl.
23236
23237 * decl.c (note_level_for_for): Give void return type.
23238 (pushdecl_nonclass_level): Likewise.
23239 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
23240 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
23241 (suspend_binding_level): Delete unused var LEVEL.
23242 (duplicate_decls): Delete unused var CTYPE.
23243 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
23244 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
23245 PTR_ENDLINK.
23246 (grokdeclarator): Delete unused var C.
23247 (grokdeclarator): Delete unused var SIZE_VARIES.
23248 (grokparms): Delete unused var SAW_VOID.
23249 (start_function): Delete unused var OLDDECL.
23250 (cplus_expand_expr_stmt): Delete unused var
23251 REMOVE_IMPLICIT_IMMEDIATELY.
23252
23253 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
23254
23255 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
23256
23257 Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
23258
23259 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
23260 (build_min_nt): Likewise.
23261 * pt.c (do_pushlevel): Emit line note.
23262 (do_poplevel): Return what we get from poplevel.
23263 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
23264 * parse.y: Use do_pushlevel and do_poplevel.
23265 * cp-tree.h: Declare do_poplevel.
23266
23267 * cp-tree.h: Declare at_eof.
23268 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
23269 * decl2.c (import_export_decl): Renamed from import_export_inline.
23270 (finish_file): Call it to do interface handling for statics.
23271 * pt.c (tsubst_copy): Call mark_used on variables and functions
23272 used here.
23273
23274 * decl2.c (finish_file): Don't emit statics we can't generate.
23275 * pt.c (instantiate_decl): Don't set interface on instantiations
23276 we can't generate.
23277
23278 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
23279 * tree.c (print_lang_statistics): Print max template depth.
23280 * pt.c (push_tinst_level): Dump entire instantiation context.
23281 (instantiate_class_template): Use it and pop_tinst_level.
23282 (instantiate_decl): Likewise.
23283
23284 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
23285 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
23286
23287 Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
23288
23289 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
23290 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
23291 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
23292 the new template implementation.
23293
23294 Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23295
23296 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
23297
23298 Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
23299
23300 * decl.c (cp_finish_decl): Delay emitting the debug information for
23301 a typedef that has been installed as the canonical typedef, if the
23302 type has not yet been defined.
23303
23304 Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
23305
23306 * decl2.c (grokfield): Still call pop_nested_class for access decls.
23307
23308 Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23309
23310 * decl.c (lookup_label): Call label_rtx.
23311
23312 * decl.c (make_binding_level): New function.
23313 (pushlevel, pushlevel_class): Call it instead of explicit
23314 duplicate calls to xmalloc.
23315
23316 * decl.c (init_decl_processing): Delete useless build_pointer_type
23317 call.
23318
23319 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
23320 (sizet_ftype_string): Delete variable.
23321 (init_decl_processing): Add built-in functions fabsf, fabsl,
23322 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
23323 variable strlen_ftype, used for strlen.
23324
23325 Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
23326
23327 * decl.c (push_to_top_level): Start from current_binding_level
23328 again for now; the stl hacks depend on g++ being broken in this
23329 way, and it'll be fixed in the template rewrite.
23330
23331 * tree.def: Add USING_DECL.
23332 * decl2.c (do_class_using_decl): Implement.
23333 (grokfield): Pass access decls off to do_class_using_decl instead of
23334 grokdeclarator.
23335 * error.c (dump_decl): Handle USING_DECLs.
23336 * decl.c (grokdeclarator): Remove code for handling access decls.
23337 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
23338 as access decls for now.
23339 (finish_struct): Don't check USING_DECLs for other uses of the name.
23340
23341 * search.c (get_matching_virtual): Use cp_error_at.
23342
23343 Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23344
23345 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
23346 match c-typeck.c.
23347 (self_promoting_args_p): Move the check that TYPE is non-nil
23348 before trying to look at its main variant.
23349 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
23350
23351 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
23352 Delete macros.
23353 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
23354 (do_friend): Delete call to xref_friend.
23355 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
23356
23357 * typeck.c (convert_sequence): #if 0 unused function.
23358
23359 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
23360 be in decl_in_memory_p.
23361 (decl_in_memory_p): Delete decl.
23362 * expr.c (decl_in_memory_p): Delete fn.
23363 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
23364
23365 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
23366
23367 Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
23368
23369 * class.c (finish_struct_1): Check for a pure-specifier on a
23370 non-virtual function here.
23371
23372 * decl2.c (grok_function_init): Don't check whether the function
23373 is virtual here.
23374 (grokfield): Don't call check_for_override here.
23375
23376 * decl.c (push_to_top_level): Start from inner_binding_level,
23377 check class_shadowed in class levels.
23378
23379 Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
23380
23381 * decl.c (resume_level): Ignore things that don't have names, instead
23382 of core dumping.
23383
23384 Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23385
23386 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
23387
23388 Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
23389
23390 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
23391 synthesized dtor.
23392
23393 * parse.y (complete_type_name): Bind global_scope earlier.
23394 (complex_type_name): Likewise.
23395 (qualified_type_name): Remove.
23396
23397 Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
23398
23399 * decl.c (grokfndecl): Move code that looks for virtuals in base
23400 classes...
23401 * class.c (check_for_override): ... to a new function.
23402 (finish_struct_1): Call it.
23403
23404 * cp-tree.h: Declare warn_sign_compare.
23405
23406 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
23407 rather than extra_warnings to decide whether to warn about
23408 comparison of signed and unsigned.
23409
23410 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
23411 implies -Wsign-compare. -Wall doesn't imply -W.
23412
23413 Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
23414
23415 * typeck.c (build_component_ref): Fix to handle anon unions in base
23416 classes as well.
23417
23418 Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23419
23420 * class.c (resolves_to_fixed_type_p): Delete code dealing with
23421 a WITH_CLEANUP_EXPR, since we don't generate them any more.
23422 * cvt.c (build_up_reference): Likewise.
23423 * decl.c (grok_reference_init): Likewise.
23424 (cp_finish_decl): Likewise.
23425 * error.c (dump_expr): Likewise.
23426 * tree.c (real_lvalue_p): Likewise.
23427 (lvalue_p): Likewise.
23428 (build_cplus_new): Likewise.
23429 (unsave_expr_now): Likewise.
23430 * typeck.c (unary_complex_lvalue, build_modify_expr,
23431 c_expand_return): Likewise.
23432
23433 Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23434
23435 Make the C++ front-end pay attention to attributes for structures.
23436 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
23437 finish_struct_1.
23438 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
23439 Take out old round_up_size use and setting the DECL_ALIGN possibly
23440 using it. Take out setting of TYPE_ALIGN to round_up_size, which
23441 can override what the attribute set.
23442 * cp-tree.h (finish_struct): Update prototype.
23443 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
23444 attributes to finish_struct.
23445 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
23446 value down into finish_struct.
23447 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
23448
23449 Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
23450
23451 * decl.c (poplevel): Re-word dead for local handling.
23452 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
23453 (cp_finish_decl): If is_for_scope, check for duplicates so
23454 we can disable is_for_scope. Otherwise, preserve_temp_slots.
23455
23456 * lex.c (do_identifier): Use global binding in preference of
23457 dead for local variable.
23458
23459 Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
23460
23461 * init.c (initializing_context): Handle anon union changes, the
23462 context where fields of anon unions can be initialized now has to be
23463 found by walking up the TYPE_CONTEXT chain.
23464
23465 Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
23466
23467 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
23468 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
23469 (obscure_complex_init): If bss is supported, always set
23470 DECL_INITIAL to error_mark_node.
23471
23472 Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23473
23474 * init.c (is_friend): Make sure there's a context before we see if
23475 it's an aggr type.
23476
23477 Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
23478
23479 * init.c (is_friend): Classes are not friendly with nested classes.
23480
23481 Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
23482
23483 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
23484 and record its result.
23485
23486 Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
23487
23488 * class.c (finish_struct_anon): Switch around code to not move anon
23489 union elements around, nor mess up their contexts, nor offsets,
23490 instead we now build up the right number of COMPONENT_REFs for all
23491 the anon unions that may be present at build_component_ref time.
23492 * typeck.c (lookup_anon_field): New routine to handle field lookup
23493 on fields without names. We find them, based upon their unique type
23494 instead.
23495 * typeck.c (build_component_ref): Allow FIELD_DECL components.
23496 Handle finding components in anonymous unions, and ensure that a
23497 COMPONENT_REF is built for each level as necessary.
23498
23499 Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
23500
23501 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
23502 code that ensures that copy ctors are used if appropriate.
23503
23504 Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23505
23506 * init.c (build_vec_delete): Only give an error if base isn't an
23507 error_mark_node.
23508
23509 Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
23510
23511 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
23512 (yylex): If we see `new', keep slurping.
23513
23514 Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
23515
23516 * class.c (finish_struct_1): Move code for handling anon unions...
23517 (finish_struct_anon): to here. Fixup so that we do the offset
23518 calculations right, and so that the fields are physically moved to
23519 the containers's chain.
23520
23521 Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23522
23523 * decl.c (grokdeclarator): Avoid trying to get an operand off an
23524 identifier node.
23525
23526 Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
23527
23528 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
23529 POINTER_SIZE to agree with expr.c.
23530
23531 Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
23532
23533 * search.c (lookup_field): Don't report ambiguities if protect is 0,
23534 instead return NULL_TREE.
23535
23536 Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
23537
23538 * class.c (finish_struct_1): Call warn_hidden if we want warnings
23539 about overloaded virtual functions.
23540 (warn_hidden): New routine to warn of virtual functions that are
23541 hidden by other virtual functions, that are not overridden.
23542 (get_basefndecls): New routine, used by warn_hidden.
23543 (mark_overriders): New routine, used by warn_hidden.
23544 * search.c (get_matching_virtual): Remove old warning that just
23545 isn't very useful.
23546
23547 Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23548
23549 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
23550
23551 * typeck.c (null_ptr_cst_p): Delete unused fn.
23552 (build_function_call_maybe): Delete unused fn.
23553
23554 * expr.c (extract_init): #if 0 the code after unconditional return 0
23555 for now.
23556
23557 Delete old cadillac code.
23558 * edsel.c: Remove file.
23559 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
23560 * Makefile.in (CXX_OBJS): Delete edsel.o.
23561 (edsel.o): Delete rule.
23562 * cp-tree.h (flag_cadillac): Delete var decl.
23563 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
23564 * decl2.c (flag_cadillac): Delete var definition.
23565 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
23566 (grokfield): Delete code depending on flag_cadillac.
23567 (finish_anon_union): Likewise.
23568 * class.c (finish_struct_1): Likewise.
23569 (pushclass): Likewise.
23570 (popclass): Likewise.
23571 (push_lang_context): Likewise.
23572 (pop_lang_context): Likewise.
23573 * decl.c (init_decl_processing): Likewise.
23574 (start_decl): Likewise.
23575 (cp_finish_decl): Likewise.
23576 (xref_tag): Likewise.
23577 (finish_enum): Likewise.
23578 (start_function): Likewise.
23579 (finish_function): Likewise.
23580 (finish_stmt): Likewise.
23581 * lex.c (lang_init): Likewise.
23582 (check_newline): Likewise.
23583
23584 * lex.c (do_pending_inlines): Delete synthesized method kludge.
23585
23586 Delete defunct, ancient garbage collection implementation.
23587 * rtti.c: New file with the RTTI stuff from gc.c.
23588 * gc.c: Removed file (moved the remaining stuff into rtti.c).
23589 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
23590 (rtti.o): New rule, replacing gc.o.
23591 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
23592 * cp-tree.h: Delete gc-related fn decls.
23593 (DECL_GC_OFFSET): Delete macro.
23594 (flag_gc): Delete extern decl.
23595 * decl.c (current_function_obstack_index): Delete var decl.
23596 (current_function_obstack_usage): Delete var decl.
23597 (start_function): Delete clearing of current_function_obstack_index
23598 and current_function_obstack_usage.
23599 (init_decl_processing): Delete code relying on -fgc.
23600 Delete call to init_gc_processing.
23601 (cp_finish_decl): Delete calls to build_static_gc_entry and
23602 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
23603 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
23604 and to expand_expr of a __gc_main call.
23605 (maybe_gc_cleanup): Delete var decl.
23606 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
23607 * decl2.c (flag_gc): Delete var decl.
23608 (lang_f_options): Delete offering of -fgc.
23609 (lang_decode_option): Delete -fgc and -fno-gc handling.
23610 (get_temp_regvar): Delete gc code.
23611 * init.c (build_new): Delete gc code.
23612 * lex.c (init_lex): Delete checking of flag_gc.
23613
23614 * typeck.c (convert_arguments): Delete gc code.
23615 (build_component_addr): Delete -fgc warning.
23616 (build_modify_expr): Delete gc code.
23617
23618 * decl2.c (build_push_scope): Delete fn.
23619 * cp-tree.h (build_push_scope): Delete decl.
23620
23621 * search.c (clear_search_slots): Delete fn.
23622 * cp-tree.h (clear_search_slots): Delete decl.
23623
23624 * search.c (tree_needs_constructor_p): Delete fn.
23625 * cp-tree.h (tree_needs_constructor_p): Delete decl.
23626
23627 * tree.c (id_cmp): Delete fn.
23628
23629 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
23630 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
23631
23632 * tree.c (decl_value_member): Delete fn.
23633 * cp-tree.h (decl_value_member): Delete decl.
23634
23635 * tree.c (list_hash_lookup_or_cons): Delete fn.
23636 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
23637
23638 * method.c (cplus_exception_name): Delete fn.
23639 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
23640
23641 * spew.c (shift_tokens): Delete fn.
23642
23643 Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
23644
23645 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
23646 to cp_finish_decl.
23647 * parse.y: Likewise.
23648
23649 Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23650
23651 * tree.c (build_cplus_staticfn_type): Delete function definition;
23652 never used.
23653 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
23654
23655 * tree.c (virtual_member): Delete function definition; never used.
23656 * cp-tree.h (virtual_member): Delete decl.
23657
23658 Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
23659
23660 * typeck.c (build_component_ref): Handle getting vbase pointers
23661 out of complex multiple inheritance better.
23662
23663 Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
23664
23665 * typeck.c (build_object_ref): Make sure we use the real type, not
23666 any reference type.
23667
23668 Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
23669
23670 * tree.c (build_exception_variant): Don't create new types if we
23671 don't have to, also build new types on the right obstack.
23672
23673 Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
23674
23675 * decl.c (store_bindings): Split out from push_to_top_level.
23676 (push_to_top_level): Call it for b->type_shadowed on class binding
23677 levels.
23678
23679 Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
23680
23681 * search.c (expand_upcast_fixups): Fix so that offsets stored in
23682 vbase_offsets are always right. Fixes a problem where virtual base
23683 upcasting and downcasting could be wrong during conversions on this
23684 during virtual function dispatch at ctor/dtor time when dynamic
23685 vtable fixups for deltas are needed. This only sounds easier than
23686 it is. :-)
23687 (fixup_virtual_upcast_offsets): Change to reflect new calling
23688 convention for expand_upcast_fixups.
23689
23690 Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23691
23692 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
23693 check that it's usable as the bitfield width.
23694
23695 Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23696
23697 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
23698 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
23699 only ever used for functions in it.
23700
23701 Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
23702
23703 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
23704 (nested_type): Likewise.
23705 (nested_name_specifier): Use lastiddecl.
23706
23707 * decl.c (grokdeclarator): Adjust accordingly.
23708 * init.c (expand_member_init): Likewise.
23709 * parse.y (base_class): Likewise.
23710 * typeck2.c (build_functional_cast): Likewise.
23711
23712 * typeck2.c (build_functional_cast): Fill in name after we've
23713 checked for non-aggr type.
23714
23715 Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
23716
23717 * decl2.c (warn_pointer_arith): Default to on.
23718
23719 Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
23720
23721 * lex.c (is_rid): New function.
23722 * decl.c (grokdeclarator): Diagnose reserved words used as
23723 declarator-ids.
23724
23725 Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
23726
23727 * tree.c (get_decl_list): Don't lose cv-quals.
23728
23729 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
23730 typespecs used as declarator-ids.
23731
23732 Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
23733
23734 * decl.c (poplevel): When poping a level, don't give a warning for
23735 any subblocks that already exist.
23736
23737 Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
23738
23739 * typeck.c (build_object_ref): Finish what I started.
23740
23741 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
23742
23743 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
23744
23745 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
23746 scope.
23747
23748 Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
23749
23750 * decl.c (xref_tag): Handle passing a type in directly.
23751
23752 * parse.y (qualified_type_name): Pull out the type.
23753 (nested_type): Likewise.
23754 Take types directly instead of as identifiers.
23755 * call.c (build_scoped_method_call): Take types directly instead of
23756 as identifiers.
23757 * decl.c (xref_basetypes): Likewise.
23758 * init.c (expand_member_init): Likewise.
23759 (build_member_call): Likewise.
23760 (build_offset_ref): Likewise.
23761 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
23762 * method.c (do_build_assign_ref): Likewise.
23763 * decl.c (grokdeclarator): Handle a type appearing as the
23764 declarator-id for constructors.
23765 * method.c (do_build_copy_constructor): current_base_init_list now
23766 uses the types directly, not their names.
23767 * init.c (sort_base_init): Likewise.
23768 (expand_member_init): Likewise.
23769 * init.c (is_aggr_type): New function, like is_aggr_typedef.
23770
23771 Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
23772
23773 * tree.c (layout_basetypes): Call build_lang_field_decl instead
23774 of build_lang_decl if first arg is a FIELD_DECL.
23775
23776 Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23777
23778 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
23779 non-empty.
23780 * except.c (expand_start_catch_block): Set TREE_USED to avoid
23781 warnings about the catch handler.
23782
23783 Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
23784
23785 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
23786 expand_target_expr.
23787
23788 Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23789
23790 Fix access control to use trees rather than integers.
23791 * class.c (access_{default, public, protected, private,
23792 default_virtual, public_virtual, private_virtual}_node): Add
23793 definitions.
23794 (init_class_processing): Do creation of those nodes.
23795 * cp-tree.h (access_type): Delete enum decl.
23796 (access_{default, public, protected, private, default_virtual,
23797 public_virtual, private_virtual}_node): Add decls.
23798 (compute_access): Change return type.
23799 * search.c (compute_access): Have tree return type, instead of enum.
23800 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
23801 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
23802 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
23803 * parse.y (VISSPEC): Make ttype rather than itype.
23804 (base_class_access_list): Likewise.
23805 * *.[cy]: Change all refs of `access_public' to `access_public_node',
23806 etc.
23807 * call.c (build_method_call): Make ACCESS be a tree.
23808 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
23809 * cvt.c (convert_to_aggr): Likewise.
23810 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
23811 Likewise.
23812 * method.c (hack_identifier): Likewise.
23813 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
23814
23815 Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
23816
23817 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
23818 frontend, and make it more consistent with respect to
23819 warn_pointer_arith.
23820
23821 Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
23822
23823 * decl.c (pushdecl): Check for duplicate parameter names.
23824
23825 Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
23826
23827 * decl.c (expand_static_init): Call assemble_external for atexit.
23828
23829 Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
23830
23831 * except.c (do_unwind): Remove some generated dead code.
23832 (eh_outer_context): New routine, factor out some common code from
23833 expand_builtin_throw and end_eh_unwinder. Add code to do return
23834 address masking for the PA.
23835 (expand_builtin_throw): Use eh_outer_context instead of open coding
23836 it here.
23837 (end_eh_unwinder): Likewise.
23838
23839 Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
23840
23841 * except.c (expand_throw): Call assemble_external for __empty, if we
23842 use it.
23843
23844 Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
23845
23846 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
23847 NORMAL_RETURN_ADDR_OFFSET.
23848 (end_eh_unwinder): Likewise.
23849
23850 Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
23851
23852 * gc.c (build_dynamic_cast): Make sure we don't cast away const
23853 when dealing with references, and make sure we handle dynamic
23854 casting to a cv qualified reference.
23855
23856 Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
23857
23858 * except.c (struct eh_context): New structure top hold eh context
23859 information.
23860 (push_eh_context): New routine.
23861 (pop_eh_context): Likewise.
23862 * decl.c (push_cp_function_context): Use them.
23863 (pop_cp_function_context): Likewise.
23864
23865 Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
23866
23867 * decl2.c (finish_file): Also prune uninteresting functions in the
23868 inline emission loop.
23869
23870 Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
23871
23872 * sig.c (build_signature_table_constructor): Mark functions
23873 in the signature as referenced.
23874
23875 Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
23876
23877 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
23878 the inline emission stuff.
23879
23880 Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
23881
23882 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
23883 weak symbols.
23884 * lang-options.h: Add -f{no-,}weak.
23885 * decl.c (init_decl_processing): If the target does not support weak
23886 symbols, don't use them.
23887 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
23888
23889 Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
23890
23891 * init.c (expand_member_init): warning for base init after members.
23892
23893 Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
23894
23895 * cvt.c (build_expr_type_conversion): Don't convert to a reference
23896 type.
23897
23898 Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
23899
23900 * method.c (report_type_mismatch): Improve wording for volatile
23901 mismatches.
23902
23903 Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
23904
23905 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
23906 expand_assignment, as the later doesn't handle things that have
23907 copy constructors well. The compiler would do bitwise copying,
23908 instead of ctor calling in some cases.
23909
23910 Wed Dec 13 17:05:54 1995 Paul Eggert <eggert@twinsun.com>
23911
23912 * g++.c (my_strerror): Return "cannot access" if errno is 0.
23913 (pfatal_with_name, perror_exec): Don't assume that
23914 the returned value from my_strerror contains no '%'s.
23915 (concat): Remove.
23916 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
23917
23918 Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
23919
23920 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
23921 TYPE_METHODS/TREE_CHAIN mean what they used to.
23922 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
23923 instead of TYPE_METHODS.
23924 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
23925 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
23926 * cp-tree.h (CLASSTYPE_METHODS): Lose.
23927 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
23928 TYPE_METHODS.
23929 (struct lang_decl): Lose next_method field.
23930 (DECL_NEXT_METHOD): Lose.
23931 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
23932 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
23933 anymore.
23934 (finish_struct_methods): Don't mess with the TREE_CHAINs in
23935 fn_fields.
23936
23937 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
23938 vector.
23939
23940 * call.c (build_method_call): Synthesize here even when not inlining.
23941 * typeck.c (build_function_call_real): Likewise.
23942
23943 Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
23944
23945 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
23946 == DBX_DEBUG, call dbxout_start_new_source_file and
23947 dbxout_resume_previous_source_file when appropriate.
23948
23949 Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
23950
23951 * except.c (start_anon_func): Push to the top level.
23952 (end_anon_func): Pop from the top level.
23953
23954 Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
23955
23956 * cp-tree.h (build_cleanup): New routine to build cleanups.
23957 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
23958 call at ctor time and use atexit to run it later.
23959 * decl2.c (build_cleanup): New routine, taken from finish_file.
23960 (finish_file): Use build_cleanup instead, and don't put function
23961 local statics in global dtor list.
23962
23963 Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
23964
23965 * except.c (expand_throw): Ensure that we have cleanups, if we try
23966 and expand cleanups.
23967
23968 Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
23969
23970 * except.c (expand_throw): Add logic to manage dynamic cleanups for
23971 the EH object.
23972 (expand_end_catch_block): Use the magic of expand_goto, instead of
23973 emit_jump so that we get the cleanup for any catch clause parameter
23974 and the cleanup for the exception object. Update to reflect label
23975 changes.
23976 (push_eh_cleanup): New routine to register a cleanup for an
23977 exception object.
23978 (empty_fndecl): Used to default cleanup actions to
23979 nothing.
23980 (init_exception_processing): Setup empty_fndecl. Setup
23981 saved_cleanup.
23982 (expand_start_catch_block): Update to reflect label changes. Call
23983 push_eh_object to register the cleanup for the EH object.
23984 (start_anon_func): New routine to start building lambda expressions
23985 from trees.
23986 (end_anon_func): New routine to end them.
23987 (struct labelNode): Change so that we can use tree labels, or rtx
23988 labels.
23989 (saved_cleanup): Object to check for dynamic cleanups for the
23990 exception handling object.
23991 (push_label_entry): Change so that we can use tree labels, or rtx
23992 labels.
23993 (pop_label_entry): Likewise.
23994 (top_label_entry): Likewise.
23995 (expand_start_all_catch): Use tree label instead of rtx label, so
23996 that we can get the magic of expand_goto.
23997 (expand_end_all_catch): Update to reflect label changes.
23998
23999 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
24000 use UNSAVE_EXPRs.
24001 * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
24002 building_cleanup logic, as we now use UNSAVE_EXPRs.
24003 * cp-tree.h (unsave_expr): Declare it.
24004 * decl.c (building_cleanup): Remove.
24005 (maybe_build_cleanup): Remove building_cleanup logic, and use
24006 UNSAVE_EXPR instead.
24007
24008 Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
24009
24010 * gc.c (build_t_desc): Update error message to say <typeinfo>.
24011
24012 Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24013
24014 * decl.c (pushdecl): Only warn about shadowing a local variable if
24015 warn_shadow is true.
24016
24017 Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
24018
24019 * typeck.c (build_binary_op_nodefault): Added warning about
24020 comparisons between different enum types with -Wall, unless
24021 -fenum-int-equiv set.
24022
24023 Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
24024
24025 * class.c (finish_struct_1): Skip down to the inner type in
24026 multidimensional arrays. Ensures ctors will be made for types that
24027 need constructing.
24028
24029 Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
24030
24031 * decl.c (last_dtor_insn): New to track the last compiler generated
24032 insn in a dtor.
24033 (store_parm_decls): Set it.
24034 (finish_function): Use it to see if the dtor is empty. Avoid doing
24035 vtable setup all the time, if we can.
24036 (struct cp_function): Add last_dtor_insn.
24037 (push_cp_function_context): Save it.
24038 (pop_cp_function_context): Restore it.
24039
24040 Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
24041
24042 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
24043 warnings.
24044
24045 Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
24046
24047 * typeck.c (expand_target_expr): Make sure targets get put into the
24048 current temp_slot_level, so that the free_temp_slots call will reuse
24049 them.
24050
24051 Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
24052
24053 * class.c (finish_struct_1): Delay delta fixups for virtual bases
24054 until after we have done the hard virtuals, to avoid a bogus `every
24055 virtual function must have a unique final overrider' for virtual
24056 functions that are only overridden by hard virtuals.
24057
24058 Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
24059
24060 * pt.c (do_function_instantiation): Don't try to find a file-scope
24061 template for a member function.
24062
24063 Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
24064
24065 * g++.c (main): Add handling of -nodefaultlibs.
24066
24067 Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
24068
24069 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
24070 distinguish between direct bindings of reference variables, and
24071 indirect bindings of reference variables.
24072 * cvt.c (build_up_reference): Use it.
24073 * typeck.c (convert_arguments): Use it to indicate this is an
24074 indirect binding.
24075 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
24076 as they are unused.
24077 (expand_static_init): Likewise.
24078 (cplus_expand_expr_stmt): Likewise.
24079 * decl2.c (finish_file): Likewise.
24080 * init.c (perform_member_init): Likewise.
24081 (emit_base_init): Likewise.
24082 (expand_aggr_vbase_init_1): Likewise.
24083
24084 Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24085
24086 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
24087 get a DECL_LANG_SPECIFIC node.
24088 * cp-tree.h (lang_decl_flags): Add new member `level'.
24089 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
24090 decl_flags level member.
24091
24092 Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24093
24094 * call.c (build_method_call): Make sure instance has a
24095 TYPE_LANG_SPECIFIC node before we dive into it.
24096
24097 Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
24098
24099 * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
24100
24101 Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
24102
24103 * decl.c (duplicate_decls): When smashing decls, smash staticness in
24104 the usual way.
24105
24106 Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
24107
24108 * decl.c (poplevel): Handle the merging of subblocks of cleanups
24109 when finishing blocks that have already been created (usually due to
24110 the fixup goto code). Fixes bad debugging information.
24111
24112 Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
24113
24114 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
24115 that's not a list of overloaded functions.
24116
24117 Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24118
24119 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
24120 before trying to use DECL_ABSTRACT_VIRTUAL_P.
24121
24122 Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
24123
24124 * decl2.c (mark_used): New function for hooking into setting of
24125 TREE_USED on decls.
24126 * call.c (build_method_call): Use it.
24127 * class.c (instantiate_type): Likewise.
24128 * init.c (build_offset_ref): Likewise. Don't call assemble_external
24129 for all like-named functions.
24130 * method.c (hack_identifier): Likewise.
24131 (emit_thunk): Don't call assemble_external.
24132 (make_thunk): Create thunk as a FUNCTION_DECL so that it
24133 gets the right mode and ENCODE_SECTION_INFO works.
24134
24135 * parse.y: Use mark_used. Pass operator names to do_identifier.
24136 * lex.c (do_identifier): Handle operator names.
24137
24138 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
24139
24140 Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24141
24142 * errfn.c: Include stdio.h.
24143 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
24144
24145 Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
24146
24147 * typeck2.c (digest_init): Always convert initializers to the
24148 right type.
24149
24150 Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
24151
24152 * init.c (member_init_ok_or_else): Don't allow member initializers
24153 for indirect members, as it is invalid.
24154
24155 Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24156
24157 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
24158
24159 Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
24160
24161 * parse.y (for.init.statement): Catch compound statements inside for
24162 initializations, if we're being pedantic.
24163
24164 Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
24165
24166 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
24167 looking for.
24168
24169 Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
24170
24171 * error.c (dump_expr): Don't core dump when a boolean expression is
24172 used as a default argument.
24173
24174 Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
24175
24176 * class.c (finish_struct_bits): Check aggregate_value_p instead of
24177 RETURN_IN_MEMORY.
24178
24179 Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
24180
24181 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
24182 BLKmode type that would otherwise be returned in registers.
24183
24184 Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24185
24186 * g++.c (WITHLIBC): New macro.
24187 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
24188 saw_libc and pass it at the end if it was set.
24189
24190 Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24191
24192 * parse.y (fn.def1): Call split_specs_attrs in
24193 declmods notype_declarator case.