alias.c (lang_get_alias_set): Remove.
[gcc.git] / gcc / cp / ChangeLog
1 2000-06-02 Richard Henderson <rth@cygnus.com>
2
3 * decl.c (init_decl_processing): Don't set lang_get_alias_set.
4
5 2000-06-02 Jason Merrill <jason@casey.soma.redhat.com>
6
7 * decl.c (store_return_init): Call put_var_into_stack.
8
9 2000-06-01 Mark Mitchell <mark@codesourcery.com>
10
11 * cp-tree.h (lang_decl_flags): Add anticipated_p.
12 (DECL_ANTICIPATED): Use it.
13
14 2000-06-01 Richard Henderson <rth@cygnus.com>
15
16 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
17
18 2000-06-01 Richard Henderson <rth@cygnus.com>
19
20 * decl2.c (unsupported_options): Fix typo, make const.
21 (lang_decode_option): Fix bsearch argument order.
22
23 2000-06-01 Mark Mitchell <mark@codesourcery.com>
24
25 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
26 on FIELD_DECLs.
27
28 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
29
30 * cp-tree.h (c_get_alias_set): Deleted.
31 * Makefile.in (decl.o): Include ../expr.h.
32 * decl.c (expr.h): Include.
33 (init_decl_processing): Call record_component_aliases for arrays.
34 (grokdeclarator): Likewise.
35 Set TREE_ADDRESSABLE for fields that aren't bitfields.
36 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
37
38 2000-05-31 Mark Mitchell <mark@codesourcery.com>
39
40 Remove guiding declaration support.
41 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
42 (flag_guiding_decls): Remove.
43 * call.c (build_user_type_conversion_1): Remove support for
44 guiding decls.
45 (build_new_function_call): Likewise.
46 (build_new_op): Likewise.
47 (build_new_method_call): Likewise.
48 * decl.c (start_function): Likewise.
49 * friend.c (is_friend): Likewise.
50 (do_friend): Likewise.
51 * decl2.c ((flag_dump_translation_unit): Make it const.
52 (flag_guiding_decls): Remove.
53 (unsupported_options): New variable
54 (compare_options): New function.
55 (lang_decode_option): Use them.
56
57 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
58
59 * method.c (mangle_expression): Adjust test for legal expression
60 operators.
61
62 * pt.c (instantiate_decl): Save and restore the local
63 specializations list.
64
65 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
66
67 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
68
69 2000-05-30 Mark Mitchell <mark@codesourcery.com>
70
71 * call.c (add_template_candidate_real): Handle member template
72 constructors for classes with virtual bases.
73 (build_user_type_conversion_1): Use in_charge_arg_for_name.
74 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
75
76 * ir.texi: Update thunk documentation.
77
78 * call.c (joust): Fix handling of overloaded builtin operators.
79
80 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
81
82 * cp-tree.h (DECL_ANTICIPATED): New macro.
83 Document new use of DECL_LANG_FLAG_7.
84 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
85 in the user namespace.
86 * lex.c (do_identifier): If the identifier's declaration has
87 DECL_ANTICIPATED on, it has not yet been declared. But do not
88 replace it with an ordinary implicit declaration.
89
90 * tinfo2.cc: Include stdlib.h.
91
92 2000-05-29 Mark Mitchell <mark@codesourcery.com>
93
94 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
95 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
96 CLASSTYPE_ALIGN.
97
98 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
99
100 * decl2.c (lang_decode_option): Use skip_leading_substring instead
101 of plain strncmp.
102
103 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
104
105 * operators.def (<?): Duplicated, should have been...
106 (>?): this. Fixed.
107
108 2000-05-27 Alex Samuel <samuel@codesourcery.com>
109 Mark Mitchell <mark@codesourcery.com>
110
111 * cp-tree.h (ansi_opname): Make it a macro.
112 (ansi_assopname): Likewise.
113 (struct lang_decl_flags): Add assignment_operator_p.
114 (struct lang_decl): Add operator_code.
115 (DECL_VTT_PARM): Adjust.
116 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
117 overloaded operator.
118 (SET_OVERLOADED_OPERATOR_CODE): New macro.
119 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
120 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
121 (opname_tab): Remove.
122 (assignop_tab): Likewise.
123 (operator_name_info_t): New type.
124 (operator_name_info): New variable.
125 (assignment_operator_name_info): Likewise.
126 (build_cp_library_fn): Remove declaration.
127 (push_cp_library_fn): Likewise.
128 (operator_name_string): Likewise.
129 (build_decl_overload): Likewise.
130 * call.c (print_z_candidates): Simplify.
131 (build_object_call): Adjust usage of ansi_opname. Use
132 DECL_OVERLOADED_OPERATOR_P.
133 (op_error): Adjust operator name lookup.
134 (build_conditional_expr): Adjust usage of ansi_opname.
135 (build_new_op): Likewise.
136 (build_op_delete_call): Likewise.
137 (build_over_call): Likewise.
138 (joust): Use DECL_OVERLOADED_OPERATOR_P.
139 * decl.c (duplicate_decls): Copy operator_code.
140 (init_decl_processing): Adjust parameters to push_cp_library_fn.
141 (builtin_function): Adjust parameters to build_library_fn_1.
142 (build_library_fn_1): Accept an overloaded operator code.
143 (build_library_fn): Pass ERROR_MARK.
144 (build_cp_library_fn): Accept an overloaded operator code.
145 (push_cp_library_fn): Likewise.
146 (grokfndecl): Tweak.
147 (grokdeclarator): Simplify code to compute names of overloaded
148 operators. Adjust use of ansi_opname.
149 (ambi_op_p): Work on tree_codes, not identifiers.
150 (unary_op_p): Likewise.
151 (grok_op_properties): Likewise.
152 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
153 (lang_mark_tree): Don't try to mark the operator_code.
154 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
155 * error.c (dump_decl): Remove special handling for operator
156 names.
157 (dump_function_name): Likewise.
158 (dump_expr): Adjust name lookup of operators.
159 (op_to_string): Simplify.
160 (assop_to_string): Likewise.
161 * init.c (build_new_1): Adjust use of ansi_opname.
162 * lex.c (opname_tab): Remove.
163 (assignop_tab): Likewise.
164 (ansi_opname): Likewise.
165 (ansi_assopname): Likewise.
166 (operator_name_string): Likewise.
167 (reinit_lang_specific): Likewise.
168 (operator_name_info): New variable.
169 (assignment_operator_name_info): Likewise.
170 (init_operators): New function.
171 (init_parse): Use it.
172 (do_identifier): Adjust use of ansi_opname.
173 * method.c (mangle_expression): Don't use ansi_opname for
174 mangling.
175 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
176 (build_decl_overload): Remove.
177 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
178 (do_build_assign_ref): Adjust use of ansi_opname.
179 (synthesize_method): Likewise.
180 (implicitly_declare_fn): Likewise.
181 * operators.def: New file.
182 * parse.y (operator): Adjust use of ansi_opname.
183 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
184 (set_mangled_name_for_template_decl): Don't play games with
185 current_namespace.
186 (special_function_p): Adjust use of ansi_opname.
187 * typeck.c (check_return_expr): Likewise.
188 * Make-lang.in (cc1plus): Depend on operators.def.
189 * Makefile.in (lex.o): Likewise.
190 (decl.o): Likewise.
191
192 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
193
194 * Make-lang.in (cplib2.ready): Eradicate.
195
196 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
197
198 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
199 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
200 (built_min, cp_tree_equal): Likewise.
201
202 2000-05-26 Mark Mitchell <mark@codesourcery.com>
203
204 * class.c (layout_nonempty_base_or_field): Replace
205 `record_layout_info' with `record_layout_info_s'.
206
207 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
208
209 Fix goto checking.
210 * cp-tree.h (struct language_function): x_named_labels is now
211 a struct named_label_list*.
212 * decl.c (struct named_label_use_list): Renamed from...
213 (struct named_label_list): ...this. New struct.
214 (push_binding_level): Don't set eh_region.
215 (note_level_for_eh): New fn.
216 (pop_label): Take label and old value directly.
217 (pop_labels): Adjust for new named_labels format.
218 (lookup_label): Likewise.
219 (poplevel): Note characteristics of a binding level containing a
220 named label. Mess with named label lists earlier.
221 (mark_named_label_lists): New fn.
222 (mark_lang_function): Call it.
223 (use_label): New fn, split out from...
224 (make_label_decl): ...here. Don't call it.
225 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
226 check_previous_gotos): New fns, split out from...
227 (define_label): ...here.
228 (check_switch_goto): New fn.
229 (define_case_label): Call it.
230 (check_goto): New fn.
231 * semantics.c (finish_goto_stmt): Call it and use_label.
232 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
233 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
234
235 2000-05-26 Mark Mitchell <mark@codesourcery.com>
236
237 * class.c (build_vtable_entry_ref): Correct usage of
238 get_vtbl_decl_for_binfo.
239
240 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
241 * method.c (implicitly_declare_fn): Not here.
242
243 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
244
245 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
246 (CPTI_PTMD_DESC_TYPE): ... here.
247 (ptmd_desc_type_node): Rename to ...
248 (ptm_desc_type_node): ... here.
249 * decl.c: Likewise.
250 * rtti.c (ptmd_initializer): Rename to ...
251 (ptm_initializer): ... here.
252 (sythesize_tinfo_var): Adjust. Deal with pointer to member
253 function.
254 (create_tinfo_types): Adjust.
255
256 2000-05-25 Mark Mitchell <mark@codesourcery.com>
257
258 Finish implementation of VTTs.
259 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
260 CPTI_VTT_PARM_IDENTIFIER.
261 (vtt_parm_identifier): New macro.
262 (vtt_parm_type): Likewise.
263 (BINFO_SUBVTT_INDEX): Likewise.
264 (BINFO_VPTR_INDEX): Likewise.
265 (struct lang_decl): Add vtt_parm.
266 (DECL_VTT_PARM): New macro.
267 (DECL_USE_VTT_PARM): Likewise.
268 (DECL_NEEDS_VTT_PARM_P): Likewise.
269 (get_vtt_name): Declare.
270 (build_artifical_parm): Likewise.
271 (fixup_all_virtual_upcast_offsets): Likewise.
272 (expand_indirect_vtbls_init): Remove.
273 * call.c (build_new_method_call): Pass the vtt to subobject
274 constructors and destructors.
275 * class.c (get_vtt_name): Give it external linkage.
276 (build_clone): Handle the magic VTT parameters for clones.
277 (clone_function_decl): Fix typo in comment.
278 (build_vtt): Keep track of the indices in the VTTs where various
279 entities are stored.
280 (build_vtt_inits): Likewise.
281 (dfs_build_vtt_inits): Likewise.
282 (build_ctor_vtbl_group): Tweak type of construction vtables.
283 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
284 primary bases, when building construction vtables.
285 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
286 (initialize_predefined_identifiers): Add vtt_parm_identifier.
287 (init_decl_processing): Initialize vtt_parm_type.
288 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
289 (lang_mark_tree): Make vtt_parm.
290 * decl2.c (build_artificial_parm): New function.
291 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
292 (grokclassfn): Use build_artificial_parm.
293 * init.c (initialize_vtbl_ptrs): Call
294 fixup_all_virtual_upcast_offsets directly.
295 (perform_member_init): Use the complete subobject destructor for
296 member cleanups.
297 (build_vtbl_address): New function.
298 (expand_virtual_init): Handle VTTs.
299 * optimize (maybe_clone_body): Likewise.
300 * search.c (fixup_all_virtual_upcast_offsets): Give it external
301 linkage.
302 (expand_indirect_vtbls_init): Remove.
303 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
304 * tree.c (make_binfo): Make them bigger.
305
306 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
307
308 * inc/cxxabi.h (__pbase_type_info): Define, based on
309 __pointer_type_info.
310 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
311 (__pointer_to_member_type_info): Likewise.
312 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
313 (__pointer_to_member_type_info::__is_pointer_p): Remove.
314 (__pointer_type_info::__do_catch): Rename to ...
315 (__pbase_type_info::__do_catch): ... here. Adjust.
316 (__pbase_type_info::__pointer_catch): Implement.
317 (__pointer_type_info::__pointer_catch): Adjust.
318 (__pointer_to_member_type_info::__pointer_catch): Adjust.
319
320 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
321
322 * tinfo.h (__user_type_info::contained_virtual_p): New
323 predicate.
324 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
325 shaped heirarchy.
326 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
327 diamond shaped heirarchy. Add early out for mixed diamond and
328 duplicate shaped heirarchy.
329
330 2000-05-24 Mark Mitchell <mark@codesourcery.com>
331
332 * cp-tree.h (build_delete): Change prototype.
333 (build_vec_delete): Likewise.
334 * call.c (build_scoped_method_call): Use special_function_kind
335 values to indicate the kind of destruction to be done.
336 (build_method_call): Likewise.
337 * decl.c (finish_destructor_body): Likewise.
338 (maybe_build_cleanup_1): Likewise. Rename to ...
339 (maybe_build_cleanup): ... this.
340 * decl2.c (delete_sanity): Use special_function_kind
341 values to indicate the kind of destruction to be done.
342 (build_cleanup): Likewise.
343 * init.c (perform_member_init): Likewise.
344 (build_vec_delete_1): Likewise.
345 (build_dtor_call): Simplify.
346 (build_delete): Use special_function_kind
347 values to indicate the kind of destruction to be done.
348 (build_vbase_delete): Likewise.
349 (build_vec_delete): Likewise.
350
351 * init.c (sort_member_init): Fix typo in error message generation
352 code.
353
354 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
355
356 * semantics.c (begin_class_definition): make the packed
357 attribute be sensitive to the "-fpack-struct" command line flag
358
359 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
360
361 Update new-abi upcast algorithm.
362 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
363 prototype and meaning of return value.
364 (__si_class_type_info::__do_upcast): Likewise.
365 (__vmi_class_type_info::__do_upcast): Likewise.
366 * tinfo.cc (__class_type_info::__upcast_result): Replace
367 whole2dst with part2dst. Adjust ctor.
368 (__class_type_info::__do_upcast): Adjust call of worker function.
369 (__class_type_info::__do_upcast): Adjust.
370 (__si_class_type_info::__do_upcast): Adjust. Use parent's
371 __do_upcast.
372 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
373 virtual base in diamond heirarchy bug.
374
375 2000-05-23 Mark Mitchell <mark@codesourcery.com>
376
377 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
378 and bitfield to tinfo_fn_p.
379 (DECL_TINFO_FN_P): Adjust.
380 (SET_DECL_TINFO_FN_P): Likewise.
381 (DECL_MUTABLE_P): Likewise.
382 (DECL_C_BIT_FIELD): Likewise.
383 (SET_DECL_C_BIT_FIELD): Likewise.
384 (CLEAR_DECL_C_BIT_FIELD): Likewise.
385 (DECL_UNINLINABLE): Likewise.
386 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
387 (handle_using_decl): Remove assertion.
388 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
389 to build FIELD_DECLs.
390 (build_base_field): Likewise.
391 (layout_class_type): Likewise.
392 * decl.c (init_decl_processing): Likewise.
393 (build_ptrmemfunc_type): Likewise.
394 (grokdeclarator): Likewise.
395 * decl2.c (grok_x_components): Likewise.
396 * except.c (call_eh_info): Likewise.
397 * init.c (init_init_processing): Likewise.
398 * rtti.c (expand_class_desc): Likewise.
399 (create_pseudo_type_info): Likewise.
400 (get_vmi_pseudo_type_info): Likewise.
401 (create_tinfo_types): Likewise.
402 * ptree.c (print_lang_decl): Adjust.
403 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
404 before checking DECL_MUTABLE_P.
405
406 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
407 parameters for template functions.
408 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
409 destructors as well as constructors.
410
411 2000-05-22 Mark Mitchell <mark@codesourcery.com>
412
413 * class.c (build_ctor_vtbl_group): Set inits.
414 * optimize.c (maybe_clone_body): Set DECL_INLINE and
415 DECL_THIS_INLINE appropriately for clones.
416
417 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
418 (DECL_CONV_FN_P): Simplify.
419 (DECL_OPERATOR): Remove.
420 (language_to_string): Declare.
421 * decl.c (duplicate_decls): Fix typo in comment.
422 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
423 (grok_op_properties): Use DECL_CONV_FN_P instead of
424 IDENTIFIER_TYPENAME_P.
425 * dump.c (dequeue_and_dump): Dump the language linkage of
426 declarations.
427 * error.c (language_to_string): Give it external linkage.
428 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
429 (implicitly_declare_fn): Set DECL_LANGUAGE.
430 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
431 IDENTIFIER_TYPENAME_P.
432 (tsubst_decl): Likewise.
433 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
434 * semantics.c (finish_member_declaration): Don't mark members of
435 classes declared in an extern "C" region as extern "C".
436
437 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
438
439 * decl2.c (qualified_lookup_using_namespace): Look through
440 namespace aliases.
441
442 * decl.c (push_using_decl): Return the old decl on namespace level.
443
444 2000-05-21 Mark Mitchell <mark@codesourcery.com>
445
446 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
447 (VTT_NAME_PREFIX): New macro.
448 (CTOR_VTBL_NAME_PREFIX): Likewise.
449 (get_ctor_vtbl_name): New function.
450 * class.c (get_vtable_name): Simplify.
451 (get_vtt_name): New function.
452 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
453 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
454 when a virtual base becomes primary.
455 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
456 VTTs.
457 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
458 additional parameters.
459 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
460 (initialize_array): New function.
461 (build_vtt): Likewise.
462 (build_vtt_inits): Likewise.
463 (dfs_build_vtt_inits): Likewise.
464 (dfs_fixup_binfo_vtbls): Likewise.
465 (build_ctor_vtbl_group): Likewise.
466 (initialize_vtable): Use initialize_array.
467 (accumulate_vtbl_inits): Reimplement to handle construction
468 vtables.
469 (dfs_accumulate_vtbl_inits): Likewise.
470 (bulid_vtbl_initializer): Adjust parameter name.
471 * method.c (build_typename_overload): Remove #if 0'd code.
472 (get_ctor_vtbl_name): New function.
473 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
474 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
475
476 * cp-tree.h (struct lang_type): Remove search_slot.
477 (CLASSTYPE_SEARCH_SLOT): Remove.
478 (emit_base_init): Change prototype.
479 (initialize_vtbl_ptrs): Likewise.
480 (expand_indirect_vtbls_init): Likewise.
481 (clear_search_slots): Remove.
482 * decl.c (lang_mark_tree): Don't mark search_slot.
483 * init.c (initialize_vtbl_ptrs): Simplify.
484 (emit_base_init): Likewise.
485 * search.c (struct vbase_info): Document decl_ptr.
486 (convert_pointer_to_single_level): Remove.
487 (dfs_find_vbases): Remove.
488 (dfs_init_base_pointers): Simplify.
489 (dfs_clear_vbase_slots): Remove.
490 (dfs_vtable_path_unmark): New function.
491 (init_vbase_pointers): Simplify.
492 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
493 (expand_indirect_vtbls_init): Simplify. Don't call
494 mark_all_temps_used.
495 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
496 initialize_vtbl_ptrs.
497
498 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
499
500 * except.c: Add static prototypes.
501
502 2000-05-20 H.J. Lu <hjl@gnu.org>
503
504 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
505
506 2000-05-19 Mark Mitchell <mark@codesourcery.com>
507
508 Don't create a separate copy of virtual bases for the
509 CLASSTYPE_VBASECLASSES list.
510 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
511 (BINFO_FOR_VBASE): Remove.
512 (CANONICAL_BINFO): Adjust.
513 (binfo_for_vbase): New function.
514 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
515 instead of BINFO_FOR_VBASE.
516 (build_vbase_pointer): Likewise.
517 (build_secondary_vtable): Likewise.
518 (dfs_mark_primary_bases): Likewise.
519 (mark_primary_bases): Likewise.
520 (layout_nonempty_base_or_field): Likewise.
521 (dfs_set_offset_for_shared_vbases): Likewise.
522 (dfs_set_offset_for_unshared_vbases): Likewise.
523 (layout_virtual_bases): Likewise. Adjust for changes to the
524 CLASSTYPE_VBASECLASSES list.
525 (dump_class_hierarchy_r): Use binfo_for_vbase
526 instead of BINFO_FOR_VBASE.
527 (dump_class_hierarchy): Likewise.
528 (finish_vtbls): Likewise.
529 (build_vtbl_initializer): Adjust for changes to the
530 CLASSTYPE_VBASECLASSES list.
531 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
532 * decl.c (finish_destructor_body): Adjust for changes to the
533 CLASSTYPE_VBASECLASSES list.
534 * init.c (sort_base_init): Use binfo_for_vbase.
535 (construct_virtual_bases): Adjust for changes to the
536 CLASSTYPE_VBASECLASSES list.
537 (expand_member_init): Use binfo_for_vbase.
538 (build_vbase_delete): Adjust for changes to the
539 CLASSTYPE_VBASECLASSES list.
540 * method.c (do_build_copy_constructor): Likewise.
541 * rtti.c (get_base_offset): Use binfo_for_vbase.
542 (expand_class_desc): Remove #if 0'd code.
543 * search.c (struct vbase_info): Remove vbase_types.
544 (get_base_distance): Use binfo_for_vbase.
545 (lookup_field_queue_p): Use CANONICAL_BINFO.
546 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
547 (get_pure_virtuals): Adjust for changes to the
548 CLASSTYPE_VBASECLASSES list.
549 (dfs_find_vbases): Use binfo_for_vbase.
550 (dfs_init_vbase_pointers): Likewise.
551 (init_vbase_pointers): Don't initialize vi.vbase_types.
552 (virtual_context): Use binfo_for_vbase.
553 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
554 CLASSTYPE_VBASECLASSES list.
555 (expand_indirect_vtbls_init): Simplify.
556 (dfs_get_vbase_types): Don't replicate virtual bases.
557 (find_vbase_instance): Use binfo_for_vbase.
558 (binfo_for_vbase): New function.
559 * typeck.c (get_delta_difference): Use binfo_for_vbase.
560
561 2000-05-17 Mark Mitchell <mark@codesourcery.com>
562
563 * decl2.c (finish_anon_union): Generalize error messages to handle
564 anonymous structures.
565 * init.c (perform_member_init): Remove `name' parameter.
566 (build_field_list): New function.
567 (sort_member_init): Handle anonymous union initialization order
568 correctly. Check for multiple initializations of the same union.
569 (emit_base_init): Don't look up fields by name here.
570 (expand_member_init): Record the result of name lookup for future
571 reference.
572 * typeck.c (build_component_ref): Fix formatting.
573
574 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
575
576 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
577 * typeck.c (build_x_compound_expr): Replace warn_unused with
578 warn_unused_value.
579
580 * decl2.c (lang_decode_option): Update -Wall unused flags by
581 calling set_Wunused.
582
583 2000-05-16 Mark Mitchell <mark@codesourcery.com>
584
585 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
586 * init.c (dfs_vtable_path_unmark): Remove.
587 * search.c (marked_new_vtable_p): Likewise.
588 (unmarked_new_vtable_p): Likewise.
589 (dfs_search_slot_nonempty_p): Likewise.
590 (dfs_mark): Likewise.
591 (dfs_vtable_path_unmark): Likewise.
592 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
593 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
594 (dfs_init_vbase_pointers): Remove special-case new ABI code.
595 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
596 (init_vbase_pointers): Simplify.
597 (expand_indirect_vtbls_init): Likewise.
598
599 * class.c (copy_virtuals): New function.
600 (build_primary_table): Use it.
601 (build_secondary_vtable): Likewise.
602 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
603 indicate that no vcall offset is required.
604 (add_virtual_function): Likewise.
605 (modify_all_vtables): Likewise.
606 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
607 (dfs_accumulate_vtbl_inits): Likewise.
608 (build_vtbl_initializer): Make changes to handle construction
609 vtables.
610 (dfs_build_vcall_offset_vtbl_entries): Likewise.
611 (build_rtti_vtbl_entries): Likewise.
612 (build_vtable_entries): Handle a NULL vcall_index.
613
614 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
615
616 * decl2.c (lang_decode_option): Fix thinko.
617
618 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
619
620 * except.c (check_handlers): New fn.
621 * cp-tree.h: Declare it.
622 * semantics.c (finish_handler_sequence): Call it.
623 (finish_function_handler_sequence): Likewise.
624 (finish_handler_parms): Set TREE_TYPE on the handler.
625 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
626 * search.c (get_base_distance_recursive): If protect>1, ignore
627 special access.
628 (get_base_distance): Don't reduce watch_access.
629
630 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
631
632 * lex.c: #include diagnostic.h.
633 (lang_init_options): Set default prefixing rules.
634
635 * lang-options.h: Add -fdiagnostics-show-location=.
636
637 * decl2.c: #include diagnostic.h.
638 (lang_decode_option): Handle -fdiagnostics-show-location=.
639
640 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
641
642 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
643 * vec.cc: Revert my 2000-05-07 change.
644
645 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
646
647 * class.c (check_field_decls): Complain about non-static data
648 members with same name as class in class with constructor.
649
650 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
651
652 * decl.c (grokdeclarator): Allow non-static data members with
653 same name as class.
654
655 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
656
657 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
658 and pending_inline.filename. Update prototypes.
659 * decl.c (define_label): Constify filename parameter.
660 * decl2.c (warn_if_unknown_interface): Constify local char *.
661 * input.c Constify input_source.filename. Don't declare
662 input_filename or lineno. Constify filename parameter to feed_input.
663 * lex.c (init_parse): Constify parameter and return value.
664 (cp_pragma_interface, cp_pragma_implementation): Constify
665 filename argument.
666 (reinit_parse_for_method, reinit_parse_for_block,
667 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
668 Constify local char *.
669 * pt.c: Don't declare lineno or input_filename.
670 (print_template_context, tsubst_friend_function, tsubst_decl,
671 tsubst, instantiate_decl): Constify local char *.
672 * semantics.c (expand_body): Constify local char *.
673 * tree.c (build_srcloc): Constify filename parameter.
674 * typeck.c (c_expand_asm_operands): Constify filename
675 parameter.
676
677 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
678
679 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
680 offsetof expansion.
681
682 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
683
684 * inc/cxxabi.h: Fix typos in comment.
685 (__base_class_info::__offset): Use a static_cast.
686
687 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
688
689 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
690 of std::size_t and std::ptrdiff_t respectively.
691 * tinfo.cc: Likewise.
692 * vec.cc: Likewise.
693
694 2000-05-06 Richard Henderson <rth@cygnus.com>
695
696 * typeck.c (build_c_cast): Don't warn integer->pointer size
697 mismatch for constants.
698
699 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
700
701 * rtti.c (ptmd_initializer): Set non-public, if class is
702 incomplete.
703
704 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
705 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
706 __cxa_vec_delete): Likewise.
707 * tinfo.cc (__dynamic_cast): Likewise.
708 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
709 __cxa_vec_delete): Likewise.
710
711 2000-05-04 Mark Mitchell <mark@codesourcery.com>
712
713 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
714 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
715 (lang_decl_flags): Add vcall_offset.
716 (THUNK_VCALL_OFFSET): Use it.
717 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
718 * method.c (make_thunk): Create the lang_decl here, not in
719 emit_thunk.
720 (emit_thunk): Make generic thunks into ordinary functions once
721 they have been fed to expand_body.
722 * semantics.c (expand_body): Set current_function_is_thunk here.
723
724 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
725
726 * class.c (update_vtable_entry_for_fn): Prototype.
727
728 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
729 and `tmpl'.
730
731 * search.c (dfs_build_inheritance_graph_order): Prototype.
732
733 2000-05-04 Mark Mitchell <mark@codesourcery.com>
734
735 * cp-tree.h (special_function_kind): Add various kinds of
736 destructors.
737 (special_function_p): New function.
738 * class.c (overrides): Don't let one kind of destructor override
739 another.
740 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
741 whether or not to instantiate a template.
742 * tree.c (special_function_p): Define.
743
744 2000-05-03 Mark Mitchell <mark@codesourcery.com>
745
746 * cp-tree.def (THUNK_DECL): Remove.
747 * cp-tree.h (DECL_THUNK_P): New macro.
748 (DECL_NON_THUNK_FUNCTION_P): Likewise.
749 (DECL_EXTERN_C_FUNCTION_P): Likewise.
750 (SET_DECL_THUNK_P): Likewise.
751 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
752 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
753 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
754 * decl.c (decls_match): Use DECL_EXTERN_C_P.
755 (duplicate_decls): Likewise.
756 (pushdecl): Likewise. Adjust thunk handling.
757 (grokfndecl): Use DECL_EXTERN_C_P.
758 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
759 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
760 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
761 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
762 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
763 DECL_NO_STATIC_CHAIN.
764 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
765 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
766 * search.c (covariant_return_p): Remove THUNK_DECL handling.
767 * ir.texi: Update.
768
769 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
770
771 * tree.c (walk_tree): Set lineno.
772
773 2000-05-01 Mark Mitchell <mark@codesourcery.com>
774
775 * exception.cc: Update license notice.
776 * new.cc: Likewise.
777 * new1.cc: Likewise.
778 * new2.cc: Likewise.
779 * tinfo.cc: Likewise.
780 * tinfo2.cc: Likewise.
781 * vec.cc: Likewise.
782 * inc/cxxabi.h: Likewise.
783 * inc/exception: Likewise.
784 * inc/new: Likewise.
785 * inc/new.h: Likewise.
786 * inc/typeinfo: Likewise.
787
788 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
789
790 * tree.c (build_target_expr_with_type): If we already have a
791 TARGET_EXPR, just return it.
792
793 * optimize.c (initialize_inlined_parameters): Don't generate an
794 EXPR_STMT if we can just use DECL_INITIAL.
795 * decl.c (emit_local_var): Only make the initialization a
796 full-expression if stmts_are_full_exprs_p.
797
798 2000-05-01 Mark Mitchell <mark@codesourcery.com>
799
800 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
801 macro.
802 * call.c (standard_conversion): Use it.
803 (direct_reference_binding): Likewise.
804 (build_over_call): Likewise.
805 (is_properly_derived_from): Likewise.
806 (compare_ics): Likewise.
807 * class.c (resolves_to_fixed_type_p): Likewise.
808 * optimize.c (declare_return_variable): Likewise.
809 * pt.c (is_specialization_of): Likewise.
810 (unify): Likewise.
811 * typeck.c (comp_target_parms): Likeiwse.
812 (build_static_cast): Likewise.
813 (build_reinterpret_cast): Likewise.
814 (build_const_cast): Likewise.
815 (comp_ptr_ttypes_real): Likewise.
816 (comp_ptr_ttypes_const): Likewise.
817 * typeck2.c (process_init_constructor): Likewise.
818
819 2000-04-30 Scott Snyder <snyder@fnal.gov>
820
821 * decl.c (finish_destructor_body): Use the base destructor when
822 destroying virtual bases.
823
824 2000-04-30 Mark Mitchell <mark@codesourcery.com>
825
826 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
827 STMT_EXPRs.
828 * optimize.c (struct inline_data): Add target_exprs field.
829 (declare_return_variable): When a function returns an aggregate,
830 use the variable declared in the TARGET_EXPR as the remapped
831 DECL_RESULT.
832 (expand_call_inline): Update the pending target_exprs stack.
833 (optimize_function): Initialize the stack.
834
835 * decl2.c (finish_file): Fix typo in comment.
836
837 * method.c (emit_thunk): Don't try to return a `void' value.
838
839 * optimize.c (initialize_inlined_parameters): If the parameter is
840 addressable, we need to make a new VAR_DECL, even if the
841 initializer is constant.
842
843 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
844
845 * decl.c (grok_op_properties): Add an extra check of argtypes.
846
847 2000-04-27 Mark Mitchell <mark@codesourcery.com>
848
849 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
850 variables.
851 (initialize_inlined_parameters): Try to avoid creating new
852 VAR_DECLs.
853
854 2000-04-27 Alex Samuel <samuel@codesourcery.com>
855
856 * lex.c (my_get_run_time): Remove.
857 (init_filename_times): Use get_run_time instead of my_get_run_time.
858 (check_newline): Likewise.
859 (dump_time_statistics): Likewise.
860 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
861 of computing elapsed time explicitly.
862
863 2000-04-26 Mark Mitchell <mark@codesourcery.com>
864
865 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
866 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
867 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
868 before calling decl_constant_value.
869 * class.c (check_bitfield_decl): Likewise.
870 * cvt.c (ocp_convert): Likewise.
871 (convert): Likewise.
872 * decl.c (compute_array_index_type): Likewise.
873 (build_enumerator): Likewise.
874 * decl2.c (check_cp_case_value): Likewise.
875 * pt.c (convert_nontype_argument): Likewise.
876 (tsubst): Likewise.
877 * typeck.c (decay_conversion): Likewise.
878 (build_compound_expr): Likewise.
879 (build_reinterpret_cast): Likewise.
880 (build_c_cast): Likewise.
881 (convert_for_assignment): Likewise.
882
883 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
884
885 * decl.c (finish_function): Don't play games with DECL_INLINE.
886
887 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
888
889 * ir.texi: Correct typo.
890
891 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
892
893 * decl.c (grokdeclarator): Reject VLAs as members.
894
895 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
896
897 * call.c (standard_conversion): Accept conversion between
898 COMPLEX_TYPEs.
899
900 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
901
902 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
903
904 * decl2.c (finish_file): Remove double setup for accounting
905 compile time.
906
907 2000-04-24 Robert Lipe <robertlipe@usa.net>
908
909 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
910
911 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
912
913 * new.cc (set_new_handler): Needs to be in std::.
914
915 2000-04-23 Mark Mitchell <mark@codesourcery.com>
916
917 * cp-tree.h (lang_decl): Remove pretty_function_p.
918 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
919 language-specific node.
920 * decl.c (cp_make_fname_decl): Use build_decl, not
921 build_lang_decl, to build the variables.
922 (grokvardecl): Don't call build_lang_decl for local variables in
923 templates.
924 (grokdeclarator): Don't call build_lang_decl for local type
925 declarations in templates.
926 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
927 zero'd memory, rather than calling memset.
928 * pt.c: Include hashtab.h.
929 (local_specializations): New variable.
930 (retrieve_local_specialization): Use it.
931 (register_local_specialization): Likewise.
932 (tsubst_decl): Don't assume local variables have
933 DECL_LANG_SPECIFIC.
934 (instantiate_decl): Set up local_specializations.
935 * Makefile.in (HTAB_H): New variable.
936
937 2000-04-23 Richard Henderson <rth@cygnus.com>
938
939 * typeck.c (c_expand_asm_operands): Restore the original
940 contents of the output list.
941
942 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
943
944 * ir.texi: Document complex number representation.
945
946 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
947
948 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
949 (target_incomplete_p): New function.
950 (tinfo_base_init): Create comdat NTBS name variable.
951 (ptr_initializer): Add non_public parameter. Calculate it.
952 (ptmd_initializer): Likewise.
953 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
954 (create_real_tinfo_var): Add non_public parameter. Use it.
955 Push proxy into global namespace.
956 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
957 New enumeration.
958 * inc/typeinfo (type_info::before, type_info::operator==):
959 Compare __name addresses.
960
961 * tinfo2.cc: Remove new-abi builtins comment.
962
963 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
964
965 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
966
967 * call.c (joust): Exit early if we get the same function, too.
968
969 * decl2.c (key_method): Return NULL_TREE for template classes.
970 (import_export_class): Don't need to check for template classes.
971
972 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
973
974 * lex.c: Remove references to cccp.c.
975
976 2000-04-18 Mark Mitchell <mark@codesourcery.com>
977
978 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
979 volatile_memfunc. Add destructor_attr. Adjust dummy.
980 (DECL_DESTRUCTOR_P): Use destructor_attr.
981 (DECL_CONST_MEMFUNC_P): Reimplement.
982 (DECL_VOLATILE_MEMFUNC_P): Remove.
983 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
984 (overrides): Use DECL_DESTRUCTOR_P.
985 (check_for_override): Likewise.
986 * decl.c (start_function): Likewise.
987 * decl2.c (grokfclassfn): Likewise.
988 (check_classfn): Likewise.
989 (grok_function_init): Likewise.
990
991 2000-04-17 Mark Mitchell <mark@codesourcery.com>
992
993 * decl2.c (grokfield): Issue error on illegal data member
994 declaration.
995
996 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
997
998 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
999
1000 2000-04-16 Mark Mitchell <mark@codesourcery.com>
1001
1002 * class.c (build_vtable_entry): Don't build thunks for type-info
1003 functions.
1004
1005 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
1006
1007 * decl.c (decls_match): Allow a redeclaration of a builtin to
1008 specify args while the builtin did not.
1009
1010 2000-04-15 Mark Mitchell <mark@codesourcery.com>
1011
1012 * cp-tree.def (THUNK_DECL): Add to documentation.
1013 * cp-tree.h (flag_huge_objects): Declare.
1014 * class.c (modify_vtable_entry): Tidy.
1015 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
1016 Calculate delta appropriately for the new ABI.
1017 (dfs_modify_vtables): Use it.
1018 (modify_all_vtables): Fix thinko in code to add overriding copies
1019 of functions to primary vtables.
1020 (build_clone): Fix typo in comment.
1021 (clone_function_decl): Correct order of destructors in vtable.
1022 (build_vbase_offset_vtbl_entries): Adjust comment.
1023 (dfs_vcall_offset_queue_p): Remove.
1024 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
1025 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
1026 (build_vtable_entry): Correct check for pure virtual functions.
1027 Don't declare flag_huge_objects.
1028 * decl.c (flag_huge_objects): Remove declaration.
1029 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
1030 Use int_size_in_bytes.
1031 (emit_thunk): Handle vcall offset thunks.
1032
1033 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1034
1035 * decl2.c (parse_time, varconst_time): Delete declarations.
1036 (finish_file): Delete LINENO declaration.
1037 START_TIME and THIS_TIME now long.
1038
1039 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
1040
1041 * class.c (build_base_field): Reformat comment.
1042
1043 * inc/cxxabi.h (stddef.h): Comment inclusion.
1044 (__base_class_info::__offset): Comment shift.
1045
1046 2000-04-12 Mark Mitchell <mark@codesourcery.com>
1047
1048 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
1049 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
1050 (cp_push_exception_identifier): New macro.
1051 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
1052 (DECL_BASE_DESTRUCTOR_P): Likewise.
1053 (DECL_DELETING_DESTRUCTOR_P): Likewise.
1054 (get_vtbl_decl_for_binfo): Fix formatting.
1055 (in_charge_arg_for_name): New macro.
1056 (maybe_build_cleanup_and_delete): Remove declaration.
1057 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
1058 (in_charge_arg_for_name): New function.
1059 (build_new_method_call): Use it. Handle cloned destructors.
1060 (build_clone): Don't make the base constructor virtual.
1061 Automatically defer generated functions.
1062 (clone_function_decl): Handle destructors, too.
1063 (clone_constructors_and_destructors): Likewise.
1064 (create_vtable_ptr): Don't create a vtable entry for a cloned
1065 function.
1066 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
1067 (initialize_predefined_identifiers): Update appropriately.
1068 (finish_destructor_body): Simplify.
1069 (maybe_build_cleanup_and_delete): Remove.
1070 * except.c (expand_throw): Handle new-ABI destructors.
1071 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
1072 (build_dtor_call): New function.
1073 (build_delete): Use it. Simplify.
1074 * optimize.c (maybe_clone_body): Handle destructors.
1075 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
1076
1077 * exception.cc (cleanup_fn): New typedef.
1078 (CALL_CLEANUP): New macro.
1079 (cp_eh_info): Use them.
1080 (__cp_push_exception): Likewise.
1081 (__cp_pop_exception): Likewise.
1082
1083 2000-04-11 Mark Mitchell <mark@codesourcery.com>
1084
1085 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
1086 (complete_dtor_identifier): New macro.
1087 (CLASSTYPE_FIRST_CONVERSION): Remove.
1088 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
1089 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
1090 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
1091 (CLASSTYPE_CONSTRUCTORS): Likewise.
1092 (CLASSTYPE_DESTRUCTORS): Likewise.
1093 (lang_decl): Add cloned_function.
1094 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
1095 (DECL_BASE_CONSTRUCTOR_P): Likewise.
1096 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
1097 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
1098 (DECL_CLONED_FUNCTION_P): Likewise.
1099 (DECL_CLONED_FUNCTION): Likewise.
1100 (clone_function_decl): Declare.
1101 (maybe_clone_body): Likewise.
1102 * call.c (build_user_type_conversion_1): Call complete object
1103 constructors in the new ABI.
1104 (build_new_method_call): Don't add in-charge parameters under the
1105 new ABI.
1106 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
1107 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
1108 CLASSTYPE_DESTRUCTOR_SLOT.
1109 (build_clone): New function.
1110 (clone_function_decl): Likewise.
1111 (clone_constructors_and_destructors): Likewise.
1112 (check_bases_and_members): Use it.
1113 * decl.c (iniitialize_predefined_identifiers): Initialize
1114 complete_dtor_identifier.
1115 (finish_function): Don't add extra code to a clone.
1116 (lang_mark_tree): Mark cloned_function.
1117 * decl2.c (mark_used): Don't bother trying to instantiate things
1118 we synthesized.
1119 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
1120 * method.c (set_mangled_name_for_decl): Don't treat clones as
1121 constructors.
1122 (synthesize_method): Sythesize cloned functions, not the clones.
1123 * optimize.c (inline_data): Update comment on ret_label.
1124 (remap_block): Don't assume DECL_INITIAL exists.
1125 (copy_body_r): Allow ret_label to be NULL.
1126 (maybe_clone_body): Define.
1127 * pt.c (tsubst_decl): Handle clones.
1128 (instantiate_clone): New function.
1129 (instantiate_template): Use it.
1130 (set_mangled_name_for_template_decl): Don't treat clones as
1131 constructors.
1132 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
1133 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
1134 * semantics.c (expand_body): Clone function bodies as necessary.
1135
1136 * optimize.c (remap_decl): Avoid sharing structure for arrays
1137 whose size is only known at run-time.
1138 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
1139
1140 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
1141 to has_in_charge_parm_p.
1142 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
1143 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
1144 (DECL_COPY_CONSTRUCTOR_P): New macro.
1145 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
1146 (build_user_type_conversion_1): Likewise.
1147 (convert_like_real): Likewise.
1148 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
1149 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
1150 (copy_args_p): Likewise.
1151 (grok_ctor_properties): Likewise.
1152 (start_function): Likewise.
1153 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
1154 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
1155 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
1156 * method.c (do_build_copy_constructor): Use
1157 DECL_HAS_IN_CHARGE_PARM_P.
1158 (synthesize_method): Likewise.
1159 * pt.c (instantiate_template): Remove goto.
1160 * tree.c (build_cplus_method_type): Remove mention of obstacks in
1161 comment.
1162
1163 * cp-tre.h (finish_function): Change prototype.
1164 * decl.c (end_cleanup_fn): Adjust caller.
1165 (finish_function): Take only one parameter.
1166 * decl2.c (finish_objects): Adjust caller.
1167 (finish_static_storage_duration_function): Likewise.
1168 * method.c (emit_thunk): Likewise.
1169 * parse.y: Likewise.
1170 * parse.c: Regenerated.
1171 * pt.c (instantiate_decl): Likewise.
1172 * rtti.c (synthesize_tinfo_fn): Likewise.
1173 * semantics.c (expand_body): Likewise.
1174
1175 * cp-tree.h (copy_decl): New function.
1176 * class.c (finish_struct_1): Use it.
1177 * lex.c (copy_decl): Define it.
1178 * pt.c (tsubst_decl): Likewise.
1179 * tree.c (copy_template_template_parm): Likewise.
1180
1181 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
1182 has_nonpublic_assign_ref.
1183 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
1184 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
1185 * class.c (finish_struct_methods): Don't set
1186 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
1187 (interface_only): Don't declare.
1188 (interface_unknown): Likewise.
1189
1190 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1191
1192 * tree.h (HAVE_TEMPLATES): Remove definition.
1193 * lang-options.h (-fthis-is-variable): Remove documentation.
1194
1195 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
1196
1197 * class.c (instantiate_type): Handle object-relative template-id.
1198
1199 * semantics.c (finish_expr_stmt): Call convert_to_void here.
1200 * decl.c (cplus_expand_expr_stmt): Not here.
1201
1202 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
1203 Initialize exprtype earlier.
1204
1205 * parse.y (fn.def1): Check for defining types in return types.
1206
1207 * decl.c (check_tag_decl): Notice extra fundamental types.
1208 Diagnose empty decls in classes, too.
1209
1210 * decl.c (grokdeclarator): Don't override an anonymous name if no
1211 declarator was given.
1212
1213 * cvt.c (convert_to_void): Call resolve_offset_ref.
1214
1215 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
1216
1217 * decl2.c (decl_namespace): Handle getting a type.
1218
1219 * typeck.c (build_c_cast): Re-enable warning for cast between
1220 pointer and integer of different size.
1221
1222 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
1223
1224 * inc/cxxabi.h (__pointer_type_info): Add restrict and
1225 incomplete flags.
1226 (__pointer_type_info::__pointer_catch): New virtual function.
1227 (__pointer_to_member_type_info): Derive from
1228 __pointer_type_info. Adjust.
1229 (__pointer_to_member_type_info::__do_catch): Remove.
1230 (__pointer_to_member_type_info::__is_pointer_p): Declare.
1231 (__pointer_to_member_type_info::__pointer_catch): Declare.
1232 * rtti.c (qualifier_flags): Add restrict flag.
1233 (ptmd_initializer): Reorder members.
1234 (create_tinfo_types): Expand comments. Reorder
1235 ptmd_desc_type_node members.
1236 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
1237 Implement.
1238 (__pointer_type_info::__do_catch): Move specific code into
1239 __pointer_catch. Call it.
1240 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
1241 specific catch checking. Fix void conversion check.
1242 (__pointer_to_member_type_info::__do_catch): Remove.
1243 (__pointer_to_member_type_info::__pointer_catch): Implement.
1244
1245 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1246
1247 * lex.c (init_parse): Remove traces of classof and headof.
1248 * decl2.c (flag_operator_names): Default to 1.
1249 (lang_decode_option): Do not set it for -ansi.
1250
1251 2000-04-09 Mark Mitchell <mark@codesourcery.com>
1252
1253 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
1254 (DECL_MAIN_VARIANT): Remove.
1255 * decl.c (duplicate_decls): Don't set it.
1256 (start_function): Likewise.
1257 (lang_mark_tree): Don't mark it.
1258 * decl2.c (defer_fn): Don't use it.
1259 * lex.c (retrofit_lang_decl): Don't set it.
1260 * pt.c (tsubst_decl): Likewise.
1261 * ptree.c (print_lang_decl): Don't print it.
1262 * typeck.c (mark_addressable): Don't use it.
1263
1264 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
1265
1266 * vec.cc: Include <new> and <exception>.
1267 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
1268 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
1269 terminate.
1270 (__cxa_vec_delete): Catch dtor exceptions.
1271
1272 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
1273
1274 Prepend __ to implementation defined names.
1275 * inc/typeinfo (type_info): Rename _name to __name.
1276 (type_info::type_info): Rename parameter.
1277 (type_info::operator==, type_info::operator!=,
1278 type_info::before): Likewise.
1279 (type_info::is_pointer_p, type_info::is_function_p,
1280 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
1281 parameters.
1282 * inc/cxxabi.h
1283 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
1284 (__pointer_type_info::__pointer_type_info): Likewise.
1285 (__pointer_type_info::is_pointer_p,
1286 __pointer_type_info::do_catch): Prepend __. Rename parameters.
1287 (__array_type_info::__array_type_info): Rename parameters.
1288 (__function_type_info::__function_type_info): Likewise.
1289 (__function_type_info::is_function_p): Prepend __.
1290 (__enum_type_info::__enum_type_info): Rename parameters.
1291 (__pointer_to_member_type_info::__pointer_to_member_type_info):
1292 Likewise.
1293 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
1294 parameters.
1295 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
1296 (__class_type_info::__class_type_info): Rename parameters.
1297 (__class_type_info::sub_kind): Prepend __. Adjust member names.
1298 (__class_type_info::upcast_result,
1299 __class_type_info::dyncast_result): Prepend __. Move definition
1300 into tinfo.cc.
1301 (__class_type_info::do_upcast, __class_type_info::do_catch,
1302 __class_type_info::find_public_src,
1303 __class_type_info::do_dyncast,
1304 __class_type_info::do_find_public_src): Prepend __. Rename
1305 parameters.
1306 (__si_class_type_info::__si_class_type_info): Rename parameters.
1307 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
1308 __si_class_type_info::do_find_public_src): Prepent __. Rename
1309 parameters.
1310 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
1311 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
1312 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
1313 parameters.
1314 (__dynamic_cast): Rename parameters.
1315 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
1316 type_info::do_catch, type_info::do_upcast): Prepend __.
1317 (contained_p, public_p, virtual_p, contained_public_p,
1318 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
1319 (__class_type_info::do_catch,
1320 __class_type_info::do_upcast): Prepend __. Adjust.
1321 (__class_type_info::__upcast_result,
1322 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
1323 Adjust.
1324 (__class_type_info::find_public_src): Prepend __. Adjust.
1325 (__class_type_info::do_find_public_src,
1326 __si_class_type_info::do_find_public_src,
1327 __vmi_class_type_info::do_find_public_src): Likewise.
1328 (__class_type_info::do_dyncast,
1329 __si_class_type_info::do_dyncast,
1330 __vmi_class_type_info::do_dyncast): Likewise.
1331 (__class_type_info::do_upcast,
1332 __si_class_type_info::do_upcast,
1333 __vmi_class_type_info::do_upcast): Likewise.
1334 (__dynamic_cast): Adjust.
1335 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
1336 (__function_type_info::is_function_p): Likewise.
1337 (__pointer_type_info::do_catch): Likewise. Adjust.
1338 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
1339 (__throw_type_match_rtti_2): Adjust.
1340 (__is_pointer): Adjust.
1341
1342 2000-04-08 Mark Mitchell <mark@codesourcery.com>
1343
1344 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
1345 (complete_ctor_identifier): New macro.
1346 (special_function_kind): Add sfk_copy_constructor and
1347 sfk_assignment_operator.
1348 (LOOKUP_HAS_IN_CHARGE): Remove.
1349 (cons_up_default_function): Rename to ...
1350 (implicitly_declare_fn): ... this.
1351 * call.c (build_new_method_call): Add in-charge parameters for
1352 constructors here.
1353 * class.c (add_implicitly_declared_members): Change parameter name
1354 from cant_have_assignment to cant_have_const_assignment.
1355 Replace calls to cons_up_default_function to implicitly_declare_fn.
1356 * cvt.c (ocp_convert): Use complete_ctor_identifier.
1357 * decl.c (initialize_predefined_identifiers): Initialize it.
1358 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
1359 complex expression.
1360 * init.c (expand_default_init): Don't calculate the in-charge
1361 parameter here.
1362 (build_new_1): Likewise.
1363 * lex.c (cons_up_default_function): Move to method.c.
1364 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
1365 (implicitly_declare_fn): New function.
1366 * typeck.c (build_static_cast): Use complete_ctor_identifier.
1367 (build_modify_expr): Likewise.
1368 * typeck2.c (build_functional_cast): Likewise.
1369
1370 Under the new ABI, constructors don't return `this'.
1371 * cp-tree.h (warn_reorder): Declare.
1372 (special_function_kind): New enum.
1373 (global_base_init_list): Remove declaration.
1374 (emit_base_init): Don't return a value.
1375 (check_base_init): Don't declare.
1376 (is_aggr_typedef): Likewise.
1377 * decl.c (check_special_function_return_type): New function.
1378 (return_types): Remove.
1379 (grokdeclarator): Use check_special_function_return_type.
1380 (start_function): Don't initialize ctor_label under the new ABI.
1381 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
1382 * init.c (begin_init_stmts): Move to top of file.
1383 (finish_init_stmts): Likewise.
1384 (warn_reorder): Don't declare.
1385 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
1386 value.
1387 (check_base_init): Remove.
1388 (is_aggr_typedef): Likewise.
1389 (build_new_1): Don't use the return value of a constructor.
1390 * semantics.c (setup_vtbl_ptr): Don't use the return value
1391 of emit_base_init.
1392 * typeck.c (check_return_expr): Don't magically convert return
1393 statements into `return this' in constructors under the new ABI.
1394
1395 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
1396 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
1397 (base_ctor_identifier): New macro.
1398 (base_dtor_identifier): Likewise.
1399 (deleting_dtor_identifier): Likewise.
1400 * decl.c: Don't include obstack.h.
1401 (obstack_chunk_alloc): Don't define.
1402 (obstack_chunk_free): Likewise.
1403 (struct predefined_identifier): New type.
1404 (initialize_predefined_identifiers): New function.
1405 (init_decl_processing): Use it.
1406 (debug_temp_inits): Remove.
1407 (start_method): Don't call preserve_data.
1408 (hack_incomplete_structures): Update comment.
1409 * init.c (init_init_processing): Don't initialize
1410 nelts_identifier.
1411 (build_offset_rf): Remove dead code.
1412 (build_delete): Use CLASSTYPE_N_BASECLASSES.
1413 * search.c (init_search_processing): Don't initialize
1414 vptr_identifier.
1415
1416 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1417
1418 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
1419 some sign_compare warnings.
1420
1421 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
1422
1423 Rename abi::__vmi_class_type_info members.
1424 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
1425 base_list, detail_masks members to vmi_flags, vmi_base_count,
1426 vmi_bases and vmi_flags_masks respectively.
1427 (__vmi_class_type_info::vmi_flags_masks): Rename
1428 details_unknown_mask to flags_unknown_mask.
1429 * tinfo.cc (__class_type_info::do_upcast): Adjust.
1430 (__vmi_class_type_info::do_find_public_src): Adjust.
1431 (__vmi_class_type_info::do_dyncast): Adjust.
1432 (__vmi_class_type_info::do_upcast): Adjust.
1433
1434 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
1435
1436 * tinfo.cc (convert_to_base): New function.
1437 (get_vbase_offset): Remove. Move into convert_to_base.
1438 (__vmi_class_type_info::do_find_public_src): Adjust.
1439 (__vmi_class_type_info::do_dyncast): Adjust.
1440 (__vmi_class_type_info::do_upcast): Adjust.
1441
1442 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
1443
1444 * tinfo.cc (operator=): Use __builtin_strcmp.
1445 * tinfo2.cc (before): Likewise.
1446
1447 2000-04-06 Mark Mitchell <mark@codesourcery.com>
1448
1449 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
1450 (DECL_SAVED_INLINE): Rename to ...
1451 (DECL_DEFERRED_FN): ... this.
1452 (in_function_p): Remove declaration.
1453 (mark_inline_for_output): Rename to ...
1454 (defer_fn): ... this.
1455 * decl.c (finish_function): Adjust call to mark_inline_for_output.
1456 (in_function_p): Remove definition.
1457 * decl2.c (saved_inlines): Rename to ...
1458 (deferred_fns): ... this.
1459 (saved_inlines_used): Rename to ...
1460 (deferred_fns_used): ... this.
1461 (mark_inline_for_output): Rename to ...
1462 (defer_fn): ... this.
1463 (finish_file): Adjust accordingly.
1464 (init_decl2): Likewise.
1465 * lex.c (cons_up_default_function): Likewise.
1466 * pt.c (mark_decl_instantiated): Likewise.
1467 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
1468 circumstances.
1469 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
1470 * semantics.c (expand_body): Defer more functions.
1471
1472 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
1473
1474 * vec.cc: New file.
1475 * Make-lang.in (CXX_LIB2FUNCS): Add it.
1476 (vec.o): Build it.
1477 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
1478 __cxa_vec_delete): Declare.
1479
1480 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
1481
1482 * rtti.c (dfs_class_hint_mark): New static function.
1483 (dfs_class_hint_unmark): New static function.
1484 (class_hint_flags): Use them.
1485
1486 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
1487
1488 * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
1489
1490 2000-04-05 Mark Mitchell <mark@codesourcery.com>
1491
1492 * cp-tree.h (instantiate_decl): Change prototype.
1493 * decl2.c (mark_used): Adjust call.
1494 * optimize.c (inlinable_function_p): Adjust handling of templates.
1495 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
1496 (do_type_instantiation): Likewise.
1497 (instantiate_decl): Defer more templates.
1498 (instantiate_pending_templates): Adjust logic to handle inline
1499 friend functions.
1500
1501 * Makefile.in (GGC_H): New variable. Use it throughout in place
1502 of ggc.h.
1503
1504 * call.c: Don't include obstack.h. Include ggc.h.
1505 (obstack_chunk_alloc): Don't define.
1506 (obstack_chunk_free): Likewise.
1507 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
1508 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
1509 (pop_switch): Free it.
1510
1511 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
1512
1513 * dump.c (dequeue_and_dump): Don't try to print the bit_position
1514 if we don't have a DECL_FIELD_OFFSET.
1515
1516 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
1517
1518 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
1519 special_function_p.
1520
1521 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1522
1523 * cfns.gperf (hash, libc_name_p): Prototype.
1524
1525 * rtti.c (build_dynamic_cast_1): Constification.
1526
1527 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
1528
1529 * semantics.c (deferred_type_access_control): Prototype.
1530
1531 2000-04-04 Mark Mitchell <mark@codesourcery.com>
1532
1533 Correct many new ABI issues regarding vbase and vcall offset
1534 layout.
1535 * cp-tree.h (BINFO_VTABLE): Document.
1536 (struct lang_type): Tweak formatting.
1537 (BINFO_PRIMARY_BINFO): Add to documentation.
1538 (CLASSTYPE_VSIZE): Fix typo in comment.
1539 (CLASSTYPE_VBASECLASSES): Update documentation.
1540 (BINFO_VBASE_MARKED): Remove.
1541 (SET_BINFO_VBASE_MARKED): Likewise.
1542 (CLEAR_BINFO_VBASE_MARKED): Likewise.
1543 (BINFO_FIELDS_MARKED): Remove.
1544 (SET_BINFO_FIELDS_MARKED): Likewise.
1545 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
1546 (enum access_kind): New enumeration.
1547 (num_extra_vtbl_entries): Remove declaration.
1548 (size_extra_vtbl_entries): Likewise.
1549 (get_vtbl_decl_for_binfo): New function.
1550 (dfs_vbase_unmark): Remove declaration.
1551 (mark_primary_bases): Likewise.
1552 * class.c (SAME_FN): Remove.
1553 (struct vcall_offset_data_s): Move definition.
1554 (build_vbase_pointer): Use `build', not `build_binary_op', to
1555 access the vbase pointer under the new ABI.
1556 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
1557 (build_primary_vtable): Likewise.
1558 (dfs_mark_primary_bases): Move here from search.c.
1559 (mark_primary_bases): Likewise.
1560 (determine_primary_bases): Under the new ABI, don't make a base
1561 class a primary base just because we don't yet have any virtual
1562 functions.
1563 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
1564 (num_vfun_entries): Remove.
1565 (dfs_count_virtuals): Likewise.
1566 (num_extra_vtbl_entries): Likewise.
1567 (size_extra_vtbl_entries): Likewise.
1568 (layout_virtual_bases): Iterate in inheritance graph order under
1569 the new ABI.
1570 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
1571 indicate that a vfield is present.
1572 (init_class_processing): Initialize access_public_node, etc., from
1573 ak_public, etc.
1574 (get_vtbl_decl_for_binfo): New function.
1575 (dump_class_hierarchy_r): Likewise.
1576 (dump_class_hierarchy): Use it.
1577 (finish_vtbls): Build the vtbls in inheritance graph order.
1578 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
1579 (initialize_vtable): Use get_vtbl_decl_for_binfo.
1580 (accumulate_vtbl_inits): Add comments explaining why a pre-order
1581 walk is required.
1582 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
1583 where the vptr points, even for primary vtables.
1584 (build_vtbl_initializer): Adjust handling of vbase and vcall
1585 offsets.
1586 (build_vcall_and_vbase_vtable_entries): New function.
1587 (dfs_build_vbase_offset_vtbl_entries): Remove.
1588 (build_vbase_offset_vtbl_entries): Reimplement.
1589 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
1590 were already handled in a primary base class vtable.
1591 (build_vcall_offset_vtbl_entries): Adjust.
1592 (build_rtti_vtbl_entries): Adjust.
1593 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
1594 * init.c (expand_virtual_init): Simplify.
1595 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
1596 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
1597 * search.c (BINFO_ACCESS): New macro.
1598 (SET_BINFO_ACCESS): Likewise.
1599 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
1600 (access_in_type): Likewise.
1601 (dfs_accessible_p): Likewise.
1602 (protected_accessible_p): Likewise.
1603 (lookup_fnfields_1): Adjust documentation.
1604 (dfs_mark_primary_bases): Move to class.c
1605 (mark_primary_bases): Likewise.
1606 (dfs_vbase_unmark): Remove.
1607 (virtual_context): Use BINFO_FOR_VBASE.
1608 (dfs_get_vbase_types): Simplify.
1609 (dfs_build_inheritance_graph_order): New function.
1610 (get_vbase_types): Use it.
1611 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
1612
1613 * tinfo.cc (get_vbase_offset): New function.
1614 (__vmi_class_type_info::do_find_public_src): Use it.
1615 (__vmi_class_type_info::do_dyncast): Likewise.
1616 (__vmi_class_type_info::do_upcast): Likewise.
1617
1618 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
1619
1620 * lang-specs.h: Pass -fno-show-column to the preprocessor.
1621
1622 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
1623
1624 * rtti.c (class_hint_flags): Rename flags.
1625 (class_initializer): Remove flags.
1626 (synthesize_tinfo_var): Combine offset and flags. Add flags
1627 for __vmi_class_type_info.
1628 (create_tinfo_types): Remove flags from __class_type_info and
1629 __si_class_type_info. Merge flags and offset from
1630 base_class_type_info.
1631 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
1632 (__base_class_info::is_virtual_p): Adjust.
1633 (__base_class_info::is_public_p): Adjust.
1634 (__base_class_info::offset): New accessor.
1635 (__class_type_info::details): Remove member.
1636 (__class_type_info::__class_type_info): Lose details.
1637 (__class_type_info::detail_masks): Remove.
1638 (__si_class_type_info::__si_class_type_info): Lose details.
1639 (__vmi_class_type_info::details): New member.
1640 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
1641 (__vmi_class_type_info::detail_masks): New member.
1642 * tinfo.cc (__class_type_info::do_upcast): Initialize result
1643 with unknown_details_mask.
1644 (__vmi_class_type_info::do_find_public_src): Adjust
1645 (__vmi_class_type_info::do_dyncast): Adjust.
1646 (__vmi_class_type_info::do_upcast): Set result details, if
1647 needed. Adjust.
1648 (__dynamic_cast): Temporarily #if out optimization.
1649
1650 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
1651
1652 * rtti.c (get_tinfo_decl): Mark used.
1653 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
1654 mark as dealt with, if we output it.
1655
1656 2000-03-28 Mark Mitchell <mark@codesourcery.com>
1657
1658 * class.c: Reorganize to put virtual function table initialization
1659 machinery at the end of the file.
1660
1661 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
1662
1663 * class.c (finish_struct): Use bitsize_zero_node.
1664 * pt.c (instantiate_class_template): Likewise.
1665
1666 2000-03-28 Mark Mitchell <mark@codesourcery.com>
1667
1668 Put RTTI entries at negative offsets in new ABI.
1669 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
1670 vbase offset at index -3, not -1.
1671 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
1672 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
1673 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
1674 (build_rtti_vtbl_entries): New function.
1675 (set_rtti_entry): Remove.
1676 (build_primary_vtable): Don't use it.
1677 (build_secondary_vtable): Likewise.
1678 (start_vtable): Remove.
1679 (first_vfun_index): New function.
1680 (set_vindex): Likewise.
1681 (add_virtual_function): Don't call start_vtable. Do call
1682 set_vindex.
1683 (set_primary_base): Rename parameter.
1684 (determine_primary_base): Likewise.
1685 (num_vfun_entries): Don't use skip_rtti_stuff.
1686 (num_extra_vtbl_entries): Include RTTI information.
1687 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
1688 (skip_rtti_stuff): Remove.
1689 (dfs_modify_vtables): Don't use it.
1690 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
1691 (layout_nonempty_base_or_field): Update size handling.
1692 (create_vtable_ptr): Tweak.
1693 (layout_class_type): Adjust parameter names.
1694 (finish_struct_1): Simplify.
1695 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
1696 (skip_rtti_stuff): Remove.
1697 (first_vfun_index): New function.
1698 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
1699 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
1700 (marked_vtable_pathp): Declare.
1701 (unmarked_vtable_pathp): Likewise.
1702 * error.c (dump_expr): Use first_vfun_index to calculate vtable
1703 offsets.
1704 * rtti.c (build_headof): Look for RTTI at negative offsets.
1705 (get_tinfo_decl_dynamic): Likewise.
1706 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
1707 here.
1708 (create_pseudo_type_info): Do it here instead. Adjust so that
1709 vptr points at first virtual function.
1710 * search.c (marked_vtable_pathp): Make it global.
1711 (unmarked_vtable_pathp): Likewise.
1712 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
1713 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
1714 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
1715 (get_pure_virtuals): Likewise.
1716 (expand_upcast_fixups): Likewise.
1717 * tree.c (debug_binfo): Likewise.
1718 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
1719 negative offset.
1720
1721 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1722
1723 * class.c (check_field_decl): Fix typo.
1724 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
1725 (check_methods): Likewise.
1726 (check_field_decls): Likewise.
1727 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
1728 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
1729 Use DECL_RESULT_FLD, not DECL_RESULT.
1730 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
1731 * lex.c (identifier_type): Likewise.
1732 * pt.c (determine_specialization, lookup_template_class): Likewise.
1733 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
1734 (resolve_overloaded_unification, more_specialized): Likewise.
1735 * semantics.c (finish_member_declaration): Likewise.
1736 * typeck.c (build_x_function_call): Likewise.
1737
1738 2000-03-26 Mark Mitchell <mark@codesourcery.com>
1739
1740 * class.c (layout_empty_base): Handle empty bases with non-byte
1741 alignment.
1742 (build_base_field): Likewise.
1743 (layout_virtual_bases): Likewise.
1744
1745 * class.c (finish_struct_1): Fix typo in this change:
1746
1747 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1748
1749 2000-03-25 Mark Mitchell <mark@codesourcery.com>
1750
1751 * decl.c (grokdeclarator): Count partial specializations when
1752 keeping track of how many template classes have been seen.
1753
1754 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
1755
1756 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1757
1758 * class.c (build_vbase_pointer_fields): layout_field now place_field.
1759 (get_vfield_offset): Use byte_position.
1760 (set_rtti_entry): Set OFFSET to ssizetype zero.
1761 (get_binfo_offset_as_int): Deleted.
1762 (dfs_record_base_offsets): Use tree_low_cst.
1763 (dfs_search_base_offsets): Likewise.
1764 (layout_nonempty_base_or_field): Reflect changes in RLI format
1765 and call byte_position.
1766 (layout_empty_base): Convert offset to ssizetype.
1767 (build_base_field): use rli_size_unit_so_far.
1768 (dfs_propagate_binfo_offsets): Do computation in proper type.
1769 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
1770 (layout_class_type): Reflect changes in RLI names and fields.
1771 (finish_struct_1): Set DECL_FIELD_OFFSET.
1772 * dump.c (dequeue_and_dump): Call bit_position.
1773 * expr.c (cplus_expand_constant): Use byte_position.
1774 * rtti.c (expand_class_desc): Use bitsize_one_node.
1775 * typeck.c (build_component_addr): Use byte_position and don't
1776 special case for zero offset.
1777
1778 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
1779
1780 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
1781
1782 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
1783 tinfo object.
1784 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
1785 vtable.
1786
1787 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1788
1789 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
1790 DECL_P macros.
1791 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
1792 make_typename_type, check_initializer, cp_finish_decl,
1793 xref_tag): Likewise.
1794 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
1795 decl_namespace, arg_assoc_template_arg, arg_assoc,
1796 validate_nonmember_using_decl, do_class_using_decl): Likewise.
1797 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
1798 args_to_string): Likewise.
1799 * friend.c (is_friend): Likewise.
1800 * lex.c (note_got_semicolon, note_list_got_semicolon,
1801 is_global): Likewise.
1802 * method.c (build_overload_nested_name, build_overload_value,
1803 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
1804 * parse.y (typename_sub, typename_sub1): Likewise.
1805 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
1806 process_partial_specialization, convert_template_argument,
1807 template_args_equal, add_pending_template, lookup_template_class,
1808 for_each_template_parm_r, maybe_fold_nontype_arg,
1809 tsubst, instantiate_template, type_unification_real, unify,
1810 instantiate_pending_templates, set_mangled_name_for_template_decl):
1811 Likewise.
1812 * repo.c (repo_get_id, repo_template_used): Likewise.
1813 * search.c (lookup_field_1): Likewise.
1814 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
1815 * xref.c (classname): Likewise.
1816
1817 2000-03-22 Mark Mitchell <mark@codesourcery.com>
1818
1819 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
1820 (CANONICAL_BINFO): New macro.
1821 (BINFO_NEW_VTABLE_MARKED): Use it.
1822 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
1823 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
1824 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
1825 not TREE_TYPE.
1826 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
1827 (build_secondary_vtable): Likewise.
1828 (dfs_finish_vtbls): Likewise.
1829 (dfs_accumulate_vtbl_inits): Likewise.
1830 (accumulate_vtbl_inits): New function.
1831 (finish_vtbls): Make sure that virtual bases come after
1832 non-virtual bases in the vtable group.
1833 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
1834 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
1835 * search.c (struct vbase_info): Move definition.
1836 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
1837 (unmarked_new_vtable_p): Likewise.
1838 (dfs_mark_vtable_path): Remove.
1839 (dfs_mark_new_vtable): Remove.
1840 (dfs_unmark_new_vtable): Likewise.
1841 (dfs_clear_search_slot): Likewise.
1842 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
1843 (dfs_clear_vbase_slots): Likewise.
1844 (init_vbase_pointers): LIkewise.
1845
1846 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
1847
1848 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
1849 SIZETYPE to a non-SIZETYPE.
1850
1851 2000-03-21 Mark Mitchell <mark@codesourcery.com>
1852
1853 * class.c (layout_virtual_bases): Adjust names in conditionally
1854 compiled code.
1855
1856 * class.c (record_base_offsets): New function.
1857 (layout_conflict_p): Likewise.
1858 (layout_nonempty_base_or_field): Use it.
1859 (layout_empty_base): New function.
1860 (build_base_field): Use it.
1861 (build_base_fields): Update comment.
1862 (layout_virtual_bases): Fold in a little code form
1863 layout_basetypes. Use layout_empty_base.
1864 (layout_basetypes): Remove.
1865 (end_of_class): New function.
1866 (layout_class_type): Use it. Adjust.
1867
1868 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
1869 (fntype_p): Remove.
1870 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
1871 comment.
1872 (dfs_skip_nonprimary_vbases_markedp): Likewise.
1873 * typeck.c (fntype_p): Remove.
1874
1875 * cp-tree.h (TI_SPEC_INFO): Remove.
1876 (CLASSTYPE_TI_SPEC_INFO): Likewise.
1877 * pt.c (process_partial_specialization): Likewise.
1878
1879 * class.c (build_base_field): Fix thinko in computation of binfo
1880 offsets.
1881
1882 * tree.c (mark_local_for_remap_p): Mark variables declared in
1883 TARGET_EXPRs as well.
1884
1885 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
1886
1887 * typeck.c (require_complete_type, complete_type,
1888 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
1889 build_array_ref, convert_arguments, pointer_diff,
1890 build_x_unary_op, build_unary_op, build_c_cast,
1891 build_modify_expr): Use COMPLETE_TYPE_P etc.
1892 * call.c (is_complete, convert_like_real,
1893 build_new_method_call): Likewise.
1894 * class.c (build_vbase_pointer_fields, check_bases,
1895 build_base_field, finish_struct_1, pushclass): Likewise.
1896 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
1897 * decl.c (maybe_process_template_type_declaration, pushtag,
1898 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
1899 layout_var_decl, check_initializer, cp_finish_decl,
1900 grokdeclarator, require_complete_types_for_parms,
1901 grok_op_properties, xref_tag, xref_basetypes,
1902 check_function_type): Likewise.
1903 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
1904 * friend.c (do_friend): Likewise.
1905 * init.c (build_offset_ref): Likewise.
1906 * parse.y (structsp): Likewise.
1907 * pt.c (maybe_process_partial_specialization,
1908 tsubst_friend_function, instantiate_class_template, tsubst,
1909 do_type_instantiation, instantiate_pending_templates): Likewise.
1910 * repo.c (repo_get_id): Likewise.
1911 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
1912 synthesize_tinfo_var, emit_support_tinfos): Likewise.
1913 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
1914 * semantics.c (begin_class_definition): Likewise.
1915 * tree.c (build_cplus_method_type): Likewise.
1916 * typeck2.c (digest_init, build_functional_cast,
1917 add_exception_specifier): Likewise.
1918 * parse.h, parse.c: Regenerated.
1919
1920 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
1921
1922 * inc/cxxabi.h: New header file. Define new-abi entry points.
1923 (__pointer_type_info::target): Rename member to ...
1924 (__pointer_type_info::type): ... here.
1925 (__base_class_info::type): Rename member to ...
1926 (__base_class_info::base): ... here.
1927 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
1928 * cp-tree.h (CPTI_ABI): New global tree enumeration.
1929 (abi_node): New global tree node.
1930 * decl.c (abi_node): Document.
1931 (init_decl_processing): Initialize abi_node.
1932 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
1933 (get_vmi_pseudo_type_info): Likewise.
1934 (create_tinfo_types): Likewise.
1935 (emit_support_tinfos): Likewise.
1936 * tinfo.h (cxxabi.h): Include for new-abi.
1937 Move rtti class definitions to new header file.
1938 * tinfo.cc (abi): Use the namespace.
1939 (std): Move new abi rtti classes from here ...
1940 (__cxxabiv1): ... to here.
1941 * tinfo2.cc (cxxabi.h): Include for new-abi.
1942 Move rtti class definitions to new header file.
1943 (std): Move new abi rtti classes from here ...
1944 (__cxxabiv1): ... to here.
1945 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
1946 namespace.
1947
1948 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
1949 Jason Merrill <jason@casey.cygnus.com>
1950
1951 * method.c (build_overload_int): Use host_integerp.
1952
1953 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1954
1955 * init.c (build_offset_ref): Handle the case of a templated member
1956 function.
1957
1958 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1959
1960 * except.c (expand_exception_blocks): Clear catch_clauses_last.
1961
1962 2000-03-18 Mark Mitchell <mark@codesourcery.com>
1963
1964 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
1965 * class.c (check_bitfield_decl): Turn illegal bitfields into
1966 non-bitfields.
1967 (dfs_propagate_binfo_offsets): Adjust for new size_binop
1968 semantics.
1969 (dfs_offset_for_unshared_vbases): Likewise.
1970 * cvt.c (cp_convert_to_pointer): Convert NULL to a
1971 pointer-to-member correctly under the new ABI.
1972 * expr.c (cplus_expand_constant): Don't use cp_convert when
1973 turning an offset into a pointer-to-member.
1974 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
1975 when dereferencing them under the new ABI.
1976 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
1977 of pointers-to-members under the new ABI.
1978
1979 * class.c (check_bitfield_decl): Remove restriction on really long
1980 bitfields.
1981 (layout_class_type): Implement new ABI handling of bitfields
1982 longer than their types.
1983
1984 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1985
1986 * parse.y (extdefs): Call ggc_collect.
1987 * parse.c: Regenerated.
1988
1989 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
1990
1991 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
1992 (note_name_declared_in_class): Use OVL_CURRENT to get at a
1993 potential overload.
1994
1995 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1996
1997 * class.c (build_vbase_path): Use integer_zerop.
1998 (build_vtable_entry): Use tree_low_cst.
1999 (get_vfield_offset): Use bit_position.
2000 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
2001 Use tree_low_cst.
2002 (check_bitfield_decl): Set DECL_SIZE using convert.
2003 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
2004 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
2005 Use tree_low_cst.
2006 (finish_struct_1): Use bit_position.
2007 (dump_class_hierarchy): Use tree_low_cst.
2008 * cp-tree.h (min_precision): Add declaration.
2009 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
2010 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
2011 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
2012 * expr.c (cplus_expand_constant): Use bit_position.
2013 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
2014 * rtti.c (get_base_offset): Use bit_position.
2015 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
2016 host_integerp, and tree_low_cst.
2017 (pointer_int_sum): Use integer_zerop.
2018 (build_component_addr): Use bit_position.
2019
2020 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
2021
2022 * typeck.c (require_complete_type): Don't assume size_zero_node.
2023 (complete_type_or_else): Likewise.
2024
2025 2000-03-16 Steven Grady <grady@digitaldeck.com>
2026 Jason Merrill <jason@casey.cygnus.com>
2027
2028 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
2029
2030 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
2031
2032 * decl2.c (grokfield): Bail out if type is error_mark_node.
2033
2034 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
2035
2036 * tinfo2.cc (__ptr_to_member_data): Rename to ...
2037 (__pointer_to_member_data): ... here. Adjust.
2038 * rtti.c (create_tinfo_types): Adjust.
2039
2040 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
2041
2042 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
2043 * decl.c (ref_desc_type_node): Undocument.
2044 * rtti.c (ptr_ref_initializer): Rename to ...
2045 (ptr_initializer): ... here. Adjust comments.
2046 (ptmd_initializer): Fix comment thinko.
2047 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
2048 (create_tinfo_types): Remove ref_desc_type_node init.
2049 * tinfo2.cc (__reference_type_info): Remove.
2050
2051 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
2052
2053 * decl.c (cp_finish_decl): Remove obsolete comment.
2054
2055 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
2056
2057 2000-03-14 Mark Mitchell <mark@codesourcery.com>
2058
2059 * cp-tree.h: Tweak documentation.
2060 * class.c (build_vbase_pointer_fields): Layout the fields, too.
2061 (avoid_overlap): Remove.
2062 (get_binfo_offset_as_int): New function.
2063 (dfs_serach_base_offsets): Likewise.
2064 (layout_nonempty_base_or_field): Likewise.
2065 (build_base_field): Layout fields here. Avoid placing two objects
2066 of the same type at the same address, under the new ABI.
2067 (build_base_fields): Adjust accordingly.
2068 (create_vtable_ptr): Return the new field, but don't attach it to
2069 TYPE_FIELDS.
2070 (remove_base_field): Remove.
2071 (remove_base_fields): Remove.
2072 (layout_basetypes): Adjust accordingly.
2073 (layout_class_type): Call layout_field for each field, rather than
2074 just making a wholesale call to layout_type.
2075
2076 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
2077
2078 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
2079
2080 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
2081
2082 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
2083
2084 * except.c (dtor_nothrow): New fn.
2085 (do_pop_exception): Use it. Take type parm.
2086 (push_eh_cleanup): Take type parm.
2087 (expand_start_catch_block): Pass it.
2088 (build_eh_type_type_ref): Accept null type.
2089
2090 2000-03-12 Mark Mitchell <mark@codesourcery.com>
2091
2092 * cp-tree.h (revert_static_member_fn): Change prototype.
2093 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
2094 (grok_op_properties): Likewise.
2095 (start_function): Likewise.
2096 (revert_static_member_fn): Simplify.
2097 * pt.c (check_explicit_specialization): Adjust call to
2098 revert_static_member_fn.
2099
2100 2000-03-11 Mark Mitchell <mark@codesourcery.com>
2101
2102 * cp-tree.h (scope_kind): New type.
2103 (tmpl_spec_kind): Likewise.
2104 (declare_pseudo_global_level): Remove.
2105 (pseudo_global_level_p): Rename to template_parm_scope_p.
2106 (pushlevel): Remove declaration.
2107 (begin_scope): New function.
2108 (finish_scope): Likewise.
2109 (current_tmpl_spec_kind): Likewise.
2110 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
2111 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
2112 Add template_spec_p.
2113 (toplevel_bindings_p): Adjust.
2114 (declare_pseudo_global_level): Remove.
2115 (pseudo_global_level_p): Rename to template_parm_scope_p.
2116 (current_tmpl_spec_kind): New function.
2117 (begin_scope): Likewise.
2118 (finish_scope): Likewise.
2119 (maybe_push_to_top_level): Adjust.
2120 (maybe_process_template_type_declaration): Likewise.
2121 (pushtag): Likewise.
2122 (pushdecl_nonclass_level): Likewise.
2123 (lookup_tag): Likewise.
2124 (grokfndecl): Handle member template specializations. Share
2125 constructor and non-constructor code.
2126 * decl2.c (check_classfn): Handle member template specializations.
2127 * pt.c (begin_template_parm_list): Use begin_scope.
2128 (begin_specialization): Likewise.
2129 (end_specialization): Likewise.
2130 (check_explicit_specialization): Use current_tmpl_spec_kind.
2131 Handle member template specializations.
2132 (end_template_decl): Use finish_scope. Remove call to
2133 get_pending_sizes.
2134 (push_template_decl_real): Remove bogus error message.
2135 (tsubst_decl): Fix typo in code contained in comment.
2136 (instantiate_template): Handle member template specializations.
2137 (most_general_template): Likewise.
2138
2139 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
2140
2141 * lex.c (whitespace_cr): Compress consecutive calls to warning().
2142 (do_identifier): Ditto for error().
2143
2144 * pt.c (convert_nontype_argument): Ditto for cp_error().
2145 (convert_template_argument): Ditto for cp_pedwarn().
2146
2147 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
2148
2149 * exception.cc (__check_null_eh_spec): New fn.
2150 * except.c (expand_end_eh_spec): Call it if the spec is throw().
2151
2152 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
2153
2154 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
2155 * except.c (expand_end_eh_spec): Add the return type.
2156 * rtti.c (throw_bad_cast): Add the parmtypes.
2157 (throw_bad_typeid): Likewise.
2158
2159 * semantics.c (expand_stmt): Only leave out rtl for unused
2160 artificials, and set DECL_IGNORED_P on them as well.
2161 * decl.c (wrapup_globals_for_namespace): Likewise.
2162
2163 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
2164
2165 * decl.c (maybe_commonize_var): Skip all artificial decls.
2166 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
2167
2168 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
2169
2170 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
2171 * cp-tree.h: Declare flag_enforce_eh_specs.
2172 * decl.c (store_parm_decls, finish_function): Check it.
2173
2174 C library functions don't throw.
2175 * Makefile.in (cfns.h): New target.
2176 (except.o): Depend on it.
2177 * Make-lang.in (cc1plus): Depend on cfns.gperf.
2178 * cfns.gperf: New file.
2179 * cfns.h: Generated.
2180 * except.c: Include it.
2181 (nothrow_libfn_p): New fn.
2182 * decl.c (grokfndecl): Use it.
2183 * cp-tree.h: Declare it.
2184
2185 * decl.c (push_overloaded_decl_1, auto_function,
2186 define_function): Lose.
2187 (build_library_fn_1): New static fn.
2188 (builtin_function): Use it.
2189 (get_atexit_node): Use build_library_fn_ptr.
2190 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
2191 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
2192 push_void_library_fn, push_throw_library_fn): New fns.
2193 * cp-tree.h: Declare them.
2194 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
2195 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
2196 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
2197 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
2198 * rtti.c (build_runtime_decl): Lose.
2199 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
2200 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
2201 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
2202
2203 * call.c (build_call): Remove result_type parm.
2204 Call mark_used on unused artificial fns.
2205 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
2206
2207 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
2208
2209 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
2210 appropriate.
2211 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
2212 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
2213 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
2214 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
2215 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
2216 expand_generic_desc): Likewise.
2217
2218 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
2219
2220 * exception.cc (__cp_pop_exception): Cleanup the original object.
2221
2222 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
2223
2224 * decl.c (grok_op_properties): Merge conversion to void warning
2225 with other silly op warnings.
2226
2227 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
2228
2229 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
2230 array CONSTRUCTOR elements. Don't use expr_tree_cons.
2231
2232 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
2233
2234 * decl.c (cp_make_fname_decl): New function.
2235 (wrapup_globals_for_namespace): Don't emit unused static vars.
2236 (init_decl_processing): Remove comment about use of
2237 array_domain_type. Set make_fname_decl.
2238 (cp_finish_decl): Remove __FUNCTION__ nadgering.
2239 * semantics.c (begin_compound_stmt): Remove
2240 current_function_name_declared flagging.
2241 (expand_stmt): Don't emit unused local statics.
2242 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
2243 specially.
2244
2245 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
2246
2247 * typeck.c (convert_for_assignment): Don't look at array
2248 initializer.
2249 * call.c (convert_like_real): Likewise.
2250
2251 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
2252
2253 Add initial support for '\uNNNN' specifier.
2254 * lex.c (read_ucs): New fn.
2255 (readescape, skip_white_space): Call it.
2256 (is_extended_char, is_extended_char_1): New fns.
2257 (utf8_extend_token): New fn, #if 0'd out.
2258 (real_yylex): Treat extended chars like letters.
2259
2260 * search.c (note_debug_info_needed): Walk the bases even if we
2261 weren't deferring the type itself.
2262
2263 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2264
2265 * decl2.c (finish_objects): Constify a char*.
2266
2267 * method.c (emit_thunk): Likewise.
2268
2269 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
2270
2271 * typeck.c (dubious_conversion_warnings): Look through
2272 REFERENCE_TYPE.
2273
2274 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2275
2276 * class.c (dfs_modify_vtables): I is now unsigned.
2277 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
2278 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
2279 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
2280 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
2281 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
2282 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
2283 Call integer_all_onesp.
2284 * typeck2.c (process_init_constructor): Use compare_tree_int.
2285
2286 * lang-specs.h (as): Don't call if -syntax-only.
2287
2288 2000-03-06 Mark Mitchell <mark@codesourcery.com>
2289
2290 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
2291 RTL_EXPR_HAS_NO_SCOPE after all.
2292
2293 2000-03-05 Mark Mitchell <mark@codesourcery.com>
2294
2295 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
2296 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
2297 RTL_EXPR_HAS_NO_SCOPE.
2298
2299 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
2300 later.
2301
2302 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
2303
2304 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
2305
2306 * call.c (convert_like): Macrofy.
2307 (convert_like_with_context): New macro.
2308 (convert_like_real): Renamed from convert_like. Add calling
2309 context parameters, for diagnostics. Add recursive flag. Call
2310 dubious_conversion_warnings for outer conversion.
2311 (build_user_type_conversion): Use convert_like_with_context.
2312 (build_over_call): Likewise. Don't warn about dubious
2313 conversions here. Adjust convert_default_arg calls.
2314 (convert_default_arg): Add context parameters for diagnostics.
2315 Pass throught to convert_like_with_context.
2316 * cp-tree.h (convert_default_arg): Add context parameters.
2317 (dubious_conversion_warnings): Prototype new function.
2318 * typeck.c (convert_arguments): Adjust convert_default_arg call.
2319 (dubious_conversion_warnings): New function, broken
2320 out of convert_for_assignment.
2321 (convert_for_assignment): Adjust.
2322
2323 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
2324
2325 * decl2.c (key_method): Break out from...
2326 (import_export_vtable, import_export_class): ...here.
2327
2328 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
2329 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
2330
2331 * search.c (note_debug_info_needed, dfs_debug_mark,
2332 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
2333 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
2334
2335 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
2336
2337 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
2338 typos.
2339
2340 2000-03-02 Mark Mitchell <mark@codesourcery.com>
2341
2342 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
2343 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
2344 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
2345 (lang_type): Split gets_new into has_new and has_array_new.
2346 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2347 (TYPE_GETS_NEW): Split into ...
2348 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
2349 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
2350 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
2351 (build_op_new_call): Don't declare.
2352 (build_new_1): Likewise.
2353 * call.c (build_op_new_call): Remove.
2354 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
2355 instead of TYPE_NEEDS_DESTRUCTOR.
2356 (finish_struct_bits): Likewise.
2357 (add_implicitly_declared_members): Likewise.
2358 (check_field_decl): Likewise.
2359 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
2360 correctly under the new ABI.
2361 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
2362 instead of TYPE_NEEDS_DESTRUCTOR.
2363 (initialize_local_var): Likewise.
2364 (destroy_local_var): Likewise.
2365 (cp_finish_decl): Likewise.
2366 (register_dtor_fn): Likewise.
2367 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
2368 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
2369 TYPE_VEC_DELETE_TAKES_SIZE here.
2370 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
2371 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
2372 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2373 (finish_destructor_body): Likewise.
2374 (maybe_build_cleanup_1): Likewise.
2375 * decl2.c (do_static_destruction): Likewise.
2376 * init.c (build_new_1): Make it static.
2377 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2378 (expand_cleanup_for_base): Likewise.
2379 (get_cookie_size): New function.
2380 (build_new_1): Handle array-new cookies correctly under the new
2381 ABI.
2382 (build_vec_delete_1): Likewise.
2383 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2384 (build_delete): Likewise.
2385 (build_vec_delete): Handle array-new cookies correctly under the new
2386 ABI.
2387 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2388 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
2389 TYPE_HAS_ARRAY_NEW_OPERATOR.
2390 * ptree.c (print_lang_type): Check them.
2391 * search.c (context_for_name_lookup): Fix typo in comment.
2392 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2393 * tree.c (break_out_cleanups): Likewise.
2394 (build_cplus_array_test_1): Likewise.
2395 (cp_build_qualified_type_real): Likewise.
2396 * typeck.c (complete_type): Likewise.
2397
2398 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
2399 the command-line, not the end.
2400
2401 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
2402
2403 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
2404
2405 2000-03-02 Tom Tromey <tromey@cygnus.com>
2406
2407 * cp-tree.h (build_java_class_ref): Declare.
2408 * init.c (build_java_class_ref): No longer static.
2409 * except.c (expand_throw): Generate a Java-style `throw' if the
2410 thrown object is a "Java" object.
2411 (initialize_handler_parm): Generate a Java-style lookup of
2412 exception info if the caught object is a "Java" object.
2413 (catch_language, catch_language_init): New globals.
2414 (decl_is_java_type): New function.
2415 (expand_start_catch_block): Don't call push_eh_info() or
2416 push_eh_cleanup() when handling a Java-style "catch". Pass Java
2417 class reference to build_catch_block.
2418
2419 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2420
2421 * typeck.c (comptypes): Treat sizetype like its language equivalent.
2422
2423 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
2424
2425 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
2426 to merge reference/pointer code and fix incorrect warnings.
2427
2428 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
2429
2430 * search.c (protected_accessible_p): Use context_for_name_lookup.
2431
2432 * init.c (construct_virtual_bases): Fix thinko.
2433 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
2434
2435 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
2436
2437 * decl.c (current_function_decl): Move to toplev.c.
2438
2439 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
2440
2441 * pt.c (fn_type_unification): Unify return type, whenever
2442 provided.
2443 (get_bindings_real): Only pass return type when necessary.
2444 Remove explicit return type check.
2445 * class.c (resolve_address_of_overloaded_function): Pass desired
2446 return type to fn_type_unification.
2447
2448 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2449
2450 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
2451 DECL_FIELD_SIZE.
2452 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
2453 DECL_FIELD_SIZE.
2454 * rtti.c (expand_class_desc): Likewise.
2455 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
2456 (THUNK_VCALL_OFFSET): Likewise.
2457 (THUNK_DELTA): Reflect changes in ../tree.h.
2458
2459 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
2460
2461 * search.c (protected_accessible_p): Also allow the access if
2462 the member is public in DERIVED. Lose TYPE parm.
2463 (friend_accessible_p): Lose TYPE parm.
2464 (accessible_p): Adjust.
2465
2466 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2467
2468 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
2469 on things that are not sizes; ssize_binop deleted.
2470 Call size_diffop when appropriate.
2471 (dfs_build_vcall_offset_vtbl_entries): Likewise.
2472 (build_primary_vtable, build_secondary_vtable): Likewise.
2473 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
2474 Variable I is HOST_WIDE_INT.
2475 (get_vfield_offset): Pass proper types to size_binop.
2476 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
2477 (finish_struct_1): Likewise.
2478 (skip_rtti_stuff): Arg N is now pointer to signed.
2479 (layout_class_type): Use size_zero_node.
2480 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
2481 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
2482 * decl.c (complete_arry_type): Pass proper types to size_binop.
2483 (xref_basetypes): BINFO_OFFSET is sizetype.
2484 * error.c (dump_expr): Don't use size_binop non-sizes.
2485 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
2486 * init.c (construct_virtual_bases): Fix type error.
2487 (build_vec_delete_1): Pass proper type to size_binop and don't
2488 fold result.
2489 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
2490 * rtti.c (get_base_offset): Pass proper type to size_binop.
2491 * search.c (dfs_find_vbases): Fix type error.
2492 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
2493 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
2494 * tree.c (debug_binfo): Variable N is signed.
2495 Use HOST_WIDE_INT_PRINT_DEC.
2496 * typeck.c (comptypes): sizetype is same as equivalent integer type.
2497 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
2498 size_one_node and size_zero_node.
2499 (c_alignof): Use size_one_node.
2500 (build_component_addr): Pass proper types to size_binop.
2501 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
2502
2503 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
2504
2505 Implement class scope using-declarations for functions.
2506 * class.c (handle_using_decl): Call add_method for used functions.
2507 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
2508 (add_method): Used functions are hidden by local functions.
2509 (check_bases_and_members): Handle using-decls before finalizing
2510 CLASSTYPE_METHOD_VEC.
2511 * call.c (add_function_candidate): Add ctype parm; if non-zero,
2512 override the type of 'this' accordingly.
2513 (add_template_candidate, add_template_candidate_real): Add ctype parm.
2514 (convert_class_to_reference, build_user_type_conversion_1,
2515 build_new_function_call, build_object_call, build_new_op,
2516 build_new_method_call): Pass ctype parm.
2517
2518 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
2519 the baselink.
2520 * call.c (convert_class_to_reference, build_user_type_conversion_1,
2521 build_new_function_call, build_object_call, build_new_op,
2522 build_new_method_call, build_op_delete_call): Don't get basetype_path
2523 from a baselink.
2524 * typeck.c (build_component_ref): Likewise.
2525 * init.c (build_offset_ref): Likewise.
2526 (resolve_offset_ref): Don't call enforce_access.
2527 Call build_scoped_ref.
2528 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
2529 would cause an error or if -pedantic.
2530 * class.c (alter_access): Lose binfo parm.
2531
2532 2000-02-26 Mark Mitchell <mark@codesourcery.com>
2533
2534 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
2535 types.
2536
2537 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
2538
2539 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
2540 pseudo_type_info creation into the std namespace
2541
2542 2000-02-26 Mark Mitchell <mark@codesourcery.com>
2543
2544 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
2545 (import_export_class): Remove declaration.
2546 * decl2.c (import_export_class): Make it static.
2547 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
2548 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
2549 EXPR_WITH_FILE_LOCATION.
2550 * lex.c (check_newline): Tweak filename/lineno setting.
2551 * semantics.c (begin_while_stmt): Fix typo in comment.
2552
2553 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2554
2555 * lang-options.h (-fmessage-length=): Add missing option.
2556
2557 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
2558
2559 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
2560
2561 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
2562
2563 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
2564
2565 * optimize.c (expand_call_inline): Emit the return label before
2566 evaluating the return value.
2567
2568 2000-02-24 Mark Mitchell <mark@codesourcery.com>
2569
2570 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
2571 than duplicating functionality here.
2572 * optimize.c: Include input.h.
2573 (expand_call_inline): Use push_srcloc and pop_srcloc.
2574 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
2575 * parse.c: Regenerated.
2576 * Makefile.in (lex.o): Depend on input.h.
2577 (optimize.o): Likewise.
2578
2579 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
2580
2581 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
2582 function type, rather than ICE.
2583
2584 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
2585
2586 * decl.c (grokdeclarator): Call decl_type_access_control.
2587 * parse.y (parse_end_decl): Don't call decl_type_access_control if
2588 decl is null.
2589
2590 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
2591
2592 * decl.c (decls_match): Remove obsolete static member nadgering.
2593
2594 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2595
2596 * decl.c (grokdeclarator): Change ANSI to ISO.
2597 * lex.c (consume_string, readescape, do_identifier): Likewise.
2598 (parse_float, real_yylex): Likewise.
2599 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
2600 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
2601 new_type_id, maybe_label_decls, simple_stmt,
2602 for.init.statement): Likewise.
2603 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
2604 * semantics.c (finish_named_return_value): Likewise.
2605 * parse.c: Regenerate.
2606
2607 2000-02-21 Mark Mitchell <mark@codesourcery.com>
2608
2609 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
2610 (CPTI_CLASS_STAR_TYPE): Remove.
2611 (vtable_index_type): Likewise.
2612 (class_star_type_node): Remove.
2613 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
2614 (build_binary_op_nodefault): Remove.
2615 * call.c (build_new_op): Use build_binary_op instead of
2616 build_binary_op_nodefault.
2617 * decl.c (init_decl_processing): Remove class_star_type_node
2618 initialization. Make delta_type_node ptrdiff_type_node under the
2619 new ABI. Initialize vtable_index_type.
2620 (build_ptrmemfunc_type): Build different structures for the new
2621 ABI.
2622 (build_enumerator): Use build_binary_op instead of
2623 build_binary_op_nodefault.
2624 * method.c (build_overload_value): Mangle pointers-to-members
2625 appropriately under the new ABI.
2626 * typeck.c (build_array_ref): Use build_binary_op instead of
2627 build_binary_op_nodefault.
2628 (get_member_function_from_ptrfunc): Adjust for the new ABI.
2629 (build_binary_op_nodefault): Rename to ...
2630 (build_binary_op): ... this. Remove old version. Adjust for
2631 pointer-to-member comparisons under the new ABI.
2632 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
2633 (build_ptrmemfunc): Adjust for the new ABI.
2634 (expand_ptrmemfunc_cst): Likewise.
2635 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
2636 (pfn_from_ptrmemfunc): Adjust for the new ABI.
2637
2638 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
2639
2640 * call.c (build_object_call): Compress consecutive calls to
2641 cp_error.
2642 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
2643 (build_op_delete_call): Adjust message formatting.
2644
2645 * class.c (check_bases): Compress consecutive calls to
2646 cp_pedwarn.
2647 (finish_struct_anon): Say 'ISO C++'.
2648
2649 * decl.c (start_decl): Same here.
2650 (grok_reference_init): Likewise.
2651 (grokfndecl): Correct message formatting.
2652 (grokfndecl): Improve diagnostic.
2653 (check_static_variable_definition): Likewise. Say 'ISO C++'
2654 (compute_array_index_type): Say 'ISO C++'
2655 (create_array_type_for_decl): Compress consecutive calls to
2656 cp_error.
2657 (grokdeclarator): Say 'ISO C++'
2658 (grok_op_properties): Likewise.
2659
2660 * decl2.c (delete_sanity): Clairify diagnostic.
2661 (check_member_template): Same here.
2662 (grok_function_init): Use consistent terminology.
2663
2664 * expr.c (do_case): Say 'ISO C++'
2665
2666 * friend.c (do_friend): Compress consecutive calls to warning.
2667
2668 2000-02-20 Mark Mitchell <mark@codesourcery.com>
2669
2670 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
2671 * class.c (build_secondary_vtable): Reorganize. Don't create a
2672 new vtable under the new ABI.
2673 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
2674 computing the size.
2675 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
2676 the initializing elements.
2677 (initialize_vtable): New function.
2678 (dfs_finish_vtbls): Use it.
2679 (dfs_accumulate_vtbl_inits): New function.
2680 (finish_vtbls): Merge primary and secondary vtables under the new
2681 ABI.
2682 (finish_struct_1): Remove redundant call to layout_vtable_decl.
2683 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
2684 aren't VAR_DECLs.
2685
2686 * class.c (build_vtable): New function, split out from ...
2687 (get_vtable_decl): ... here, and ...
2688 (build_secondary_vtable): ... here.
2689
2690 * pt.c (tsubst_decl): Fix formatting.
2691
2692 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2693
2694 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
2695 (avoid_overlap, build_base_field): Likewise.
2696 (build_base_field, build_base_fields, is_empty_class):
2697 Test DECL_SIZE with integer_zero.
2698 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
2699 * cp-tree.h (struct lang_type): New field size_unit.
2700 (CLASSTYPE_SIZE_UNIT): New macro.
2701 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
2702 (cp_finish_decl): Delete -Wlarger-than processing.
2703 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
2704 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
2705 * tree.c (make_binfo): binfo vector is one entry longer.
2706 (walk_tree): Walk DECL_SIZE_UNIT.
2707
2708 2000-02-19 Mark Mitchell <mark@codesourcery.com>
2709
2710 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
2711 comment.
2712 (build_vtable_entry): Don't assume all vtable entries are
2713 functions.
2714 (build_vtbl_initializer): Adjust accordingly.
2715 (get_vtable_decl): Fix formatting.
2716
2717 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
2718
2719 * semantics.c (deferred_type_access_control): Walk the entire
2720 type_lookups list.
2721 (save_type_access_control): Rename from
2722 initial_deferred_type_access_control. Just remember the value.
2723 (decl_type_access_control): New fn.
2724 (begin_function_definition): Use deferred_type_access_control, after
2725 we've started the function. Set type_lookups to error_mark_node.
2726 * parse.y (frob_specs, fn.def1): Adjust.
2727 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
2728 (parse_end_decl, parse_bitfield0, parse_method): New fns.
2729 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
2730 (after_type_component_declarator0): Likewise.
2731 (after_type_component_declarator): Likewise.
2732 (notype_component_declarator): Likewise.
2733 * cp-tree.h: Adjust.
2734
2735 * decl.c (redeclaration_error_message): Allow redeclaration of
2736 namespace-scope decls.
2737
2738 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
2739
2740 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
2741
2742 2000-02-17 Mark Mitchell <mark@codesourcery.com>
2743
2744 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
2745 * decl2.c (grokclassfn): Likewise.
2746
2747 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
2748
2749 * decl2.c (lang_decode_option): Don't set default message length
2750 here.
2751 * lex.c (lang_init_options): Set it here.
2752
2753 2000-02-16 Mark Mitchell <mark@codesourcery.com>
2754
2755 Make DECL_CONTEXT mean the class in which a member function was
2756 declared, even for a virtual function.
2757 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
2758 (DECL_FRIEND_CONTEXT): New macro.
2759 (DECL_REAL_CONTEXT): Remove.
2760 (SET_DECL_FRIEND_CONTEXT): Likewise.
2761 (DECL_VIRTUAL_CONTEXT): Adjust.
2762 (DECL_CLASS_SCOPE_P): Use TYPE_P.
2763 (add_friends): Remove.
2764 (hack_decl_function_context): Likewise.
2765 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
2766 CP_DECL_CONTEXT.
2767 (build_over_call): Fix indentation. Use DECL_CONTEXT
2768 instead of DECL_CLASS_CONTEXT.
2769 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
2770 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
2771 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
2772 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
2773 (build_base_field): Likewise.
2774 (finish_struct_1): Likewise.
2775 (build_self_reference): Likewise.
2776 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
2777 DECL_REAL_CONTEXT.
2778 (pushtag): Use decl_function_context, not
2779 hack_decl_function_context.
2780 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
2781 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
2782 (pushdecl): Remove bogus code.
2783 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
2784 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
2785 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
2786 Use decl_function_context, nothack_decl_function_context.
2787 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
2788 (grokdeclarator): Likewise. Use decl_function_context, not
2789 hack_decl_function_context.
2790 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
2791 (start_function): Use DECL_FRIEND_CONTEXT, not
2792 DECL_CLASS_CONTEXT. Use decl_function_context, not
2793 hack_decl_function_context.
2794 (finish_function): Use decl_function_context, not
2795 hack_decl_function_context.
2796 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
2797 DECL_CLASS_CONTEXT.
2798 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
2799 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
2800 (grokfield): Likewise.
2801 (finish_builtin_type): Likewise.
2802 (finish_vtable_vardec): Use decl_function_context, not
2803 hack_decl_function_context.
2804 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
2805 (start_static_initialization_or_destruction): Likewise.
2806 (finish_static_initialization_or_destruction): Likewise.
2807 (mark_used): Adjust logic for deciding when to synthesize methods.
2808 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
2809 DECL_REAL_CONTEXT.
2810 * error.c (dump_function_decl): Use DECL_CONTEXT, not
2811 DECL_CLASS_CONTEXT.
2812 * friend.c (is_friend): Likewise.
2813 (add_friends): Remove.
2814 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
2815 * lex.c (begin_definition_of_inclass_inline): Use
2816 decl_function_context, not hack_decl_function_context.
2817 (process_next_inline): Likewise.
2818 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
2819 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
2820 DECL_CLASSS_CONTEXT.
2821 (hack_identifier): Likewise.
2822 (synthesize_method): Use decl_function_context, not
2823 hack_decl_function_context.
2824 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
2825 DECL_REAL_CONTEXT.
2826 (is_member_template): Use decl_function_context, not
2827 hack_decl_function_context. Use DECL_CONTEXT, not
2828 DECL_CLASS_CONTEXT.
2829 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
2830 DECL_CLASS_CONTEXT.
2831 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
2832 DECL_REAL_CONTEXT.
2833 (push_template_decl_real): Likewise.
2834 (instantiate_class_template): Don't call add_friends.
2835 (tsubst_default_argument): Use DECL_CONTEXT, not
2836 DECL_REAL_CONTEXT.
2837 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
2838 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
2839 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
2840 DECL_CLASS_CONTEXT.
2841 * repo.c (repo_inline_used): Likewise.
2842 * search.c (current_scope): Adjust for new _CONTEXT macros.
2843 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
2844 DECL_REAL_CONTEXT.
2845 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
2846 (lookup_fnfields_here):Likewise.
2847 (check_final_overrider): Likewise.
2848 (init_vbase_pointers): Likewise.
2849 (virtual_context): Likewise.
2850 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
2851 (expand_body): Use decl_function_context, not
2852 hack_decl_function_context.
2853 * tree.c (hack_decl_function_context): Remove.
2854 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
2855 DECL_CLASS_CONTEXT.
2856 * typeck2.c (error_not_base_type): Likewise.
2857
2858 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
2859
2860 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
2861
2862 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2863
2864 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
2865
2866 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
2867
2868 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
2869
2870 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
2871
2872 * decl2.c (lang_decode_option): Enable automatic line wrapping.
2873
2874 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
2875
2876 * parse.y (frob_specs): Split out...
2877 (parse_decl): From here.
2878 (fn.def2): Call initial_deferred_type_access_control.
2879 (after_type_component_declarator0): Call frob_specs.
2880 (notype_component_declarator0): Likewise.
2881 * search.c (friend_accessible_p): Nested classes are friends of their
2882 enclosing classes.
2883
2884 2000-02-10 Mark Mitchell <mark@codesourcery.com>
2885
2886 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
2887 used to create an implicit temporary.
2888
2889 * class.c (dfs_modify_vtables): Tweak calculation of functions to
2890 override.
2891
2892 2000-02-08 Nathan Sidwell <nathan@acm.org>
2893
2894 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
2895 strip array element qualifiers too.
2896
2897 2000-02-07 Mark Mitchell <mark@codesourcery.com>
2898
2899 * decl.c (store_parm_decls): Don't build cleanups for parameters
2900 while processing_template_decl.
2901
2902 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
2903
2904 * cp-tree.h (struct saved_scope): Add incomplete field.
2905 (namespace_scope_incomplete): New macro.
2906 * decl.c (pushdecl): Use it.
2907 (hack_incomplete_structures): Use it. See through artificial
2908 binding levels.
2909 (mark_saved_scope): Mark it.
2910
2911 Implement access control for nested types.
2912 * search.c (type_access_control): New fn.
2913 (accessible_p): Now we do perform access control for types.
2914 * semantics.c (deferred_type_access_control): New fn.
2915 (initial_deferred_type_access_control): New fn.
2916 (begin_function_definition): Call it. Add lookups parm.
2917 * decl.c (struct binding_level): Add this_class field.
2918 (pushlevel_class): Set it.
2919 (mark_binding_level): Mark it.
2920 (lookup_name_real): Use it. Call type_access_control.
2921 (mark_saved_scope): Mark lookups field.
2922 * cp-tree.h (flagged_type_tree): Add lookups field.
2923 (struct saved_scope): Add lookups field.
2924 (type_lookups): New macro.
2925 * parse.y (declmods): Now <ftype>.
2926 (parse_decl): Add lookups parm. Call
2927 initial_deferred_type_access_control.
2928 (lang_extdef): Clear type_lookups.
2929 (typed_declspecs, declmods, typespec): Set lookups field.
2930 (initdcl): Call deferred_type_access_control.
2931 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
2932 component_decl_1, named_parm): Adjust.
2933 * friend.c (is_friend): Nested classes are friends of their
2934 enclosing classes.
2935
2936 * class.c (currently_open_derived_class): New fn.
2937 * method.c (hack_identifier): Use it.
2938
2939 * lex.c (do_identifier): Remove obsolete code.
2940
2941 * parse.y (typed_typespecs): Propagate new_type_flag properly.
2942
2943 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
2944
2945 * tinfo.h: Remove apostrophes from C++ comment (xgettext
2946 thinks this file is plain C).
2947
2948 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2949
2950 * Makefile.in (call.o): Depend on $(EXPR_H).
2951
2952 * call.c: Include "expr.h".
2953
2954 * class.c (dump_class_hierarchy): Add prototype.
2955
2956 * search.c (dfs_get_pure_virtuals): Likewise.
2957
2958 2000-02-1 Ulrich Drepper <drepper@redhat.com>
2959
2960 * parse.y (simple_stmt): Allow :: token in asm parameter list.
2961 * parse.c: Rebuilt.
2962
2963 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
2964
2965 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
2966 Store it in DECL_FCONTEXT.
2967 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
2968
2969 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
2970
2971 * tinfo.h (old abi): #include "tconfig.h".
2972 * tinfo.cc (convert_to_base): Move into old abi section.
2973
2974 2000-01-31 Mark Mitchell <mark@codesourcery.com>
2975
2976 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
2977 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
2978 (BINFO_PRIMARY_BINFO): New macro.
2979 (BF_DELTA): Rename to ...
2980 (BV_DELTA): ... this.
2981 (BF_VCALL_INDEX): Rename to ...
2982 (BV_VCALL_INDEX): ... this.
2983 (BF_FN): Rename to ...
2984 (BV_FN): ... this.
2985 * class.c (build_vbase_path): Adjust for changes to reverse_path.
2986 (set_rtti_entry): Rename BF_ macros to BV_ variants.
2987 (modify_vtable_entry): Simplify.
2988 (add_virtual_function): Rename BF_ macros to BV_ variants.
2989 (build_vtable_initializer): Likewise.
2990 (get_class_offset_1): Remove.
2991 (dfs_get_class_offset): Likewise.
2992 (get_class_offset): Likewise.
2993 (dfs_find_final_overrider): New function.
2994 (find_final_overrider): Likewise.
2995 (modify_one_vtable): Remove.
2996 (dfs_find_base): New function.
2997 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
2998 find_final_overrider.
2999 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
3000 virtuals.
3001 (dfs_fixup_vtable_deltas): Remove.
3002 (override_one_vtable): Remove.
3003 (merge_overrides): Likewise.
3004 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
3005 unreal chilren of virtual bases.
3006 (finish_struct_1): Don't use merge_overrides. Don't use
3007 dfs_fixup_vtable_deltas.
3008 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
3009 BINFOs.
3010
3011 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
3012 Jason Merrill <jason@yorick.cygnus.com>
3013
3014 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
3015
3016 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
3017
3018 * exception.cc (__throw_bad_typeid): Add missing std::.
3019
3020 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3021
3022 * cp-tree.h (make_thunk): PROTO -> PARAMS.
3023
3024 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
3025
3026 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
3027
3028 Runtime support for new-abi rtti.
3029 * inc/typeinfo (type_info::operator!=): Define in class.
3030 (type_info::before, type_info::name, type_info::operator==,
3031 type_info::operator!=): Define new ABI implementations.
3032 (type_info::is_pointer_p, type_info::is_function_p): Declare
3033 new virtual functions.
3034 (type_info::do_catch, type_info::do_upcast): Likewise.
3035
3036 * tinfo.h (__base_class_info): Define new class.
3037 (__class_type_info): Likewise.
3038 (__si_class_type_info): Likewise.
3039 (__vmi_class_type_info): Likewise.
3040 (__dynamic_cast): Prototype.
3041
3042 * tinfo.cc: Conditionalize old and new rtti mechanisms.
3043 (type_info::is_pointer_p): Define new function.
3044 (type_info::is_function_p): Likewise.
3045 (type_info::do_catch): Likewise.
3046 (type_info::do_upcast): Likewise.
3047 (vtable_prefix): New structure for vtable access.
3048 (adjust_pointer): Define new template function.
3049 (contained_p, public_p, virtual_p, contained_public_p,
3050 contained_nonpublic_p, contained_nonvirtual_p): Define new
3051 functions.
3052 (nonvirtual_base_type): New local variable.
3053 (__class_type_info::~__class_type_info): Define.
3054 (__si_class_type_info::~__si_class_type_info): Likewise.
3055 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
3056 (__class_type_info::do_catch): Define new function.
3057 (__class_type_info::do_upcast): Likewise.
3058 (__class_type_info::find_public_src): Likewise.
3059 (__class_type_info::do_find_public_src): Likewise.
3060 (__si_class_type_info::do_find_public_src): Likewise.
3061 (__vmi_class_type_info::do_find_public_src): Likewise.
3062 (__class_type_info::do_dyncast): Likewise.
3063 (__si_class_type_info::do_dyncast): Likewise.
3064 (__vmi_class_type_info::do_dyncast): Likewise.
3065 (__class_type_info::do_upcast): Likewise.
3066 (__si_class_type_info::do_upcast): Likewise.
3067 (__vmi_class_type_info::do_upcast): Likewise.
3068 (__dynamic_cast): Likewise.
3069
3070 * tinfo2.cc (__fundamental_type_info): Define new class.
3071 (__pointer_type_info): Likewise.
3072 (__reference_type_info): Likewise.
3073 (__array_type_info): Likewise.
3074 (__function_type_info): Likewise.
3075 (__enum_type_info): Likewise.
3076 (__ptr_to_member_type_info): Likewise.
3077 (__fundamental_type_info::~__fundamental_type_info): Define.
3078 (__pointer_type_info::~__pointer_type_info): Likewise.
3079 (__reference_type_info::~__reference_type_info): Likewise.
3080 (__array_type_info::~__array_type_info): Likewise.
3081 (__function_type_info::~__function_type_info): Likewise.
3082 (__enum_type_info::~__enum_type_info): Likewise.
3083 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
3084 (__pointer_type_info::do_catch): Define new function.
3085 (__ptr_to_member_type_info::do_catch): Define new function.
3086
3087 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
3088 (__is_pointer): Likewise.
3089
3090 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
3091
3092 2000-01-30 Mark Mitchell <mark@codesourcery.com>
3093
3094 * cp/class.c (build_vtable): Rename to build_primary_vtable.
3095 (prepare_fresh_vtable): Rename to build_secondary_vtable.
3096 (make_new_vtable): New function.
3097 (modify_vtable_entry): Handle generation of new vtables correctly.
3098 (modify_one_vtable): Remove unused parameter.
3099 (dfs_fixup_vtable_deltas): Likewise.
3100 (override_one_vtable): Use build_secondary_vtable.
3101 (finish_struct_1): Use build_primary_vtable and
3102 build_secondary_vtable.
3103
3104 2000-01-28 Ulrich Drepper <drepper@redhat.com>
3105
3106 * cp/decl.c: Adjust variable names, comments, help strings.
3107
3108 2000-01-29 Nathan Sidwell <nathan@acm.org>
3109
3110 * new2.cc (operator delete[]): Use operator delete, don't assume
3111 implementation.
3112
3113 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
3114
3115 * class.c (build_vtbl_initializer): Add argument to
3116 build_vtable_entry call.
3117
3118 2000-01-27 Mark Mitchell <mark@codesourcery.com>
3119
3120 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
3121 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
3122 (BF_DELTA): New macro.
3123 (BF_VCALL_INDEX): Likewise.
3124 (BF_FN): Likewise.
3125 (THUNK_VCALL_OFFSET): Likewise.
3126 (make_thunk): Change prototype.
3127 * class.c (build_vtable_entry): Integrate
3128 build_vtable_entry_for_fn. Handle vcall indices.
3129 (build_vtable_entry_for_fn): Remove.
3130 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
3131 BF_VCALL_INDEX, BF_FN.
3132 (modify_vtable_entry): Integrate common code from
3133 modify_one_vtable and dfs_fixup_vtable_deltas.
3134 (add_virtual_function): Set BF_VCALL_INDEX.
3135 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
3136 and BF_FN.
3137 (modify_one_vtable): Simplify.
3138 (dfs_fixup_vtable_deltas): Likewise.
3139 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
3140 * method.c (make_thunk): Handle vcall indices.
3141
3142 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
3143
3144 Compiler side new abi rtti (not enabled).
3145 * cp-tree.h (new_abi_rtti_p): New macro.
3146 (emit_support_tinfos): Prototype new function.
3147 (tinfo_decl_p): Likewise.
3148 (emit_tinfo_decl): Likwise.
3149 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
3150 macros.
3151 (doing_runtime): New local static.
3152 (init_rtti_processing): Add new-abi initializer.
3153 (get_tinfo_decl): Add new-abi logic.
3154 (tinfo_from_decl): Likewise.
3155 (build_dynamic_cast_1): Likewise.
3156 (qualifier_flags): New static function.
3157 (tinfo_base_init): Likewise.
3158 (generic_initializer): Likewise.
3159 (ptr_ref_initializer): Likewise.
3160 (ptmd_initializer): Likewise.
3161 (class_hint_flags): Likewise.
3162 (class_initializer): Likewise.
3163 (synthesize_tinfo_var): Likewise.
3164 (create_real_tinfo_var): Likewise.
3165 (create_pseudo_type_info): Likewise.
3166 (get_vmi_pseudo_type_info): Likewise.
3167 (create_tinfo_types): Likewise.
3168 (emit_support_tinfos): New global function.
3169 (tinfo_decl_p): New global predicate.
3170 (emit_tinfo_decl): New global function.
3171 * class.c (set_rtti_entry): Generalize for old and new rtti.
3172 (build_vtbl_initializer): Likewise.
3173 * decl2.c (finish_file): Likewise.
3174
3175 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
3176
3177 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
3178 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
3179
3180 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
3181
3182 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
3183 for scopes.
3184
3185 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
3186
3187 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
3188
3189 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
3190
3191 * optimize.c (calls_setjmp_r): Supply new argument
3192 to special_function_p.
3193
3194 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3195
3196 * call.c: PROTO -> PARAMS.
3197 * class.c: Likewise.
3198 * cp-tree.h: Likewise.
3199 * cvt.c: Likewise.
3200 * decl.c: Likewise.
3201 * decl.h: Likewise.
3202 * decl2.c: Likewise.
3203 * dump.c: Likewise.
3204 * errfn.c: Likewise.
3205 * error.c: Likewise.
3206 * except.c: Likewise.
3207 * expr.c: Likewise.
3208 * init.c: Likewise.
3209 * input.c: Likewise.
3210 * lex.c: Likewise.
3211 * lex.h: Likewise.
3212 * method.c: Likewise.
3213 * optimize.c: Likewise.
3214 * parse.y: Likewise.
3215 * pt.c: Likewise.
3216 * repo.c: Likewise.
3217 * rtti.c: Likewise.
3218 * search.c: Likewise.
3219 * semantics.c: Likewise.
3220 * spew.c: Likewise.
3221 * tree.c: Likewise.
3222 * typeck.c: Likewise.
3223 * typeck2.c: Likewise.
3224 * xref.c: Likewise.
3225
3226 2000-01-25 Richard Henderson <rth@cygnus.com>
3227
3228 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
3229
3230 2000-01-25 Mark Mitchell <mark@codesourcery.com>
3231
3232 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
3233 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
3234 (struct vcall_offset_data_s): New type.
3235 (dfs_vcall_offset_queue_p): New function.
3236 (dfs_build_vcall_offset_vtbl_entries): Likewise.
3237 (build_vcall_offset_vtbl_entries): Likewise.
3238 (layout_vtable_decl): Likewise.
3239 (num_vfun_entries): Likewise.
3240 (num_extra_vtbl_entries): Add the entries for vcall offsets.
3241 (build_vtbl_initializer): Likewise.
3242 (dfs_finish_vtabls): Use layout_vtable_decl.
3243 (modify_one_vtables): Always duplicate vtables under the new ABI.
3244 (finish_struct_1): Use layout_vtable_decl.
3245
3246 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3247
3248 * decl.c (member_function_or_else): Change third arg from a format
3249 specifier to an `enum overload_flags'. Callers changed.
3250
3251 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
3252
3253 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
3254 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
3255 build_const_cast, get_delta_difference, check_return_expr): Avoid
3256 ANSI string concatenation usage.
3257
3258 2000-01-24 Mark Mitchell <mark@codesourcery.com>
3259
3260 * class.c (layout_class_type): Put the fields required to make a
3261 class non-empty at the end, not the beginning, of the TYPE_FIELDs
3262 list.
3263
3264 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
3265
3266 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
3267 template.
3268
3269 * decl2.c (mark_used): Do instantiate inlines that have been
3270 explicitly instantiated.
3271
3272 2000-01-24 Richard Henderson <rth@cygnus.com>
3273
3274 * call.c (build_over_call): Use expand_tree_builtin.
3275 * typeck.c (build_function_call_real): Likewise.
3276 (build_binary_op_nodefault): Handle unordered compares.
3277
3278 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
3279
3280 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
3281 cp_tree_index values.
3282 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
3283 New global node #defines for them.
3284 * rtti.c (call_void_fn): Replace with ...
3285 (build_runtime_decl): ... new static function.
3286 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
3287 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
3288 (build_dynamic_cast_1): Always produce correctly typed result.
3289 Explicitly produce type_info addresses. Use dynamic_cast_node.
3290 * exception.cc (__throw_bad_cast): Return `void *'.
3291 (__throw_bad_typeid): Return `const type_info &'.
3292
3293 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
3294
3295 * cp-tree.h (get_vtable_decl): Prototype new function.
3296 * class.c (get_vtable_decl): New function. Broken out from ...
3297 (build_vtable): ... here. Use it.
3298 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
3299 by get_vtable_decl.
3300
3301 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
3302
3303 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
3304 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
3305 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
3306 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
3307 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
3308 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
3309 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
3310 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
3311 (CPTI_TINFO_VAR_ID): New enumeration.
3312 (__tp_desc_type_node, __access_mode_type_node,
3313 __bltn_desc_type_node, __user_desc_type_node,
3314 __class_desc_type_node, __ptr_desc_type_node,
3315 __attr_desc_type_node, __func_desc_type_node,
3316 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
3317 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
3318 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
3319 enum_desc_type_node, class_desc_type_node,
3320 si_class_desc_type_node, vmi_class_desc_type_node,
3321 ptmd_desc_type_node, base_desc_type_node): New #defines.
3322 (tinfo_fn_id, tinfo_fn_type): Rename to ...
3323 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
3324 (tinfo_var_id): New enumeration.
3325 (DECL_TINFO_FN_P): Augment comment.
3326 * decl.c (cp_global_trees): Adjust documentation.
3327 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
3328 tinfo_decl_type and tinfo_var_id.
3329 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
3330 (build_typeid): Remove unused variable.
3331 (get_tinfo_var): Use tinfo_var_id.
3332 (tinfo_name): New static function.
3333 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
3334 (tinfo_from_decl): Likewise.
3335 (get_base_offset): New static function, broken out of
3336 expand_class_desc.
3337 (expand_si_desc): Use tinfo_name.
3338 (expand_class_desc): Likewise. Lose local static variable.
3339 Use base_desc_type_node. Use get_base_offset.
3340 (expand_ptr_desc): Use tinfo_name.
3341 (expand_attr_desc): Likewise.
3342 (expand_generic_desc): Likewise.
3343
3344 * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
3345 * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
3346
3347 2000-01-23 Mark Mitchell <mark@codesourcery.com>
3348
3349 * cp-tree.h (__eprintf): Remove declaration.
3350 * tree.c (__eprintf): Remove definition.
3351
3352 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
3353 Mark Mitchell <mark@codesourcery.com>
3354
3355 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
3356 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
3357
3358 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
3359
3360 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
3361
3362 2000-01-23 Mark Mitchell <mark@codesourcery.com>
3363
3364 * cp-tree.h (register_dtor_fn): New function.
3365 * decl.c (destroy_local_static): Rename to ...
3366 (register_dtor_fn): ... this. Give it external linkage.
3367 (expand_static_init): Use it.
3368 * decl2.c (do_static_initialization): Likewise, if using
3369 __cxa_atexit.
3370 (do_static_destruction): Check that __cxa_atexit is not in use.
3371 (finish_file): Don't call do_static_destruction if using
3372 __cxa_atexit.
3373
3374 * typeck.c (convert_arguments): Restore two-message error
3375 reporting.
3376
3377 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
3378
3379 Remap dynamic cast hint values to be consistent across ABIs.
3380 * search.c (dynamic_cast_base_recurse): Remap generated value.
3381 (get_dynamic_cast_base_type): Adjust documentation.
3382 * tinfo.h (__user_type_info::dyncast): Likewise.
3383 (__user_type_info::find_public_subobj): Remap BOFF meaning.
3384 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
3385 (__class_type_info::do_dyncast): Likewise.
3386 (__class_type_info::do_find_public_subobj): Likewise.
3387 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
3388
3389 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
3390
3391 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
3392
3393 * typeck2.c (incomplete_type_error): Restore previous
3394 cp_error and cp_error_at call sequence.
3395
3396 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
3397
3398 * class.c (dump_class_hierarchy): Make format agree with argument;
3399 cast pointer to unsigned long and print with %lx.
3400
3401 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
3402
3403 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
3404
3405 * typeck.c (composite_pointer_type, common_type,
3406 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
3407 build_function_call_real, convert_arguments,
3408 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
3409 build_unary_op, mark_addressable, build_compound_expr,
3410 build_static_cast, build_reinterpret_cast, build_const_cast,
3411 build_c_cast, build_modify_expr, get_delta_difference,
3412 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
3413 'ISO C++'. Fusion consecutive calls to diagnotic message routines
3414 into a single one.
3415 * typeck2.c (readonly_error, abstract_virtuals_error,
3416 process_init_constructor, check_for_new_type): Likewise.
3417
3418 2000-01-19 Mark Mitchell <mark@codesourcery.com>
3419
3420 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
3421 VAR_DECLs.
3422
3423 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
3424
3425 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
3426 (build_x_typeid): Likewise.
3427 (get_tinfo_fn): Likewise.
3428 (get_tinfo_fn_unused): Rename to ...
3429 (get_tinfo_decl): ... here.
3430 * rtti.c (build_headof): Replace logic error with assertion.
3431 (get_tinfo_fn_dynamic): Rename to ...
3432 (get_tinfo_decl_dynamic): ... here. Make static. Use
3433 complete_type_or_else.
3434 (build_x_typeid): Move into ...
3435 (build_typeid): ... here. Adjust call to
3436 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
3437 throw_bad_typeid expression.
3438 (get_tinfo_fn_unused): Rename to ...
3439 (get_tinfo_decl): ... here. Adjust comment.
3440 (get_tinfo_fn): Delete.
3441 (tinfo_from_decl): New static function.
3442 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
3443 (get_typeid): Use complete_type_or_else.
3444 (build_dynamic_cast_1): Adjust calls to
3445 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
3446 * parse.y (primary): Adjust call to build_typeid.
3447 * except.c (build_eh_type_type_ref): Adjust call to
3448 get_tinfo_decl. Mark as used.
3449 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
3450 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
3451 * parse.c: Regenerated.
3452
3453 2000-01-17 Mark Mitchell <mark@codesourcery.com>
3454
3455 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
3456 calling convention.
3457 (resolves_to_fixed_type_p): Document calling convention.
3458 * rtti.c (build_x_typeid): Initialize NONNULL.
3459
3460 * cp-tree.h (build_shared_int_cst): New function.
3461 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
3462 * class.c (modify_vtable_entry): Likewise.
3463 (add_virtual_function): Split out code to generated shared
3464 INTEGER_CSTs to build_share_int_cst.
3465 (modify_all_vtables): Handle all the overridden functions here.
3466 Add overridden functions from non-primary virtual bases to the
3467 primary vtable.
3468 (finish_struct_1): Adjust call to modify_all_vtables. Add
3469 overridden functions from non-primary bases to the vtable.
3470 * tree.c (build_shared_int_cst): New function.
3471
3472 * cp-tree.h (scratchalloc): Remove.
3473 (build_scratch_list): Likewise.
3474 * call.c (convert_class_to_reference): Replace build_scratch_list
3475 and build_expr_list with build_tree_list.
3476 (add_candidate): Replace scratchalloc with expralloc. Note memory
3477 leak.
3478 (build_user_type_conversion_1): Replace build_scratch_list
3479 and build_expr_list with build_tree_list.
3480 (build_new_op): Likewise.
3481 (build_op_delete_call): Likewise.
3482 (convert_like): Likewise.
3483 * cvt.c (ocp_convert): Likewise.
3484 * decl.c (start_decl): Likewise.
3485 (start_function): Likewise.
3486 (finish_destructor_body): Likewise.
3487 (maybe_build_cleanup_1): Likewise.
3488 * decl2.c (reparse_decl_as_expr): Likewise.
3489 * init.c (perform_member_init): Likewise.
3490 (expand_cleanup_for_base): Likewise.
3491 (build_builtin_delete_call): Likewise.
3492 (build_new_1): Likewise.
3493 (build_delete): Likewise.
3494 * method.c (do_build_assign_ref): Likewise.
3495 * parse.y (already_scoped_stmt): Likewise.
3496 (nontrivial_exprlist): Likewise.
3497 (net_initializer): Likewise.
3498 (initlist): Likewise.
3499 * parse.c: Regenerated.
3500 * rtti.c (build_x_typeid): Likewise.
3501 (build_dynamic_cast_1): Likewise.
3502 * typeck.c (build_x_compound_expr): Likewise.
3503 (build_static_cast): Likewise.
3504 (build_modify_expr): Likewise.
3505
3506 * cp-tree.h (DECL_VINDEX): Add documentation.
3507 * class.c (build_vtable_entry): Likewise.
3508 (start_vtable): Add comment.
3509 (add_virtual_function): Replace pending_hard_virtuals with
3510 overridden_virtuals and pending_virtuals with new_virtuals.
3511 Replace redundant assignments with assertions.
3512 (check_for_override): Add comment.
3513 (check_bases_and_members): Replace pending_hard_virtuals with
3514 overridden_virtuals and pending_virtuals with new_virtuals.
3515 (create_vtbl_ptr): Likewise.
3516 (layout_class_type): Likewise.
3517 (finish_struct_1): Likewise. Add comments.
3518
3519 2000-01-16 Mark Mitchell <mark@codesourcery.com>
3520
3521 * class.c (finish_struct_1): Replace redundant code with
3522 assertions.
3523
3524 * cp-tree.h (flag_new_abi): Move.
3525 (flag_use_cxa_atexit): Likewise.
3526 (flag_honor_std): Likewise.
3527 (flag_rtti): Likewise.
3528 (vbase_offsets_in_vtable_p): Define.
3529 (vptrs_present_everywhere_p): Likewise.
3530 (TYPE_CONTAINS_VPTR_P): Likewise.
3531 (dfs_walk_real): Declare.
3532 * class.c (build_vbase_pointer_fields): Check
3533 vbase_offsets_in_vtable_p.
3534 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
3535 BINFO_VPTR_FIELD.
3536 (build_vbase_offset_vtbl_entries): Simplify.
3537 (build_vbase_offset_vtbl_entries): Adjust.
3538 (build_vbase_pointer): Add ability to look up vbase offsets in
3539 vtable.
3540 (start_vtable): New function.
3541 (add_virtual_function): Use it.
3542 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
3543 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
3544 (build_vtbl_initializer): Take the type of the complete object as
3545 input. Use it to correctly calculate vbase offsets.
3546 (dfs_finish_vtbls): Pass the complete type to
3547 build_vtbl_initializer.
3548 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
3549 (create_vtable_ptr): Create a vtable even if there are no
3550 new virtual functions, under the new ABI.
3551 (finish_struct_1): Likewise.
3552 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
3553 * decl.c (exapnd_static_init): Remove call to
3554 preserve_initializer.
3555 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
3556 vtables.
3557 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
3558 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
3559 (construct_virtual_bases): Don't initialize virtual base pointers
3560 under the new ABI.
3561 (build_aggr_init): Clean up comment.
3562 (expand_aggr_init_1): Likewise.
3563 * rtti.c (expand_class_desc): Store the virtual function table
3564 index where the vbase offset lives in the offset field.
3565 * search.c (dfs_walk_real): Make it global.
3566 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
3567 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
3568
3569 * tinfo.h (USItype): Make it signed under the new ABI.
3570 * tinfo.cc (convert_to_base): New function. Encapsulate base
3571 conversion logic here.
3572 (__class_type_info::do_upcast): Use it.
3573 (__class_type_info::do_dyncast): Likewise.
3574 (__class_type_info::do_find_public_subobj): Likewise.
3575
3576 * init.c (construct_virtual_bases): Don't look up the addresses of
3577 virtual bases at run-time.
3578
3579 * class.c (build_vbase_pointer): Relocate.
3580 (build_vbase_pointer_fields): Likewise.
3581 (dfs_build_vbase_offset_vtbl_entries): Likewise.
3582 (build_vbase_offset_vtbl_entries): Likewise.
3583
3584 * decl.c (init_decl_processing): Complain if -fnew-abi
3585 -fno-vtable-thunks is used.
3586
3587 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
3588 flag_new_abi.
3589
3590 2000-01-15 Mark Mitchell <mark@codesourcery.com>
3591
3592 * cp-tree.h (num_extra_vtbl_entries): New function.
3593 (size_extra_vtbl_entries): Likewise.
3594 (dfs_vtable_path_unmark): Likewise.
3595 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
3596 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
3597 * class.c (num_extra_vtbl_entries): New function.
3598 (size_extra_vtbl_entries): Likewise.
3599 (dfs_build_vbase_offset_vtbl_entries): New function.
3600 (build_vbase_offset_vtbl_entries): Likewise.
3601 (build_vtbl_initializer): Use it.
3602 (finish_struct_1): Adjust vtable sizes (using
3603 num_extra_vtbl_entries).
3604 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
3605 THUNK_DECL is non-NULL before expanding it.
3606 * init.c (expand_virtual_init): Adjust the vtable pointer by
3607 size_extra_vtbl_entries before storing it.
3608 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
3609 Handle TREE_LIST parameters here, not in the dfs_* functions.
3610 (dfs_unmarked_real_bases_queue_p): Adjust.
3611 (dfs_marked_real_bases_queue_p): Likewise.
3612 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
3613 (dfs_vtable_path_marked_real_bases_queue_p): New function.
3614 (dfs_vtable_path_unmark): Likewise.
3615
3616 2000-01-14 Mark Mitchell <mark@codesourcery.com>
3617
3618 * optimize.c (copy_body_r): Clear the operand three of a
3619 TARGET_EXPR when copying it.
3620
3621 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3622
3623 * method.c (build_decl_overload_real): Check whether we are in ::
3624 before returning __builtin_new/delete.
3625
3626 2000-01-13 Mark Mitchell <mark@codesourcery.com>
3627
3628 * pt.c (tsubst_friend_function): Improve comment.
3629 (instantiate_decl): Avoid crashing when a "nested" function is
3630 instantiated from the top level.
3631
3632 * dump.c (dqeueue_and_dump): Dump
3633 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
3634
3635 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3636
3637 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
3638
3639 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
3640
3641 * g++spec.c (lang_specific_driver): Add -fnew-abi if
3642 ENABLE_NEW_GXX_ABI defined.
3643 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
3644 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
3645 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
3646
3647 2000-01-12 Mark Mitchell <mark@codesourcery.com>
3648
3649 * decl.c (start_cleanup_fn): Call pushdecl.
3650
3651 * call.c (convert_class_to_reference): Fix typos.
3652 (build_conditional_expr): Handle errors gracefully.
3653 * class.c (push_nested_class): Likewise.
3654 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
3655 (DECL_THIS_EXTERN): Use it.
3656 (DECL_THIS_STATIC): Likewise.
3657 * cvt.c (convert_to_void): Handle errors gracefully.
3658 (build_expr_type_conversion): Likewise.
3659 * decl.c (maybe_push_decl): Likewise.
3660 (start_decl_1): Likewise.
3661 (require_complete_types_for_parms): Likewise.
3662 * parse.y (structsp): Likewise.
3663 (base_class): Likewise.
3664 * parse.c: Regenerated.
3665 * pt.c (finish_member_template_decl): Likewise.
3666 * typeck.c (decay_conversion): Likewise.
3667
3668 * cp-tree.h (dfs_skip_vbases): New function.
3669 (find_vbase_instance): Likewise.
3670 * class.c (determine_primary_base): Allow a nearly empty base to
3671 serve as a primary base class under the new ABI.
3672 (get_class_offset_1): Rename to ...
3673 (dfs_get_class_offset): ... this. Simplify. Don't issue error
3674 messages here.
3675 (get_class_offset): Use it. Issue error messages here.
3676 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
3677 find the right copies of virtual bases.
3678 (fixup_vtable_deltas1): Rename to ...
3679 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
3680 bases as primary bases.
3681 (fixup_vtable_deltas): Remove.
3682 (override_one_vtable): Handle virtual bases as primary bases.
3683 (merge_overrides): Likewise.
3684 (finish_struct_1): Likewise.
3685 (dump_class_hierarchy): Dump primary-ness of bases as well.
3686 * search.c (mark_primary_bases): Use a pre-order traversal to
3687 handle primary virtual bases.
3688 (dfs_skip_vbases): New fiunction.
3689 (expand_upcast_fixups): Adjust to handle primary virtual bases.
3690 (fixup_virtual_upcast_offsets): Likewise.
3691 (fixup_all_virtual_upcast_offsets): Likewise.
3692 (dfs_find_vbase_instances): New function.
3693 (find_vbase_instance): Likewise.
3694
3695 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
3696
3697 * lex.c (DIR_SEPARATOR): Delete macro.
3698
3699 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
3700
3701 * decl2.c (lang_decode_option): Handle automatic line wrapping
3702 option.
3703
3704 2000-01-11 Mark Mitchell <mark@codesourcery.com>
3705
3706 * friend.c (do_friend): Don't resolve scopes when processing
3707 template declarations, even if the qualifying scope doesn't
3708 involve template parameters.
3709
3710 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
3711
3712 * class.c (dfs_modify_vtables_queue_p): Remove.
3713 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
3714 and dfs_marked_real_bases_queue_p instead of
3715 dfs_modify_vtables_queue_p.
3716
3717 * class.c (build_vbase_path): Simplify.
3718 (dfs_propagate_binfo_offsets): New function.
3719 (propagate_binfo_offsets): Use it.
3720 (remove_base_field): Simplify.
3721 (dfs_set_offset_for_vbases): Remove.
3722 (dfs_set_offset_for_shared_vbases): New function.
3723 (dfs_set_offset_for_unshared_vbases): Likewise.
3724 (layout_virtual_bases): Use them.
3725 (layout_basetypes): Don't call propagate_binfo_offsets.
3726 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
3727 for the vbases.
3728
3729 * class.c (build_base_field): New function, split out from ...
3730 (build_base_fields): ... here. Use it. Allocate primary bases
3731 first, under the new ABI.
3732 (get_vtable_entry): Remove.
3733 (remove_base_field): New function, split out from ...
3734 (remove_base_fields): ... here. Adjust since primary bases come
3735 first under the new ABI.
3736
3737 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
3738 (initialize_vtbl_ptrs): New function.
3739 (expand_indirect_vtbls_init): Change prototype.
3740 (convert_pointer_to_vbase): Declare.
3741 * init.c (expand_direct_vtbls_init): Remove.
3742 (dfs_initialize_vtbl_ptrs): New function.
3743 (initialize_vtbl_ptrs): Likewise.
3744 (emit_base_init): Use initialize_vtbl_ptrs.
3745 * search.c (convert_pointer_to_vbase): Make it global.
3746 (expand_indirect_vtbls_init): Remove vtable initialization code.
3747 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
3748
3749 * class.c (dfs_finish_vtbls): New function.
3750 (finish_vtbls): Use it.
3751 (dump_class_hierarchy): New function.
3752
3753 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
3754 (BINFO_VBASE_PRIMARY_P): New macro.
3755 (BINFO_VIRTUALS): Add to documentation.
3756 (SET_BINFO_PRIMARY_MARKED_P): Remove.
3757 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
3758 (dfs_mark_primary_bases_queue_p): Likewise.
3759 (dfs_unmarked_real_bases_queue_p): New function.
3760 (dfs_marked_real_bases_queue_p): Likewise.
3761 * search.c (dfs_mark_primary_bases): Adjust.
3762 (mark_primary_bases): Likewise.
3763 (get_shared_vbase_if_not_primary): New function.
3764 (dfs_unmarked_real_bases_queue_p): Likewise.
3765 (dfs_marked_real_bases_queue_p): Likewise.
3766 (dfs_get_pure_virtuals): Simplify.
3767 (get_pure_virtuals): Likewise.
3768
3769 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3770
3771 * lex.c: Include tm_p.h.
3772
3773 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
3774
3775 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
3776
3777 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
3778
3779 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
3780 * pt.c (instantiate_decl): Defer comdat templates that might not be
3781 needed.
3782
3783 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
3784 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
3785 (finish_file): Likewise.
3786
3787 * decl2.c (import_export_class): Undo 12/14 change.
3788
3789 * error.c (dump_decl): operator new, not operatornew.
3790
3791 * class.c (field_decl_cmp): A nontype is "greater" than a type.
3792 * search.c (lookup_field_1): Look for the last field with the
3793 desired name.
3794
3795 2000-01-05 Nathan Sidwell <nathan@acm.org>
3796
3797 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
3798 FUNCTION_DECL.
3799
3800 2000-01-05 Nathan Sidwell <nathan@acm.org>
3801
3802 * typeck.c (build_static_cast): Don't strip target qualifiers
3803 when casting from a class.
3804
3805 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3806
3807 * class.c (warn_hidden): Initialize variable `fndecl'.
3808
3809 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
3810
3811 * decl.c (flag_isoc9x): New variable to be able to use code in
3812 c-common.c. For now always zero.
3813
3814 2000-01-03 Mark Mitchell <mark@codesourcery.com>
3815
3816 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
3817 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
3818 or unshare_base_binfos for virtual bases here.
3819 * search.c (dfs_get_vbase_types): Do it here.
3820 (get_vbase_types): Adjust.
3821
3822 2000-01-02 Mark Mitchell <mark@codesourcery.com>
3823
3824 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
3825 (BINFO_PRIMARY_MARKED_P): Use flag 5.
3826 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
3827 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
3828 (unmark_primary_bases): Remove declaration.
3829 (unmarkedp): Declare.
3830 (dfs_vbase_unmark): Likewise.
3831 * class.c (determine_primary_base): Return immediately if there
3832 are no base classes. Call mark_primary_bases here.
3833 (modify_all_direct_vtables): Remove.
3834 (modify_all_indirect_vtables): Remove.
3835 (dfs_modify_vtables_queue_p): New function.
3836 (dfs_modify_vtables): New function.
3837 (modify_all_vtables): Use them.
3838 (build_base_fields): Build FIELD_DECLs for primary virtual base
3839 classes.
3840 (create_vtable_ptr): Don't call determine_primary_base here.
3841 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
3842 (dfs_set_offset_for_vbases): ... this.
3843 (layout_virtual_bases): Use it.
3844 (layout_class_type): Call determine_primary_base here.
3845 * search.c (unmarkedp): Make it global.
3846 (shared_marked_p): Simplify.
3847 (shared_unmarked_p): Likewise.
3848 (dfs_primary_bases_queue_p): Remove.
3849 (dfs_unmark_primary_bases): Likewise.
3850 (unmark_primary_bases): Likewise.
3851 (mark_primary_bases): Simplify.
3852 (get_pure_virtuals): Don't call mark_primary_bases here.
3853 (dfs_vbase_unmark): New function.
3854 (get_vbase_types): Simplify.
3855
3856 * class.c (struct base_info): Remove.
3857 (determine_primary_base): Take has_virtual_p rather than a
3858 base_info as input. Don't calculate max_has_virtual.
3859 (finish_struct_bits): Remove max_has_virtual argument.
3860 (create_vtable_ptr): Remove max_has_virtual_p argument.
3861 (layout_virtual_bases): Remove max argument.
3862 (layout_basetypes): Likewise.
3863 (layout_class_type): Remove max_has_virtual_p argument.
3864 (finish_struct_1): Remove max_has_virtual.
3865
3866 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
3867 (layout_basetypes): Remove.
3868 * class.c (propagate_binfo_offsets): Moved here from tree.c.
3869 Update to handle primary virtual bases.
3870 (remove_base_fields): New function, split out from
3871 layout_basetypes.
3872 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
3873 (layout_virtual_bases): New function, split out from
3874 layout_basetypes. Update to handle primary virtual bases.
3875 (layout_basetypes): Moved here from tree.c. Use
3876 remove_base_fields and layout_virtual_bases.
3877 * search.c (dfs_mark_primary_bases_queue_p): New function.
3878 (mark_primary_bases): Use it.
3879 * tree.c (CEIL): Remove.
3880 (propagate_binfo_offsets): Remove.
3881 (layout_basetypes): Remove.
3882
3883 2000-01-01 Mark Mitchell <mark@codesourcery.com>
3884
3885 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
3886 (BINFO_PRIMARY_MARKED_P): New macro.
3887 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
3888 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
3889 (mark_primary_bases): New function.
3890 (unmark_primary_bases): Likewise.
3891 * search.c (get_abstract_virtuals_1): Remove.
3892 (dfs_mark_primary_bases): New function.
3893 (mark_primary_bases): Likewise.
3894 (dfs_unmark_primary_bases): Likewise.
3895 (unmark_primary_bases): Likewise.
3896 (dfs_get_pure_virtuals): Likewise.
3897
3898 2000-01-01 Mark Mitchell <mark@codesourcery.com>
3899
3900 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
3901 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
3902 (modify_one_vtable): Adjust.
3903 (fixup_vtable_deltas1): Likewise.
3904 (override_one_vtable): Likewise.
3905 * search.c (get_abstract_virtuals_1): Likewise.
3906 (get_pure_virtuals): Likewise.
3907 (expand_upcast_fixups): Likewise.
3908 * tree.c (debug_binfo): Likewise.
3909
3910 * class.c (build_vtable): Don't return a value. Don't rebuild
3911 vtables for bases that have already been handled.
3912 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
3913 already been handled.
3914 (modify_one_vtable): Adjust accordingly.
3915 (fixup_vtable_deltas1): Likewise.
3916 (finish_struct_1): Likewise.
3917
3918 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3919
3920 * call.c (build_new_method_call): Also check destructors.
3921
3922 1999-12-31 Mark Mitchell <mark@codesourcery.com>
3923
3924 * cp-tree.h (VF_NORMAL_VALUE): Remove.
3925 * class.c (struct base_info): Remove vfield, vfields, and rtti.
3926 (set_primary_base): New function, split out from ...
3927 (finish_base_struct): ... here. Rename to ...
3928 (determine_primary_base): ... this. Simplify.
3929 (create_vtable_ptr): Tweak accordingly.
3930 (finish_struct_1): Simplify.
3931
3932 * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation.
3933 (CLASSTYPE_N_BASECLASSES): Likewise.
3934 (BINFO_FOR_VBASE): New macro.
3935 (get_vbase_types): Change prototype.
3936 * class.c (build_vbase_path): Use BINFO_FOR_VBASE.
3937 (prepare_fresh_vtable): Likewise.
3938 (finish_vtbls): Likewise.
3939 (get_class_offset_1): Likewise.
3940 (modify_all_indirect_vtables): Likewise.
3941 (build_vbase_pointer_fields): Likewise.
3942 * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here.
3943 * init.c (sort_base_init): Use BINFO_FOR_VBASE.
3944 (expand_member_init): Likewise.
3945 * search.c (get_base_distance): Likewise.
3946 (lookup_field_queue_p): Likewise.
3947 (virtual_context): Likewise.
3948 (get_vbase_types): Don't return a value. Set
3949 CLASSTYPE_VBASECLASSES here.
3950 * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE.
3951
3952 1999-12-30 Mark Mitchell <mark@codesourcery.com>
3953
3954 * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS.
3955
3956 1999-12-29 Mark Mitchell <mark@codesourcery.com>
3957
3958 * class.c (create_vtable_ptr): Put the vtable at the beginning of
3959 the class, not the end, in the new ABI.
3960 * tree.c (propagate_binfo_offsets): Do the right thing for the new
3961 ABI.
3962
3963 1999-12-29 Mark Mitchell <mark@codesourcery.com>
3964
3965 * cp-tree.h (lang_type): Add nearly_empty_p. Adjust dummy.
3966 (CLASSTYPE_NEARLY_EMPTY_P): New macro.
3967 * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P.
3968 (check_field_decls): Likewise.
3969 (check_bases_and_members): Likewise.
3970
3971 1999-12-28 Mark Mitchell <mark@codesourcery.com>
3972
3973 * cp-tree.h (do_inline_function_hair): Remove.
3974 * class.c (layout_class_type): New function, split out from
3975 finish_struct_1.
3976 (fixup_pending_inline): Likewise.
3977 (fixup_inline_methods): New function.
3978 * method.c (fixup_pending_inline): Remove.
3979 (do_inline_function_hair): Likewise.
3980
3981 * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
3982 new ABI.
3983
3984 * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals.
3985 (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ...
3986 (CLASSTYPE_PURE_VIRTUALS): ... this.
3987 (lang_decl_flags): Replace abstract_virtual with pure_virtual.
3988 (DECL_ABSTRACT_VIRTUAL_P): Rename to ...
3989 (DECL_PURE_VIRTUAL_P): ... this.
3990 (get_abstract_virtuals): Rename to ...
3991 (get_pure_virtuals): ... this.
3992 * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with
3993 DECL_ABSTRACT_VIRTUAL_P. Replace CLASSTYPE_ABSTRACT_VIRTUALS with
3994 CLASSTYPE_PURE_VIRTUALS.
3995 * class.c (build_vtable_entry): Likewise.
3996 (finish_struct_bits): Likewise. Call get_pure_virtuals, not
3997 get_abstract_virtuals.
3998 (build_vtbl_initializer): Likewise.
3999 (override_one_vtable): Likewise.
4000 (check_methods): Likewise.
4001 * decl.c (duplicate_decls): Likewise.
4002 (redeclaration_error_message): Likewise.
4003 (lang_mark_tree): Likewise.
4004 * decl2.c (grok_function_init): Likewise.
4005 (import_export_vtable): Likewise.
4006 (import_expor_class): Likewise.
4007 * typeck2.c (abstract_virtuals_error): Likewise.
4008 * xref.c (GNU_xref_member): Likewise.
4009 * search.c (get_abstract_virtuals): Rename to get_pure_virtuals.
4010
4011 1999-12-26 Zack Weinberg <zack@wolery.cumb.org>
4012
4013 * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
4014 throughout.
4015
4016 1999-12-26 Mark Mitchell <mark@codesourcery.com>
4017
4018 * decl.c (store_return_init): Use mode of old RTL generated for
4019 DECL_RESULT, not the mode of DECL_RESULT itself.
4020 * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE
4021 for functions that used named return values.
4022
4023 1999-12-24 Mark Mitchell <mark@codesourcery.com>
4024
4025 * semantics.c (expand_body): Use
4026 note_deferral_of_defined_inline_function.
4027
4028 1999-12-22 Mark Mitchell <mark@codesourcery.com>
4029
4030 * dump.c (dequeue_and_dump): Handle CTOR_STMTs.
4031
4032 1999-12-22 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
4033
4034 * error.c (dump_decl): Support named return values.
4035
4036 1999-12-20 Mark Mitchell <mark@codesourcery.com>
4037
4038 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments.
4039 (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro.
4040 (CLASSTYPE_PRIMARY_BINFO): Likewise.
4041 * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF,
4042 TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here.
4043 (check_bases_and_members): Set them here instead.
4044 (create_vtable_ptr): New function, split out from ...
4045 (finish_struct_1): ... here. Use it. Tidy. Use
4046 CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO.
4047 * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as
4048 the first field in the class.
4049 * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES. Handle
4050 seeing TYPE_VFIELD as the first field in the class.
4051
4052 * cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
4053 (TYPE_POLYMORPHIC_P): ... this.
4054 (TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
4055 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
4056 (TREE_CALLS_NEW): Remove.
4057 (TREE_MANGLED): Likewise.
4058 * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
4059 and TYPE_POLYMORPHIC_P.
4060 * class.c (check_bases): Likewise.
4061 (finish_base_struct): Likewise.
4062 (finish_struct_bits): Likewise.
4063 (check_for_override): Likewise.
4064 (finish_struct_1): Likewise.
4065 (get_vfield_name): Likewise.
4066 * decl.c (xref_basetypes): Likewise.
4067 * decl2.c (import_export_class): Likewise.
4068 (import_export_decl): Likewise.
4069 * error.c (dump_function_decl): Likewise.
4070 * pt.c (instantiate_class_template): Likewise.
4071 * repo.c (repo_inline_used): Likewise.
4072 * rtti.c (build_headof): Likewise.
4073 (get_tinfo_fn_dynamic): Likewise.
4074 (build_x_typeid): Likewise.
4075 (get_tinfo_var): Likewise.
4076 (build_dynamic_cast_1): Likewise.
4077 (synthesize_tinfo_fn): Likewise.
4078 * search.c (lookup_field_1): Likewise.
4079 (dfs_debug_mark): Likewise.
4080 (maybe_suppress_debug_info): Likewise.
4081 * typeck.c (build_component_ref): Likewise.
4082 (build_component_addr): Likewise.
4083 * typeck2.c (process_init_constructor): Likewise.
4084
4085 1999-12-20 Nathan Sidwell <nathan@acm.org>
4086
4087 * typeck.c (strip_all_pointer_quals): New static function.
4088 (build_static_cast): Use it. Don't use at_least_as_qualified_p.
4089
4090 1999-12-16 Mark Mitchell <mark@codesourcery.com>
4091
4092 * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE.
4093 (dso_handle_node): New macro.
4094 (flag_use_cxa_atexit): New variable.
4095 (declare_global_var): New function.
4096 (start_anon_func): Remove declaration.
4097 (end_anon_func): Likewise.
4098 * decl.c (get_atexit_node): New function, split out from
4099 destroy_local_static. Handle flag_use_cxa_atexit.
4100 (get_dso_handle_node): Likewise.
4101 (start_cleanup_fn): Renamed from start_anon_func. Moved here from
4102 except.c. Handle flag_use_cxa_atexit.
4103 (end_cleanup_fn): Renamed from end_anon_func. Moved here from
4104 except.c.
4105 (declare_global_var): New variable.
4106 (destroy_local_static): Handle flag_use_cxa_atexit.
4107 * decl2.c (flag_use_cxa_atexit): New variable.
4108 (lang_f_options): Likewise.
4109 * except.c (start_anon_func): Remove.
4110 (end_anon_func): Liekwise.
4111 * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit.
4112 * rtti.c (get_tinfo_var): Use declare_global_var.
4113
4114 1999-12-16 Mark Mitchell <mark@codesourcery.com>
4115
4116 * class.c (check_field_decls): Don't return a value.
4117 (avoid_overlap): Moved here from tree.c.
4118 (build_base_fields): Likewise.
4119 (check_bases): New function, split out from finish_base_struct.
4120 (check_bases_and_members): New function, split out from
4121 finish_struct_1.
4122 (struct base_info): Remove cant_have_default_ctor,
4123 cant_have_const_ctor, cant_have_asn_ref.
4124 (finish_base_struct): Split semantic analysis into check_bases.
4125 (finish_struct_methods): Fix bogus assertion.
4126 (check_field_decls): Call finish_struct_anon here.
4127 (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES.
4128 (finish_struct_1): Use check_bases_and_members. Reorganize.
4129 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
4130 (build_base_fields): Don't declare.
4131 * tree.c (avoid_overlap): Remove.
4132 (build_base_fields): Likewise.
4133
4134 * optimize.c (struct inline_data): Remove scope_stmt.
4135 (remap_block): Don't use insert_block_after_note. Don't update
4136 scope_stmt.
4137 (expand_call_inline): Don't update scope_stmt.
4138 (optimize_function): Don't initialize scope_stmt.
4139 * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
4140 NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.
4141
4142 1999-12-15 Mark Mitchell <mark@codesourcery.com>
4143
4144 * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS
4145 out of the class, rather than taking them as parameters.
4146 (build_vbase_pointer_fields): Move here from tree.c.
4147 (build_vtbl_or_vbase_field): New function.
4148 (check_methods): Likewise.
4149 (remove_zero_width_bitfields): Likewise.
4150 (add_virtual_function): Use tree_cons instead of temp_tree_cons.
4151 (delete_duplicate_fields_1): Tidy. Don't delete duplicate
4152 USING_DECLs here.
4153 (finish_struct_methods): Handle the case where there are no
4154 methods here.
4155 (get_basefndecls): Use tree_cons instead of temp_tree_cons.
4156 (check_field_decls): Call delete_duplicate_fields here.
4157 (finish_struct_1): Tidy. Use check_methods and
4158 remove_zero_width_bitfields.
4159 * cp-tree.h (build_vbase_pointer_fields): Remove.
4160 * decl.c (grokdeclarator): Use tree_cons instead of
4161 temp_tree_cons.
4162 * decl2.c (qualified_lookup_using_namespace): Use tree_cons
4163 instead of temp_tree_cons.
4164 * lex.c (cons_up_default_function): Remove dead code.
4165 * method.c (fixup_pending_inline): New function, split out from ...
4166 (do_inline_function_hair): ... here.
4167 * tree.c (build_vbase_pointer_fields): Remove.
4168
4169 1999-12-15 Jason Merrill <jason@casey.cygnus.com>
4170
4171 * tree.c (walk_tree): Walk operand subtrees in forward order.
4172 * optimize.c (expand_call_inline): Likewise.
4173 (optimize_function): Initialize id->scope_stmt to something useful.
4174 (remap_block): Assume id->scope_stmt has a useful value.
4175
4176 1999-12-15 Nathan Sidwell <nathan@acm.org>
4177
4178 * typeck.c (build_c_cast): Expand warning message. Move pointer
4179 alignment warning to after the cast. Don't warn about pointer
4180 alignment when given a pointer to incomplete.
4181
4182 1999-12-15 Richard Henderson <rth@cygnus.com>
4183
4184 * cp-tree.h (make_aggr_type): Declare.
4185 * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
4186 (make_aggr_type): New.
4187
4188 * decl.c (build_typename_type, init_decl_processing): Use it.
4189 (build_ptrmemfunc_type, xref_tag): Likewise.
4190 * except.c (call_eh_info): Likewise.
4191 * init.c (init_init_processing): Likewise.
4192 * pt.c (process_template_parm, lookup_template_class): Likewise.
4193 * rtti.c (expand_class_desc): Likewise.
4194 * semantics.c (begin_class_definition, finish_typeof): Likewise.
4195 * tree.c (copy_template_template_parm): Likewise.
4196
4197 1999-12-15 Jason Merrill <jason@yorick.cygnus.com>
4198
4199 * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
4200 sizeof (struct tree_common).
4201
4202 1999-12-14 Jason Merrill <jason@casey.cygnus.com>
4203
4204 * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the
4205 outermost block to point to the inlined function decl.
4206
4207 * error.c (dump_decl): operator==, not operator ==.
4208 (op_to_string): Likewise.
4209
4210 * decl.c (compute_array_index_type): Handle null name.
4211
4212 * decl2.c (ambiguous_decl): Fix to match comment.
4213 (lookup_using_namespace): Adjust.
4214
4215 * decl2.c (import_export_class): Don't ignore dllimport.
4216
4217 1999-12-14 Mark Mitchell <mark@codesourcery.com>
4218
4219 * class.c (check_field_decls): Split out from ...
4220 (finish_struct_1): ... here. Use it. Tidy.
4221
4222 * cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
4223 * optimize.c (copy_body_r): Pass it.
4224 * tree.c (remap_save_expr): Clear walk_subtrees for an
4225 already-handled SAVE_EXPR.
4226 (cp_unsave_r): Pass walk_subtrees to remap_save_expr.
4227
4228 * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
4229 * ir.texi (DECL_NAMESPACE_ALIAS): Document it.
4230
4231 * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION.
4232
4233 1999-12-14 Mumit Khan <khan@xraylith.wisc.edu>
4234
4235 * class.c (finish_base_struct): Allow multiple COM base classes
4236 as well as non-COM bases as long as it's not the leftmost.
4237
4238 1999-12-13 Mumit Khan <khan@xraylith.wisc.edu>
4239
4240 * lex.c (saving_parse_to_obstack): New global.
4241 (reinit_parse_for_block): Use.
4242 (reinit_parse_for_expr): Use.
4243 (check_newline): Use.
4244
4245 1999-12-13 Mark Mitchell <mark@codesourcery.com>
4246
4247 * optimize.c (initialize_inlined_parameters): Take FN to which the
4248 parameters belong as an argument.
4249 (expand_call_inline): Expand calls into the parameter
4250 initializations before pushing the function onto the list of
4251 functions we are presently expanding.
4252
4253 1999-12-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4254
4255 * class.c (get_vtable_name): Use a literal format string and
4256 VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT.
4257 (prepare_fresh_vtable): Likewise.
4258
4259 * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of
4260 VTABLE_NAME_FORMAT.
4261
4262 * decl.c (make_rtl_for_local_static): Remove unused variable `type'.
4263
4264 * init.c (build_vec_init): Initialize variable `try_body'.
4265
4266 * lex.c (yyerror): Don't call a variadic function with a
4267 non-literal format string.
4268
4269 * optimize.c (optimize_function): Call memset, not bzero.
4270
4271 * pt.c (for_each_template_parm_r): Add static prototype.
4272
4273 1999-12-09 Andreas Jaeger <aj@suse.de>
4274
4275 * except.c (expand_throw): Add static attribute to match
4276 prototype.
4277
4278 * Makefile.in (semantics.o): Add dependency on output.h.
4279 * semantics.c: Include output.h for declaration of
4280 make_function_rtl.
4281
4282 1999-12-09 Mark Mitchell <mark@codesourcery.com>
4283
4284 * decl.c (init_decl_processing): Reenable inlining on trees.
4285 (finish_function): Likewise.
4286 * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
4287 * semantics.c (simplify_aggr_init_exprs): New function.
4288 (expand_body): Use it.
4289 * tree.c (walk_tree): Special-case TARGET_EXPRs since they
4290 sometimes present the same sub-tree twice.
4291
4292 * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not
4293 `csl'.
4294
4295 * semantics.c (finish_switch_cond): Do conversions here, not ...
4296 * typeck.c (c_expand_start_case): Here.
4297
4298 * semantics.c (do_poplevel): Remove unused variable.
4299
4300 1999-12-06 Mark Mitchell <mark@codesourcery.com>
4301
4302 * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
4303 unless we're declaring the variable in question.
4304
4305 1999-12-06 Mark Mitchell <mark@codesourcery.com>
4306
4307 * decl.c (init_decl_processing): #if 0 last patch.
4308 (finish_function): Likewise.
4309
4310 1999-12-05 Mark Mitchell <mark@codesourcery.com>
4311
4312 * decl.c (init_decl_processing): Set flag_inline_trees if
4313 !flag_no_inline.
4314
4315 * cp-tree.h (calls_setjmp_p): Declare.
4316 * decl.c (finish_function): Mark functions that call setjmp as
4317 uninlinable.
4318 * optimize.c (calls_setjmp_r): New function.
4319 (calls_setjmp_p): Likewise.
4320
4321 1999-12-04 Mark Mitchell <mark@codesourcery.com>
4322
4323 * optimize.c (expand_call_inline): Wrap the expanded call in an
4324 EXPR_WITH_FILE_LOCATION node to get correct line numbers for
4325 inlined functions.
4326
4327 * optimize.c (inline_data): Remove fns_top. Add scope_stmt. Add
4328 in_target_cleanup_p.
4329 (remap_decl): New function.
4330 (remap_block): Likewise.
4331 (copy_scope_stmt): Likewise.
4332 (copy_body_r): Use remap_decl and copy_scope_stmt.
4333 (copy_body): Use VARRAY_TOP_TREE.
4334 (initialize_inlined_parameters): Likewise.
4335 (declare_return_variable): Likewise.
4336 (inlinable_function_p): Check flag_inline_trees.
4337 (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
4338 specially. Use VARRAY_PUSH_TREE. Create a BLOCK for the
4339 parameters of the inlined function.
4340 (optimize_function): Prevent recursion into partially complete
4341 functions.
4342
4343 * cp-tree.def (SCOPE_STMT): Take one operand.
4344 * cp-tree.h (SCOPE_STMT_BLOCK): New macro.
4345 (SCOPE_NULLIFIED_P): Redefine.
4346 (SCOPE_NO_CLEANUPS_P): New macro.
4347 (add_scope_stmt): Change prototype.
4348 * decl.c (poplevel): Tidy. Warn about unused variables here.
4349 Record SCOPE_STMT_BLOCKs.
4350 (finish_function): Keep DECL_INITIAL for functions that might be
4351 inlined.
4352 * ir.texi: Document SCOPE_NO_CLEANUPS_P.
4353 * semantics.c: Include rtl.h.
4354 (add_scope_stmt): Return the new scope statement and, for an
4355 end-of-scope statement, its matching begin statement. Don't set
4356 SCOPE_NULLIFIED_P.
4357 (do_pushlevel): Simplify, now that we are always
4358 function-at-a-time.
4359 (do_poplevel): Likewise. Record SCOPE_STMT_BLOCKs.
4360 (expand_stmt): Don't call expand_start_bindings or
4361 expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
4362 * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
4363 SCOPE_NULLIFIED_P.
4364 * Makefile.in (semantics.o): Depend on RTL_H.
4365
4366 * decl2.c (pending_statics_used): Make it a macro.
4367 (saved_inlines_used): Likewise.
4368 (finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
4369 (mark_inline_for_output): Likewise.
4370 (ssdf_decls_used): Remove.
4371 (start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
4372 (generate_ctor_or_dtor_function): Adjust accordingly.
4373
4374 1999-11-24 Geoffrey Keating <geoffk@cygnus.com>
4375 Greg McGary <gkm@gnu.org>
4376
4377 * decl.c (duplicate_decls): Merge
4378 DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
4379 DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
4380
4381 1999-12-02 Mike Stump <mrs@wrs.com>
4382
4383 * init.c (perform_member_init): Handle parse errors better.
4384
4385 1999-12-01 Mark Mitchell <mark@codesourcery.com>
4386
4387 * cp-tree.h (min_tree_cons): Remove.
4388 (scratch_ovl_cons): Likewise.
4389 * decl.c (saveable_obstack): Don't declare.
4390 (duplicate_decls): Tweak error-message.
4391 (initialize_local_var): Explicitly mark the definition as static.
4392 (finish_function): Call permanent_allocation, just so
4393 that the middle-end sees the obstacks it expects.
4394 (mark_cp_function_context): Likewise.
4395 * init.c (build_new): Don't use min_tree_cons.
4396 * lex.c (permanent_obstack): Don't declare.
4397 (current_obstack, saveable_obstack): Likewise.
4398 * spew.c (current_obstack, saveable_obstack): Likewise.
4399 * tree.c (current_obstack, saveable_obstack): Likewise.
4400 (scratch_ovl_cons): Remove.
4401 (build_min_nt): Don't mess with obstacks.
4402 (build_min): Likewise.
4403 (min_tree_cons): Remove
4404 * typeck.c (build_component_ref): Don't use scratch_ovl_cons.
4405 (build_x_function_call): Likewise.
4406 (build_c_cast): Don't use min_tree_cons.
4407
4408 1999-11-29 Mark Mitchell <mark@codesourcery.com>
4409
4410 * pt.c (tsubst_decl): Robustify.
4411
4412 1999-11-27 Mark Mitchell <mark@codesourcery.com>
4413
4414 * decl2.c (finish_file): Call expand_body for inline functions
4415 that will be written out but that do not yet have RTL.
4416 * semantics.c (expand_body): Do not generate RTL For inline
4417 functions that do not yet need to be written out.
4418
4419 1999-11-25 Mark Mitchell <mark@codesourcery.com>
4420
4421 * Make-lang.in (CXX_SRCS): Add optimize.c.
4422 * Makefile.in (CXX_OBJS): Add optimize.o.
4423 (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
4424 (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
4425 (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
4426 (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
4427 (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
4428 (dump.o): Likewise.
4429 (optimize.o): New target.
4430 * class.c: Don't include splay-tree.h.
4431 * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.
4432 * cp-tree.h: Include splay-tree.h.
4433 (DECL_UNINLINABLE): New macro.
4434 (CTOR_BEGIN_P, CTOR_END_P): New macros.
4435 (flag_inline_trees): New variable.
4436 (local_variable_p): New function.
4437 (nonstatic_local_decl_p): Likewise.
4438 (optimize_function): Likewise.
4439 (cplus_unsave_expr_now): Remove.
4440 (copy_tree_r): Declare.
4441 (remap_save_expr): Likewise.
4442 * decl.c (local_variable_p): Don't
4443 make it static.
4444 (local_variable_p_walkfn): New function.
4445 (make_rtl_for_local_static): Remove code to try to avoid writing
4446 out static constants.
4447 (emit_local_var): Fix indentation.
4448 (nonstatic_local_decl_p): New function.
4449 (check_default_argument): Use local_variable_p_walkfn, not
4450 local_variable_p, when walking the tree.
4451 (start_function): Set the DECL_CONTEXT for automatically generated
4452 labels.
4453 (finish_constructor_body): Use CTOR_STMT to mark the end of a
4454 constructor.
4455 * decl2.c: Don't include splay-tree.h.
4456 (flag_inline_trees): Define.
4457 * dump.c: Don't include
4458 splay-tree.h.
4459 * except.c (expand_end_catch_block): Fix comment formatting.
4460 (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
4461 (expand_throw): Tidy comment.
4462 * init.c (build_vec_delete_1): Use create_temporary_var.
4463 * lex.c (cplus_tree_code_type): Make it static.
4464 (cplus_tree_code_length): Likewise.
4465 (cplus_tree_code_name): Likewise.
4466 * optimize.c: New file.
4467 * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
4468 with computed gotos.
4469 (setup_vtbl_ptr): Mark the beginnings of constructors with
4470 CTOR_STMT.
4471 (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
4472 (expand_body): Call optimize_function. Save bodies if we're doing
4473 inlining on trees.
4474 * tree.c: Don't include splay-tree.h. Include insn-config.h and
4475 integrate.h.
4476 (copy_tree_r): Make it public.
4477 (statement_code_p): New function.
4478 (mark_local_for_remap_r): Likewise.
4479 (cp_usave_r): Likewise.
4480 (cp_unsave): Likewise.
4481 (build_cplus_new): Set DECL_CONTEXT for temporary variables.
4482 (walk_tree): Walk into `s' class nodes. Walk statement chains.
4483 (copy_tree_r): Handle 's' class nodes. Restore chains for
4484 statements. Nullify scopes. Don't copy types.
4485 (init_tree): Set lang_unsave to cp_unsave.
4486 (remap_save_expr): Define.
4487 * ir.texi: Document CTOR_STMT.
4488
4489 1999-11-24 Jason Merrill <jason@casey.cygnus.com>
4490
4491 * search.c (note_debug_info_needed): Do perform this optimization
4492 for dwarf2.
4493 (maybe_suppress_debug_info): Likewise. Start by clearing
4494 TYPE_DECL_SUPPRESS_DEBUG.
4495
4496 1999-11-24 Mark Mitchell <mark@codesourcery.com>
4497
4498 * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
4499
4500 * decl2.c (finish_vtable_vardecl): Don't prune vtables here.
4501
4502 1999-11-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4503
4504 * decl.c (pushdecl, grokdeclarator): Don't call a variadic
4505 function with a non-literal format string.
4506
4507 * lex.c (do_identifier): Likewise.
4508
4509 * typeck.c (build_unary_op): Likewise.
4510
4511 1999-11-23 Mark Mitchell <mark@codesourcery.com>
4512
4513 * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
4514
4515 1999-11-22 Mark Mitchell <mark@codesourcery.com>
4516
4517 * cp-tree.def (CTOR_COMPLETE): New tree node.
4518 * decl.c (finish_constructor_body): Add it, to mark the end of the
4519 constructor.
4520 (finish_function): Don't call end_protect_partials here.
4521 * ir.texi (CTOR_COMPLETE): Document it.
4522 * semantics.c (expand_stmt): Handle it.
4523
4524 * cp-tree.def (FUNCTION_NAME): New tree node.
4525 * cp-tree.h (current_function_name_declared): Tweak documentation.
4526 (lang_decl_flags): Add pretty_function_p, adjust dummy.
4527 (DECL_PRETTY_FUNCTION_P): New macro.
4528 * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
4529 etc., in a template function. Use at_function_scope_p instead of
4530 expanding it inline.
4531 * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
4532 specially.
4533 (tsubst): Handle FUNCTION_NAME.
4534 (tsubst_copy): Likewise.
4535 (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
4536 etc. in instantiation.
4537 * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
4538 even in template functions.
4539 (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
4540 conditional scope at the top of a destructor.
4541
4542 * error.c (dump_function_decl): Use `[ with ... ]' syntax for
4543 specializations too.
4544
4545 1999-11-22 Nathan Sidwell <nathan@acm.org>
4546
4547 * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
4548 when actually negative.
4549
4550 * typeck.c (convert_for_assignment): Expand comment about
4551 strange NULL check, moved from ...
4552 (convert_for_initialization): ... here. Remove unneeded
4553 code.
4554
4555 1999-11-21 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
4556
4557 * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
4558 * init.c (build_vec_delete, build_vec_delete_1): Likewise.
4559 Always destruct virtual bases of array components, but never
4560 delete them.
4561 (build_vec_init): Adjust invocations.
4562 (build_delete): Likewise.
4563 * decl2.c (delete_sanity): Likewise.
4564
4565 1999-11-19 Nathan Sidwell <nathan@acm.org>
4566
4567 * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
4568 * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
4569 * decl2.c (grok_method_quals): Accept `restrict' as applying to
4570 the object pointer. Return such qualifiers.
4571 (grokclassfn): Apply this pointer qualifiers. Cleanup unused
4572 variables.
4573
4574 1999-11-18 Mark Mitchell <mark@codesourcery.com>
4575
4576 * except.c (expand_end_catch_block): Fix typo.
4577 (expand_exception_blocks): Simplify. Don't call
4578 expand_leftover_cleanups.
4579
4580 1999-11-15 Jason Merrill <jason@casey.cygnus.com>
4581
4582 * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
4583 * pt.c (tsubst, case INTEGER_TYPE): Call it.
4584 Check uses_template_parms.
4585
4586 * class.c (finish_struct): If we're a local class in a template
4587 function, add a TAG_DEFN.
4588 * pt.c (lookup_template_class): If this is a local class in a
4589 template function, call pushtag.
4590 (tsubst_expr, case TAG_DEFN): Handle classes, too.
4591
4592 Emit debug info with the vtable.
4593 * search.c (maybe_suppress_debug_info): New function...
4594 * class.c (finish_struct_1): ...split out from here.
4595 * cp-tree.h: Declare it.
4596 * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
4597 if we're writing out the vtable.
4598 * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p,
4599 note_debug_info_needed): #if 0 out.
4600
4601 1999-11-14 Mark Mitchell <mark@codesourcery.com>
4602
4603 * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
4604 * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
4605 TREE_PERMANENT.
4606 * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
4607 * decl2.c (lookup_arg_dependent): Use it.
4608
4609 * cp-tree.h (cp_finish_decl): Change prototype.
4610 (finish_static_data_member_decl): Likewise.
4611 (push_permanent_obstack): Remove declaration.
4612 (push_expression_obstack): Likewise.
4613 (push_scratch_obstack): Likewise.
4614 (DECL_TEMPLATE_PARM_P): Robustify.
4615 (SET_DECL_TEMPLATE_PARM_P): New macro.
4616 * class.c (add_method): Don't manipulate obstacks.
4617 (finish_vtbls): Likewise.
4618 * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
4619 * decl.c (binding_for_name): Don't manipulate obstacks.
4620 (maybe_push_to_top_level): Likewise.
4621 (pop_from_top_level): Likewise.
4622 (duplicate_decls): Likewise.
4623 (pushdecl): Likewise.
4624 (implicitly_declare): Likewise.
4625 (build_typename_type): Likewise.
4626 (start_decl): Likewise.
4627 (cp_finish_decl): Likewise.
4628 (finish_decl): Likewise.
4629 (destroy_local_static): Likewise.
4630 (expand_static_init): Likewise.
4631 (complete_array_type): Likewise.
4632 (grokvardecl): Likewise.
4633 (build_ptrmemfnc_type): Likewise.
4634 (grokdeclarator): Likewise.
4635 (xref_tag): Likewise.
4636 (xref_basetypes): Likewise.
4637 (start_enum): Likewise.
4638 (finish_enum): Likewise.
4639 (start_function): Likewise.
4640 (finish_function): Likewise.
4641 (start_method): Adjust call to cp_finish_decl.
4642 * decl2.c (finish_static_data_member_decl): Don't manipulate
4643 obstacks.
4644 (grokfield): Likewise.
4645 (grokbitfield): Likewise.
4646 (get_temp_name): Likewise.
4647 (get_sentry): Likewise.
4648 (fnish_file): Likewise.
4649 (lookup_arg_dependent): Likewise.
4650 * except.c (call_eh_info): Likewise.
4651 (push_eh_info): Likewise.
4652 (do_pop_exception): Likewise.
4653 (initialize_handler_parm): Likewise.
4654 (expand_end_eh_spec): Likewise.
4655 (alloc_eh_object): Likewise.
4656 (expand_throw): Likewise.
4657 * expr.c (extract_scalar_init): Likewise.
4658 * init.c (build_java_class_ref): Likewise.
4659 * lex.c (get_time_identifier): Likewise.
4660 (snarf_defarg): Likewise.
4661 (add_defarg_fn): Likewise.
4662 (is_global): Simplify.
4663 (do_identifier): Don't check TREE_PERMANENT.
4664 * method.c (emit_thunk): Don't manipulate obstacks.
4665 * parse.y (condition): Adjust call to cp_finish_decl.
4666 (primary): Likewise.
4667 (initdcl): Likewise.
4668 (initdcl0_innards): Likewise.
4669 (nomods_initdcl0): Likewise.
4670 * pt.c (push_inline_template_parms_recursive): Use
4671 SET_DECL_TEMPLATE_PARM_P.
4672 (process_template_parm): Likewise.
4673 (lookup_template_class): Don't manipulate obstacks.
4674 (instantiate_class_template): Adjust call to
4675 finish_static_data_member_decl.
4676 (tsubst_decl): Don't manipulate obstacks.
4677 (tsubst_expr): Likewise.
4678 (instantiate_template): Likewise.
4679 (instantiate_decl): Adjust calls to cp_finish_decl.
4680 * rtti.c (call_void_fn): Don't manipulate obstacks.
4681 (get_tinfo_var): Likewise.
4682 (get_tinfo_fn_unused): Likewise.
4683 (build_dynamic_cast_1): Likewise.
4684 (expand_si_desc): Likewise.
4685 (expand_class_desc): Likewise.
4686 (expand_ptr_desc): Likewise.
4687 (expand_attr_desc): Likewise.
4688 (expand_generic_desc): Likewise.
4689 (synthesize_tinfo_fn): Likewise.
4690 * search.c (expand_upcast_fixups): Likewise.
4691 * semantics.c (finish_asm_stmt): Likewise.
4692 (finish_named_return_value): Likewise.
4693 (begin_class_definition): Likewise.
4694 (finish_class_definition): Likewise.
4695 (finish_typeof): Likewise.
4696 * tree.c (build_cplus_method_type): Likewise.
4697 (reverse_path): Likewise.
4698 (copy_template_template_parm): Likewise.
4699 (build_expr_ptr_wrapper): Likewise.
4700 (push_expression_obstack): Remove.
4701 (push_permanent_obstack): Likewise.
4702 * typeck.c (mark_addressable): Likewise.
4703
4704 1999-11-13 Mark Mitchell <mark@codesourcery.com>
4705
4706 * call.c (build_conditional_expr): Use build_target_expr_with_type.
4707 (convert_like): Likewise.
4708 (build_over_call): Likewise.
4709 * cp-tree.h (build_target_expr): Remove.
4710 (build_target_expr_with_type): New function.
4711 * cvt.c (build_up_reference): Use get_target_expr.
4712 * decl.c (build_target_expr): Move to ...
4713 * tree.c (build_target_expr): Here. Make it static.
4714 (build_target_expr_with_type): New function. Set DECL_CONTEXT on
4715 the temporary VAR_DECLs.
4716 (get_target_expr): Use it.
4717
4718 1999-11-13 Jason Merrill <jason@yorick.cygnus.com>
4719
4720 * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
4721 * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
4722 * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
4723 * class.c (set_rtti_entry): Use it.
4724
4725 1999-11-12 Mark Mitchell <mark@codesourcery.com>
4726
4727 * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
4728 here.
4729 * semantics.c (finish_expr_stmt): Call it here instead. Move
4730 default_conversion logic to semantic-analysis time.
4731
4732 1999-11-12 Jason Merrill <jason@yorick.cygnus.com>
4733
4734 * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
4735
4736 Fri Nov 12 12:56:32 MST 1999 Diego Novillo <dnovillo@cygnus.com>
4737
4738 * init.c (init_init_processing): Re-instated Nov 11 patch after
4739 approval.
4740
4741 Fri Nov 12 10:42:02 MST 1999 Diego Novillo <dnovillo@cygnus.com>
4742
4743 * init.c (init_init_processing): Undo patch from Nov 11, 1999.
4744 Patch had not been approved yet.
4745
4746 1999-11-12 Mark Mitchell <mark@codesourcery.com>
4747
4748 * decl.c (compute_array_index_type): New function, split out from
4749 grokdeclarator.
4750 (create_array_type_for_decl): Likewise.
4751 (grokdeclarator): Use them.
4752
4753 * semantics.c (expand_stmt): Don't suspend_momentary or
4754 resume_momentary.
4755
4756 Thu Nov 11 12:42:11 MST 1999 Diego Novillo <dnovillo@cygnus.com>
4757
4758 * init.c (init_init_processing): Header information for
4759 arrays allocated via `new' should have the same alignment used by
4760 malloc.
4761
4762 1999-11-10 Mark Mitchell <mark@codesourcery.com>
4763
4764 * error.c (dump_function_name): Don't crash if given a friend
4765 pseudo-instantiation.
4766
4767 * cp-tree.h (build_enumerator): Change prototype.
4768 * decl.c (enum_next_value): Remove.
4769 (enum_overflow): Likewise.
4770 (init_decl_processing): Don't register enum_next_value as a root.
4771 (start_enum): Clear TYPE_VALUES for a redefined enum.
4772 (finish_enum): Reset the type of enumeration constants.
4773 (build_enumerator): Fix indentation. Don't copy CONST_DECLs when
4774 we don't need to. Maintain the TYPE_VALUES list and look there
4775 for the previously defined enumeration constant. Let enumeration
4776 constants have the type of their values until the enumeration type
4777 is complete.
4778 * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
4779 (structsp): Adjust.
4780 * parse.c: Regenerated.
4781 * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
4782
4783 Wed Nov 10 12:43:21 1999 Philippe De Muyter <phdm@macqel.be>
4784 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4785
4786 * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
4787
4788 1999-11-09 Mark Mitchell <mark@codesourcery.com>
4789
4790 * cp-tree.h (language_function): Remove x_last_dtor_insn and
4791 x_last_parm_cleanup_insn.
4792 * decl.c (last_dtor_insn): Remove.
4793 (last_parm_cleanup_insn): Likewise.
4794 (expand_start_early_try_stmts): Don't set them.
4795 (store_parm_decls): Likewise.
4796 (save_function_data): Or save them.
4797 (mark_lang_function): Or mark them.
4798
4799 1999-11-08 Mark Mitchell <mark@codesourcery.com>
4800
4801 * decl.c (store_parm_decls): Generate cleanup code at
4802 semantic-analysis time. Destroy objects in the correct order.
4803
4804 1999-11-07 Mark Mitchell <mark@codesourcery.com>
4805
4806 * cp-tree.h (begin_new_placement): Remove.
4807 (finish_new_placement): Likewise.
4808 * class.c (finish_struct_1): Don't suspend_momentary or
4809 resume_momentary.
4810 * decl.c (grokdeclarator): Likewise.
4811 (maybe_build_cleanup_1): Likewise.
4812 * except.c (push_eh_cleanup): Likewise.
4813 (build_terminate_handler): Likewise.
4814 * init.c (build_new_1): Likewise.
4815 * parse.y (parse_decl): Change prototype.
4816 (initdecls, notype_initdecls, initdcl): Don't return int.
4817 (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
4818 (.begin_new_placement): Remove.
4819 (.finish_new_placement): Likewise.
4820 (nonmomentary_expr): Likewise.
4821 (suspend_mom): Likewise.
4822 (condition): Don't suspend_momentary, resume_momentary, or keep
4823 track of need to resume.
4824 (unary_expr): Likewise.
4825 (new_placement): Likewise.
4826 (decl): Likewise.
4827 (structsp): Likewise.
4828 (new_type_id): Likewise.
4829 (maybe_parmlist): Likewise.
4830 (direct_after_type_declaration): Likewise.
4831 (direct_new_declarator): Likewise.
4832 (direct_abstract_declaration): Likewise.
4833 * parse.c: Regenerated.
4834 * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
4835 * semantics.c (begin_new_placement): Remove.
4836 (finish_new_placement): Likewise.
4837
4838 1999-11-05 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4839
4840 * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
4841 (DECL_TEMPLATE_INFO): Use it.
4842 * decl.c (warn_extern_redeclared_static): Do nothing for
4843 TEMPLATE_DECLs.
4844 * decl2.c (mark_used): Explicitly check for function or variable.
4845 * semantics.c (finish_unary_op_expr): Check whether result is also
4846 an INTEGER_CST.
4847
4848 1999-11-05 Mark Mitchell <mark@codesourcery.com>
4849
4850 * Makefile.in (typeck2.o): Depend on output.h.
4851 * typeck2.c: Include output.h.
4852
4853 * decl.c (flag_ansi): Remove declaration.
4854
4855 * pt.c (tinst_level_tick): Make it static.
4856 (last_template_error_tick): Likewise.
4857
4858 * cp-tree.h (mapcar): Remove declaration.
4859 (search_tree): Likewise.
4860 (walk_tree_fn): New typedef.
4861 (walk_tree): New function.
4862 * tree.c (bot_manip): Change prototype. Adjust to be called via
4863 walk_tree.
4864 (bot_replace): Likewise.
4865 (no_linkage_helper): Likewise.
4866 (copy_tree_r): New function.
4867 (search_tree): Rename, and adjust, to become ...
4868 (walk_tree): New function.
4869 (mapcar): Remove.
4870 (target_remap): Remove.
4871 (target_remap_count): Likewise.
4872 (break_out_target_exprs): Use walk_tree.
4873 * decl.c (local_variable_p): Change prototype.
4874 (check_default_argument): Use walk_tree.
4875 * pt.c (for_each_template_parm_r): New function, split out from ...
4876 (for_each_template_parm): Here. Use it, via walk_tree.
4877
4878 1999-11-03 Mark Mitchell <mark@codesourcery.com>
4879
4880 * class.c (check_bitfield_decl): New function, split out from
4881 finish_stuct_1.
4882 (check_field_decl): Likewise. Recursively examine members of
4883 anonymous structs.
4884 (finish_struct_1): Use them.
4885 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
4886
4887 1999-11-02 Mark Mitchell <mark@codesourcery.com>
4888
4889 * decl.c (grokfndecl): Remove dead code.
4890
4891 * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
4892
4893 1999-11-02 Scott Snyder <snyder@fnal.gov>
4894
4895 * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
4896 IMAGPART_EXPR.
4897 * pt.c (tsubst_copy): Likewise.
4898
4899 1999-11-01 Jason Merrill <jason@yorick.cygnus.com>
4900
4901 * decl2.c (maybe_make_one_only): Always make things comdat on
4902 ELF targets, too.
4903
4904 1999-10-31 Mark Mitchell <mark@codesourcery.com>
4905
4906 * decl.c (finish_function): Call free_after_parsing for functions
4907 we are not immediately turning into RTL.
4908
4909 1999-10-31 Brendan Kehoe <brendan@cygnus.com>
4910
4911 * cp-tree.h (flag_dump_translation_unit): Add decl.
4912
4913 Sat Oct 30 22:42:50 1999 Stephen L Moshier <moshier@mediaone.net>
4914
4915 * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
4916
4917 1999-10-30 Mark Mitchell <mark@codesourcery.com>
4918
4919 * decl.c (pop_cp_function_context): Don't call free on a NULL
4920 pointer.
4921 * semantics.c: Include ggc.h.
4922 (expand_body): Do garbage-collection after processing a template
4923 function. Clear DECL_SAVED_TREE after generating RTL for a
4924 function.
4925 * Makefile.in (semantics.o): Depend on ggc.h.
4926
4927 1999-10-29 Mark Mitchell <mark@codesourcery.com>
4928
4929 * cp-tree.h (make_typename_type): Change prototype.
4930 * decl.c (make_typename_type): Only complain if so requested.
4931 * parse.y (nested_name_specifier): Adjust calls.
4932 (typename_sub0): Likewise.
4933 (typename_sub1): Likewise.
4934 * parse.c: Regenerated.
4935 * pt.c (convert_template_argument): Pass complain to
4936 make_typename_type.
4937 (tsubst): Likewise.
4938
4939 1999-10-28 Mark Mitchell <mark@codesourcery.com>
4940
4941 * semantics.c (finish_handler): End the scope of the handler
4942 before attaching it to the statement-tree.
4943
4944 1999-10-28 Ian Lance Taylor <ian@zembu.com>
4945
4946 * rtti.c (build_dynamic_cast_1): Give a better error message for
4947 an attempt to dynamic_cast from a non-polymorphic type.
4948
4949 1999-10-27 Mark Mitchell <mark@codesourcery.com>
4950
4951 * cp-tree.h (make_temp_vec): Remove.
4952 (make_scratch_vec): Likewise.
4953 * call.c (add_function_candidate): Use make_tree_vec.
4954 (add_conv_candidate): Likewise.
4955 (build_builtin_candidate): Likewise.
4956 (add_template_candidate_real): Likewise.
4957 * class.c (resolve_address_of_overloaded_function): Likewise.
4958 * decl.c (start_function): Don't fool with the momentary obstack.
4959 (finish_function): Likewise.
4960 * init.c (expand_direct_vtbls_init): Likewise.
4961 (begin_init_stmts): Likewise.
4962 (finish_init_stmts): Likewise.
4963 * pt.c (add_to_template_args): Use make_tree_vec.
4964 (check_explicit_specialization): Likewise.
4965 (coerce_template_parms): Likewise.
4966 (lookup_template_class): Don't fool with the momentary obstack.
4967 (instantiate_class_template): Likewise.
4968 (tsubst_template_arg_vector): Use make_tree_vec.
4969 (tsubst_aggr_type): Don't fool with the momentary obstack.
4970 (tsubst_decl): Likewise. Use make_tree_vec.
4971 (try_one_overload): Likewise.
4972 (try_class_unification): Don't fool with the momentary obstack.
4973 (get_bindings_real): Use make_tree_vec.
4974 (set_mangled_name_for_template_decl): Likewise.
4975 * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
4976 * semantics.c (finish_expr_stmt): Likewise.
4977 (finish_do_stmt): Likewise.
4978 (finish_for_expr): Likewise.
4979 (finish_switch_cond): Likewise.
4980 (do_pushlevel): Likewise.
4981 (do_poplevel): Likewise.
4982 * tree.c (make_temp_vec): Remove.
4983
4984 * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs. Dump
4985 CLEANUP_P for a TRY_BLOCK.
4986 * ir.texi: Document SAVE_EXPR.
4987
4988 Tue Oct 26 23:29:56 1999 Jeffrey A Law (law@cygnus.com)
4989
4990 * call.c (build_over_call): Check that the built-in function is
4991 of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
4992 * typeck.c (build_function_call_real): Similarly.
4993
4994 1999-10-26 Mark Mitchell <mark@codesourcery.com>
4995
4996 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS. Don't call
4997 remember_end_note.
4998
4999 1999-10-24 Mark Mitchell <mark@codesourcery.com>
5000
5001 * decl.c (push_overloaded_decl_1): Use pushdecl.
5002
5003 * decl.c (auto_function): Replace #ifdef'd __inline with just
5004 plain inline.
5005 * lex.c (my_get_run_time): Likeise.
5006 (yyprint): Likewise.
5007 (identifier_type): Likewise.
5008 * method.c (start_squangling): Likewise.
5009 (end_squangling): Likewise.
5010 (icat): Likewise.
5011 (old_backref_index): Likewise.
5012 (flush_repeats): Likewise.
5013 (issue_ktype): Likewise.
5014 * parse.y (empty_parms): Likewise.
5015 * parse.c: Regenerated.
5016
5017 1999-10-21 Mark Mitchell <mark@codesourcery.com>
5018
5019 * dump.c (dequeue_and_dump): Replace several uses of
5020 queue_and_dump_index with dump_child.
5021
5022 1999-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5023
5024 * expr.c: Include tm_p.h.
5025
5026 1999-10-21 Mark Mitchell <mark@codesourcery.com>
5027
5028 * cp-tree.h (SCOPE_PARTIAL_P): New macro.
5029 (pushlevel_temporary): Remove.
5030 (add_scope_stmt): New function.
5031 * decl.c (pushlevel_temporary): Remove.
5032 (poplevel): Use add_scope_stmt.
5033 (start_decl_1): Likewise.
5034 * semantics.c (add_scope_stmt): New function.
5035 (do_pushlevel): Use it.
5036 (do_poplevel): Use it.
5037 (expand_stmt): Check SCOPE_PARTIAL_P.
5038
5039 * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
5040 * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
5041 * expr.c (cplus_expand_expr): Expand it.
5042 * ir.texi: Document EMPTY_CLASS_EXPR.
5043
5044 1999-10-20 Mark Mitchell <mark@codesourcery.com>
5045
5046 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
5047 parameters as having namespace scope.
5048
5049 1999-10-19 Mark Mitchell <mark@codesourcery.com>
5050
5051 * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
5052 (mangling_flags): New type.
5053 (build_overload_int): Change prototype.
5054 (build_overload_value): Likewise.
5055 (numeric_output_need_bar): Improve comment.
5056 (mangle_expression): New function, broken out from ...
5057 (build_overload_int): Here.
5058 (build_overload_value): Adjust for use of mangling flags. Don't
5059 warn about real-valued template parameters here. Do handle
5060 complex expressions involving real-valued template parameters.
5061 (build_template_parm_names): Encase non-type template parameters
5062 in underscores, if necessary.
5063 (process_overload_item): Remove conditional on
5064 PARM_CAN_BE_ARRAY_TYPE.
5065
5066 1999-10-17 Mark Mitchell <mark@codesourcery.com>
5067
5068 * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
5069
5070 * ir.texi: Clean up documentation of RETURN_INIT.
5071
5072 1999-10-15 Greg McGary <gkm@gnu.org>
5073
5074 * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
5075 (lang_init): Set default for flag_bounds_check if still "unspecified".
5076
5077 1999-10-13 Andrew Haley <aph@cygnus.com>
5078
5079 * class.c (finish_struct_1): Force alignment of non-bitfields to
5080 BITS_PER_UNIT.
5081
5082 Wed Oct 13 22:01:35 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
5083
5084 * typeck2.c (process_init_constructor): Handle empty constructors.
5085
5086 1999-10-13 Jason Merrill <jason@yorick.cygnus.com>
5087
5088 * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
5089
5090 * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
5091 array error.
5092
5093 1999-10-13 Mark Mitchell <mark@codesourcery.com>
5094
5095 * decl.c (make_rtl_for_local_static): Don't create register RTL
5096 for addressable constants.
5097
5098 1999-10-13 Nathan Sidwell <nathan@acm.org>
5099
5100 * cp-tree.h (build_x_va_arg): Prototype new function.
5101 * call.c (build_x_va_arg): Define it.
5102 * parse.y (unary_expr): Call build_x_va_arg.
5103
5104 * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
5105 * call.c (convert_type_from_ellipsis): Define it.
5106 * decl.c (init_decl_processing): Set lang_type_promotes_to.
5107
5108 * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
5109
5110 1999-10-11 Jason Merrill <jason@yorick.cygnus.com>
5111
5112 * class.c (fixed_type_or_null): Always set *nonnull.
5113
5114 1999-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5115
5116 * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
5117 __GNUC__ and __GNUC_MINOR__.
5118
5119 1999-10-09 Mark Mitchell <mark@codesourcery.com>
5120
5121 * cp-tree.h (make_rtl_for_local_static): New function.
5122 * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
5123 local statics ...
5124 (make_rtl_for_local_static): Here.
5125 * semantics.c (expand_stmt): Use make_rtl_for_local_static.
5126
5127 1999-10-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5128
5129 * method.c: Include tm_p.h.
5130
5131 1999-10-7 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
5132
5133 * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
5134 * lex.c (cp_make_lake_type): Likewise.
5135 * tree.c (init_tree): Init make_lang_type_fn.
5136
5137 1999-10-07 Mark Mitchell <mark@codesourcery.com>
5138
5139 * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
5140 paramter.
5141
5142 * semantics.c (expand_stmt): Don't pretend to have asmspecs for
5143 local statics if we don't really have them.
5144
5145 * ir.texi: Improve documentation for STMT_EXPR. Describe
5146 CLEANUP_POINT_EXPR.
5147
5148 1999-10-07 Jason Merrill <jason@yorick.cygnus.com>
5149
5150 * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
5151
5152 1999-10-07 Greg McGary <gkm@gnu.org>
5153
5154 * class.c (finish_struct_1): Use simpler method of
5155 removing elements of a singly-linked list which doesn't
5156 lose for classes without data members.
5157
5158 1999-10-07 Mark Mitchell <mark@codesourcery.com>
5159
5160 * friend.c (make_friend_class): Robustify.
5161
5162 * semantics.c (finish_object_call_expr): Reject calls to template
5163 types.
5164
5165 1999-10-06 Mark Mitchell <mark@codesourcery.com>
5166
5167 * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
5168
5169 * cp-tree.h (CLASSTYPE_VFIELD): Remove.
5170 * call.c (build_vfield_ref): Use TYPE_VFIELD, not
5171 CLASSTYPE_VFIELD.
5172 * class.c (get_vfield_offset): Likewise.
5173 (finish_base_struct): Likewise.
5174 (modify_one_vtable): Likewise.
5175 (fixup_vtable_deltas): Likewise.
5176 (finish_struct_1): Likewise.
5177 * init.c (expand_virtual_init): Likewise.
5178 * search.c (lookup_field_1): Likewise.
5179 (expand_upcast_fixups): Likewise.
5180 * typeck.c (build_component_ref): Likewise.
5181 (build_binary_op_nodefault): Likewise.
5182
5183 * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
5184 * ir.texi: Document TYPE_VFIELD.
5185
5186 1999-10-06 Brendan Kehoe <brendan@cygnus.com>
5187
5188 * decl.c (grokdeclarator): Only warn about non-zero arrays if
5189 !in_system_header (linux socketbits.h can give this for
5190 __cmsg_data, which is using a GNU extension).
5191
5192 1999-10-05 Mark Mitchell <mark@codesourcery.com>
5193
5194 * decl2.c (start_static_storage_duration_function): Push the
5195 function declaration so it ends up in namespace scope.
5196
5197 * dump.c (DUMP_CHILDREN): Remove.
5198 (DUMP_BINFO): Adjust.
5199 (struct dump_node_info): Remove dump_children_p.
5200 (queue_and_dump_type): Remove dump_children_p parameter.
5201 (queue): Don't set dump_children_p.
5202 (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
5203 queue_and_dump_index.
5204 (dequeue_and_dump): Unconditionally print children. Adjust calls
5205 to functions mentioned above.
5206 (dump_node): Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
5207
5208 * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
5209 * dump.c (dequeue_and_dump): Dump them.
5210
5211 * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
5212
5213 * decl.c (start_function): Set current_in_charge_parm for
5214 constructors, too, where appropriate.
5215 * search.c (fixup_all_virtual_upcast_offsets): New function.
5216 (expand_indirect_vtbls_init): Use it.
5217
5218 1999-10-04 Nathan Sidwell <nathan@acm.org>
5219
5220 * decl2.c (grok_alignof): Don't decay lvalues.
5221
5222 * init.c (build_new): Remove unused variable.
5223
5224 1999-10-04 Mark Mitchell <mark@codesourcery.com>
5225
5226 * cp-tree.h (struct language_function): Remove static_labelno.
5227 (static_labelno): Remove macro.
5228 * method.c (build_overload_nested_name): Make static_labelno
5229 static here.
5230
5231 * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
5232 to decide whether or not a function is defined.
5233
5234 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
5235 situations where make_node will do it automatically.
5236 * decl.c (grok_reference_init): Likewise.
5237 (expand_static_init): Likewise.
5238 (do_static_initialization): Likewise.
5239 * init.c (perform_member_init): Likewise.
5240 (expand_aggr_init_1): Likewise.
5241 (build_new_1): Likewise.
5242 * method.c (do_build_copy_constructor): Likewise.
5243 (do_build_assign_ref): Likewise.
5244 * search.c (expand_upcast_fixups): Likewise.
5245 * semantics.c (finish_stmt_expr): Likewise.
5246 * typeck.c (build_unary_op): Likewise.
5247 (check_return_expr): Likewise.
5248
5249 1999-10-04 Jason Merrill <jason@yorick.cygnus.com>
5250
5251 * init.c (build_vec_delete_1): Fold COND_EXPRs.
5252
5253 1999-10-03 Mark Mitchell <mark@codesourcery.com>
5254
5255 * cp-tree.def (VEC_INIT_EXPR): Remove.
5256 * cp-tree.h (struct stmt_tree): New type.
5257 (struct saved_scope): Remove firstobj. Add x_saved_tree,
5258 x_stmt_tree.
5259 (class_cache_firstobj): Remove.
5260 (struct language_function): Remove stmts_are_full_exprs_p,
5261 x_last_tree, and x_last_expr_type. Add x_stmt_tree.
5262 (current_stmt_tree): New macro.
5263 (last_tree): Adjust.
5264 (last_expr_type): Likewise.
5265 (doing_semantic_analysis_p): Simplify.
5266 (stmts_are_full_exprs_p): Adjust.
5267 (begin_tree): Remove prototype.
5268 (end_tree): Likewise.
5269 (begin_stmt_tree): Change prototype.
5270 (finish_stmt_tree): Likewise.
5271 (building_stmt_tree): Simplify.
5272 * decl.c (mark_stmt_tree): New function.
5273 (mark_saved_scope): Use it.
5274 (start_function): Rearrange slightly to call begin_stmt_tree
5275 earlier.
5276 (save_function_data): Tweak.
5277 (finish_function): Adjust call to finish_stmt_tree.
5278 (mark_lang_function): Use mark_stmt_tree.
5279 * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
5280 * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
5281 (build_vec_init): Remove creation of stand-in intializer.
5282 * pt.c (begin_tree): Remove.
5283 (end_tree): Likewise.
5284 * semantics.c (SET_LAST_STMT): New macro. Use it throughout.
5285 (begin_compound_stmt): Handle a compound-statement outside of a
5286 function.
5287 (begin_stmt_expr): Handle a statement-expression outsidef of a
5288 function.
5289 (finish_stmt_expr): Likewise.
5290 (begin_class_definition): Don't call begin_tree.
5291 (finish_inline_definitions): Don't call end_tree.
5292 (begin_stmt_tree): Take a pointer to tree, not a function as input.
5293 (finish_stmt_tree): Likewise.
5294 * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
5295 (mapcar): Likewise.
5296
5297 * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
5298 * parse.c: Regenerated.
5299
5300 * dump.c (dqueue_and_dump): Dump bitfieldness.
5301
5302 * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
5303 bitfields, rather than DECL_BIT_FIELD.
5304 * ir.texi: Document how to tell whether or not a field is a
5305 bitfield.
5306
5307 * lex.c (make_lang_type): Fix typo in comment.
5308
5309 1999-10-01 Jason Merrill <jason@yorick.cygnus.com>
5310
5311 * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
5312
5313 1999-10-01 Mark Mitchell <mark@codesourcery.com>
5314
5315 * pt.c (tsubst_decl): If the type of a template instantiation is
5316 bogus, so is the whole instantiation.
5317
5318 1999-09-30 Mark Mitchell <mark@codesourcery.com>
5319
5320 * decl.c (initialize_local_var): Handle static variables here.
5321 (cp_finish_decl): Tweak handling of function-scope static
5322 variables.
5323 * semantics.c (expand_stmt): Handle DECL_STMTs for static
5324 variables.
5325
5326 * method.c (emit_thunk): Don't crash when -fsyntax-only.
5327
5328 * cp-tree.h (lang_decl_flags): Add global_ctor_p and
5329 global_dtor_p. Add init_priority.
5330 (DECL_ACCESS): Adjust accordingly.
5331 (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
5332 (GLOBAL_INIT_PRIORITY): Likewise.
5333 * decl.c (lang_mark_tree): Adjust accordingly.
5334 (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P,
5335 and GLOBAL_INIT_PRIORITY.
5336 * dump.c (dequeue_and_dump): Print them.
5337 * ir.texi: Document them.
5338
5339 * decl2.c (struct priority_info_s): Remove initialization_sequence
5340 and destruction_sequence.
5341 (start_static_storage_duration_function): Return the body of the
5342 function. Convert for function-at-a-time mode.
5343 (generate_inits_for_priority): Remove.
5344 (finish_static_storage_duration_function): Change prototype.
5345 Adjust for function-at-a-time mode.
5346 (do_static_initialization): Likewise.
5347 (do_static_destruction): Likewise.
5348 (do_static_initialization_and_destruction): Remove.
5349 (start_static_initialization_or_destruction): New function.
5350 (finish_static_initialization_or_destruction): Likewise.
5351 (get_priority_info): Don't manipulation initialization_sequence or
5352 destruction_sequence.
5353 (prune_vars_needing_no_initialization): New function.
5354 (write_out_vars): Likewise.
5355 (finish_file): Use the various new functions instead of the old.
5356
5357 Thu Sep 30 00:13:27 1999 Dirk Zoller <duz@rtsffm.com>
5358
5359 * cp-tree.h (warn_float_equal): Declare.
5360 * decl2.c (warn_float_equal): Define.
5361 (lang_decode_option): Recognize -W[no-]float-equal.
5362 * typeck.c (build_binary_op_nodefault): Conditionally warn
5363 about equality tests of floating point types.
5364
5365 1999-09-29 Jason Merrill <jason@yorick.cygnus.com>
5366
5367 Support normal type_info-based EH mechanisms with -fno-rtti.
5368 * except.c (build_eh_type_type): Remove special -fno-rtti handling.
5369 (build_eh_type_type_ref): Likewise.
5370 (build_eh_type): Remove.
5371 (expand_throw): Call build_eh_type_type, not build_eh_type.
5372 * decl2.c (import_export_decl): Don't associate the tinfo fn with
5373 the vtable if -fno-rtti.
5374 * decl.c (init_decl_processing): Always init_rtti_processing.
5375
5376 * rtti.c (get_typeid): Don't complain about -fno-rtti.
5377
5378 * class.c (class_cache_obstack, class_obstack): Remove.
5379 (init_class_processing): Don't initialize class_obstack.
5380 (push_cache_obstack): Remove.
5381 (pushclass): Don't call it.
5382 * cp-tree.h: Remove prototype for push_cache_obstack.
5383 * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
5384 (pushlevel_class): Don't push_decl_level.
5385 (poplevel_class): Don't pop_stack_level.
5386 (push_class_level_binding): Don't push_cache_obstack.
5387 (init_decl_processing): Don't intialize decl_obstack.
5388 * search.c (push_class_decls): Don't push_cache_obstack.
5389 * tree.c (list_hash_add): Put hash node on permanent_obstack.
5390 (hash_tree_cons): Don't mess with obstacks.
5391 (print_lang_statistics): Don't print stats for class_obstack and
5392 decl_obstack.
5393
5394 1999-09-29 Mark Mitchell <mark@codesourcery.com>
5395
5396 * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
5397 * ir.texi: Document DECL_EXTERNAL.
5398
5399 * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
5400 * ir.texi: Document THUNK_DECLs.
5401
5402 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
5403 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
5404 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
5405 * error.c (dump_template_bindings): Remove unused parameter.
5406 Handle multiple levels of template parameters.
5407 (dump_template_decl): Use `parms', not `args', for template
5408 parameters. Fix thinko.
5409 (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION. Don't pass
5410 flags to dump_template_bindings.
5411 * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
5412 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
5413 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
5414 (tsubst_copy): Clarify variable name.
5415 (most_general_template): Robustify.
5416
5417 1999-09-29 Nathan Sidwell <nathan@acm.org>
5418
5419 * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
5420 to change primary template rendering.
5421
5422 1999-09-29 Mark Mitchell <mark@codesourcery.com>
5423
5424 * cp-tree.h (UPT_TEMPLATE): Remove.
5425 (UPT_PARMS): Likewise.
5426 (DECL_NEEDED_P): New macro.
5427 * decl2.c (finish_vtable_vardecl): Use it.
5428 (finish_objects): Don't crash with -fsyntax-only.
5429 (finish_file): Use DECL_NEEDED_P. Don't prune vtables when
5430 -fsyntax-only.
5431 * pt.c (tsubst_friend_function): Remove FIXME that talks about
5432 obstacks.
5433 (tsubst_expr): Correct handling of function try-blocks.
5434 * semantics.c: Include flags.h.
5435 (expand_body): Don't do RTL generation if -fsyntax-only.
5436 * Makefile.in (semantics.o): Depends on flags.h.
5437
5438 1999-09-28 Gabriel Dos Reis <gdr@codesourcery.com>
5439
5440 * pt.c (most_general_template): Adjust declaration.
5441
5442 * cp-tree.h: (most_general_template): Declare.
5443
5444 * error.c (dump_template_value): Rename to ...
5445 (dump_template_argument): This.
5446 (dump_template_argument_list): New function.
5447 (dump_type): Use it.
5448 (dump_template_parameter): New function.
5449 (dump_template_decl): Use it.
5450 (dump_template_bindings): New function.
5451 (dump_function_decl): Use it. Pretty print function template
5452 instantiations.
5453
5454 1999-09-28 Nathan Sidwell <nathan@acm.org>
5455
5456 * decl.c (grokdeclarator): Distinguish parameter context for
5457 diagnostics. Tidy up missing type diagnostic.
5458 Diagnose `explicit' in one place. Diagnose `mutable' in one place.
5459
5460 1999-09-28 Mark Mitchell <mark@codesourcery.com>
5461
5462 * ir.texi: Improve documentation for TARGET_EXPR.
5463
5464 1999-09-27 Nathan Sidwell <nathan@acm.org>
5465
5466 Augment stringification of trees.
5467 * cp-tree.h (tree_string_flags): New error stringifying enumeration.
5468 (fndecl_as_string, type_as_string_real, args_as_string,
5469 code_as_string, language_as_string, parm_as_string,
5470 op_as_string, assop_as_string, cv_as_string): Remove.
5471 (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
5472 (context_as_string): Declare new function.
5473 * error.c (cp_printers): Move definition.
5474 (OB_UNPUT): Remove.
5475 (OB_END_TEMPLATE_ID): Adjust.
5476 (interesting_scope_p): Remove.
5477 (dump_scope): New static function.
5478 (dump_qualifiers): Adjust prototype, reimplement.
5479 (dump_template_value): Use tree_string_flags.
5480 (dump_type_real): Move back to dump_type.
5481 (dump_type): Adjust prototype. Use tree_string_flags.
5482 (dump_aggr_type): Likewise. Use dump_template_parms.
5483 (dump_type_prefix): Adjust prototype. Use tree_string_flags.
5484 Return pad flag.
5485 (dump_type_suffix): Adjust prototype. Use tree_string_flags.
5486 (dump_simple_decl): Likewise.
5487 (dump_decl): Likewise. Use dump_template_decl.
5488 (dump_template_decl): New static function broken out of dump_decl.
5489 (dump_function_decl): Adjust prototype. Use tree_string_flags.
5490 (dump_parameters): Likewise. Prefix space.
5491 (dump_exception_spec): Adjust prototype. Use tree_string_flags.
5492 (dump_function_name): Likewise. Use dump_template_parms.
5493 (dump_template_parms): New static function broken out of
5494 dump_function_name.
5495 (dump_expr_list): Adjust prototype. Use tree_string_flags.
5496 (dump_expr): Likewise.
5497 (fndecl_as_string): Removed
5498 (type_as_string_real): Removed
5499 (dump_binary_op): Adjust prototype. Use tree_string_flags.
5500 (dump_unary_op): Likewise.
5501 (type_as_string): Likewise.
5502 (expr_as_string): Likewise.
5503 (decl_as_string): Likewise.
5504 (context_as_string): New function.
5505 (lang_decl_name): Adjust.
5506 (decl_to_string): New static print callback.
5507 (expr_to_string): Likewise.
5508 (fndecl_to_string): Likewise.
5509 (code_as_string): Renamed to ...
5510 (code_to_string): ... here. Adjust.
5511 (language_as_string): Renamed to ...
5512 (language_to_string): ... here. Adjust.
5513 (parm_as_string): Renamed to ...
5514 (parm_to_string): ... here.
5515 (op_as_string): Renamed to ...
5516 (op_to_string): ... here.
5517 (assop_as_string): Renamed to ...
5518 (assop_to_string): ... here.
5519 (type_to_string): New static print callback.
5520 (args_as_string): Renamed to ...
5521 (args_to_string): ... here. Adjust.
5522 (cv_as_string): Renamed to ...
5523 (cv_to_string): ... here. Adjust.
5524 * pt.c (mangle_class_name_for_template): Use tree_string_flags.
5525 (print_template_context): Likewise.
5526
5527 1999-09-26 Mark Mitchell <mark@codesourcery.com>
5528
5529 * cp-tree.h (expand_throw): Remove prototype.
5530 * except.c (expand_throw): Make it static. Use tree-generation
5531 functions, rather than RTL-generation functions.
5532 (build_throw): Use it.
5533 * expr.c: Include except.h.
5534 (cplus_expand_expr): Don't call expand_throw here.
5535 * Makefile.in (expr.o): Depend on except.h.
5536 * ir.texi: Update documentation for THROW_EXPR.
5537
5538 * decl.c (start_function): Set x_dont_save_pending_sizes rather
5539 than calling get_pending_sizes.
5540 * init.c (build_new): Don't save and restore
5541 immediate_size_expand; instead, assert that it has the expected
5542 value already.
5543
5544 1999-09-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5545
5546 * lex.c (compiler_error): Add missing call to va_end().
5547
5548 1999-09-25 Mark Mitchell <mark@codesourcery.com>
5549
5550 * dump.c (dequeue_and_dump): Handle RESULT_DECL.
5551 * ir.texi: Document RESULT_DECL and DECL_RESULT.
5552
5553 * cp-tree.h (check_return_expr): New function.
5554 * decl.c (finish_constructor_body): New function.
5555 (pushdecl): Put global friend functions in namespace binding
5556 level, not the class binding level.
5557 (finish_destructor_body): Make sure the dtor_label is always
5558 defined. Fix typo in comment.
5559 (finish_function): Move generation of constructor-termination code
5560 to semantic-analysis time. Move generation of implicit `main'
5561 return value to semantic-analysis time.
5562 * semantics.c (finish_return_stmt): Generate goto's to
5563 ctor_label/dtor_label here. Use check_return_expr to do semantic
5564 analysis on the returned expression.
5565 * typeck.c (maybe_warn_about_returning_address_of_local): New
5566 function split out from c_expand_return.
5567 (check_return_expr): Likewise.
5568 (c_expand_return): Just generate the RTL for the return.
5569
5570 1999-09-24 Mark Mitchell <mark@codesourcery.com>
5571
5572 * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
5573 (cleanup_type): Likewise.
5574 (search_tree): Change prototype.
5575 * decl.c (local_variable_p): Adjust for new interface to
5576 search_tree.
5577 (check_default_argument): Likewise.
5578 * error.c (dump_expr): Handle INIT_EXPR.
5579 * except.c (expand_throw): Don't make cleanup_type a local static.
5580 * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
5581 * init.c (build_new): Call build_new_1 directly, rather than
5582 building a NEW_EXPR.
5583 (build_new_1): Tidy. Don't build a VEC_INIT_EXPR except when
5584 processing file-scope initializers.
5585 * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
5586 * tree.c: Include splay-tree.h
5587 (no_linkage_helper): Adjust for new interface to search_tree.
5588 (search_tree): Pass around pointers to tree nodes, rather than the
5589 nodes themselves. Handle VEC_INIT_EXPR.
5590 (no_linkage_check): Adjust for new interface to search_tree.
5591 (mapcar): Handle VEC_INIT_EXPR.
5592 (target_remap): New variable.
5593 (bot_manip): Use it.
5594 (bot_replace): New function.
5595 (break_out_target_exprs): Use it to remap all variables used in a
5596 default argument expression.
5597 * typeck.c (build_modify_expr): Don't crash when outside a
5598 function and presented with an INIT_EXPR assignment
5599 * Makefile.in (tree.o): Depend on splay-tree.h.
5600
5601 Fri Sep 24 10:48:10 1999 Bernd Schmidt <bernds@cygnus.co.uk>
5602
5603 * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
5604 DECL_BUILT_IN.
5605 (builtin_function): New arg CLASS. Arg CODE now of type int. All
5606 callers changed.
5607 Set the builtin's DECL_BUILT_IN_CLASS.
5608
5609 1999-09-24 Mark Mitchell <mark@codesourcery.com>
5610
5611 * decl.c (pushdecl): Don't make local declarations of extern
5612 variables give the variable a DECL_CONTEXT for the function.
5613 (make_rtl_for_nonlocal_decl): Don't fuss with obstacks. Simplify.
5614 Don't accidentally make RTL for local declarations.
5615 (emit_local_var): Handle declarations with asm-specifiers here.
5616
5617 1999-09-23 Mark Mitchell <mark@codesourcery.com>
5618
5619 * ir.texi: Improve documentation for TARGET_EXPRs. Discuss
5620 STMT_IS_FULL_EXPR_P.
5621
5622 * cp-tree.h (language_function): Add cannot_inline.
5623 * decl.c (start_function): Restore current_function_cannot_inline
5624 from the saved value.
5625 (save_function_data): Save current_function_cannot_inline.
5626 * decl2.c (start_objects): Change prototype. Build the function
5627 in function-at-a-time mode.
5628 (finish_objects): Likewise.
5629 (generate_ctor_or_dtor_function): Adjust accordingly.
5630
5631 * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
5632 * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
5633 Don't call expand_anon_union_decl here
5634 * semantics.c (exapnd_stmt): Call it here, instead.
5635 * typeck.c (mark_addressable): Addressed variables are implicitly
5636 used.
5637
5638 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5639
5640 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
5641 (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
5642 (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
5643 * cp-tree.h: Add tree checking macros to various tree access
5644 macros.
5645 * ptree.c (print_lang_decl): Test for function or variable
5646 before accessing template info.
5647
5648 1999-09-23 Jason Merrill <jason@yorick.cygnus.com>
5649
5650 * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
5651 * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
5652 * decl2.c (lang_f_options): Add -fshort-wchar.
5653 * cp-tree.h: Declare flag_short_wchar.
5654 * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned
5655 int' for wchar_t.
5656
5657 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5658
5659 * ir.texi: Fix formatting errors and typos.
5660
5661 1999-09-22 Mark Mitchell <mark@codesourcery.com>
5662
5663 * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
5664
5665 * decl.c (pushdecl): Do create a binding for extern "C" functions,
5666 but not for their DECL_ASSEMBLER_NAMEs.
5667 (lookup_name_current_level): Fix formatting.
5668 (xref_tag): Likewise.
5669 * decl2.c (start_objects): Mark static constructors and
5670 destructors as used.
5671
5672 1999-09-22 Jason Merrill <jason@yorick.cygnus.com>
5673
5674 * decl.c (define_case_label): Don't crash if we're not in a switch.
5675
5676 * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
5677 * lang-options.h: Restore -fthis-is-variable. Remove help strings
5678 for unsupported flags.
5679
5680 1999-09-21 Jason Merrill <jason@yorick.cygnus.com>
5681
5682 * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
5683 Accept and warn about -fthis-is-variable.
5684
5685 1999-09-21 Mark Mitchell <mark@codesourcery.com>
5686
5687 * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
5688 CLEANUP_STMT, and SCOPE_STMT.
5689
5690 * decl2.c (lang_decode_option): Adjust, in the wake of recent
5691 changes to option processing.
5692
5693 1999-09-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5694
5695 * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
5696 function pointer from pmfs with no object given.
5697 (convert_for_assignment): Do not return error when converting
5698 pmfs.
5699
5700 1999-09-21 Alex Samuel <samuel@codesourcery.com>
5701
5702 * lex.c (internal_filename): New variable.
5703 (INTERNAL_FILENAME): New macro.
5704 (init_parse): Allocate internal_filename and mark as root. Use it
5705 instead of a string constant.
5706
5707 1999-09-21 Nathan Sidwell <nathan@acm.org>
5708
5709 Reimplement dynamic cast and catch matching.
5710 * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
5711 * search.c (dynamic_cast_base_recurse): New function.
5712 (get_dynamic_cast_base_type): New function for dynamic cast.
5713 * rtti.c (build_dynamic_cast_1): Determine source and target
5714 class relationship. Call __dynamic_cast_2.
5715 * tinfo.h (__user_type_info::upcast): New catch dispatcher.
5716 (__user_type_info::dyncast): New dynamic cast dispatcher.
5717 (__user_type_info::sub_kind): New nested enumeration.
5718 (__user_type_info::contained_p): sub_kind predicate.
5719 (__user_type_info::contained_public_p): Likewise.
5720 (__user_type_info::contained_nonpublic_p): Likewise.
5721 (__user_type_info::contained_nonvirtual_p: Likewise.
5722 (__user_type_info::upcast_result): New nested struct.
5723 (__user_type_info::dyncast_result): New nested struct.
5724 (*::do_upcast): New catch function.
5725 (*::do_dyncast): New dynamic cast function.
5726 (__user_type_info::find_public_subobj): New dynamic cast
5727 helper dispatcher.
5728 (*::do_find_public_subobj): New dynamic cast helper function.
5729 * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
5730 (__user_type_info::dyncast): Define dynamic cast dispatcher.
5731 (*::do_upcast): Define catch function.
5732 (*::do_dyncast): Define dynamic cast function.
5733 (*::do_find_public_subobj): Define dynamic cast helper function.
5734 * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
5735 (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
5736 (__dynamic_cast_2): New dynamic cast runtime.
5737
5738 1999-09-20 Mark Mitchell <mark@codesourcery.com>
5739
5740 * cp-tree.h (finish_stmt_expr): Change prototype.
5741 * expr.c (cplus_expand_expr): Adjust call accordingly.
5742 * init.c (finish_init_stmts): Likewise.
5743 * parse.y (primary): Likewise.
5744 * pt.c (tsubst_copy): Likewise.
5745 * semantics.c (finish_stmt_expr): Don't take two parameters.
5746 Don't remove generated BLOCKs from the block-tree.
5747
5748 Remove support for assigning to `this'.
5749 * NEWS: Note that fact.
5750 * class.c (build_vbase_path): Don't check flag_this_is_variable.
5751 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
5752 (language_function): Remove assigns_this, just_assigned_this, and
5753 x_base_init_expr. Add x_vcalls_possible_p. Add vtbls_set_up_p.
5754 (base_init_expr): Remove.
5755 (current_vcalls_possible_p): New macro.
5756 (vtbls_set_up_p): Likewise.
5757 (emit_base_init): Change prototype.
5758 * decl.c (finish_destructor_body): New function, split out from
5759 finish_function.
5760 (current_function_assigns_this): Remove.
5761 (current_function_just_assigned_this): Likewise.
5762 (start_function): Don't set them.
5763 (finish_function): Don't check them. Don't emit
5764 base-initialization code here. Generate code for destructors when
5765 doing semantic analysis.
5766 (finish_stmt): Don't check current_function_just_assigned_this.
5767 * decl2.c (lang_f_options): Remove this-is-variable.
5768 (lang_decode_option): Likewise.
5769 (grokclassfn): Don't check flag_this_is_variable.
5770 * init.c (emit_base_init): Return the expression generated.
5771 (construct_virtual_bases): Don't push/pop obstacks. Fix
5772 typo.
5773 (build_new_1): Don't check flag_this_is_variable.
5774 (get_temp_regvar): Don't set DECL_REGISTER.
5775 (build_vec_init): Don't call use_variable.
5776 * lang-options.h: Remove "-fthis-is-variable" and
5777 "-fno-this-is-variable".
5778 * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
5779 * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
5780 expand_expr_stmt.
5781 * semantics.c (finish_expr_stmt_real): Rename to ...
5782 (finish_expr_stmt): This. Remove assigned_this parameter.
5783 (begin_if_stmt): Call do_pushlevel before starting the statement.
5784 (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
5785 blocks.
5786 (setup_vtbl_ptr): Emit initialization code for bases and members
5787 at semantic-analysis time. Emit code to initialize vtables in
5788 destructors here.
5789 (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
5790 Don't handle CTOR_INITIALIZER any more.
5791 * typeck.c (build_modify_expr): Don't check for assignments to
5792 this.
5793 (c_expand_return): Don't suggest assigning to `this'.
5794
5795 * Makefile.in (decl.o): Depend on RTL_H.
5796 (decl2.o): Likewise.
5797 (class.o): Likewise.
5798 (call.o): Likewise.
5799 (method.o): Likewise.
5800 (search.o): Likewise.
5801 (tree.o): Likewise.
5802 (pt.o): Likewise.
5803
5804 * decl.c (duplicate_decls): When a builtin function is redeclared
5805 as static, make sure it is mangled correctly.
5806
5807 * ir.texi (CTOR_INITIALIZER): Remove mention. Fix typo. Add
5808 detail about the statement-tree.
5809
5810 1999-09-20 Nathan Sidwell <nathan@acm.org>
5811
5812 * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
5813
5814 1999-09-20 Nick Clifton <nickc@cygnus.com>
5815
5816 * decl2.c (lang_decode_option): Extend comment.
5817
5818 Mon Sep 20 10:49:05 1999 Bernd Schmidt <bernds@cygnus.co.uk>
5819
5820 * typeck.c: Include "tm_p.h".
5821
5822 1999-09-19 Mark Mitchell <mark@codesourcery.com>
5823
5824 * ir.texi: New file.
5825
5826 1999-09-19 Paul Burchard <burchard@pobox.com>
5827
5828 * semantics.c (expand_stmt): Initialize return value.
5829
5830 1999-09-18 Paul Burchard <burchard@pobox.com>
5831
5832 * gxxint.texi: G++ now implements namespaces.
5833
5834 1999-09-18 Mark Mitchell <mark@codesourcery.com>
5835
5836 * decl.c (pop_label): Don't warn about unused labels more than
5837 once.
5838 * semantics.c (finish_goto_stmt): Always marked used labels as
5839 used.
5840
5841 * decl.c (layout_var_decl): Change prototype. Call layout_decl
5842 even when the declaration is external.
5843 (cp_finish_decl): Adjust call to layout_var_decl.
5844 * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
5845
5846 1999-09-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
5847
5848 * typeck.c (get_member_function_from_ptrfunc): Always consider
5849 virtuality inside member pointer.
5850
5851 1999-09-17 Mark Mitchell <mark@codesourcery.com>
5852
5853 Turn on function-at-a-time processing.
5854 * cp-tree.h (doing_semantic_analysis_p): New macro.
5855 (SF_DEFAULT): Define to zero, not SF_EXPAND.
5856 (start_handler_parms): Change prototype.
5857 (expand_start_catch_block): Likewise.
5858 (expand_end_catch_block): Likewise.
5859 (expand_start_eh_spec): Likewise.
5860 (expand_end_eh_spec): Declare.
5861 (finish_handler_parms): Change prototype.
5862 (begin_catch_block): Declare.
5863 (finish_handler): Change prototype.
5864 (do_pushlevel): Declare.
5865 (do_poplevel): Likewise.
5866 * decl.c (pushlevel): Don't create
5867 binding levels when not doing semantic analysis.
5868 (poplevel): Don't pop them.
5869 (pushdecl): Assert that we are never called when not doing
5870 semantic analysis.
5871 (pushdecl_top_level): Use push_to_top_level.
5872 (make_label_decl): Don't fiddle with obstacks. Make RTL For the
5873 label when expanding.
5874 (cp_finish_decl): Only inject for-scope variables when doing
5875 semantic analysis. Add comments.
5876 (start_handler_parms): Return the handler parm.
5877 (start_function): Reorganize. Don't clear DECL_INITIAL if it is
5878 already set. Reinitialize from saved function data if available.
5879 Don't pushlevel when not doing semantic analysis.
5880 (store_parm_decls): Only generate RTL when expanding. Only
5881 pushdecl when doing semantic analysis. Set
5882 current_eh_spec_try_block if appropriate.
5883 (finish_function): Simplify. Use do_pushlevel and do_poplevel.
5884 Combine common code. Don't poplevel when not doing semantic
5885 analysis.
5886 (push_cp_function_context): Don't expand functions without an
5887 explicit call to expand_body.
5888 (mark_lang_function): Make eh_spec_try_block and
5889 x_scope_stmt_stack.
5890 * except.c (expand_end_eh_spec): Don't
5891 declare.
5892 (process_start_catch_block): Likewise.
5893 (push_eh_cleanup): Use finish_decl_cleanup.
5894 (initialize_handler_parm): New function.
5895 (expand_start_catch_block): Use it.
5896 (expand_end_catch_block): Use tree-generation functions, not
5897 RTL-generation functions.
5898 (expand_start_eh_spec): Likewise.
5899 (expand_end_eh_spec): Likewise.
5900 (expand_exception_blocks): Simplify.
5901 (start_anon_func): Use do_pushlevel.
5902 (end_anon_func): Use do_poplvel. Call expand_body for the
5903 function.
5904 * expr.c (do_case): Don't call define_case_label.
5905 * init.c (create_temporary_var): Set DECL_CONTEXT for local
5906 variables.
5907 * method.c (emit_thunk): Call expand_body for the
5908 thunk.
5909 (sythesize_method): Likewise.
5910 * parse.y (handler_args): Give it ttype.
5911 (eat_saved_input): Call expand_body.
5912 (base_init): Use do_pushlevel.
5913 (pending_inline): Call expand_body.
5914 (handler): Adjust calls to finish_handler_parms and
5915 finish_handler.
5916 (handler_args): Don't call expand_start_catch_block. Return the
5917 catch parameter. * pt.c (tsubst_expr): Adjust HANDLER handling.
5918 * parse.c: Regenerated.
5919 * rtti.c (synthesize_tinfo_fn): Call finish_function.
5920 * semantics.c (do_pushlevel): Give it external linkage. Build
5921 SCOPE_STMTs.
5922 (do_poplevel): Likewise.
5923 (finish_case_label): Call define_case_label when doing semantic
5924 analysis.
5925 (finish_goto_stmt): Create RTL for labels.
5926 (finish_function_try_block): Set in_function_try_handler
5927 unconditionally.
5928 (finish_function_handler_sequence): Unset it.
5929 (finish_handler_parms): Use expand_start_catch_block even when
5930 building a statement-tree.
5931 (begin_catch_block): New function.
5932 (finish_handler): Move a little RTL-generation logic here.
5933 (finish_decl_cleanup): Allow cleanups for empty declarations.
5934 (finish_named_return_value): Don't pushdecl when not doing
5935 semantic analysis.
5936 (expand_stmt): Don't do semantic analysis for variable
5937 declarations. Handle START_CATCH_STMT. Call expand_label
5938 directly for a LABEL_STMT. Tweak handling of GOTO_STMT. Adjust
5939 HANDLERs. Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
5940 (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
5941 RETURN_INIT and function try blocks.
5942
5943 * cp-tree.h (language_function): Add x_eh_spec_try_block. Add
5944 x_scope_stmt_stack. Add x_in_charge_parm.
5945 (current_eh_spec_try_block): New macro.
5946 (current_scope_stmt_stack): Likewise.
5947 (current_in_charge_parm): Likewise.
5948 * decl.c (start_function): Initialize current_in_charge_parm.
5949 (finish_function): Use current_in_charge_parm rather than looking
5950 up __in_chrg.
5951 * search.c (expand_indirect_vtbls_init): Likewise.
5952
5953 * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
5954 (TRY_BLOCK): Likewise.
5955 (HANDLER): Likewise.
5956 (START_CATCH_STMT): New tree node.
5957 (SCOPE_STMT): Likewise.
5958 * cp-tree.h (SCOPE_BEGIN_P): New macro.
5959 (SCOPE_NULLIFIED_P): Likewise.
5960 (struct lang_decl_flags): Add pending_inline_p. Adjust dummy.
5961 (struct lang_decl): Add saved_language_function.
5962 (DECL_PENDING_INLINE_INFO): Adjust documentation.
5963 (DECL_PENDING_INLINE_P): New macro.
5964 (TYPE_TI_ARGS): Fix typo in comment.
5965 (DECL_SAVED_TREE): Add to documentation.
5966 (DECL_SAVED_FUNCTION_DATA): New macro.
5967 (START_CATCH_TYPE): Likewise.
5968 (SCOPE_END_P): New macro.
5969 (declare_parm_level): Don't declare.
5970 * decl.c (mark_lang_function): New function, split out from
5971 mark_cp_function_context.
5972 (save_function_data): New function.
5973 (declare_parm_level): Remove.
5974 (finish_function): Use save_function_data to squirrel away
5975 important stuff for later use.
5976 (mark_cp_function_context): Use mark_function_data.
5977 (lang_mark_tree): Likewise.
5978 * lex.c (begin_definition_of_inclass_inline): Set
5979 DECL_PENDING_INLINE_P.
5980 (store_pending_inline): Clear it.
5981 * pt.c (tsubst_decl): Likewise.
5982
5983 1999-09-17 Nathan Sidwell <nathan@acm.org>
5984
5985 * call.c (perform_implicit_conversion): Deal with error_mark_node.
5986
5987 1999-09-17 Mark Mitchell <mark@codesourcery.com>
5988
5989 * decl.c (warn_extern_redeclared_static): Don't get confused by
5990 static member functions.
5991 (duplicate_decls): Merge DECL_THIS_STATIC.
5992
5993 * decl.c (expand_static_init): Make sure assignments to local
5994 statics actually occur.
5995
5996 1999-09-17 Mark Mitchell <mark@codesourcery.com>
5997
5998 * cp-tree.h (poplevel_class): Declare.
5999 * class.c (popclass): Use poplevel_class, not poplevel.
6000 * decl.c (poplevel_class): Don't make it static. Don't return a
6001 value.
6002 (poplevel): Don't call poplevel_class; abort in a class
6003 binding level is seen.
6004 * semantics.c (finish_translation_unit): Use pop_everything.
6005 * parse.y (member_init): Allow errors.
6006 (pending_inline): Call finish_function.
6007 * parse.c: Regenerated.
6008 * Makefile.in (CONFLICTS): Adjust.
6009
6010 1999-09-17 Gabriel Dos Reis <gdr@codesourcery.com>
6011
6012 * error.c: Reduce code duplication.
6013 (dump_template_value): New function.
6014 (dump_type_real): Use it.
6015 (dump_decl): Likewise.
6016 (dump_function_name): Likewise.
6017 (dump_function_decl): Don't be too talkative about function return
6018 type variety.
6019
6020 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6021
6022 * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
6023
6024 * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
6025
6026 1999-09-16 Jason Merrill <jason@yorick.cygnus.com>
6027
6028 * decl2.c (finish_file): Also call check_global_declarations for
6029 the pending_statics list.
6030
6031 1999-09-15 Jason Merrill <jason@yorick.cygnus.com>
6032
6033 * lex.c (cp_pragma_implementation): Allow #pragma implementation
6034 in header files.
6035
6036 1999-09-15 Richard Henderson <rth@cygnus.com>
6037
6038 * lex.c (mark_impl_file_chain): Follow the next chain.
6039
6040 1999-09-15 Mark Mitchell <mark@codesourcery.com>
6041
6042 * decl.c (warn_extern_redeclared_static): Simplify. Catch
6043 problems with extern "C" functions redeclared as static.
6044 (duplicate_decls): When a builtin is redeclared static, make the
6045 new function have internal linkage.
6046
6047 1999-09-15 Mark Mitchell <mark@codesourcery.com>
6048
6049 * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
6050 * pt.c (tsubst_copy): Likewise.
6051 * tree.c (search_tree): Likewise.
6052 (mapcar): Likewise.
6053
6054 1999-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6055
6056 * typeck2.c (ack): Don't declare progname.
6057
6058 1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
6059
6060 * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
6061 filenames with ggc_alloc_string.
6062
6063 1999-09-14 Mark Mitchell <mark@codesourcery.com>
6064
6065 * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the
6066 TARGET_EXPR.
6067 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
6068 the TARGET_EXPR.
6069 * cvt.c (build_up_reference): Likewise.
6070 * tree.c (build_cplus_new): Likewise.
6071 (get_target_expr): Likewise.
6072
6073 Tue Sep 14 01:45:10 1999 Marc Espie <espie@cvs.openbsd.org>
6074
6075 * Makefile.in: Prepend $(SHELL) to move-if-change calls.
6076
6077 1999-09-13 Mark Mitchell <mark@codesourcery.com>
6078
6079 * cp-tree.h (build_target_expr): New function.
6080 * call.c (build_conditional_expr): Use build_target_expr.
6081 (convert_like): Likewise.
6082 (build_over_call): Likewise.
6083 * cvt.c (build_up_reference): Likewise.
6084 * decl.c (build_cleanup_on_safe_obstack): Fold into ...
6085 (destroy_local_var): Here.
6086 (build_target_expr): New function.
6087 * tree.c (build_cplus_new): Use it.
6088 (get_target_expr): Likewise.
6089
6090 1999-09-13 Nathan Sidwell <nathan@acm.org>
6091
6092 * typeck.c (expr_sizeof): Don't decay arrays and functions.
6093 Remove misleading comment.
6094 (build_compound_expr): Don't decay arrays.
6095
6096 1999-09-13 Jason Merrill <jason@yorick.cygnus.com>
6097
6098 * call.c (build_conditional_expr): Always use a TARGET_EXPR for
6099 class rvalues again.
6100
6101 Sun Sep 12 23:29:07 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6102
6103 * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
6104
6105 * g++spec.c: Include gcc.h.
6106 (lang_specific_driver): Constify a char*. Call xcalloc, not
6107 xmalloc/bzero. All calls to the function pointer parameter now
6108 explicitly call `fatal'.
6109
6110 1999-09-12 Mark Mitchell <mark@codesourcery.com>
6111
6112 * call.c (implicit_conversion): Robustify. Handle OFFSET_REFs.
6113 * cvt.c (ocp_convert): Complete the from and destination types.
6114 Adjust warning about functions always being `true' in conditionals.
6115 * decl.c (duplicate_decls): Don't play funny games with abort.
6116 * error.c (dump_expr): Handle OVERLOADs.
6117 * spew.c (probe_obstack): Remove.
6118 * typeck.c (condition_conversion): Use perform_implicit_conversion.
6119
6120 1999-09-12 Bernd Schmidt <bernds@cygnus.co.uk>
6121
6122 * cp-tree.h (auto_function, define_function): Adjust prototypes.
6123 * decl.c (define_function): Lose FUNCTION_CODE arg. All callers
6124 changed.
6125 (auto_function): Likewise, for CODE arg.
6126 Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
6127 (builtin_function): ... here.
6128
6129 1999-09-11 Mark Mitchell <mark@codesourcery.com>
6130
6131 * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
6132 (init_decl_processing): Don't set TREE_PERMANENT for the
6133 error_mark_node.
6134 (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
6135 (grokdeclarator): Likewise.
6136 (grokparms): Don't check TREE_PERMANENT when building up lists.
6137 * decl2.c (grokfield): Don't assert TREE_PERMANENT.
6138 (mark_inline_for_output): Likewise.
6139 * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
6140 * init.c (build_offset_ref): Don't check TREE_PERMANENT.
6141 * lex.c (check_newline): Don't check ggc_p; it is always one.
6142 * pt.c (process_template_parm): Don't check TREE_PERMANENT.
6143 * spew.c (yylex): Don't copy_node or probe_obstacks for
6144 non-permanent CONSTANTs and STRINGs.
6145 * tree.c (build_cplus_array_type_1): Don't fuss with
6146 TREE_PERMANENT on ARRAY_TYPEs.
6147
6148 * cp-tree.def (CLEANUP_STMT): New node.
6149 * cp-tree.h (language_function): Add name_declared.
6150 (current_function_name_declared): New macro.
6151 (CLEANUP_DECL): New macro.
6152 (CLEANUP_EXPR): Likewise.
6153 (emit_local_var): Likewise.
6154 (finish_decl_cleanup): New function.
6155 * cvt.c (build_up_reference): Simplify.
6156 (ocp_convert): Remove dead code.
6157 * decl.c (start_decl): Remove call to add_decl_stmt.
6158 (grok_reference_init): Adjust, to handle bindings temporaries to
6159 references. Remove dead code.
6160 (initialize_local_var): Don't generate RTL for
6161 declarations here, or build cleanups here. Don't fuss with
6162 obstacks. Replace expand_start_target_temps calls with explicit
6163 setting of stms_are_full_exprs_p.
6164 (destroy_local_var): New function.
6165 (emit_local_var): Likewise.
6166 (cp_finish_decl): Use them, as appropriate.
6167 (start_function): Announce template functions.
6168 (store_parm_decls): Don't call declare_function_name here.
6169 (finish_stmt): Don't start emit base-initialization code when just
6170 building the statement-tree.
6171 * init.c (create_temporary_var): Move add_decl_stmt call ...
6172 (get_temp_regvar): Here.
6173 * pt.c (tsubst_expr): Make DECL_INITIAL look like what
6174 cp_finish_decl would expect. Don't call add_decl_stmt.
6175 * semantics.c (begin_compound_stmt): Call declare_function_name,
6176 if appropriate.
6177 (finish_decl_cleanup): New function.
6178 (expand_stmt): Use emit_local_var to output variables.
6179 (expand_body): Set current_funtion_name_declared.
6180
6181 1999-09-10 Mark Mitchell <mark@codesourcery.com>
6182
6183 * cp-tree.h (finish_cleanup_try_block): New function.
6184 * semantics.c (finish_cleanup_try_block): Add comment.
6185
6186 Fri Sep 10 10:32:32 1999 Bernd Schmidt <bernds@cygnus.co.uk>
6187
6188 * cp-tree.h: Delete declarations for all tree nodes now moved to
6189 global_trees.
6190 * decl.c: Delete their definitions.
6191 (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
6192 FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
6193 provide defaults.
6194 (init_decl_processing): Call build_common_tree_nodes and
6195 build_common_tree_nodes_2 instead of building their nodes here.
6196 Don't add gc roots for them.
6197
6198 1999-09-10 Mark Mitchell <mark@codesourcery.com>
6199
6200 * cp-tree.h (language_function): Rename expanding_p to
6201 x_expanding_p. Rename named_label_uses to x_named_label_uses.
6202 (expanding_p): Adjust accordingly.
6203 (TREE_VIA_PRIVATE): Fix typo in comment.
6204 (DECL_REFERENCE_SLOT): Remove.
6205 (SET_DECL_REFERENCE_SLOT): Likewise.
6206 * decl.c (named_label_uses): Adjust. Remove chicken comment.
6207 (push_overloaded_decl): Don't truncate the chain of bindings when
6208 adding an overloaded function.
6209 (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
6210 (initialize_local_var): Fix typo in comment.
6211 (store_parm_decls): Don't set DECL_REFERENCE_SLOT. Tidy up.
6212 * decl2.c (start_objects): Make the fact that we are expanding
6213 the generated function right away explicit.
6214 (start_static_storage_duration_function): Likewise.
6215 (finish_file): Fix typo in comment.
6216 * init.c (build_vec_init): Correct bugs in handling cleanups.
6217 * semantics.c (maybe_convert_cond): New function.
6218 (FINISH_COND): Always store the condition, even if there's
6219 a declaration.
6220 (finish_if_stmt_cond): Use maybe_convert_cond.
6221 (finish_while_stmt_cond): Likewise.
6222 (finish_do_stmt): Likewise.
6223 (finish_for_cond): Likewise.
6224 (expand_cond): Adjust.
6225
6226 * cp-tree.h (FN_TRY_BLOCK_P): New macro.
6227 * init.c (perform_member_init): Remove obstack machinations.
6228 (expand_cleanup_for_base): Likewise.
6229 (finish_init_stmts): Mark the statement-expression as used.
6230 * method.c (emit_thunk): Use tree-generating functions, not
6231 RTL.
6232 (do_build_copy_constructor): Likewise.
6233 (do_build_assign_ref): Likewise.
6234 (synthesize_method): Likewise. Keep track of line numbers.
6235 * pt.c (tsubst_expr): Handle various kinds of try blocks.
6236 * semantics.c (expand_stmts): Remove.
6237 (begin_function_try_block): Set FN_TRY_BLOCK_P.
6238 (finish_function_try_block): Be careful rechaining
6239 function try blocks.
6240 (expand_stmt): Loop through all the statements at a given level.
6241 (exapnd_body): Be careful with line-numbers here too. Prepare for
6242 being called directly from the parser.
6243
6244 * cp-tree.h (finish_function): Adjust prototype.
6245 * decl.c (finish_function): Return the function compiled.
6246 * pt.c (instantiate_decl): Don't play games with obstacks.
6247 * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
6248 (search_tree): Likewise.
6249 * typeck.c: Fix typo in comment.
6250 * typeck2.c (store_init_value): Add comment.
6251
6252 * cp-tree.h (CPTI_ATEXIT): New macro.
6253 (atexit_node): Likewise.
6254 * decl.c (destroy_local_static): New function, broken out from ...
6255 (expand_static_init): Here.
6256
6257 * rtti.c (get_tinfo_var): These should always be global
6258 (expand_si_desc): Use tree, not RTL, functions to generate code.
6259 (expand_class_desc): Likewise.
6260 (expand_ptr_desc): Likewise.
6261 (expand_attr_desc): Likewise.
6262 (expand_generic_desc): Likewise.
6263 (synthesize_tinfo_fn): Likewise.
6264
6265 1999-09-09 Mark Mitchell <mark@codesourcery.com>
6266
6267 * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
6268 (RECHAIN_STMTS_FROM_LAST): Remove. Replace all uses with
6269 RECHAIN_STMTS.
6270 (RECHAIN_STMST_FROM_CHAIN): Likewise.
6271
6272 * parse.y (simple_stmt): Fix typo in last change.
6273
6274 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
6275 (STMT_IS_FULL_EXPR_P): Likewise.
6276 (STMT_LINENO_FOR_FN_P): Likewise.
6277 (prep_stmt): New function.
6278 (building_stmt_tree): Tweak for safety.
6279 * pt.c (tsubst_expr): Use prep_stmt throughout.
6280 (add_tree): Move it to semantics.c
6281 * semantics.c (add_tree): Move it here.
6282 (finish_expr_stmt_real): New function.
6283 (finish_expr_stmt): Use it.
6284 (finish_if_stmt_cond): Use FINISH_COND.
6285 (finish_while_stmt_cond): Likewise.
6286 (finish_for_cond): Likewise.
6287 (finish_stmt_tree): Tweak line-number handling.
6288 (prep_stmt): New function.
6289 (expand_stmt): Use it.
6290
6291 * cp-tree.h (begin_switch_stmt): Adjust prototype.
6292 (finish_switch_cond): Likewise.
6293 * parse.y (simple_stmt): Adjust accordingly.
6294 * parse.c: Regenerated.
6295 * pt.c (tsubst_expr): Adjust accordingly.
6296 * semantics.c (expand_cond): New function.
6297 (FINISH_COND): New macro.
6298 (begin_switch_stmt): Build the SWITCH_STMT here.
6299 (finish_switch_stmt_cond): Not here.
6300 (expand_stmt): Adjust calls to begin_switch_stmt and
6301 finish_switch_cond. Use expand_cond throughout.
6302
6303 * dump.c (dequeue_and_dump): Dump types for constants.
6304 Describe DECL_ARG_TYPE more intuitively.
6305 Handle ARRAY_REF.
6306
6307 * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
6308 (lang_cleanup_tree): Remove.
6309 * lex.c (make_lang_type): Use ggc_alloc to allocate
6310 TYPE_LANG_SPECIFIC.
6311
6312 Reorganize per-function data.
6313 * cp-tree.h (saved_scope): Add function_decl, bindings.
6314 (language_function): Rename binding_level to bindings.
6315 (cp_function_chain): Use the current_function, not the
6316 outer_function_chain.
6317 (current_class_ptr): Make it work, even when there's no
6318 current function.
6319 (current_class_ref): Likewise.
6320 (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New
6321 macros.
6322 (clear_temp_name): Remove.
6323 * decl.c (check_function_type): New function, broken out from
6324 start_function.
6325 (current_binding_level): Adjust definition.
6326 (pushlevel): Simplify.
6327 (poplevel): Don't use named_label_uses when we're outside
6328 a function scope.
6329 (mark_saved_scope): Mark function_decl and bindings.
6330 (maybe_push_to_top_level): Don't unconditionally push a new
6331 function context. Save bindings and the current_function_decl.
6332 Don't clear named_labels.
6333 (pop_from_top_level): Pop function context if appropriate.
6334 (init_decl_processing): Set init_lang_status and free_lang_status,
6335 rather than save_lang_status and restore_lang_status.
6336 (start_function): Take SF_* flags. Don't clear per-function data.
6337 Reorder and simplify to use new per-function data code. Add
6338 asserts.
6339 (store_parm_decls): Don't call init_function_start here.
6340 (finish_function): Adjust for new handling of per-function data.
6341 (push_cp_function_context): Simplify.
6342 (mark_cp_function_context): Change binding_level to bindings.
6343 * decl2.c (clear_temp_name): Remove.
6344 (start_objects): Use SF flags to start_function.
6345 (start_static_storage_duration_function): Likewise.
6346 * except.c (start_anon_func): Remove redundant calls to
6347 push_function_context_to. Use SF flags to start function.
6348 (end_anon_func): Remove redundant call to pop_function_context
6349 from.
6350 * lex.c (reinit_parse_for_function): Don't initialize per-function
6351 data.
6352 * method.c (emit_thunk): Clear current_function after calling
6353 assemble_end_function. Use SF flags for start_function.
6354 (synthesize_method): Use SF flags for start_function.
6355 * parse.c: Regenerated.
6356 * parse.y (fn.defpen): Likewise.
6357 (pending_inline): Clear current_function, even if something goes
6358 wrong.
6359 * pt.c (instantiate_decl): Use SF flags to start_function.
6360 Don't save and restore expanding_p.
6361 (add_tree): Handle the case where we are outside any function.
6362 (end_tree): Likewise.
6363 * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
6364 * semantics.c (begin_function_definition): Likewise.
6365 (expand_body): Likewise.
6366
6367 1999-09-09 Nathan Sidwell <nathan@acm.org>
6368
6369 * cp-tree.h (convert_to_void): Prototype new function.
6370 (require_complete_type_in_void): Remove prototype.
6371 * cvt.c (convert_to_void): New function.
6372 (ocp_convert): Use convert_to_void.
6373 * decl.c (cplus_expand_expr_stmt): Likewise, for complete
6374 expressions.
6375 * typeck.c (require_complete_type_in_void): Remove function.
6376 (build_compound_expr): Use convert_to_void.
6377 (build_static_cast): Likewise.
6378 (build_c_cast): Likewise.
6379 * semantics.c (finish_expr_stmt): Do not decay full expressions.
6380
6381 * typeck.c (build_x_compound_expr): Add FIXME.
6382
6383 1999-09-08 Mark Mitchell <mark@codesourcery.com>
6384
6385 * cp-tree.h (scratch_tree_cons): Remove.
6386 * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
6387 and perm_tree_cons with plain tree_cons.
6388 * class.c: Likewise.
6389 * decl.c: Likewise.
6390 * decl2.c: Likewise.
6391 * except.c: Likewise.
6392 * expr.c: Likewise.
6393 * init.c: Likewise.
6394 * lex.c: Likewise.
6395 * method.c: Likewise.
6396 * parse.y: Likewise.
6397 * pt.c: Likewise.
6398 * repo.c: Likewise.
6399 * rtti.c: Likewise.
6400 * search.c: Likewise.
6401 * typeck.c: Likewise.
6402 * parse.c: Regenerated.
6403 * tree.c (build_srcloc): Simplify.
6404
6405 1999-09-08 Bruce Korb autogen@linuxbox.com
6406
6407 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
6408
6409 1999-09-08 Mark Mitchell <mark@codesourcery.com>
6410
6411 * cp-tree.h (lang_decl_flags): Remove permanent_attr.
6412 Remove next.
6413 (LANG_DECL_PERMANENT): Remove.
6414 * decl.c (duplicate_decls): Don't mess about with obstacks trying
6415 to free memory.
6416 (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
6417 * lex.c (free_lang_decl_chain): Remove.
6418 (build_lang_decl): Don't use obstacks.
6419 (retrofit_lang_decl): Likewise.
6420 (copy_lang_decl): Likewise.
6421
6422 * cp-tree.h (saved_scope): Remove old_binding_level and
6423 function_decl. Tidy up.
6424 * decl.c (mark_saved_scope): Don't set them.
6425 (maybe_push_to_top_level): Clear memory.
6426
6427 * decl.c (layout_var_decl): Change prototype. Don't complete
6428 types for external objects.
6429 (check_initializer): Likewise. Tidy.
6430 (initialize_local_var): Complete types here.
6431 (cp_finish_decl): Not here. Reorganize a little.
6432 (grokvardecl): Don't complete types here.
6433
6434 * decl.c (start_function): Clear last_dtor_insn and
6435 last_parm_cleanup_insn.
6436 (push_cp_function_context): Just copy over a little of
6437 the old context, not all of it.
6438
6439 * cp-tree.h (copy_to_permanent): Remove.
6440 (permanent_p): Likewise.
6441 * decl.c (building_typename_type): Don't use copy_to_permanent.
6442 (start_decl): Likewise.
6443 (grok_reference_init): Likewise.
6444 (cp_finish_decl): Likewise.
6445 * init.c (build_new_1): Don't use mapcar.
6446 (build_vec_delete_1): Don't use copy_to_permanent.
6447 (build_vec_init): Likewise.
6448 * parse.y (primary): Likewise.
6449 * parse.c: Regenerated.
6450 * pt.c (push_template_decl_real): Don't use copy_to_permanent.
6451 (lookup_template_class): Likewise.
6452 (tsubst_friend_function): Likewise.
6453 (instantiate_class_template): Likewise.
6454 (tsubst_decl): Likewise.
6455 (tsubst): Likewise.
6456 (instantiate_template): Likewise.
6457 (unify): Likewise.
6458 * rtti.c (get_tinfo_fn): Likewise.
6459 (build_dynamic_cast): Likewise.
6460 * semantics.c (finish_if_stmt_cond): Likewise.
6461 (finish_while_stmt_cond): Likewise.
6462 (finish_do_stmt): Likewise.
6463 (finish_for_cond): Likewise.
6464 (finish_for_expr): Likewise.
6465 (finish_cleanup): Likewise.
6466 (add_decl_stmt): Likewise.
6467 (finish_named_return_value): Likewise.
6468 (finish_qualified_call_expr): Likewise.
6469 * tree.c (perm_manip): Remove.
6470 (build_exception_variant): Don't use copy_to_permanent.
6471 (permanent_p): Remove.
6472 (copy_to_permament): Remove.
6473 (build_min_nt): Don't use copy_to_permanent.
6474 (build_min): Likewise.
6475 (min_tree_cons): Likewise.
6476 * typeckc.c (build_static_cast): Likewise.
6477 (build_reinterpret_cast): Likewise.
6478 (build_const_cast): Likewise.
6479
6480 1999-09-07 Mark Mitchell <mark@codesourcery.com>
6481
6482 * decl.c (ggc_p): Set it to 1.
6483 (mark_saved_scope): Add prototype.
6484
6485 1999-09-07 Richard Henderson <rth@cygnus.com>
6486
6487 * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
6488 * typeck.c (self_promoting_args_p): Delete.
6489
6490 1999-09-07 Jason Merrill <jason@yorick.cygnus.com>
6491
6492 * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
6493 (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
6494
6495 1999-09-07 Mark Mitchell <mark@codesourcery.com>
6496
6497 * Makefile.in (tree.o): Depend on ggc.h.
6498 * class.c (make_method_vec): Remove.
6499 (free_method_vec): Likewise.
6500 (free_method_vecs): Remove.
6501 (add_method): Don't use them.
6502 * cp-tree.def (PTRMEM_CST): Make it longer.
6503 (TEMPLATE_PARM_INDEX): Make it shorter.
6504 * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
6505 (template_parm_index): Remove RTL field.
6506 (ptrmem_cst): Add RTL field.
6507 (finish_function): Removed parameter.
6508 (process_next_inline): Change prototype.
6509 (init_cplus_unsave): Rename to init_tree.
6510 (binding_init): Remove.
6511 * decl.c (free_binding_nodes): Remove.
6512 (push_binding): Don't use them. Set BINDING_HAS_LEVEL_P.
6513 (pop_binding): Don't use free_binding_nodes.
6514 (free_binding_vecs): Remove.
6515 (store_bindings): Don't use them.
6516 (pop_from_top_level): Likewise.
6517 (lookup_namespace_name): Simplify.
6518 (build_typename_type): Don't use obstack_free.
6519 (unqualified_namespace_lookup): Simplify.
6520 (lookup_name_real): Simplify.
6521 (start_function): Remove comment about leaks.
6522 (finish_function): Removed nested parameter. Call
6523 expand_end_bindings even when building_stmt_tree.
6524 Call ggc_push_context and ggc_pop_context around
6525 rest_of_compilation, if necessary.
6526 (mark_cp_function_context): Handle a NULL language-context.
6527 (lang_mark_false_label_stack): Fix typo.
6528 (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
6529 TEMPLATE_PARM_INDEX. Handle the funny TYPE_LANG_SPECIFIC on
6530 pointer to method types.
6531 (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
6532 * decl2.c (finish_objects): Adjust call to finish_function.
6533 (finish_static_store_duration_function): Likewise.
6534 (do_nonmember_using_decl): Remove call to binding_init.
6535 * except.c (end_anon_func): Adjust call to finish_function.
6536 * lex.c (mark_impl_file_chain): New function.
6537 (init_parse): Call init_tree, not init_cplus_unsave.
6538 Add GC roots.
6539 (cp_pramga_interface): Use xmalloc, not permalloc.
6540 (cp_pragma_implementation): Likewise.
6541 (begin_definition_of_inclass_inline): Simplify.
6542 (process_next_inline): Adjust prototype.
6543 (do_scoped_id): Don't call binding_init.
6544 (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
6545 * method.c (emit_thunk): Adjust call to finish_function.
6546 (synthesize_method): Likewise.
6547 * parse.y (%union): Add a new `pi' variant.
6548 (PRE_PARSED_FUNCTION_DECL): Use it.
6549 (fn.defpen): Likewise.
6550 (fndef): Adjust call to finish_function.
6551 * pt.c (instantiate_decl): Likewise.
6552 * rtti.c (syntheisze_tinfo_fn): Likewise.
6553 * semantics.c (expand_body): Likewise.
6554 * tree.c: Include ggc.h.
6555 (mark_list_hash): New function.
6556 (binding_init): Remove.
6557 (init_cplus_unsave): Rename to ...
6558 (init_tree): This. Add GC roots.
6559
6560 1999-09-05 Mark Mitchell <mark@codesourcery.com>
6561
6562 Get ready for garbage collection.
6563 * Makefile.in (CXX_TREE_H): Add varray.h
6564 (lex.o): Depend on ggc.h.
6565 (decl.o): Likewise.
6566 (decl2.o): Likewise.
6567 (method.o): Likewise.
6568 (search.o): Likewise.
6569 (pt.o): Likewise.
6570 (repo.o): Likewise.
6571 * class.c: Include ggc.h.
6572 (current_class_name): Remove.
6573 (current_class_type): Likewise.
6574 (current_access_specifier): Likewise.
6575 (previous_class_type): Likewise.
6576 (previous_class_values): Likewise.
6577 (class_cache_firstobj): Likewise.
6578 (current_lang_base): Likewise.
6579 (current_lang_stack): Likewise.
6580 (current_lang_stacksize): Likewise.
6581 (lang_name_c): Likewise.
6582 (lang_name_cplusplus): Likewise.
6583 (lang_name_java): Likewise.
6584 (current_lang_name): Likewise.
6585 (base_layout_decl): Likewise.
6586 (access_default_node): Likewise.
6587 (access_public_node): Likewise.
6588 (access_protected_node): Likewise.
6589 (access_private_node): Likewise.
6590 (access_default_virtual_node): Likewise.
6591 (access_public_virtual_node): Likewise.
6592 (access_protected_virtual_node): Likewise.
6593 (access_private_virtual_node): Likewise.
6594 (signed_zero_node): Likewise.
6595 (init_class_processing): Don't build base_layout_decl.
6596 (push_lang_context): Adjust now that current_lang_base is a varray.
6597 (pop_lang_context): Likewise.
6598 * cp-tree.h: Include varray.h.
6599 (cp_global_trees): Add access_default, access_public,
6600 access_protected, access_private, access_default_virtual,
6601 access_public_virtual, access_protected_virtual,
6602 access_private_virtual, ctor_identifier, delta2_identifier,
6603 delta_identifier, dtor_identifier, in_charge_identifier,
6604 index_identifier, nelts_identifier, this_identifier,
6605 pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
6606 lang_name_c, lang_name_cplusplus, lang_name_java,
6607 empty_except_spec, null, jclass, minus_one, terminate.
6608 (saved_scope): Move here from decl.c. Define globals in terms of
6609 saved_scope: current_namespace, current_class_name,
6610 current_class_type, current_access_specifier, current_lang_stack,
6611 current_lang_base, current_lang_name, current_function_parms,
6612 current_template_parms, processing_template_decl,
6613 processing_specialization, processing_explicit_instantiation,
6614 previous_class_type, previous_class_values, class_cache_firstobj.
6615 (scope_chain): New variable.
6616 (init_pt): New function.
6617 * decl.c (current_namespace): Remove.
6618 (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
6619 (dtor_identifier, pfn_identifier, index_identifier): Likewise.
6620 (delta_identifier, delta2_identifier): Likewise.
6621 (pfn_or_delta2_identifier, tag_identifier): Likewise
6622 (vt_off_identifier, empty_except_spec, null_node): Likewise.
6623 (current_function_parms, current_lang_base): Remove.
6624 (current_lang_stack, previous_class_values): Remove.
6625 (class_binding_level): Macroize.
6626 (saved_scope): Remove.
6627 (current_saved_scope): Rename to scope_chain.
6628 (mark_saved_scope): Adjust for new scope structure.
6629 (maybe_push_to_top_level): Likewise.
6630 (pop_from_top_level): Likewise.
6631 (duplicate_decls): Adjust now that current_lang_base is a varray.
6632 (build_typename_type): Call ggc_add_tree_hash_table_root.
6633 (init_decl_processing): Call init_pt. Call push_to_top_level to
6634 set up globals. Add GC roots.
6635 (xref_basetypes): Adjust now that current_lang_base is a varray.
6636 * decl.h (this_identifier): Remove.
6637 (in_charge_identifier): Likewise.
6638 * decl2.c: Don't include varray.h.
6639 (current_namespace): Remove.
6640 (init_decl2): Add GC roots.
6641 * except.c (Terminate): Remove.
6642 (init_exception_processing): Use terminate_node instead.
6643 (build_terminate_handler): Likewise.
6644 * init.c (nc_nelts_field_id): Remove.
6645 (minus_one): Likewise.
6646 (init_init_processing): Use minus_one_node and nelts_identifier
6647 instead. Add GC roots.
6648 (jclass_node): Remove.
6649 (build_new_1): Use nelts_identifier.
6650 (build_vec_init): Likewise.
6651 (build_vec_delete): Likewise.
6652 * lex.c: Include ggc.h.
6653 (defarg_fn): Move declaration early.
6654 (defarg_parms): Likewise.
6655 (init_parse): Add GC roots.
6656 (handle_cp_pragma): Remove redundant declaration of
6657 pending_vtables.
6658 * method.c: Include ggc.h.
6659 (btypelist): Make it a varray. All uses changed.
6660 (ktypelist): Likewise.
6661 (init_method): Add GC roots.
6662 * pt.c: Don't include varray.h. Include ggc.h.
6663 (current_template_parms): Remove.
6664 (processing_template_decl): Likewise.
6665 (processing_specialization): Likewise.
6666 (processing_explicit_instantiation): Likewise.
6667 (init_pt): New function.
6668 * repo.c: Include ggc.h.
6669 (init_repo): Add GC roots.
6670 * search.c: Don't include varray.h.
6671 (_vptr_name): Remove.
6672 (lookup_field_1): Use vtpr_identifier instead.
6673 (expand_indirect_vtbls_init): Remove redundant declaration of
6674 in_charge_identifier.
6675 (init_search_processing): Use vptr_identifier.
6676
6677 1999-09-05 Richard Henderson <rth@cygnus.com>
6678 Bernd Schmidt <bernds@cygnus.co.uk>
6679 Mark Mitchell <mark@codesourcery.com>
6680
6681 * Makefile.in (parse.o): Depend on ggc.h.
6682 (decl2.o): Depend on ggc.h.
6683 (init.o): Depend on ggc.h.
6684 * cp-tree.h (init_decl2): Declare.
6685 (cp_parse_init): Likewise.
6686 * decl.c (ggc_p): Define to zero.
6687 (mark_saved_scope): New function.
6688 (init_decl_processing): Call cp_parse_init, and cp_decl2.
6689 Register GC roots.
6690 (expand_static_init): Add GC roots.
6691 * decl2.c: Include ggc.h.
6692 (init_decl2): New function.
6693 * init.c: Include ggc.h.
6694 (init_init_processing): Add GC roots.
6695 * parse.y: Include ggc.h.
6696 (cp_parse_init): New function.
6697
6698 1999-09-04 Mark Mitchell <mark@codesourcery.com>
6699
6700 * decl.c (init_decl_processing): Set mark_lang_status.
6701 (lang_mark_false_label_stack): Adjust prototype.
6702 * decl2.c (grok_function_init): Remove extraneous declaration of
6703 abort_fndecl.
6704
6705 * Make-lang.in (cc1plus): Remove dependency on GGC.
6706 * Makefile.in (OBJS): Don't mention ggc-simple.o.
6707 (OBJDEPS): Don't mention ggc-simple.o.
6708
6709 * Make-lang.in (cc1plus): Depend on $(GGC).
6710 * Makefile.in (OBJS): Add ggc-simple.o.
6711 (OBJDEPS): Likewise.
6712 * cp-tree.h (language_function): Rename members to `x_' versions;
6713 we now have x_named_labels, x_ctor_label, x_dtor_label,
6714 x_base_init_list, x_member_init_list, x_base_init_expr,
6715 x_current_class_ptr, x_current_class_ref, x_last_tree,
6716 x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
6717 x_result_rtx.
6718 (dtor_label, ctor_label, current_base_init_list,
6719 current_member_init_list, base_init_expr, current_class_ptr,
6720 current_class_ref, last_tree, last_expr_type): Adjust accordingly.
6721 * decl.c: Include ggc.h.
6722 (last_dtor_insn): Adjust to use x_ names.
6723 (last_parm_cleanup_insn): Likewise.
6724 (original_result_rtx): Likewise.
6725 (named_labels): Likewise.
6726 (mark_binding_level): New function.
6727 (mark_cp_function_context): Likewise.
6728 (mark_false_label_stack): Likewise.
6729 (lang_mark_tree): Likewise.
6730 (lang_cleanup_tree): Likewise.
6731
6732 1999-09-03 Mark Mitchell <mark@codesourcery.com>
6733
6734 * Makefile.in (CXX_TREE_H): Include function.h.
6735 (decl.o): Don't depend on function.h.
6736 (decl2.o): Likewise.
6737 (typeck.o): Likewise.
6738 (init.o): Likewise.
6739 (method.o): Likewise.
6740 * cp-tree.h: Include function.h.
6741 (cp_function): Rename to language_function. Remove next.
6742 (cp_function_chain): Make it a macro, not a variable.
6743 (push_cp_function_context): Don't declare.
6744 (pop_cp_function_context): Likewise.
6745 * decl.c: Don't include function.h.
6746 (push_cp_function_context): Make it static. Make it suitable for
6747 a save_lang_status callback.
6748 (pop_cp_function_context): Likewise.
6749 (maybe_push_to_top_level): Call push_function_context_to, not
6750 push_cp_function_context.
6751 (pop_from_top_level): Call pop_function_context_from, not
6752 pop_cp_function_context.
6753 (init_decl_processing): Set save_lang_status and
6754 restore_lang_status. Call push_function_context_to, not
6755 push_cp_function_context.
6756 (cp_function_chain): Remove.
6757 * decl2.c: Don't include function.h.
6758 * except.c: Don't include function.h.
6759 (start_anon_func): Call push_function_context_to, not
6760 push_cp_function_context.
6761 (end_anon_func): Call pop_function_context_from, not
6762 pop_cp_function_context.
6763 * init.c: Don't include function.h.
6764 * lex.c (begin_definition_of_inclass_inline): Call
6765 push_function_context_to, not push_cp_function_context.
6766 (process_next_inline): Call pop_function_context_from, not
6767 pop_cp_function_context.
6768 * method.c: Don't include function.h.
6769 (synthesize_method): Call push_function_context_to, not
6770 push_cp_function_context. Call pop_function_context_from, not
6771 pop_cp_function_context.
6772 * typeck.c: Don't include function.h.
6773
6774 * decl.c (expand_static_init): Tweak handling of static
6775 initializations for objects without constructors.
6776
6777 1999-09-03 Nathan Sidwell <nathan@acm.org>
6778
6779 * typeck.c (build_indirect_ref): Reject dereference of pointer to
6780 void.
6781
6782 1999-09-02 Mark Mitchell <mark@codesourcery.com>
6783
6784 * cp-tree.h (cp_function): Move here, from decl.c.
6785 (cp_function_chain): Declare.
6786 (dtor_label): New macro, instead of variable.
6787 (ctor_label): Likewise.
6788 (current_base_init_list): Likewise.
6789 (current_member_init_list): Likewise.
6790 (base_init_expr): Likewise.
6791 (current_class_ptr): Likewise.
6792 (current_class_ref): Likewise.
6793 (last_tree): Likewise.
6794 (last_expr_type): Likewise.
6795 (current_function_returns_value): Likewise.
6796 (current_function_returns_null): Likewise.
6797 (current_function_just_assigned_this): Likewise.
6798 (current_function_parms_stored): Likewise.
6799 (temp_name_counter): Likewise.
6800 (static_labelno): Likewise.
6801 (expanding_p): Likewise.
6802 (stmts_are_full_exprs_p): Likewise.
6803 (in_function_try_handler): Likewise.
6804 (lang_type): Remove nested type_flags. All uses changed.
6805 * call.c (ctor_label): Remove.
6806 (dtor_label): Likewise.
6807 * class.c (current_class_ptr): Remove.
6808 (current_class_ref): Likewise.
6809 * decl.c (static_labelno): Remove.
6810 (dtor_label): Likewise.
6811 (last_dtor_insn): New macro, instead of variable.
6812 (last_parm_cleanup_insn): Likewise.
6813 (original_result_rtx): Likewise.
6814 (in_function_try_handler): Remove.
6815 (named_label_uses): New macro, instead of variable.
6816 (named_labels): Likewise.
6817 (current_function_returns_value): Remove.
6818 (current_function_returns_null): Likewise.
6819 (current_function_assigns_this): New macro, instead of variable.
6820 (current_function_just_assigned_this): Likewise.
6821 (current_binding_level): Likewise.
6822 (init_decl_processing): Call push_cp_function_context.
6823 (cp_function): Move to cp-tree.h
6824 (cp_function_chain): Make it global.
6825 (temp_name_counter): Remove.
6826 (push_cp_function_context): Simplify.
6827 (pop_cp_function_context): Likewise.
6828 * decl2.c (temp_name_counter): Remove.
6829 * init_c (current_base_init_list): Likewise.
6830 (current_member_init_list): Likewise.
6831 (base_init_expr): Likewise.
6832 * method.c (static_labelno): Likewise.
6833 * pt.c (last_tree): Likewise.
6834 * semantics.c (expanding_p): Likewise.
6835 (stmts_are_full_exprs_p): Likewise.
6836 (last_expr_type): Likewise.
6837 * typeck.c (dtor_label): Likewise.
6838 (ctor_label): Likewise.
6839
6840 1999-09-01 Alex Samuel <samuel@codesourcery.com>
6841
6842 * decl2.c (arg_assoc_template_arg): New prototype. New function.
6843 (arg_assoc_class): Use arg_assoc_template_arg for template
6844 arguments.
6845 (arg_assoc): Likewise.
6846 * pt.c (mangle_class_name_for_template): Allow member template
6847 template arguments.
6848
6849 1999-09-02 Nathan Sidwell <nathan@acm.org>
6850
6851 * call.c (build_conditional_expr): Warn on enum mismatches.
6852 (convert_arg_to_ellipsis): Move non-pod check to after
6853 conversion.
6854
6855 1999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6856
6857 * gxx.gperf (hash, is_reserved_word): Add prototypes.
6858
6859 * init.c (build_vec_init): Initialize variable `try_block'.
6860
6861 * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
6862 Likewise for bzero/memset.
6863 (token_getch, token_put_back): Add static prototypes. Remove
6864 `inline' from the definitions.
6865 (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
6866
6867 1999-09-01 Mark Mitchell <mark@codesourcery.com>
6868
6869 * cp-tree.h (lang_type): Move align into type_flags.
6870 (CLASSTYPE_ALIGN): Adjust accordingly.
6871 * call.c (direct_reference_binding): Remove misleading comment.
6872
6873 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6874
6875 * parse.y (language_string): Constify.
6876
6877 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6878
6879 * repo.c (getpwd): Don't prototype.
6880 * xref.c (getpwd): Likewise
6881
6882 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6883
6884 * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
6885 Remove hacks for stuff which now comes from libiberty.
6886
6887 1999-08-30 Jason Merrill <jason@yorick.cygnus.com>
6888
6889 * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
6890
6891 1999-08-30 Mark Mitchell <mark@codesourcery.com>
6892
6893 * cp-tree.h (begin_init_stmts): Declare.
6894 (finish_init_stmts): Likewise.
6895 * cvt.c (build_up_reference): Wrap the declaration of a temporary
6896 in a statement-expression so that we will see it when expanding
6897 tree structure later.
6898 * init.c (begin_init_stmts): Don't make it static.
6899 (finish_init_stmts): Likewise.
6900
6901 * cp-tree.h (start_handler_parms): New function.
6902 (expand_start_catch_block): Take only one parameter.
6903 (start_handler_parms): New function.
6904 * decl.c (start_handler_parms): Define it.
6905 * except.c (process_start_catch_block): Take only one parameter.
6906 Don't call grokdeclarator here.
6907 (expand_start_catch_block): Don't call grokdeclarator here,
6908 either.
6909 * parse.y (handler_args): Adjust call to
6910 expand_start_catch_block. Use start_handler_parms.
6911 * pt.c (push_template_decl_real): Make permanent lists have
6912 permanent elements.
6913 (tsubst_expr): Adjust calls to expand_start_catch_block
6914 appropriately.
6915 * semantics.c (expand_stmt): Likewise.
6916
6917 1999-08-29 Alex Samuel <samuel@codesourcery.com>
6918
6919 * pt.c (push_template_decl_real): Use template declaration from
6920 class type if it exists.
6921
6922 1999-08-29 Mark Mitchell <mark@codesourcery.com>
6923
6924 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
6925 (maybe_inject_for_scope_var): Declare it.
6926 (initialize_local_var): Likewise.
6927 * decl.c (maybe_inject_for_scope_var): Make it global.
6928 (initialize_local_var): Likewise. Move cleanup handling here,
6929 from cp_finish_decl.
6930 (make_rtl_for_nonlocal_decl): Use
6931 push_obstacks_nochange/pop_obstacks, rather than
6932 end_temporary_allocation/resume_temporary_allocation.
6933 (cp_finish_decl): Try to complete the type of a variable when it
6934 is declared. Move cleanup-handling to initialize_local_var.
6935 (expand_static_init): Use tree-building code, rather than
6936 RTL-building code.
6937 * decl2.c (get_temp_name): Assert non-initializedness of
6938 temporaries.
6939 * init.c (create_temporary_var): Move RTL-assigning code to ...
6940 (get_temp_regvar): Here.
6941 * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here.
6942 * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just
6943 call initialize_local_var to generate initialization code.
6944
6945 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6946
6947 * cp-tree.h (fndecl_as_string, type_as_string,
6948 type_as_string_real, args_as_string, decl_as_string,
6949 expr_as_string, code_as_string, language_as_string,
6950 parm_as_string, op_as_string, assop_as_string, cv_as_string,
6951 lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
6952
6953 * errfn.c (cp_printer): Likewise.
6954
6955 * error.c (cp_printer, fndecl_as_string, type_as_string_real,
6956 type_as_string, expr_as_string, decl_as_string, lang_decl_name,
6957 cp_file_of, code_as_string, language_as_string, parm_as_string,
6958 op_as_string, assop_as_string, args_as_string, cv_as_string):
6959 Likewise.
6960
6961 * tree.c (lang_printable_name): Likewise.
6962
6963 1999-08-28 Richard Henderson <rth@cygnus.com>
6964
6965 * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
6966
6967 1999-08-28 Mark Mitchell <mark@codesourcery.com>
6968
6969 * cp-tree.h (strip_array_types): New function.
6970 * decl.c (maybe_deduce_size_from_array_init): New function, split
6971 out from cp_finish_decl.
6972 (layout_var_decl): Likewise.
6973 (maybe_commonize_var): Likewise.
6974 (maybe_inject_for_scope_var): Likewise.
6975 (initialize_local_var): Likewise.
6976 (build_cleanup_on_safe_obstack): Likewise.
6977 (check_initializer): Likewise.
6978 (make_rtl_for_nonlocal_decl): Likewise.
6979 (cp_finish_decl): Use them.
6980 * typeck.c (strip_array_types): New function.
6981
6982 * cp-tree.def (LABEL_STMT): New tree node.
6983 * cp-tree.h (LABEL_STMT_LABEL): New macro.
6984 (shadow_label): Remove.
6985 (declare_local_label): New function.
6986 (finish_label_decl): Likewise.
6987 * decl.c (make_label_decl): New function, split out from
6988 lookup_label.
6989 (shadowed_labels): Remove.
6990 (binding_level): Add shadowed_labels.
6991 (clear_binding_level): Remove.
6992 (push_binding_level): Just bzero the new binding level.
6993 (pushlevel): Fix indentation.
6994 (pop_label): New function.
6995 (pop_labels): Likewise, split out from poplevel.
6996 (poplevel): Pop local labels. Use pop_labels.
6997 (maybe_push_to_top_level): Don't clear shadowed_labels.
6998 (lookup_label): Use make_label_decl.
6999 (shadow_label): Remove.
7000 (declare_local_label): New function.
7001 (define_label): Simplify.
7002 (start_function): Don't clear shadowed_labels.
7003 (cp_function): Remove shadowed_labels.
7004 (push_cp_function_context): Don't save shadowed_labels.
7005 (pop_cp_function_context): Don't restore it.
7006 * dump.c (dequeue_and_dump): Handle LABEL_STMT.
7007 * parse.y (label_decl): Use finish_label_decl.
7008 * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
7009 declarations.
7010 * semantics.c (finish_label_stmt): Add a LABEL_STMT when
7011 building_stmt_tree.
7012 (finish_label_decl): New function.
7013 (expand_stmt): Handle LABEL_STMTs and local label declarations.
7014
7015 1999-08-26 Mark Mitchell <mark@codesourcery.com>
7016
7017 * decl.c (lookup_label): Build labels on the permanent obstack
7018 when building statement trees. Don't build RTL for labels when
7019 building statement trees.
7020 * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
7021 building statement trees.
7022 (finish_label_stmt): Likewise.
7023 (expand_stmt): Adjust accordingly.
7024 * pt.c (tsubst_expr); Likewise.
7025 (do_decl_instantiation): Robustify.
7026
7027 * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
7028 * tree.c (build_cplus_new): Set it.
7029 * expr.c (cplus_expand_expr): Use it.
7030 * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
7031
7032 * decl.c (store_parm_decls): Reset immediate_size_expand.
7033 (finish_function): Likewise.
7034
7035 * tree.c (cplus_unsave_expr_now): Don't return a value.
7036
7037 * semantics.c (do_poplevel): Always initialize the return value.
7038
7039 1999-08-26 Gavin Romig-Koch <gavin@cygnus.com>
7040
7041 * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
7042 * tree.h (cplus_unsave_expr_now) : Same.
7043
7044 1999-08-25 Mark Mitchell <mark@codesourcery.com>
7045
7046 * decl.c (grokdeclarator): Amend comment.
7047 * except.c (expand_start_catch_block): Call push_template_decl for
7048 catch-block parameters.
7049 * method.c (synthesize_method): Build an empty compound statement
7050 for the body of a constructor.
7051
7052 1999-08-25 Jason Merrill <jason@yorick.cygnus.com>
7053
7054 * tree.c (cp_build_qualified_type_real): If we're asking for the
7055 same quals we already have, just return.
7056
7057 1999-08-25 Mark Mitchell <mark@codesourcery.com>
7058
7059 * cp-tree.def (SUBOBJECT): New tree node.
7060 * cp-tree.h (CLEANUP_P): New macro.
7061 (SUBOBJECT_CLEANUP): Likewise.
7062 (keep_next_level): Add parameter.
7063 (get_temp_regvar): Don't declare.
7064 (emit_base_init): Remove parameter.
7065 (expand_aggr_init): Rename to build_aggr_init.
7066 (expand_vec_init): Rename to build_vec_init.
7067 (do_pushlevel): Remove.
7068 (do_poplevel): Likewise.
7069 (finish_cleanup): New function.
7070 (finish_subobject): Likewise.
7071 (stmts_are_full_exprs_p): New variable.
7072 * decl.c (keep_next_level): Add parameter.
7073 (cp_finish_decl): Use build_aggr_init, not
7074 expand_aggr_init. Use finish_expr_stmt to expand the code.
7075 (expand_static_init): Use tree-generating, not RTL-generating,
7076 functions to handle the initialization.
7077 (start_function): Remove dead code. Always have a momentary
7078 obstack inside the function, even before hitting the first curly
7079 brace.
7080 (cplus_expand_expr_stmt): Move calls to
7081 expand_{start,end}_target_temps into semantics.c.
7082 (cp_function): Add stmts_are_full_exprs_p.
7083 (push_cp_function_context): Save it.
7084 (pop_cp_function_context): Restore it.
7085 * decl2.c (get_temp_regvar): Move to init.c.
7086 (do_static_initialization): Use build_{aggr,vec}_init.
7087 (do_static_destruction): Fix typo in comment.
7088 * dump.c (dequeue_and_dump): Handle INIT_EXPR.
7089 * except.c (expand_throw): Use create_temporary_var.
7090 * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
7091 * init.c (expand_vec_init_try_block): Remove.
7092 (expand_vec_init_catch_clause): Likewise.
7093 (get_temp_regvar): New function.
7094 (begin_init_stmts): Likewise.
7095 (finish_init_stmts): Likewise.
7096 (perform_member_init): Use build_{aggr,vec}_init. Build up tree
7097 structure here.
7098 (emit_base_init): Likewise. Remove unused parameter.
7099 (expand_virtual_init): Likewise.
7100 (expand_cleanup_for_base): Use finish_subobject.
7101 (expand_aggr_vbase_init_1): Simplify.
7102 (construct_virtual_bases): Use tree-generating functions to build
7103 up initialization.
7104 (expand_aggr_init): Likewise. Rename to build_aggr_init.
7105 (expand_default_init): Likewise.
7106 (expand_aggr_init_1): Likewise.
7107 (expand_vec_init): Rename to build_vec_init.
7108 * method.c (do_build_copy_constructor): Use tree-generating
7109 functions. Don't call clear_last_expr.
7110 (do_build_assign_ref): Likewise.
7111 (synthesize_method): Call clear_last_expr here.
7112 * parse.y (base_init): Don't call clear_last_expr here.
7113 (nodecls): Likewise.
7114 * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
7115 * semantics.c (do_pushlevel): Move to here.
7116 (do_poplevel): Likewise.
7117 (stmts_are_full_exprs_p): New variable.
7118 (finish_expr_stmt): Handle logic for temoprary cleanup here.
7119 (finish_for_stmt): Use finish_expr_stmt.
7120 (finish_cleanup): New function.
7121 (finish_function_try_block): Fix indentation.
7122 (finish_subobject): New function.
7123 (setup_vtbl_ptr): Call keep_next_level here.
7124 (finish_stmt_expr): Handle a block with no scope inside the
7125 statement-expression.
7126 (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle
7127 SUBOBJECT.
7128 * tree.c (search_tree): Handle INIT_EXPR.
7129 (mapcar): Likewise.
7130 * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
7131 * typeck2.c (store_init_value): Change expand_aggr_init to
7132 build_aggr_init in comment.
7133
7134 1999-08-25 Mark Mitchell <mark@codesourcery.com>
7135
7136 * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
7137
7138 1999-08-25 Nathan Sidwell <nathan@acm.org>
7139
7140 * decl2.c (handle_class_head): Be graceful about additional
7141 scope qualifiers. Adjust comments to reflect reality.
7142
7143 1999-08-24 Jason Merrill <jason@yorick.cygnus.com>
7144
7145 * call.c (build_conditional_expr): Fix typo.
7146 * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
7147 lvalue before trying to mess with the sides.
7148
7149 * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
7150
7151 Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu>
7152
7153 * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
7154
7155 1999-08-23 Jason Merrill <jason@yorick.cygnus.com>
7156
7157 * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
7158 Return arbitrary pointer or NULL.
7159 (check_eh_spec): Call __throw_type_match_rtti_2.
7160 * tinfo.h (*::dcast): Return int. Add valp parm.
7161 * tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers.
7162 * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
7163 (__throw_type_match_rtti): Now just a wrapper.
7164
7165 * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
7166 (init_exception_processing): Don't initialize them.
7167
7168 1999-08-23 Paul Burchard <burchard@pobox.com>
7169
7170 * decl.c (check_default_argument): Fix typo.
7171
7172 1999-08-22 Mark Mitchell <mark@codesourcery.com>
7173
7174 * cp-tree.def (STMT_EXPR): Fix typo in node name.
7175
7176 * dump.c (dump_next_stmt): New function.
7177 (dequeue_and_dump): Use it.
7178
7179 * pt.c (tsubst_copy): Make sure to initialize return value for a
7180 STMT_EXPR, even when processing_template_decl.
7181 * semantics.c (finish_stmt_expr): A statement-expression whose
7182 last statement is not an expression-statement has type `void'.
7183
7184 1999-08-20 Mark Mitchell <mark@codesourcery.com>
7185
7186 * semantics.c (finish_stmt_expr): Fix typo in comment.
7187 * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
7188 (mapcar): Likewise.
7189 * init.c (build_vec_delete_1): Make the children of a permanent
7190 BIND_EXPR permanent.
7191 * pt.c (register_specialization): Don't register a specialization
7192 more than once.
7193
7194 1999-08-18 Andrew Haley <aph@cygnus.com>
7195
7196 * method.c (process_overload_item): Call build_mangled_C9x_name ()
7197 for all integer parameter types larger than long long.
7198
7199 1999-08-19 Mark Mitchell <mark@codesourcery.com>
7200
7201 * pt.c (redeclare_class_template): Merge default template
7202 arguments in both directions.
7203
7204 * typeck.c (common_type): Undo 1999-08-18 change. Remove
7205 compiler_error message.
7206
7207 1999-08-19 Jason Merrill <jason@yorick.cygnus.com>
7208
7209 * cp-tree.h: Declare flag_use_repository.
7210 * pt.c (do_decl_instantiation): Don't complain about duplicate
7211 instantiation with -frepo.
7212 (do_type_instantiation): Likewise.
7213
7214 * pt.c (push_template_decl_real): Complain about everything
7215 that isn't a valid template.
7216
7217 * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
7218 affect inlines.
7219
7220 1999-08-19 Mark Mitchell <mark@codesourcery.com>
7221
7222 * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
7223 * decl2.c (build_expr_from_tree): Handle it.
7224 * error.c (dump_expr): Likewise.
7225 * pt.c (for_each_template_parm): Likewise.
7226 (tsubst_copy): Likewise.
7227 * tree.c (search_tree): Likewise.
7228 * semantics.c (finish_pseudo_destructor_call): Create it.
7229
7230 1999-08-18 Mark Mitchell <mark@codesourcery.com>
7231
7232 * search.c (setup_class_bindings): Robustify.
7233 * typeck.c (common_type): Use same_type_p, not pointer equality,
7234 to compare types.
7235
7236 * cp-tree.h (build_lang_field_decl): Remove.
7237 * class.c (build_vtable): Replace calls to build_lang_field_decl
7238 with build_lang_decl.
7239 (prepare_fresh_vtable): Likewise.
7240 (finish_struct_1): Likewise.
7241 (init_class_processing): Likewise.
7242 * decl.c (push_using_decl): Likewise.
7243 (init_decl_processsing): Likewise.
7244 (grokvardecl): Likewise.
7245 (build_ptrmemfunc_type): Likewise.
7246 (grokdeclarator): Likewise.
7247 (build_enumerator): Likewise.
7248 * decl2.c (grok_x_components): Likewise.
7249 (do_class_using_decl): Likewise.
7250 * except.c (call_eh_info): Likewise.
7251 * init.c (init_init_processing): Likewise.
7252 * rtti.c (expand_class_decl): Likewise.
7253 * tree.c (build_base_fields): Likewise.
7254 (build_vbase_pointer_fields): Likewise.
7255 * lex.c (build_lang_decl): Build declarations on the permanent
7256 obstack if we're building statmeent trees.
7257 (retrofit_lang_decl): Handle both the full lang_decl and also the
7258 smaller lang_decl_flags here.
7259 (build_lang_field_decl): Remove.
7260 * pt.c (push_template_decl_real): Issue errors for variable
7261 declarations that are not static members.
7262
7263 1999-08-18 Richard Henderson <rth@cygnus.com>
7264
7265 * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
7266 (mapcar): Likewise.
7267
7268 1999-08-17 Mark Mitchell <mark@codesourcery.com>
7269
7270 * cp-tree.h (back_end_hook): New variable.
7271 * decl2.c (back_end_hook): Define it.
7272 (finish_file): If it's non-NULL, call it.
7273
7274 * decl.c (add_decl_to_level): New function.
7275 (push_local_binding): Use it.
7276 (find_binding): Fix typo in comment.
7277 (pushdecl): Use add_decl_to_level. Put templates on the
7278 corresponding namespace-scope binding levels.
7279 * dump.c (dequeue_and_dump): Print the specializations of a
7280 template.
7281 * pt.c (push_template_decl_real): Don't push a template multiple
7282 times.
7283
7284 1999-08-17 Mark Mitchell <mark@codesourcery.com>
7285
7286 * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
7287 (CALL_DECLARATOR_QUALS): Likewise.
7288 (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
7289 * decl.c (grokdeclarator): Adjust to use them.
7290 * decl2.c (grokfield): Likewise.
7291 (reparse_absdcl_as_casts): Likewise.
7292 * lex.c (make_call_declarator): Likewise.
7293 (set_quals_and_spec): Likewise.
7294 * pt.c (tsubst): Likewise.
7295 * tree.c (mapcar): Remove special hack to handle third operand of
7296 a CALL_EXPR.
7297
7298 1999-08-16 Mark Mitchell <mark@codesourcery.com>
7299
7300 * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
7301 * class.c (build_vtable): Use build_lang_field_decl to build the
7302 VAR_DECLs for vtables.
7303 (prepare_fresh_vtable): Likewise.
7304 * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
7305 CAN_HAVE_FULL_LANG_DECL_P.
7306 (push_using_decl): Use build_lang_decl to build USING_DECLs.
7307 (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
7308 * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
7309 (build_lang_field_decl): Likewise.
7310 (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
7311 to copy.
7312
7313 * cp-tree.def (STMT_EXPR): New tree node.
7314 * cp-tree.h (STMT_EXPR_STMT): New macro.
7315 (store_return_init): Change prototype.
7316 (finish_named_return_value): New function.
7317 (expand_stmt): Likewise.
7318 (expand_body): Likewise.
7319 (begin_stmt_tree): Likewise.
7320 (finish_stmt_tree): Likewise.
7321 (expanding_p): New variable.
7322 (last_expr_type): Likewise.
7323 (building_stmt_tree): New macro.
7324 * decl.c (start_function): Use building_stmt_tree, not
7325 processing_template_decl, where appropriate.
7326 (store_parm_decls): Likewise.
7327 (store_return_init): Move most of the body to semantics.c.
7328 (finish_function): Use building_stmt_tree.
7329 (finish_stmt): Clear last_expr_type here.
7330 (cp_function): Add expanding_p, last_tree, last_expr_type.
7331 (push_cp_function_context): Save them.
7332 (pop_cp_function_context): Restore them.
7333 * decl2.c (setup_vtbl_ptr): Move to semantics.c.
7334 * error.c (dump_expr): Handle STMT_EXPR.
7335 * except.c (expand_start_catch_block): Use building_stmt_tree.
7336 Use add_decl_stmt.
7337 * expr.c (cplus_expand_expr): Handle STMT_EXPR.
7338 (do_case): Move add_tree call to semantics.c.
7339 * parse.y (return_init): Use finish_named_return_value.
7340 (for.init.statement): Use finish_expr_stmt.
7341 * parse.c: Regenerated.
7342 * pt.c (do_pushlevel): Move to semantics.c.
7343 (do_poplevel): Likewise.
7344 (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
7345 (tsubst_expr): Don't expand all the way to RTL here. Handle
7346 RETURN_INIT and CTOR_INITIALIZER.
7347 (instantiate_decl): Call expand_body after tsubst'ing into
7348 DECL_SAVED_TREE.
7349 * semantics.c (expand_stmts): New function.
7350 (expanding_p): New variable.
7351 (last_expr_type): Likewise.
7352 (finish_expr_stmt): Use building_stmt_tree.
7353 (begin_if_stmt): Likewise.
7354 (finish_if_stmt_cond): Likewise.
7355 (finish_then_clause): Likewise.
7356 (begin_else_clause): Likewise.
7357 (finish_else_clause): Likewise.
7358 (begin_while_stmt): Likewise.
7359 (finish_while_stmt_cond): Likewise.
7360 (finish_while_stmt): Likewise.
7361 (finish_do_body): Likewise.
7362 (finish_do_stmt): Likewise.
7363 (finish_return_stmt): Likewise.
7364 (begin_for_stmt): Likewise.
7365 (fnish_for_init_stmt): Likewise.
7366 (finish_for_cond): Likewise.
7367 (finish_for_expr): Likewise.
7368 (finish_for_stmt): Likewise.
7369 (finish_break_stmt): Likewise.
7370 (finish_continue_stmt): Likewise.
7371 (finish_switch_cond): Likewise.
7372 (finish_switch_stmt): Likewise.
7373 (finish_case_label): Call add_tree here if necessary.
7374 (finish_goto_statement): Use building_stmt_tree.
7375 (begin_try_block): Likewise.
7376 (begin_function_try_block): Likewise.
7377 (finish_try_block): Likewise.
7378 (finish_function_try_block): Likewise.
7379 (finish_handler_sequence): Likewise.
7380 (finish_function_handler_sequence): Likewise.
7381 (begin_handler): Likewise.
7382 (finish_handler_parms): Likewise.
7383 (finish_handler): Likewise.
7384 (begin_compound_stmt): Likewise.
7385 (finish_compound_stmt): Likewise.
7386 (finish_asm_stmt): Likewise.
7387 (finish_label_stmt): Likewise.
7388 (finish_named_return_value): New function.
7389 (setup_vtbl_ptr): Moved here from decl2.c.
7390 (do_pushlevel): Moved here from pt.c.
7391 (do_poplevel): Likewise.
7392 (begin_stmt_expr): Use building_stmt_tree.
7393 (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR,
7394 when building_stmt_tree.
7395 (begin_stmt_tree): New function.
7396 (finish_stmt_tree): Likewise.
7397 (expand_stmt): Likewise.
7398 (expand_body): Likewise.
7399 * tree.c (build_cplus_method_type): Make sure the argument types
7400 end up on the same obstack as the METHOD_TYPE.
7401 (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
7402 THROW_EXPR, STMT_EXPR.
7403 (mapcar): Break out common cases. Handle COMPOUND_EXPR,
7404 MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than
7405 sorry, if an unsupported node is encountered.
7406 * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
7407 (c_expand_return): Don't call add_tree here.
7408
7409 1999-08-15 Mark Mitchell <mark@codesourcery.com>
7410
7411 * pt.c (check_default_tmpl_args): Don't check in local scopes.
7412 (tsubst_decl): Make sure the declaration is on a saveable
7413 obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
7414 variable.
7415 (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
7416
7417 1999-08-14 Jason Merrill <jason@yorick.cygnus.com>
7418
7419 Speed up Koenig lookup.
7420 * decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm
7421 to return namespaces we've looked at.
7422 * decl2.c (lookup_using_namespace): Likewise.
7423 (add_function): Don't call ovl_member.
7424 (lookup_arg_dependent): Initialize k.namespaces to the list of
7425 namespaces seen in unqualified lookup.
7426 * call.c (equal_functions): Move here from tree.c.
7427 (joust): Use it to handle duplicate candidates.
7428 * tree.c (ovl_member): Use ==.
7429
7430 1999-08-13 Mark Mitchell <mark@codesourcery.com>
7431
7432 * cp-tree.def (DECL_STMT): Make it smaller.
7433 * cp-tree.h (lang_decl_flags): Move saved_tree to ...
7434 (lang_decl): ... here. Add next.
7435 (DECL_SAVED_TREE): Adjust accordingly.
7436 (DECL_IMPLICIT_TYPEDEF_P): New macro.
7437 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
7438 (DECL_STMT_DECL): Likewise.
7439 (create_implicit_typedef): New function.
7440 (maybe_push_decl): Likewise.
7441 (tsubst_default_argument): New function.
7442 (at_function_scope_p): Likewise.
7443 (add_decl_stmt): Likewise.
7444 (push_permanent_obstack): Likewise.
7445 * call.c (convert_default_arg): Use tsubst_default_argument.
7446 * class.c (add_method): Use push_permanent_obstack.
7447 (build_self_reference): Create a TEMPLATE_DECL for the
7448 self-reference, if necessary.
7449 * decl.c (pseudo_global_level_p): Only look at the current binding
7450 level.
7451 (push_binding): Use push_permanent_obstack.
7452 (create_implicit_typedef): New function.
7453 (pushtag): Use it.
7454 (duplicate_decls): Use push_permanent_obstack.
7455 (maybe_push_decl): New function.
7456 (start_decl): Use it. Remove dead code. Use add_decl_stmt.
7457 (start_decl_1): Remove dead code.
7458 (cp_finish_decl): Remove DECL_STMT handling here. Don't use
7459 pseudo_global_level_p.
7460 (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
7461 template.
7462 (grokdeclarator): Likewise, for TYPE_DECLs. Don't use
7463 pseudo_global_level_p.
7464 * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
7465 a template.
7466 (get_sentry): Use push_permanent_obstack.
7467 * dump.c (dequeue_and_dump): Enable DECL_STMT.
7468 * except.c (call_eh_info): Use push_permanent_obstack.
7469 (build_eh_type_ref): Likewise.
7470 (do_pop_exception): Likewise.
7471 (expand_eh_spec): Likewise.
7472 (alloc_eh_object): Likewise.
7473 (expand_throw): Likewise.
7474 * init.c (build_java_class_ref): Likewise.
7475 * lex.c (get_time_identifier): Likewise.
7476 (free_lang_decl_chain): Correct type.
7477 (retrofit_lang_decl): Adjust accordingly.
7478 (build_lang_field_decl): Likewise.
7479 * lex.h (free_lang_decl_chain): Likewise.
7480 * parse.y (lang_extdef): Don't use pseudo_global_level_p.
7481 * parse.c: Regenerated.
7482 * pt.c (tsubst_default_arguments): New function.
7483 (retrieve_local_specialization): Likewise.
7484 (register_local_specialization): Likewise.
7485 (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use
7486 pseudo_global_level_p to determine whether or not a template is
7487 primary.
7488 (lookup_template_class): Likewise. Use create_implicit_typedef.
7489 (instantiate_class_template): Call tsubst_default_arguments for
7490 member functions, if appropriate.
7491 (tsubst_default_argument): New function.
7492 (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs.
7493 * search.c (at_function_scope_p): New function.
7494 * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
7495 (finish_label_stmt): Likewise.
7496 (add_decl_stmt): New function.
7497 (begin_class_definition): Likewise.
7498 (finish_typeof): Likewise.
7499 * tree.c (copy_template_template_parm): Likewise.
7500 (copy_to_permanent): Likewise.
7501 (push_permanent_obstack): Define.
7502 (mark_addressable): Use it.
7503 * typeck.c (mark_addressable): Likewise.
7504
7505 1999-08-13 Gavin Romig-Koch <gavin@cygnus.com>
7506
7507 * cp-tree.h (init_cplus_unsave): New.
7508 (cplus_unsave_expr_now): New.
7509 * lex.c (init_parse): Call init_cplus_unsave.
7510 * tree.c (init_cplus_unsave): New.
7511 (cplus_unsave_expr_now): New.
7512
7513 1999-08-13 Mark Mitchell <mark@codesourcery.com>
7514
7515 * pt.c (tsubst): Back out 1999-08-06 patch. Use fold and
7516 decl_constant_value to simplify array bounds.
7517
7518 1999-08-11 Jason Merrill <jason@yorick.cygnus.com>
7519
7520 * lang-options.h: Add -fms-extensions.
7521 * cp-tree.h: Declare flag_ms_extensions.
7522 * decl2.c: Define it.
7523 * class.c (instantiate_type): Don't complain about taking the address
7524 of a bound member function if -fms-extensions.
7525 * typeck.c (build_unary_op): Likewise.
7526 * decl.c (grokdeclarator): Or about implicit int.
7527 * init.c (resolve_offset_ref): Or about implicit '&'.
7528
7529 1999-08-11 Mark Mitchell <mark@codesourcery.com>
7530
7531 * cp-tree.h (minimal_parse_mode): Remove.
7532 (finish_label_stmt): New function.
7533 * decl.c (saved_scope): Remove minimal parse mode.
7534 (maybe_push_to_top_level): Don't save it.
7535 (pop_from_top_level): Don't restore it.
7536 (define_label): Split out template-handling code to semantics.c.
7537 (start_decl): Don't use minimal_parse_mode.
7538 (cp_finish_decl): Likewise.
7539 (start_function): Don't increment it.
7540 (store_return_init): Don't use it.
7541 (finish_function): Don't decrement it.
7542 * parse.y (label_colon): Use finish_label_stmt throughout.
7543 * parse.c: Regenerated.
7544 * pt.c (minimal_parse_mode): Don't define it.
7545 (tsubst_expr): Use finish_label_stmt.
7546 * semantics.c (finish_label_stmt): New function.
7547
7548 * dump.c (queue): Be careful when computing bitmasks.
7549 (dequeue_and_dump): Describe binfos as binfos, not as
7550 vectors.
7551
7552 * parse.y (pedantic): Give it itype. Adjust usage accordingly
7553 throughout.
7554 * parse.c: Regenerated.
7555
7556 * Make-lang.in (CXX_SRCS): Remove sig.c.
7557 * Makefile.in (CXX_OBJS): Remove sig.o.
7558 (sig.o): Remove.
7559 * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
7560 (CPTI_SIGNATURE_TYPE): Likewise.
7561 (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
7562 (opaque_type_node): Likewise.
7563 (signature_type_node): Likewise.
7564 (sigtable_entry_type): Likewise.
7565 (flag_handle_signatures): Likewise.
7566 (lang_type): Remove is_signature, is_signature_pointer,
7567 is_signature_reference, has_opaque_typedecls,
7568 sigtables_has_been_generated. Adjust dummy. Remove signature,
7569 signature_pointer_to, signature_reference_to.
7570 (IS_SIGNATURE): Remove.
7571 (SET_SIGNATURE): Remove.
7572 (CLEAR_SIGNATURE): Remove.
7573 (IS_SIGNATURE_POINTER): Remove.
7574 (IS_SIGNATURE_REFERENCE): Remove.
7575 (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
7576 (SIGTABLE_HAS_BEEN_GENERATED): Remove.
7577 (CLASSTYPE_SIGNATURE): Remove.
7578 (SIGNATURE_TYPE): Remove.
7579 (SIGNATURE_METHOD_VEC): Remove.
7580 (SIGNATURE_POINTER_TO): Remove.
7581 (SIGNATURE_REFERENCE_TO): Remove.
7582 (lang_decl_flags): Remove is_default_implementation. Rename
7583 memfunc_pointer_to to saved_tree.
7584 (IS_DEFAULT_IMPLEMENTATION): Remove.
7585 (DECL_MEMFUNC_POINTER_TO): Remove.
7586 (DECL_MEMFUNC_POINTING_TO): Remove.
7587 (DECL_SAVED_TREE): Adjust definition.
7588 (tag_types): Remove signature_type_node.
7589 (SIGNATURE_FIELD_NAME): Remove.
7590 (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
7591 (SIGNATURE_OPTR_NAME): Likewise.
7592 (SIGNATURE_SPTR_NAME): Likewise.
7593 (SIGNATURE_POINTER_NAME): Likewise.
7594 (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
7595 (SIGNATURE_REFERENCE_NAME): Likewise.
7596 (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
7597 (SIGTABLE_PTR_TYPE): Likewise.
7598 (SIGTABLE_NAME_FORMAT): Likewise.
7599 (SIGTABLE_NAME_FORMAT_LONG): Likewise.
7600 (SIGTABLE_TAG_NAME): Likewise.
7601 (SIGTABLE_VB_OFF_NAME): Likewise.
7602 (SIGTABLE_VT_OFF_NAME): Likewise.
7603 (finish_base_specifiers): Change prototype.
7604 (build_signature_pointer_type): Remove.
7605 (build_signature_reference_type): Remove.
7606 (build_signature_pointer_constructor): Remove.
7607 (build_signature_method_call): Remove.
7608 (build_optr_ref): Likewise.
7609 (append_signature_fields): Likewise.
7610 (signature_error): Likewise.
7611 * call.c (build_this): Remove signature support.
7612 (build_over_call): Likewise.
7613 (build_new_method_call): Likewise.
7614 * class.c (add_implicitly_declared_members): Likewise.
7615 (finish_struct_1): Likewise.
7616 (finish_struct): Likewise.
7617 * cvt.c (cp_convert_to_pointer): Likewise.
7618 (convert_to_pointer_force): Likewise.
7619 (ocp_convert): Likewise.
7620 * decl.c (sigtable_decl_p): Remove.
7621 (init_decl_processing): Remove support for signatures.
7622 (cp_finish_decl): Likewise.
7623 (grokdeclarator): Likewise.
7624 (grokparms): Likewise.
7625 (xref_tag): Likewise.
7626 (start_function): Likewise.
7627 (start_method): Likewise.
7628 * decl2.c (finish_sigtable_vardecl): Remove.
7629 (flag_handle_signatures): Remove.
7630 (lang_f_options): Remove handle-signatures.
7631 (grokfield): Remove support for signatures.
7632 (grokbitfield): Likewise.
7633 (finish_file): Likewise.
7634 (reparse_absdcl_as_casts): Likewise.
7635 * error.c (dump_type_real): Likewise.
7636 (dump_function_decl): Likewise.
7637 * friend.c (make_friend_class): Likewise.
7638 * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
7639 * hash.h: Regenerated.
7640 * init.c (build_new_1): Remove support for signatures.
7641 * lang-options.h: Remove -fhandle-signatures,
7642 -fno-handle-signatures.
7643 * lex.c (init_parse): Remove support for signatures.
7644 (yyprint): Likewise.
7645 * lex.h (rid): Remove RID_SIGNATURE.
7646 * method.c (build_decl_overload_real): Remove support for
7647 signatures.
7648 (hack_identifier): Likewise.
7649 * parse.y (base_class): Likewise.
7650 (base_class.1): Likewise.
7651 (access_specifier): Likewise.
7652 * search.c (lookup_member): Likewise.
7653 * semantics.c (finish_qualified_object_call_expr): Likewise.
7654 (finish_template_type_parm): Likewise.
7655 (begin_class_definition): Likewise.
7656 (finish_base_specifier): Likewise.
7657 * sig.c: Remove.
7658 * tree.c (build_cplus_method_type): Remove support for signatures.
7659 * typeck.c (require_complete_type): Likewise.
7660 (c_sizeof): Likewise.
7661 (c_alignof): Likewise.
7662 (build_object_ref): Likewise.
7663 (build_component_ref): Likewise.
7664 (build_indirect_ref): Likewise.
7665 (build_c_cast): Likewise.
7666 (build_modify_expr): Likewise.
7667 (convert_for_initialization): Likewise.
7668 * typeck2.c (signature_error): Remove.
7669 (store_init_value): Remove support for signatures.
7670 (digest_init): Likewise.
7671 (build_x_arrow): Likewise.
7672 (build_functional_cast): Likewise.
7673 * xref.c (GNU_xref_decl): Likewise.
7674
7675 1999-08-10 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
7676
7677 * lex.c (do_identifier): Remove unnecessary lookup of class field.
7678
7679 1999-08-09 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
7680
7681 * decl2.c (set_decl_namespace): Do not complain about non-matching
7682 decls if processing a template.
7683
7684 1999-08-09 Mark Mitchell <mark@codesourcery.com>
7685
7686 * decl.c (build_ptrmemfunc_type): Handle qualified
7687 pointer-to-member types here.
7688 * tree.c (cp_build_qualified_type_real): Simplify handling here.
7689
7690 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7691
7692 * lex.c (lang_identify): Likewise.
7693
7694 1999-08-09 Bernd Schmidt <bernds@cygnus.co.uk>
7695
7696 * Makefile.in: Update dependencies.
7697 * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
7698 NULL_RTX.
7699 * decl.c: Include "function.h"
7700 (cleanup_label, return_label): Delete declarations.
7701 (store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX.
7702 (finish_function): Rename last_parm_insn variable to
7703 fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX.
7704 * decl2.c: Include "function.h".
7705 (rtl_expr_chain): Delete declaration.
7706 * method.c: Include "function.h"
7707 * tree.c (build_vbase_pointer_fields): Don't initialize
7708 DECL_SAVED_INSNS with NULL_RTX.
7709 * typeck.c: Include "function.h"
7710
7711 1999-08-09 Jason Merrill <jason@yorick.cygnus.com>
7712
7713 * semantics.c (begin_function_try_block, finish_function_try_block,
7714 finish_function_handler_sequence): New fns.
7715 * parse.y (function_try_block): Use them.
7716 * pt.c (instantiate_decl): Likewise.
7717
7718 * cp-tree.h: Declare in_function_try_handler.
7719 * decl.c: Define it.
7720 (start_function): Clear it.
7721 (struct cp_function, push_cp_function_context): Save it.
7722 (pop_cp_function_context): Restore it.
7723 * parse.y (function_try_block): Set and clear it.
7724 * except.c (expand_end_catch_block): Rethrow if we reach the end
7725 of a function-try-block handler in a ctor or dtor.
7726 * typeck.c (c_expand_return): Complain about returning from a
7727 function-try-block handler of a ctor.
7728
7729 * parse.y (function_try_block): Call end_protect_partials
7730 before expand_start_all_catch.
7731
7732 1999-08-08 Jason Merrill <jason@yorick.cygnus.com>
7733
7734 * decl.c (struct binding_level): Add eh_region field.
7735 (push_binding_level): Set it.
7736 (define_label): Complain about jumping into an EH block.
7737
7738 * ptree.c (print_lang_type): Print the real type of a PMF.
7739 Print what exceptions a fn type throws.
7740
7741 1999-08-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7742
7743 * class.c (count_fields, add_fields_to_vec): Add static prototype.
7744
7745 * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
7746 get_id_2, composite_pointer_type, dump_node_to_file): Constify a
7747 char*.
7748
7749 * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
7750 Constify a char*.
7751
7752 * decl2.c (finish_static_data_member_decl, grokfield): Constify a
7753 char*.
7754
7755 * dump.c (queue_and_dump_index, dump_int, dump_string,
7756 dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
7757 a char*.
7758 (dump_stmt): Add static prototype.
7759
7760 * errfn.c (cp_thing): Constify a char*.
7761
7762 * error.c (dump_unary_op, dump_binary_op, aggr_variety,
7763 dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
7764 dump_expr): Constify a char*.
7765
7766 * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
7767 read_line_number): Add static prototype.
7768 (opname_tab, assignop_tab, operator_name_string): Constify a char*.
7769 (real_yylex): Move label `letter' into the scope where it is used.
7770
7771 * method.c (build_mangled_template_parm_index, build_overload_int,
7772 build_decl_overload_real, get_id_2): Constify a char*.
7773
7774 * search.c (check_final_overrider): Make static.
7775
7776 * typeck.c (composite_pointer_type): Constify a char*.
7777
7778 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
7779
7780 * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
7781 we're looking at a class.
7782
7783 * decl.c (lookup_name_real): Set the complain flag if we're
7784 looking for a namespace member.
7785
7786 * lex.c (real_yylex): We can have a number with no digits.
7787
7788 * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
7789
7790 * search.c (binfo_from_vbase): New fn.
7791 * cp-tree.h: Declare it.
7792 * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
7793 from pointer to member of virtual base.
7794 * typeck.c (get_delta_difference): Likewise.
7795
7796 1999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br>
7797
7798 * pt.c (tsubst): Use build_index_type to build in-template array
7799 index type. Fixes g++.oliva/dwarf1.C.
7800 * decl.c (grokdeclarator): Likewise, just for consistency, as it
7801 doesn't seem to trigger the bug without it.
7802
7803 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
7804
7805 * typeck2.c (add_exception_specifier): Use complete_type.
7806
7807 1999-08-06 Mark Mitchell <mark@codesourcery.com>
7808
7809 * error.c (dump_expr): Handle EXACT_DIV_EXPR.
7810 (dump_binary_op): Bulletproof.
7811 * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
7812 * tree.c (search_tree): Don't enumerate all the nodes of classes
7813 `1', `2', and `<'; handle them generically. Don't be sorry about
7814 "unrecognized tree codes"; just abort.
7815 (no_linkage_check): Don't do linkage checks for templates.
7816
7817 * tree.c (cp_build_qualified_type_real): Handle
7818 pointer-to-member-function types correctly.
7819
7820 1999-08-05 Jason Merrill <jason@yorick.cygnus.com>
7821
7822 * decl.c (pushdecl): Only give an error for shadowing a parm
7823 from *this* function.
7824
7825 Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com)
7826
7827 * typeck2.c: Update URLs and mail addresses.
7828
7829 1999-08-04 Nathan Sidwell <nathan@acm.org>
7830
7831 * cp-tree.h (empty_except_spec): New global var.
7832 (compexcepttypes): Remove prototype.
7833 (comp_except_specs): Prototype new global function.
7834 (add_exception_specifier): Prototype new global function.
7835 * decl.c (empty_except_spec): Define new global var.
7836 (duplicate_decls): Use comp_except_specs, reword error message.
7837 (init_decl_processing): Initialize empty_except_spec.
7838 Adjust build_exception_variant calls.
7839 * parse.y (exception_specification_opt): Use empty_except_spec.
7840 (ansi_raise_identifier): Call check_for_new_type.
7841 (ansi_raise_identifiers): Use add_exception_specifier.
7842 * pt.c (tsubst): Use add_exception_specifier to build exception
7843 specifier.
7844 * search.c (check_final_overrider): New static function, broken
7845 out of get_matching_virtual. Check throw specifiers, reword
7846 diagnostics.
7847 (get_matching_virtual): Use check_final_overrider.
7848 * tree.c (build_exception_variant): Use comp_except_specs.
7849 * typeck.c (compexcepttypes): Remove.
7850 (comp_except_types): New static function, helper for
7851 comp_except_specs. Compare two types as exception specifiers.
7852 (comp_except_specs): New global function, compare two exception
7853 specifiers.
7854 (comptypes): Adjust for comp_except_specs.
7855 * typeck2.c (add_exception_specifier): New global function.
7856
7857 * class.c (check_for_override): Reword error message.
7858
7859 1999-08-03 Nathan Sidwell <nathan@acm.org>
7860
7861 * call.c (convert_arg_to_ellipsis): Use pod_type_p.
7862 * cp-tree.h (struct lang_type): Added non_pod_class flag.
7863 (CLASSTYPE_NON_POD_P): New macro to access it.
7864 * class.c (finish_struct_1): Determine non-PODness.
7865 Check for arrays of pointers (-Weffc++).
7866 Remove array inspection duplicated code.
7867 * tree.c (pod_type_p): Detect non-pod non-aggregate types.
7868 Use CLASSTYPE_NON_POD_P.
7869
7870 1999-08-03 Nathan Sidwell <nathan@acm.org>
7871
7872 * class.c (duplicate_tag_error): Preserve template information.
7873
7874 1999-08-03 Nathan Sidwell <nathan@acm.org>
7875
7876 * decl.c (start_enum): Show location of previous definition.
7877 * parse.y (enumlist_opt): New reduction.
7878 (structsp): Simplify enum rules to use enumlist_opt.
7879
7880 1999-08-03 Jason Merrill <jason@yorick.cygnus.com>
7881
7882 * lex.c (yyprint): Handle PFUNCNAME.
7883
7884 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
7885 build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
7886
7887 1999-08-03 Mumit Khan <khan@xraylith.wisc.edu>
7888
7889 * decl.c (start_decl): Set attributes before duplicate_decls call.
7890
7891 1999-08-02 Mark Mitchell <mark@codesourcery.com>
7892
7893 * Make-lang.in (CXX_SRCS): Add dump.c.
7894 * Makefile.in (CXX_OBJS): Add dump.o.
7895 (dump.o): New target.
7896 * cp-tree.h (DECL_CONV_FN_P): Document.
7897 (DECL_OVERLOADED_OPERATOR_P): New function.
7898 (TYPE_PTRMEM_CLASS_TYPE): New macro.
7899 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
7900 (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
7901 (ASM_VOLATILE_P): New macro.
7902 (STMT_LINENO): Likewise.
7903 (cp_namespace_decls): New function.
7904 (dump_node_to_file): New function.
7905 * decl.c (cp_namespace_decls): New function.
7906 (walk_namespaces_r): Use it.
7907 (wrapup_globals_for_namespace): Likewise.
7908 * decl2.c (flag_dump_translation_unit): New variable.
7909 (lang_decode_option): Handle -fdump-translation-unit.
7910 (finish_file): If flag_dump_translation_unit is set, dump the
7911 translation unit.
7912 * dump.c: New file.
7913 * lang-options.h: Add -fdump-translation-unit.
7914 * pt.c (tsubst_template_parms): Robustify.
7915 (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
7916 (tsubst_expr): Use STMT_LINENO.
7917 * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check
7918 for invalid cv-qualifiers even while building templates.
7919
7920 1999-08-02 Richard Henderson <rth@cygnus.com>
7921
7922 * call.c: Include defaults.h instead of expr.h.
7923 * decl.c: Likewise.
7924 * pt.c: Likewise.
7925 * typeck.c: Include defaults.h.
7926
7927 1999-08-02 Mark Mitchell <mark@codesourcery.com>
7928
7929 * lex.c (errorcount, sorrycount): Don't declare.
7930 * repo.c (errorcount, sorrycount): Likewise.
7931 * typeck2.c (errorcount, sorrycount): Likewise.
7932
7933 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
7934
7935 * call.c (convert_default_arg, build_over_call): Change all uses of
7936 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
7937 Ensure expr.h is included.
7938 * decl.c (grokparams): Ditto.
7939 * pt.c (tsubst_decl): Ditto.
7940 * typeck.c (convert_arguments): Ditto.
7941
7942 1999-08-02 Jason Merrill <jason@yorick.cygnus.com>
7943
7944 * class.c (mark_overriders): Fix order of args to overrides.
7945 (warn_hidden): Likewise. Fix for having virtual and non-virtual
7946 functions with the same name.
7947
7948 1999-08-02 Richard Henderson <rth@cygnus.com>
7949
7950 * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
7951
7952 1999-08-01 Mark Mitchell <mark@codesourcery.com>
7953
7954 * call.c (build_conditional_expr): Fix typo in comment.
7955
7956 1999-08-01 Bernd Schmidt <bernds@cygnus.co.uk>
7957
7958 * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
7959 case_stack; use in_control_zone_p.
7960 * typeck.c (c_expand_return): Likewise.
7961
7962 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
7963
7964 * except.c (catch_clauses): Delete declaration.
7965
7966 1999-07-30 Mark Mitchell <mark@codesourcery.com>
7967
7968 * call.c (build_conditional_expr): Call convert_from_reference to
7969 avoid reference/non-reference type confusion. Fix typo.
7970
7971 1999-07-30 Richard Henderson <rth@cygnus.com>
7972
7973 * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
7974 * cp-tree.h (initializer_constant_valid_p): Remove.
7975
7976 1999-07-28 Mark Mitchell <mark@codesourcery.com>
7977
7978 * call.c (conditional_conversion): Don't build BASE_CONVs for
7979 conversions between things that have the same type.
7980 (build_conditional_expr): Tweak.
7981 (convert_like): Some BASE_CONVs really do require the generation
7982 of code.
7983
7984 * init.c (perform_member_init): Don't go through build_modify_expr
7985 for simple initializations.
7986
7987 1999-07-27 Jason Merrill <jason@yorick.cygnus.com>
7988
7989 * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
7990 * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
7991 virtual functions and MI. Simplify.
7992
7993 * method.c: Remove prototype for largest_union_member.
7994 * pt.c (determine_specialization): Fix uninitialized warning.
7995 * lex.c (real_yylex): Likewise.
7996
7997 1999-07-27 Mark Mitchell <mark@codesourcery.com>
7998
7999 * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
8000 here too.
8001
8002 * cp-tree.h (BINFO_VIRTUALS): Document new format.
8003 * class.c (modify_one_vtable): Change prototype accordingly.
8004 (modify_all_vtables): Likewise.
8005 (modify_all_direct_vtables): Likewise.
8006 (modify_all_indirect_vtables): Likewise.
8007 (build_vtable_entry_for_fn): New function.
8008 (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
8009 (modify_vtable_entry): Likewise.
8010 (add_virtual_function): Likewise.
8011 (build_vtbl_initializer): New function.
8012 (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
8013 (fixup_vtable_deltas1): Likewise.
8014 (fixup_vtable_deltas): Likewise.
8015 (override_one_vtable): Likewise.
8016 (finish_struct_1): Likewise.
8017
8018 * error.c (dump_expr): Likewise.
8019 * search.c (get_abstract_virtuals_1): Likewise.
8020 (get_abstract_virtuals): Likewise.
8021 (expand_upcast_fixups): Likewise.
8022 * tree.c (debug_binfo): Likewise.
8023 * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
8024 __pure_virtual here.
8025
8026 1999-07-26 Mark Mitchell <mark@codesourcery.com>
8027
8028 * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
8029 as per 1999-07-26 change.
8030
8031 * typeck.c (c_sizeof): Don't allow non-static data members.
8032 (expr_sizeof): Likewise.
8033
8034 1999-07-26 Jason Merrill <jason@yorick.cygnus.com>
8035
8036 * input.c (feed_input): Only touch lineno and input_filename
8037 if !USE_CPPLIB. Save the old values before setting the new ones.
8038
8039 * input.c (feed_input): Add file, line parms.
8040 * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
8041 (real_yylex): Check linemode before input_redirected().
8042
8043 * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
8044 from op new to warning.
8045
8046 1999-07-26 Mark Mitchell <mark@codesourcery.com>
8047
8048 * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
8049 * call.c: All uses changed.
8050 * typeck.c: Likewise.
8051
8052 1999-07-26 Nathan Sidwell <nathan@acm.org>
8053
8054 * exception.cc (__cplus_type_matcher): Match __eh_matcher
8055 prototype.
8056
8057 1999-07-26 Mark Mitchell <mark@codesourcery.com>
8058
8059 * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
8060 (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
8061 (strip_top_quals): Declare.
8062 (ncp_convert): Likewise.
8063 (type_after_usual_arithmetic_converions): Likewise.
8064 (composite_pointer_type): Likewise.
8065 * call.c (strip_top_quals): Don't make it static.
8066 (promoted_arithmetic_type_p): New function.
8067 (conditional_conversion): Likewise.
8068 (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
8069 (standard_conversion): Use same_type_p. Don't build BASE_CONVs
8070 for converting a type to itself.
8071 (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
8072 (implicit_conversion): Make sure the from and to types are
8073 complete.
8074 (add_builtin_candidate): Correct handling of ?: operator.
8075 (add_builtin_candidates): Improve documentation.
8076 (build_conditional_expr): New function.
8077 (can_convert): Implement in terms of can_convert_arg.
8078 (ncp_convert): New function.
8079 * typeck.c (type_after_usual_arithmetic_conversions): New
8080 function, split out from common_type.
8081 (composite_pointer_type): New function, split out from
8082 build_conditional_expr.
8083 (common_type): Use type_after_usual_arithmetic_conversions.
8084 Remove redundant attribute merging.
8085 (comptypes): Tidy. Handle COMPLEX_TYPE.
8086 (build_binary_op_nodefault): Use null_ptr_cst_p.
8087 (build_conditional_expr): Remove.
8088 (convert_for_assignment): Use new conversion functions.
8089
8090 * cp-tree.h (abstract_virtuals_error): Change declaration.
8091 * typeck2.c (abstract_virtuals_error): Check to see if an error
8092 ocurred, and return a boolean value accordingly.
8093 (build_functional_cast): Adjust accordingly.
8094 * class.c (finish_struct_1): Likewise.
8095 * cvt.c (ocp_convert): Likewise.
8096 * decl.c (cp_finish_decl): Likewise.
8097 (grokparams): Likewise.
8098 (grok_op_properties): Likewise.
8099 (start_function): Likewise.
8100 * init.c (build_new_1): Likewise.
8101
8102 * pt.c (unify): Don't get confused by pointers-to-member functions.
8103
8104 * search.c (build_cplus_new): Robustify.
8105
8106 1999-07-24 Richard Henderson <rth@cygnus.com>
8107
8108 * gxx.gperf (__builtin_va_arg): New.
8109 * parse.y (VA_ARG): New token.
8110 (unary_expr): Recognize it.
8111
8112 Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com)
8113
8114 * g++FAQ.texi: Deleted per Joe Buck's request.
8115 * Makefile.in: Corresponding changes.
8116
8117 1999-07-23 Jason Merrill <jason@yorick.cygnus.com>
8118
8119 * lex.c: Sync with C frontend.
8120 (whitespace_cr): New fn.
8121 (skip_white_space): Use it.
8122 (init_parse): Reorder.
8123 (yyprint): Support CONSTANT.
8124 (pragma_getc, pragma_ungetc): Bring back.
8125 (read_line_number): Change in_system_header directly.
8126 (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
8127 (parse_float): Update to C version.
8128 (yylex): Handle '$' under the letter case.
8129 Remove looking_for_typename handling.
8130 Support hex floating point constants.
8131 Follow C's lead for choosing type of integer constants.
8132 Rearrange stuff to match C frontend.
8133 (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
8134 * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
8135
8136 1999-07-23 Mark Mitchell <mark@codesourcery.com>
8137
8138 * call.c (reference_binding): Tweak.
8139 (mayble_handle_implicit_object): Use direct_reference_binding to
8140 create the right implicit conversion sequence.
8141
8142 1999-07-22 Mark Mitchell <mark@codesourcery.com>
8143
8144 * pt.c (convert_nontype_argument): Don't call decl_constant_value
8145 if we're converting to a reference type.
8146
8147 * call.c (NEED_TEMPORARY_P): New macro.
8148 (standard_conversion): Set it, for derived-to-base conversions.
8149 (reference_related_p): New function.
8150 (reference_compatible_p): Likewise.
8151 (convert_class_to_reference): Likewise.
8152 (direct_reference_binding): Likewise.
8153 (reference_binding): Rework for standards-compliance.
8154 (convert_like): Adjust accordingly.
8155 (maybe_handle_ref_bind): Simplify; the right conversion sequences
8156 are now built up in reference_binding.
8157 (initialize_reference): New function.
8158 * cp-tree.h (ICS_USER_FLAG): Document.
8159 (ICS_THIS_FLAG): Likewise.
8160 (ICS_BAD_FLAG): Likewise.
8161 (NEED_TEMPORARY_P): Likewise.
8162 (cp_lvalue_kind): New type.
8163 (real_lvalue_p): Return it.
8164 * error.c (dump_expr): Provide more accurate representation for
8165 AGGR_INIT_EXPRs.
8166 * init.c (expand_default_init): Do not try to perform implicit
8167 conversions for a brace-enclosed initializer.
8168 * search.c (lookup_conversions): Document.
8169 * tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate
8170 appropriately.
8171 (real_lvalue_p): Adjust accordingly.
8172 (lvalue_p): Likewise.
8173 (build_cplus_new): Don't allow the creation of an abstract class.
8174 * typeck.c (convert_for_initialization): Use initialize_reference.
8175
8176 1999-07-21 Gavin Romig-Koch <gavin@cygnus.com>
8177
8178 * lex.c (real_yylex) : Correct the test for overflow when lexing
8179 integer literals.
8180
8181 1999-07-20 Jason Merrill <jason@yorick.cygnus.com>
8182
8183 * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
8184 not DECL_BUILT_IN, to determine if a function is internally declared.
8185 (duplicate_decls): Likewise. Improve handling of builtins.
8186 (push_overloaded_decl): Remove special handling of builtins.
8187
8188 * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
8189
8190 * decl.c (grokdeclarator): Pull out decl_constant_value in
8191 templates, too.
8192
8193 * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
8194 * cp-tree.h, pt.c, semantics.c: Adjust.
8195 * method.c (largest_union_member): Remove.
8196
8197 * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
8198
8199 * lex.c (token_getch, token_put_back): New fns.
8200 (real_yylex): Use them.
8201
8202 * lex.c (lang_init): Generalize.
8203 (lang_init_options): Tell cpplib this is C++.
8204 (nextchar): Remove. Replace uses with put_back.
8205 (skip_white_space): Handle linemode here. Optimize for cpplib.
8206 (extend_token_buffer_to): New fn.
8207 (extend_token_buffer): Use it.
8208 (read_line_number, check_newline): Just deal with tokens.
8209 (real_yylex): More cpplib optimizations. Simplify. Don't produce
8210 EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
8211 * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
8212 * parse.y (PAREN_STAR_PAREN): Remove.
8213 * input.c: Don't use the putback machinery with cpplib.
8214 (sub_getch): Fold back into getch.
8215 (getch): Don't handle linemode here.
8216 (feed_input): Unget any text in the token buffer.
8217
8218 * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
8219 nextyychar, nextyylval): Remove.
8220
8221 1999-07-20 Michael Tiemann <tiemann@holodeck.cygnus.com>
8222 Jason Merrill <jason@yorick.cygnus.com>
8223
8224 * lex.c (indent_level): New variable.
8225 (init_parse): Set cpp_token to CPP_DIRECTIVE.
8226 (consume_string): Make this smart about USE_CPPLIB.
8227 (yyungetc): Use put_back function.
8228 (pragma_getc, pragma_ungetc): Functions deleted.
8229 (check_newline): Rewrite to be intelligent about USE_CPPLIB.
8230 Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
8231 pragma_ungetc.
8232 (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
8233 Also, clean up cases where we redundantly set token_buffer[0].
8234 (read_line_number): New fn.
8235 * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
8236 (end_input): Call cpp_pop_buffer if USE_CPPLIB.
8237 (sub_getch): Conditionalize out code that's not appropriate if
8238 USE_CPPLIB.
8239 (put_back): Rewrite in case USE_CPPLIB is defined.
8240 (input_redirected): Ditto.
8241
8242 Tue Jul 20 11:24:19 1999 Bernd Schmidt <bernds@cygnus.co.uk>
8243
8244 * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
8245 c_global_trees and accessor macros defined in c-common.h.
8246 (cp_tree_index): New enumeration.
8247 (cp_global_trees): Declare new array. Add accessor macros for it, and
8248 delete declarations of tree nodes replaced by it.
8249 (builtin_function): Delete macro, add declaration for new function.
8250 Include c-common.h.
8251 * decl.c: Delete definitions for tree nodes that were replaced by
8252 cp_global_trees and c_global_trees.
8253 (init_decl_processing): Call c_common_nodes_and_builtins; delete code
8254 to generate the common builtins here.
8255 (builtin_function): New function.
8256 * decl2.c (abort_fndecl): Delete declaration.
8257 * except.c (expand_builtin_return_address): Delete declaration.
8258 (builtin_return_address_fndecl): Delete variable.
8259 (const_ptr_type_node): Delete declaration.
8260 * lex.c (cons_up_default_function): Delete declaration of
8261 void_list_node.
8262 * parse.y (void_list_node): Delete declaration.
8263 * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
8264 Delete variables.
8265 (const_string_type_node): Delete declaration.
8266 * search.c (abort_fndecl): Delete declaration.
8267 * Makefile.in: Update dependencies.
8268
8269 1999-07-19 Mark Mitchell <mark@codesourcery.com>
8270
8271 * pt.c (check_default_tmpl_args): Move test for missing default
8272 arguments here, from ...
8273 (end_template_parm_list): Here.
8274
8275 1999-07-18 Mark Mitchell <mark@codesourcery.com>
8276
8277 * decl.c (lookup_nested_type): Remove.
8278 (pushtag): Don't call it.
8279
8280 Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com)
8281
8282 * Makefile.in (INTERFACE): Bump to 2.
8283
8284 1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
8285
8286 * typeck2.c (my_friendly_abort): Updated URL with bug reporting
8287 instructions to gcc.gnu.org. Removed e-mail address.
8288
8289 1999-07-17 Mark Mitchell <mark@codesourcery.com>
8290
8291 * pt.c (determine_specialization): Tighten error-checking.
8292 (end_template_parm_list): Likewise.
8293
8294 1999-07-14 Mark Mitchell <mark@codesourcery.com>
8295
8296 * pt.c (check_default_tmpl_args): Handle friends defined in the
8297 class just like member functions defined in the class.
8298
8299 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
8300 Jason Merrill <jason@yorick.cygnus.com>
8301
8302 * cp-tree.h (struct lang_decl): Added field for storing sorted
8303 FIELD_DECLs (used in TYPE_DECLs).
8304 (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
8305 (DECL_SORTED_FIELDS): New macro.
8306 * class.c (method_name_cmp): New function.
8307 (finish_struct_methods): Modified to support sorting and searching
8308 methods.
8309 (finish_struct_anon): Changed code in inner loop to use ELT rather
8310 than UELT (which required an extra indirection for every reference).
8311 (field_decl_cmp): New function to support sorting FIELD_DECLs.
8312 (finish_struct_1): Sort fields.
8313 * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
8314 (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
8315 Also, switch to using array indexing rather than a changing pointer.
8316 * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
8317 DECL_SORTED_FIELDS.
8318
8319 1999-07-09 Jason Merrill <jason@yorick.cygnus.com>
8320
8321 * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
8322 casts in system headers or extern "C" blocks.
8323
8324 * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
8325 errors to pedwarn.
8326
8327 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
8328
8329 * decl2.c (write_virtuals): Deleted declaration.
8330 * cp-tree.h (write_virtuals): Deleted extern declaration.
8331 * class.c (finish_struct_1): Removed #if 0'd code that mentions
8332 write_virtuals.
8333 * semantics.c (begin_class_definition): Rewrite code to not depend
8334 on write_virtuals.
8335
8336 * lex.c (cp_pragma_interface): New function.
8337 (cp_pragma_implementation): Likewise.
8338 (handle_cp_pragma): Call them.
8339
8340 * typeck.c (comptypes): Simplify C code in look_hard.
8341
8342 * xref.c (PALLOC): Use xcalloc, not calloc.
8343 (SALLOC): Use xmalloc, not malloc.
8344
8345 * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
8346
8347 * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
8348 is NO_DEBUG.
8349
8350 * decl.c (duplicate_decls): If a redeclaration doesn't match the
8351 initial declaration, then don't save the inline info and by all
8352 means don't mark the function as a builtin function.
8353
8354 * decl.c (lookup_name_real): Set NONCLASS to 1 if
8355 CURRENT_CLASS_TYPE is 0.
8356
8357 * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
8358 NULL_TREE.
8359
8360 * ptree.c (print_lang_type): Added vtable-needs-writing.
8361
8362 Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
8363
8364 * decl2.c (mark_vtable_entries): Fix check for rtti offset.
8365
8366 1999-07-06 Gavin Romig-Koch <gavin@cygnus.com>
8367
8368 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
8369 Merged into c-common.
8370
8371 1999-07-05 Dave Brolley <brolley@cygnus.com>
8372
8373 * lex.c (errorcount): Declare it.
8374 (finish_parse): Update errorcount for when using CPPLIB.
8375
8376 1999-07-05 Mark Mitchell <mark@codesourcery.com>
8377
8378 * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
8379 parameters.
8380 (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
8381 * decl.c (push_class_binding): Use it.
8382 (lookup_name_real): Likewise.
8383
8384 1999-07-02 Gavin Romig-Koch <gavin@cygnus.com>
8385
8386 * cp-tree.h (widest_integer_literal_type_node,
8387 widest_unsigned_literal_type) : New.
8388 * decl.c (widest_integer_literal_type_node,
8389 widest_unsigned_literal_type) : New.
8390 (init_decl_processing): Handle/use the two new types.
8391 * lex.c (real_yylex): Same.
8392 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
8393 Same.
8394
8395 1999-07-01 Mark Mitchell <mark@codesourcery.com>
8396
8397 * decl.c (grokdeclarator): Don't give names "for linkage purposes"
8398 to anonymous cv-qualified types.
8399
8400 1999-07-01 Gavin Romig-Koch <gavin@cygnus.com>
8401
8402 * lex.c (real_yylex) : Change integer literal overflow handling to
8403 be like c-lex.c.
8404
8405 * lex.c (real_yylex): Improve 'integer constant out of range' messages.
8406
8407 1999-06-28 Richard Henderson <rth@cygnus.com>
8408
8409 * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
8410
8411 1999-06-28 Jason Merrill <jason@yorick.cygnus.com>
8412
8413 * error.c (dump_type_real): Handle TREE_LIST again.
8414
8415 * typeck.c (comp_target_parms): Don't complain about
8416 converting from () to (...) if !flag_strict_prototype.
8417
8418 * decl.c (grokdeclarator): Update the names of all variants when
8419 de-anonymizing.
8420
8421 1999-06-21 Mark Mitchell <mark@codesourcery.com>
8422
8423 * init.c (expand_aggr_vbase_init): Rename to
8424 construct_virtual_bases. Conditionalize construction here,
8425 rather than ...
8426 (emit_base_init): Here.
8427
8428 1999-06-19 Mark Mitchell <mark@codesourcery.com>
8429
8430 * semantics.c (finish_asm_stmt): Apply decay conversions to
8431 input operands.
8432
8433 * decl.c (expand_static_init): When building an anonymous function
8434 for use with atexit, compute its body before and after entering
8435 the function.
8436
8437 * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
8438 EXIT_EXPR.
8439
8440 1999-06-18 Mark Mitchell <mark@codesourcery.com>
8441
8442 * init.c (expand_aggr_vbase_init): Add flag parameter.
8443 (build_partial_cleanup_for): Remove, inlining into ..
8444 (expand_cleanup_for_base): ... here. Take flag parameter.
8445 (emit_base_init): Pass the in_chrg parameter to
8446 emit_aggr_vbase_init.
8447 (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
8448
8449 1999-06-16 Mark Mitchell <mark@codesourcery.com>
8450
8451 * decl2.c (import_export_decl): Use same_type_p, rather than
8452 relying on pointer-equality for types.
8453
8454 * method.c (do_build_copy_constructor): Simplify.
8455
8456 * call.c (build_method_call): Remove bogus code for two-argument
8457 delete.
8458 * init.c (build_new_1): Expand on comment, and remove dead code.
8459
8460 * init.c (expand_cleanup_for_base): New function, split out
8461 from ...
8462 (emit_base_init): Here.
8463 (expand_aggr_vbase_init): Use it.
8464
8465 1999-06-15 Mark Mitchell <mark@codesourcery.com>
8466
8467 * cp-tree.h (class_cache_firstobj): Declare.
8468 (maybe_push_cache_obstack): Rename to push_cache_obstack.
8469 * class.c (permanent_obstack): Remove declaration.
8470 (class_cache_firstobj): Make it global.
8471 (add_method): Don't use permanent_obstack directly.
8472 (pushclass): Only free the class_cache_obstack if we know how far
8473 back to free it.
8474 (maybe_push_cache_obstack): Rename to push_cache_obstack.
8475 * decl.c: Remove dead comment.
8476 (saved_scope): Add class_cache_firstobj.
8477 (push_to_top_level): Save it.
8478 (pop_from_top_level): Restore it.
8479 (push_class_level_binding): Use push_cache_obstack, not
8480 maybe_push_cache_obstack.
8481 * search.c (push_class_decls): Likewise.
8482
8483 1999-06-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
8484
8485 * pt.c (tsubst_friend_function): Push into namespace of friend
8486 function before pushdecl'ing it.
8487
8488 1999-06-14 Nathan Sidwell <nathan@acm.org>
8489
8490 * call.c (build_new_op): Remove REF_BIND from all operands.
8491
8492 1999-06-13 Alexandre Oliva <oliva@dcc.unicamp.br>
8493
8494 * init.c (build_new_1): Look up operator delete even if there was
8495 no explicit new placement.
8496
8497 1999-06-08 Nathan Sidwell <nathan@acm.org>
8498
8499 * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
8500 of ...
8501 (build_throw): ... here. Call it.
8502 (process_start_catch_block): Call it.
8503
8504 1999-06-07 Mark Mitchell <mark@codesourcery.com>
8505
8506 * search.c (convert_pointer_to_single_level): Reimplement without
8507 using get_binfo.
8508
8509 1999-06-06 Mark Mitchell <mark@codesourcery.com>
8510
8511 * method.c (is_back_referenceable_type): Back-reference bools when
8512 not squangling.
8513
8514 1999-06-07 Dave Brolley <brolley@cygnus.com>
8515
8516 * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
8517 * input.c (putback_buffer): New structure type.
8518 (putback): Replaces putback_char member.
8519 (putback): Replaces putback_char static variable.
8520 (feed_input): Use putback.
8521 (end_input): Use putback.
8522 (sub_getch): Use putback.
8523 (put_back): Use putback.
8524
8525 1999-06-05 Mark Mitchell <mark@codesourcery.com>
8526
8527 * decl.c (grokdeclarator): Fix typo in last change.
8528
8529 1999-06-04 Jason Merrill <jason@yorick.cygnus.com>
8530
8531 * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
8532 (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
8533
8534 1999-06-04 Nathan Sidwell <nathan@acm.org>
8535
8536 * except.c (build_throw): Check throw expression validity.
8537
8538 1999-06-03 Mark Mitchell <mark@codesourcery.com>
8539
8540 * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
8541 just because flag_signed_bitfields is false.
8542
8543 1999-06-03 Nathan Sidwell <nathan@acm.org>
8544
8545 * semantics.c (begin_class_definition): Update the struct's
8546 location here ...
8547 * class.c (finish_struct): ... rather than here.
8548
8549 * decl.c (make_typename_type): Don't rely on uninitialized
8550 variable.
8551
8552 1999-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8553
8554 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
8555
8556 1999-05-31 Mark Mitchell <mark@codesourcery.com>
8557
8558 * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
8559 and friends rather than messing with current_obstack directly.
8560 (cp_build_qualified_type_real): Rework ARRAY_TYPE
8561 allocation to match practice throughout the rest of the
8562 compiler.
8563
8564 1999-05-30 Mark Mitchell <mark@codesourcery.com>
8565
8566 * lex.c (make_lang_type): Create TYPE_BINFO for
8567 TEMPLATE_TYPE_PARMs just like for non-template types.
8568
8569 * decl.c (start_decl): Move checks on initialization to ...
8570 (cp_finish_decl): Here. Tidy formatting slightly.
8571
8572 1999-05-28 Mark Mitchell <mark@codesourcery.com>
8573
8574 * decl.c (add_binding): Don't complain about a redeclaration of a
8575 semantically identical typedef in a local scope.
8576
8577 1999-05-28 Nathan Sidwell <nathan@acm.org>
8578
8579 * decl.c (complete_array_type): Allocate off same obstack. Fix
8580 DO_DEFAULT comment to match reality.
8581
8582 * friend.c (make_friend_class): Fix diagnostic typo.
8583
8584 1999-05-28 Mark Mitchell <mark@codesourcery.com>
8585
8586 * decl.c (lookup_namespace_name): Handle getting a
8587 TEMPLATE_ID_EXPR.
8588 (expand_static_init): Don't call pushdecl for implicitly declared
8589 `atexit' used to register destructors.
8590
8591 1999-05-25 Mark Mitchell <mark@codesourcery.com>
8592
8593 * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
8594 intialize a vtable.
8595
8596 * cp-tree.h (NAMESPACE_LEVEL): Reformat.
8597 (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes
8598 by combining TEMPLATE_INFO and LEVEL into a single union.
8599 (DECL_TEMPLATE_INFO): Reformat.
8600 (DECL_SAVED_TREE): Document.
8601 (DECL_TEMPLATE_INJECT): Remove.
8602 * class.c (finish_struct): Remove code to deal with
8603 DECL_TEMPLATE_INJECT.
8604
8605 * decl.c (maybe_process_template_type_declaration): Handle all new
8606 types in templates uniformly.
8607 * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
8608 DECL_CONTEXT.
8609 * pt.c (lookup_template_class): Inject template instantiations of
8610 forward-declarations.
8611 (instantiate_class_template): Remove code processing
8612 DECL_TEMPLATE_INJECT.
8613
8614 * pt.c (lookup_template_class): Tweak lookup to find member
8615 templates.
8616
8617 * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
8618 ASM_CV_QUAL.
8619 * semantics.c (finish_asm_stmt): Make strings permanent if they're
8620 used in a template.
8621
8622 1999-05-25 Jason Merrill <jason@yorick.cygnus.com>
8623
8624 * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
8625 parts of pointer to data member types.
8626
8627 1999-05-24 Mark Mitchell <mark@codesourcery.com>
8628
8629 * decl2.c (mark_vtable_entries): Don't make a copy of a function,
8630 and then make it look like `abort'. Just use `abort' instead.
8631
8632 * typeck.c (build_static_cast): Don't allow static_casts that cast
8633 away constness.
8634 (casts_away_constness_r): New function.
8635 (casts_away_constness): Likewise.
8636
8637 * decl.c (lookup_tag): Remove code no longer needed after
8638 name-lookup improvements.
8639 * decl2.c (handle_class_head): Make error-recovery more robust.
8640 * friend.c (make_friend_class): Reject templated typename types.
8641 * lex.c (is_global): A template parameter isn't global.
8642 * parse.y (class_head): Robustify.
8643 * parse.c: Regenerated.
8644
8645 1999-05-22 Mark Mitchell <mark@codesourcery.com>
8646
8647 * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
8648 INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs.
8649
8650 * cp-tree.h (push_nested_namespace): Declare.
8651 (pop_nested_namespace): Likewise.
8652 * decl.c (push_nested_namespace): New function.
8653 (pop_nested_namespace): Likewise.
8654 * pt.c (instantiate_class_template): Use them.
8655
8656 * tree.c (mapcar): Handle NON_LVALUE_EXPR.
8657
8658 * cp-tree.h (cplus_expand_constant): Declare.
8659 * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
8660 converted from one pointer-to-object type to another.
8661 * expr.c (cplus_expand_constant): Don't make it static.
8662 * typeck.c (build_component_ref): Don't crash when presented with
8663 a component which is a TEMPLATE_DECL.
8664 (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a
8665 cast from a pointer-to-member constant to its own type does not
8666 result in a valid non-type template argument.
8667
8668 1999-05-21 Mark Mitchell <mark@codesourcery.com>
8669 Nathan Sidwell <nathan@acm.org>
8670
8671 * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
8672 * cp-tree.h: Fix typo in documentation on pointers-to-members.
8673 (cp_build_qualified_type): Make it a macro.
8674 (cp_build_qualified_type_real): Declare.
8675 * decl.c (grokdeclarator): Remove misleading comment. Avoid
8676 problem with template parameters and restrict-qualification.
8677 * gxx.gperf: Replace NORID with RID_UNUSED throughout.
8678 * hash.h: Regenerated.
8679 * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
8680 the enumeration.
8681 (NORID): Remove definition.
8682 * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
8683 (tsubst): Likewise. Remove special handling for FUNCTION_TYPEs.
8684 (fn_type_unification): Check that the function type resulting from
8685 the deduction is legal.
8686 (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
8687 (unify): Use cp_build_qualified_type_real.
8688 * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
8689 (cp_build_qualified_type): Rename to ...
8690 (cp_build_qualified_type_real): Add additional COMPLAIN parameter
8691 and modify appropriately.
8692
8693 * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
8694 reveal optimization opportunities.
8695
8696 * pt.c (tsubst): Don't issue error messages when we're not
8697 complaining, even if we see a qualified function type.
8698 (check_cv_quals_for_unify): Don't allow a qualified function
8699 type.
8700
8701 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
8702
8703 * class.c (instantiate_type): Downgrade errors for object-dependent
8704 memfn refs to pedwarn.
8705
8706 1999-05-20 Mark Mitchell <mark@codesourcery.com>
8707
8708 * decl.c (grokdeclarator): Don't treat [] as indicating a
8709 zero-sized array in a typedef.
8710
8711 * call.c (build_object_call): Don't look at DECL_NAME for a type.
8712 (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
8713 (typeck.c): Or TYPE_MAIN_VARIANT for a type.
8714
8715 * pt.c (for_each_template_parm): Rework to match documentation.
8716 Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
8717
8718 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
8719
8720 * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
8721
8722 * class.c (finish_base_struct): Allow non-COM bases for COM classes
8723 except at the leftmost position.
8724 (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
8725 Pass the binfo's class, not the most derived, to skip_rtti_stuff.
8726 * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
8727
8728 * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
8729 (build_cplus_new): Make sure that what we return is of the right type.
8730
8731 1999-05-20 Mark Mitchell <mark@codesourcery.com>
8732
8733 * cp-tree.h (make_ptrmem_cst): New function.
8734 * expr.c (cplus_expand_constant): Split out from ...
8735 (cplus_expand_expr): Here. Use cplus_expand_constant.
8736 (init_cplus_expand): Set lang_expand_constant.
8737 * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
8738
8739 * tree.c (make_ptrmem_cst): Define.
8740 * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
8741 * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
8742
8743 1999-05-19 Mark Mitchell <mark@codesourcery.com>
8744
8745 * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
8746
8747 * decl2.c (start_static_storage_duration_function): Fix comment.
8748 (finish_file): Create static storage duration functions lazily.
8749
8750 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
8751
8752 Implement anonymous structs.
8753 * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
8754 * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
8755 * class.c (finish_struct_1): Remove redundant check for anon struct.
8756 * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
8757 (check_tag_decl): Check for anonymous struct here.
8758 * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
8759 * init.c (sort_member_init, emit_base_init): Handle getting fields
8760 as well as names in current_member_init_list.
8761 (perform_member_init): Handle getting an anon aggr.
8762 * method.c (do_build_assign_ref): Don't descend into anon aggrs.
8763 (do_build_copy_constructor): Likewise.
8764
8765 1999-05-19 Mark Mitchell <mark@codesourcery.com>
8766
8767 * tree.c (cp_build_qualified_type): Don't allow qualified function
8768 types.
8769
8770 Wed May 19 02:50:53 1999 Arvind Sankar <arvinds@mit.edu>
8771
8772 * gxxint.texi: Fix typo.
8773
8774 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
8775
8776 * call.c (find_scoped_type, resolve_scope_to_name): Lose.
8777 * class.c (finish_struct_1): Use CLASS_TYPE_P.
8778 * ptree.c (print_lang_type): Likewise.
8779 * typeck.c (build_modify_expr, c_expand_asm_operands): Use
8780 IS_AGGR_TYPE_CODE.
8781 * typeck2.c (digest_init): Likewise.
8782
8783 1999-05-18 Jason Merrill <jason@yorick.cygnus.com>
8784
8785 * call.c (joust): Compare the types of the conv ops, not the
8786 target types of the conversions.
8787
8788 Tue May 18 00:21:34 1999 Zack Weinberg <zack@rabi.phys.columbia.edu>
8789
8790 * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
8791 was not given.
8792
8793 1999-05-17 Mark Mitchell <mark@codesourcery.com>
8794
8795 * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
8796 * decl.c (grokfndecl): Don't allow inline declarations of friend
8797 template specializations, or friend template specializations with
8798 default arguments.
8799 * pt.c (tsubst): Handle substitution into array types that does
8800 not yield a fixed upper bound, even when not processing a
8801 template.
8802 (tsubst_copy): Deal with the fact that the second operand to a
8803 TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
8804 * search.c (marked_pushdecls_p): Don't descend into
8805 TEMPLATE_TYPE_PARMs and the like.
8806 (unmarked_pushdecls_p): Likewise.
8807
8808 * call.c (build_over_call): Don't throw away
8809 initializations/copies of empty classes; use MODIFY_EXPR and
8810 INIT_EXPR as for non-empty classes.
8811 * class.c (finish_struct_1): Put the padding byte for an empty
8812 class on the TYPE_NONCOPIED_PARTS list for the class.
8813
8814 1999-05-16 Mark Mitchell <mark@codesourcery.com>
8815
8816 * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
8817 indicate a reference to a field that is a qualified name.
8818
8819 1999-05-16 Jason Merrill <jason@yorick.cygnus.com>
8820
8821 * decl2.c (finish_objects): Don't use .?tors.* if we don't have
8822 ASM_OUTPUT_CONSTRUCTOR.
8823
8824 * friend.c (do_friend): Add attrlist arg. Remove support for
8825 getting a non-decl as 'decl'.
8826 * decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or
8827 rtl.
8828 (grokdeclarator): Adjust.
8829 * cp-tree.h: Adjust.
8830
8831 1999-05-16 Mark Mitchell <mark@codesourcery.com>
8832
8833 * cp-tree.h (permanent_p): New function.
8834 * init.c (build_new_1): Use mapcar, not copy_node, to copy a
8835 possibly complex tree node.
8836 * tree.c (mapcar): Adjust comments, and follow coding standards in
8837 conditional.
8838 (permanent_p): New function.
8839
8840 1999-05-13 Per Bothner <bothner@cygnus.com>
8841
8842 * class.c (push_lang_context): Turn off DECL_IGNORED_P for
8843 primitive Java types, if we actually see `extern "Java"'.
8844
8845 1999-05-10 18:21 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
8846
8847 * lang-specs.h: Pass -$ to the preprocessor.
8848
8849 1999-05-10 Jason Merrill <jason@yorick.cygnus.com>
8850
8851 * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
8852 Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
8853 (resolve_offset_ref): Don't handle a raw baselink.
8854 * cvt.c (build_expr_type_conversion): Likewise.
8855 * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
8856 convert_for_initialization): Likewise.
8857 * class.c (instantiate_type): Handle seeing a baselink under an
8858 OFFSET_REF.
8859 * error.c (dump_expr): Likewise.
8860 * pt.c (for_each_template_parm): Likewise.
8861 (resolve_overloaded_unification): Likewise.
8862 * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
8863 * typeck.c (expr_sizeof): Also complain about other permutations
8864 of overloaded functions.
8865
8866 1999-05-07 Jason Merrill <jason@yorick.cygnus.com>
8867
8868 * init.c (resolve_offset_ref): Don't return a raw method.
8869 Use BASELINK_P.
8870 * typeck.c (decay_conversion): Don't handle a raw method.
8871 Resolve all OFFSET_REFs.
8872 (get_member_function_from_ptrfunc): 0 is a valid vtable index.
8873 (build_binary_op_nodefault): Handle resolving overloaded fns. Use
8874 same_type_p for pmf bits. Don't use build_binary_op to compare
8875 raw pointers to methods.
8876 (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
8877 to decide when to call resolve_offset_ref.
8878 (build_c_cast, convert_for_initialization): Likewise.
8879 * cvt.c (build_expr_type_conversion): Likewise.
8880
8881 1999-05-06 Nathan Sidwell <nathan@acm.org>
8882
8883 * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
8884
8885 1999-05-05 Mark Mitchell <mark@codesourcery.com>
8886
8887 * decl2.c (start_objects): Don't let static constructors and
8888 destructors get inlined.
8889
8890 * parse.y (nested_name_specifier): Make sure ordinary types are
8891 complete, just like template types.
8892 * parse.c: Regenerated.
8893
8894 * pt.c (check_explicit_specialization): Improve error messages.
8895
8896 1999-05-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
8897
8898 * typeck.c (string_conv_p): Use same_type_p to check whether we
8899 try to convert between char and wchar_t.
8900
8901 1999-05-03 Mark Mitchell <mark@codesourcery.com>
8902
8903 * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
8904 lookup to error_mark_node here.
8905 (lookup_member): Revise documentation. Add comments. Don't set
8906 the TREE_TYPE to error_mark_node here, and don't build up an extra
8907 TREE_LIST for ambiguous lookups.
8908 (setup_class_bindings): Adjust accordingly.
8909 (push_class_decls): Revise out-of-date comments.
8910
8911 * typeck.c (build_const_cast): Tighten checks for legality.
8912
8913 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
8914
8915 * init.c (build_member_call): Lookup names coming from
8916 namespace-scoped LOOKUP_EXPR.
8917
8918 1999-05-03 Jim Blandy <jimb@zwingli.cygnus.com>
8919
8920 * gxxint.texi: Add documentation for 'I'.
8921
8922 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
8923
8924 * tinfo.cc (operator==): Qualify type_info with std::.
8925
8926 1999-05-02 Mark Mitchell <mark@codesourcery.com>
8927
8928 * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy.
8929 (DECL_COMDAT): Remove definition.
8930
8931 1999-05-01 Mark Mitchell <mark@codesourcery.com>
8932
8933 * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
8934 change.
8935
8936 1999-04-30 Mark Mitchell <mark@codesourcery.com>
8937
8938 * class.c (build_vtable): Use build_lang_decl when building
8939 vtables, not just build_decl.
8940 (prepare_fresh_vtable): Likewise.
8941 * decl.c (wrapup_globals_for_namespace): Mark vtables as
8942 DECL_EXTERNAL when calling wrapup_global_declarations.
8943 * decl2.c (priority_info_s): Add initializations_p and
8944 destructions_p members.
8945 (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
8946 when deciding what vtables to write out.
8947 (ssdf_decls): New variable.
8948 (ssdf_decls_used): Likewise.
8949 (start_static_storage_duration_function): Deal with being called
8950 multiple times. Avoid inlining this function.
8951 (generate_inits_for_priority): Deal with reuse of priority map.
8952 (get_priority_info): Clear initializations_p and destructions_p.
8953 (do_static_initialization): Tweak comment.
8954 (do_static_destruction): Likewise. Fix condition on sentries for
8955 destruction.
8956 (generate_ctor_or_dtor_function): Call all of the static storage
8957 duration functions.
8958 (generate_ctor_or_dtor_function_for_priority): Check
8959 initializations_p and destructions_p to see what priorities need
8960 initialization functions.
8961 (finish_file): Rework to generate multiple static storage duration
8962 functions, rather than just one.
8963
8964 * typeck.c (build_const_cast): Tweak last change to handle
8965 templates correctly.
8966
8967 * typeck.c (build_const_cast): Disallow use of const_cast to
8968 anything but a pointer or reference type.
8969
8970 1999-04-30 Nathan Sidwell <nathan@acm.org>
8971
8972 * decl.c (cp_finish_decl): Don't permit arrays of abstract or
8973 signature type.
8974
8975 1999-04-29 Mark Mitchell <mark@codesourcery.com>
8976
8977 * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
8978 (finish_file): Indent comments properly.
8979
8980 1999-04-29 Richard Henderson <rth@cygnus.com>
8981
8982 * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
8983 (do_static_destruction): Likewise.
8984
8985 1999-04-29 Nathan Sidwell <nathan@acm.org>
8986
8987 * cp-tree.h (TYPE_NOTHROW_P): New macro.
8988 * decl2.c (delete_sanity): Warn on deleting void *.
8989 * init.c (build_new_1): Use TYPE_NOTHROW_P.
8990 * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
8991 throwing operator new.
8992
8993 1999-04-28 Nathan Sidwell <nathan@acm.org>
8994
8995 * cp-tree.h (build_component_addr): Remove prototype.
8996 * typeck.c (build_component_addr): Make static. Remove MSG
8997 argument.
8998 (build_component_addr): Remove MSG parameter, clean up
8999 comment.
9000 (build_x_function_call): Use cp_error.
9001 (build_unary_op): Adjust call of build_component_addr.
9002
9003 1999-04-28 Mark Mitchell <mark@codesourcery.com>
9004
9005 * pt.c (tsubst_friend_class): Check for NULL.
9006
9007 Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
9008
9009 * search.c (binfo_for_vtable): Initialize bfvi.var.
9010
9011 1999-04-27 Nathan Sidwell <nathan@acm.org>
9012
9013 * rtti.c (build_x_typeid): Check rtti is enabled.
9014
9015 1999-04-26 Mark Mitchell <mark@codesourcery.com>
9016
9017 * search.c (is_subobject_of_p): Make sure we're looking at the
9018 right baseclasses.
9019
9020 1999-04-26 Marc Espie <espie@cvs.openbsd.org>
9021
9022 * Make-lang.in (cplib2.ready): Don't depend on phony targets.
9023
9024 1999-04-23 Mark Mitchell <mark@codesourcery.com>
9025
9026 * decl2.c (finish_file): Tweak handling of extern inlines so that
9027 they are not unnecessarily put out.
9028
9029 * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
9030 such as base classes.
9031
9032 1999-04-22 Brendan Kehoe <brendan@cygnus.com>
9033
9034 * tree.c (build_exception_variant): Fix typo: use the chain of U,
9035 not trying V, while cycling through U.
9036
9037 1999-04-22 Mark Mitchell <mark@codesourcery.com>
9038
9039 * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
9040 preserves_first_arg. Enlarge dummy accordingly.
9041 (DECL_TINFO_FN_P): New macro.
9042 (SET_DECL_TINFO_FN_P): Likeiwse.
9043 (DECL_RETURNS_FIRST_ARG): Remove.
9044 (DECL_PRESERVES_THIS): Likewise.
9045 (DECL_INIT_PRIORITY): New macro.
9046 (finish_struct_1): Change prototype.
9047 (cat_namespace_levels): Remove prototype.
9048 (vtable_decl_p): New prototype.
9049 (vtype_decl_p): Likewise.
9050 (sigtable_decl_p): Likewise.
9051 (walk_globals_pred): New typedef.
9052 (walk_globals_fn): Likewise.
9053 (walk_globals): New prototype.
9054 (walk_namespaces_fn): New typedef.
9055 (walk_namespaces): New prototype.
9056 (wrapup_globals_for_namespace): Likewise.
9057 (walk_vtables): Remove prototype.
9058 (walk_sigtables): Likewise.
9059 (instantiate_pending_templates): New prototype.
9060 * class.c (finish_struct_1): Don't return a value.
9061 * decl.h (pending_statics): Remove declaration.
9062 * decl.c (walk_namespaces_r): New function.
9063 (walk_globals_r): Likewise.
9064 (vtable_decl_p): Likewise.
9065 (vtype_decl_p): Likewise.
9066 (sigtable_decl_p): Likewise.
9067 (walk_namespaces): Likewise.
9068 (walk_globals_data): New type.
9069 (walk_globals): New function.
9070 (wrapup_globals_for_namespace): Likewise.
9071 (expand_static_init): Remove assertion. Remove redundancy in
9072 conditional. Don't put static data members in static_aggregates
9073 Tidy.
9074 (finish_function): Remove redundancy in conditional. Don't set
9075 DECL_RETURNS_FIRST_ARG.
9076 (cat_namespace_levels): Remove.
9077 * decl2.c: Include splay-tree.h and varray.h.
9078 (priority_info_s): New structure.
9079 (finish_vtable_vardecl): Change prototype. Adjust for new calling
9080 conventions.
9081 (prune_vtable_vardecl): Likewise.
9082 (finish_sigtable_vardecl): Likewise.
9083 (setup_initp): Remove.
9084 (do_dtors): Remove.
9085 (do_ctors): Remove.
9086 (start_static_storage_duration_function): New function.
9087 (generate_inits_for_priority): Likewise.
9088 (finish_static_storage_duration_function): Likewise.
9089 (get_priority_info): Likewise.
9090 (do_static_initialization): Likewise.
9091 (do_static_destruction): Likewise.
9092 (do_static_initialization_and_destruction): Likewise.
9093 (generate_ctor_or_dtor_function): Likewise.
9094 (generate_ctor_and_dtor_functions_for_priority): Likewise.
9095 (pending_statics): Make it a varray.
9096 (pending_statics_used): New variable.
9097 (saved_inlines): Make it a varray.
9098 (saved_inlines_used): New variable.
9099 (finish_static_data_member): Change method of updating
9100 pending_statics.
9101 (mark_inline_for_output): Remove #if 0'd code. Change method of
9102 updating saved_inlines.
9103 (walk_vtables): Remove.
9104 (walk_sigtables): Likewise.
9105 (import_export_decl): Use DECL_TINFO_FN_P.
9106 (pending_templates): Remove declaration.
9107 (maybe_templates): Likewise.
9108 (static_aggregates_initp): Likewise.
9109 (setup_initp): Likewise.
9110 (finish_objects): Simplify.
9111 (INITIALIZE_P_IDENTIFIER): New macro.
9112 (PRIORITY_IDENTIFIER): New macro.
9113 (SSDF_IDENTIFIER): New macro.
9114 (initialize_p_decl): New variable.
9115 (priority_decl): Likewise.
9116 (ssdf_decl): Likewise.
9117 (priority_info_map): Likewise.
9118 (finish_file): Recode output of static intializers and other
9119 file-scope finalization tasks.
9120 * error.c (OB_END_TEMPLATE_ID): New macro.
9121 (dump_type_real): Use it.
9122 (dump_decl): Likewise.
9123 (dump_function_name): Likewise.
9124 * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
9125 interface.
9126 (check_newline): Use walk_globals, not walk_vtables.
9127 * pt.c (pending_tempalte_expansions): Remove.
9128 (set_vardecl_interface_info): Likewise.
9129 (pending_templates): Make static.
9130 (maybe_templates): Likewise.
9131 (instantiate_class_template): Adjust call to finish_struct_1.
9132 (instantiate_pending_templates): New function.
9133 * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
9134 * tree.c (static_aggregates_initp): Remove.
9135 (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
9136 instead.
9137 * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
9138
9139 * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
9140 with the RTL code RETURN.
9141 * hash.h: Regenerated.
9142 * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
9143 * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
9144 * parse.c: Regenerated.
9145 * pt.c: Include varray.h. Include rtl.h since varray.h requires
9146 it.
9147 (inline_parm_levels): New variable.
9148 (inline_parm_levels_used): Likewise.
9149 (maybe_begin_member_template_processing): Update them.
9150 (maybe_end_member_template_processing): Use them, rather than
9151 guessing how many levels to pop.
9152
9153 * decl.c (make_typename_type): Tighten error-checking.
9154
9155 1999-04-20 Mark Mitchell <mark@codesourcery.com>
9156
9157 * cp-tree.h (build_binary_op): Remove unneeded parameter.
9158 * class.c (build_vrable_entry_ref): Adjust call to
9159 build_binary_op.
9160 * decl.c (expand_static_init): Likewise.
9161 (grokdeclarator): Likewise.
9162 (finish_function): Likewise.
9163 * decl2.c (delete_sanity): Likewise.
9164 (do_dtors): Likewise.
9165 (do_ctors): Likewise.
9166 * error.c (dump_type_suffix): Likewise.
9167 * expr.c (cplus_expand_expr): Likewise.
9168 * init.c (resolve_offset_ref): Likewise.
9169 (build_new): Likewise.
9170 (build_new_1): Likewise.
9171 (build_vec_delete_1): Likewise.
9172 (expand_vec_init_catch_clause): Likewise.
9173 (build_delete): Likewise.
9174 * pt.c (tsubst): Likewise.
9175 * rtti.c (synthesize_tinfo_fn): Likewise.
9176 * search.c (expand_upcast_fixups): Likewise.
9177 (expand_direct_vtbls_init): Likewise.
9178 * typeck.c (get_member_function_from_ptrfunc): Likewise.
9179 (build_binary_op_nodefault): Likewise.
9180 (point_int_sum): Likewise.
9181 (pointer_diff): Likewise.
9182 (build_unary_op): Likewise.
9183 (build_modify_expr): Likewise.
9184 (get_delta_difference): Likewise.
9185 (build_ptrmemfunc): Likewise.
9186 (expand_ptrmemfunc_cst): Likewise.
9187
9188 1999-04-20 Jason Merrill <jason@yorick.cygnus.com>
9189
9190 * decl.c (grokfndecl): Always call cplus_decl_attributes.
9191 * decl2.c (grokfield): Pass attrlist to grokdeclarator.
9192
9193 1999-04-19 Mark Mitchell <mark@codesourcery.com>
9194
9195 * cp-tree.h (finish_static_data_member_decl): New function.
9196 * decl2.c (finish_static_data_member_decl): Split out from ...
9197 (grokfield): Here.
9198 * pt.c (instantiate_class_template): Use it here instead of
9199 trying to fake it.
9200 (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
9201 finish_static_data_member_decl will do that. Explicit set
9202 DECL_EXTERNAL to match non-template processing.
9203
9204 1999-04-18 Mark Mitchell <mark@codesourcery.com>
9205
9206 * cp-tree.h (finish_class_definition): Add parameter.
9207 * parse.y (structsp): Use it. Don't call pop_scope here.
9208 * parse.c: Regenerated.
9209 * semantics.c (finish_class_definition): Pop it here.
9210
9211 1999-04-17 Mark Mitchell <mark@codesourcery.com>
9212
9213 * decl.c (xref_tag): Revise handling of nested template
9214 declarations.
9215 * pt.c (check_explicit_specialization): Tweak handling of friend
9216 templates in template classes.
9217 (tsubst_friend_class): Handle friend declarations for nested
9218 member template classes.
9219
9220 1999-04-16 Mark Mitchell <mark@codesourcery.com>
9221
9222 * class.c (finish_struct): Remove unused variable.
9223 (pushclass): Likewise.
9224 (invalidate_class_lookup_cache): Likewise.
9225 * cp-tree.def (TYPENAME_TYPE): Improve documentation.
9226 * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
9227 doesn't get obliterated.
9228 (make_typename_type): Handle template classes correctly.
9229
9230 * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
9231 (storetags): Declare.
9232 * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
9233 (pushclass): Likewise. Use storetags to install tag declarations,
9234 not pushtag.
9235 (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
9236 * decl.c (storetags): Make it global.
9237 (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
9238 implicit typename declaration.
9239 (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG.
9240 * method.c (hack_identifier): Likewise.
9241 * search.c (lookup_member): Likewise.
9242
9243 * decl.c (warn_about_implicit_typename_lookup): New function.
9244 (lookup_name_real): Use it. Rework handling of implicit typename
9245 extension.
9246
9247 1999-04-15 Mark Mitchell <mark@codesourcery.com>
9248
9249 * cp-tree.h (lookup_nested_field): Remove.
9250 * class.c (push_nested_class): Handle UNION_TYPEs.
9251 (pop_nested_class): Likewise.
9252 * decl.c (lookup_name_real): Don't call lookup_nested_field.
9253 (start_decl): Use push_nested_class, not just pushclass.
9254 (cp_finish_decl): Use pop_nested_class, not just popclass.
9255 * search.c (lookup_nested_field): Remove.
9256
9257 * cp-tree.h (lang_type): Add documentation.
9258 * decl2.c (handle_class_head): Create template declarations here,
9259 as appropriate.
9260 * parse.y (class_head): Return whether or not we entered a new
9261 scope, as well as the type named.
9262 (named_class_head): Likewise.
9263 (named_complex_class_head_sans_basetype): Likewise.
9264 (structsp): Adjust accordingly. Pop scope when required.
9265 * parse.c: Regenerated.
9266 * pt.c (check_default_tmpl_args): Robustify.
9267 (redeclare_class_template): Likewise.
9268 (instantiate_class_template): An instantiation of an
9269 anonymous union is itself an anonymous union.
9270 * semantics.c (begin_class_definition): Don't create template
9271 declarations here.
9272
9273 1999-04-15 Jason Merrill <jason@yorick.cygnus.com>
9274
9275 * parse.y (after_type_declarator_intern): New nonterminal.
9276 (after_type_declarator): Use it.
9277 (direct_after_type_declarator): Likewise. Move above
9278 nonnested_type to fix reduce/reduce conflict resolution.
9279 (declmods): Reducing from just 'attributes' has EMPTY precedence.
9280 * Makefile.in (CONFLICTS): Update.
9281
9282 * decl.c (define_label): Downgrade error for jumping over a
9283 non-POD decl to pedwarn.
9284
9285 1999-04-14 Mark Mitchell <mark@codesourcery.com>
9286
9287 * cp-tree.h (popclass): Change declaration.
9288 (pop_nested_class): Likewise.
9289 (poplevel_class): Remove declaration.
9290 * call.c (convert_default_argument): Pass no arguments to
9291 popclass.
9292 * class.c (finish_struct_1): Likewise.
9293 (finish_struct): Likewise.
9294 (popclass): Remove argument. Simplify code accordingly.
9295 (pop_nested_class): Likewise.
9296 * decl.c (poplevel_class): Declare it here, and make it static.
9297 (poplevel): Handle class scopes.
9298 (poplevel_class): Don't take an rgument. Simplify.
9299 (pop_everything): Pass no arguments to pop_nested_class.
9300 (cp_finish_decl): Pass no arguments to popclass.
9301 (grokdeclarator): Pass no arguments to pop_nested_class.
9302 (finish_function): Likewise.
9303 * decl2.c (grokfield): Likewise.
9304 (pop_scope): Pass no arguments to popclass.
9305 * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
9306 * pt.c (instantiate_class_template): Move call to pushclass, and
9307 document. Pass no arguments to popclass.
9308 (regenerate_decl_from_template): Likewise.
9309
9310 1999-04-14 Jason Merrill <jason@yorick.cygnus.com>
9311
9312 * typeck.c (build_unary_op): Handle taking the address of a unique
9313 bound non-static member function.
9314
9315 1999-04-13 Martin von Loewis <loewis@informatik.hu-berlin.de>
9316
9317 * lang-options.h (-Wdeprecated): New flag.
9318 * decl2.c (warn_deprecated): New flag.
9319 (lang_decode_option): Deprecated this-is-variable,
9320 external-templates, alt-external-templates.
9321 Support -Wdeprecated.
9322 * errfn.c (cp_deprecated): New function.
9323
9324 1999-04-13 Jason Merrill <jason@yorick.cygnus.com>
9325
9326 * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
9327 of the decls themselves.
9328
9329 * pt.c (tsubst_function_type): Copy attributes over.
9330
9331 * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority
9332 and com_interface.
9333 * cp-tree.h: Add prototype.
9334 * decl.c (init_decl_processing): Set valid_lang_attribute.
9335
9336 1999-04-13 Mark Mitchell <mark@codesourcery.com>
9337
9338 * class.c (finish_struct_1): Look at the const-ness of the field's
9339 type, not the TREE_READONLY-ness of the declaration.
9340 * method.c (synthesize_method): Likewise.
9341 * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
9342 creating new declarations.
9343
9344 1999-04-13 Mike Stump <mrs@wrs.com>
9345
9346 * decl2.c (import_export_decl): Because vtables always reference
9347 virtual functions, even if they are inlined, don't allow
9348 -fno-implement-inlines to not emit them, instead, emit them with
9349 the vtable.
9350 * decl.c (start_function): Likewise.
9351
9352 1999-04-12 Jason Merrill <jason@yorick.cygnus.com>
9353
9354 * cp-tree.h (struct lang_type): Add com_interface.
9355 (CLASSTYPE_COM_INTERFACE): New macro.
9356 * class.c (set_rtti_entry): COM interface classes have no RTTI
9357 entries in their vtables; adjust.
9358 (add_virtual_function, finish_base_struct, skip_rtti_stuff,
9359 modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
9360 finish_struct_1): Likewise.
9361 * decl2.c (mark_vtable_entries): Likewise.
9362 * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
9363 * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
9364 expand_upcast_fixups): Likewise.
9365 * tree.c (debug_binfo): Likewise.
9366
9367 * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
9368 * typeck.c (comptypes): If we get it, ignore attributes.
9369 * class.c (instantiate_type): Use BASELINK_P. Change complain
9370 parameter to flags; 2 means ignore attributes.
9371 * call.c (build_op_delete_call): Pass it.
9372
9373 * decl.c (xref_tag): Only complain once about using a typedef-name
9374 with 'struct'. Downgrade to pedwarn.
9375
9376 * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
9377
9378 * parse.y (absdcl_intern): New nonterminal.
9379 (absdcl, direct_abstract_declarator): Use it.
9380
9381 * pt.c (lookup_template_class): Look through implict typename.
9382
9383 1999-04-11 Mark Mitchell <mark@codesourcery.com>
9384
9385 * friend.c (add_friend): Deal gracefully with error_mark_node.
9386 * method.c (build_overload_value): Handle pointers-to-members as
9387 template parameters.
9388
9389 * decl.c (push_binding): Fix typo in comment.
9390
9391 1999-04-10 Mark Mitchell <mark@codesourcery.com>
9392
9393 * error.c (dump_type_real): If a typename is a template-id, put
9394 out the template arguments.
9395 (dump_expr): Handle TEMPLATE_ID_EXPR.
9396 * pt.c (lookup_template_class): Now that full arguments are
9397 available everywhere, remove code that tried to guess them.
9398
9399 1999-04-09 Mark Mitchell <mark@codesourcery.com>
9400
9401 * decl.c (make_typename_type): Complain if we don't find a type
9402 when trying to make a typename type for a non-template type.
9403
9404 1999-04-09 Jason Merrill <jason@yorick.cygnus.com>
9405
9406 * decl.c (start_decl): Pass attributes to grokdeclarator.
9407 (grokdeclarator): Handle attributes on constructor-syntax
9408 initializers.
9409
9410 1999-04-08 Mark Mitchell <mark@codesourcery.com>
9411
9412 * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
9413 don't have types.
9414
9415 * search.c (template_self_reference_p): Tweak.
9416
9417 1999-04-07 Mark Mitchell <mark@codesourcery.com>
9418
9419 * init.c (build_offset_ref): Don't build yet another weird data
9420 structure to describe overloaded functions.
9421
9422 1999-04-06 Mark Mitchell <mark@codesourcery.com>
9423
9424 * cp-tree.h (BASELINK_P): New macro.
9425 (SET_BASELINK_P): Likewise.
9426 * init.c (build_member_call): Remove needless assignment in if
9427 statement.
9428 * search.c (lookup_field_r): Fix handling when we are looking
9429 specifically for a type; these are not hidden by functions and
9430 variables.
9431 (lookup_member): Use SET_BASELINK_P.
9432 * tree.c (is_overloaded_fn): Use BASELINK_P.
9433 (really_overloaed_fn): Likewise.
9434 (get_first_fn): Likewise.
9435
9436 1999-04-05 Mark Mitchell <mark@codesourcery.com>
9437
9438 * decl.c (lookup_name_current_level): Tweak, and improve
9439 documentation.
9440
9441 * class.c (maybe_fixup_vptrs): Remove declaration.
9442 (build_class_init_list): Likewise.
9443 * decl.c (pushdecl_class_level): Call check_template_shadow here
9444 ...
9445 (push_class_level_binding): ... not here.
9446 * search.c (dfs_push_type_decls): Only avoid
9447 template-self-reference TYPE_DECLs if they are from base classes.
9448
9449 1999-04-04 Mark Mitchell <mark@codesourcery.com>
9450
9451 * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
9452 nodes. Tidy.
9453
9454 1999-04-03 Jason Merrill <jason@yorick.cygnus.com>
9455
9456 * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
9457 (finish_struct_1): Don't call build_class_init_list.
9458
9459 1999-04-02 Mark Mitchell <mark@codesourcery.com>
9460
9461 * tinfo.h (__class_type_info): Fix illegal declaration.
9462
9463 * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
9464 * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
9465 (IDENTIFIER_CLASS_VALUE): Improve documentation.
9466 (is_properly_derived_from): Declare.
9467 (invalidate_class_lookup_cache): Likewise.
9468 (maybe_maybe_note_name_used_in_class): Likewise.
9469 (note_name_declared_in_class): Likewise.
9470 (push_using_decl): Remove duplicate declaration.
9471 (id_in_current_class): Remove declaration.
9472 (push_class_binding): Change prototype.
9473 (clear_identitifer_class_values): Declare.
9474 * call.c (is_properly_derived_from): Make it global.
9475 (build_new_function_call): Be careful about updating candidates.
9476 (build_new_method_call): Handle COMPONENT_REFs. Don't crash when
9477 asked to make illegal calls.
9478 * class.c: Include splay-tree.h.
9479 (class_stack_node): Add names_used slot.
9480 (check_member_decl_is_same_in_complete_scope): Remove.
9481 (add_method): Fix comment. Push the declaration into class
9482 scope.
9483 (finish_struct_1): When popping the class, pop the bindings too.
9484 Remove check for data member/function member conflict.
9485 (finish_struct): Remove calls to
9486 check_member_decl_is_same_in_complete_scope. Change calls to
9487 popclass.
9488 (pushclass): Clear names_used in the class stack entry.
9489 Use invalidate_class_lookup_cache to remove cached entries, rather
9490 than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE
9491 before entering a new class. Remove dead code. Don't mess with
9492 current_function_decl when pushing declarations.
9493 (invalidate_class_lookup_cache): New function, split out from ...
9494 (popclass): Here. Clean up names_used on our way out.
9495 (instantiate_type): Adjust.
9496 (build_self_reference): Don't push the declaration here.
9497 (maybe_note_name_used_in_class): New function.
9498 (note_name_declared_in_class): Likewise.
9499 * decl.c (add_binding): Change prototype.
9500 (find_class_binding_level): New function.
9501 (innermost_nonclass_level): Likewise.
9502 (current_binding_level): Update documentation.
9503 (inner_binding_level): Remove. Replace with current_binding_level
9504 throughout.
9505 (push_binding_level): Remove special handling of
9506 class_binding_level.
9507 (pop_binding_level): Likewise. Use find_class_binding_level.
9508 (suspend_binding_level): Likewise.
9509 (global_bindings_p): Use innermost_nonclass_level.
9510 (toplevel_bindings_p): Likewise.
9511 (namespace_bindings_p): Likewise.
9512 (pseudo_global_level_p): Likewise.
9513 (push_binding): Clear INHERITED_VALUE_BINDING_P.
9514 (add_binding): Check for illegal multiple declarations. Return a
9515 value indicating whether or not the new binding was legal.
9516 (push_local_binding): Skip over class binding levels. Check
9517 return value from add_binding.
9518 (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call
9519 note_name_declared_in_class.
9520 (pushlevel_class): Remove "fake out the rest of the compiler"
9521 code.
9522 (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
9523 (clear_identifier_class_values): New function.
9524 (pop_from_top_level): Use it.
9525 (pop_everything): Tweak.
9526 (maybe_process_template_type_declaration): Don't push the
9527 declaration for the template here.
9528 (pushtag): Don't push tag declarations into class scope here.
9529 (pushdecl): Apply DeMorgan's law for readability.
9530 (pushdecl_class_level): Remove special-case code for
9531 TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions.
9532 (push_class_level_bindng): Deal with inherited bindings.
9533 (lookup_name_real): Remove special-case code for
9534 TYPE_BEING_DEFINED, and some implicit typename magic.
9535 (grokdeclarator): Handle COMPONENT_REF for a template function.
9536 (build_enumerator): Don't call pushdecl_class_level here.
9537 (id_in_current_class): Remove.
9538 * decl2.c (grokfield): Don't call pushdecl_class_level or
9539 check_template_shadow.
9540 * errfn.c (cp_file_of): Don't declare.
9541 (cp_line_of): Likewise.
9542 * error.c (dump_decl): Handle an OVERLOAD.
9543 (cp_file_of): Likewise.
9544 (cp_line_of): Likewise.
9545 * init.c (build_member_call): Handle a COMPONENT_REF.
9546 * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
9547 pushdecl_class_level.
9548 * method.c (hack_identifier): Build COMPONENT_REFs for references
9549 to member templates as well as member functions. Remove dead
9550 code.
9551 * parse.y (left_curly): Remove.
9552 (nonnested_type): Call maybe_note_name_used_in_class, not
9553 pushdecl_class_level.
9554 * parse.c: Regenerated.
9555 (nested_name_specifier_1): Likewise.
9556 * pt.c (check_explicit_specialization): Adjust, for robustness.
9557 (check_template_shadow): Handle OVERLOADs.
9558 (build_template_decl): Set DECL_CONSTRUCTOR_P on the
9559 TEMPLATE_DECL, if appropriate.
9560 * search.c (envelope_add_decl): Remove.
9561 (dfs_pushdecls): Likewise.
9562 (dfs_compress_decls): Likewise.
9563 (dfs_push_decls): New function.
9564 (dfs_push_type_decls): Likewise.
9565 (setup_class_bindings): Likewise.
9566 (template_self_reference_p): Likewise.
9567 (lookup_field_r): Use it.
9568 (looup_member): Remove old comment. Deal with ambiguity.
9569 (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
9570 and remove envelope processing.
9571 * semantics.c (begin_class_definition): Let pushclass push
9572 declarations for base classes.
9573 (finish_member_declaration): Push declarations into class scope.
9574 * typeck.c (build_component_ref): Just put an OVERLOAD into the
9575 COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
9576 (build_x_function_call): Deal with OVERLOAD. Handle template-ids.
9577 * Makefile.in (class.o): Depend on splay-tree.h.
9578
9579 Wed Mar 31 11:30:43 1999 Nathan Sidwell <nathan@acm.org>
9580
9581 * cvt.c (convert_pointer_to_real): Use same_type_p.
9582 * typeck.c (comp_target_types): Use same_type_p.
9583
9584 1999-03-31 Jason Merrill <jason@yorick.cygnus.com>
9585
9586 * semantics.c (begin_inline_definitions,
9587 finish_inline_definitions): Rename from finish_default_args and
9588 begin_inline_definitions, respectively, to something that isn't a
9589 total lie. :)
9590 * parse.y (structsp): Adjust.
9591
9592 * tree.c (hash_tree_cons): Remove obsolete via_* parms.
9593 (list_hash_lookup): Likewise.
9594 (hash_tree_chain): Adjust.
9595 * pt.c (tsubst): Adjust.
9596 (tsubst_arg_types): Use plain hash_tree_cons.
9597 * cp-tree.h (hash_tree_cons_simple): Lose.
9598 * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
9599
9600 Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9601
9602 * Makefile.in (hash.h): Generate using gperf language 'C', not
9603 'KR-C', so gperf uses the `const' keyword on strings.
9604
9605 * gxx.gperf (resword): Const-ify a char*.
9606
9607 1999-03-30 Jason Merrill <jason@yorick.cygnus.com>
9608
9609 * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
9610 CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
9611 CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
9612 CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
9613 CLASSTYPE_BINFO_AS_LIST): Remove cruft.
9614 * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
9615 tree.c: Adjust.
9616
9617 1999-03-29 Jason Merrill <jason@yorick.cygnus.com>
9618
9619 * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
9620
9621 1999-03-28 Jason Merrill <jason@yorick.cygnus.com>
9622
9623 * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
9624
9625 1999-03-27 Mark Mitchell <mark@codesourcery.com>
9626
9627 * cp-tree.h (add_friend): Declare.
9628 (add_friends): Likewise.
9629 * friend.c (add_friend): Make it global. Don't add to
9630 DECL_BEFRIENDING_CLASSES if the befriending class is a template.
9631 (add_friends): Make it global.
9632 (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
9633 befriending class is a template.
9634 * parse.y (component_decl_1): Fix typo in comment.
9635 * parse.c: Regenerated.
9636 * pt.c (instantiate_class_template): Use add_friend and
9637 add_friends rather that duplicating some of their functionality
9638 here.
9639
9640 1999-03-27 Jason Merrill <jason@yorick.cygnus.com>
9641
9642 * call.c (build_field_call): Unify 'this' and non-'this' cases.
9643
9644 * typeck.c (build_indirect_ref): Check for 'this' sooner.
9645
9646 Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9647
9648 * call.c (op_error): Const-ify a char*.
9649 (add_candidate, source_type, add_warning): Add static prototype.
9650 (print_z_candidates): Const-ify a char*.
9651
9652 * class.c (resolve_address_of_overloaded_function,
9653 fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
9654 (get_vtable_name, finish_struct_1): Const-ify a char*.
9655
9656 * cvt.c (convert_to_reference): Likewise.
9657
9658 * decl.c (redeclaration_error_message, record_builtin_type,
9659 record_unknown_type, member_function_or_else, bad_specifiers):
9660 Likewise.
9661 (find_binding, select_decl, unqualified_namespace_lookup,
9662 lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
9663 Add static prototype.
9664 (warn_extern_redeclared_static, duplicate_decls, pushdecl,
9665 implicitly_declare, record_builtin_java_type, define_function,
9666 grok_op_properties, tag_name): Const-ify a char*.
9667
9668 * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
9669 (define_function, finish_builtin_type): Const-ify a char*.
9670 (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
9671 cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
9672 (file_name_nondirectory): Const-ify a char*.
9673 (init_filename_times): Don't prototype.
9674 (compiler_error): Prototype.
9675 (yyerror, init_repo): Const-ify a char*.
9676 (build_srcloc): Don't prototype.
9677 (build_x_indirect_ref, build_indirect_ref, build_component_addr):
9678 Const-ify a char*.
9679 (warn_for_assignment): Don't prototype.
9680 (convert_for_initialization, readonly_error, check_for_new_type,
9681 GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
9682 Const-ify a char*.
9683
9684 * decl2.c (acceptable_java_type, output_vtable_inherit,
9685 setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
9686 merge_functions, decl_namespace, validate_nonmember_using_decl,
9687 do_nonmember_using_decl): Add static prototype.
9688 (lang_f_options): Const-ify a char*.
9689 (finish_builtin_type): Likewise.
9690 (add_function, arg_assoc_namespace, arg_assoc_class): Add static
9691 prototype.
9692
9693 * errfn.c: Include cp-tree.h.
9694 (cp_thing): Add static prototype.
9695 (compiler_error): Don't protoptype.
9696 (cp_compiler_error): Cast `compiler_error' to `errorfn' before
9697 passing it to `cp_thing'.
9698
9699 * error.c (interesting_scope_p): Add static prototype.
9700
9701 * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
9702 a char*.
9703
9704 * init.c (compiler_error): Don't prototype.
9705 (member_init_ok_or_else): Const-ify a char*.
9706 (build_java_class_ref): Add static prototype.
9707
9708 * lex.c (compiler_error): Don't prototype.
9709 (get_time_identifier, interface_strcmp, extend_token_buffer,
9710 handle_cp_pragma): Const-ify a char*.
9711 (is_global, init_filename_times): Add static prototype.
9712 (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
9713 (compiler_error): Change from fixed args to variable args.
9714 (yyerror): Const-ify a char*.
9715
9716 * parse.y (cond_stmt_keyword): Const-ify a char*.
9717 (parse_decl): Add static prototype.
9718
9719 * pt.c (template_args_equal, print_template_context): Likewise.
9720 (print_candidates, check_default_tmpl_args): Const-ify a char*.
9721 (instantiate_class_template): Likewise.
9722
9723 * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
9724
9725 * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
9726 expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
9727
9728 * search.c (lookup_field_info, lookup_member): Likewise.
9729 (lookup_member): Cast the first argument of `bzero' to a PTR.
9730
9731 * sig.c (compiler_error): Don't prototype.
9732 (build_signature_pointer_or_reference_nam): Const-ify a char*.
9733 (get_sigtable_name, build_member_function_pointer): Likewise.
9734
9735 * tree.c (compiler_error): Don't prototype.
9736 (no_linkage_helper, build_srcloc): Add static prototype.
9737 (build_vbase_pointer_fields): Const-ify a char*.
9738 (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
9739
9740 * typeck.c (compiler_error): Don't prototype.
9741 (convert_for_assignment): Const-ify a char*.
9742 (comp_cv_target_types): Add static prototype.
9743 (build_x_indirect_ref, build_indirect_ref, convert_arguments,
9744 build_component_addr, build_unary_op, convert_for_initialization):
9745 Const-ify a char*.
9746
9747 * typeck2.c (ack): Add static prototype and change from fixed args
9748 to variable args.
9749 (readonly_error, check_for_new_type): Const-ify a char*.
9750
9751 * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
9752 fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
9753 (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'.
9754 (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
9755 gen_assign, GNU_xref_member): Const-ify a char*.
9756
9757 1999-03-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
9758
9759 * gxxint.texi: Remove old discussion on copying virtual bases.
9760
9761 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
9762
9763 * Make-lang.in: Remove all references to g++.o/g++.c.
9764 Link g++ from gcc.o.
9765
9766 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
9767
9768 * decl2.c (comdat_linkage): Treat vtables like functions.
9769
9770 1999-03-25 Mark Mitchell <mark@codesourcery.com>
9771
9772 * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
9773
9774 1999-03-25 Nathan Sidwell <nathan@acm.org>
9775
9776 * decl.c (init_decl_processing): Add `signed' type as a synonym
9777 for `int'.
9778
9779 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
9780
9781 * typeck.c (common_type): Handle cv-qual unification for pointers
9782 to members.
9783
9784 * decl.c (unqualified_namespace_lookup): Return error_mark_node
9785 on error.
9786 (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
9787 * lex.c (do_identifier): If we got error_mark_node, call
9788 lookup_name again.
9789
9790 1999-03-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
9791
9792 * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
9793 classes.
9794
9795 1999-03-24 Jason Merrill <jason@yorick.cygnus.com>
9796
9797 * decl.c (lookup_name_real): Do nested field lookup regardless of
9798 TYPE_BEING_DEFINED.
9799
9800 1999-03-24 Mark Mitchell <mark@codesourcery.com>
9801
9802 * cp-tree.h (lang_type): Remove has_assignment and
9803 has_real_assignment. Add befriending_classes.
9804 (TYPE_HAS_ASSIGNMENT): Remove.
9805 (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
9806 (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
9807 (lang_decl): Document.
9808 (DECL_BEFRIENDING_CLASSES): New macro.
9809 (FRIEND_NAME): Move declaration to more obvious location.
9810 (FRIEND_DECLS): Likewise.
9811 * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
9812 * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
9813 (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
9814 (grok_op_properties): Likewise.
9815 * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
9816 (add_friend): Likewise. Don't do weird things with assignment
9817 operators. Update DECL_BEFRIENDING_CLASSES.
9818 (add_friends): Don't do weird things with assignment operators.
9819 (make_friend_class): Likewise. Update
9820 CLASSTYPE_BEFRIENDING_CLASSES.
9821 * pt.c (instantiate_class_template): Don't set
9822 TYPE_HAS_ASSIGNMENT.
9823 (tsubst_copy): Substitute the TREE_TYPE for more unary
9824 expressions.
9825 * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
9826 * search.c (protected_accessible_p): New function.
9827 (friend_accessible_p): Likewise.
9828 (accessible_p): Use them.
9829
9830 1999-03-23 Mark Mitchell <mark@codesourcery.com>
9831
9832 * pt.c (convert_nontype_argument): Don't create things that aren't
9833 PTRMEM_CSTs when applying a qualification conversion to a
9834 PTRMEM_CST.
9835
9836 1999-03-23 Mark Mitchell <mark@codesourcery.com>
9837
9838 * Makefile.in (OBJS): Don't mention hash.o.
9839 (OBJDEPS): Likewise.
9840
9841 1999-03-23 Jason Merrill <jason@yorick.cygnus.com>
9842
9843 * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
9844 * decl.c (expand_static_init): Make sure we don't add any after
9845 then.
9846
9847 * decl.c (cp_finish_decl): Move intelligence about handling
9848 DECL_COMDAT for variables from here...
9849 * decl2.c (comdat_linkage): ...to here.
9850 (maybe_make_one_only): Tweak.
9851 (import_export_decl): Call comdat_linkage for variables, too.
9852 (finish_file): Handle template statics properly.
9853
9854 1999-03-22 Mark Mitchell <mark@codesourcery.com>
9855
9856 * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
9857 Document internals of pointer-to-member-functions.
9858 (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
9859 (PFN_FROM_PTRMEMFUNC): Likewise.
9860 (build_type_conversion): Remove unused parameter.
9861 (build_ptrmemfunc1): Declare.
9862 (expand_ptrmemfunc_cst): New function.
9863 (delta2_from_ptrmemfunc): Likewise.
9864 (pfn_from_ptrmemfunc): Likewise.
9865 * cvt.c (cp_convert_to_pointer): Remove unused parameter to
9866 build_type_conversion. Use TYPE_PTRMEM_P for readability.
9867 (convert_to_reference): Remove unused parameter to
9868 build_type_conversion.
9869 (ocp_convert): Likewise.
9870 (build_user_type_conversion): Likewise.
9871 * error.c (dump_expr): Handle NULL pointer-to-member functions.
9872 * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
9873 * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
9874 open when handling pointer-to-member functions.
9875 * pt.c (convert_nontype_argument): Clean up error messages. Be
9876 more stringent with pointers-to-members.
9877 * typeck.c (build_ptrmemfunc1): Don't declare. Make it global.
9878 (build_unary_op): Tidy ever-so-slightly.
9879 (build_conditional_expr): Remove extra parameter to
9880 build_type_conversion.
9881 (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
9882 we're using.
9883 (expand_ptrmemfunc_cst): Define.
9884 (delta2_from_ptrmemfunc): Likewise.
9885 (pfn_from_ptrmemfunc): Likewise.
9886
9887 1999-03-19 Mark Mitchell <mark@codesourcery.com>
9888
9889 * init.c (build_member_call): Handle template-id expressions
9890 correctly.
9891 * typeck.c (build_x_function_call): Likewise.
9892
9893 1999-03-19 Chip Salzenberg <chip@perlsupport.com>
9894
9895 * friend.c (make_friend_class): Avoid core dump when
9896 not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
9897
9898 1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
9899
9900 * decl.c (start_function): Suppress normal linkage heuristics
9901 for #pragma interface under MULTIPLE_SYMBOL_SPACES.
9902
9903 1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br>
9904
9905 * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
9906 ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
9907
9908 1999-03-17 Martin von Löwis <loewis@informatik.hu-berlin.de>
9909
9910 * parse.y (named_complex_class_head_sans_basetype):
9911 Do not push a scope for error_mark_node.
9912 (maybe_base_class_list): Likewise.
9913
9914 * decl.c (start_decl): Check for error_mark_node as a type.
9915 Detected by g++.brendan/array-refs.C.
9916 (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C.
9917 (maybe_build_cleanup_1): Likewise. Detected by
9918 g++.jason/incomplete1.C.
9919
9920 * tree.c (build_dummy_object): Use void_zero_node instead of the
9921 error_mark_node.
9922 (is_dummy_object): Check for such a node.
9923 Detected by g++.bob/inherit1.C
9924
9925 1999-03-16 Jason Merrill <jason@yorick.cygnus.com>
9926
9927 * method.c (old_backref_index): Split out...
9928 (flush_repeats): From here. Rename back from try_old_backref.
9929 (build_mangled_name): Put back some old-style repeat handling.
9930
9931 Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9932
9933 * lex.c: Don't include setjmp.h.
9934 (parse_float): New static function.
9935 (pf_args): New struct.
9936 (real_yylex): Use them in call to `do_float_handler'.
9937
9938 1999-03-15 Mark Mitchell <mark@markmitchell.com>
9939
9940 * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
9941 * tree.c (layout_basetypes): Not here.
9942 * search.c (dfs_search): Remove; no longer used.
9943
9944 1999-03-12 Mark Mitchell <mark@markmitchell.com>
9945
9946 * decl2.c (validate_nonmember_using_decl): Issue sensible
9947 error-messages on bogus qualifiers.
9948
9949 1999-03-14 Jason Merrill <jason@yorick.cygnus.com>
9950
9951 * call.c (add_function_candidate): Fix uninitialized variable.
9952
9953 * Makefile.in (search.o): Add dependency on varray.h.
9954
9955 1999-03-13 Jason Merrill <jason@yorick.cygnus.com>
9956
9957 * decl.c (duplicate_decls): Use same_type_p.
9958 * method.c (try_old_backref): Renamed from flush_repeats. Use
9959 same_type_p. Don't try to handle repeats. Return success.
9960 (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support
9961 calls from old-style code, too.
9962 (check_ktype): Use same_type_p.
9963 (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT.
9964 (build_qualified_name): Simplify logic.
9965 (process_overload_item): Strip typedefs and quals at the top.
9966 (build_mangled_name_for_type_with_Gcode): Remove call to
9967 type_canonical_variant.
9968 (build_mangled_name): Likewise. Remove support for old-style
9969 repeats, which have been disabled since 2.7.2. Don't mess with
9970 TREE_USED.
9971 (build_decl_overload_real): Don't mess with TREE_USED.
9972
9973 1999-03-13 Nathan Sidwell <nathan@acm.org>
9974
9975 * error.c (cp_printers): Add 'F' escape character.
9976 (dump_type_real): Remove TREE_LIST (fnargs) printing.
9977 Functionality moved to dump_parameters.
9978 (dump_type_suffix): Use dump_parameters and dump_exception_spec.
9979 (dump_function_decl): Extend meaning of V parameter. Use
9980 dump_parameters and dump_exception_spec.
9981 (dump_parameters): New static function.
9982 (dump_exception_spec): New static function.
9983 (fndecl_as_string): Change argument semantics. Use
9984 dump_function_decl directly.
9985
9986 * sig.c (build_signature_table_constructor): Use cp_error.
9987
9988 1999-03-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
9989
9990 * semantics.c (finish_switch_cond): Handle error cases gracefully.
9991 Detected by g++.law/enum5.C.
9992
9993 * typeck.c (build_modify_expr): Check for errors after resolving
9994 offsets. Detected by g++.brendan/static1.C.
9995
9996 * decl.c (complete_array_type): Ignore initial_value if it is an
9997 error. Detected by g++.benjamin/17930.C.
9998
9999 * typeck2.c (process_init_constructor): Return error if one argument
10000 is in error. Detected by g++.benjamin/13478.C.
10001
10002 1999-03-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
10003
10004 * decl.c (select_decl): Allow class templates when we need types.
10005 * decl2.c (ambiguous_decl): Likewise.
10006
10007 1999-03-12 Mark Mitchell <mark@markmitchell.com>
10008
10009 * lex.c (do_identifier): Correct call to enforce_access.
10010 * search.c (accessible_p): Tweak comment.
10011
10012 1999-03-10 Mark Mitchell <mark@markmitchell.com>
10013
10014 * semantics.c (begin_class_definition): Call build_self_reference.
10015 (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
10016
10017 * search.c (assert_canonical_unmarked): Fix typo in prototype.
10018
10019 * search.c (dfs_canonical_queue): New function.
10020 (dfs_assert_unmarked_p): Likewise.
10021 (assert_canonical_unmarked): Likewise.
10022 (access_in_type): Use it.
10023 (accessible_p): Likewise. Walk the whole tree when umarking.
10024
10025 * sig.c (build_signature_table_constructor): Use accessible_p
10026 instead of compute_access.
10027
10028 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
10029
10030 * call.c (add_builtin_candidates): Handle overloaded conversion ops.
10031
10032 1999-03-09 Mark Mitchell <mark@markmitchell.com>
10033
10034 * cp-tree.h (flag_access_control): Declare.
10035 (TREE_VIA_PPUBLIC): Document.
10036 (DECL_NONSTATIC_MEMBER_P): New macro.
10037 (enforce_access): Return an indication of whether or not access
10038 was permitted.
10039 (build_self_reference): Change prototype.
10040 (compute_access): Replace with ...
10041 (accessible_p): New function.
10042 (dfs_walk): Change prototype.
10043 (dfs_unmark): Likewise.
10044 (markedp): Likewise.
10045 * call.c (enforce_access): Use accessible_p.
10046 * class.c (build_self_reference): Insert the declaration into the
10047 list of members for this type, and make it public.
10048 * decl.c (xref_basetypes): Avoid ill-timed recursion.
10049 * init.c (build_offset_ref): Use lookup_member, not three separate
10050 name-lookups. Call enforce_access rather than checking for
10051 illegal accesses here.
10052 (resolve_offset_ref): Likewise.
10053 * lex.c (do_identifier): Likewise.
10054 * method.c (hack_identifier): Likewise.
10055 * parse.y (self_reference): Remove.
10056 (opt_component_decl_list): Don't use it.
10057 * parse.c: Regenerated.
10058 * pt.c (print_candidates): Generalize to handle lists of
10059 overloaded functions.
10060 (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
10061 not set.
10062 (get_template_base): Use new calling convention for dfs_walk.
10063 * search.c: Include varray.h. Add prototypes.
10064 (dfs_walk): Accept a data pointer to pass to the work functions.
10065 All callers changed. All work functions changed.
10066 (breadth_first_search): Rename to bfs_walk, and make consistent
10067 with dfs_walk.
10068 (dfs_walk_real): New function.
10069 (canonical_binfo): New function.
10070 (context_for_name_lookup): Likewise.
10071 (shared_marked_p): Likewise.
10072 (shared_unmarked_p): Likewise.
10073 (lokup_field_queue_p): Likewise.
10074 (lookup_field_r): Generalize to handle both functions and fields.
10075 (lookup_field): Just call lookup_member.
10076 (lookup_fnfields): Likewise.
10077 (lookup_member): Move body of lookup_field here and generalize.
10078 (dfs_accessible_queue_p): Likewise.
10079 (dfs_accessible_p): Likewise.
10080 (dfs_access_in_type): Likewise.
10081 (access_in_type): Likewise.
10082 (compute_access): Remove, and replace with ...
10083 (accessible_p): New function.
10084 (vbase_types): Remove.
10085 (vbase_decl_ptr_intermediate): Likewise.
10086 (vbase_decl_ptr): Likewise.
10087 (vbase_init_result): Likewise.
10088 (closed_envelopes): Likewise.
10089 (bvtable): Likewise.
10090
10091 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
10092
10093 * call.c (add_function_candidate): Check for proper number of args
10094 before checking the validity of those args.
10095
10096 1999-03-06 Jason Merrill <jason@yorick.cygnus.com>
10097
10098 * cp-tree.h (struct lang_type): Add anon_union field.
10099 (ANON_UNION_TYPE_P): Use it instead of examining type.
10100 (SET_ANON_UNION_TYPE_P): New macro.
10101 * decl.c (check_tag_decl): Use it.
10102
10103 * search.c (compute_access): Handle non-type contexts earlier, and
10104 handle NULL_TREE.
10105
10106 * tree.c (build_exception_variant): Use copy_to_permanent.
10107
10108 * decl2.c (setup_initp): Give statics with no priority the default
10109 priority here.
10110 (do_dtors, do_ctors, finish_file): Remove special handling of
10111 non-prioritized statics.
10112
10113 1999-03-05 Mark Mitchell <mark@markmitchell.com>
10114
10115 * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
10116 * decl.c (make_typename_type): Don't issue an error if an
10117 immediate lookup fails; it migt be resolved later.
10118 * friend.c (is_friend): Add comment.
10119 * search.c (breadth_first_search): Add POSTFN and DATA
10120 parameters. Tidy. All callers changed.
10121 (lookup_field_queue_p): New function.
10122 (lookup_field_r): Likewise.
10123 (lookup_field_post): Likewise.
10124 (lookup_field): Use them, via breadth_first_search, instead of
10125 duplicating logic.
10126 (compute_access): Robustify.
10127 (lookup_fnfield_info): New structure.
10128
10129 1999-03-05 Jason Merrill <jason@yorick.cygnus.com>
10130
10131 * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
10132
10133 1999-03-03 Jason Merrill <jason@yorick.cygnus.com>
10134
10135 * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
10136 cc happy.
10137
10138 * decl2.c (import_export_class): Also return if
10139 CLASSTYPE_INTERFACE_ONLY is set.
10140
10141 1999-03-03 Martin von Löwis <loewis@informatik.hu-berlin.de>
10142
10143 * decl.c (push_overloaded_decl): Only overwrite the old binding if
10144 there was one.
10145 * decl2.c (do_local_using_decl): Fix loop termination.
10146
10147 1999-03-02 Mark Mitchell <mark@markmitchell.com>
10148
10149 * cp-tree.h (determine_specialization): Don't declare.
10150 * pt.c (determine_specialization): Make it static. Eliminate
10151 complain parameter. Note that decl is always non-NULL now, and
10152 simplify accordingly.
10153
10154 * decl.c (maybe_push_to_top_level): Always call
10155 push_cp_function_context.
10156 (pop_from_top_level): Always call pop_cp_function_context.
10157
10158 1999-02-26 Nathan Sidwell <nathan@acm.org>
10159
10160 * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
10161 diagnostics.
10162 * cp-tree.h (complete_type_or_else): Added VALUE parameter.
10163 * init.c (build_new_1): Extra arg to complete_type_or_else.
10164 (build_delete): Likewise.
10165 * typeck.c (require_complete_type): Likewise.
10166 (pointer_int_sum): Likewise.
10167 (pointer_diff): Likewise.
10168 (build_component_ref): Likewise.
10169
10170 * typeck2.c (incomplete_type_error): Always use cp_error.
10171 Show declaration of undefined type, if appropriate.
10172 Deal with UNKNOWN_TYPE nodes.
10173
10174 * typeck.c (require_complete_type): Use TYPE_SIZE as
10175 size_zero_node to mean incomplete type.
10176 (require_complete_type_in_void): New function.
10177 (build_compound_expr): Call complete_type_in_void for LHS.
10178 (build_c_cast): Call complete_type_in_void for void cast.
10179 * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
10180 * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
10181 require_complete_type_in_void. Call it.
10182 * cp-tree.h (require_complete_type_in_void): Prototype new function.
10183
10184 * typeck.c (convert_arguments): Use alternative format for
10185 function decls. Don't require_complete_type here. Simplify
10186 diagnostic printing.
10187 (convert_for_initialization): Don't require_complete_type on RHS yet.
10188 * call.c (convert_arg_to_ellipsis): Call require_complete_type.
10189
10190 * call.c (build_over_call): Cope with qualified void return type.
10191 * semantics.c (finish_call_expr): Likewise.
10192 * typeck.c (build_function_call_real): Likewise.
10193 (c_expand_return): Likewise.
10194 * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
10195
10196 * call.c (print_z_candidates): Use alternate print format, to be
10197 consistent with (pt.c) print_candidates.
10198 * method.c (hack_identifier): List candidate members.
10199 * search.c (lookup_field): Build ambiguous list, and show it, if
10200 ambiguous.
10201
10202 1999-02-26 Mark Mitchell <mark@markmitchell.com>
10203
10204 * typeck.c (decay_conversion): Don't confuse constant array
10205 variables with their initializers.
10206
10207 * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
10208 merging decls.
10209 * pt.c (regenerate_decl_from_template): Tweak for clarity.
10210 (instantiate_decl): Mark a decl instantiated before regenerating
10211 it to avoid recursion.
10212 * tree.c (mapcar): Don't call decl_constant_value unless we know
10213 something is TREE_READONLY_DECL_P.
10214
10215 * class.c (check_for_override): Don't stop checking when we find
10216 the first overridden function. Delete #if 0'd code.
10217 * search.c (get_matching_virtual): Likewise.
10218
10219 1999-02-25 Richard Henderson <rth@cygnus.com>
10220
10221 * lang-specs.h: Define __FAST_MATH__ when appropriate.
10222
10223 1999-02-24 Mike Stump <mrs@wrs.com>
10224
10225 * typeck.c (convert_for_assignment): Allow boolean integral constant
10226 expressions to convert to null pointer.
10227
10228 1999-02-24 Martin von Loewis <loewis@informatik.hu-berlin.de>
10229
10230 * decl.c (lookup_namespace_name): Resolve namespace aliases.
10231
10232 * class.c (push_nested_class): Allow namespaces.
10233
10234 * decl2.c (set_decl_namespace): Add friendp parameter.
10235 * decl.c (grokfndecl): Pass it.
10236 (grokvardecl): Likewise.
10237 * cp-tree.h: Change declaration.
10238
10239 1999-02-24 Jason Merrill <jason@yorick.cygnus.com>
10240
10241 * pt.c (tsubst): Allow an array of explicit size zero.
10242
10243 1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
10244
10245 * errfn.c: Change varargs code to look like toplev.c.
10246
10247 * method.c (process_modifiers): Don't prepend 'U' for char or
10248 wchar_t.
10249
10250 1999-02-20 Craig Burley <craig@jcb-sc.com>
10251
10252 * Make-lang.in (cplib2.ready): Don't consider updating
10253 cplib2 stuff if the current directory isn't writable, as
10254 it won't work (such as during a `make install').
10255
10256 Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
10257
10258 * decl2.c (start_objects): Make file scope constructors and
10259 destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
10260 ASM_OUTPUT_DESTRUCTOR are defined.
10261
10262 1999-02-19 Mark Mitchell <mark@markmitchell.com>
10263
10264 * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
10265 (fn_type_unification): Adjust prototype.
10266 (lookup_fnfields_1): Declare.
10267 * call.c (add_template_candidate_real): Adjust call to
10268 fn_type_unification.
10269 * class.c (add_method): Don't allow duplicate declarations of
10270 constructors or destructors.
10271 (resolve_address_of_overloaded_function): Remove unused variable.
10272 Adjust call to fn_type_unification.
10273 * decl.c (grokfndecl): Be more robust in the face of illegal
10274 specializations.
10275 * decl2.c (check_classfn): Remove hokey handling of member
10276 templates.
10277 * pt.c (determine_specialization): Improve comments. Adjust to
10278 handle template argument deduction as per the standard.
10279 (check_explicit_specialization): Fix comment spacing. Handle
10280 type-conversion operators correctly. Improve error-recovery.
10281 (fn_type_unification): Remove EXTRA_FN_ARG parameter.
10282 (get_bindings_real): Simplify handling of static members.
10283 * search.c (lookup_fnfields_1): Make it have external linkage.
10284 * typeck.c (compparms): Fix comment.
10285 (build_unary_op): Don't try to figure out which template
10286 specialization is being referred to when when the address-of
10287 operator is used with a template function.
10288
10289 Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10290
10291 * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
10292 keyword to match an analogous change at the top level.
10293
10294 * tree.c (lvalue_or_else): Likewise.
10295
10296 1999-02-17 Mark Mitchell <mark@markmitchell.com>
10297
10298 * decl.c (xref_basetypes): Comment.
10299 * pt.c (instantiate_class_template): Use xref_basetypes.
10300
10301 1999-02-16 Mark Mitchell <mark@markmitchell.com>
10302
10303 * cp-tree.h (tsubst): Change prototype.
10304 (tsubst_expr): Likewise.
10305 (tsubst_copy): Likewise.
10306 (type_unification): Remove prototype.
10307 * call.c (convert_default_arg): Adjust call to tsubst_expr.
10308 * class.c (resolve_address_of_overloaded_function): Just use
10309 fn_type_unification.
10310 * decl.c (grokdeclarator): Adjust call to tsubst.
10311 * method.c (build_template_parm_names): Likewise.
10312 * pt.c (GTB_VIA_VIRTUAL): New macro.
10313 (GTB_IGNORE_TYPE): Likewise.
10314 (resolve_overloaded_unification): Add `complain' parameter.
10315 (try_one_overload): Likewise.
10316 (tsubst_template_arg_vector): Likewise.
10317 (tsubst_template_parms): Likewise.
10318 (tsubst_aggr_type): Likewise.
10319 (tsubst_arg_types): Likewise.
10320 (tsubst_call_declarator_parms): Likewise.
10321 (unify): Remove explicit_mask.
10322 (type_unification_real): Likewise.
10323 (get_template_base_recursive): Likewise.
10324 (coerce_template_template_parms): Provide prototype.
10325 (tsubst_function_type): Likewise.
10326 (try_class_unification): New function.
10327 All callers changed to use new complain parameter.
10328 (get_template_base): Use try_class_unification.
10329 (unify): Adjust handling of classes derived from template types.
10330 (fn_type_unification): Substitute explicit arguments before
10331 unification.
10332
10333 1999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
10334
10335 * decl.c (pushdecl): Remove dead code.
10336
10337 1999-02-16 Jason Merrill <jason@yorick.cygnus.com>
10338
10339 * decl2.c (finish_objects): Fix code I missed in previous change.
10340
10341 1999-02-13 Jason Merrill <jason@yorick.cygnus.com>
10342
10343 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
10344 (grokdeclarator): Don't expect error_mark_node from grokfndecl.
10345
10346 * pt.c (maybe_process_partial_specialization): Complain about
10347 'template <>' on non-specialization.
10348
10349 1999-02-10 Jason Merrill <jason@yorick.cygnus.com>
10350
10351 * decl.c (grokdeclarator): Catch wierd declarators.
10352 * decl2.c (finish_file): Don't abort because of namespace parsing
10353 failure.
10354 (check_decl_namespace): Remove.
10355
10356 1999-02-09 Mark Mitchell <mark@markmitchell.com>
10357
10358 * cp-tree.h (get_template_base): Don't declare.
10359 (dfs_walk): Declare.
10360 (dfs_unmark): Likewise.
10361 (markedp): Likewise.
10362 * pt.c (unify): Remove duplicate declaration. Pass tparms and
10363 targs to get_template_base.
10364 (get_template_base_recursive): Move here from search.c. Check to
10365 see that the base found can be instantiated to form the desired
10366 type.
10367 (get_template_base): Likewise.
10368 (get_class_bindings): Simplify.
10369 * search.c (get_template_base_recursive): Move to pt.c.
10370 (get_template_base): Likewise.
10371 (markedp): Make it global.
10372 (dfs_walk): Likewise.
10373 (dfs_unmark): Likewise.
10374
10375 1999-02-07 Jason Merrill <jason@yorick.cygnus.com>
10376
10377 * pt.c (maybe_process_partial_specialization): Complain about
10378 specialization in wrong namespace.
10379 * tree.c (decl_namespace_context): New fn.
10380
10381 1999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
10382
10383 * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
10384 * pt.c (coerce_template_template_parms): Handle nested
10385 template template parameters.
10386
10387 Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com)
10388
10389 * typeck2.c: Update email addresses.
10390
10391 1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
10392
10393 * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
10394 turned off.
10395
10396 1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
10397
10398 * lex.c (retrofit_lang_decl): Split out...
10399 (build_lang_decl): From here.
10400 * decl.c (pushdecl): Call it for functions generated by the middle
10401 end that don't have DECL_LANG_SPECIFIC.
10402 * cp-tree.h: Declare it.
10403
10404 * decl2.c: Remove flag_init_priority. Always enable initp stuff.
10405 (start_objects, finish_objects): Only use special
10406 init_priority code if the user specified a priority.
10407 (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
10408 objects.
10409
10410 Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
10411
10412 * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
10413 mkstemp.o. Get them from libiberty now.
10414 (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
10415
10416 Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10417
10418 * decl2.c (lang_decode_option): Use read_integral_parameter.
10419
10420 1999-02-01 Mark Mitchell <mark@markmitchell.com>
10421
10422 * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
10423 before calling complete_type_or_else.
10424
10425 Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10426
10427 * input.c (inline): Don't define, its handled by system.h.
10428
10429 Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
10430
10431 * decl2.c: Don't define flag_no_ident here. Don't process
10432 -f(no-)ident here.
10433 * cp-tree.h: Don't declare flag_no_ident here.
10434 * lang-specs.h: Map -Qn to -fno-ident.
10435
10436 1999-01-28 Jason Merrill <jason@yorick.cygnus.com>
10437
10438 * cp-tree.h (struct tree_binding): Replace scope field with a union.
10439 (BINDING_SCOPE): Adjust.
10440 * decl.c (BINDING_LEVEL): Adjust.
10441
10442 1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
10443
10444 * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
10445 member constants.
10446
10447 * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
10448 a ctor initializer.
10449
10450 * tree.c (equal_functions): Fix name in prototype.
10451
10452 * decl.c (push_local_binding): Add FLAGS argument.
10453 (pushdecl, push_overloaded_decl): Pass it.
10454 * decl2.c (do_local_using_decl): Likewise.
10455 * cp-tree.h: Adjust prototype.
10456 * decl.c (poplevel): Fix logic.
10457
10458 * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
10459 (poplevel): Handle that. Fix logic for removing TREE_LISTs.
10460 (cat_namespace_levels): Don't loop forever.
10461
10462 1999-01-25 Richard Henderson <rth@cygnus.com>
10463
10464 * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
10465
10466 1999-01-25 Jason Merrill <jason@yorick.cygnus.com>
10467
10468 * class.c (resolve_address_of_overloaded_function): Mark the
10469 chosen function used.
10470
10471 * call.c (build_call): Make sure that a function coming in has
10472 been marked used already.
10473 * decl.c (expand_static_init): Call mark_used instead of
10474 assemble_external.
10475 * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
10476 alloc_eh_object, expand_throw): Likewise.
10477 * init.c (build_builtin_delete_call): Likewise.
10478 * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
10479 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
10480 expand_generic_desc): Likewise.
10481
10482 1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
10483
10484 * tree.c (equal_functions): New function.
10485 (ovl_member): Call it.
10486
10487 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
10488
10489 * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
10490
10491 1999-01-25 Martin von Loewis <loewis@informatik.hu-berlin.de>
10492
10493 * decl.c (decls_match): Return 1 if old and new are identical.
10494 (push_overloaded_decl): Set OVL_USED when PUSH_USING.
10495
10496 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
10497
10498 * decl.c (start_function): Make member functions one_only on windows.
10499 * decl2.c (import_export_decl): Likewise.
10500
10501 * decl.c (grokdeclarator): Don't complain about implicit int in
10502 a system header. Change same-name field check to not complain in
10503 a system header instead of within extern "C".
10504
10505 1999-01-21 Mark Mitchell <mark@markmitchell.com>
10506
10507 * cp-tree.h (PUSH_GLOBAL): New macro.
10508 (PUSH_LOCAL): Likewise.
10509 (PUSH_USING): Likewise.
10510 (namespace_bindings_p): Declare.
10511 (push_overloaded_decl): Likewise.
10512 * decl.c (push_overloaded_decl): Don't make it static. Check for
10513 illegal declarations after using declarations here.
10514 (namespace_bindings_p): Likewise.
10515 (duplicate_decls): Don't consider declarations from different
10516 namespaces to be the same.
10517 (pushdecl): Use symbolic PUSH_ constants in calls to
10518 push_overloaded_decl.
10519 (push_overloaded_decl_1): Likewise.
10520 * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
10521 (do_nonmember_using_decl): Check for illegal using declarations
10522 after ordinary declarations here.
10523 (do_local_using_decl): Call pushdecl to insert declarations.
10524
10525 1999-01-21 Jason Merrill <jason@yorick.cygnus.com>
10526
10527 * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
10528
10529 1999-01-21 Mark Mitchell <mark@markmitchell.com>
10530
10531 * tree.c (build_cplus_array_type_1): Don't call build_array_type
10532 for types involving template parameters.
10533
10534 * cp-tree.h (PARM_DECL_EXPR): Delete.
10535 (convert_default_arg): Change prototype.
10536 (check_default_argument): Declare.
10537 (search_tree): Likewise.
10538 * call.c (convert_default_arg): Take the function to which the
10539 default argument belongs as a parameter, and do any necessary
10540 instantiation here, instead of ...
10541 (build_over_call): Here.
10542 * decl.c (local_variable_p): New function.
10543 (check_default_argument): Likewise, split out and tidied from ...
10544 (grokparms): Here.
10545 * error.c (dump_expr): Don't set PARM_DECL_EXPR.
10546 * pt.c (tsubst_call_declarator_parms): New function.
10547 (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing
10548 with CALL_EXPRs, rather than trying to be clever.
10549 (tsubst): Use tsubst_call_declarator_parms.
10550 * tree.c (search_tree): Don't make it static.
10551 * typeck.c (convert_arguments): Use new interface to
10552 convert_default_arg.
10553
10554 1999-01-20 Mark Mitchell <mark@markmitchell.com>
10555
10556 * error.c (dump_function_decl): Don't print the argument types for
10557 a function when the verbosity level is negative.
10558
10559 * call.c (build_over_call): Check format attributes at call-time.
10560
10561 * pt.c (tsubst_copy): Fix comment.
10562 (unify): Don't allow unification with variable-sized arrays.
10563
10564 * semantics.c (finish_stmt_expr): When processing a template make
10565 the BIND_EXPR long-lived.
10566
10567 1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
10568
10569 * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
10570 (import_export_vtable): Not here.
10571
10572 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
10573
10574 * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
10575 non-static member function.
10576
10577 1999-01-18 Nathan Sidwell <nathan@acm.org>
10578
10579 * class.c (instantiate_type): Only diagnose illegal address of member
10580 function if complaining.
10581
10582 * decl.c (lookup_name_real): Remove duplicate code.
10583
10584 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
10585
10586 * tree.c (copy_template_template_parm): Use permanent_obstack.
10587
10588 1999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
10589
10590 * pt.c (unify): Remove restrictions on deduction of argument
10591 of template template parameters.
10592
10593 1999-01-18 Nathan Sidwell <nathan@acm.org>
10594
10595 * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
10596
10597 * class.c (resolve_address_of_overloaded_function): Show list of
10598 all candidates, when none of them match.
10599
10600 1999-01-18 Chip Salzenberg <chip@perlsupport.com>
10601
10602 * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
10603 definition of 'casting away const' in reinterpret_cast<>.
10604
10605 1999-01-18 Graham <grahams@rcp.co.uk>
10606
10607 * cvt.c: Add include for decl.h, remove extern for
10608 static_aggregates which is now provided by decl.h.
10609
10610 * Makefile.in (cvt.o): Add dependency for decl.h and missing
10611 dependencies for convert.h and flags.h.
10612
10613 1999-01-18 Nathan Sidwell <nathan@acm.org>
10614
10615 * decl2.c (do_dtors): Set current location to that of the
10616 decl, for sensible diagnostics and debugging.
10617 (check_classfn): Issue `incomplete type' error, if
10618 class is not defined.
10619
10620 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
10621
10622 * cp-tree.h: Add prototype for bound_pmf_p.
10623
10624 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
10625 Manfred Hollstein <manfred@s-direktnet.de>
10626
10627 * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
10628 -Wreturn-type.
10629
10630 1999-01-16 Nathan Sidwell <nathan@acm.org>
10631
10632 * cp-tree.h (struct lang_type): Added has_mutable flag.
10633 (CLASSTYPE_HAS_MUTABLE): New macro to access it.
10634 (TYPE_HAS_MUTABLE_P): New macro to read it.
10635 (cp_has_mutable_p): Prototype for new function.
10636 * class.c (finish_struct_1): Set has_mutable from members.
10637 * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
10638 it contains a mutable.
10639 * typeck.c (cp_has_mutable_p): New function.
10640
10641 1999-01-15 Mark Mitchell <mark@markmitchell.com>
10642
10643 * pt.c (process_template_parm): Ignore top-level qualifiers on
10644 non-type parameters.
10645
10646 * decl.c (start_function): Use current_function_parms in the call
10647 to require_complete_type_for_parms, not the probably empty
10648 DECL_ARGUMENTS.
10649
10650 1999-01-14 Jason Merrill <jason@yorick.cygnus.com>
10651
10652 * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
10653
10654 * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
10655 that we don't suppress the other copies.
10656 * lex.c (handle_cp_pragma): Likewise.
10657
10658 1999-01-13 Mark Mitchell <mark@markmitchell.com>
10659
10660 * decl.c (grokdeclarator): Undo 1998-12-14 change.
10661 * tree.c (build_cplus_array_type_1): Likewise.
10662 * pt.c (instantiate_class_template): Remove misleading comment.
10663 (tsubst_aggr_type): Substitute if there are template parameters,
10664 regardless of whether or not they use template arguments.
10665 (unify): Likewise, but for unification.
10666
10667 1999-01-12 Richard Henderson <rth@cygnus.com>
10668
10669 * cp-tree.h (flag_permissive): Declare extern.
10670
10671 1999-01-06 Mark Mitchell <mark@markmitchell.com>
10672
10673 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
10674 here.
10675 (lang_type): Add is_partial_instantiation. Decrease width of
10676 dummy.
10677 (PARTIAL_INSTANTIATION_P): New macro.
10678 (OPERATOR_TYPENAME_P): Remove.
10679 * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
10680 OPERATOR_TYPENAME_P.
10681 (grok_op_properties): Likewise.
10682 * friend.c (do_friend): Handle friends that are member functions
10683 correctly.
10684 * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
10685 * pt.c (instantiate_class_template): Rework for clarity. Avoid
10686 leaving TYPE_BEING_DEFINED set in obscure cases. Don't do
10687 any more partial instantiation than is absolutely necessary for
10688 implicit typename. Set PARTIAL_INSTANTIATION_P.
10689 (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
10690 * semantics.c (begin_class_definition): Handle partial
10691 specializations of a type that was previously partially
10692 instantiated.
10693
10694 Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
10695
10696 * g++spec.c (LIBSTDCXX): Provide default definition.
10697 (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
10698
10699 Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10700
10701 * Make-lang.in (g++.o): Depend on prefix.h.
10702
10703 1999-01-04 Jason Merrill <jason@yorick.cygnus.com>
10704
10705 * tree.c (bound_pmf_p): New fn.
10706 * typeck.c (build_c_cast): Use it.
10707
10708 * decl.c (grok_op_properties): Use same_type_p.
10709
10710 Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10711
10712 * Makefile.in (cvt.o): Depend on toplev.h.
10713
10714 * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
10715
10716 * cvt.c: Include toplev.h.
10717
10718 * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
10719 definitions.
10720
10721 * init.c (expand_vec_init): Initialize variable `itype'.
10722
10723 * lex.c (yyerror): Cast the argument passed to a ctype function to
10724 an unsigned char.
10725
10726 * method.c (build_mangled_C9x_name): Wrap prototype and definition
10727 in "HOST_BITS_PER_WIDE_INT >= 64".
10728
10729 * typeck.c (build_binary_op): Mark parameter `convert_p' with
10730 ATTRIBUTE_UNUSED.
10731
10732 1998-12-22 Mark Mitchell <mark@markmitchell.com>
10733
10734 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
10735 * tree.c (build_exception_variant): Don't crash on empty throw
10736 specs.
10737
10738 1998-12-18 DJ Delorie <dj@cygnus.com>
10739
10740 * cvt.c (convert_to_reference): Check for both error_mark_node
10741 and NULL_NODE after call to convert_for_initialization.
10742
10743 1998-12-17 Jason Merrill <jason@yorick.cygnus.com>
10744
10745 * error.c (interesting_scope_p): New fn.
10746 (dump_simple_decl): Use it.
10747 (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
10748 (dump_expr, case OFFSET_REF): Print ->* if appropriate.
10749
10750 1998-12-16 Mark Mitchell <mark@markmitchell.com>
10751
10752 * class.c (resolve_address_of_overloaded_function): Do conversion
10753 to correct type here, rather than ...
10754 (instantiate_type): Here.
10755
10756 * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
10757 (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
10758 (decl_template_parm_p): Remove.
10759 * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
10760 parameter.
10761 * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
10762 * pt.c (push_inline_template_parms_recursive): Set it.
10763 (decl_template_parm_p): Remove.
10764 (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
10765 (process_template_parm): Set it.
10766
10767 Wed Dec 16 16:33:58 1998 Dave Brolley <brolley@cygnus.com>
10768
10769 * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
10770 if configured with cpplib.
10771
10772 1998-12-15 Mark Mitchell <mark@markmitchell.com>
10773
10774 * decl.c (poplevel): Make sure ns_binding is initialized.
10775
10776 * decl.c (finish_function): Undo inadvertent change in previous
10777 patch.
10778
10779 1998-12-14 Mark Mitchell <mark@markmitchell.com>
10780
10781 * class.c (pushclass): Tweak handling of class-level bindings.
10782 (resolve_address_of_overloaded_function): Update pointer-to-member
10783 handling.
10784 (instantiate_type): Likewise.
10785 * cvt.c (cp_convert_to_pointer): Likewise.
10786 * decl.c (pop_binding): Take the DECL to pop, not just the name.
10787 Deal with `struct stat' hack.
10788 (binding_level): Add to documentation.
10789 (push_binding): Clear BINDING_TYPE.
10790 (add_binding): New function.
10791 (push_local_binding): Use it.
10792 (push_class_binding): Likewise.
10793 (poplevel): Adjust calls to pop_binding.
10794 (poplevel_class): Likewise.
10795 (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
10796 declarations to current binding level.
10797 (push_class_level_binding): Likewise.
10798 (push_overloaded_decl): Adjust handling of OVERLOADs in local
10799 bindings.
10800 (lookup_namespace_name): Don't crash when confronted with a
10801 TEMPLATE_DECL.
10802 (lookup_name_real): Do `struct stat' hack in local binding
10803 contexts.
10804 (build_ptrmemfunc_type): Adjust documentation.
10805 (grokdeclarator): Don't avoid building real array types when
10806 processing templates unless really necessary.
10807 (finish_method): Adjust calls to pop_binding.
10808 * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
10809 not reparse_decl_as_expr.
10810 (build_expr_from_tree): Deal with a template-id as the function to
10811 call in a METHOD_CALL_EXPR.
10812 * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
10813 (maybe_adjust_types_For_deduction): Don't do peculiar things with
10814 METHOD_TYPEs here.
10815 (resolve_overloaded_unification): Handle COMPONENT_REFs. Build
10816 pointer-to-member types where necessary.
10817 * tree.c (build_cplus_array_type_1): Don't avoid building real
10818 array types when processing templates unless really necessary.
10819 (build_exception_variant): Compare the exception lists correctly.
10820
10821 1998-12-13 Mark Mitchell <mark@markmitchell.com>
10822
10823 * cp-tree.def (CPLUS_BINDING): Update documentation.
10824 * cp-tree.h (LOCAL_BINDING_P): New macro.
10825 (lang_identifier): Rename local_value to bindings.
10826 (tree_binding): Make `scope' of type `void*', not `tree'.
10827 (BINDING_SCOPE): Update documentation.
10828 (IDENTIFIER_LOCAL_VALUE): Remove.
10829 (IDENTIFIER_CLASS_VALUE): Document.
10830 (IDENTIFIER_BINDING): New macro.
10831 (IDENTIFIER_VALUE): Likewise.
10832 (TIME_IDENTIFIER_TIME): Likewise.
10833 (TIME_IDENTIFIER_FILEINFO): Likewise.
10834 (IMPLICIT_TYPENAME_P): Likewise.
10835 (set_identifier_local_value): Remove.
10836 (push_local_binding): New function.
10837 (push_class_binding): Likewise.
10838 * class.c (pushclass): Update comments; use push_class_binding.
10839 * decl.c (set_identifier_local_value_with_scope): Remove.
10840 (set_identifier_local_value): Likewise.
10841 (push_binding): New function.
10842 (pop_binding): Likewise.
10843 (binding_level): Update documentation. Remove shadowed.
10844 (BINDING_LEVEL): New macro.
10845 (free_binding_nodes): New variable.
10846 (poplevel): Adjust for new name-lookup scheme. Don't mess up
10847 BLOCK_VARs when doing for-scope extension. Remove effectively
10848 dead code.
10849 (pushlevel_class): Tweak formatting.
10850 (poplevel_class): Adjust for new name-lookup scheme.
10851 (print_binding_level): Likewise.
10852 (store_bindings): Likewise.
10853 (pushdecl): Likewise.
10854 (pushdecl_class_level): Likewise.
10855 (push_class_level_binding): Likewise.
10856 (push_overloaded_decl): Update comments. Adjust for new
10857 name-lookup scheme.
10858 (lookup_name_real): Likewise.
10859 (lookup_name_current_level): Likewise.
10860 (cp_finish_decl): Likewise.
10861 (require_complete_types_for_parms): Likewise. Remove misleading
10862 #if 0'd code.
10863 (grok_parms): Likewise. Don't call
10864 require_complete_types_for_parms here.
10865 (grok_ctor_properties): Don't treat templates as copy
10866 constructors.
10867 (grop_op_properties): Or as assignment operators.
10868 (start_function): Document. Adjust for new name-lookup scheme.
10869 (finish_function): Likewise.
10870 * decl2.c (do_local_using_decl): Use push_local_binding.
10871 * lex.c (begin_definition_of_inclass_inline): New function, split
10872 out from ...
10873 (do_pending_inlines): Here, and ...
10874 (process_next_inline): Here.
10875 (get_time_identifier): Use TIME_IDENTIFIER_* macros.
10876 (init_filename_times): Likewise.
10877 (extract_interface_info): Likewise.
10878 (ste_typedecl_interface_info): Likewise.
10879 (check_newline): Likewise.
10880 (dump_time_statistics): Likewise.
10881 (handle_cp_pragma): Likewise.
10882 (do_identifier): Adjust for new name-lookup scheme.
10883 * parse.y (function_try_block): Return ctor_initializer_opt value.
10884 (fndef): Use it.
10885 (fn.defpen): Pass appropriate values to start_function.
10886 (pending_inline): Use functor_try_block value, and pass
10887 appropriate values to finish_function.
10888 * pt.c (is_member_template): Update documentation; remove handling
10889 of FUNCTION_DECLs. As per name, this function should deal only in
10890 TEMPLATE_DECLs.
10891 (decl_template_parm_p): Change name of olddecl parameter to decl.
10892 (check_template_shadow): Adjust for new name-lookup scheme.
10893 (lookup_template_class): Likewise.
10894 (tsubst_decl): Tweak so as not to confuse member templates with
10895 copy constructors and assignment operators.
10896 (unify): Handle UNION_TYPEs.
10897 * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
10898 (lang_print_xnode): Adjust for new name-lookup scheme.
10899 * typeck.c (mark_addressable): Likewise.
10900 (c_expand_return): Likewise.
10901
10902 1998-12-08 Jason Merrill <jason@yorick.cygnus.com>
10903
10904 * decl.c (grokdeclarator): Allow field with same name as class
10905 in extern "C".
10906
10907 * decl.c (lookup_name_real): Don't limit field lookup to types.
10908 * class.c (check_member_decl_is_same_in_complete_scope): No error
10909 if icv and x are the same.
10910 * lex.c (do_identifier): Tweak error message.
10911
10912 1998-12-10 Mark Mitchell <mark@markmitchell.com>
10913
10914 * decl.c (start_enum): Use push_obstacks, not
10915 end_temporary_allocation.
10916 (finish_enum): Call pop_obstacks.
10917
10918 1998-12-10 Mark Mitchell <mark@markmitchell.com>
10919
10920 * class.c (instantiate_type): Return error_mark_node rather than
10921 junk.
10922
10923 1998-12-09 Mark Mitchell <mark@markmitchell.com>
10924
10925 * cp-tree.h (most_specialized_instantiation): New function.
10926 (print_candidates): Likewise.
10927 * class.c (validate_lhs): Remove.
10928 (resolve_address_of_overloaded_function): New function, split out
10929 and then substantially reworked, from ...
10930 (instantiate_type): Use it. Simplify.
10931 * cvt.c (convert_to_reference): Complain when caller has indicated
10932 that's the right thing to do. Don't crash if instantiate_type
10933 fails.
10934 * pt.c: Substitute `parameters' for `paramters' throughout.
10935 (print_candidates): Don't make it static.
10936 (most_specialized_instantiation): Split out from ...
10937 (most_specialized): Here.
10938
10939 Wed Dec 9 15:33:01 1998 Dave Brolley <brolley@cygnus.com>
10940
10941 * lex.c (lang_init_options): Initialize cpplib.
10942 * decl2.c (parse_options,cpp_initialized): Removed.
10943 (lang_decode_option): Move initialization of cpplib to
10944 lang_init_options.
10945
10946 1998-12-09 Mark Mitchell <mark@markmitchell.com>
10947
10948 * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
10949 well as the TYPE_DECL, when a typedef name is assigned to a
10950 previously anonymous type.
10951
10952 1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
10953
10954 * cp/except.c (call_eh_info): Use __start_cp_handler instead of
10955 __cp_eh_info for getting the eh info pointer. Add table_index to
10956 field list.
10957 (push_eh_cleanup): Don't increment 'handlers' data field.
10958 (process_start_catch_block): Don't set the 'caught' field.
10959
10960 * cp/exception.cc (CP_EH_INFO): New macro for getting the
10961 exception info pointer within library routines.
10962 (__cp_eh_info): Use CP_EH_INFO.
10963 (__start_cp_handler): Get exception info pointer, set caught field,
10964 and increment the handlers field. Avoids this being done by handlers.
10965 (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
10966 (uncaught_exception): Use CP_EH_INFO macro.
10967
10968 Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com)
10969
10970 * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
10971
10972 Mon Dec 7 17:56:06 1998 Mike Stump <mrs@wrs.com>
10973
10974 * lex.c (check_newline): Add support for \ as `natural'
10975 characters in file names in #line to be consistent with #include
10976 handling. We support escape processing in the # 1 "..." version of
10977 the command. See also support in cp/lex.c.
10978
10979 1998-12-07 Zack Weinberg <zack@rabi.phys.columbia.edu>
10980
10981 * cp/decl2.c: s/data/opts/ when initializing cpp_reader
10982 structure.
10983
10984 1998-12-07 Jason Merrill <jason@yorick.cygnus.com>
10985
10986 * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
10987
10988 * error.c (dump_simple_decl): Also print namespace context.
10989 (dump_function_decl): Likewise.
10990
10991 * decl2.c (ambiguous_decl): Don't print old value if it's
10992 error_mark_node.
10993
10994 * decl.c (lookup_name_real): Fix handling of local types shadowed
10995 by a non-type decl. Remove obsolete code.
10996 * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
10997
10998 * lang-options.h: Add -fpermissive.
10999 * decl2.c: Likewise.
11000 * cp-tree.h: Add flag_permissive.
11001 * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
11002 were specified, set flag_pedantic_errors.
11003 * call.c (build_over_call): Turn dropped qualifier messages
11004 back into pedwarns.
11005 * cvt.c (convert_to_reference): Likewise.
11006 * typeck.c (convert_for_assignment): Likewise.
11007
11008 1998-12-05 Jason Merrill <jason@yorick.cygnus.com>
11009
11010 * decl2.c (coerce_new_type): Use same_type_p.
11011 (coerce_delete_type): Likewise.
11012
11013 * call.c (check_dtor_name): Return 1, not error_mark_node.
11014
11015 1998-12-04 Jason Merrill <jason@yorick.cygnus.com>
11016
11017 * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
11018 if MULTIPLE_SYMBOL_SPACES.
11019
11020 * pt.c (check_template_shadow): New fn.
11021 * decl2.c (grokfield): Use it.
11022 * decl.c (pushdecl): Likewise.
11023 (pushdecl_class_level): Likewise.
11024 (start_method): Likewise.
11025 (xref_tag): Don't try to use 't' if we're defining.
11026
11027 * call.c (check_dtor_name): Just return an error_mark_node.
11028 * pt.c (lookup_template_class): Complain about using non-template here.
11029 * parse.y (apparent_template_type): Not here.
11030
11031 * pt.c (check_explicit_specialization): Complain about specialization
11032 with C linkage.
11033
11034 * lang-options.h: Add -f{no-,}implicit-inline-templates.
11035
11036 * pt.c (convert_nontype_argument): Don't assume that any integer
11037 argument is intended to be a constant-expression.
11038
11039 1998-12-03 Mark Mitchell <mark@markmitchell.com>
11040
11041 * class.c (handle_using_decl): Fix comment. Don't lookup
11042 constructors in base classes.
11043 (validate_lhs): Fix typo in comment.
11044 * search.c (lookup_field_1): Don't return a USING_DECL.
11045
11046 * cp-tree.h (DECL_ACCESS): Improve documentation.
11047
11048 * decl.c (expand_static_init): Don't set the initialization-done
11049 flag until the initialization is done.
11050
11051 1998-12-02 Mark Mitchell <mark@markmitchell.com>
11052
11053 * decl2.c (validate_nonmember_using_decl): Complain about using
11054 declarations for class members.
11055
11056 1998-11-29 Jason Merrill <jason@yorick.cygnus.com>
11057
11058 * typeck2.c (process_init_constructor): Use same_type_p.
11059
11060 * decl.c (check_tag_decl): Don't warn about null decl inside a
11061 class.
11062
11063 * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
11064 UNIFY_ALLOW_NONE.
11065 (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
11066 (resolve_overloaded_unification): Strip baselinks.
11067
11068 Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11069
11070 * g++spec.c: Don't prototype xmalloc.
11071
11072 1998-11-25 Jason Merrill <jason@yorick.cygnus.com>
11073
11074 * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
11075
11076 * decl.c (check_tag_decl): Do complain about null friend decl at
11077 file scope.
11078
11079 1998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
11080
11081 * lex.c (make_lang_type): Clear the whole struct lang_type, not
11082 only the first multiple of sizeof (int).
11083
11084 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
11085
11086 * decl.c (start_decl): An explicit specialization of a static data
11087 member is only a definition if it has an initializer.
11088
11089 * except.c (expand_throw): Use cp_finish_decl for the throw temp.
11090 * cvt.c (build_up_reference): Pass DIRECT_BIND down into
11091 cp_finish_decl.
11092 * init.c (expand_default_init): Check for DIRECT_BIND instead of
11093 DECL_ARTIFICIAL.
11094
11095 * call.c (build_over_call): Use build_decl.
11096
11097 * except.c (expand_throw): Just use convert, not
11098 build_reinterpret_cast.
11099
11100 * lex.c (handle_generic_pragma): Use token_buffer.
11101
11102 * decl.c (check_tag_decl): Don't complain about null friend decl.
11103
11104 1998-11-24 Dave Pitts <dpitts@cozx.com>
11105
11106 * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
11107 first position.
11108 * lex.c (check_newline): Use ISALPHA.
11109 (readescape): Use ISGRAPH.
11110 (yyerror): Use ISGRAPH.
11111
11112 1998-11-24 Nathan Sidwell <nathan@acm.org>
11113
11114 * search.c (get_abstract_virtuals): Do not use initial
11115 CLASSTYPE_ABSTRACT_VIRTUALS.
11116 * typeck2.c (abstract_virtuals_error): Show location of abstract
11117 declaration.
11118 * call.c (build_new_method_call): Use
11119 CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
11120 * class.c (finish_struct_bits): Don't bother working out whether
11121 get_abstract_virtuals will do anything, just do it.
11122
11123 1998-11-24 Graham <grahams@rcp.co.uk>
11124
11125 * typeck.c (build_component_ref): Remove unused statement.
11126
11127 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
11128
11129 * class.c (add_method): Catch invalid overloads.
11130
11131 * class.c (add_method): Build up OVERLOADs properly for conversion ops.
11132 * search.c (lookup_conversions): Handle getting real OVERLOADs.
11133 (add_conversions): Likewise. Revert last change.
11134 * call.c (add_conv_candidate): Pass totype to add_candidate instead
11135 of fn. Don't add a new candidate if the last one was for the same
11136 type.
11137 (print_z_candidates): Handle getting a type as a function.
11138 (joust): If we got two conversion candidates to the same type,
11139 just pick one.
11140 (build_object_call): Lose 'templates'.
11141 (build_user_type_conversion_1): Handle getting real OVERLOADs.
11142
11143 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
11144
11145 * typeck2.c (process_init_constructor): If there are elements
11146 that don't have initializers and they need to have constructors
11147 run, supply them with initializers.
11148
11149 * class.c (finish_struct_1): A class with a 0-width bitfield is
11150 still empty.
11151
11152 1998-11-23 Mark Mitchell <mark@markmitchell.com>
11153
11154 * pt.c (instantiate_class_template): Don't try to figure out what
11155 specialization to use for a partial instantiation. Correct
11156 typos in a couple of comments. Avoid calling uses_template_parms
11157 multiple times.
11158
11159 1998-11-23 Benjamin Kosnik <bkoz@cygnus.com>
11160
11161 * method.c (process_overload_item): Add call to
11162 build_mangled_C9x_name for intTI_type_nodes.
11163 (build_mangled_C9x_name): Add prototype, define.
11164 * decl.c (init_decl_processing): Add names for
11165 TImode_type_node.
11166
11167 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
11168
11169 * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
11170
11171 * class.c (finish_struct_1): Set things up for 0-width bitfields
11172 like we do for others.
11173
11174 * decl.c (check_tag_decl): New fn.
11175 (shadow_tag): Split out from here.
11176 * decl2.c (grok_x_components): Call it.
11177
11178 1998-11-22 Jason Merrill <jason@yorick.cygnus.com>
11179
11180 * decl.c: Lose warn_about_return_type.
11181 (grokdeclarator): Always complain about implicit int, except for
11182 `main () { ... }'.
11183
11184 * decl.c (tag_name): New fn.
11185 (xref_tag): Complain about using typedef-name after class-key.
11186
11187 * init.c (expand_vec_init): Also keep going if from_array.
11188
11189 * tree.c (is_overloaded_fn): Also handle the output of
11190 build_offset_ref.
11191
11192 * decl.c (grokdeclarator): Use constructor_name when comparing
11193 field name against enclosing class.
11194 * class.c (finish_struct_anon): Likewise.
11195
11196 1998-11-22 Mark Mitchell <mark@markmitchell.com>
11197
11198 * decl.c (poplevel): Remove code to handle KEEP == 2.
11199 (finish_function): Don't confuse BLOCK-order when
11200 processing a destructor.
11201
11202 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
11203
11204 * decl.c (require_complete_types_for_parms): Call layout_decl
11205 after we've completed the type.
11206
11207 1998-11-21 Martin von Löwis <loewis@informatik.hu-berlin.de>
11208
11209 * decl2.c (validate_nonmember_using_decl): Allow using templates
11210 from the global namespace.
11211
11212 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
11213
11214 Handle specifying template args to member function templates.
11215 * tree.c (build_overload): Always create an OVERLOAD for a template.
11216 * search.c (add_conversions): Handle finding an OVERLOAD.
11217 * decl2.c (check_classfn): Likewise.
11218 * lex.c (identifier_type): See through a baselink.
11219 * parse.y (do_id): Don't call do_identifier if we got a baselink.
11220 * class.c (instantiate_type, case TREE_LIST): Recurse.
11221
11222 * decl.c (grokdeclarator): Allow a boolean constant for array
11223 bounds, odd as that sounds.
11224
11225 * pt.c (unify): Be more strict about non-type parms, except for
11226 array bounds.
11227 (UNIFY_ALLOW_INTEGER): New macro.
11228
11229 1998-11-19 Manfred Hollstein <manfred@s-direktnet.de>
11230
11231 * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
11232
11233 1998-11-19 Jason Merrill <jason@yorick.cygnus.com>
11234
11235 * semantics.c (begin_class_definition): Call
11236 maybe_process_partial_specialization before push_template_decl.
11237 Don't call push_template_decl for a specialization.
11238 * search.c (lookup_field): Do return a member template class.
11239 * decl2.c (handle_class_head): Handle member template classes.
11240
11241 * decl.c (grokdeclarator): A parm type need not be complete.
11242
11243 * pt.c (convert_nontype_argument): Fix thinko.
11244
11245 1998-11-18 Mark Mitchell <mark@markmitchell.com>
11246
11247 * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
11248 (global_delete_fndecl): New variable.
11249 * decl.c (global_delete_fndecl): Define it.
11250 (init_decl_processing): Set it.
11251 * init.c (build_builtin_delete_call): Use it.
11252 * tree.c (mapcar): Recursively call mapcar for the type of EXPR
11253 nodes.
11254
11255 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
11256
11257 * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
11258 type.
11259
11260 * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
11261 * call.c (build_object_call): Also support references to functions.
11262 * typeck.c (convert_for_initialization): Don't decay a function
11263 if the target is a reference to function.
11264
11265 * search.c (add_conversions): Get all the overloads from a class.
11266
11267 * decl.c (grok_ctor_properties): Complain about any constructor
11268 that will take a single arg of the class type by value.
11269
11270 * typeck2.c (build_functional_cast): Can't create objects of
11271 abstract classes this way.
11272 * cvt.c (ocp_convert): Likewise.
11273
11274 * decl.c (grokfndecl): Member functions of local classes are not
11275 public.
11276
11277 1998-11-18 Mark Mitchell <mark@markmitchell.com>
11278
11279 * Make-lang.in (cc1plus): Add dependency on hash.o.
11280
11281 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
11282
11283 * search.c (get_abstract_virtuals): Complain about virtuals with
11284 no final overrider.
11285 * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
11286 with no final overrider.
11287 * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
11288 on virtuals with no final overrider.
11289
11290 * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
11291
11292 * class.c (finish_struct_1): Don't remove zero-width bit-fields until
11293 after layout_type.
11294
11295 * friend.c (do_friend): Don't set_mangled_name_for_decl.
11296
11297 * class.c (finish_struct_anon): Complain about non-fields.
11298 * decl2.c (build_anon_union_vars): Likewise.
11299
11300 * decl.c (grokdeclarator): Normal data members can't have the same
11301 name as the class, either.
11302 * class.c (finish_struct_anon): Neither can members of an
11303 anonymous union.
11304
11305 1998-11-17 Mark Mitchell <mark@markmitchell.com>
11306
11307 * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
11308 (TYPE_BINFO): Likewise.
11309 (IS_AGGR_TYPE): Tweak.
11310 (SET_IS_AGGR_TYPE): New macro.
11311 (CLASS_TYPE_P): Tweak.
11312 (lang_type): Group mark bitfields together. Remove linenum.
11313 (CLASSTYPE_SOURCE_LINE): Remove macro.
11314 (CLASSTYPE_MARKED_N): New macro.
11315 (SET_CLASSTYPE_MARKED_N): Likewise.
11316 (CLEAR_CLASSTYPE_MARKED_N): Likewise.
11317 (CLASS_TYPE_MARKED_*): Use them.
11318 (SET_CLASSTYPE_MARKED_*): Likewise.
11319 (CLEAR_CLASSTYPE_MARKED_*): Likewise.
11320 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
11321 (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
11322 (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
11323 * class.c (class_cache_obstack): New variable.
11324 (class_cache_firstobj): Likewise.
11325 (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
11326 (pushclass): Free the cache, when appropriate.
11327 (popclass): Tidy.
11328 (maybe_push_cache_obstack): Use class_cache_obstack.
11329 * decl.c (include hash.h).
11330 (typename_hash): New function.
11331 (typename_compare): Likewise.
11332 (build_typename_type): Check the hash table to avoid creating
11333 duplicates.
11334 (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
11335 (grokdeclarator): Use CLASS_TYPE_P.
11336 (xref_basetypes): Likewise.
11337 (start_function): Likewise. Don't put current_class_ref on the
11338 permanent obstack.
11339 * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
11340 and TYPE_TI_ARGS.
11341 * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
11342 (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
11343 fields for types other than class types. Do clear TYPE_ALIAS_SET
11344 for types other than class types, though.
11345 * method.c (build_overload_identifier): Use CLASS_TYPE_P and
11346 TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11347 * pt.c (process_template_parm): Don't set
11348 CLASSTYPE_GOT_SEMICOLON.
11349 (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11350 Coerce arguments on the momentary obstack.
11351 (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11352 (instantiate_class_template): Calculate template arguments on the
11353 momentary obstack. Tidy.
11354 (tsubst_template_arg_vector): Use make_temp_vec.
11355 (tsubst_aggr_type): Put template arguments on the momentary
11356 obstack.
11357 (tsubst_decl): Likewise.
11358 (tsubst): Copy the array bounds index to the permanent obstack
11359 before building index types. Use new macros.
11360 (unify): Use new macros.
11361 (do_type_instantiation): Likewise.
11362 * search.c (lookup_fnfields_1): Use new macros.
11363 (dfs_pushdecls): Build envelopes on the cache obstack.
11364 (dfs_compress_decls): Use new macros.
11365 (push_class_decls): Build on the cache obstack.
11366 * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
11367 * sign.c (build_signature_pointer_or_reference_type): Use
11368 SET_IS_AGGR_TYPE.
11369 * tree.c (make_binfo): Check CLASS_TYPE_P.
11370 (copy_template_template_parm): Adjust.
11371 (make_temp_vec): Use push_expression_obstack.
11372 * typeck.c (complete_type): Use new macros.
11373 (comptypes): Likewise.
11374
11375 1998-11-17 Jason Merrill <jason@yorick.cygnus.com>
11376
11377 * pt.c (tsubst): Add diagnostics for invalid array, reference
11378 and pointer to member types.
11379
11380 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
11381
11382 * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
11383
11384 * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
11385 Simplify.
11386
11387 * parse.y (structsp): Fix cut-and-paste error.
11388
11389 * init.c (build_new): Complain about non-integral size.
11390
11391 * parse.y (unary_expr): Complain about defining types in sizeof.
11392
11393 * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
11394
11395 * rtti.c (build_x_typeid): Complain about typeid without
11396 including <typeinfo>.
11397 (get_typeid): Likewise. Complain about typeid of incomplete type.
11398 (get_tinfo_fn_dynamic): Likewise.
11399 (get_typeid_1): Not static anymore.
11400 * except.c (build_eh_type_type): Use get_typeid_1.
11401
11402 * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
11403 ambiguous or private bases. Fix warning for reference cast.
11404
11405 1998-11-16 Mark Mitchell <mark@markmitchell.com>
11406
11407 * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
11408 * decl.c (duplicate_decls): Remove special-case code to deal with
11409 template friends, and just do the obvious thing.
11410 * pt.c (register_specialization): Tweak for clarity, and also to
11411 clear DECL_INITIAL for an instantiation before it is merged with a
11412 specialization.
11413 (check_explicit_specialization): Fix indentation.
11414 (tsubst_friend_function): Handle both definitions in friend
11415 declaration and outside friend declarations.
11416 (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
11417 (regenerate_decl_from_template): Tweak accordingly.
11418 (instantiate_decl): Likewise.
11419
11420 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
11421
11422 * decl.c (cplus_expand_expr_stmt): Promote warning about naked
11423 member function reference to error.
11424 * cvt.c (ocp_convert): Complain about converting an overloaded
11425 function to void.
11426
11427 * init.c (build_offset_ref): Just return a lone static member
11428 function.
11429
11430 * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
11431 not internal ones.
11432
11433 * typeck.c (build_binary_op_nodefault): Improve error handling.
11434
11435 * decl.c (grokfndecl): Complain about making 'main' a template.
11436
11437 * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
11438
11439 * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
11440 TYPE_DECL in a template.
11441
11442 1998-11-15 Jason Merrill <jason@yorick.cygnus.com>
11443
11444 * typeck2.c (my_friendly_abort): Add URL in the other case, too.
11445
11446 * decl.c (struct cp_function): Add named_label_uses.
11447 (push_cp_function_context): Save it.
11448 (pop_cp_function_context): Restore it.
11449 (define_label): Also complain about jumping into the scope of
11450 non-POD objects that don't have constructors.
11451 * tree.c (pod_type_p): New fn.
11452
11453 * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
11454 * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
11455 (get_tinfo_fn): Not here.
11456 * repo.c (repo_get_id): Abort if we get called for an incomplete
11457 type.
11458
11459 1998-11-13 Mark Mitchell <mark@markmitchell.com>
11460
11461 * except.c (expand_throw): Make sure first argument to
11462 __cp_push_exception is of type `void*' to avoid spurious error
11463 messages.
11464
11465 1998-11-11 Jason Merrill <jason@yorick.cygnus.com>
11466
11467 * pt.c (try_one_overload): Take orig_targs again. Only check for
11468 mismatches against them; we don't care what a previous call found.
11469 (resolve_overloaded_unification): Adjust.
11470
11471 * search.c (lookup_field): Don't return anything for a non-type
11472 field from a dependent type.
11473 * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
11474 in an array declarator.
11475 (start_decl): Push into the class before looking for the field.
11476
11477 1998-11-08 Mark Mitchell <mark@markmitchell.com>
11478
11479 * method.c (build_overload_value): Handle REFERENCE_TYPE.
11480
11481 1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
11482
11483 * decl.c (grokdeclarator): Allow namespace-scoped members if they
11484 are friends.
11485
11486 1998-11-08 Jason Merrill <jason@yorick.cygnus.com>
11487
11488 * pt.c (tsubst_decl): Don't mess with the global value of an
11489 un-mangled DECL_ASSEMBLER_NAME.
11490
11491 1998-11-03 Christopher Faylor <cgf@cygnus.com>
11492
11493 * decl.c (init_decl_processing): Remove CYGWIN conditional
11494 since CYGWIN is now able to deal with trapping signals.
11495
11496 Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11497
11498 * cp-tree.h: Don't include gansidecl.h.
11499 * exception.cc: Include gansidecl.h (since we don't include config.h)
11500 * g++spec.c: Don't include gansidecl.h.
11501
11502 1998-11-06 Mark Mitchell <mark@markmitchell.com>
11503
11504 * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease
11505 size of dummy.
11506 (DECL_DEFINED_IN_CLASS_P): New macro.
11507 (TEMPLATE_PARMS_FOR_INLINE): Document.
11508 (check_static_variable_definition): New function.
11509 * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
11510 appropriate.
11511 (check_static_variable_definition): Split out from ...
11512 (grokdeclarator): Here.
11513 * pt.c (check_default_tmpl_args): New function, split out from ...
11514 (push_template_decl_real): Here.
11515 (instantiate_template): Fix comment.
11516
11517 1998-11-04 Mark Mitchell <mark@markmitchell.com>
11518
11519 * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
11520 (CP_TYPE_VOLATILE_P): Likewise.
11521 (CP_TYPE_RESTRICT_P): Likewise.
11522
11523 1998-11-03 Mark Mitchell <mark@markmitchell.com>
11524
11525 * pt.c (tsubst): Use build_index_type, not build_index_2_type.
11526
11527 1998-11-02 Jason Merrill <jason@yorick.cygnus.com>
11528
11529 * class.c (instantiate_type): Be more helpful.
11530
11531 * decl2.c (import_export_decl): Call import_export_class.
11532
11533 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
11534 * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
11535 * pt.c (tsubst_copy): Likewise.
11536
11537 1998-11-02 Mark Mitchell <mark@markmitchell.com>
11538
11539 * init.c (expand_vec_init): Fix off-by-one error.
11540
11541 1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
11542
11543 * parse.y (apparent_template_type): New type.
11544 (named_complex_class_head_sans_basetype): Use it.
11545 * Makefile.in (CONFLICTS): One new conflict.
11546 * parse.c: Regenerated.
11547
11548 1998-11-01 Mark Mitchell <mark@markmitchell.com>
11549
11550 * cp-tree.h (COMPARE_STRICT): New macro.
11551 (COMPARE_BASE): Likewise.
11552 (COMPARE_RELAXED): Likewise.
11553 (COMPARE_REDECLARATION): Likewise.
11554 (same_type_p): Likewise.
11555 (same_or_base_type_p): Likewise.
11556 * call.c (standard_conversion): Use them, in place of comptypes
11557 with numeric arguments.
11558 (reference_binding): Likewise.
11559 (convert_like): Likewise.
11560 (build_over_call): Likewise.
11561 (is_subseq): Likewise.
11562 (is_properly_derived_from): Likewise.
11563 (compare_ics): Likewise.
11564 (joust): Likewise.
11565 * class.c (delete_duplicate_fields_1): Likewise.
11566 (resolves_to_fixed_type_p): Likewise.
11567 (instantiate_type): Likewise. Remove #if 0'd code.
11568 * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here.
11569 (pushdecl): Likewise.
11570 (lookup_name_real): Likewise.
11571 (grokdeclarator): Likewise. Check for illegal array declarations.
11572 (grokparms): Likewise.
11573 (grok_op_properties): Likewise.
11574 * decl2.c (check_classfn): Likewise.
11575 * friend.c (is_friend): Likewise.
11576 (make_friend_class): Likewise.
11577 * init.c (expand_aggr_init): Likewise.
11578 (expand_vec_init): Likewise.
11579 * pt.c (is_member_template_class): Remove declaration.
11580 (is_specialization_of): Use COMPARE_* and new macros.
11581 (comp_template_parms): Likewise.
11582 (convert_nontype_argument): Likewise.
11583 (coerce_template_template_parms): Likewise.
11584 (template_args_equal): Likewise.
11585 (lookup_template_class): Likewise.
11586 (type_unification_real): Likewise.
11587 (unify): Likewise.
11588 (get_bindings_real): Likewise.
11589 * search.c (covariant_return_p): Likewise.
11590 (get_matching_virtual): Likewise.
11591 * sig.c (match_method_types): Likewise.
11592 * tree.c (vec_binfo_member): Likewise.
11593 (cp_tree_equal): Likewise.
11594 * typeck.c (common_type): Likewise.
11595 (comp_array_types): Likewise. Get issues involving unknown array
11596 bounds right.
11597 (comptypes): Update comments. Use new flags.
11598 (comp_target_types): Use new macros.
11599 (compparms): Likewise.
11600 (comp_target_parms): Likewise.
11601 (string_conv_p): Likewise.
11602 (build_component_ref): Likewise.
11603 (build_indirect_ref): Likewise.
11604 (build_conditional_expr): Likewise.
11605 (build_static_cast): Likewise.
11606 (build_reinterpret_cast): Likewise.
11607 (build_const_cast): Likewise.
11608 (build_modify_expr): Likewise.
11609 (convert_for_assignment): Likewise.
11610 (comp_ptr_ttypes_real): Likewise.
11611 (ptr_reasonably_similar): Likewise.
11612 (comp_ptr_ttypes_const): Likewise.
11613
11614 1998-10-31 Jason Merrill <jason@yorick.cygnus.com>
11615
11616 * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
11617
11618 1998-10-30 Mark Mitchell <mark@markmitchell.com>
11619
11620 * decl2.c (delete_sanity): Pass integer_zero_node, not
11621 integer_two_node, to build_vec_delete.
11622 * init.c (build_array_eh_cleanup): Remove.
11623 (expand_vec_init_try_block): New function.
11624 (expand_vec_init_catch_clause): Likewise.
11625 (build_vec_delete_1): Don't deal with case that auto_delete_vec
11626 might be integer_two_node anymore.
11627 (expand_vec_init): Rework for initialization-correctness and
11628 exception-correctness.
11629 * typeck2.c (process_init_constructor): Make mutual exclusivity
11630 of cases more obvious.
11631
11632 1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
11633
11634 * decl.c (lookup_name_real): OK, only warn if not lexing.
11635 Simplify suggested fix.
11636
11637 * cp-tree.h (IDENTIFIER_MARKED): New macro.
11638 * search.c (lookup_conversions): Use breadth_first_search.
11639 (add_conversions): Avoid adding two conversions to the same type.
11640 (breadth_first_search): Work with base binfos, rather
11641 than binfos and base indices.
11642 (get_virtual_destructor): Adjust.
11643 (tree_has_any_destructor_p): Adjust.
11644 (get_matching_virtual): Adjust.
11645
11646 * pt.c (push_template_decl_real): Generalize check for incorrect
11647 number of template parms.
11648 (is_member_template_class): #if 0.
11649
11650 1998-10-29 Richard Henderson <rth@cygnus.com>
11651
11652 * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
11653 last.
11654
11655 1998-10-28 Zack Weinberg <zack@rabi.phys.columbia.edu>
11656
11657 * lex.c: Call check_newline from lang_init always. After
11658 calling cpp_start_read, set yy_cur and yy_lim to read from the
11659 cpplib token buffer.
11660
11661 1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
11662
11663 * class.c (instantiate_type): Don't consider templates for a normal
11664 match.
11665
11666 * class.c (finish_struct_1): Don't complain about non-copy
11667 assignment ops in union members.
11668
11669 * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
11670 (prepare_fresh_vtable): Likewise.
11671 (finish_struct_1): Don't call import_export_class.
11672 * decl2.c (finish_vtable_vardecl): Do import/export stuff.
11673 (finish_prevtable_vardecl): Lose.
11674 (finish_file): Don't call it.
11675 * pt.c (instantiate_class_template): Likewise.
11676 * cp-tree.h: Remove it.
11677
11678 * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
11679 * decl.c (finish_function): Not here.
11680 (start_function): Do set DECL_INITIAL.
11681
11682 * pt.c (push_template_decl_real): Complain about default template
11683 args for enclosing classes.
11684
11685 * call.c (add_function_candidate): Treat conversion functions
11686 as coming from the argument's class.
11687 * cp-tree.h (DECL_CONV_FN_P): New fn.
11688 (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
11689 * class.c (add_method): Use DECL_CONV_FN_P.
11690 * decl2.c (check_classfn): Likewise.
11691 * error.c (dump_function_name): Likewise.
11692 (dump_function_decl): Likewise.
11693 * pt.c (fn_type_unification): Likewise.
11694 * search.c (add_conversions): Likewise.
11695
11696 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
11697
11698 * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
11699 * method.c (hack_identifier): Also check for using RESULT_DECL
11700 from outer context.
11701
11702 1998-10-27 Mark Mitchell <mark@markmitchell.com>
11703
11704 * decl.c (grokdeclarator): Use type_quals, rather than constp,
11705 consistently.
11706
11707 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
11708
11709 * call.c (standard_conversion): instantiate_type here.
11710 (reference_binding): And here.
11711 (implicit_conversion): Not here.
11712 (build_op_delete_call): No need to cons up an OVERLOAD.
11713 * cvt.c (cp_convert_to_pointer): instantiate_type here.
11714 (convert_to_reference): And here.
11715 * decl.c (grok_reference_init): Not here.
11716 (grokparms): Or here.
11717 * typeck2.c (digest_init): Or here.
11718 * typeck.c (decay_conversion): Take the address of overloaded
11719 functions, too.
11720 (require_instantiated_type): Lose.
11721 (convert_arguments): Don't handle unknown types here.
11722 (build_c_cast): Likewise.
11723 (build_binary_op): Gut.
11724 (build_conditional_expr): Don't require_instantiated_type.
11725 (build_modify_expr): Likewise.
11726 (build_static_cast): Don't instantiate_type.
11727 (build_reinterpret_cast): Likewise.
11728 (build_const_cast): Likewise.
11729 (convert_for_initialization): Likewise.
11730 (build_ptrmemfunc): Use type_unknown_p.
11731 (convert_for_assignment): Also do default_conversion on overloaded
11732 functions. Hand them off to ocp_convert.
11733
11734 1998-10-26 Mark Mitchell <mark@markmitchell.com>
11735
11736 * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
11737 VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type.
11738
11739 * class.c (finish_struct_1): Use build_cplus_array_type to build
11740 array types.
11741 * decl.c (init_decl_processing): Likewise.
11742 * except.c (expand_end_eh_spec): Likewise.
11743 * search.c (expand_upcast_fixups): Simplify very slightly.
11744
11745 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
11746
11747 * decl.c (grokdeclarator): Complain about a variable using
11748 constructor syntax coming back null from start_decl.
11749
11750 * friend.c (make_friend_class): Complain about trying to make
11751 a non-class type a friend.
11752
11753 * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
11754 (start_function): Not here.
11755
11756 1998-10-26 Brendan Kehoe <brendan@cygnus.com>
11757
11758 * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
11759
11760 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
11761
11762 * typeck2.c (process_init_constructor): Only skip anonymous fields
11763 if they are bitfields.
11764
11765 * cp-tree.def (TYPEOF_TYPE): New code.
11766 * error.c (dump_type_real): Handle it.
11767 * pt.c (tsubst): Likewise.
11768 * tree.c (search_tree): Likewise.
11769 * semantics.c (finish_typeof): New fn.
11770 * parse.y (typespec): Use it.
11771 * cp-tree.h: Declare it.
11772
11773 1998-10-26 Manfred Hollstein <manfred@s-direktnet.de>
11774
11775 * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
11776
11777 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
11778
11779 * typeck.c (convert_arguments): Don't handle pmf references
11780 specially.
11781
11782 * init.c (build_member_call): Don't try to convert to the base type
11783 if it's ambiguous or pedantic.
11784
11785 * typeck2.c (check_for_new_type): Only depend on pedantic for
11786 C-style casts.
11787
11788 1998-10-25 Mark Mitchell <mark@markmitchell.com>
11789
11790 * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
11791 non-converting constructors.
11792
11793 1998-10-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
11794
11795 * gxxint.texi: Correct documentation for n, N, Q, and B.
11796
11797 1998-10-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
11798
11799 * parse.y (condition): Convert VAR_DECL from reference to indirect
11800 reference.
11801
11802 1998-10-23 Andrew MacLeod <amacleod@cygnus.com>
11803
11804 * exception.cc (__cp_pop_exception): Free the original exception
11805 value, not the potentially coerced one.
11806
11807 1998-10-23 Mark Mitchell <mark@markmitchell.com>
11808
11809 * Makefile.in (hash.h): Run gperf when necessary.
11810
11811 * cp-tree.h (CP_TYPE_READONLY): Remove.
11812 (CP_TYPE_VOLATILE): Likewise.
11813 (CP_TYPE_QUALS): New macro.
11814 (CP_TYPE_CONST_P): Likewise.
11815 (CP_TYPE_VOLATILE_P): Likewise.
11816 (CP_TYPE_RESTRICT_P): Likewise.
11817 (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
11818 (cp_build_type_variant): Rename to ...
11819 (cp_build_qualified_type): New function.
11820 (c_apply_type_quals_to_decl): Declare.
11821 (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
11822 (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
11823 (cp_type_qual_from_rid): New function.
11824 (compparms): Remove unused parameter. All callers changed.
11825 (cp_type_quals): New function.
11826 (at_least_as_qualified_p): Likewise.
11827 (more_qualified_p): Likewise.
11828
11829 * call.c (standard_conversion): Replace calls to
11830 cp_build_type_variant with cp_build_qualified_type. Use
11831 CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
11832 compare them. Use CP_TYPE_* macros to check qualifiers.
11833 (reference_binding): Likewise.
11834 (implicit_conversion): Likewise.
11835 (add_builtin_candidates): Likewise.
11836 (build_over_call): Likewise.
11837 * class.c (overrides): Compare all qualifiers, not just `const',
11838 on method declarations.
11839 * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
11840 (convert_pointer_to_real): Likewise.
11841 (type_promotes_to): Likewise.
11842 * decl.c (check_for_uninitialized_const_var): New function.
11843 (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
11844 (cp_finish_decl): Use check_for_uninitialized_const_var.
11845 (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to
11846 handle `restrict'.
11847 (grok_ctor_properties): Likewise.
11848 (grok_op_properties): Likewise.
11849 (start_function): Likewise.
11850 (rever_static_member_fn): Likewise.
11851 * decl2.c (grok_method_quals): Likewise.
11852 (grokfield): Likewise.
11853 * error.c (dump_readonly_or_volatile): Rename to ...
11854 (dump_qualifiers): New function. Handle `restrict'.
11855 (dump_type_real): Use it.
11856 (dump_aggr_type): Likewise.
11857 (dump_type_prefix): Likewise.
11858 (dump_type_suffix): Likewise.
11859 (dump_function_decl): Likewise.
11860 (cv_as_string): Likewise.
11861 * gxx.gperf: Add __restrict and __restrict__.
11862 * gxxint.texi: Document `u' as used for `__restrict', and a few
11863 other previously undocumented codes.
11864 * hash.h: Regenerated.
11865 * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
11866 (build_member_call): Likewise.
11867 (build_new_1): Likewise.
11868 * lex.c (init_parse): Add entry for RID_RESTRICT.
11869 (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
11870 (cp_type_qual_from_rid): Define.
11871 * lex.h (enum rid): Add RID_RESTRICT.
11872 * method.c (process_modifiers): Deal with `restrict'.
11873 * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
11874 * parse.c: Regenerated.
11875 * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
11876 (tsubst_aggr_type): Likewise.
11877 (tsubst): Likewise.
11878 (check_cv_quals_for_unify): Likewise.
11879 (unify): Likewise.
11880 * rtti.c (init_rtti_processing): Likewise.
11881 (build_headof): Likewise.
11882 (get_tinfo_var): Likewise.
11883 (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling.
11884 (expand_class_desc): Likewise.
11885 (expand_attr_desc): Likewise.
11886 (synthesize_tinfo_fn): Likewise.
11887 * search.c (covariant_return_p): Likewise. Fix `volatile' handling.
11888 (get_matching_virtual): Likewise.
11889 (expand_upcast_fixups): Likewise.
11890 * sig.c (build_signature_pointer_or_reference_name): Take
11891 type_quals, not constp and volatilep.
11892 (build_signature_pointer_or_reference_type): Likewise.
11893 (match_method_types): More CP_TYPE_QUALS conversion, etc.
11894 (build_signature_pointer_constructor): Likewise.
11895 (build_signature_method_call): Likewise.
11896 * tree.c (build_cplus_array_type): Likewise.
11897 (cp_build_type_variant): Rename to ...
11898 (cp_build_qualified_type): New function. Deal with `__restrict'.
11899 (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
11900 (build_exception_variant): Likewise.
11901 (mapcar): Likewise.
11902 * typeck.c (qualif_type): Likewise.
11903 (common_type): Likewise.
11904 (comptypes): Likewise.
11905 (comp_cv_target_types): Likewise.
11906 (at_least_as_qualified_p): Define.
11907 (more_qualified_p): Likewise.
11908 (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
11909 (compparms): Likewise.
11910 (inline_conversion): Likewise.
11911 (string_conv_p): Likewise.
11912 (build_component_ref): Likewise.
11913 (build_indirect_ref): Likewise.
11914 (build_array_ref): Likewise.
11915 (build_unary_op): Likewise.
11916 (build_conditional_expr): Likewise.
11917 (build_static_cast): Likewise.
11918 (build_c_cast): Likewise.
11919 (build_modify_expr): Likewise.
11920 (convert_For_assignment): Likewise.
11921 (comp_ptr_ttypes_real): Likewise.
11922 (cp_type_quals): New function.
11923
11924 1998-10-23 Jason Merrill <jason@yorick.cygnus.com>
11925
11926 * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
11927 (CP_TYPE_VOLATILE): Likewise.
11928 * decl.c (grokdeclarator): Use them.
11929 * tree.c (canonical_type_variant): Likewise.
11930
11931 1998-10-22 Martin von Löwis <loewis@informatik.hu-berlin.de>
11932
11933 * parse.y (named_class_head): Push into class while parsing the
11934 base class list.
11935 * decl2.c (push_scope, pop_scope): New functions.
11936 * cp-tree.h: Declare them.
11937 * init.c (build_new_1): Delay cleanup until end of full expression.
11938
11939 1998-10-21 Jason Merrill <jason@yorick.cygnus.com>
11940
11941 * typeck.c (build_component_ref): Use of a type here is an error.
11942
11943 1998-10-19 Jason Merrill <jason@yorick.cygnus.com>
11944
11945 Revamp references to member functions.
11946 * method.c (hack_identifier): Call build_component_ref for a
11947 reference to a member function.
11948 * typeck.c (build_component_ref): Only return a single function
11949 if it's static. Otherwise, return a COMPONENT_REF.
11950 (build_x_function_call): Handle a COMPONENT_REF.
11951 (build_unary_op): Handle all unknown-type things.
11952 * decl2.c (arg_assoc): Handle COMPONENT_REF.
11953 * class.c (instantiate_type): Complain if the function we get is a
11954 nonstatic member function. Remove code for finding "compatible"
11955 functions.
11956 * pt.c (tsubst_copy): Handle NOP_EXPR.
11957 * tree.c (build_dummy_object): New fn.
11958 (maybe_dummy_object): New fn.
11959 (is_dummy_object): New fn.
11960 * cp-tree.h: Declare them.
11961 * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
11962 * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
11963 * init.c (build_member_call): Use maybe_dummy_object and
11964 is_dummy_object.
11965 (build_offset_ref): Use maybe_dummy_object.
11966 (resolve_offset_ref): Use is_dummy_object.
11967 * typeck.c (build_x_function_call): Call build_dummy_object.
11968 (unary_complex_lvalue): Call is_dummy_object.
11969
11970 * typeck.c (build_component_addr): Make sure field is a field.
11971
11972 * call.c (build_new_op): Delete obsolete code.
11973
11974 * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
11975
11976 1998-10-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
11977
11978 * decl2.c (validate_nonmember_using_decl): Fix using-directives of
11979 std if std is ignored.
11980
11981 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
11982
11983 * decl.c (grokvardecl): Fix thinko.
11984
11985 * decl.c (grokdeclarator): Embedded attrs bind to the right,
11986 not the left.
11987
11988 * parse.y (fn.def2): Fix 'attrs' format.
11989
11990 1998-10-18 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
11991
11992 * Makefile.in (CONFLICTS): Update.
11993 * parse.y (expr_or_declarator_intern): New rule.
11994 (expr_or_declarator, direct_notype_declarator, primary,
11995 functional_cast): Use it.
11996 (notype_declarator_intern): New rule.
11997 (notype_declarator, complex_notype_declarator): Use it.
11998
11999 1998-10-17 Jason Merrill <jason@yorick.cygnus.com>
12000
12001 * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
12002 (grokvardecl): Likewise.
12003
12004 Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12005
12006 * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
12007 (add_method): Likewise for arguments 1 & 2 of `bcopy'.
12008
12009 * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
12010
12011 * pt.c (process_partial_specialization): Cast 1st argument of
12012 `bzero' to (PTR).
12013
12014 * tree.c (build_base_fields): Cast `base_align' to (int) when
12015 comparing against one.
12016
12017 1998-10-16 Mark Mitchell <mark@markmitchell.com>
12018
12019 * decl.c (lookup_name_real): Handle template parameters for member
12020 templates where said parameters have the same name as the
12021 surrounding class.
12022
12023 * decl.c (expand_static_init): Build cleanups before entering the
12024 anonymous function used to do them to avoid access-checking
12025 confusion.
12026
12027 * decl.c (grokfndecl): Add back call to cplus_decl_attributes
12028 accidentally removed by previous change, and make DECL_RTL here.
12029 * class.c (add_method): Don't make DECL_RTL here.
12030
12031 * pt.c (for_each_template_parm): Don't examine uninstantiated
12032 default arguments.
12033
12034 1998-10-16 Dave Brolley <brolley@cygnus.com>
12035
12036 * lex.c (real_yylex): Fix unaligned access of wchar_t.
12037
12038 1998-10-16 Mark Mitchell <mark@markmitchell.com>
12039
12040 * class.c (add_method): Fix documentation to reflect previous
12041 changes. Check for duplicate method declarations here.
12042 * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
12043 correctly; such things never match.
12044 (grokfndecl): Don't look for duplicate methods here.
12045 * decl2.c (check_classfn): Don't assume names are mangled.
12046 Don't add bogus member function declarations to a class before the
12047 class type is complete.
12048 (grokfield): Reformat error message.
12049 * method.c (set_mangled_name_for_decl): Don't mangle names while
12050 processing_template_decl.
12051
12052 1998-10-16 Jason Merrill <jason@yorick.cygnus.com>
12053
12054 * typeck.c (build_indirect_ref): Complain about a pointer to data
12055 member, too.
12056 * typeck2.c (build_m_component_ref): Don't indirect a pointer to
12057 data member.
12058 * init.c (resolve_offset_ref): Don't undo the above.
12059
12060 * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
12061 (struct lang_decl_flags): Add `bitfield'.
12062 * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
12063 DECL_BIT_FIELD.
12064 * decl2.c (grokbitfield, grok_alignof): Likewise.
12065 * init.c (build_offset_ref): Likewise.
12066 * typeck.c (build_component_addr, expr_sizeof): Likewise.
12067 * cvt.c (build_up_reference): Don't crash if taking the address
12068 returns error_mark_node.
12069
12070 * decl.c (grokfndecl): Also check ctype when checking for ::main().
12071
12072 1998-10-15 Jason Merrill <jason@yorick.cygnus.com>
12073
12074 * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
12075 Do mangling here.
12076 (grokdeclarator): Instead of here.
12077 * friend.c (do_friend): Lose special handling of ::main and
12078 __builtin_*.
12079 * cp-tree.h (DECL_MAIN_P): Check for C linkage.
12080
12081 * spew.c (yylex): Clear looking_for_typename if we got
12082 'enum { ... };'.
12083
12084 1998-10-15 Mark Mitchell <mark@markmitchell.com>
12085
12086 * class.c (maybe_warn_about_overly_private_class): Improve error
12087 messages for class with only private constructors.
12088
12089 * cp-tree.def (TYPENAME_TYPE): Add to documentation.
12090 * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
12091 (build_typename_type): New function.
12092 * decl.c (build_typename_type): Broken out from ...
12093 (make_typename_type): Use it.
12094 * search.c (lookup_field): Likewise.
12095
12096 1998-10-14 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12097
12098 * pt.c (convert_nontype_argument): Check against type_referred_to.
12099 * decl.c (grokvardecl): Check for declarator name before building
12100 DECL_ASSEMBLER_NAME.
12101
12102 1998-10-14 Mark Mitchell <mark@markmitchell.com>
12103
12104 * pt.c (lookup_template_class): Add comment.
12105 (instantiate_class_template): Don't mark the _TYPE node for
12106 member class templates as an instantiation.
12107
12108 1998-10-14 Jason Merrill <jason@yorick.cygnus.com>
12109
12110 * decl.c (grokfndecl): Fix my thinko.
12111
12112 1998-10-13 Jason Merrill <jason@yorick.cygnus.com>
12113
12114 * tinfo2.cc (fast_compare): Remove.
12115 (before): Just use strcmp.
12116 * tinfo.cc (operator==): Just use strcmp.
12117
12118 1998-10-13 Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
12119
12120 * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
12121 declarations.
12122
12123 1998-10-13 Mark Mitchell <mark@markmitchell.com>
12124
12125 * cp-tree.h (specializations_of_same_template_p): Remove.
12126 * search.c (get_template_base): Don't use it.
12127 (get_template_base_recursive): Likewise.
12128 * pt.c (specializations_of_same_template_p): Remove.
12129 (unify): Don't use it.
12130 (lookup_template_class): Find the correct parent when setting
12131 CLASSTYPE_TI_TEMPLATE.
12132
12133 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
12134
12135 * tinfo.cc (operator==): Always compare names.
12136
12137 1998-10-12 Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
12138
12139 * decl.c (start_function): Fix cut-and-paste error.
12140
12141 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
12142
12143 * inc/typeinfo: Add #pragma interface.
12144 (operator!=): Just call operator==.
12145 * tinfo.cc: Add #pragma implementation.
12146 (operator==): Move from inc/typeinfo and tinfo2.cc.
12147 Check __COMMON_UNRELIABLE instead of _WIN32.
12148
12149 * typeck2.c (my_friendly_abort): Add URL.
12150
12151 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
12152
12153 * decl.c (start_method): Added extra parameter for attributes.
12154 * cp-tree.h (start_method): Update prototype.
12155 * parse.y (fn.def2): Update start_method parameter list.
12156
12157 1998-10-11 Mark Mitchell <mark@markmitchell.com>
12158
12159 * cp-tree.h (specializations_of_same_template_p): Declare.
12160 * pt.c (specializations_of_same_template_p): New function.
12161 (unify): Use it.
12162 * search.c (get_template_base): Use it.
12163 (get_template_base_recursive): Likewise.
12164
12165 1998-10-10 Manfred Hollstein <manfred@s-direktnet.de>
12166
12167 * decl2.c (start_objects): Add new variable `joiner' and
12168 initialize it properly.
12169
12170 1998-10-09 Mark Mitchell <mark@markmitchell.com>
12171
12172 * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
12173 change to vtable types.
12174
12175 * cvt.c (ocp_convert): Avoid infinite recursion caused by
12176 1998-10-03 change.
12177
12178 1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
12179
12180 * pt.c (resolve_overloaded_unification): New fn.
12181 (try_one_overload): Likewise.
12182 (unify): Don't fail on unknown type.
12183 (type_unification_real): Likewise. Use resolve_overloaded_unification
12184 to handle an overloaded argument.
12185 (template_args_equal): Split out...
12186 (comp_template_args): From here.
12187 (determine_specialization): Also allow a template with more
12188 parms than were explicitly specified.
12189 * cp-tree.h: Add template_args_equal.
12190 * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
12191
12192 Thu Oct 8 15:58:30 1998 Anthony Green <green@cygnus.com>
12193
12194 * semantics.c (finish_asm_stmt): Revert my 1998-09-28
12195 change.
12196
12197 Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com)
12198
12199 * typeck.c (unsigned_type): Only return TItype nodes when
12200 HOST_BITS_PER_WIDE_INT is >= 64 bits.
12201 (signed_type): Likewise.
12202 * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
12203 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
12204 (init_decl_processing): Only create TItype nodes when
12205 HOST_BITS_PER_WIDE_INT is >= 64 bits.
12206 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
12207 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
12208
12209 Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12210
12211 * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
12212 (gxx.gperf): Update comments describing invocation flags.
12213 (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
12214
12215 1998-10-07 Mark Mitchell <mark@markmitchell.com>
12216
12217 * class.c (finish_struct_1): Add commentary on previous change.
12218
12219 * cp-tree.h (vtbl_ptr_type_node): New variable.
12220 * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
12221 already of the right type.
12222 (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
12223 Simplify code to grow vtable.
12224 * decl.c (vtbl_ptr_type_node): Define.
12225 (init_decl_processing): Initialize it.
12226
12227 1998-10-06 Mark Mitchell <mark@markmitchell.com>
12228
12229 * cp-tree.def (PTRMEM_CST): New tree node.
12230 * cp-tree.h (ptrmem_cst): New type.
12231 (lang_type): Remove local_typedecls.
12232 (dummy): Increase to 12 bits from 11.
12233 (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
12234 (PTRMEM_CST_CLASS): New macro.
12235 (PTRMEM_CST_MEMBER): Likewise.
12236 (current_access_specifier): New variable.
12237 (current_class_type): Remove duplicate declaration.
12238 (finish_struct): Change prototype.
12239 (unreverse_member_declarations): New function.
12240 (pushdecl_class_level): Change prototype.
12241 (grok_enum_decls): Remove.
12242 (fixup_anonymous_union): New function.
12243 (grok_x_components): Change prototype.
12244 (tsubst_chain): Remove.
12245 (finish_member_template_decl): Likewise.
12246 (check_explicit_specialization): Fix indentation.
12247 (finish_class_definition): Change prototype.
12248 (finish_member_class_template): Likewise.
12249 (finish_member_declaration): New function.
12250 (check_multiple_declarators): Likewise.
12251 * class.c (class_stack_node_t): New type.
12252 (current_class_base): Remove.
12253 (current_class_stack): Change type.
12254 (current_access_specifier): New variable.
12255 (grow_method): Remove.
12256 (check_member_decl_is_same_in_complete_scope): Break out from
12257 finish_struct.
12258 (make_method_vec): New function.
12259 (free_method_vec): Likewise.
12260 (add_implicitly_declared_members): Break out from finish_struct_1.
12261 (free_method_vecs): New variable.
12262 (add_method): Rework for direct use from parser.
12263 (handle_using_decl): Watch for NULL_TREE while iterating through
12264 CLASSTYPE_METHOD_VEC.
12265 (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
12266 just do some error-checking.
12267 (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
12268 (finish_struct_1): Simplify. Use add_implicitly_declared_members.
12269 (finish_struct): Change prototype. Simplify; fields and methods
12270 are already set up at this point.
12271 (init_class_processing): Set up current_class_stack.
12272 (pushclass): Save current_access_specifier.
12273 (popclass): Restore it.
12274 (currently_open_class): Simplify.
12275 (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
12276 * decl.c (saved_scope): Add access_specifier.
12277 (maybe_push_to_top_level): Save it.
12278 (pop_from_top_level): Restore it.
12279 (maybe_process_template_type_declaration): Use
12280 finish_member_declaration.
12281 (pushtag): Likewise.
12282 (pushdecl_class_level): Don't return a value.
12283 (fixup_anonymous_union): Break out from grok_x_components.
12284 (shadow_tag): Use it.
12285 (xref_tag): Complain about using an elaborated type specifier to
12286 reference a template type parameter or typedef name.
12287 (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
12288 (current_local_enum): Remove.
12289 (build_enumerator): Call finish_member_declaration.
12290 (grok_enum_decls): Remove.
12291 * decl2.c (grok_x_components): Simplify.
12292 (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
12293 (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
12294 (merge_functions): Add to comment.
12295 (arg_assoc_type): Prototype.
12296 (arg_assoc): Pass as many arguments as there are parameters.
12297 * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of
12298 OFFSET_REF.
12299 * expr.c (cpls_expand_expr): Remove dead code. Handle
12300 PTRMEM_CST.
12301 * friend.c (do_friend): Lookup friends when in nested classes.
12302 Change comments.
12303 * init.c (build_offset_ref): Do lookup even for classes that are
12304 only partially defined.
12305 (decl_constant_value): Remove dead code.
12306 * method.c (build_overload_value): Remove hack where by TYPE was
12307 not a TYPE. Handle PTRMEM_CST.
12308 (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
12309 should go.
12310 * parse.y (components, notype_components, component_decl,
12311 component_decl_1, component_declarator, component_declarator0):
12312 Now all are itype rather than ttype. Rework to add members to
12313 classes on the fly.
12314 (typesqpecqual_reserved): Use check_multiple_declarators.
12315 (structsp): Update class to finish_class_definition.
12316 (do_xref_defn): Unsplit into named_class_head.
12317 (access_specifier): Set current_access_specifier.
12318 * pt.c (set_current_access_from_decl): New function.
12319 (finish_member_template_decl): Don't take the parameters.
12320 (comp_template_args): Make more robust.
12321 (lookup_template_class): Don't use current_local_enum.
12322 (for_each_template_parm): Handle PTRMEM_CST.
12323 (instantiate_class_template): Use set_current_access_from_decl,
12324 finish_member_declaration and unreverse_member_declarations. Set
12325 lineno/input_filename before generating implicit member functions.
12326 (type_unification_real): Don't assume back-unification happens
12327 only for the last argument.
12328 (regenerate_decl_from_template): Call pushclass a bit earlier.
12329 (tsubst_chain): Remove.
12330 (tsubst_enum): Use set_current_access_from_decl.
12331 (set_mangled_name_for_template_decl): Fix indentation.
12332 * search.c (lookup_fnfields_1): Change iteration through
12333 CLASSTYPE_METHOD_VEC.
12334 (dfs_pushdecls): Likewise.
12335 (dfs_compress_decls): Likewise.
12336 (add_conversions): Likewise.
12337 * semantics.c (finish_class_definition): Don't take components.
12338 Change call to finish_struct.
12339 (finish_member_declaration): New function.
12340 (finish_member_class_template): Don't take template parameters.
12341 Change call to grok_x_components. Call finish_member_template_decl.
12342 (check_multiple_declarators): New function.
12343 * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
12344 a passed in fieldlist.
12345 * tree.c (search_tree): Handle PTRMEM_CST.
12346 (mapcar): Likewise.
12347 * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
12348 INTEGER_CSTs, for pointer-to-data members.
12349
12350 * call.c (resolve_args): Resolve template specializations, if
12351 possible.
12352
12353 Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12354
12355 * Makefile.in (spew.o): Depend on toplev.h.
12356
12357 * call.c (compare_ics): Initialize variables `deref_from_type2',
12358 `deref_to_type1' and `deref_to_type2'.
12359
12360 * except.c (get_eh_type): Hide prototype and definition.
12361 (process_start_catch_block_old): Remove unused static prototype.
12362
12363 * pt.c (tsubst_decl): Initialize variable `argvec'.
12364
12365 * spew.c: Include toplev.h.
12366
12367 1998-10-05 Jason Merrill <jason@yorick.cygnus.com>
12368
12369 * pt.c (instantiate_decl): Do save and restore file position.
12370
12371 1998-10-05 Martin von Löwis <loewis@informatik.hu-berlin.de>
12372
12373 * method.c (build_decl_overload_real): Clear
12374 numeric_output_need_bar after __.
12375
12376 1998-10-05 Nathan Sidwell <nathan@acm.org>
12377
12378 * call.c (build_new_method_call): Issue 'incomplete type' error,
12379 if class is not defined.
12380
12381 1998-10-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12382
12383 * call.c (build_object_call): Move declaration of variable
12384 `fn' into the scope where it is used. Don't access variable
12385 `fn' when it is uninitialized, instead use `fns'.
12386
12387 1998-10-04 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12388
12389 * errfn.c (cp_thing): Print buf as a string not as a printf format
12390 to avoid problems with the operator%. Consequently, `%%' sequences
12391 in format are copied as `%' in buf.
12392
12393 1998-10-04 Jason Merrill <jason@yorick.cygnus.com>
12394
12395 * pt.c (pop_tinst_level): Call extract_interface_info.
12396 (instantiate_decl): Don't save and restore file position.
12397
12398 * decl.c (cp_finish_decl): Make statics in extern inlines and
12399 templates common, if possible and the target doesn't support weak
12400 symbols.
12401
12402 * decl.c (grokdeclarator): Remove redundant calls to
12403 build_type_variant and some duplicated code.
12404 * sig.c (build_signature_reference_type): Only take the type parm.
12405 (build_signature_pointer_type): Likewise.
12406 * tree.c (build_cplus_method_type): Adjust.
12407 * cp-tree.h: Update.
12408
12409 1998-10-04 Mark Mitchell <mark@markmitchell.com>
12410
12411 * call.c (build_over_call): Make pedwarns about dropped qualifiers
12412 into full-fledged errors.
12413 * cvt.c (convert_to_reference): Likewise.
12414 * typeck.c (convert_for_assignment): Likewise.
12415
12416 * search.c (expand_upcast_vtables): In addition to unsetting
12417 TREE_READONLY, remove top-level const type qualifier.
12418
12419 1998-10-03 Mark Mitchell <mark@markmitchell.com>
12420
12421 * class.c (current_class_ptr, current_class_ref): Clarify
12422 documentation.
12423 * cvt.c (ocp_convert): Don't expect fold to remove all trivial
12424 NOP type conversions.
12425 * decl.c (decls_match): Use comptypes directly; ignore
12426 qualifiers on the DECL.
12427 (duplicate_decls): Remove qualifier checks on DECL.
12428 (grokdeclarator): Make the type built up include top-level
12429 qualifiers.
12430 * decl2.c (do_dtors): Fix spelling error.
12431 * error.c (dump_simple_decl): Don't look at qualifiers on the decl
12432 when printing type information.
12433 * init.c (build_new_1): Add documentation. Deal with the fact
12434 that type of allocated memory now contains qualifiers.
12435 * lex.c (is_global): Improve error-recovery.
12436 * sig.c (build_member_function_pointer): Don't cast away const
12437 on fields of sigtable_entry_type.
12438 * tree.c (lvalue_type): Don't look at top-level qualifiers on
12439 expressions.
12440 * typeck.c (decay_conversion): Likewise.
12441 (build_component_ref): Make sure the type of the COMPONENT_REF
12442 contains top-level qualifiers, as appropriate. Improve
12443 error-handling.
12444 (build_indirect_ref): Simplify. Don't strip top-level qualifiers.
12445 (build_array_ref): Likewise.
12446 (build_unary_op): Improve error-recovery.
12447 (unary_complex_lvalue): Make taking the address a bound member
12448 function an error, not a sorry.
12449 (build_conditional_expr): Look at the type qualifiers, not the
12450 qualifiers on the expression itself.
12451
12452 1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
12453
12454 * decl2.c (merge_functions): Remove duplicates.
12455
12456 * decl2.c: Add -f{no-,}implicit-inline-templates.
12457 (import_export_decl): Check it.
12458
12459 * decl.c (lookup_name_real): Template parms also take precedence
12460 over implicit typename. Only warn if yylex.
12461
12462 * typeck.c (build_conditional_expr): Only fold if ifexp is an
12463 INTEGER_CST.
12464
12465 * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
12466 instead of linkage.
12467
12468 1998-10-01 Jason Merrill <jason@yorick.cygnus.com>
12469
12470 * cp-tree.h (FORMAT_VBASE_NAME): New macro.
12471 * class.c (build_vbase_pointer): Use it.
12472 * rtti.c (expand_class_desc): Likewise.
12473 * tree.c (build_vbase_pointer_fields): Likewise.
12474
12475 Thu Oct 1 10:43:45 1998 Nick Clifton <nickc@cygnus.com>
12476
12477 * decl.c (start_decl): Add invocation of
12478 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
12479 (start_function): Add invocation of
12480 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
12481
12482 * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
12483 HANDLE_GENERIC_PRAGMAS.
12484
12485 1998-09-28 Anthony Green <green@cygnus.com>
12486
12487 * semantics.c (finish_asm_stmt): Always permit volatile asms.
12488
12489 1998-09-28 Mark Mitchell <mark@markmitchell.com>
12490
12491 * decl.c (grokdeclarator): Tighten checks for invalid
12492 destructors. Improve error-messages and error-recovery.
12493 * decl2.c (check_classfn): Don't assume that mangled destructor
12494 names contain type information.
12495
12496 1998-09-25 Jason Merrill <jason@yorick.cygnus.com>
12497
12498 * search.c (get_base_distance): Remove assert.
12499
12500 * decl2.c (build_anon_union_vars): Don't process a field with no
12501 name.
12502 (finish_anon_union): Also complain about local anon unions with no
12503 members.
12504
12505 1998-09-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
12506
12507 * decl.c (lookup_namespace_name): If the name is a namespace,
12508 return it immediately.
12509
12510 Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12511
12512 * cp-tree.h (define_case_label): Remove unused parameter.
12513 (check_java_method): Likewise.
12514 (grokclassfn): Likewise.
12515 (expand_aggr_init): Likewise.
12516 (build_x_delete): Likewise.
12517 (maybe_end_member_template_processing): Likewise.
12518 (unshare_base_binfos): Add prototype.
12519 (string_conv_p): Likewise.
12520 (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
12521
12522 * cvt.c (build_up_reference): Remove unused parameter
12523 `checkconst', all callers changed.
12524 (build_type_conversion): Mark parameter `code' with
12525 ATTRIBUTE_UNUSED.
12526 (build_expr_type_conversion): Initialize variable `conv'.
12527
12528 * decl.c (push_namespace): Initialize variable `d'.
12529 (define_case_label): Remove unused parameter `decl', all callers
12530 changed.
12531
12532 * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
12533 `argc' with ATTRIBUTE_UNUSED.
12534 (grokclassfn): Remove unused parameter `cname', all callers
12535 changed.
12536 (check_java_method): Likewise for parameter `ctype'.
12537 (copy_assignment_arg_p): Mark parameter `virtualp' with
12538 ATTRIBUTE_UNUSED.
12539 (finish_prevtable_vardecl): Likewise for parameter `prev'.
12540
12541 * expr.c (extract_init): Likewise for parameters `decl' and `init'.
12542
12543 * init.c (expand_aggr_init_1): Remove unused parameter
12544 `alias_this', all callers changed.
12545 (expand_aggr_init): Likewise.
12546 (expand_default_init): Likewise.
12547 (build_new_1): Initialize variable `susp'.
12548 (build_x_delete): Remove unused parameter `type', all callers
12549 changed.
12550
12551 * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
12552 ATTRIBUTE_UNUSED.
12553 (readescape): Use (unsigned) value in shift.
12554 (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when
12555 comparing to a signed quantity.
12556
12557 * pt.c (maybe_end_member_template_processing): Remove unused
12558 parameter `decl', all callers changed.
12559 (check_explicit_specialization): Add braces around empty body in
12560 an else-statement.
12561 (current_template_args): Initialize variable `args'.
12562 (lookup_template_class): Likewise for variable `prev_local_enum'.
12563 (tsubst_decl): Likewise for variable `r'.
12564 (set_mangled_name_for_template_decl): Initialize variable
12565 `context'.
12566
12567 * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
12568 Likewise for variable `i'.
12569 (yylex): Initialize variable `trrr'.
12570
12571 * typeck.c (compparms): Mark variable `strict' with
12572 ATTRIBUTE_UNUSED.
12573
12574 * xref.c (simplify_type): Cast argument of ctype function to
12575 `unsigned char'.
12576
12577 1998-09-24 Mark Mitchell <mark@markmitchell.com>
12578
12579 * cp-tree.h (language_lvalue_valid): Remove.
12580 * decl.c (grokdeclarator): Don't disallow references to functions.
12581 * tree.c (lvalue_p_1): New function, combining duplicated
12582 code from ...
12583 (lvalue_p): Use it.
12584 (real_lvalue_p): Likewise.
12585 * typeck.c (language_lvalue_valid): Remove.
12586 (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
12587 they don't have TREE_READONLY set.
12588 * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
12589
12590 1998-09-24 Benjamin Kosnik <bkoz@loony.cygnus.com>
12591
12592 * spew.c (yylex): Give diagnostic.
12593 * hash.h (is_reserved_word): Add export.
12594 * gxx.gperf: Likewise.
12595 * lex.h (rid): Add RID_EXPORT.
12596 * lex.c (init_parse): Likewise.
12597
12598 Tue Sep 22 21:01:19 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
12599
12600 * friend.c (do_friend): Make warning a full sentence.
12601
12602 1998-09-22 Mark Mitchell <mark@markmitchell.com>
12603
12604 * parse.y (component_decl_list): Improve error-recovery.
12605
12606 1998-09-22 Benjamin Kosnik <bkoz@loony.cygnus.com>
12607
12608 * decl.c (make_typename_type): Move error to point where name
12609 variable can be used by dump_type.
12610
12611 1998-09-22 Mark Mitchell <mark@markmitchell.com>
12612
12613 * decl.c (grokfndecl): Improve error-recovery.
12614 * decl2.c (grokfield): Likewise.
12615 * pt.c (finish_member_template_decl): Likewise.
12616
12617 1998-09-20 Martin von Löwis <loewis@informatik.hu-berlin.de>
12618
12619 * method.c (hack_identifier): Finding multiple members is always
12620 an error.
12621
12622 1998-09-21 Per Bothner <bothner@cygnus.com>
12623
12624 * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o.
12625
12626 Mon Sep 21 01:53:05 1998 Felix Lee <flee@cygnus.com>
12627
12628 * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
12629
12630 1998-09-20 Mark Mitchell <mark@markmitchell.com>
12631
12632 * class.c (maybe_warn_about_overly_private_class): Reformat.
12633
12634 1998-09-17 Andrew MacLeod <amacleod@cygnus.com>
12635
12636 * exception.cc (__cplus_type_matcher): Realign some code.
12637
12638 1998-09-16 Mark Mitchell <mark@markmitchell.com>
12639
12640 * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
12641 (tinfo2.o): Likewise.
12642 (exception.o): Likewise.
12643 (new.o): Likewise.
12644 (opnew.o): Likewise.
12645 (opnewnt.o): Likewise.
12646 (opvnew.o): Likewise.
12647 (opvnewnt.o): Likewise.
12648 (opdel.o): Likewise.
12649 (opdelnt.o): Likewise.
12650 (opvdel.o): Likewise.
12651 (opvdelnt.o): Likewise.
12652
12653 1998-09-16 Richard Henderson <rth@cygnus.com>
12654
12655 * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
12656
12657 1998-09-15 Alexandre Oliva <oliva@dcc.unicamp.br>
12658
12659 * call.c (build_field_call): Handle static data members too.
12660
12661 * typeck.c (comptypes): When comparing pointer types, check
12662 whether referred types match even in strictest modes.
12663
12664 1998-09-15 Mark Mitchell <mark@markmitchell.com>
12665
12666 * cp-tree.h: Revert previous change.
12667 (finish_struct_methods): Remove declaration.
12668 * class.c: Revert previous change.
12669 (maybe_warn_about_overly_private_class): New function.
12670 (finish_struct_methods): Declare here, and make static. Remove
12671 unnecessary parameters. Tidy slightly. Use
12672 maybe_warn_about_overly_private_class.
12673 (finish_struct_1): Adjust. Remove check for private constructors,
12674 now done elsewhere.
12675 (finish_struct): Adjust.
12676
12677 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
12678
12679 * except.c (expand_start_catch_block): No need to check for new
12680 exception model.
12681 (process_start_catch_block_old): Deleted.
12682 (process_start_catch_block): Add call to start_decl_1().
12683 (expand_end_catch_block): Add call to end_catch_handler().
12684 * exception.cc (__cplus_type_matcher): Only check the exception
12685 language if there is an exception table.
12686
12687 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
12688
12689 * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
12690 as used to prevent conflicts with virtual function tables.
12691
12692 1998-09-14 Mark Mitchell <mark@markmitchell.com>
12693
12694 * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
12695 (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
12696 * class.c (maybe_class_too_private_p): New function.
12697 (finish_struct_methods): Use it.
12698 (finish_struct_1): Likewise.
12699 (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
12700 appropriate.
12701
12702 * pt.c (check_specialization_scope): Fix spelling error.
12703 (check_explicit_specialization): Remove code to handle explicit
12704 specializations in class scope; they are now correctly diagnosed
12705 as errors.
12706
12707 1998-09-10 Mark Mitchell <mark@markmitchell.com>
12708
12709 * decl.c (pushdecl): Don't copy types if the
12710 DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
12711 type.
12712
12713 1998-09-09 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
12714
12715 * class.c (get_enclosing_class): New function.
12716 (is_base_of_enclosing_class): Likewise.
12717 * cp-tree.h (get_enclosing_class): Declare.
12718 (is_base_of_enclosing_class): Likewise.
12719 * pt.c (coerce_template_parms): Use them.
12720
12721 1998-09-09 Jason Merrill <jason@yorick.cygnus.com>
12722
12723 * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
12724 null to decide whether to use it.
12725
12726 * error.c (dump_type_real): Handle NAMESPACE_DECL.
12727 * parse.y (base_class.1): Avoid crash on error.
12728
12729 1998-09-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
12730
12731 * decl.c (make_typename_type): If context is a namespace, the code
12732 is in error.
12733
12734 1998-09-08 Mumit Khan <khan@xraylith.wisc.edu>
12735
12736 * parse.y (nomods_initdcl0): Set up the parser stack correctly.
12737
12738 1998-09-08 Mark Mitchell <mark@markmitchell.com>
12739
12740 * cp-tree.h (anonymous_namespace_name): Declare.
12741 * decl.c: Define it.
12742 (push_namespace): Use anonymous_namespace_name, rather than local
12743 static anon_name.
12744 * error.c (dump_decl): If a namespace is named
12745 anonymous_namespace_name, call it {anonymous}.
12746
12747 * decl.c (grokparms): Distinguish between references and pointers
12748 in error message.
12749
12750 1998-09-08 Richard Henderson <rth@cygnus.com>
12751 Mark Mitchell <mark@markmitchell.com>
12752
12753 * pt.c (process_partial_specialization): Consistently allocate
12754 and zero tpd.parms based on ntparms. Use tpd2.parms, not
12755 tpd.parms, where appropriate.
12756
12757 Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com)
12758
12759 * Makefile.in (INCLUDES): Update after recent toplevel gcc
12760 reorganizations.
12761
12762 1998-09-05 Mark Mitchell <mark@markmitchell.com>
12763
12764 * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
12765 * class.c (finish_struct): Remove hackery to deal with explicit
12766 specializations in class scope.
12767 * decl.c (grokfndecl): Improve error-recovery.
12768 * decl2.c (grokfield): Likewise.
12769 * pt.c (check_specialization_scope): New function.
12770 (begin_specialization): Call it.
12771 (process_partial_specialization): New function, split out from
12772 push_template_decl. Check partial specializations more
12773 stringently.
12774 (push_template_decl): Call it.
12775 (check_explicit_specialization): Don't attempt to handle explicit
12776 specializations in class scope.
12777 (template_parm_data): Document. Add current_arg and
12778 arg_uses_template_parms.
12779 (mark_template_parm): Set it.
12780 (tsubst_arg_types): Remove unused variable.
12781 * semantics.c (begin_class_definition): Tweak.
12782
12783 1998-09-04 Mark Mitchell <mark@markmitchell.com>
12784
12785 * inc/typeinfo (type_info::type_info(const char*)): Make
12786 `explicit'.
12787
12788 * cp-tree.h (hash_tree_cons_simple): New macro.
12789 * pt.c (tsubst_arg_types): New function. Use hash_tree_cons.
12790 (coerce_template_parms): Use make_temp_vec, instead of
12791 make_tree_vec. Document this behavior.
12792 (lookup_template_class): Likewise.
12793 (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
12794 Remove dead code (and add assertion to check its deadness). Fix
12795 bug w.r.t. exception specifications.
12796
12797 1998-09-03 Jason Merrill <jason@yorick.cygnus.com>
12798
12799 * decl2.c (import_export_vtable): Always make artificials comdat.
12800 (import_export_decl): Likewise.
12801 * pt.c (mark_decl_instantiated): Likewise.
12802
12803 1998-09-03 Mark Mitchell <mark@markmitchell.com>
12804
12805 * cp-tree.h (finish_globally_qualified_member_call_expr):
12806 Rename to ...
12807 (finish_qualified_call_expr).
12808 * semantics.c: Likewise.
12809 * parse.y (primary): Use it.
12810 * method.c (hack_identifier): Remove redundant code.
12811
12812 * init.c (resolve_offset_ref): Call convert_from_reference to
12813 handle members of reference type. Improve error recovery.
12814
12815 1998-09-03 Benjamin Kosnik <bkoz@cygnus.com>
12816
12817 * cp-tree.h: Declare warn_nontemplate_friend.
12818 * decl2.c (lang_decode_option): Set.
12819 * lang-options.h: Add -Wnon-template-friend.
12820 * friend.c (do_friend): Use to toggle non-template function warning.
12821
12822 1998-09-03 Mark Mitchell <mark@markmitchell.com>
12823
12824 * decl.c (finish_enum): Don't resolve CONST_DECLs to their
12825 corresponding INTEGER_CSTs when processing_template_decl.
12826 * pt.c (tsubst_enum): Tweak accordingly.
12827
12828 1998-09-03 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12829
12830 * decl.c (pushdecl_class_level): Add warning here.
12831 (pushdecl): Tweak.
12832
12833 1998-09-02 Jason Merrill <jason@yorick.cygnus.com>
12834
12835 * cvt.c (convert_pointer_to_real): Tidy.
12836 * search.c (get_base_distance_recursive): Simplify.
12837 (get_base_distance): Likewise.
12838
12839 * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
12840 parms.
12841
12842 Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
12843
12844 * lex.c (check_newline): Call HANDLE_PRAGMA before
12845 HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages
12846 if unknown pragmas are encountered.
12847 (handle_sysv_pragma): Interpret return code from
12848 handle_pragma_token (). Return success/failure indication rather
12849 than next unprocessed character.
12850 (pragma_getc): New function: retrieves characters from the
12851 input stream. Defined when HANDLE_PRAGMA is defined.
12852 (pragma_ungetc): New function: replaces characters back into the
12853 input stream. Defined when HANDLE_PRAGMA is defined.
12854
12855 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
12856
12857 * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
12858 * class.c (build_vtable_entry_ref): Likewise.
12859
12860 1998-09-01 Mark Mitchell <mark@markmitchell.com>
12861
12862 * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
12863 * decl2.c (import_export_decl): Likewise.
12864 * pt.c (instantiate_decl): Use it.
12865
12866 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
12867
12868 * decl.c (lookup_name_real): Also do implicit typename thing for
12869 artificial TYPE_DECLs.
12870 * search.c (lookup_field): Likewise.
12871 (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
12872 * semantics.c (begin_constructor_declarator): Use enter_scope_of.
12873 (enter_scope_of): Extract type from implicit typename.
12874 (begin_class_definition): Likewise.
12875 * lex.c (identifier_type): Handle implicit typename when checking
12876 for SELFNAME.
12877
12878 * cp-tree.h: Declare flag_strict_prototype.
12879 * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
12880 -fstrict-prototype.
12881 * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
12882 specified, set it to the value of pedantic.
12883
12884 1998-09-01 Mark Mitchell <mark@markmitchell.com>
12885
12886 * decl2.c (arg_assoc): Handle template-id expressions as arguments.
12887
12888 1998-08-31 Mark Mitchell <mark@markmitchell.com>
12889
12890 * decl.c (finish_enum): Handle member enums of classes declared in
12891 template functions.
12892
12893 * decl2.c (grok_x_components): Strip attributes before calling
12894 groktypename.
12895
12896 1998-08-31 Jason Merrill <jason@yorick.cygnus.com>
12897
12898 * cp-tree.h, decl2.c: Remove support for -fall-virtual,
12899 -fenum-int-equivalence and -fno-nonnull-objects.
12900 * class.c (check_for_override): Remove support for -fall-virtual.
12901 (finish_struct_1): Likewise.
12902 * call.c (build_new_op): Remove support for -fenum-int-equivalence.
12903 * typeck.c (build_binary_op_nodefault): Likewise.
12904 * cvt.c (ocp_convert): Likewise.
12905 * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
12906 * class.c (build_vbase_path): Likewise.
12907
12908 Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org)
12909
12910 * Makefile.in (INTERFACE): New, set to 1.
12911
12912 1998-08-30 Mark Mitchell <mark@markmitchell.com>
12913
12914 * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
12915 comparing with global_namespace.
12916 (dump_aggr_type): Likewise.
12917
12918 * decl.c (grokfndecl): Issue error on declaration of friend
12919 templates with explicit template arguments.
12920
12921 * pt.c (convert_template_argument): New function, split out
12922 from...
12923 (coerce_template_parms): Here.
12924 (tsubst): Attempt better error-recovery.
12925
12926 1998-08-28 Benjamin Kosnik <bkoz@loony.cygnus.com>
12927
12928 * pt.c (decl_template_parm_p): Add checks for
12929 TEMPLATE_TEMPLATE_PARM.
12930
12931 1998-08-28 Mark Mitchell <mark@markmitchell.com>
12932
12933 * lex.c (do_identifier): Fix thinko in previous change.
12934
12935 1998-08-28 Jason Merrill <jason@yorick.cygnus.com>
12936
12937 * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
12938 * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
12939
12940 1998-08-28 Richard Henderson <rth@cygnus.com>
12941
12942 Add support for discarding unused virtual functions.
12943 * lang-options.h: Add -fvtable-gc.
12944 * cp-tree.h: Add flag_vtable_gc.
12945 * decl2.c (output_vtable_inherit): New fn.
12946 (finish_vtable_vardecl): Call it.
12947 * class.c (build_vtable_entry_ref): New fn.
12948 (build_vtbl_ref): Call it.
12949
12950 1998-08-28 Mark Mitchell <mark@markmitchell.com>
12951
12952 * cp-tree.h (build_enumerator): Take the enumeration type as a
12953 parameter.
12954 * decl.c (finish_enum): Don't set the TREE_TYPE for the
12955 enumeration constant values if we're processing_template_decls.
12956 Don't set the type for the CONST_DECLs either; that's done in
12957 build_enumerator.
12958 (build_enumerator): Take the enumeration type as a
12959 parameter.
12960 * lex.c (do_identifier): Don't resolve enumeration constants while
12961 processing template declarations, even if they happen to be
12962 TEMPLATE_PARM_INDEXs.
12963
12964 * parse.y (current_enum_type): New variable.
12965 (primary): Don't allow statement-expression in local classes just
12966 as we don't in global classes.
12967 (structsp): Use current_enum_type.
12968 (enum_list): Likewise.
12969 * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
12970 finish_enum; they no longer occur.
12971
12972 * cp-tree.h (finish_base_specifier): New function.
12973 * parse.y (base_class): Use it.
12974 * semantics.c (finish_base_specifier): Define it.
12975
12976 * parse.y (structsp): Warn on use of typename outside of template
12977 declarations.
12978
12979 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
12980
12981 * lex.c (handle_cp_pragma): Remove #pragma vtable.
12982 * lang-options.h: Remove +e options.
12983 * decl2.c (lang_decode_option): Likewise.
12984 (import_export_vtable): Don't check write_virtuals.
12985 (finish_vtable_vardecl, finish_file): Likewise.
12986 * search.c (dfs_debug_mark): Likewise.
12987 * semantics.c (begin_class_definition): Likewise.
12988 * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
12989
12990 * call.c (build_over_call): Check flag_elide_constructors.
12991 * decl2.c: flag_elide_constructors defaults to 1.
12992 * typeck.c (convert_arguments): Remove return_loc parm.
12993 (build_function_call_real): Adjust.
12994
12995 * search.c: Tear out all mi_matrix and memoize code.
12996 (lookup_field, lookup_fnfields): Use scratch_tree_cons.
12997 * lang-options.h: Remove documentation for -fhandle-exceptions,
12998 -fmemoize-lookups and -fsave-memoized.
12999 * cp-tree.h: Lose mi_matrix and memoize support.
13000 * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
13001 * class.c: Lose struct class_level.
13002 (pushclass, popclass): Lose memoize support.
13003 * init.c (build_offset_ref): Likewise.
13004
13005 Never change BINFO_INHERITANCE_CHAIN.
13006 * init.c (emit_base_init): Change modification of
13007 BINFO_INHERITANCE_CHAIN to an assert.
13008 * search.c (get_base_distance_recursive): Likewise.
13009 (get_base_distance): Likewise.
13010 (lookup_member): Likewise.
13011 (convert_pointer_to_single_level): Likewise.
13012 (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs.
13013 (lookup_fnfields): Likewise.
13014 * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
13015 (unshare_base_binfos): Don't call propagate_binfo_offsets.
13016 (layout_basetypes): Call propagate_binfo_offsets instead of
13017 unshare_base_binfos.
13018 * decl.c (xref_basetypes): Call unshare_base_binfos.
13019 * pt.c (instantiate_class_template): Likewise.
13020 * tree.c (reverse_path): Remove 'copy' parm; always make a
13021 temporary copy.
13022 * class.c (build_vbase_path): Just call it.
13023 * search.c (compute_access): Likewise. Don't re-reverse.
13024
13025 1998-08-27 Mark Mitchell <mark@markmitchell.com>
13026
13027 * class.c (build_vbase_path): Use reverse_path.
13028 (finish_base_struct): Move warnings for inaccessible bases to
13029 layout_basetypes.
13030 (modify_one_vtable): Remove check of TREE_USED (binfo).
13031 (fixup_vtable_deltas1): Likewise.
13032 * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
13033 (xref_tag): Remove binfos parameter.
13034 (make_binfo): Remove chain parameter.
13035 (reverse_path): Add copy parameter.
13036 * decl.c (init_decl_processing): Change calls to xref_tag.
13037 (xref_tag): Remove binfos parameter.
13038 (xref_basetypes): Change calls to make_binfo.
13039 * decl2.c (grok_x_components): Change calls to xref_tag.
13040 (handle_class_head): Likewise.
13041 * friend.c (do_friend): Likewise.
13042 * lex.c (make_lang_type): Change calls to make_binfo.
13043 * parse.y (structsp): Change calls to xref_tag.
13044 (named_complex_class_head_sans_basetype): Likewise.
13045 (named_class_head): Likewise.
13046 * rtti.c (init_rtti_processing): Likewise.
13047 * search.c (compute_access): Change calls to reverse_path.
13048 (dfs_get_vbase_types): Change calls to make_binfo.
13049 (get_vbase_types): Remove dead code.
13050 * tree.c (unshare_base_binfos): Change calls to make_binfo.
13051 (layout_basetypes): Warn here about inaccessible bases.
13052 (make_binfo): Remove chain parameter.
13053 (reverse_path): Add copy parameter.
13054
13055 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
13056
13057 * class.c: #if 0 complete_type_p.
13058 * init.c (build_java_class_ref, build_new_1): Remove unused locals.
13059 * method.c (process_overload_item): Likewise.
13060 * typeck.c (comp_target_types): Likewise.
13061
13062 Stop sharing binfos for indirect virtual bases.
13063 * tree.c (propagate_binfo_offsets): Unshare vbases, too.
13064 (layout_basetypes): Likewise.
13065 (unshare_base_binfos): Copy vbases, too.
13066 * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
13067 BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
13068 (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
13069 CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
13070 * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
13071 reference to BINFO_VIA_PUBLIC.
13072 (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
13073 (push_class_decls): Use them.
13074 (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
13075 (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
13076
13077 1998-08-27 Mark Mitchell <mark@markmitchell.com>
13078
13079 * decl.c (build_enumerator): Set DECL_CONTEXT for the
13080 CONST_DECLs.
13081
13082 1998-08-26 Mark Mitchell <mark@markmitchell.com>
13083
13084 * cp-tree.h (finish_enum): Change prototype.
13085 * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
13086 VALUES parameter. Don't try to compute mins/maxs if
13087 processing_template_decl.
13088 * parse.y (structsp): Use new calling sequence for finish_enum.
13089 * pt.c (tsubst_enum): Likewise. Take the new type as input.
13090 (lookup_template_class): Remove unused variables. Tweak.
13091 Register enums on instantiation list before substituting
13092 enumeration constants.
13093 (tsubst_decl): Remove unused variables.
13094 (regenerate_decl_from_template): Likewise.
13095
13096 * decl.c (duplicate_decls): Don't obliterate the
13097 DECL_TEMPLATE_INFO for a template if we're not replacing it with
13098 anything.
13099
13100 * lex.c (do_identifier): Fix typo in comment.
13101
13102 Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13103
13104 * errfn.c: Remove stdarg.h/varargs.h.
13105 * tree.c: Likewise.
13106
13107 1998-08-25 Brendan Kehoe <brendan@cygnus.com>
13108
13109 * pt.c (tsubst_copy): Only do typename overloading on an
13110 IDENTIFIER_NODE that happens to look like a typename if it actually
13111 has a type for us to use.
13112
13113 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
13114
13115 * typeck.c (comp_cv_target_types): Split out...
13116 (comp_target_types): From here. Don't allow cv-qual changes under
13117 a pointer if nptrs == 0. Fix OFFSET_TYPE handling.
13118 (build_ptrmemfunc): Pass 1 to nptrs.
13119 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
13120
13121 1998-08-25 Mark Mitchell <mark@markmitchell.com>
13122
13123 * search.c (dependent_base_p): Don't compare a binfo to
13124 current_class_type; use the TREE_TYPE of the binfo instead.
13125
13126 * cp-tree.h (CLASS_TYPE_P): Revise definition.
13127
13128 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
13129
13130 * decl.c (duplicate_decls): Don't complain about different
13131 exceptions from an internal decl even if pedantic.
13132
13133 * typeck.c (convert_for_assignment): Converting from pm of vbase
13134 to derived is an error, not a sorry.
13135
13136 * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
13137 * class.c (fixed_type_or_null): Rename from
13138 resolves_to_fixed_type_p. Return the dynamic type of the
13139 expression, if fixed, or null.
13140 (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type
13141 does not match the static type.
13142 (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use
13143 resolves_to_fixed_type_p again.
13144
13145 1998-08-24 Mark Mitchell <mark@markmitchell.com>
13146
13147 * pt.c (tsubst_decl): Move special case code for dealing with
13148 tricky friend templates here from ...
13149 (regenerate_decl_from_template): Here.
13150
13151 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
13152
13153 * decl.c (start_decl): Remove redundant linkage check.
13154
13155 1998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
13156
13157 * typeck.c (c_expand_return): Handle the case that valtype
13158 is wider than the functions return type.
13159
13160 1998-08-24 Mark Mitchell <mark@markmitchell.com>
13161
13162 * cp-tree.h (CLASS_TYPE_P): New macro.
13163 * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
13164 * pt.c (process_template_parm): Undo previous change.
13165
13166 1998-08-24 Benjamin Kosnik <bkoz@cygnus.com>
13167
13168 * cp-tree.h: Declare.
13169 * pt.c (decl_template_parm_p): New function.
13170 * decl.c (pushdecl): Check decls for redeclaring template parms.
13171 (xref_tag): Make redeclaration an error, print decl.
13172 * decl2.c (grokfield): Check field_decls for redeclaration as well.
13173
13174 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
13175
13176 * parse.y (primary): Fix up the type of string constants.
13177
13178 1998-08-24 Mark Mitchell <mark@markmitchell.com>
13179
13180 * typeck.c (convert_for_initialization): Move check for odd uses
13181 of NULL to avoid duplicate warnings.
13182
13183 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
13184
13185 * tree.c (lvalue_type): Fix for arrays.
13186 * typeck.c (string_conv_p): New fn.
13187 (convert_for_assignment): Use it.
13188 (build_unary_op): Use lvalue_type.
13189 * call.c (standard_conversion, convert_like): Use string_conv_p.
13190 (add_function_candidate): Use lvalue_type.
13191 * cvt.c (convert_to_reference): Likewise.
13192 * decl2.c (lang_decode_option): Ignore -traditional.
13193 * decl.c (init_decl_processing): flag_writable_strings inhibits
13194 flag_const_strings.
13195
13196 1998-08-24 Andrew MacLeod <amacleod@cygnus.com>
13197
13198 * lang-options.h (lang_options): Add fconst-strings to the list
13199 of valid options.
13200 * decl2.c (lang_f_options, lang_decode_option): Likewise.
13201
13202 1998-08-24 Nathan Sidwell <nathan@acm.org>
13203
13204 * lex.c (real_yylex): Don't warn about long long constants if
13205 we're allowing long long.
13206
13207 1998-08-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
13208
13209 * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
13210 accessing bindings directly.
13211
13212 * search.c (my_tree_cons): Reimplement.
13213
13214 * lang-specs.h: Remove __HONOR_STD.
13215 * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
13216
13217 1998-08-23 Mark Mitchell <mark@markmitchell.com>
13218
13219 * decl.c (grokdeclarator): Complain about in-class initialization
13220 of aggregates and/or references.
13221 * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
13222 TEMPLATE_TYPE_PARMs.
13223
13224 * decl2.c (grok_array_decl): Add comment.
13225 (mark_used): Don't instantiate an explicit instantiation.
13226 * friend.c (make_friend_class): Remove bogus comment. Fix check
13227 for partial specializations.
13228 * pt.c (check_explicit_specialization): Don't
13229 SET_DECL_EXPLICIT_INSTANTIATION here.
13230 (mark_decl_instantiated): Or here.
13231 (do_decl_instantiation): Do it here, instead. Add checks for
13232 duplicate explicit instantiations, etc. Tidy.
13233 (do_type_instantiation): Likewise.
13234 (instantiate_decl): Improve comments. Complain about explicit
13235 instantiations where no definition is available.
13236
13237 * cp-tree.h (ansi_null_node): Remove.
13238 * call.c (build_over_call): Warn about converting NULL to an
13239 arithmetic type.
13240 * cvt.c (build_expr_type_conversion): Likewise. Use
13241 null_ptr_cst_p instead of expanding it inline.
13242 * decl.c (ansi_null_node): Remove.
13243 (init_decl_processing): Make null_node always have integral type.
13244 * except.c (build_throw): Warn about converting NULL to an
13245 arithmetic type.
13246 * lex.c (init_parse): Remove handling of ansi_null_node.
13247 * pt.c (type_unification_real): Don't convert NULL to void* type.
13248 * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
13249 (convert_for_assignment): Warn about converting NULL to an
13250 arithmetic type.
13251 (convert_for_initialization): Likewise.
13252
13253 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
13254
13255 * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
13256 * pt.c (coerce_template_parms): Use no_linkage_check.
13257 * decl.c (grokvardecl): Likewise.
13258 (grokfndecl): Likewise. Members of anonymous types have no linkage.
13259
13260 * method.c (process_overload_item): Remove useless code.
13261
13262 1998-08-20 Per Bothner <bothner@cygnus.com>
13263
13264 Handle new'ing of Java classes.
13265 * init.c (build_class_classref): New function.
13266 (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject;
13267 constructor does not return this; don't need to exception-protect.
13268
13269 * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag.
13270 * decl2.c (acceptable_java_type): Handle template-derived types.
13271
13272 1998-08-20 Per Bothner <bothner@cygnus.com>
13273
13274 * decl2.c (import_export_vtable): Suppress vtables for Java classes.
13275
13276 1998-08-20 Mark Mitchell <mark@markmitchell.com>
13277
13278 * decl.c (duplicate_decls): Always merge the old and new patterns
13279 for templates, regardless of whether or not the new one has
13280 DECL_INITIAL. Don't throw away specializations. Merge
13281 DECL_SAVED_TREE.
13282 * pt.c (tsubst_decl): Use the right pattern when calculating the
13283 complete args for a new template instance.
13284 (do_decl_instantiation): Fix typo in comment.
13285 (regenerate_decl_from_template): Deal with tricky friend template
13286 case.
13287 (instantiate_decl): Likewise.
13288
13289 Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com)
13290
13291 * init.c (build_builtin_delete_call): Add missing assemble_external
13292 call.
13293
13294 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
13295
13296 * parse.y (notype_unqualified_id): Also accept ~A<int>.
13297
13298 1998-08-19 Mark Mitchell <mark@markmitchell.com>
13299
13300 * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
13301 arithmetic.
13302 * except.c (build_throw): Warn when NULL is thrown, even with
13303 -ansi. Use ansi_null_node, rather than integer_zero_node, in the
13304 thrown expression.
13305
13306 * cp-tree.h (ansi_null_node): New variable.
13307 * decl.c (ansi_null_node): New variable.
13308 (init_decl_processing): Initialize its type.
13309 * lex.c (init_parse): Initialize its value. Use ansi_null_node
13310 for null_node in non-ANSI mode.
13311 * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
13312 place of null_node to avoid spurious errors.
13313
13314 1998-08-17 Mark Mitchell <mark@markmitchell.com>
13315
13316 * cp-tree.h (enter_scope_of): New function.
13317 * parse.y (complex_direct_notype_declarator): Use it.
13318 * semantics.c (enter_scope_of): New function.
13319
13320 1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
13321
13322 * decl.c (grokparms): No, here.
13323
13324 * decl.c (grokdeclarator): Catch parm with pointer to array of
13325 unknown bound here...
13326 * method.c (process_overload_item): ...not here.
13327
13328 * gxxint.texi: Remove obsolete documentation of overloading code.
13329
13330 * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
13331 * class.c (finish_struct_bits): Likewise.
13332
13333 * tree.c (lvalue_type): Fix for arrays.
13334 * typeck.c (build_unary_op): Use lvalue_type.
13335 * call.c (add_function_candidate): Likewise.
13336 * cvt.c (convert_to_reference): Likewise.
13337
13338 * decl2.c (lang_decode_option): Ignore -traditional.
13339
13340 * init.c (build_offset_ref): Don't mess with error_mark_node.
13341 * lex.c (do_scoped_id): Use cp_error.
13342
13343 * rtti.c (get_tinfo_fn): Don't mess with the context for now.
13344
13345 1998-08-17 Benjamin Kosnik <bkoz@loony.cygnus.com>
13346
13347 * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
13348
13349 Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com)
13350
13351 * cp-tree.h (set_identifier_local_value): Provide prototype.
13352
13353 * decl2.c (do_namespace_alias): Remove unused variables `binding'
13354 and `old'.
13355
13356 Fri Aug 14 16:42:27 1998 Nick Clifton <nickc@cygnus.com>
13357
13358 * Makefile.in: Rename BBISON to BISON so that it can be properly
13359 inherited from the parent makefile.
13360
13361 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
13362
13363 * lang-options.h: Add -finit-priority.
13364 * decl2.c: Likewise. Check flag_init_priority instead of
13365 USE_INIT_PRIORITY.
13366
13367 * decl2.c (setup_initp): New fn.
13368 (start_objects, finish_objects, do_ctors): Handle init_priority.
13369 (do_dtors, finish_file): Likewise.
13370
13371 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
13372
13373 * pt.c (tsubst_copy): Hush warning.
13374
13375 * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
13376
13377 1998-08-12 Mark Mitchell <mark@markmitchell.com>
13378
13379 * pt.c (print_template_context): Don't abort when instantiating a
13380 synthesized method.
13381
13382 * decl.c (grokdeclarator): Issue errors on namespace qualified
13383 declarators in parameter lists or in class scope.
13384
13385 1998-08-09 Mark Mitchell <mark@markmitchell.com>
13386
13387 * pt.c (check_explicit_specialization): Don't abort on bogus
13388 explicit instantiations.
13389
13390 1998-08-07 Mark Mitchell <mark@markmitchell.com>
13391
13392 * typeck.c (require_complete_type): Use complete_type_or_else.
13393 (complete_type_or_else): Always return NULL_TREE on failure, as
13394 documented.
13395
13396 * pt.c (tsubst_aggr_type): Prototype.
13397 (tsubst_decl): New function, split out from tsubst. Set
13398 input_filename and lineno as appropriate.
13399 (pop_tinst_level): Restore the file and line number saved in
13400 push_tinst_level.
13401 (instantiate_class_template): Set input_filename and lineno as
13402 appropriate.
13403 (tsubst): Move _DECL processing to tsubst_decl. Make sure the
13404 context for a TYPENAME_TYPE is complete.
13405
13406 * decl2.c (grokbitfield): Issue errors on bitfields declared with
13407 function type.
13408 (do_dtors): As in do_ctors, pretend to be a member of the same
13409 class as a static data member while generating a call to its
13410 destructor.
13411
13412 * cvt.c (cp_convert_to_pointer): Handle NULL pointer
13413 conversions, even in complex virtual base class hierarchies.
13414
13415 1998-08-06 Mark Mitchell <mark@markmitchell.com>
13416
13417 * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
13418 (TYPE_TEMPLATE_INFO): Likewise.
13419 (SET_TYPE_TEMPLATE_INFO): Likewise.
13420 (ENUM_TI_TEMPLATE): Likewise.
13421 (ENUM_TI_ARGS): Likewise.
13422 (lookup_nested_type_by_name): Remove.
13423 * decl.c (maybe_process_template_type_declaration): Handle enums.
13424 (start_enum): Don't check for primary-template enum declarations
13425 here.
13426 (finish_enum): Clean up, document. Make sure template enum
13427 constants get the correct type.
13428 (build_enumerator): Copy initializers for template enumerations,
13429 too.
13430 (grok_enum_decls): Document.
13431 * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
13432 better. Build LOOKUP_EXPRs for local variables, even if they are
13433 TREE_PERMANENT.
13434 * pt.c (tsubst_enum): Remove field_chain parameter.
13435 (template_class_depth): Include the depth of surrounding function
13436 contexts.
13437 (push_template_decl): Check for primary-template enum declarations
13438 here. Deal with enumeration templates.
13439 (lookup_template_class): Likewise.
13440 (for_each_template_parm): Likewise.
13441 (instantiate_class_template): Don't call tsubst_enum directly,
13442 call tsubst instead, to instantiate enums. Deal with all
13443 field_chain issues here, not in tsubst_enum.
13444 (lookup_nested_type_by_name): Remove.
13445 (tsubst_aggr_type): Revise handling of enumeration types.
13446 (tsubst): Likewise.
13447 (tsubst_copy): Likewise.
13448 (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
13449
13450 1998-08-04 Mark Mitchell <mark@markmitchell.com>
13451
13452 * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
13453 uses template parameters.
13454 * method.c (build_template_parm_names): Use the full set of
13455 template arguments for tsubst'ing.
13456 (build_overload_identifier): Pass the full set of template
13457 arguments to build_template_parm_names, not just the
13458 innermost_args.
13459 * pt.c (TMPL_ARGS_DEPTH): Define using
13460 TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
13461 (NUM_TMPL_ARGS): New macro.
13462 (add_outermost_template_args): Deal with the case where the outer
13463 args will be completely discarded.
13464 (coerce_template_parms): Use the full set of template arguments
13465 for tsubst'ing. Simplify. Add some asserts. Improve
13466 error messages.
13467 (lookup_template_class): Pass the full set of template arguments
13468 to coerce_template_parms.
13469 (tsubst): Add assertion.
13470 (do_type_instantiation): Don't instantiate member template
13471 classes.
13472
13473 * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
13474 name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
13475
13476 1998-08-03 Jason Merrill <jason@yorick.cygnus.com>
13477
13478 * method.c (set_mangled_name_for_decl): Change return type to void.
13479
13480 * decl.c (lookup_name_real): A namespace-level decl takes priority
13481 over implicit typename. Avoid doing the same lookup twice.
13482
13483 * search.c (dependent_base_p): New fn.
13484 (dfs_pushdecls, dfs_compress_decls): Use it.
13485
13486 * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
13487 virtual functions if the type doesn't have any.
13488
13489 1998-08-03 Mark Mitchell <mark@markmitchell.com>
13490
13491 * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
13492 uses template parameters.
13493
13494 1998-08-02 Mark Mitchell <mark@markmitchell.com>
13495
13496 * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument.
13497 * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
13498 * lex.c (do_identifier): Don't use a second argument, or a type,
13499 when building LOOKUP_EXPRs.
13500 (do_identifier): Likewise.
13501 (do_scoped_id): Likewise.
13502 * method.c (hack_identifier): Improve error message.
13503 * pt.c (lookup_template_function): Don't needlessly call
13504 copy_to_permanent or build_min.
13505 (tsubst_copy): Remove #if 0'd code. tsubst into LOOKUP_EXPRs if
13506 necessary.
13507 (do_decl_instantiation): Improve error message.
13508 * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
13509 (build_min): Copy the type to the permanent obstack, too.
13510
13511 1998-08-01 Jason Merrill <jason@yorick.cygnus.com>
13512
13513 * init.c (init_init_processing): Remove BI* handling.
13514 (build_builtin_call): Remove.
13515 (build_builtin_delete_call): New fn.
13516 (build_delete): Use it.
13517
13518 1998-07-31 Mark Mitchell <mark@markmitchell.com>
13519
13520 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
13521 (maybe_check_template_type): New function.
13522 * decl.c (maybe_process_template_type_declaration): New function,
13523 split out from pushtag Call maybe_check_template_type.
13524 (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P.
13525 (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
13526 * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
13527 * pt.c (template_class_depth_real): Generalization of ...
13528 (template_class_depth): Use it.
13529 (register_specialization): Use duplicate_decls for duplicate
13530 declarations of specializations.
13531 (maybe_check_template_type): New function.
13532 (push_template_decl_real): Fix comment.
13533 (convert_nontype_argument): Likewise.
13534 (lookup_template_class): Likewise. Avoid an infinite loop on
13535 erroneous code.
13536 (tsubst_friend_function): Fix comment.
13537 (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
13538 an IDENTIFIER_NODE.
13539 * semantics.c (begin_function_definition): Use
13540 reset_specialization to note that template headers don't apply
13541 directly to declarations after the opening curly for a function.
13542
13543 1998-07-29 Jason Merrill <jason@yorick.cygnus.com>
13544
13545 * decl.c (push_overloaded_decl): Use current_namespace instead of
13546 DECL_CONTEXT (decl) to determine where we go.
13547
13548 * decl.c (lookup_name_real): Fix typo.
13549
13550 1998-07-28 Mark Mitchell <mark@markmitchell.com>
13551
13552 * friend.c (is_friend): Be lenient with member functions to deal
13553 with nested friends.
13554
13555 1998-07-28 Jason Merrill <jason@yorick.cygnus.com>
13556
13557 * class.c (finish_struct_1): Convert integer_zero_node to
13558 ssizetype before passing it to set_rtti_entry.
13559 * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
13560 of any size to a pointer.
13561
13562 1998-07-27 Mark Mitchell <mark@markmitchell.com>
13563
13564 * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
13565 (build_template_decl_overload): Remove.
13566 (set_mangled_name_for_decl): New function.
13567 (innermost_args): Remove is_spec parameter.
13568 (most_specialized, most_specialized_class): Remove declarations.
13569 (lookup_template_class): Add entering_scope parameter.
13570 (maybe_process_partial_specialization): New function.
13571 (finish_template_decl): Likewise.
13572 (finish_template_type): Likewise.
13573 * class.c (finish_struct): Clean up processing of member template
13574 specializations.
13575 * decl.c (pushtag): Fix formatting.
13576 (lookup_tag): Improve handling of pseudo-global levels.
13577 (make_typename_type): Adjust call to lookup_template_class.
13578 (shadow_tag): Use maybe_process_partial_specialization.
13579 (xref_tag): Improve handling of member friends.
13580 (start_function): Call push_nested_class before
13581 push_template_decl. Don't call push_template_decl for
13582 specializations.
13583 * decl2.c (grok_x_components): Don't call xref_tag for
13584 template instantiations. Handle UNION_TYPEs like RECORD_TYPEs.
13585 (grokclassfn): Use set_mangled_name_for_decl.
13586 (arg_assoc_class): Adjust call to innermost_args.
13587 (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
13588 * error.c (dump_function_name): Improve printing of template
13589 function names.
13590 * friend.c (is_friend): Don't compare types of decls to determine
13591 friendship, unless flag_guiding_decls.
13592 (make_friend_class): Partial specializations cannot be friends.
13593 (do_friend): Use set_mangled_name_for_decl. Call
13594 push_template_decl_real instead of push_template_decl.
13595 * method.c (build_decl_overload_real): Remove prototype. Give it
13596 external linkage.
13597 (build_overload_identififer): Adjust call to innermost_args.
13598 (build_template_decl_overload): Remove.
13599 (set_mangled_name_for_decl): New function.
13600 * parse.y (.finish_template_type): New non-terminal.
13601 (template_def): Use finish_template_decl. Use template_extdef
13602 instead of extdef.
13603 (template_extdef, template_datadef): New non-terminals, containing
13604 only those rules for things which can be templates.
13605 (datadef): Tidy.
13606 (template_type, self_template_type): Use .finish_template_type.
13607 (named_class_head): Use maybe_process_partial_specialization.
13608 * pt.c (mangle_class_name_for_template): Remove context parameter.
13609 (get_class_bindings): Remove outer_args parameter.
13610 (complete_template_args): Remove.
13611 (add_outermost_template_args): New function.
13612 (register_specialization): Return the specialization.
13613 (unregister_specialization): New function.
13614 (tsubst_template_parms): Likewise.
13615 (most_specialized, most_specialized_class): Prototype here as
13616 static.
13617 (original_template): Rename to most_general_template.
13618 (tsubst_template_parms): New function.
13619 (set_mangled_name_for_template_decl): Likewise.
13620 (TMPL_ARGS_DEPTH): New macro.
13621 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
13622 (TMPL_ARGS_LEVEL): New macro.
13623 (SET_TMPL_ARGS_LEVEL): Likewise.
13624 (TMPL_ARG): Likewise.
13625 (SET_TMPL_ARG): Likewise.
13626 (TMPL_ARGS_DEPTH): Likewise.
13627 (finish_member_template_decl): Use finish_template_decl.
13628 (maybe_process_partial_specialization): New function, split out
13629 from tsubst.
13630 (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
13631 (maybe_begin_member_template_processing): Use new macros.
13632 (is_member_template): Likewise.
13633 (is_member_template_class): Likewise.
13634 (add_to_template_args): Likewise. Deal with multiple levels of
13635 args.
13636 (maybe_process_partial_specialization): New function.
13637 (retrieve_specialization): Add consistency check.
13638 (determine_specialization): Return full argument list.
13639 (check_explicit_specialization): Tweak friend handling. Use full
13640 argument lists. Simplify.
13641 (current_template_args): Use new macros.
13642 (push_template_decl_real): Change ill-named mainargs to specargs.
13643 Check that a partial specialization actually specializes at least
13644 one parameter. Improve friend handling. Modify for full
13645 template arguments.
13646 (classtype_mangled_name): Don't mangle the names of
13647 specializations.
13648 (lookup_template_class): Add entering_scope parameter. Use it to
13649 avoid finding a template type when an instantiation is required.
13650 Simplify. Use full template arguments.
13651 (tsubst_friend_function): Use unregister_specialization. Use new
13652 macros. Use full template arguments.
13653 (tsubst_friend_class): Substitute, using tsubst_template_parms,
13654 into the template parameters before passing them to
13655 redeclare_class_template.
13656 (instantiate_class_template): Simplify. Use full template
13657 arguments. Adjust calls to get_class_bindings. Use
13658 SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling.
13659 (innermost_args): Use new macros.
13660 (tsubst_aggr_type): New function, split out from tsubst.
13661 (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
13662 conventions for lookup_template_class. Refine handling of partial
13663 instantiations. Remove calls to complete_template_args.
13664 Simplify. Add consistency checks. Use set_mangled_name_for_decl
13665 and set_mangled_name_for_template_decl.
13666 (tsubst_copy): Use tsubst_aggr_type.
13667 (instantiate_template): Use full template arguments.
13668 (more_specialized): Improve formatting.
13669 (more_specialized_class): Adjust calls to get_class_bindings.
13670 (get_bindings_real): Don't call complete_template_args.
13671 (most_specialized): Don't overwrite input; create a new list.
13672 (most_specialized_class): Use most_general_template.
13673 (regenerate_decl_from_template): Use unregister_specialization.
13674 Use full template arguments.
13675 (instantiate_decl): Use full template arguments.
13676 (set_mangled_name_for_template_decl): New function.
13677 * semantics.c (begin_class_definition): Use
13678 maybe_process_partial_specialization.
13679 (finish_member_class_template): New function.
13680 (finish_template_decl): Likewise.
13681 (finish_template_type): Likewise.
13682 (typeck.c): Don't crash after issuing a compiler_error.
13683 * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
13684
13685 1998-07-27 Jason Merrill <jason@yorick.cygnus.com>
13686
13687 * typeck2.c (build_functional_cast): Handle default-initialization.
13688
13689 * call.c (build_over_call): Pass 1 to popclass.
13690
13691 * parse.y (direct_notype_declarator): Add precedence declaration
13692 to notype_unqualified_id case.
13693 * Makefile.in (EXPECT): Adjust.
13694
13695 * tree.c (ovl_member): Fix for single function in OVL.
13696
13697 1998-07-27 Dave Brolley <brolley@cygnus.com>
13698
13699 * c-lex.c (yylex): Fix boundary conditions in character literal and
13700 string literal loops.
13701
13702 1998-07-24 Jason Merrill <jason@yorick.cygnus.com>
13703
13704 * decl.c (lookup_name_real): OK, do return the from_obj value
13705 unless got_object depends on template parms.
13706
13707 * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
13708
13709 * pt.c (coerce_template_parms): Also complain about local enums.
13710
13711 * cp-tree.h: Add prototype for set_identifier_local_value.
13712 * decl.c (set_identifier_local_value_with_scope): Make static,
13713 prototype.
13714 * search.c (covariant_return_p): Likewise.
13715 * except.c (build_terminate_handler, alloc_eh_object): Likewise.
13716
13717 * call.c (build_method_call): Only pull out the type of a destructor
13718 if it's a template type parm.
13719 * decl.c (lookup_name_real): Never return the from_obj value.
13720
13721 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
13722
13723 * except.c (process_start_catch_block_old): Call start_decl_1 for
13724 catch parm.
13725 * decl.c (start_decl_1): Avoid duplicate error.
13726
13727 * init.c (expand_default_init): Only perform the initialization if
13728 it will do something.
13729
13730 1998-07-23 H.J. Lu (hjl@gnu.org)
13731
13732 * parse.y (base_class): Check for invalid base class.
13733
13734 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
13735
13736 * decl2.c (import_export_template): Fold in...
13737 (import_export_class): ...to here. Handle dllimport/export.
13738
13739 * class.c (build_vtable): Pass at_eof to import_export_vtable.
13740 (prepare_fresh_vtable): Likewise.
13741 * decl2.c (import_export_class): Split out...
13742 (finish_prevtable_vardecl): From here.
13743 * class.c (finish_struct_1): Call import_export_class if at_eof.
13744
13745 * decl.c (start_function): #if 0 mysterious code I wrote and have
13746 forgotten why.
13747 * rtti.c (get_tinfo_fn): If this is for a class type, set
13748 DECL_CONTEXT.
13749
13750 1998-07-22 Jason Merrill <jason@yorick.cygnus.com>
13751
13752 * inc/exception: Change terminate and unexpected to ().
13753
13754 * parse.y (named_class_head_sans_basetype_defn): A
13755 named_class_head_sans_basetype followed by '{' or ':' is a defn.
13756
13757 1998-07-21 Jason Merrill <jason@yorick.cygnus.com>
13758
13759 * tree.c (canonical_type_variant): New fn to handle arrays.
13760 * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
13761 * pt.c (unify, default case): Also fold arg. Fix array bounds case.
13762 * method.c (process_overload_item): Use build_overload_value for
13763 arrays.
13764
13765 1998-07-20 Dave Brolley <brolley@cygnus.com>
13766
13767 * lex.c (mbchar.h): #include it.
13768 (GET_ENVIRONMENT): New macro.
13769 (init_parse): Set character set based on LANG environment variable.
13770 (real_yylex): Handle multibyte characters in character literals.
13771 (real_yylex): Handle multibyte characters in string literals.
13772
13773 1998-07-19 Jason Merrill <jason@yorick.cygnus.com>
13774
13775 * lex.c (do_identifier): Look for class value even if we don't
13776 have a global value. Do implicit declaration if parsing is 2.
13777 * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
13778 lookup.
13779
13780 1998-07-19 Mark Mitchell <mark@markmitchell.com>
13781
13782 * decl.c (pushtag): Revert previous change.
13783 * pt.c (lookup_template_class): Don't put out debugging
13784 information for types that use template parameters.
13785
13786 * decl.c (pushtag): Don't put out debugging information for
13787 compiler-generated typedefs.
13788
13789 * error.c (dump_type_real): Don't crash when presented with
13790 intQI_type_node or the like.
13791
13792 * semantics.c (finish_translation_unit): Fix spelling error in
13793 comment.
13794
13795 1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
13796
13797 * decl.c (lookup_name_real): Pull out single function here.
13798 (select_decl): Not here.
13799 (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
13800
13801 * decl.c (qualify_lookup): Tweak again.
13802
13803 * pt.c (lookup_template_class): Don't mess with the context of the
13804 instantiation.
13805 * decl2.c (current_decl_namespace): Remove special handling for
13806 templates.
13807
13808 * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
13809 a member template specialization.
13810
13811 * tree.c (ovl_member): Use decls_match to compare functions.
13812 * decl.c (decls_match): Check the context of a function.
13813
13814 * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
13815 in Koenig lookup support rules.
13816 * semantics.c (finish_call_expr): Handle the new cases.
13817
13818 * typeck.c (build_x_function_call): Handle overloaded methods.
13819
13820 * decl.c (grokvardecl): Don't call build_static_name for extern "C".
13821
13822 1998-07-16 Mark Mitchell <mark@markmitchell.com>
13823
13824 * semantics.c (finish_object_call_expr): Revert previous change.
13825 * call.c (build_new_method_call): Likewise. Instead, convert
13826 TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
13827
13828 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
13829
13830 * decl.c (qualify_lookup): Handle templates.
13831
13832 * decl2.c (do_using_directive): Don't pass ancestor.
13833 * decl.c (push_using_directive): Calculate ancestor.
13834
13835 * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
13836 * decl.c (pushdecl): Move type shadowing handling from here...
13837 (duplicate_decls): ...to here.
13838 * decl.c (set_identifier_local_value_with_scope): New fn.
13839 (pushdecl): Use it.
13840 (set_identifier_local_value, lookup_type_current_level): New fns.
13841 * decl2.c (do_local_using_decl): Handle types and binding level
13842 stuff properly.
13843
13844 * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
13845 * decl.c (select_decl): Extract a lone function from an OVERLOAD.
13846 (lookup_namespace_name): Likewise.
13847 * typeck.c (build_unary_op): Not here anymore.
13848
13849 * decl2.c (do_class_using_decl): Make sure we get an identifier.
13850 * class.c (handle_using_decl): Ignore TYPE_DECLs.
13851
13852 * decl.c (qualify_lookup): New fn.
13853 (lookup_name_real): Use it.
13854
13855 1998-07-16 Martin v. Loewis <loewis@informatik.hu-berlin.de>
13856
13857 * decl2.c (add_using_namespace): When directly using a namespace
13858 that was indirect before, promote it.
13859
13860 * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
13861 LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
13862 LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
13863 * decl.c (select_decl): Replace two flag parameters by one.
13864 (unqualified_namespace_lookup): Likewise, pass flag.
13865 (lookup_flags): New function.
13866 (lookup_name_real): Compute flags, pass them.
13867 (lookup_namespace_name): Call with zero-flag.
13868 * decl2.c (ambiguous_decl): Add flag parameter, complain only
13869 according to flags.
13870 (lookup_using_namespace, qualified_lookup_using_namespace):
13871 Add flag parameter, pass them through.
13872 * lex.c (do_scoped_id): Call with zero-flag.
13873
13874 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
13875
13876 * typeck.c (convert_for_assignment): Use comptypes.
13877
13878 1998-07-16 Mark Mitchell <mark@markmitchell.com>
13879
13880 * semantics.c (finish_object_call_expr): Move test for the
13881 function called being a TYPE_DECL to ...
13882 * call.c (build_new_method_call): Here.
13883
13884 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
13885
13886 * decl2.c (arg_assoc_class): Also look at template arguments, if any.
13887 (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
13888
13889 * lex.c (looking_for_typename): Don't initialize.
13890
13891 * decl2.c (ambiguous_decl): Clarify error message.
13892
13893 * decl.c (push_using_directive): Iterate over namespaces used
13894 indirectly.
13895
13896 1998-07-15 Martin v. Löwis <loewis@informatik.hu-berlin.de>
13897
13898 * decl2.c (add_using_namespace): Iterate over namespaces used
13899 indirectly.
13900
13901 * decl.c (lookup_name_real): Accept namespace aliases as locals.
13902 (cat_namespace_levels): Ignore aliases.
13903 (duplicate_decls): Ignore duplicate aliases.
13904 * decl2.c (do_namespace_alias): Process block level namespace
13905 aliases. Store alias with pushdecl. Remove odr errors.
13906 * parse.y (namespace_alias): New non-terminal.
13907 (extdef): Use it.
13908
13909 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
13910
13911 * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
13912 Handle TEMPLATE_TYPE_PARM.
13913 (arg_assoc): Rewrite.
13914
13915 * pt.c (complete_template_args): Don't look at the context unless
13916 we have to.
13917
13918 * method.c (build_decl_overload_real): Fix namespace handling.
13919
13920 * typeck.c (build_unary_op): Extract a lone function from an
13921 OVERLOAD.
13922
13923 * call.c (build_scoped_method_call): Handle getting a namespace
13924 for basetype in a destructor call.
13925 (check_dtor_name): Handle enums.
13926
13927 * parse.y (using_directive): New nonterminal.
13928 (extdef, simple_stmt): Use it.
13929
13930 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
13931
13932 * decl2.c (add_function): Move error message ...
13933 (arg_assoc_namespace): ... from here.
13934
13935 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
13936
13937 * parse.y (namespace_qualifier): Fix multiple level handling.
13938 * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
13939 (arg_assoc): Don't skip the first argument of a function.
13940
13941 Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com)
13942
13943 * search.c (my_tree_cons): Clean up.
13944
13945 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
13946
13947 * call.c (joust): Don't warn about "confusing" conversions to the
13948 same type.
13949
13950 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
13951
13952 * class.c (push_nested_class): Complain about namespaces.
13953 * decl.c (start_decl): Enter the object's namespace.
13954 (cp_finish_decl): Leave it.
13955 (grokdeclarator): Likewise.
13956 * decl2.c (check_decl_namespace): New function.
13957 (finish_file): Call it.
13958 * parse.y (complex_direct_notype_declarator): Set complexity
13959 of namespace-qualified ids to -1, enter the namespace.
13960
13961 * method.c (build_template_decl_overload): Expect _DECL as first
13962 parameter. Put context temporarily into current_namespace.
13963 * pt.c (check_explicit_specialization): Change caller.
13964 (tsubst): Likewise.
13965
13966 * init.c (build_offset_ref): Call mark_used and
13967 convert_from_reference for namespace members.
13968
13969 Mon Jul 13 23:25:28 1998 Martin von Löwis <loewis@informatik.hu-berlin.de>
13970
13971 * search.c (my_tree_cons): The bitfield is at index 2.
13972
13973 Mon Jul 13 17:21:01 1998 Nick Clifton <nickc@cygnus.com>
13974
13975 * lang-options.h: Format changed to work with new --help support
13976 in gcc/toplev.c
13977
13978 1998-07-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
13979
13980 * decl2.c (build_expr_from_tree): Change calls of do_identifier.
13981 Do Koenig lookup in CALL_EXPR.
13982 (arg_assoc): Handle error_mark.
13983 * lex.c (is_global): New function.
13984 (do_identifier): Expect arguments for Koenig lookup.
13985 * parse.y (primary): Add rules for calls of unqualified function calls.
13986 (do_id): Change call of do_identifier.
13987 * pt.c (finish_stmt_expr): Likewise.
13988 * semantics.c (finish_id_expr): Likewise.
13989 (finish_call_expr): Add integer parameter to indicate
13990 argument-dependent lookup.
13991
13992 * decl.c (struct binding_level): New field using_directives.
13993 (push_using_decl): Not sorry anymore.
13994 (push_using_directive): New function.
13995 (lookup_tag): Use CP_DECL_CONTEXT to iterate.
13996 (unqualified_namespace_lookup): New function, code from ...
13997 (lookup_name_real): ... here.
13998 * decl2.c (lookup_using_namespace): Pass using list instead of
13999 initial scope.
14000 (validate_nonmember_using_decl): New function.
14001 (do_nonmember_using_decl): New function.
14002 (do_toplevel_using_decl): Use them.
14003 (do_local_using_decl): New function.
14004 (do_using_directive): Support block-level directives.
14005 * parse.y (simple_stmt): Support using declarations and
14006 directives.
14007 (namespace_qualifier, namespace_using_decl): New non-terminals.
14008
14009 * xref.c (classname): New function.
14010 (GNU_xref_hier): Change class and base parameters to tree.
14011 * decl.c (xref_baseypes): Change caller.
14012 * friend.c (make_friend_class): Likewise.
14013
14014 1998-07-12 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
14015
14016 * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
14017 comparison.
14018
14019 * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
14020 template template parameter, record its use.
14021 (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
14022 its template arguments if exists.
14023
14024 * pt.c (coerce_template_template_parms): New function equivalent
14025 to coerce_template_parms when IS_TMPL_PARM is true.
14026 (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter,
14027 all callers changed.
14028
14029 (coerce_template_parms): Access ARGLIST properly when creating a
14030 new vector. Only accept implicit TYPE_DECL as valid argument for
14031 a template template parameter when it is a base class of
14032 current_class_type. Don't display error message when COMPLAIN is
14033 false.
14034
14035 1998-07-12 Klaus Kaempf (kkaempf@progis.de)
14036
14037 * repo.c (get_base_filename): Use file_name_nondirectory.
14038 (open_repo_file): Likewise.
14039 * cp-tree.h (file_name_nondirectory): Add prototype.
14040
14041 1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
14042
14043 * friend.c (do_friend): Pull the identifier out of declarator.
14044 Use cp_error and friends.
14045 * decl2.c (qualified_lookup_using_namespace): Fix call to
14046 purpose_member.
14047 * decl.c (lookup_name_real): Don't call complete_type on a namespace.
14048 (grokvardecl): Use DECL_CLASS_SCOPE_P.
14049 * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
14050 * class.c (warn_hidden): Fix for OVERLOAD.
14051 From grahams@rcp.co.uk:
14052 * cp-tree.h (DEFARG_NODE_CHECK): New macro.
14053 (DEFARG_LENGTH, DEFARG_POINTER): Use it.
14054
14055 Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com)
14056
14057 * g++.1 (-traditional): Remove duplicated documentation.
14058
14059 1998-07-11 Mark Mitchell <mark@markmitchell.com>
14060
14061 * method.c (flush_repeats): Add nrepeats parameter.
14062 (issue_nrepeats): Likewise.
14063 (is_back_referenceable_type): New function. Don't back-reference
14064 TEMPLATE_TYPE_PARMs as well as simple types like integers.
14065 (build_mangled_name_for_type): Likewise.
14066 (build_mangled_name_for_type_with_Gcode): Likewise.
14067 (lasttype): Remove.
14068 (nrepeats): Likewise.
14069 (Nrepeats): Likewise.
14070 (start_squangling): Don't clear the variables removed above.
14071 (end_squangling): Likewise.
14072 (flush_repeats): Tidy. Use nrepeats parameter rather than
14073 Nrepeats global.
14074 (issue_nrepeats): Likewise, but with nrepeats global. Use
14075 is_backreferenceable_type.
14076 (build_overload_nested_name): Tidy. Add comment. Use
14077 build_mangled_name_for_type.
14078 (build_underscore_int): Comment.
14079 (build_overload_scope_ref): Use build_mangled_name_for_type.
14080 (build_overload_int): Likewise.
14081 (build_template_template_parm_names): Tidy.
14082 (build_template_parm_names): Use build_mangled_name_for_type.
14083 (build_overload_identifier): Add comments.
14084 (build_mangled_name_for_type_with_Gcode): Split out from
14085 build_mangled_name.
14086 (build_mangled_name_for_type): Use it.
14087 (build_mangled_name): Rework to use build_mangled_name_for_type
14088 and to not use global nrepeats/Nrepeats. Tidy.
14089 (process_modifiers): Tidy.
14090 (check_btype): Use is_backreferenceable_type. Add comment.
14091 Rename `node' to `type'.
14092 (process_overload_item): Set numeric_output_need_bar here.
14093 Use build_mangled_name_for_type. Tidy.
14094 (build_decl_overload_real): Tidy. Don't use Nrepeats. Use
14095 build_mangled_name_for_type.
14096
14097 * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
14098 for TYPE_DECLs.
14099
14100 1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com>
14101
14102 * cp-tree.h (warn_long_long): Define.
14103 * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
14104 warning "ANSI C++ does not support `long long'".
14105 * decl2.c (warn_long_long): Define.
14106 (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
14107
14108 1998-07-07 Jason Merrill <jason@yorick.cygnus.com>
14109
14110 * decl.c (xref_tag): Handle attributes between 'class' and name.
14111 * parse.y (aggr): Likewise.
14112 * semantics.c (finish_class_definition): Likewise.
14113 * Makefile.in (EXPECTED): Adjust.
14114
14115 * cp-tree.h: Declare flag_optional_diags and warn_multichar.
14116 * decl2.c: Define them.
14117 (lang_decode_option): Handle them.
14118 * lang-options.h: Add -foptional-diags.
14119 * class.c (finish_struct): Don't complain about multiple meanings of
14120 name if -fno-optional-diags.
14121 * decl.c (pushdecl_class_level): Likewise.
14122 * lex.c (real_yylex): Check warn_multichar.
14123
14124 1998-07-06 Jason Merrill <jason@yorick.cygnus.com>
14125
14126 * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
14127
14128 * tree.c (make_binfo): Fix length.
14129
14130 1998-06-30 Benjamin Kosnik <bkoz@bliss.nabi.net>
14131
14132 * decl2.c (lang_decode_option): Remove warn_template_debugging.
14133 * lang-options.h: Likewise.
14134
14135 Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14136
14137 * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
14138 (process_start_catch_block): Likewise for variables
14139 `false_label_rtx', `call_rtx' and `return_value_rtx'.
14140
14141 1998-06-29 Brendan Kehoe <brendan@cygnus.com>
14142
14143 * tree.c (build_srcloc): Make sure we allocate this node on the
14144 permanent obstack.
14145
14146 Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com>
14147
14148 * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
14149 (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
14150 (lang_specific_driver): Only add -lm automatically if need_math is
14151 nonzero.
14152
14153 Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com)
14154
14155 * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o
14156
14157 Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14158
14159 * Makefile.in (EXPR_H): New dependency variable.
14160 (decl2.o): Depend on $(EXPR_H).
14161 (typeck.o): Likewise.
14162 (init.o): Likewise.
14163 (expr.o): Likewise.
14164
14165 1998-06-25 Benjamin Kosnik <bkoz@lisa.cygnus.com>
14166
14167 * decl.c (start_enum): Put local enums on permanent_obstack.
14168
14169 1998-06-25 Mark Mitchell <mark@markmitchell.com>
14170
14171 * cp-tree.h (c_get_alias_set): Declare.
14172 * decl.c (init_decl_processing): Set lang_get_alias_set.
14173
14174 1998-06-25 Andrew MacLeod <amacleod@cygnus.com>
14175
14176 * cp-tree.h (mark_all_runtime_matches): Add function prototype.
14177 * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
14178 flag for all function decls which are in the exception table.
14179 * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
14180 * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
14181 code is emitted for any referenced rtti function.
14182
14183 1998-06-25 Dave Brolley <brolley@cygnus.com>
14184
14185 * lang-specs.h: Use new | syntax to eliminate
14186 string concatenation.
14187
14188 1998-06-25 Jason Merrill <jason@yorick.cygnus.com>
14189
14190 * cp-tree.h (CP_DECL_CONTEXT): New macro.
14191 * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
14192 * method.c (build_overload_nested_name): Likewise.
14193 * sig.c (build_signature_pointer_or_reference_type): Don't set
14194 DECL_CONTEXT.
14195
14196 1998-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14197
14198 Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
14199 * cp-tree.h (FROB_CONTEXT): New macro.
14200 (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
14201 * decl.c (namespace_binding): Replace NULL_TREE with
14202 global_namespace.
14203 (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
14204 * decl2.c (is_namespace_ancestor, lookup_using_namespace):
14205 Likewise.
14206 * decl.c (pushtag): Use FROB_CONTEXT.
14207 (pushdecl, make_typename_type, define_function, grokdeclarator):
14208 Likewise.
14209 * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
14210 * pt.c (push_template_decl_real, lookup_template_class, tsubst):
14211 Likewise.
14212 * decl2.c (decl_namespace): Return global_namespace if no context.
14213 * method.c (build_overload_nested_name): Expect null as context.
14214 * pt.c (mangle_class_name_for_template): Do nothing for null
14215 contexts.
14216 (lookup_template_class): Allow for null id_context.
14217
14218 1998-06-25 Richard Henderson <rth@cygnus.com>
14219
14220 * method.c (emit_thunk): Set current_function_is_thunk for the
14221 ASM_OUTPUT_MI_THUNK case as well.
14222
14223 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
14224
14225 * exception.cc (__cplus_type_matcher): Get a match_info pointer
14226 instead of an exception table entry as a parameter.
14227
14228 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
14229
14230 * parse.y (function_try_block): Don't call start_catch_handler.
14231 * except.c (call_eh_info): Remove coerced field from declaration.
14232 (build_eh_type_type_ref): New function to create an address of a
14233 rtti function for the new style exception tables.
14234 (expand_start_catch_block): Split function, this contains the
14235 common part.
14236 (process_start_catch_block_old): New function to perform the rest
14237 of expand_start_catch_block under old style exceptions.
14238 (process_start_catch_block_old): New function to perform the rest
14239 of expand_start_catch_block under new style exceptions.
14240 (expand_end_catch_block): Only pop the false label off the stack under
14241 the old style of exceptions.
14242 * semantics.c (finish_try_block): Don't call start_catch_handler.
14243 * exception.cc (struct cp_eh_info): Add original_value field.
14244 (__cplus_type_matcher): Perform type matching on the original exception
14245 value, and if we have a match, set the current value.
14246 (__cp_push_exception): Set the original exception value.
14247
14248 1998-06-23 Jason Merrill <jason@yorick.cygnus.com>
14249
14250 * call.c (joust): Fix confusing conversion warning.
14251
14252 * call.c (build_op_delete_call): Add placement parm. Check
14253 LOOKUP_SPECULATIVELY.
14254 * cp-tree.h, decl2.c, init.c: Adjust.
14255 * decl.c (finish_function): Use it.
14256
14257 * pt.c (tsubst): Diagnose creating void fields or variables.
14258
14259 Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14260
14261 * call.c (build_scoped_method_call): Remove unused variable `tmp'.
14262
14263 * cp-tree.h (check_dtor_name): Add prototype.
14264
14265 * init.c (expand_member_init): Remove unused variables
14266 `ptr_type_node', `parm' and `rval'.
14267
14268 * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
14269 in call to fprintf.
14270 (lang_print_xnode): Likewise.
14271
14272 * typeck2.c (enum_name_string): Cast argument to sprintf to long
14273 and use %ld specifier.
14274
14275 * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
14276 specifier in call to fprintf.
14277 (GNU_xref_member): Cast argument to sprintf to int.
14278
14279 Fri Jun 19 23:22:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
14280
14281 * typeck2.c (pop_init_level): Warn about implicit zero initialization
14282 of struct members.
14283
14284 Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14285
14286 * cp-tree.h: Prototype function `check_java_method'.
14287
14288 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
14289
14290 * class.c (finish_struct): Make conflicting use of id a pedwarn.
14291 * decl.c (pushdecl_class_level): Likewise.
14292
14293 1998-06-17 Mark Mitchell <mark@markmitchell.com>
14294
14295 * pt.c (convert_nontype_argument): Issue an error when presented
14296 with an integer (real) constant that cannot be simplified to an
14297 INT_CST (REAL_CST).
14298
14299 * cp-tree.h (c_get_alias_set): Remove declaration added in
14300 1998-06-13 change that should never have been checked in.
14301
14302 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
14303
14304 * typeck.c (build_binary_op_nodefault): Change % in format strings
14305 to %%.
14306
14307 * decl.c (grokvardecl): Don't build_static_name for decls that
14308 aren't at namespace scope.
14309
14310 * init.c (perform_member_init): Catch default-initialization of
14311 references.
14312
14313 1998-06-17 Mark Mitchell <mark@markmitchell.com>
14314
14315 * errfn.c (cp_thing): Handle the `%%' formatting sequence.
14316
14317 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
14318
14319 * method.c (hack_identifier): Complain about getting a namespace
14320 or class template.
14321 * typeck.c (decay_conversion): Remove check for namespaces.
14322 * typeck2.c (incomplete_type_error): Likewise.
14323 * parse.y (template_arg): Add PTYPENAME expansion.
14324
14325 1998-06-16 Andrew MacLeod <amacleod@cygnus.com>
14326
14327 * decl.c (grokvardecl): Don't build external assembler names for
14328 TYPENAMEs in other namespaces as there is no declarator.
14329 * error.c (cp_file_of, cp_line_of): Don't extract file or line number
14330 info from DECL_CONTEXT if it is NULL.
14331
14332 1998-06-16 Jason Merrill <jason@yorick.cygnus.com>
14333
14334 * call.c (check_dtor_name): Split out.
14335 (build_scoped_method_call): Use it.
14336 (build_method_call): Use it.
14337 * init.c (build_offset_ref): Use it.
14338
14339 * typeck.c (build_static_cast): Fix handling of pointers to members.
14340
14341 * decl.c (finish_function): Just return nothing from a constructor.
14342 * typeck.c (c_expand_return): Complain about returning a void
14343 expression from a destructor.
14344
14345 1998-06-13 Mark Mitchell <mark@markmitchell.com>
14346
14347 * class.c (alter_access): Accept a BINFO explaining how to get
14348 from the entity whose accessed is being altered to the type doing
14349 the altering.
14350 (handle_using_decl): New function containing code split out from ...
14351 (finish_struct_1): Here.
14352
14353 * cp-tree.h (complete_type_or_else): Declare.
14354 * init.c (build_new_1, build_delete): Use it.
14355 * typeck.c (require_complete_type): Use complete_type, rather than
14356 expanding it inline.
14357 (complete_type_or_else): New function.
14358 (build_component_ref): Use it.
14359 (pointer_int_sum): Make sure the type pointed to is complete.
14360 (pointer_diff): Likewise.
14361
14362 * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
14363 types.
14364
14365 * search.c (get_matching_virtual): Note that member templates
14366 cannot override virtual functions.
14367
14368 1998-06-12 Brendan Kehoe <brendan@cygnus.com>
14369
14370 * pt.c (check_explicit_specialization): If DECLARATOR turned into
14371 an error_mark_node from lookup_template_function, return the same.
14372 (determine_specialization): Also make sure TEMPLATE_ID isn't an
14373 error_mark_node, before we try to read its operands.
14374 * decl.c (grokdeclarator): If we got an error_mark_node from
14375 check_explicit_specialization, just return it right back.
14376
14377 1998-06-12 Mark Mitchell <mark@markmitchell.com>
14378
14379 * class.c (instantiate_type): Don't treat template-ids that don't
14380 specify any template arguments as equivalent to ordinary
14381 identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to
14382 pointer-to-members for member templates. Tidy slightly.
14383 * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
14384 * init.c (build_offset_ref): Handle template-ids like ordinary
14385 identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
14386 offset part of the OFFSET_REF.
14387 * typeck.c (build_unary_op): Change check for unknown types to
14388 look for OFFSET_REFs, not SCOPE_REFs.
14389
14390 1998-06-11 Mark Mitchell <mark@markmitchell.com>
14391
14392 * pt.c (is_member_template_class): New function.
14393 (push_template_decl_real): Use it.
14394
14395 1998-06-11 Benjamin Kosnik <bkoz@elmo.cygnus.com>
14396
14397 * friend.c (do_friend): Add support for nested classes using
14398 member functions of the enclosing class as friends.
14399
14400 1998-06-10 Mark Mitchell <mark@markmitchell.com>
14401
14402 * call.c (convert_default_arg): Make global, not static.
14403 (convert_arg_for_ellipsis): Split out from ...
14404 (build_over_call): Here.
14405 * cp-tree.h (convert_default_arg); Declare.
14406 (convert_arg_to_ellipsis): Likewise.
14407 (do_member_init): Remove.
14408 * init.c (do_member_init): Remove; this code is dead.
14409 (expand_member_init): Remove much of this code; it is dead.
14410 * typeck.c (convert_arguments): Use convert_default_arg and
14411 convert_arg_for_ellipsis, rather than duplicating here.
14412
14413 * call.c (convert_like): Don't fail silently if
14414 build_user_type_conversion fails. Always return error_mark_node
14415 for failure.
14416
14417 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
14418
14419 * search.c (covariant_return_p): Complain about ambiguous base.
14420
14421 * typeck.c (build_component_ref): Diagnose ref to nested type.
14422
14423 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
14424
14425 * decl.c (grokparms): Check that INIT isn't an error_mark_node
14426 before giving error about invalid type for default arg.
14427
14428 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
14429
14430 * call.c (build_method_call): Fix thinko.
14431
14432 1998-06-10 Dave Brolley <brolley@cygnus.com>
14433
14434 * decl2.c (lang_decode_option): New argc/argv interface.
14435 * cp-tree.h (lang_decode_option): New argc/argv interface.
14436 * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
14437 specified for cpplib-enabled compilers.
14438 * lex.c (lang_init): Don't check_newline for cpplib.
14439 (init_parse): Don't initialize cpplib here.
14440
14441 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
14442
14443 * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
14444 piece before checking DECL_MUTABLE_P.
14445
14446 1998-06-10 John Carr <jfc@mit.edu>
14447
14448 * tree.c (debug_binfo): Make printf format match arguments.
14449
14450 * error.c (OB_PUTI): Make printf format match arguments.
14451
14452 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
14453
14454 * init.c (perform_member_init): Handle default-initialization.
14455
14456 * except.c (build_throw): Handle throwing NULL.
14457
14458 * typeck.c (build_x_function_call): Use resolve_offset_ref.
14459
14460 * search.c (compute_access): Only strip an anonymous union
14461 for a FIELD_DECL.
14462
14463 * call.c (add_builtin_candidates): Tweak.
14464
14465 * cvt.c (build_expr_type_conversion): Restore code for conversion
14466 from class types.
14467 * decl2.c (delete_sanity): Use it. Clean up.
14468
14469 * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
14470
14471 1998-06-10 Branko Cibej <branko.cibej@hermes.si>
14472
14473 * typeck.c (c_expand_return): Don't warn about void expressions on
14474 return statements in functions returning void.
14475
14476 1998-06-09 Mark Mitchell <mark@markmitchell.com>
14477
14478 * pt.c (fn_type_unification): Revise documentation. Tidy.
14479 (type_unification): Likewise.
14480
14481 1998-06-09 Andrew MacLeod <amacleod@cygnus.com>
14482
14483 * semantics.c (finish_try_block): Rename expand_start_catch, and delete
14484 expand_end_catch.
14485 * parse.y (function_try_block): Rename expand_start_catch, and delete
14486 expand_end_catch.
14487 * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
14488 expand_end_catch.
14489
14490 1998-06-09 Jason Merrill <jason@yorick.cygnus.com>
14491
14492 * search.c (lookup_member): New fn.
14493 * class.c (finish_struct_1): Use it.
14494 * decl.c (lookup_name_real): Use it.
14495
14496 Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14497
14498 * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
14499
14500 * cp-tree.h: Add prototype for `maybe_print_template_context' and
14501 `maybe_make_one_only'.
14502
14503 * decl.c (auto_function): Remove unused variable `decl'.
14504
14505 * decl2.c: Include dwarf2out.h and dwarfout.h.
14506
14507 * lex.c: Remove redundant declarations of `set_float_handler' and
14508 `asm_out_file'.
14509
14510 1998-06-08 Andrew MacLeod <amacleod@cygnus.com>
14511
14512 * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
14513 time flag. Call __cp_eh_info instead of __cp_exception_info.
14514 * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
14515 (__cp_exception_info): Return offset into cp_eh_info structure to
14516 match what use to be the start of this structure.
14517 (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
14518 (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
14519 compile time flag.
14520 (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
14521 __cp_eh_info instead of __cp_exception_info.
14522
14523 1998-06-08 Jason Merrill <jason@yorick.cygnus.com>
14524
14525 * decl.c (cp_finish_decl): Disable inlining of extern inlines
14526 with static variables.
14527
14528 1998-06-08 Mark Mitchell <mark@markmitchell.com>
14529
14530 * init.c (build_offset_ref): Correct previous change to use build,
14531 not build_min.
14532
14533 1998-06-07 Mark Mitchell <mark@markmitchell.com>
14534
14535 * class.c (instantiate_type): Handle pointer-to-members where the
14536 member is a template.
14537 * init.c (build_offset_ref): Likewise.
14538 * typeck.c (build_unary_op): Likewise.
14539
14540 1998-06-07 Richard Henderson <rth@cygnus.com>
14541
14542 * lex.c (lang_init_options): New function.
14543 (lang_init): Remove flag_exceptions == 2 hack.
14544
14545 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
14546
14547 * search.c (envelope_add_decl): Tweak for implicit typename.
14548
14549 * call.c (joust): Also warn about confusing conversion op/constructor
14550 overload resolution.
14551
14552 * spew.c (yylex): Also return the TYPE_DECL if got_object.
14553 Don't clear got_object after '~'.
14554 * call.c (build_scoped_method_call): Tweak destructor handling.
14555 (build_method_call): Likewise.
14556 * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
14557 TYPE_MAIN_VARIANT for destructors.
14558 * semantics.c (finish_object_call_expr): Complain about calling a
14559 TYPE_DECL.
14560
14561 1998-06-05 Per Bothner <bothner@cygnus.com>
14562
14563 * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
14564 Define - update needed by gcc.c change.
14565
14566 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
14567
14568 * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
14569
14570 1998-06-05 Martin v. Loewis <loewis@informatik.hu-berlin.de>
14571
14572 * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
14573 * decl.c (lookup_name_real): Add namespaces_only parameter.
14574 If set, return only NAMESPACE_DECLs.
14575 (select_decl): Likewise.
14576 (identifier_type_value): Give additional parameter.
14577 (lookup_name_nonclass): Likewise.
14578 (lookup_name): Likewise.
14579 (find_binding): Skip namespace aliases.
14580 (binding_for_name): Likewise.
14581 (push_namespace): Check for namespace aliases.
14582 (lookup_name_namespace_only): New function.
14583 (begin_only_namespace_names, end_only_namespace_names): New functions.
14584 * decl2.c (set_decl_namespace): Skip namespace aliases.
14585 (do_using_directive): Likewise.
14586 (do_namespace_alias): Produce namespace aliases, fix alias
14587 redeclaration.
14588 * error.c (dump_decl): Support SCOPE_REF.
14589 * parse.y (extdef): Wrap lookup with namespace_only for namespace
14590 aliases and using declarations.
14591
14592 1998-06-04 Jason Merrill <jason@yorick.cygnus.com>
14593
14594 * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
14595
14596 * error.c (dump_expr): Clean up NEW_EXPR case.
14597
14598 1998-06-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
14599
14600 Suggested by Brendan Kehoe
14601 * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
14602 treat it as using ::decl.
14603
14604 * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
14605
14606 * tree.c (mapcar): Support NEW_EXPR.
14607
14608 * error.c (dump_expr): Support NEW_EXPR.
14609
14610 1998-06-03 Jason Merrill <jason@yorick.cygnus.com>
14611
14612 * method.c (make_thunk): Use overload machinery to make name.
14613 * search.c (covariant_return_p): New fn.
14614 (get_matching_virtual): Use it.
14615
14616 * init.c (build_new_1): Fix check for void.
14617
14618 1998-06-01 Per Bothner <bothner@cygnus.com>
14619
14620 * cp-tree.h (TYPE_FOR_JAVA): New macro.
14621 * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
14622 java_int_type_node, java_long_type_node, java_float_type_node,
14623 java_double_type_node, java_char_type_node, java_boolean_type_node):
14624 New "primitive" types, with predefined names __java_byte etc.
14625 (record_builtin_java_type): New function.
14626 (init_decl_processing): Make Java types with record_builtin_java_type.
14627 (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA".
14628 (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class.
14629 (grokfndecl): Call check_java_method for Java classes.
14630 * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA.
14631 (process_overload_item): Match types against specific
14632 java_XX_type_node types, rather than using is_java_type.
14633 * class.c (finish_struct_1): Don't add default copy constructor
14634 or operator= if TYPE_FOR_JAVA.
14635 (pop_lang_conext): Restore strict_prototyp proper if Java.
14636 * decl2.c (acceptable_java_type, check_java_method): New functions.
14637 * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern.
14638 (tsubst): Move common statement after if statement.
14639 * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match.
14640
14641 1998-06-01 Jason Merrill <jason@yorick.cygnus.com>
14642
14643 * pt.c (for_each_template_parm): Use first_rtl_op.
14644
14645 * tree.c (build_cplus_array_type_1): Also check index_type for
14646 template parms.
14647
14648 1998-05-31 Jason Merrill <jason@yorick.cygnus.com>
14649
14650 * pt.c (tsubst): Always copy BINFO_BASETYPES.
14651
14652 1998-05-29 scott snyder <snyder@d0sgif.fnal.gov>
14653
14654 * tree.c (layout_basetypes): If we change TYPE_SIZE, change
14655 TYPE_SIZE_UNIT too.
14656
14657 1998-05-29 Mark Mitchell <mark@markmitchell.com>
14658
14659 * decl.c (grokdeclarator): Don't complain about in-class
14660 initialization of static consts if we don't really know the type
14661 of the variable.
14662
14663 1998-05-29 Jason Merrill <jason@yorick.cygnus.com>
14664
14665 * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
14666 * method.c (build_destructor_name): New fn.
14667 * decl2.c (maybe_retrofit_in_chrg): Split out...
14668 (grokclassfn): From here. Reorganize.
14669 * decl.c (grok_ctor_properties): Make sure ctors for types with
14670 vbases have the in_chrg parm.
14671 * pt.c (instantiate_class_template): Update
14672 TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call
14673 grok_*_properties.
14674 (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
14675
14676 1998-05-28 Mark Mitchell <mark@markmitchell.com>
14677
14678 * pt.c (instantiate_decl): Make test for whether or not static
14679 variables should be instantiated early match its comment.
14680
14681 1998-05-28 Jason Merrill <jason@yorick.cygnus.com>
14682
14683 * decl.c (start_decl): Always pedwarn about vacuously redeclaring
14684 a member.
14685 (start_function): Call check_default_args.
14686 * decl2.c (grokfield): Don't call check_default_args.
14687 (check_default_args): Use cp_error_at.
14688 * lex.c (do_pending_defargs): Call check_default_args.
14689
14690 1998-05-27 Brendan Kehoe <brendan@cygnus.com>
14691
14692 * call.c (build_method_call): Make sure get_type_value returns
14693 something before we try to use its TYPE_MAIN_VARIANT.
14694 (build_scoped_method_call): Likewise.
14695
14696 1998-05-27 Jason Merrill <jason@yorick.cygnus.com>
14697
14698 * typeck2.c (digest_init): Complain about getting a TREE_LIST to
14699 initialize an array.
14700
14701 * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
14702 DECL_VIRTUAL_P.
14703
14704 * friend.c (do_friend): Clarify template warning.
14705
14706 1998-05-27 Mark Mitchell <mark@markmitchell.com>
14707
14708 * decl.c (shadow_label): Don't treat decls as identifiers.
14709 (maybe_push_to_top_level): Clear shadowed_labels.
14710
14711 * pt.c (instantiate_decl): Reset lineno and filename after calling
14712 regenerate_decl_from_template.
14713
14714 * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
14715 error_mark_node.
14716
14717 1998-05-27 Kevin Buhr <buhr@stat.wisc.edu>
14718
14719 * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
14720
14721 1998-05-26 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14722
14723 * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
14724 (convert_nontype_argument): Handle cases when nontype template
14725 parameters become classes after substitution.
14726
14727 1998-05-26 Mark Mitchell <mark@markmitchell.com>
14728
14729 * friend.c (is_friend): Use comptypes, rather than == to compare
14730 types. Modify for new representation of template friends.
14731 (make_friend_class): Likewise.
14732 * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak.
14733 (instantiate_class_template): Deal with template friends.
14734
14735 * decl.c (store_parm_decls): Remove redundant call to
14736 expand_main_function.
14737
14738 1998-05-26 Benjamin Kosnik <bkoz@loony.cygnus.com>
14739
14740 * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
14741 DECL_USE_TEMPLATE.
14742
14743 1998-05-26 Per Bothner <bothner@cygnus.com>
14744
14745 * language_as_string: Handle lang_java.
14746
14747 1998-05-26 Jason Merrill <jason@yorick.cygnus.com>
14748
14749 * decl.c (pushdecl): Don't copy the type_decl.
14750
14751 1998-05-26 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14752
14753 * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
14754 current_class_type.
14755 * decl.c (grokdeclarator): Put typedefs on the type's obstack.
14756
14757 * parse.y (complex_direct_notype_declarator): Use $1 to access
14758 scope of notype_qualified_id.
14759
14760 1998-05-26 Dave Brolley <brolley@cygnus.com>
14761
14762 * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
14763 (init_parse): Initialize cpplib interface.
14764
14765 * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
14766 empty continuation.
14767
14768 1998-05-26 Mark Mitchell <mark@markmitchell.com>
14769
14770 * decl.c (pushtag): Avoid crashing on erroneous input.
14771
14772 1998-05-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14773
14774 * decl.c (push_namespace): Only produce one unique name for
14775 anonymous namespaces.
14776 (get_unique_name): Remove.
14777
14778 1998-05-25 Mark Mitchell <mark@markmitchell.com>
14779
14780 * call.c (tourney): Don't do any extra comparisons.
14781
14782 * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
14783
14784 * cp-tree.h (processing_template_parmlist): Declare.
14785 * decl.c (pushtag): Don't call push_template_decl when we
14786 shouldn't.
14787 * pt.c (processing_template_parmlist): New variable.
14788 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
14789 (complete_template_args): Use it.
14790 (add_to_template_args): Likewise.
14791 (innermost_args): Likewise.
14792 (tsubst): Likewise.
14793 (begin_template_parm_list): Use processing_template_parmlist.
14794 (end_template_parm_list): Likewise.
14795
14796 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
14797 * decl.c (grokdeclarator): Use it.
14798 * decl2.c (grok_x_components): Likewise.
14799 * init.c (initializing_context): Likewise.
14800 * method.c (do_build_copy_constructor): Likewise.
14801 (do_build_assign_ref): Likewise.
14802 * search.c (compute_access): Likewise.
14803 * typeck.c (build_component_ref): Likewise.
14804
14805 * decl.c (grokdeclarator): Don't give a cv-qualified version of an
14806 unnamed type a typedef name "for linkage purposes".
14807
14808 * pt.c (lookup_template_class): Don't look at
14809 IDENTIFIER_CLASS_VALUE when there's no current_class_type.
14810
14811 * method.c (build_overload_int): Handle error cases gracefully.
14812
14813 * pt.c (instantiate_decl): Handle static member variables
14814 correctly.
14815
14816 * pt.c (tsubst): Use the tsubst'd type when producing new
14817 TEMPLATE_PARM_INDEX nodes.
14818
14819 1998-05-24 Mark Mitchell <mark@markmitchell.com>
14820
14821 * tree.c (cp_tree_equal): Handle pointers to member functions.
14822
14823 * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make
14824 sure the type of the REF_BIND is a reference type.
14825 (maybe_handle_ref_bind, compare_ics): Rename reference_type to
14826 target_type for clarity.
14827
14828 * parse.y (xcond): Move call to condition_conversion ...
14829 * semantics.c (finish_for_cond): Here.
14830 * parse.c: Regenerated.
14831
14832 1998-05-24 Jason Merrill <jason@yorick.cygnus.com>
14833
14834 * decl.c (push_namespace): Namespaces have type void.
14835 * typeck2.c (incomplete_type_error): Complain about namespace
14836 used as expression.
14837 * typeck.c (decay_conversion): Likewise.
14838
14839 1998-05-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
14840
14841 * error.c (dump_expr): Support namespaces.
14842
14843 1998-05-23 Jason Merrill <jason@yorick.cygnus.com>
14844
14845 * cp-tree.def: Add SRCLOC.
14846 * cp-tree.h: Add struct tree_srcloc and accessor macros.
14847 * tree.c (build_srcloc, build_srcloc_here): New fns.
14848 * pt.c (add_pending_template): Use build_srcloc_here.
14849 (push_tinst_level): Update last_template_error_tick before erroring.
14850 (instantiate_decl): Restore lineno and input_filename before
14851 calling add_pending_template.
14852 * decl2.c (finish_file): Set up lineno and input_filename for
14853 pending templates.
14854
14855 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
14856
14857 * decl.c (lang_print_error_function): New fn.
14858 (init_decl_processing): Set print_error_function to use it.
14859 * errfn.c (cp_thing): Don't call maybe_print_template_context here.
14860
14861 * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
14862 ICS_BAD_FLAG.
14863
14864 * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
14865 copy-initialization.
14866
14867 * class.c (build_vtable_entry): Use int_fits_type_p.
14868 (build_vtable): Pass a signed offset to build_vtable_entry.
14869 (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
14870 set_rtti_entry): Likewise.
14871
14872 1998-05-22 Per Bothner <bothner@cygnus.com>
14873
14874 * cp-tree.h: Add comments documenting which LANG_FLAGS are used.
14875 (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used.
14876
14877 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
14878
14879 * pt.c (print_template_context): Use fprintf instead of cp_error.
14880
14881 * pt.c (determine_specialization): Just return an error_mark_node.
14882 Also print the decl we want in error messages. If we complain,
14883 return error_mark_node.
14884 (tsubst_friend_function): Set lineno and input_filename so
14885 error messages will be useful.
14886 (instantiate_template): Just return an error_mark_node.
14887 (check_explicit_specialization): Don't mess with a returned
14888 error_mark_node.
14889
14890 * pt.c (print_template_context): Add new argument.
14891 (maybe_print_template_context): New fn.
14892 (push_tinst_level): Increment tinst_level_tick.
14893 (pop_tinst_level): Likewise.
14894 * errfn.c (cp_thing): Call maybe_print_template_context. Use
14895 xrealloc instead of xmalloc.
14896
14897 * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
14898
14899 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
14900
14901 * pt.c (tsubst_friend_class): Don't call redeclare_class_template
14902 if the template we looked up is the same as the one we already
14903 have.
14904
14905 Thu May 21 11:54:44 1998 Dave Brolley <brolley@cygnus.com>
14906
14907 * lex.c: (handle_sysv_pragma): FILE* parameter not used.
14908 (cpp_reader,parse_in): Add for cpplib.
14909 (check_newline): Call handle_sysv_pragma with new interface.
14910 (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
14911
14912 * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
14913 (sub_getch): Call GETC for cpplib.
14914
14915 * cp-tree.h: (get_directive_line): Different prototype for cpplib.
14916 (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
14917
14918 * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
14919
14920 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
14921
14922 * decl2.c (maybe_make_one_only): New fn.
14923 (import_export_vtable): Use it.
14924 (import_export_decl): Likewise.
14925 * pt.c (mark_decl_instantiated): Likewise.
14926
14927 1998-05-21 Mark Mitchell <mmitchell@usa.net>
14928
14929 * decl2.c (find_representative_member): Rename to ...
14930 (build_anon_union_vars): New function.
14931 (finish_anon_union): Fix stupidity of previous change.
14932
14933 1998-05-20 Jason Merrill <jason@yorick.cygnus.com>
14934
14935 * decl.c (grokfndecl): Handle definition of specialization in
14936 friend declaration.
14937
14938 * error.c (dump_decl): Fix LOOKUP_EXPR handling.
14939
14940 1998-05-20 Mark Mitchell <mmitchell@usa.net>
14941
14942 * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
14943 to look for type declarations.
14944 (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
14945 * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
14946 (finish_member_class_template): Declare.
14947 * decl.c (pushtag): Put member class templates on the
14948 CLASSTYPE_TAGS list, just as for ordinary member classes.
14949 (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
14950 (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
14951 IDENTIFIER_NAMESPACE_VALUEs.
14952 * parse.y (component_decl): Move code to ...
14953 * semantics.c (finish_member_class_template): New function.
14954 Don't put member class templates on the list of components for a
14955 class.
14956 * parse.c: Regenerated.
14957 * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
14958 In fact, don't use DECL_CONTEXT at all here.
14959
14960 1998-05-20 Martin von Loewis <loewis@informatik.hu-berlin.de>
14961
14962 * decl.c (record_unknown_type): New function.
14963 (init_decl_processing): Call it for the unknown and global type
14964 nodes.
14965
14966 1998-05-20 Mark Mitchell <mmitchell@usa.net>
14967
14968 * decl2.c (find_representative_member): New function.
14969 (finish_anon_union): Use it.
14970
14971 * cp-tree.h (MAIN_NAME_P): New macro.
14972 (DECL_MAIN_P): Likwise.
14973 * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
14974 (grokfndecl): Use the new macros.
14975 (grokdeclarator): Likewise.
14976 (start_function): Likewise.
14977 (store_parm_decls): Likewise.
14978 (finsh_function): Likewise.
14979 * friend.c (do_friend): Likewise.
14980 * typeck.c (build_function_call_real): Likewise.
14981 (build_unary_op): Likewise.
14982
14983 Wed May 20 02:16:01 1998 Jason Merrill <jason@yorick.cygnus.com>
14984
14985 * decl2.c (start_objects, finish_objects, do_dtors,
14986 do_ctors): Split out from...
14987 (finish_file): ...here.
14988
14989 Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com>
14990
14991 * tree.c (is_overloaded_fn): Don't abort on placeholders from
14992 push_class_decls.
14993
14994 Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com>
14995
14996 * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
14997
14998 * error.c (dump_expr): Handle an ARROW_EXPR.
14999
15000 Tue May 19 15:13:39 1998 Mark Mitchell <mmitchell@usa.net>
15001
15002 * decl.c (saveable_obstack): Declare.
15003 (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
15004 declare, if necessary.
15005
15006 Tue May 19 14:50:27 1998 Mark Mitchell <mmitchell@usa.net>
15007
15008 * call.c (compare_qual): Remove.
15009 (is_subseq): Tweak.
15010 (is_properly_derived_from): New function.
15011 (maybe_handle_ref_bind): Likewise.
15012 (maybe_handle_implicit_object): Likewise.
15013 (compare_ics): Modify substantially to bring into conformance with
15014 the standard.
15015 * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
15016 (comp_cv_qualification): Declare.
15017 (comp_cv_qual_signature): Likewise.
15018 * typeck.c (comp_cv_qualification): Likewise.
15019 (comp_cv_qual_signature): Likewise.
15020
15021 Tue May 19 10:05:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15022
15023 * Makefile.in (parse.o): Depend on toplev.h.
15024
15025 * class.c (typecode_p): Remove prototype and definition.
15026
15027 * cp-tree.h (currently_open_class, is_empty_class, member_p):
15028 Add prototype.
15029
15030 * decl.c (push_overloaded_decl_top_level): Remove prototype and
15031 definition.
15032
15033 * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
15034 in call to `cp_thing'.
15035 (cp_warning): Likewise for function pointer `warning'.
15036
15037 * except.c (do_function_call): Remove prototype and definition.
15038 (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
15039
15040 * method.c (is_java_type): Add prototype and make it static.
15041
15042 * parse.y: Include toplev.h.
15043
15044 * pt.c (type_unification): Remove unused variable `arg'.
15045 (instantiate_decl): Likewise for `save_ti'.
15046
15047 * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
15048
15049 Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
15050
15051 * init.c (build_member_call): Handle template_ids.
15052 * parse.y (primary): Add global_scope template_id.
15053
15054 Mon May 18 23:22:52 1998 Jason Merrill <jason@yorick.cygnus.com>
15055
15056 * decl2.c (get_sentry): Use end_temporary_allocation.
15057 Don't declare permanent_obstack.
15058
15059 Mon May 18 12:28:44 1998 Mark Mitchell <mmitchell@usa.net>
15060
15061 * parse.y (.finish_new_placement): New non-terminal.
15062 (unary_expr, new_type_id): Use it.
15063 * parse.c: Regenerated.
15064
15065 Mon May 18 12:20:27 1998 Brendan Kehoe <brendan@cygnus.com>
15066
15067 * pt.c (redeclare_class_template): Say where the original definition
15068 of the template-parameter's default argument appeared.
15069
15070 Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com>
15071
15072 * call.c (build_over_call): Tweak empty class handling.
15073
15074 * decl.c (make_typename_type): Use currently_open_class.
15075
15076 * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
15077
15078 Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
15079
15080 * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
15081 for a type unless it is one.
15082
15083 * class.c (finish_struct_1): Use OVL_CURRENT in error message.
15084
15085 Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com)
15086
15087 * Makefile.in (program_transform_name, objdir): Define.
15088
15089 * Makefile.in (BISON): Use bison from the build tree if it exists.
15090 (FLEX): Likewise.
15091
15092 Sun May 17 14:52:08 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
15093
15094 * typeck.c (type_unknown_p): Return true for TREE_LIST also.
15095
15096 * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
15097
15098 Sun May 17 14:51:41 1998 Jason Merrill <jason@yorick.cygnus.com>
15099
15100 * call.c (build_scoped_method_call): Likewise.
15101
15102 Sun May 17 13:53:48 1998 Mark Mitchell <mmitchell@usa.net>
15103
15104 * init.c (build_new_1): Call suspend_momentary around the creation
15105 of values that must be saved for exception handling.
15106 * parse.y (.build_new_placement): New non-terminal.
15107 (unary_expr, new_placement): Use it.
15108 * parse.c: Regenerated.
15109
15110 Sun May 17 12:32:08 1998 Jason Merrill <jason@yorick.cygnus.com>
15111
15112 * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
15113 old and new types.
15114
15115 * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
15116 canonical type.
15117
15118 * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
15119
15120 Fri May 15 20:28:00 1998 Jason Merrill <jason@yorick.cygnus.com>
15121
15122 * decl.c (start_decl): Revert problem change.
15123
15124 * Makefile.in (CONFLICTS): Fix.
15125
15126 Fri May 15 15:34:02 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15127
15128 * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
15129
15130 Fri May 15 00:46:05 1998 Jason Merrill <jason@yorick.cygnus.com>
15131
15132 * class.c (finish_struct_1): Use BINFO_SIZE.
15133
15134 * decl.c (start_decl): Use 'tem'.
15135
15136 Thu May 14 16:30:47 1998 Andrew MacLeod <amacleod@cygnus.com>
15137
15138 * exception.cc: Include eh-common.h.
15139 (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
15140 (__cplus_type_matcher): First stab at new C++ runtime type matcher.
15141 (__cp_push_exception): Initialize eh_info struct as well.
15142 * except.c: Remove local structs and include eh-common.h.
15143 (init_exception_processing): Set language and version codes.
15144 (call_eh_info): Add presence of eh_info to runtime description of
15145 struct cp_eh_info.
15146 (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
15147 * semantics.c (finish_try_block): Call start_catch_block() and
15148 end_catch_block().
15149 * parse.y (function_try_block): Call start_catch_block() and
15150 end_catch_block().
15151
15152 Thu May 14 12:27:34 1998 Brendan Kehoe <brendan@cygnus.com>
15153
15154 * typeck.c (original_type): New function.
15155 (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
15156 to see if they're actually the same.
15157 * cp-tree.h (original_type): Declare.
15158
15159 Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15160
15161 * Makefile.in (lex.o): Depend on output.h.
15162
15163 * call.c (add_function_candidate): Remove unused variable `cand'.
15164 (add_conv_candidate): Likewise.
15165 (build_builtin_candidate): Likewise.
15166
15167 * cp-tree.h: Add prototype for `types_overlap_p'.
15168
15169 * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
15170
15171 * decl2.c (merge_functions): Remove unused variables `tmp' and
15172 `tempn'.
15173
15174 * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
15175 (code_as_string): Likewise.
15176 (language_as_string): Likewise.
15177 (parm_as_string): Likewise.
15178 (op_as_string): Likewise.
15179 (assop_as_string): Likewise.
15180 (cv_as_string): Likewise.
15181
15182 * lex.c: Include output.h.
15183
15184 * pt.c (type_unification): Cast first argument of `bzero' to a char*.
15185
15186 * search.c (dfs_no_overlap_yet): Mark parameter `t' with
15187 ATTRIBUTE_UNUSED.
15188
15189 * tinfo.cc (__class_type_info::dcast): Change the type of variable
15190 `i' from int to size_t.
15191
15192 * typeck.c (language_lvalue_valid): Mark parameter `exp' with
15193 ATTRIBUTE_UNUSED.
15194
15195 Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
15196
15197 * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
15198 DECL_NAMESPACE_SCOPE_P.
15199 (lang_decl_name): Likewise.
15200 * pt.c (tsubst_friend_function, tsubst): Likewise.
15201 * decl.c (pushdecl, redeclaration_error_message, start_decl,
15202 cp_finish_decl, start_function): Likewise.
15203 * class.c (finish_struct_1): Likewise.
15204 * call.c (build_over_call): Likewise.
15205 (compare_ics): Use DERIVED_FROM_P.
15206
15207 Tue May 12 07:24:18 1998 Mark Mitchell <mmitchell@usa.net>
15208
15209 * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
15210 * method.c (build_mangled_name): Use it.
15211 (build_decl_overload_real): Likewise.
15212
15213 * error.c (dump_simple_decl): New function, broken out from ...
15214 (dump_decl): Use it.
15215
15216 Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
15217
15218 * ptree.c (lang_print_xnode): Add missing `break'.
15219
15220 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
15221
15222 * call.c (add_template_candidate): Adjust for changes to
15223 fn_type_unification.
15224 (add_template_candidate_real): Likewise.
15225 (add_template_conv_candidate): Likewise.
15226 (build_user_type_conversion_1): Likewise.
15227 (build_new_function_call): Likewise.
15228 (build_object_call): Likewise.
15229 (build_new_op): Likewise.
15230 (build_new_method_call): Likewise.
15231 * class.c (instantiate_type): Likewise.
15232 * cp-tree.h (unification_kind_t): New type.
15233 (fn_type_unification): Adjust prototype.
15234 (type_unificaiton): Likewise.
15235 * pt.c (UNIFY_ALLOW_NONE): New macro.
15236 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
15237 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
15238 (UNIFY_ALLOW_DERIVED): Likewise.
15239 (unify): Change prototype.
15240 (maybe_adjust_types_for_deduction): New function.
15241 (check_cv_quals_for_unify): Likewise.
15242 (determine_specialization): Adjust.
15243 (fn_type_unification): Likewise.
15244 (type_unification): Likewise.
15245 (type_unification_real): Likewise. Use
15246 maybe_adjust_types_for_deduction. Fix mishandling of
15247 back-unification of template functions passed as arguments. Pass
15248 appropriate combination of UNIFY_ALLOW_* to unify.
15249 (unify): Remove unused NTPARMS parameter. Use
15250 check_cv_quals_for_unify. Remove bogus code that allowed
15251 too-generous unification in order to adhere more closely to standard.
15252 (get_bindings_real): Adjust.
15253 (get_class_bindings): Likewise.
15254
15255 * method.c (build_overload_identifier): Only use the innermost
15256 template arguments when mangling.
15257 * pt.c (tsubst_template_argument_vector): New function.
15258 (complete_template_args): Deal with the situation where the
15259 extra_args contain more than one level of arguments.
15260 (lookup_template_class): Deal with member template classes, which
15261 may have more than one level of arguments.
15262 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
15263 Improve handling of member template classes. Use
15264 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
15265 tsubst_template_argument_vector where appropriate.
15266 (regenerate_decl_from_template): Break out from ...
15267 (instantiate_decl): Here.
15268
15269 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
15270 * parse.h: Regenerated.
15271 * parse.c: Really regenerated.
15272
15273 * cp-tree.h (finish_unary_op_expr): New function.
15274 (finish_id_expr): Likewise.
15275 (begin_new_placement): Likewise.
15276 (finish_new_placement): Likewise.
15277 (finish_declarator): Likewise.
15278 (finish_translation_unit): Likewise.
15279 (finish_parmlist): Likewise.
15280 (begin_class_definition): Likewise.
15281 (finish_class_definition): Likewise.
15282 (finish_default_args): Likewise.
15283 (finish_inline_definitions): Likewise.
15284 * parse.y (GCC_ASM_KEYWORD): Remove.
15285 (TYPENAME_ELLIPSIS): Likewise.
15286 * parse.c: Regenerated.
15287 Use new functions in semantics.c in the actions for many rules.
15288 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
15289 * hash.h: Regenerated.
15290 * semantics.c (finish_expr_stmt): Allow NULL expr.
15291 (finish_unary_op_expr): New function, containing
15292 code previously in parse.y.
15293 (finish_id_expr): Likewise.
15294 (begin_new_placement): Likewise.
15295 (finish_new_placement): Likewise.
15296 (finish_declarator): Likewise.
15297 (finish_translation_unit): Likewise.
15298 (finish_parmlist): Likewise.
15299 (begin_class_definition): Likewise.
15300 (finish_class_definition): Likewise.
15301 (finish_default_args): Likewise.
15302 (finish_inline_definitions): Likewise.
15303
15304 Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
15305
15306 * typeck.c (build_c_cast): Don't decay arrays and functions to
15307 pointer type when converting to a class type.
15308
15309 Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
15310
15311 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
15312 (DECL_CLASS_SCOPE_P): Likewise.
15313
15314 Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
15315
15316 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
15317 * decl2.c (constructor_name_full): Likewise.
15318
15319 Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
15320
15321 * tree.c (mapcar): Add OVERLOAD support.
15322
15323 * init.c (resolve_offset_ref): We must use basetype_path before we
15324 destroy it with a call to convert_pointer_to.
15325
15326 Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
15327
15328 * class.c (currently_open_class): New fn.
15329 * decl.c (lookup_name_real): Use it.
15330 * search.c (lookup_field): Likewise.
15331
15332 Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
15333
15334 * cp-tree.def (OVERLOAD): New node.
15335 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
15336 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
15337 (NAMESPACE_BINDING): Remove.
15338 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
15339 namespace_binding.
15340 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
15341 Define.
15342 (tree_overload): New struct.
15343 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
15344 (REAL_IDENTIFIER_TYPE_VALUE): Define.
15345 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
15346 (lang_decl_flags): Remove in_namespace.
15347 (lang_decl): Remove chain.
15348 (DECL_CHAIN, DECL_NAMESPACE): Remove.
15349 (flag_honor_std): Declare extern.
15350 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
15351 namespace_binding, set_namespace_binding,
15352 lookup_function_nonclass, cat_namespace_levels,
15353 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
15354 scratch_ovl_cons, ovl_member, build_overload): Declare.
15355 (decl_list_length, get_namespace_id, current_namespace_id,
15356 overloaded_globals_p): Remove.
15357 (lookup_using_namespace, qualified_lookup_using_namespace): Change
15358 return type.
15359 (push_scratch_obstack): New macro.
15360 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
15361 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
15362 convs, fns.
15363 (build_new_function_call): Iterate using OVL_CHAIN.
15364 Print DECL_NAME in when reporting ambiguities.
15365 (build_object_call): Iterate using OVL_NEXT for fns, convs.
15366 (build_new_op): Call lookup_function_nonclass.
15367 Iterate using OVL_NEXT.
15368 (build_op_delete_call): Change detection of members.
15369 Do not wrap TREE_LIST around fields and single global functions.
15370 (build_over_call): Don't push a class level if the context is a
15371 namespace.
15372 (build_new_method_call): Iterate using OVL_NEXT.
15373 * class.c (add_method): Chain overloaded members using
15374 build_overload. Remove copying of method.
15375 (grow_method): When iterating through the obstack, expect OVERLOAD
15376 nodes. Chain overload members.
15377 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
15378 nodes in call to get_baselinks.
15379 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
15380 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
15381 fdecls that are OVERLOAD nodes.
15382 (validate_lhs): New function.
15383 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
15384 code. Use DECL_NAME in error messages. Split code between global
15385 and member function processing.
15386 * decl.c (global_type_node): New static variable.
15387 (in_std): New global.
15388 (struct binding_level): New field usings.
15389 (resume_binding_level): Assert that we are not in a class.
15390 (toplevel_bindings_p): Just check for namespace_p or
15391 pseudo_global.
15392 (resume_level): Remove.
15393 (find_binding): New function.
15394 (binding_for_name): Call it.
15395 (namespace_binding, set_namespace_binding): New functions.
15396 (push_namespace): Associate binding level with new namespace,
15397 resume_binding_level for existing namespace. Remove old code.
15398 Fake std by counting.
15399 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
15400 (maybe_push_to_top_level): Save current namespace.
15401 (pop_from_top_level): Restore saved namespace.
15402 (pop_namespace): Call suspend_binding_level. Remove old code.
15403 (cat_namespace_levels): New function.
15404 (set_identifier_type_value_with_scope): For namespace bindings,
15405 set BINDING_TYPE, and use global_type_node.
15406 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
15407 (identifier_type_value): New function.
15408 (pushtag): If no context, use current_namespace.
15409 (duplicate_decls): Don't process DECL_CHAIN.
15410 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
15411 already set. Never reset it to NULL_TREE. Lookup global variables
15412 in their namespace. Push overloaded templates if they are on
15413 namespace level.
15414 (pushdecl_namespace_level): New function.
15415 (pushdecl_top_level): Implement using pushdecl_namespace_level.
15416 (pushdecl_using_decl): New function.
15417 (overloaded_globals_p): Remove.
15418 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
15419 them. Use namespace_binding and set_namespace_value.
15420 (redeclaration_error_message): Complain if the declarations come
15421 from different namespaces.
15422 (lookup_tag): On namespace level, look in the BINDING_TYPE.
15423 (lookup_namespace_name): Pass tree_bindings from stack. Remove
15424 old code.
15425 (select_decl): New function.
15426 (lookup_name_real): Call it for qualified and unqualified lookup.
15427 Pass tree_bindings from the stack.
15428 If prefer_type is 1, also accept namespaces.
15429 (lookup_function_nonclass): New function.
15430 (init_decl_processing): Set the binding level of the global
15431 namespace to global_binding_level.
15432 Build a proper type list for __builtin_apply.
15433 Initialize std_node to "fake std" if flag_honor_std is set.
15434 Initialize global_type_node.
15435 Allocated bad_alloc in namespace std if flag_honor_std.
15436 (define_function): Set the DECL_CONTEXT to the current_namespace.
15437 (start_decl): A namespace is not considered as a context here. If
15438 the DECL_CONTEXT is a namespace, push the decl.
15439 (cp_finish_decl): Check for namespaces used as initializers.
15440 (grokfndecl): Add namespace parameter. Remove processing of
15441 DECL_CHAIN.
15442 (grokvardecl): Add namespace parameter.
15443 (grokdeclarator): Process SCOPEs that are namespaces. For
15444 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
15445 (start_function): Check for contexts that are namespaces.
15446 Set context for declarations that have not been pushed.
15447 (store_parm_decls): Check for ::main only.
15448 (finish_function): Likewise.
15449 (start_method): Check for contexts that are namespaces.
15450 (start_method): Remove DECL_CHAIN processing.
15451 * decl2.c (flag_honor_std): Declare.
15452 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
15453 (decl_namespace_list): New static global.
15454 (grok_x_components): Ignore namespaces as type contexts.
15455 (check_classfn): Expect OVERLOAD nodes.
15456 (grokfield): Remove DECL_CHAIN processing.
15457 (finish_file): Call cat_namespace_levels.
15458 (merge_functions): New function.
15459 (ambiguous_decl): Rewrite.
15460 (lookup_using_namespace): Produce tree_bindings.
15461 (qualified_lookup_using_namespace): Likewise.
15462 (set_decl_namespace, decl_namespace, current_decl_namespace,
15463 push_decl_namespace, pop_decl_namespace): New functions.
15464 (arg_lookup): New struct.
15465 (add_function, arg_assoc_namespace, arg_assoc_class,
15466 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
15467 New functions.
15468 (get_namespace_id, current_namespace_id): Remove.
15469 (do_toplevel_using_decl): Rewrite.
15470 (do_class_using_decl): Complain about namespace qualifiers.
15471 (do_using_directive): Sorry if not on namespace level. Complain
15472 about unknown namespaces.
15473 * error.c (dump_aggr_type): Check for namespace contexts.
15474 * except.c (init_exception_processing): Push terminate into std.
15475 * friend.c (is_friend): A namespace is not a context, here.
15476 * init.c (expand_member_init): Remove DECL_CHAIN processing.
15477 (build_offset_ref): Process OVERLOAD nodes.
15478 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
15479 * lex.c (identifier_type): Loop using OVL_CHAIN.
15480 (see_typename): Set looking_for_typename to 2.
15481 (real_yylex): Likewise.
15482 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
15483 (do_scoped_id): Expect OVERLOAD nodes.
15484 Change calling convention for qualified_lookup_using_namespace.
15485 (build_lang_decl): Don't set in_namespace anymore.
15486 * method.c (typevec_size): New global.
15487 (build_overload_nested_name): Return if global_namespace.
15488 Otherwise, always expect a declaration context.
15489 (build_qualified_name): Likewise.
15490 Make sure we don't write beyond typevec_size.
15491 (build_decl_overload_real): Likewise.
15492 Allocate one extra slot for the namespace.
15493 (hack_identifier): Mark code dead.
15494 Process OVERLOAD and NAMESPACE_DECL nodes.
15495 * parse.y (program): Pop namespaces until in global namespace.
15496 (extdef): In a using-declaration, don't discard the identifier if
15497 there is no declaration.
15498 (left_curly): Ignore type contexts which are namespaces.
15499 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
15500 used as scope.
15501 * pt.c (template_class_depth): Expect types to be namespaces.
15502 (determine_specialization): Simplify by expecting OVERLOAD nodes.
15503 (push_template_decl): Push into namespace level.
15504 Reset ctx if it is a namespace.
15505 Set DECL_CONTEXT to current_namespace if not set already.
15506 Ignore real contexts that are namespaces.
15507 (mangle_class_name_for_template): Skip global_namespace.
15508 Mangle other namespaces as declarations.
15509 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
15510 (lookup_template_class): Push into namespace of context.
15511 If the context is a namespace, set it to global_namespace.
15512 Use id_context for mangling.
15513 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
15514 (tsubst_friend_function): Ignore namespace contexts.
15515 Push into namespace level.
15516 (tsubst): Handle NAMESPACE_DECL nodes.
15517 Remove DECL_CHAIN processing.
15518 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
15519 * ptree.c (print_lang_identifier): Print bindings.
15520 (lang_print_xnode): Print OVERLOAD nodes.
15521 * rtti.c (init_rtti_processing): Push type_info into std.
15522 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
15523 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
15524 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
15525 lookup_fnfields_here): Likewise.
15526 Process all nodes, instead of going through TREE_CHAIN.
15527 * sig.c (build_signature_pointer_or_reference_type): Set context
15528 to global_namespace.
15529 (build_signature_table_constructor): Expect OVERLOAD nodes.
15530 * spew.c (yylex): Save old setting of looking_for_typename.
15531 * tree.c (decl_list_length): Remove.
15532 (binding_init): New function.
15533 (count_functions): Rewrite.
15534 (is_overloaded_fn): Expect OVERLOAD nodes.
15535 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
15536 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
15537 ovl_member): New functions.
15538 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
15539 (type_unknown_p): Likewise.
15540 (require_instantiated_type): Likewise.
15541 (build_component_ref): Declare code dead.
15542 (build_x_function_call): Create and expect OVERLOAD nodes.
15543 (build_function_call_real): Check for ::main only.
15544 (build_unary_op): Likewise. Expect OVERLOAD nodes.
15545 (convert_for_assignment): Check for TREE_LIST before accessing
15546 TREE_VALUE.
15547 * decl.c (duplicate_decls): Check for namespace bindings instead
15548 of global bindings.
15549 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
15550 lookup_name_current_level, start_decl, xref_tag,
15551 finish_enum): Likewise.
15552 * init.c (build_offset_ref): Likewise.
15553 * search.c (lookup_field): Likewise.
15554 (lookup_fnfields): Likewise.
15555 (dfs_debug_mark): Likewise.
15556 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
15557 (poplevel_class, pop_from_top_level): Likewise.
15558 * decl2.c (finish_method): Likewise.
15559 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
15560 * decl.c (record_builtin_type): Likewise.
15561 (init_decl_processing, grokfndecl): Likewise.
15562 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
15563 (make_lang_type): Likewise.
15564 * parse.y (make_thunk): Likewise.
15565 * pt.c (tsubst): Likewise.
15566 * tree.c (debug_binfo): Likewise.
15567 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
15568 tinfo2.cc, inc/new.h: Add std qualifications.
15569 * inc/new: Wrap with namespace std if __HONOR_STD.
15570 * inc/typeinfo: Likewise.
15571
15572 Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
15573
15574 * call.c (build_user_type_conversion_1): Handle second_conv
15575 properly for templates.
15576
15577 Thu May 7 17:09:25 1998 Andrew MacLeod <amacleod@cygnus.com>
15578
15579 * method.c (build_decl_overload_real): Set TREE_USED flag to
15580 zero for build_type_variants nodes as well.
15581
15582 Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
15583
15584 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
15585
15586 Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
15587
15588 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
15589 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
15590 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
15591 xref.o): Add toplev.h dependencies.
15592
15593 Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
15594
15595 * errfn.c (cp_error, cp_warning): Remove declarations for
15596 error and warning respectively.
15597
15598 Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15599
15600 * error.c: Convert to using ctype macros defined in system.h.
15601 * method.c: Likewise.
15602 * xref.c: Likewise.
15603 * lex.c: Likewise. Also remove redundant system header stuff.
15604
15605 Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
15606
15607 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
15608 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
15609 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
15610 xref.c: Add include of toplev.h.
15611
15612 Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
15613
15614 * tree.c (perm_manip): Also regenerate the RTL of an extern.
15615 (copy_to_permanent): Use end_temporary_allocation.
15616
15617 Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
15618
15619 * init.c (expand_vec_init): The initialization of each array
15620 element is a full-expression.
15621
15622 Tue May 5 18:24:13 1998 Andrew MacLeod <amacleod@cygnus.com>
15623
15624 * method.c (build_mangled_name): Add a call to build_type_variant
15625 to get the right type.
15626
15627 Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
15628
15629 * Makefile.in: Add .SUFFIXES.
15630
15631 * cp-tree.def: Remove NAMESPACE_DECL.
15632
15633 Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
15634
15635 * call.c (build_over_call): Do evaluate arg even if it has empty
15636 class type.
15637 * decl.c (start_function): Don't push a member function.
15638
15639 Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
15640
15641 * Makefile.in (g++FAQ.info): Put -o option before input file.
15642
15643 Thu Apr 30 13:05:33 1998 Andrew MacLeod <amacleod@cygnus.com>
15644
15645 * gxxint.texi: Add info for squangling codes K and B.
15646
15647 Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
15648
15649 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
15650 the expression in templates.
15651 (finish_stmt_expr): Likewise.
15652
15653 1998-04-28 Brendan Kehoe <brendan@cygnus.com>
15654
15655 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
15656
15657 Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
15658
15659 * decl.c (maybe_push_to_top_level): Always clear
15660 current_template_parms and processing_template_decl.
15661 (pushtag): Remove check of current_class_type and some comments,
15662 since maybe_push_to_top_level no longer creates confusion.
15663
15664 Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
15665
15666 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
15667 (DECL_CLASS_TEMPLATE_P): Likewise.
15668 (DECL_PRIMARY_TEMPLATE): Likewise.
15669 (PRIMARY_TEMPLATE_P): Use it.
15670 (push_template_decl_real): New function.
15671 (redeclare_class_template): Take new template parameters as
15672 input.
15673 (is_specialization_of): New function.
15674 (comp_template_args): Declare.
15675 * decl.c (pushtag): Handle friend template classes.
15676 (xref_tag): Likewise. Use new calling convention for
15677 redeclare_class_template.
15678 * decl2.c (grok_x_components): Handle friend templates.
15679 * friend.c (is_friend): Use is_specialization_of where
15680 appropriate. Deal with friend class templates.
15681 (make_friend_class): Let a class template be friends with itself.
15682 * pt.c (comp_template_args): Remove declaration.
15683 (tsubst_friend_class): New function.
15684 (push_template_decl_real): New function.
15685 (push_template_decl): Use it.
15686 (redeclare_class_template): Adjust for new calling convention.
15687 (comp_template_args): Give it external linkage.
15688 (instantiate_class_type): Use tsubst_friend_class to deal
15689 with friend templates.
15690 * typeck.c (comptypes): Use comp_template_args, rather than
15691 expanding it inline.
15692 * parse.y (component_decl): Handle a nested template type
15693 like other component type declarations.
15694
15695 * pt.c (check_explicit_specialization): Handle overloaded
15696 constructors correctly.
15697
15698 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
15699 (lookup_template_class): Use it.
15700
15701 Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
15702
15703 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
15704 * cp-tree.h: Add WRAPPER support.
15705 * call.c (add_candidate): Split out from add_*_candidate fns.
15706 (build_over_call): Take the candidate instead of function and args.
15707 Enforce access control here. Emit overload warnings here.
15708 (add_warning): New fn.
15709 (joust): Add WARN parm. If not set, call add_warning instead of
15710 printing a warning. Re-enable some warnings.
15711 (tourney): Pass it.
15712 (convert_like): Adjust.
15713 (build_new_op): Adjust.
15714 (build_new_function_call): Adjust.
15715 (build_user_type_conversion_1): Adjust.
15716 (USER_CONV_FN): Adjust.
15717 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
15718 build_int_wrapper): New fns.
15719
15720 Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
15721
15722 * pt.c (unify): Fix typo in previous change.
15723
15724 Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
15725
15726 * error.c (dump_type_real): Declare canonical_name.
15727
15728 * typeck.c (comp_target_types): Fix PMFs.
15729
15730 Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
15731
15732 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
15733 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
15734 TEMPLATE_DECL.
15735
15736 * pt.c (tsubst): Decrease the template-level of
15737 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
15738 TEMPLATE_PARM_INDEX.
15739 (template_decl_level): New function.
15740 (unify): Make sure to record unifications for template
15741 parameters, even when the parameters exactly match the arguments.
15742 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
15743 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
15744 aren't from the level we're currently working on.
15745
15746 Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
15747
15748 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
15749
15750 * decl2.c (check_member_template): Set DECL_IGNORED for member
15751 class templates, too.
15752
15753 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
15754
15755 Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15756
15757 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
15758
15759 Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
15760
15761 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
15762 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
15763 (init_decl_processing): Handle TI types.
15764 * typeck.c (unsigned_type, signed_type): Handle TI types.
15765
15766 Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
15767
15768 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
15769 New local added_libraries. Increment count when add library to
15770 arglist.
15771
15772 Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
15773
15774 * cp-tree.h (type_as_string_real): New function.
15775 * pt.c (mangle_class_name_for_template): Use it.
15776 * error.c (dump_aggr_type): Change prototype.
15777 (dump_type_prefix): Likewise.
15778 (dump_type_suffix): Likewise.
15779 (dump_type_real): Convert from dump_type. If desired, the
15780 "canonica" name of a typedef, i.e., the name of the underlying
15781 type, can be printed.
15782 (dump_type): Call dump_type_real.
15783
15784 Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
15785
15786 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
15787
15788 * typeck.c (comp_target_types): Tweak pedantic case.
15789 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
15790 Return -1 or 1 instead of 1 or 2.
15791 (compparms): Remove STRICT handling.
15792 (convert_for_assignment): Fix handling of pmfs.
15793
15794 Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
15795
15796 * typeck.c (comp_target_types): Handle references like pointers.
15797 (comp_target_parms): Note that return code from comp_target_types
15798 can be negative to indicate failure.
15799
15800 Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
15801
15802 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
15803 which requires a working target compiler to build.
15804
15805 Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
15806
15807 * tree.c (avoid_overlap): Add prototype.
15808
15809 * spew.c (num_tokens): Add prototype.
15810 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
15811
15812 * search.c (dfs_check_overlap): Add prototype.
15813 (dfs_no_overlap_yet): Likewise.
15814
15815 * pt.c (original_template): Add prototype.
15816 (inline_needs_template_parms): Likewise.
15817 (push_inline_template_parms_recursive): Likewise.
15818 (retrieve_specialization, register_specialization): Likewise.
15819 (print_candidates, reduce_template_parm_level): Likewise.
15820 (build_template_decl, mark_template_parm): Likewise.
15821 (tsubst_friend_function, get_bindings_real): Likewise.
15822
15823 * method.c (start_squangling): Add prototype.
15824 (end_squangling, check_ktype, issue_ktype): Likewise.
15825 (build_overloaded_scope_ref, check_btype): Likewise.
15826 (build_mangled_template_parm_index): Likewise.
15827
15828 * lex.c (init_cpp_parse): Add prototype.
15829 (handle_cp_pragma, handle_sysv_pragma): Likewise.
15830 (reduce_cmp, token_cmp): Likewise.
15831
15832 * except.c (call_eh_info): Add prototype.
15833 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
15834 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
15835
15836 * decl2.c (is_namespace_ancestor): Add prototype.
15837 (namespace_ancestor, add_using_namespace): Likewise.
15838 (ambiguous_decl): Likewise.
15839
15840 * decl.c (indent): Add prototype.
15841
15842 * call.c (add_template_candidate_real): Add prototype.
15843
15844 Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
15845
15846 * decl2.c (build_expr_from_tree): Just return a PMF.
15847
15848 Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
15849
15850 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
15851 when doing initializations.
15852
15853 * pt.c (unify): Use comptypes to compare type args.
15854
15855 Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
15856
15857 * decl.c (duplicate_decls): Fix check for when it's safe to free
15858 the new decl.
15859
15860 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
15861 to type_as_string.
15862
15863 Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
15864
15865 * pt.c (build_template_parm_index): Add prototype.
15866
15867 * search.c (my_tree_cons): Don't clear words outside the
15868 newly allocated node.
15869
15870 Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
15871
15872 * lex.c (init_parse): Now returns char* containing the filename.
15873
15874 Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
15875 Jeff Law <law@cygnus.com>
15876
15877 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
15878 than a pointer.
15879
15880 Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15881
15882 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
15883
15884 Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
15885
15886 * decl.c (duplicate_decls): Don't warn for redundant decls if
15887 friend: let add_friend take care of it.
15888
15889 Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
15890
15891 * sig.c (build_signature_pointer_constructor): Don't set
15892 TREE_HAS_CONSTRUCTOR for a signature pointer.
15893 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
15894 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
15895 here, too.
15896 * typeck.c (build_unary_op): Only allow taking the address of a
15897 real constructor.
15898 * typeck2.c (digest_init): Simplify.
15899 (store_init_value): Don't pedwarn about using { } for pmfs.
15900
15901 Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
15902
15903 * cp-tree.h (start_decl): Update prototype.
15904 * decl.c (start_decl): Like the C version, new parameters
15905 for the attributes. Call cplus_decl_attributes here,
15906 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
15907 (grokdeclarator): Pass NULL for new start_decl arguments.
15908 * pt.c (tsubst_expr): Likewise.
15909 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
15910 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
15911 * lex.c (build_lang_decl): Add lang_name_java.
15912 * class.c (push_lang_context): Add lang_name_java.
15913 * method.c (build_mangled_name): Check for is_java_type.
15914
15915 Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
15916
15917 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
15918 * call.c (build_scoped_method_call): Check for TREE_CODE for
15919 VOID_TYPE instead of type == void_type_node.
15920 (build_method_call): Likewise.
15921 * decl.c (lookup_name_real): Likewise.
15922 (grokdeclarator): Likewise.
15923 (start_decl): Likewise.
15924 (grokparms): Likewise.
15925 (start_function): Likewise.
15926 (finish_function): Likewise.
15927 (start_method): Likewise.
15928
15929 Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
15930
15931 * lex.c (finput): New variable.
15932 (init_cpp_parse): Renamed from init_parse.
15933 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
15934 (finish_parse): New function.
15935 * cp-tree.h (init_lex, init_parse): Remove declarations.
15936
15937 Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
15938
15939 * call.c (build_call): Still evaluate the actual argument.
15940 * class.c (is_empty_class): Update for -fnew-abi.
15941
15942 * decl2.c: -fnew-abi implies -fsquangle.
15943
15944 * method.c (do_build_assign_ref): Don't do anything to copy
15945 an empty class.
15946 (do_build_copy_constructor): Likewise.
15947 * call.c (build_over_call): Likewise.
15948
15949 Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
15950
15951 * tree.c (avoid_overlap): Return a value.
15952
15953 Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
15954
15955 * method.c (check_btype): Add missing argument to xrealloc.
15956 (check_ktype): Likewise.
15957
15958 Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
15959
15960 Implement empty base optimization.
15961 * class.c (finish_struct_1): Add vbase fields earlier. Set
15962 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
15963 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
15964 (types_overlap_p): New fn.
15965 * tree.c (avoid_overlap): New fn.
15966 (build_base_fields): Use it to avoid overlapping empty bases.
15967 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
15968
15969 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
15970
15971 Re-implement allocation of base class subobjects.
15972 * tree.c (unshare_base_binfos): New fn.
15973 (layout_basetypes): Use it. Now handles offsets of both virtual and
15974 non-virtual bases, after layout_type.
15975 (layout_vbasetypes): Remove.
15976 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
15977 (build_vbase_pointer_fields): Split out from old layout_basetypes.
15978 * class.c (finish_base_struct): Lose offset handling code.
15979 Move nonvdtor warning here. Don't mess with t_binfo anymore.
15980 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
15981 * cp-tree.h: Adjust.
15982
15983 Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
15984
15985 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
15986 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
15987 * class.c (duplicate_tag_error): Likewise.
15988 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
15989 * tree.c (layout_vbasetypes): Update from layout_record, remove
15990 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
15991 (layout_basetypes): Likewise.
15992
15993 Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
15994
15995 * class.c, Make sure system.h is included just after config.h.
15996 Delete lingering stdio and errno references too.
15997 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
15998
15999 Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
16000
16001 * friend.c (is_friend): Fix access control for local classes.
16002
16003 * class.c (is_empty_class): New fn.
16004 * call.c (build_call): Don't pass empty class objects to a function.
16005
16006 Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
16007
16008 * call.c (build_over_call): Do name resolution for default
16009 arguments of function templates in the scope of the templates.
16010
16011 Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
16012
16013 * call.c: Include system.h. Remove includes, declarations and
16014 defines provided by system.h.
16015 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
16016 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
16017 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
16018 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
16019 * typeck2.c, xref.c: Likewise.
16020 * Makefile.in: Dependencies updated as appropriate.
16021 * Make-lang.in: Likewise.
16022
16023 Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
16024
16025 * pt.c (fn_type_unification): Allow incomplete unification without
16026 an immediate error message.
16027
16028 Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
16029
16030 * tree.c (member_p): New fn.
16031 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
16032 initializing class members.
16033
16034 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
16035 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
16036
16037 * call.c (build_method_call): Handle non-scoped destructors, too.
16038 * pt.c (tsubst_copy): Likewise.
16039
16040 * pt.c (print_template_context): Split out...
16041 (push_tinst_level): ...from here.
16042
16043 * friend.c (is_friend): Don't pass a type to decl_function_context.
16044
16045 * typeck.c (convert_for_initialization): Always hand off
16046 conversions to class type.
16047
16048 Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
16049
16050 * friend.c (is_friend): Local classes have the same access as the
16051 enclosing function.
16052
16053 Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
16054
16055 * typeck.c (expand_target_expr): Delete dead function.
16056
16057 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
16058
16059 * repo.c (save_string): Delete dead function.
16060
16061 * method.c (thunk_printable_name): Delete dead function.
16062
16063 * lex.c (yynextch): Delete dead function.
16064
16065 * expr.c (tree_extract_aggr_init): #if 0 out.
16066
16067 * except.c (do_unwind): Delete dead function.
16068 (easy_expand_asm): Likewise.
16069
16070 * cvt.c (build_conversion_type_1): Delete dead function.
16071
16072 * cp-tree.h (push_expression_obstack): Declare.
16073
16074 * call.c (source_type): #if 0 out.
16075
16076 * class.c (alter_access): Remove unused label. Add braces
16077 around empty else clause.
16078
16079 * lex.c (yyprint): Fix argument to printf.
16080
16081 Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
16082
16083 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
16084
16085 * pt.c (instantiate_class_template): Make sure template
16086 arguments are permanent.
16087 * init.c (resolve_offset_ref): Don't go looking around in
16088 template types.
16089
16090 * semantics.c: Add routines to handle expressions, and some
16091 declaration processing.
16092 * parse.y: Use them.
16093 (current_class_depth): Move declaration to cp-tree.h.
16094 * parse.c: Regenerated.
16095 * cp-tree.h: Use them.
16096 (current_class_depth): Declare.
16097 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
16098
16099 Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
16100
16101 * error.c (dump_decl): Be a bit more explicit with template
16102 type arguments, when verbose.
16103
16104 Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
16105
16106 * inc/exception: Reorder closing braces.
16107
16108 Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
16109
16110 * pt.c (redeclare_class_template): New function.
16111 * cp_tree.h (redeclare_class_template): Declare it.
16112 * decl.c (xref_tag): Use it.
16113
16114 Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
16115
16116 * call.c (build_over_call): Check IS_AGGR_TYPE, not
16117 TYPE_LANG_SPECIFIC.
16118 * typeck.c (convert_arguments): Likewise.
16119
16120 * decl.c (grokdeclarator): Remove const and volatile from type after
16121 setting constp and volatilep.
16122
16123 * class.c (finish_struct_1): Don't warn about bool bitfield larger
16124 than one bit.
16125
16126 Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
16127
16128 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
16129
16130 Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
16131
16132 * call.c (build_object_call): Complain about ambiguous operator(),
16133 rather that crashing.
16134 (build_new_op): Likewise.
16135 (build_op_delete_call): Likewise.
16136
16137 Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
16138
16139 * cvt.c (perform_qualification_conversions): Use comp_target_types
16140 instead of comp_ptr_ttypes.
16141
16142 Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
16143
16144 * cp-tree.h (enforce_access): Declare.
16145 * call.c (enforce_access): Make it extern, not static.
16146 * class.c (alter_access): Use enforce_access; modify code for ISO
16147 compliance, rather than ARM rules.
16148
16149 Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16150
16151 * cp-tree.h: Fix typo.
16152
16153 Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
16154
16155 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
16156 if (aggregate_value_p (type)).
16157
16158 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
16159
16160 Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
16161
16162 * tree.c (mapcar): When dealing with a DECL, use it's constant
16163 value, if any.
16164 * pt.c (lookup_template_class): Don't mangle the names of template
16165 classes whose arguments are unknown.
16166
16167 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
16168
16169 Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
16170
16171 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
16172
16173 Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
16174
16175 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
16176 boolean_type_node to 1.
16177
16178 Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
16179
16180 * error.c (dump_expr): Remove unused variable `l'.
16181
16182 * pt.c (for_each_template_parm): New function, created by
16183 converting uses_template_parms.
16184 (tree_fn_t): New typedef.
16185 (uses_template_parms): Use it.
16186 (mark_template_parm): New function.
16187 (push_template_decl): Check that the argument list of a partial
16188 specialization uses all the template parameters.
16189
16190 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
16191 with it; we might want it for debugging.
16192 * cp-tree.h (type_unification): Change interface.
16193 * class.c (finish_struct_1): Skip nested template types, just like
16194 ordinary nested types.
16195 (instantiate_type): Use new interface to type_unification.
16196 * lex.c (init_lex): Add __sz as opname for sizeof.
16197 * method.c (build_overload_scope_ref): New function.
16198 (build_overload_int): Handle complex expressions. Set
16199 numeric_output_need_bar if necessary.
16200 (build_overload_value): Handle non-PARM_DECL nodes; this
16201 routine is now used by build_overload_int. Remove some
16202 assignments to numeric_output_need_bar. Use
16203 build_overload_scope_ref.
16204 (build_qualified_name): Note that some template mangled names end
16205 with digits, and set numeric_output_need_bar appropriately. Use
16206 build_underscore_int.
16207 * pt.c (unify): Change interface.
16208 (type_unification_real): Likewise.
16209 (determine_specialization): Use new interfaces.
16210 (tsubst): Deal gracefully with situations in which the argument
16211 vector is not fully filled.
16212 (fn_type_unification): Use new interfaces.
16213 (type_unification): Likewise. Remove NOP_EXPR hack.
16214 (type_unification_real): Likewise.
16215 (unify): Likewise. Deal with unification of complex expressions.
16216
16217 Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
16218
16219 * pt.c (complete_template_args): Initialize skip properly.
16220
16221 * decl.c (make_typename_type): Revert.
16222 (make_implicit_typename): Remove.
16223 (lookup_name_real): Don't call it. Call lookup_field if we see a
16224 TYPE_DECL from a template base.
16225 * search.c (lookup_field): Do implicit typename stuff.
16226
16227 Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
16228 Geoff Noer <noer@cygnus.com>
16229
16230 * Makefile.in: Various fixes for building cygwin32 native toolchains.
16231 * Make-lang.in: Likewise.
16232
16233 Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16234
16235 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
16236
16237 Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
16238
16239 * decl.c (make_implicit_typename): Rewrite removed code.
16240 (make_typename_type): Call it if the type we look up comes from
16241 a base that uses template parms.
16242
16243 * pt.c (complete_template_args): Rewrite.
16244 (tsubst, FUNCTION_DECL): Use it.
16245
16246 Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
16247
16248 * semantics.c (finish_asm_stmt): Fix combine strings. Call
16249 c_expand_asm_operands () if output_operands, input_operands or
16250 clobbers is not NULL_TREE.
16251
16252 Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16253
16254 * pt.c (complete_template_args): New function.
16255 (get_bindings): Deal with specializations of function templates
16256 with return type containing parameters from outer class
16257 templates.
16258 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
16259 substitute arguments and compose a new type.
16260
16261 Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
16262
16263 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
16264 FUNCTION_DECLs.
16265
16266 Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
16267
16268 * decl.c (make_implicit_typename): Lose useless code.
16269
16270 * call.c (standard_conversion): Handle A* -> const A* properly.
16271
16272 * pt.c (get_bindings_real): Rename from get_bindings. Add
16273 check_rettype parm.
16274 (get_bindings): Pass 1.
16275 (get_bindings_overload): Pass 0.
16276
16277 Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
16278
16279 * pt.c (check_explicit_specialization): When reverting a static
16280 member function, also remove the `this' parameter from
16281 last_function_parms.
16282
16283 Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
16284
16285 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
16286 a function context.
16287
16288 * decl.c (store_bindings): Use free_binding_vecs.
16289 (pop_from_top_level): Likewise.
16290
16291 Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
16292
16293 * decl.c (make_implicit_typename): Only change the type of a
16294 TYPENAME_TYPE.
16295
16296 Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
16297
16298 * semantics.c: New file, containing routines to perform the
16299 semantic phase of parsing.
16300 * parse.y: Use it.
16301 * pt.c (tsubst_expr): Likewise.
16302 * cp-tree.h: Declare the various functions in semantics.c.
16303 Provide macros to access _STMT tree nodes.
16304 * cp-tree.def: Add ASM_STMT tree node.
16305 * Makefile.in, Make-lang.in: Add dependencies on and for
16306 semantics.c.
16307
16308 Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
16309
16310 * pt.c (push_template_decl): Only check primary templates.
16311
16312 * pt.c (check_explicit_specialization): Complain about default args
16313 in explicit specialization.
16314
16315 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
16316 constructor_declarator.
16317
16318 Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
16319
16320 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
16321 has no overloaded operator ->.
16322
16323 * call.c (build_field_call): Don't crash when presented with a
16324 field that is actually a nested type.
16325
16326 * decl.c (pushtag): Deal with friend class injection in local
16327 classes.
16328
16329 * call.c (build_object_call): Don't crash if OBJ is a
16330 pointer-to-member-function.
16331
16332 Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
16333
16334 * pt.c (push_template_decl): Complain about template with C linkage,
16335 anonymous template class.
16336
16337 Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
16338
16339 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
16340 * search.c: Likewise.
16341
16342 * lex.c (do_pending_defargs): Only call
16343 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
16344
16345 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
16346
16347 Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
16348
16349 * parse.y: Deal with CONSTRUCTORS in new_initializers.
16350
16351 Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
16352
16353 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
16354 closely mimics the behavior in parse.y.
16355 (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
16356 into a compound statement.
16357
16358 Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
16359
16360 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
16361 * pt.c (inline_needs_template_parms): New fn.
16362 (original_template): New fn.
16363 (push_inline_template_parms_recursive): New fn.
16364 (maybe_begin_member_template_processing): Use them.
16365 (maybe_end_member_template_processing): Likewise.
16366 (is_member_or_friend_template): Rename to is_member_template.
16367 Member functions of local classes are never member templates.
16368
16369 Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16370
16371 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
16372 added in the class scope to catch redefinition error.
16373
16374 * pt.c (reduce_template_parm_level): Also copy
16375 the DECL_TEMPLATE_PARMS field.
16376
16377 Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
16378
16379 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
16380 reduced-level template type parameter.
16381
16382 Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
16383
16384 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
16385 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
16386 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
16387 * decl.c (duplicate_decls): Propagate it.
16388 * typeck2.c (abstract_virtuals_error): Use two loops to emit
16389 abstract virtual functions and virtual functions which need a
16390 final overrider separately.
16391
16392 Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
16393
16394 * lang-specs.h: Properly put brackets around array elements in
16395 initializer.
16396
16397 * typeck.c (build_binary_op_nodefault): Correctly place parens around
16398 && and || in expression.
16399
16400 Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
16401
16402 * call.c (default_parm_conversions): Remove prototype definition.
16403 (build_method_call): Remove unused variable result.
16404
16405 * cvt.c (ocp_convert): Remove unused variable conversion.
16406
16407 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
16408
16409 * except.c (do_unwind): #if 0 definition of unused variables fcall
16410 and next_pc.
16411
16412 * expr.c (extract_scalar_init): #if 0 prototype and function
16413 definition.
16414
16415 * init.c (expand_aggr_init_1): Remove unused variable init_type.
16416 (build_new_1): Remove unused variable t.
16417
16418 * pt.c (instantiate_class_template): Remove unused variable newtag;
16419 cast called function return value to void.
16420 (do_decl_instantiation): Remove unused variables name and fn.
16421
16422 * tree.c (get_type_decl): Add default return to shut up compiler from
16423 complaining control reaches end of non-void function.
16424
16425 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
16426
16427 Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
16428
16429 * call.c (default_parm_conversions): Remove prototype definition.
16430 (build_method_call): Remove unused variable result.
16431 (build_over_call): Add default case in enumeration switch.
16432
16433 Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
16434
16435 * decl2.c (lang_decode_option): Change j's type to size_t.
16436
16437 * tree.c (layout_vbasetypes): record_align and desired_align are of
16438 type unsigned int; const_size and nonvirtual_const_size likewise.
16439
16440 Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
16441
16442 * parse.y (new_initializer): Make sure all initializers are
16443 lists.
16444
16445 Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
16446
16447 * decl2.c (import_export_decl): Mark tinfo functions for
16448 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
16449
16450 Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
16451
16452 * method.c: Fix typo.
16453
16454 Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16455
16456 * method.c: Include "system.h" to get stdlib.h, stdio.h,
16457 ctype.h, string.h, etc.
16458 (issue_nrepeats): Add default case in enumeration switch.
16459 (check_btype): Likewise.
16460 (process_overload_item): Likewise.
16461
16462 * Makefile.in (method.o): Depend on system.h.
16463
16464 Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
16465
16466 * lex.c (do_scoped_id): Fix parenthesizing.
16467
16468 Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
16469
16470 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
16471 FLAG_RTTI is unset, initialize type info machinery and continue
16472 with FLAG_RTTI enabled.
16473 (get_typeid): Likewise.
16474
16475 Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
16476
16477 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
16478 from B.
16479
16480 Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
16481
16482 * pt.c (finish_member_template_decl): Deal more gracefully with
16483 invalid declarations.
16484
16485 Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
16486
16487 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
16488 cp-tree.h: Clean up more old overloading code, old RTTI code, and
16489 some formatting quirks.
16490
16491 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
16492 method.c, pt.c, ptree.c, typeck.c: Remove support for
16493 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
16494 * class.h: Remove.
16495 * Makefile.in: Adjust.
16496
16497 * pt.c (unify): Don't allow reduced cv-quals when strict.
16498
16499 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
16500 *type_unification* and unify.
16501
16502 Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
16503
16504 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
16505 (nested_name_specifier): And add it before this use.
16506 (typename_sub0): And this use. Also add use without the keyword.
16507 (typename_sub1): Likewise.
16508 * pt.c (instantiate_class_template): Don't actually instantiate
16509 anything if our type uses template parms.
16510
16511 Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
16512
16513 * decl.c (start_function): Don't call temporary_allocation for a
16514 nested function.
16515
16516 Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
16517
16518 * pt.c (instantiate_class_template): Don't mess with friends if
16519 our type uses template parms.
16520
16521 Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
16522
16523 * parse.y (nested_name_specifier): Use explicit_template_type.
16524 (typename_sub): Allow a template_type, an explicit_template_type,
16525 or an implicit template type at the end.
16526 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
16527 * decl.c (make_typename_type): Handle template-id where the name
16528 is a TEMPLATE_DECL.
16529 * call.c (build_scoped_method_call): Handle member template
16530 destructor call.
16531 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
16532 destructor is represented by the type.
16533
16534 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
16535 * parse.y (nested_name_specifier): Add 'template' case.
16536 (explicit_template_type): New rule.
16537 (typename_sub): Use it.
16538 * decl.c (make_typename_type): Handle getting a template-id for NAME.
16539 * pt.c (tsubst): Likewise.
16540
16541 Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
16542
16543 * pt.c (add_to_template_args): Fix thinko.
16544 (instantiate_class_template): Call it later.
16545
16546 * pt.c (get_class_bindings): Add outer_args parm.
16547 (most_specialized_class): Likewise.
16548 (instantiate_class_template): Pass it.
16549 (more_specialized_class): Likewise.
16550 (lookup_template_class): Get context from template if none
16551 was specified.
16552 (finish_member_template_decl): Don't do anything with a
16553 partial specialization.
16554 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
16555 AGGREGATE_TYPE_P.
16556 * class.c (finish_struct): Member class templates have already been
16557 checked for name clashes.
16558 * decl.c (pushdecl_with_scope): Handle pushing at class level.
16559
16560 Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
16561
16562 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
16563 (tsubst, *_PARM): Support multiple levels of template classes.
16564 (instantiate_class_template): Look up the pattern from the
16565 original template.
16566 (lookup_template_class): Handle getting a template for d1.
16567 (push_template_decl): Correct setting of 'primary'.
16568 (reduce_template_parm_level): Add 'levels' parm.
16569 (finish_member_template_decl): Support member class templates.
16570 (template_class_depth): Handle multiple levels.
16571 * parse.y (component_decl_1, fn.def2): Remove member template case.
16572 (component_decl): Add member template cases.
16573 * decl2.c (check_member_template): We now handle member template
16574 classes.
16575 * decl.c (pushtag): Handle member templates.
16576 * method.c (do_inline_function_hair): Don't touch
16577 IDENTIFIER_GLOBAL_VALUE.
16578 * init.c (build_offset_ref): If name isn't an identifier, just
16579 return it.
16580 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
16581
16582 * typeck.c (get_delta_difference): Do adjust for conversions to
16583 and from virtual base.
16584
16585 Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
16586
16587 * typeck.c (get_delta_difference): Give hard error for conversion
16588 from virtual base.
16589
16590 * cp-tree.h: Tweak formatting.
16591
16592 Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
16593
16594 * decl.c (push_namespace): Handle redeclaration error.
16595
16596 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
16597 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
16598 (NAMESPACE_BINDING): New macro.
16599 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
16600 * *.c: Use them.
16601
16602 * pt.c (push_template_decl): Use innermost_args.
16603
16604 * decl.c (get_unique_name): Tweak from earlier in the name.
16605
16606 Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
16607
16608 * cp-tree.def: Add CPLUS_BINDING node.
16609 * cp-tree.h (tree_binding): New struct.
16610 (BINDING_SCOPE, BINDING_VALUE): New macros.
16611 (current_namespace, global_namespace): Declare extern.
16612 (struct lang_decl_flags): New field in_namespace.
16613 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
16614 (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
16615 (TREE_INDIRECT_USING): New macro.
16616 * decl2.c (current_namespace, global_namespace): Declare. The
16617 value is a NAMESPACE_DECL now, not a TREE_LIST.
16618 (is_namespace_ancestor, namespace_ancestor): New static functions.
16619 (add_using_namespace, ambiguous_decl): Likewise.
16620 (lookup_using_namespace): New support function for lookup_name.
16621 (qualified_lookup_using_namespace): New support function for
16622 do_scoped_id and lookup_namespace_name.
16623 (get_namespace_id): Mark as obsolete.
16624 (current_namespace_id): Likewise.
16625 (do_namespace_alias): Implement.
16626 (do_using_directive): Implement as call to add_using_namespace.
16627 * decl.c (binding_for_name): New function.
16628 (push_namespace, pop_namespace): Implement.
16629 (push_decl): Don't install a FUNCTION_DECL in the global branch.
16630 (lookup_namespace_name): Implement using qualified lookup.
16631 (lookup_name_real): For global scoping, lookup in
16632 global_namespace. For namespace scoping, lookup in given
16633 namespace. For unscoped lookup, iterate over namespace,
16634 considering using directives.
16635 (init_decl_processing): Initialize global_namespace.
16636 (grokvardecl): Build assembler name as static name for globals.
16637 (grokdeclarator): Remove old namespace mangling.
16638 (xref_tag): When installing a global binding for the
16639 tag, make sure we have an identifier.
16640 * method.c (build_overload_nested_name): Mangle namespaces.
16641 (build_qualified_name): Likewise.
16642 (build_decl_overload_real): Likewise.
16643 * lex.c (build_lang_decl): Set namespace for new declaration to
16644 current_namespace.
16645 (do_scoped_id): Find global names in global or current
16646 namespace, or using qualified namespace lookup, depending on
16647 context.
16648 * init.c (build_member_call): When scope is namespace, use
16649 build_x_function_call instead.
16650 (build_offset_ref): When scope is namespace, collapse processing
16651 to lookup_namespace_name instead.
16652 * error.c (dump_decl): Support NAMESPACE_DECL.
16653 * decl.c (pushdecl): Bind globals to current namespace.
16654 (push_overloaded_decl): Likewise.
16655 (lookup_tag): Likewise.
16656 (lookup_name_current_level): Likewise.
16657 (xref_tag): Likewise.
16658 (start_function): Likewise.
16659 * lex.c (do_identifier): Likewise.
16660 (identifier_typedecl_value): Likewise.
16661 (real_yylex): Likewise.
16662 * method.c (do_inline_function_hair): Likewise.
16663 * parse.y (unscoped): Likewise.
16664 * pt.c (check_explicit_specialization): Likewise.
16665 (lookup_template_class): Likewise.
16666 * rtti.c (call_void_fn): Likewise.
16667 * sig.c (build_sigtable): Likewise.
16668 * ptree.c (lang_print_xnode): New function.
16669
16670 Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
16671
16672 * pt.c (instantiate_class_template): Don't instantiate if pedantic
16673 and the args use template parms.
16674
16675 * pt.c (push_tinst_level): If the instantiation uses template parms,
16676 fail silently.
16677 * decl.c (xref_basetypes): Do call complete_type for basetypes
16678 that involve template parameters.
16679
16680 Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
16681
16682 * typeck2.c (process_init_constructor): Fix labeled init check.
16683
16684 Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
16685
16686 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
16687 argument to tsubst and friends.
16688
16689 * pt.c (tsubst, FUNCTION_DECL): Tidy.
16690
16691 * typeck.c (build_x_function_call): Handle static member function
16692 templates like non-templates. Handle friend templates like normal
16693 function templates.
16694 * pt.c (tsubst, *_PARM): Don't use orig_level.
16695 (get_bindings): Don't call add_to_template_args.
16696 (instantiate_template): Likewise.
16697 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
16698 * ptree.c (print_lang_type): Print index/level for template parms.
16699
16700 Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
16701
16702 * Make-lang.in (cc1plus): Note that cc1plus depends on
16703 cp/cp-tree.h and cp/cp-tree.def.
16704
16705 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
16706 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
16707 position in a template parameter list.
16708 * cp-tree.h (template_parm_index): New structure, used as the tree
16709 structure for a TEMPLATE_PARM_INDEX.
16710 (TEMPLATE_PARM_IDX): New macro.
16711 (TEMPLATE_PARM_LEVEL): Likewise.
16712 (TEMPLATE_PARM_DESCENDANTS): Likewise.
16713 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
16714 (TEMPLATE_PARM_DECL): Likewise.
16715 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
16716 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
16717 (TEMPLATE_TYPE_DECL): Likewise.
16718 (TEMPLATE_CONST_IDX): Remove.
16719 (TEMPLATE_CONST_LEVEL): Likewise.
16720 (TEMPLATE_CONST_SET_INFO): Likewise.
16721 (TEMPLATE_TYPE_SET_INFO): Likewise.
16722 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
16723 node.
16724 (TEMPLATE_TYPE_LEVEL): Likewise.
16725 * decl.c (decls_match): Call comp_template_parms, rather than
16726 expanding it inline.
16727 (duplicate_decls): If two template declarations are being merged,
16728 then their TEMPLATE_INFOs should be merged as well.
16729 (grokfndecl): Save template-id information when declaring a friend
16730 with explicit template arguments. Pass arguments to
16731 check_explicit_specialization via correct convention; at some
16732 point check_explicit_specialization changed, but these call-sites
16733 did not.
16734 (grokdeclarator): Tidy up slightly.
16735 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
16736 two template functions with the same DECL_ASSEMBLER_NAME the same,
16737 since the names are not yet mangled.
16738 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
16739 TEMPLATE_CONST_PARM.
16740 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
16741 decl for a non-type parameter, rather than printing `<tparm ...>'.
16742 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
16743 (do_friend): Deal with template friends.
16744 * lex.c (do_pending_inlines): Call
16745 maybe_begin_member_template_processing, rather than
16746 conditionally calling begin_member_template_processing.
16747 (process_next_inline): Likewise. Call
16748 maybe_end_member_template_processing, rather than
16749 conditionally calling end_member_template_processing.
16750 (do_pending_defargs): Likewise.
16751 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
16752 TEMPLATE_CONST_PARM.
16753 * method.c (build_mangled_template_parm_index): New function.
16754 (build_overload_value): Use it.
16755 (build_overload_name): Likewise.
16756 * pt.c (finish_member_template_decl): Allow friend declarations.
16757 (template_class_depth): New function.
16758 (is_member_template): Rename, and modify, to become...
16759 (is_member_or_friend_template): New function.
16760 (end_member_template_processing): Rename, and modify, to become...
16761 (maybe_end_member_template_processing).
16762 (build_template_parm_index): New function.
16763 (reduce_template_parm_level): New function.
16764 (process_template_parm): Modify to use build_template_parm_index.
16765 (push_template_decl): Deal with friend templates.
16766 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
16767 TEMPLATE_CONST_PARM.
16768 (tsubst_friend_function): New function.
16769 (instantiate_class_template): Generate the DECL_FRIENDLIST
16770 for a new instantiation by using tsubst_friend_function rather
16771 than just tsubst.
16772 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
16773 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
16774 appropriate new macros. Use reduce_template_parm_level to
16775 generate lower-level template parameters. Handle tsubst'ing into
16776 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
16777 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
16778 templates. Similarly for the template parameters for a new
16779 template.
16780 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
16781 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
16782 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
16783 (get_bindings): Call add_to_template_args if necessary.
16784 (instantiate_decl): Handle instantiations of friend templates.
16785 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
16786 TEMPLATE_TYPE_PARM as a list of fields; it's not!
16787 * spew.c (yylex): Do a little manual constant propagation to
16788 clarify the code.
16789
16790 Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
16791
16792 * error.c: Include sys/types.h.
16793
16794 Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
16795
16796 * method.c (build_mangled_name): Start CPP directives in column zero.
16797
16798 Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
16799
16800 * typeck2.c (process_init_constructor): Sorry about non-trivial
16801 labeled initializers.
16802 * parse.y (initlist): Re-enable labeled initializers.
16803
16804 Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16805
16806 * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
16807 all callers changed. Rely on the new parameter instead of arg
16808 being a TREE_LIST when determine whether we are working inside
16809 template template parameter. Clean up is_type test.
16810
16811 Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
16812
16813 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
16814 * typeck2.c (initializer_constant_valid_p): Allow conversions
16815 between pointers and references.
16816
16817 1998-02-19 Brendan Kehoe <brendan@cygnus.com>
16818
16819 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
16820 if pedantic || warn_pointer_arith.
16821
16822 Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16823
16824 * pt.c (unify): Handle TEMPLATE_DECL.
16825
16826 1998-02-18 Brendan Kehoe <brendan@cygnus.com>
16827
16828 * cp-tree.h (strip_attrs): Remove decl.
16829
16830 1998-02-18 Doug Evans <devans@cygnus.com>
16831
16832 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
16833 Update olddecl's attributes too.
16834 (strip_attrs): Remove function.
16835 * typeck.c (common_type): Call merge_machine_type_attributes.
16836
16837 Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
16838
16839 * parse.y (initdcl0_innards): New grammar symbol.
16840 (nomods_initdecls, nomods_initdcl0): Change type from itype to
16841 none, since the resulting value is never used.
16842 (parse_decl): New function.
16843 (datadef): Remove redundant actions.
16844 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
16845 * parse.c: Regenerated.
16846
16847 Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
16848
16849 * parse.y (simple_stmt): Use getdecls() to check for decl.
16850
16851 Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
16852
16853 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
16854 macros.
16855 (c++.install-common): Install c++filt properly as native or as cross
16856 variant.
16857 (c++.uninstall): Add c++filt.
16858
16859 Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
16860
16861 * call.c (standard_conversion): Fix multi-level ptr conversions.
16862
16863 Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
16864
16865 * init.c (build_new): Propagate error_mark_node up.
16866
16867 Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
16868
16869 * parse.y (simple_stmt): If the condition isn't a declaration,
16870 start the controlled block after the test.
16871
16872 Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
16873
16874 * call.c (build_over_call): Convert builtin abs, labs and fabs to
16875 tree-codes.
16876 * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
16877 builtins.
16878
16879 Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
16880
16881 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
16882
16883 Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
16884
16885 * cp-tree.h: Add access_protected_virtual_node.
16886 * class.c (init_class_processing): Initialize it.
16887 * decl.c (xref_basetypes): Use it.
16888 * parse.y (base_class_access_list): Likewise.
16889
16890 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
16891 (c++.install-common): Install c++filt.
16892
16893 Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
16894
16895 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
16896
16897 Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
16898
16899 * call.c (reference_binding): Use comptypes when comparing
16900 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
16901
16902 Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
16903
16904 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
16905 (really_overloaded_fn): Move check here from is_overloaded_fn.
16906 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
16907
16908 Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
16909
16910 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
16911 conversions.
16912
16913 Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
16914
16915 * cp-tree.h (push_template_decl): Return the decl passed in, or an
16916 equivalent duplicate.
16917 * decl.c (pushtag): Use the return value from push_template_decl.
16918 (duplicate_decls): When duplicating a template declaration, merge
16919 the DECL_TEMPLATE_RESULTs as well.
16920 (make_implicit_typename): Don't try to dive into typename types to
16921 find a context for making a new implicit typename.
16922 (start_decl): Use the return value from push_template_decl.
16923 (grokdeclarator): Complain about declarations list `const operator
16924 int'. Since we don't correctly handle in-class initializations of
16925 non-static data members, complain about this (now illegal)
16926 practice. Issue an error for initializations of non-const statics
16927 since that is illegal as well, and since we don't handle that case
16928 correctly either.
16929 (start_function): Use the return value from push_template_decl.
16930 (start_method): Likewise.
16931 * decl2.c (grokfield): Likewise. Since the change to
16932 grokdeclarator ensures that all initialized fields are in fact
16933 static, remove a redundant test for TREE_PUBLIC.
16934 * parse.y (initlist): Disable labeled initializers since they do
16935 not work as per the documentation, and since they do not use the
16936 same syntax as the C front end.
16937 * pt.c (push_template_decl): Return the decl passed in, or an
16938 equivalent duplicate.
16939 (lookup_template_class): When searching in a nested context,
16940 use the right arguments.
16941 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
16942 * typeck.c (build_component_ref): Assign the correct type to the
16943 result of build_vfn_ref.
16944
16945 Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
16946
16947 * pt.c (convert_nontype_argument): Fix typo.
16948 (check_explicit_specialization): Allow old-style specialization
16949 of class template members.
16950
16951 Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
16952 Manfred Hollstein <manfred@s-direktnet.de>
16953
16954 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
16955 when deciding to override DECL_ASSEMBLER_NAME.
16956
16957 Tue Feb 10 15:30:55 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
16958
16959 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
16960 * cp-tree.h (flag_do_squangling): Add declaration.
16961 * lang-options.h: Add -fsquangle and -fno-squangle.
16962 * method.c: Add macros and static variables for squangling.
16963 (build_overload_name): Rename to build_mangled_name, add logic for B
16964 compression, and split into process_modifiers and
16965 process_overload_item.
16966 (process_modifiers): New function, to handle constant, reference,
16967 and pointer types.
16968 (process_overload_item): New function, handles issue of type codes.
16969 (build_overload_name): New function, start squangling and call
16970 build_mangled_name.
16971 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
16972 (start_squangling): New function to initialize squangling structs.
16973 (end_squangling): New function to destroy squangling structs.
16974 (nrepeats): Rename variable to Nrepeats.
16975 (issue_nrepeats): New function for issuing 'n' type repeats.
16976 (check_ktype): New function to check for type K name compression.
16977 (build_overload_nested_name): Add a check for K name compression.
16978 (build_qualified_name): Add a check for K name compression and don't
16979 use DECL_ASSEMBLER_NAME when squangling is on.
16980 (check_btype): New function, checks for B type compression.
16981 (build_static_name, build_decl_overload_real): Initiate squangling.
16982 (build_typename_overload, build_overload_with_type): Initiate
16983 squangling
16984
16985 Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
16986
16987 * method.c (make_thunk): Avoid name buffer overflow.
16988
16989 Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
16990
16991 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
16992 don't define them yet.
16993
16994 * parse.y (nomods_initdcl0): Add constructor_declarator case.
16995
16996 Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16997
16998 * config-lang.in (diff_excludes): Use basename only.
16999
17000 Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
17001
17002 * tinfo2.cc: Add tinfo for signed char.
17003
17004 Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
17005
17006 * search.c (compute_access): Handle protected constructors in derived
17007 classes as accessible.
17008
17009 Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
17010
17011 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
17012 Call convert_from_reference sooner.
17013
17014 Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
17015
17016 * cvt.c (ocp_convert): Obtain the constant values from constant
17017 decls even if the destination type is the same as the type of the
17018 decl.
17019
17020 * decl2.c (finish_file): Make sure that static inlines with
17021 definitions are not marked DECL_EXTERNAL before returning.
17022
17023 Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
17024
17025 * decl.c: Lose arg_looking_for_template.
17026 (lookup_name_real): Likewise.
17027 * parse.y: Lose processing_template_arg, template_arg1.
17028 (primary): Likewise.
17029 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
17030
17031 Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17032
17033 * error.c (dump_decl): Fix type of default arguments for template
17034 template parameters and nontype template parameters.
17035 * parse.y (template_parm): Handle invalid default template
17036 template arguments here.
17037
17038 * parse.y (template_parm): Use template_arg instead of PTYPENAME
17039 for default template template argument.
17040 * pt.c (coerce_template_parms): Merge default template argument
17041 codes. Can treat RECORD_TYPE as template name if it is implicitly
17042 created. Fix argument index in error message.
17043 * typeck.c (comptypes): Merge template argument comparison codes in
17044 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
17045
17046 Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
17047
17048 * lex.c (file_name_nondirectory): Also check for '/'.
17049
17050 Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
17051
17052 * parse.y (primary): Deal with statement-expressions in
17053 templates.
17054 * pt.c (tsubst_copy): Handle BIND_EXPR.
17055 * tree.c (mapcar): Likewise.
17056
17057 * call.c (add_template_candidate_real): Pass extra parameter to
17058 fn_type_unification.
17059 * cp-tree.h (fn_type_unification): Add parameter.
17060 * pt.c (fn_type_unification): Add additional parameter to deal with
17061 static member functions.
17062 (get_bindings): Deal with static member functions.
17063
17064 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
17065 (revert_static_member_fn): Declare.
17066 * decl.c (revert_static_member_fn): Remove declaration. Change
17067 linkage from internal to external.
17068 (cp_finish_decl): Deal with virtual functions in classes local to
17069 template functions.
17070 * decl2.c (finish_file): Don't forget to emit increment/decrement
17071 expressions in initializers for file-scope variables.
17072 * parse.y (typename_sub2): If the typename doesn't names a
17073 template, rather than a type, issue an error message.
17074 * pt.c (check_explicit_specialization): Handle specializations of
17075 static member functions.
17076 (coerce_template_parms): Handle offset references to lists of
17077 member functions.
17078 * search.c (note_debug_info_needed): Don't crash when handed a
17079 type which is being defined.
17080 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
17081 that can happen with some illegal code.
17082
17083 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17084
17085 * call.c (user_harshness): Initialize `code' to 0.
17086 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
17087 (null_ptr_cst_p): Add parentheses around && within ||.
17088 (standard_conversion): Likewise.
17089 (z_candidate): Likewise.
17090 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
17091 (build_object_call): Likewise for `mem_args'.
17092 (build_new_op): Likewise for `mem_arglist'. Add `return' from
17093 default case in enumeration switch.
17094
17095 * class.c (build_vtable_entry): Add explicit braces to avoid
17096 ambiguous `else'.
17097 (build_class_init_list): Likewise.
17098 (finish_struct_1): Initialize `width' to 0.
17099 (instantiate_type): Initialize `name' to NULL_TREE. Add
17100 explicit braces to avoid ambiguous `else'.
17101
17102 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
17103 `else'.
17104
17105 * decl.c (grok_reference_init): Eliminate unused parameter, all
17106 callers changed.
17107 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
17108 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
17109 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
17110 (grokdeclarator): Add parentheses around && within ||. Add
17111 explicit braces to avoid ambiguous `else'.
17112 (grokparms): Initialize `type' to NULL_TREE.
17113 (xref_tag): Remove unused label `just_return'.
17114 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
17115 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
17116 (hack_incomplete_structures): Add parentheses around assignment
17117 used as truth value.
17118
17119 * decl2.c (coerce_delete_type): Hide definition of `e3'.
17120
17121 * error.c: Include <stdlib.h>.
17122 (dump_expr): Change the type of `i' to size_t. Remove unused
17123 label `error'.
17124
17125 * except.c (init_exception_processing): Remove unused variable `d'.
17126 (expand_throw): Likewise for `label'.
17127
17128 * friend.c (add_friends): Add explicit braces to avoid ambiguous
17129 `else'.
17130
17131 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
17132 (sort_base_init): Likewise for `binfo'.
17133 (expand_member_init): Likewise for `rval'.
17134 (build_member_call): Add parentheses around assignment used as
17135 truth value.
17136 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
17137 (build_new): Initialize `nelts' to NULL_TREE. Initialize
17138 `old_immediate_size_expand' to 0.
17139 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
17140 (build_vec_delete_1): Remove unused variable `block'.
17141 (expand_vec_init): Initialize `itype' to NULL_TREE.
17142
17143 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
17144 declaration of `index' and `rindex' with autoconf macros.
17145 (reinit_parse_for_expr): Remove unused variables
17146 `look_for_semicolon' and `look_for_lbrac'.
17147 (cons_up_default_function): Initialize `args' to NULL_TREE.
17148 (readescape): Initialize `firstdig' to 0.
17149 (real_yylex): Add parentheses around assignment used as truth value.
17150
17151 * method.c: Include <strings.h> if we don't have <string.h>.
17152 Protect declaration of `index' with autoconf macro.
17153
17154 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
17155 Initialize `type' to NULL_TREE.
17156 (structsp): Remove unused variable `id'.
17157
17158 * pt.c (coerce_template_parms): Add explicit braces to avoid
17159 ambiguous `else'.
17160 (lookup_template_class): Initialize `template' to NULL_TREE.
17161 (instantiate_class_template): Remove unused variable `name' and `e'.
17162 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
17163 (do_poplevel): Initialize `saved_warn_unused' to 0.
17164 (type_unification): Remove unused varable `parm'.
17165 (unify): Likewise for `j'.
17166
17167 * repo.c (init_repo): Add parentheses around assignment used as
17168 truth value.
17169 (finish_repo): Remove unused varable `p'.
17170
17171 * search.c (get_binfo): Initialize `type' to NULL_TREE.
17172 (get_base_distance): Likewise.
17173 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
17174 and `new_v' to NULL_TREE.
17175 (lookup_fnfields): Likewise for `rval_binfo_h'.
17176 (breadth_first_search): Add parentheses around assignment used as
17177 truth value.
17178 (get_template_base): Initialize `type' to NULL_TREE.
17179
17180 * sig.c (append_signature_fields): Initialize `last_mfptr' to
17181 NULL_TREE.
17182 (build_signature_table_constructor): Likewise for
17183 `last_rhs_field', `pfn' and `vt_off'.
17184 (build_sigtable): Likewise for `init'.
17185
17186 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
17187 (propagate_binfo_offsets): Likewise for `delta'.
17188 (hash_tree_cons): Initialize hashcode to 0.
17189 (can_free): Likewise for `size'.
17190 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
17191
17192 * typeck.c (convert_sequence): Hide prototype.
17193 (common_type): Add explicit braces to avoid ambiguous `else'.
17194 (comp_target_types): Likewise.
17195 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
17196 (build_function_call_real): Add explicit braces to avoid ambiguous
17197 `else'.
17198 (convert_arguments): Initialize `called_thing' to 0.
17199 (convert_for_initialization): Initialize `savew' and `savee' to 0.
17200
17201 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
17202 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
17203 (build_x_arrow): Likewise for `last_rval'.
17204
17205 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
17206
17207 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
17208
17209 * decl.c (init_decl_processing): Use set_sizetype.
17210 * decl2.c (sizetype): Don't declare.
17211 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
17212 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
17213 (build_component_addr, unary_complex_lvalue): Likewise.
17214 * rtti.c (expand_class_desc): Likewise.
17215 * class.c (get_vfield_offset): Likewise.
17216
17217 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
17218
17219 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
17220 early to avoid bogus error. Handle overloaded function
17221 names provided as template arguments correctly.
17222 (coerce_template_parms): Don't mishandle overloaded functions when
17223 dealing with template template parameters.
17224 (lookup_template_class): Issue an error message, rather than
17225 crashing, when the TYPE_DECL provided is not a template type.
17226
17227 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
17228
17229 * class.c (instantiate_type): Don't just return a known type if
17230 it's wrong.
17231
17232 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
17233
17234 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
17235 since that code could never be reached.
17236
17237 * error.c (dump_decl): Avoid aborting in the midst of printing an
17238 error message about an illegal template declaration.
17239
17240 * parse.y (structsp): Print an error message, rather than crashing,
17241 when a class-head does not name a class.
17242
17243 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
17244 template arguments as a g++ extension.
17245
17246 * cp-tree.def (ALIGNOF_EXPR): New tree code.
17247 * decl2.c (grok_alignof): If processing_template_decl, just store
17248 the expression.
17249 * typeck.c (c_alignof): Likewise.
17250 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
17251 * error.c (dump_expr): Likewise.
17252 * pt.c (tsubst_copy): Likewise.
17253 * tree.c (cp_tree_equal): Likewise.
17254 * pt.c (uses_template_parms): Correctly determine whether or not a
17255 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
17256 folding can be done.
17257
17258 * cp-tree.h (grok_enum_decls): Remove type parameter.
17259 * decl.c (grok_enum_decls): Likewise.
17260 * decl2.c (grok_x_components): Call grok_enum_decls
17261 unconditionally, since it will do nothing if there is no
17262 current_local_enum. Use the new calling sequence.
17263 * pt.c (tsubst_enum): Use the new calling sequence for
17264 grok_enum_decls.
17265
17266 * decl.c (start_function): Make member functions of local classes
17267 in extern inline functions have comdat linkage here...
17268 (grokdeclarator): Rather than here.
17269
17270 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
17271
17272 * pt.c (convert_nontype_argument): Use decl_constant_value.
17273
17274 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
17275
17276 * call.c (add_template_candidate_real): New function.
17277 (add_template_candidate): Use it.
17278 (add_template_conv_candidate): Likewise.
17279 (joust): Pass extra argument to more_specialized.
17280 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
17281 (is_local_class): Remove.
17282 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
17283 * cp-tree.h (is_local_class): Remove.
17284 (perform_array_to_pointer_conversion): Likewise.
17285 (finish_member_template_decl): Add.
17286 (check_explicit_specialization): Return a tree, not an int.
17287 (more_specialized): Take additional argument.
17288 (get_bindings): Likewise.
17289 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
17290 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
17291 (perform_array_to_pointer_conversion): Remove.
17292 * decl.c (saved_scope): Add processing_specialization,
17293 processing_explicit_instantiation fields.
17294 (maybe_push_to_top_level): Save them.
17295 (pop_from_top_level): Restore them.
17296 (grokfndecl): Use new return value from
17297 check_explicit_specialization.
17298 (start_decl): Don't check flag_guiding_decls before pushing
17299 decls.
17300 (cp_finish_decl): Remove previous (bogus) change.
17301 (grok_declarator): Use decl_function_context rather than
17302 is_local_class.
17303 * decl2.c (finish_file): Pass extra argument to get_bindings.
17304 (build_expr_from_tree): Let build_x_component_ref check
17305 validity of arguments rather than doing it here.
17306 * lex.c (cons_up_default_function): Remove code fooling with
17307 processing_specialization, processing_explicit_instantiation
17308 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
17309 * method.c (build_overload_identifier): Mangle local classes in
17310 template functions correctly.
17311 * parse.y (finish_member_template_decl): Move to pt.c.
17312 * pt.c (finish_member_template_decl): Moved here from parse.y.
17313 (print_candidates): New function.
17314 (determine_specialization): Change interface. Properly look for
17315 most specialized versions of template candidates.
17316 (check_explicit_specialization): Fully process explicit
17317 instantiations.
17318 (push_template_decl): Avoid looking at CLASSTYPE fields in
17319 FUNCTION_DECLS.
17320 (determine_overloaded_function): Remove.
17321 (convert_nontype_argument): Change name from
17322 convert_nontype_parameter. Use determine_overloaded_function
17323 instead of instantiate_type.
17324 (mangle_class_name_for_template): Handle type contexts as well as
17325 function contexts.
17326 (classtype_mangled_name): Likewise.
17327 (lookup_template_class): Likewise.
17328 (tsubst): Likewise.
17329 (more_specialized): Take explict template arguments as a
17330 parameter.
17331 (most_specialized): Likewise.
17332 (get_bindings): Likewise. Check that return types match before
17333 proclaiming a function a match.
17334 (do_decl_instantiation): Remove code searching for function to
17335 instantiate; that is now done in check_explicit_specialization.
17336 (add_maybe_template): Pass extra argument to get_bindings.
17337 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
17338 implementation.
17339 * typeck.c (build_component_ref): Check for invalid arguments.
17340
17341 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
17342
17343 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
17344 return_target and call_target are equivalent.
17345
17346 * pt.c (type_unification_real): Just accept function parms that
17347 don't use any template parms.
17348
17349 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
17350
17351 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
17352 unset DECL_NOT_REALLY_EXTERN.
17353
17354 * parse.y (typename_sub*): Fix std::.
17355
17356 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
17357
17358 * error.c (dump_decl): Fix type default template args.
17359 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
17360
17361 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
17362
17363 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
17364 (file_name_nondirectory): Use.
17365
17366 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17367
17368 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
17369 that are not really present. Substitute default arguments in
17370 template template arguments. Correctly convert TEMPLATE_DECL to
17371 TEMPLATE_TEMPLATE_PARM.
17372 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
17373 are no longer treated specially here.
17374 * parse.y (template_template_parm): Fix copy error.
17375 * decl.c (grokdeclarator): Warn about missing `typename' for nested
17376 type created from template template parameters.
17377 * parse.y (bad_parm): Likewise
17378
17379 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
17380 (push_nested_class): Likewise.
17381 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
17382 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
17383 (copy_template_template_parm): Declare.
17384 * decl.c (arg_looking_for_template): New variable.
17385 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
17386 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
17387 node if arg_looking_for_template is nonzero.
17388 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
17389 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
17390 (grokdeclarator): Handle TEMPLATE_DECL.
17391 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
17392 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
17393 (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
17394 (dump_decl): Handle unnamed template type parameters.
17395 Handle template template parameters.
17396 (dump_function_name): Handle template template parameters.
17397 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
17398 Handle TEMPLATE_TEMPLATE_PARM.
17399 * method.c (build_template_template_parm_names): New function.
17400 (build_template_parm_names): Handle TEMPLATE_DECL.
17401 (build_overload_nested_name, build_overload_name):
17402 Handle TEMPLATE_TEMPLATE_PARM.
17403 * parse.y (maybe_identifier): New nonterminal.
17404 (template_type_parm): Use it.
17405 (template_template_parm, template_arg1): New nonterminal.
17406 (template_parm): Add template_template_parm rules.
17407 (template_arg): Set processing_template_arg.
17408 (template_arg1): Rules moved from template_arg.
17409 (primary, nonnested_type): Set arg_looking_for_template if we are
17410 processing template arguments.
17411 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
17412 (process_template_parm): Handle template template parameters.
17413 (coerce_template_parms, comp_template_args): Likewise.
17414 (mangle_class_name_for_template, lookup_template_class): Likewise.
17415 (uses_template_parms): Handle TEMPLATE_DECL and
17416 TEMPLATE_TEMPLATE_PARM.
17417 (current_template_args): Handle TEMPLATE_DECL.
17418 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
17419 * search.c (dfs_walk, dfs_record_inheritance):
17420 Handle TEMPLATE_TEMPLATE_PARM.
17421 * tree.c (copy_template_template_parm): New function.
17422 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
17423 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
17424
17425 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
17426
17427 * decl.c (start_decl): Don't allow duplicate definitions of static
17428 data members.
17429
17430 * call.c (build_user_type_conversion_1): Handle user-defined
17431 template conversion operators correctly.
17432
17433 * decl2.c (build_expr_from_tree): Issue an error message if the
17434 object in a COMPONENT_REF is a TEMPLATE_DECL.
17435
17436 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
17437
17438 * class.c (is_local_class): New function.
17439 * cp-tree.h (is_local_class): Declare it.
17440 (last_tree): Likewise.
17441 (begin_tree): Likewise.
17442 (end_tree): Likewise.
17443 (lookup_template_class): Change prototype.
17444 * decl.c (cp_finish_decl): Check for NULL where necessary.
17445 Consider FUNCTION_DECLS to declare objects with top-level binding,
17446 when calling make_decl_rtl.
17447 (grokdeclarator): Give members of local classes internal linkage.
17448 (start_function): Remove declaration of last_tree.
17449 (finish_function): Set flag_keep_inline_functions around call to
17450 rest_of_compilation if we are processing a member function in a
17451 local class.
17452 (start_method): Call push_template_decl for member functions of
17453 local classes in template functions.
17454 * decl2.c (import_export_decl): Don't give external linkage to
17455 instantiations of templates with internal linkage.
17456 * parse.y (last_tree): Remove declaration.
17457 (template_type): Pass extra parameter to lookup_template_class.
17458 (self_template_type): Likewise.
17459 (structsp): Move call to reset_specialization into left_curly.
17460 (left_curly): Call reset_specialization, and begin_tree.
17461 * pt.c (saved_trees): New variable.
17462 (mangle_class_name_for_template): Change prototype. Use
17463 additional function context to name local classes in templates
17464 correctly.
17465 (classtype_mangled_name): Pass the context.
17466 (push_template_decl): Handle local classes and templates, and
17467 member functions for such classes.
17468 (convert_nontype_parameter): Fix handling of pointer-to-member
17469 constants.
17470 (lookup_template_class): Handle local classes in templates.
17471 (tsubst): Likewise. Don't assume that template instantiations
17472 have external linkage; pay attention to the template declaration.
17473 (mark_decl_instantiated): Likewise.
17474 (begin_tree): New function.
17475 (end_tree): Likewise.
17476
17477 * decl.c (xref_basetypes): Don't call complete_type for basetypes
17478 that involve template parameters; that can lead to infinite
17479 recursion unnecessarily.
17480
17481 * pt.c (register_specialization): Do not register specializations
17482 that aren't ready to be registered yet.
17483 (check_explicit_specialization): Handle explicit specialization of
17484 constructors and destructors.
17485 (build_template_decl): New function.
17486 (push_template_delc): Handle out-of-class specializations of
17487 member templates.
17488
17489 * pt.c (check_explicit_specialization): Set up the template
17490 information before registering the specialization.
17491 (coerce_template_parms): Fix thinko.
17492 (tsubst): Handle specializations of member templates correctly.
17493
17494 * class.c (finish_struct_methods): Remove calls to
17495 check_explicit_specialization from here.
17496 (finish_struct): And insert them here.
17497 * cp-tree.h (perform_qualification_conversions): New function.
17498 (perform_array_to_pointer_conversion): Likewise.
17499 (begin_explicit_instantiation): Likewise.
17500 (end_explicit_instantiation): Likewise.
17501 (determine_specialization): Renamed from
17502 determine_explicit_specialization.
17503 (comp_template_parms): New function.
17504 (processing_explicit_instantiation): New variable.
17505 * cvt.c (perform_qualification_conversions): New function.
17506 (perform_array_to_pointer_conversion): Likewise.
17507 * decl.c (duplicate_decls): Don't consider template functions
17508 alike unless they have the same parameters. Refine handling of
17509 instantiation/specialization mismatches.
17510 (start_decl): Don't call pushdecl for template specializations,
17511 since they don't affect overloading.
17512 (start_function): Likewise.
17513 (grokfndecl): Call check_explicit_specialization a little later.
17514 Don't call duplicate_decls for memberm template specializations.
17515 (grokdeclarator): Don't update template_count for classes that are
17516 themselves specializations. Remove use of `2' as parameter to
17517 grokfndecl since that value isn't used.
17518 * lex.c (cons_up_default_function): Save and restore
17519 processing_explicit_instantiation around calls to grokfield.
17520 * parse.y (finish_member_template_decl): New function.
17521 (component_decl_1): Use it.
17522 (fn.def2): Likewise.
17523 (template_arg_list_opt): New nonterminal.
17524 (template_type): Use it.
17525 (self_template_type): Likewise.
17526 (template_id): Likewise.
17527 (object_template_id): Likewise.
17528 (notype_template_declarator): Likwise.
17529 (begin_explicit_instantiation): Likewise.
17530 (end_explicit_instantiation): Likewise.
17531 (explicit_instantiation): Use them.
17532 * pt.c (coerce_template_parms): Add parameters.
17533 (processing_explicit_instantiation): New variable.
17534 (convert_nontype_parameter): New function.
17535 (determine_overloaded_function): Likewise.
17536 (begin_explicit_instantiation): Likewise.
17537 (end_explicit_instantiation): Likewise.
17538 (retrieve_specialization): Likewise.
17539 (register_specialization): Likewise.
17540 (processing_explicit_specialization): Removed.
17541 (determine_specialization): Handle specializations of member
17542 functions of template class instantiations.
17543 (check_explicit_specialization): Refine to conform to standard.
17544 (comp_template_parms): New function.
17545 (coerce_template_parms): Call convert_nontype_parameter.
17546 (tsubst): Refine handling of member templates. Use
17547 register_specialization.
17548 (instantiate_template): Use retrieve_specialization.
17549 (do_decl_instantiation): Likewise.
17550 (instantiate_decl): Likewise.
17551 (type_unification): Improve handling of explict template
17552 arguments.
17553 * tree.c (mapcar): Return error_mark_node, rather than aborting,
17554 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
17555 * typeck.c (build_unary_op): Call determine_specialization, rather
17556 than determine_explicit_specialization.
17557
17558 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
17559
17560 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
17561
17562 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
17563
17564 * error.c (dump_decl): For enum tags, output the tag, not its value.
17565
17566 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
17567
17568 * decl.c (init_decl_processing): Only call init_rtti_processing
17569 FLAG_RTTI is set.
17570
17571 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
17572
17573 * init.c (build_new_1): Split out from build_new.
17574 (build_new): Just return a NEW_EXPR.
17575 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
17576
17577 * decl2.c (get_temp_regvar): Tweak.
17578
17579 * cp-tree.h (TREE_CALLS_NEW): Comment out.
17580 * class.c (resolves_to_fixed_type_p): Remove use.
17581 * method.c (build_opfncall): Likewise.
17582 * call.c (build_new_op): Likewise.
17583
17584 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
17585
17586 * exception.cc (__eh_alloc, __eh_free): New fns.
17587 (__cp_push_exception, __cp_pop_exception): Use them.
17588 (__uncatch_exception): Call terminate here if no exception.
17589 * except.c (build_terminate_handler): New fn.
17590 (expand_start_catch_block): Use it.
17591 (expand_exception_blocks): Likewise.
17592 (alloc_eh_object): New fn.
17593 (expand_throw): Use it. Protect exception init with terminate.
17594 * typeck.c (build_modify_expr): Remove code that ignores trivial
17595 methods.
17596
17597 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17598
17599 * call.c (add_builtin_candidate): Add default case in enumeration
17600 switch.
17601 (build_new_op): Likewise.
17602 (convert_like): Likewise.
17603 * cvt.c (build_expr_type_conversion): Likewise.
17604 * tree.c (real_lvalue_p): Likewise.
17605 (lvalue_p): Likewise.
17606 (cp_tree_equal): Likewise.
17607 * typeck.c (comptypes): Likewise.
17608 (build_component_ref): Likewise.
17609 (build_function_call_real): Likewise.
17610 (build_binary_op_nodefault): Likewise.
17611 (build_unary_op): Likewise.
17612 (build_modify_expr): Likewise.
17613 * typeck2.c (initializer_constant_valid_p): Likewise.
17614
17615 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
17616
17617 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
17618
17619 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
17620
17621 * pt.c (coerce_template_parms): Make sure to digest_init if
17622 possible.
17623
17624 * decl.c (duplicate_decls): Make the newdecl virtual if the
17625 olddecl was, just as is done with other attributes of olddecl.
17626
17627 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
17628
17629 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
17630 address of an OFFSET_REF.
17631
17632 * cp-tree.def: Add AGGR_INIT_EXPR.
17633 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
17634 AGGR_INIT_EXPR where appropriate.
17635 * expr.c (cplus_expand_expr): Likewise. Simplify.
17636
17637 * decl2.c (finish_file): Remove call to register_exception_table.
17638
17639 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
17640
17641 * pt.c (instantiate_class_template): Don't do injection when
17642 processing_template_decl is true, as pollutes current_binding_level
17643 for base classes.
17644
17645 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
17646
17647 * pt.c (maybe_fold_nontype_arg): Add prototype.
17648
17649 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
17650
17651 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
17652 * error.c (dump_expr): Likewise.
17653
17654 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
17655
17656 * typeck.c (build_function_call_real): Remove "inline called before
17657 definition" pedwarn.
17658
17659 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
17660
17661 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
17662
17663 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
17664
17665 * pt.c (type_unification_real): Change __null to type void* with
17666 a warning.
17667
17668 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
17669
17670 * call.c (implicit_conversion): Don't call
17671 build_user_type_conversion_1 with a NULL expr, since it will
17672 crash.
17673
17674 * pt.c (unify): Don't try to unify array bounds if either array is
17675 unbounded.
17676
17677 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
17678
17679 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
17680 Replace extern decls with casts.
17681
17682 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
17683 Update last_parm_cleanup_insn.
17684 (store_after_parms): Remove.
17685 * cp-tree.h: Adjust.
17686
17687 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
17688
17689 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
17690 (finish_file): Check DECL_COMDAT instead of weak|one_only.
17691 (import_export_vtable): Use make_decl_one_only instead of
17692 comdat_linkage for win32 tweak.
17693 (import_export_decl): Likewise.
17694 * pt.c (mark_decl_instantiated): Likewise.
17695
17696 * decl2.c (finish_file): Lose handling of templates in pending_statics.
17697
17698 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
17699
17700 * decl2.c (finish_file): Lose call to expand_builtin_throw.
17701 * except.c (expand_builtin_throw): Remove.
17702 * cp-tree.h: Remove ptr_ptr_type_node.
17703 * decl.c: Likewise.
17704
17705 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
17706
17707 * decl.c (ptr_ptr_type_node): Define.
17708 (init_decl_processing): Initialize it.
17709 * cp-tree.h: Declare it.
17710 * exception.cc (__cp_exception_info): Use __get_eh_info.
17711 (__cp_push_exception): Likewise.
17712 (__cp_pop_exception): Likewise.
17713
17714 From Scott Snyder <snyder@d0sgif.fnal.gov>:
17715 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
17716 saved_pc.
17717 (init_exception_processing): Removed saved_pc initialization.
17718
17719 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
17720
17721 * pt.c (instantiate_decl): Defer all templates but inline functions.
17722
17723 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
17724
17725 * init.c (expand_vec_init): Don't fold a list of parameters.
17726
17727 * decl.c (copy_args_p): Handle copy elision for types with virtual
17728 bases.
17729 * call.c (build_over_call): Likewise.
17730
17731 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
17732
17733 * pt.c (lookup_template_function): Copy the template arguments,
17734 not just the list containing them, to the permanent obstack.
17735
17736 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
17737
17738 * except.c (expand_start_catch_block): suspend_momentary for the
17739 terminate handler.
17740
17741 * error.c (dump_decl): Handle LOOKUP_EXPR.
17742
17743 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
17744
17745 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
17746 permanent obstack if we are processing a template decl.
17747 * typeck.c (build_static_cast): Likewise.
17748 (build_const_cast): Likewise.
17749 (build_reinterpret_cast): Likewise.
17750
17751 * pt.c (coerce_template_parms): Coerce some expressions, even
17752 when processing_template_decl.
17753
17754 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
17755
17756 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
17757 handling of pointer difference expressions.
17758
17759 * typeck.c (comp_target_types): Comparison of function/method types
17760 is independent of nptrs.
17761
17762 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
17763
17764 * pt.c (tsubst): Avoid creating pointer to reference and
17765 reference to reference types.
17766
17767 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
17768
17769 * parse.y (do_id): New nonterminal.
17770 (template_id): Use it.
17771
17772 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
17773
17774 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
17775 * spew.c (yylex): Don't do_identifier here.
17776 * decl2.c (build_expr_from_tree): Revert last change.
17777
17778 * decl2.c (build_expr_from_tree): Expand the name for a method call.
17779 * parse.y (object_template_id): Don't try to take the DECL_NAME.
17780
17781 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
17782
17783 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
17784 alloc_expr.
17785 * call.c (build_op_delete_call): Adjust.
17786
17787 * except.c (expand_end_catch_block): Lose rethrow region.
17788 (expand_start_catch_block): Likewise.
17789 (expand_end_catch_block): Don't expand_leftover_cleanups.
17790
17791 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
17792
17793 * pt.c (tsubst): Remove tree_cons call (places redundant info into
17794 DECL_TEMPLATE_INSTANTIATION).
17795
17796 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
17797
17798 * tree.c (is_overloaded_fn): Handle getting a fn template.
17799 (really_overloaded_fn): Likewise.
17800 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
17801 * pt.c (check_explicit_specialization): Tweak.
17802 (determine_explicit_specialization): Tweak.
17803
17804 * tree.c, cp-tree.h (get_target_expr): New fn.
17805
17806 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
17807
17808 * pt.c (check_explicit_specialization): Fix misspelling in
17809 diagnostic: `preceeded'.
17810 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
17811 `conversiona'.
17812
17813 1997-12-02 Mark Mitchell <mmitchell@usa.net>
17814
17815 * pt.c (determine_explicit_specialization): Avoid an internal
17816 error for bad specializations.
17817
17818 * method.c (build_overload_value): Handle SCOPE_REF.
17819
17820 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
17821
17822 * class.c (prepare_fresh_vtable): Enable even more complex MI
17823 vtable names.
17824
17825 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
17826
17827 * exception.cc (__check_eh_spec): Optimize a bit.
17828
17829 * exception.cc (__cp_pop_exception): Lose handler arg.
17830 * except.c (do_pop_exception): Likewise.
17831 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
17832 (expand_end_catch_block): Likewise.
17833
17834 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
17835
17836 * pt.c (check_explicit_specialization): Complain about using a
17837 template-id for a non-specialization.
17838
17839 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
17840
17841 * repo.c: Prototype rindex only if needed.
17842 * xref.c: Likewise.
17843
17844 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
17845
17846 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
17847
17848 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
17849
17850 * typeck.c (build_const_cast): Handle references here instead of
17851 handing off to convert_to_reference.
17852
17853 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
17854 TerminateFunctionCall.
17855 (init_exception_processing): Likewise. Terminate et al are now
17856 the fns, not ADDR_EXPRs.
17857 (various): Lose redundant assemble_external calls.
17858 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
17859
17860 * cp-tree.h (struct lang_decl_flags): Add comdat.
17861 (DECL_COMDAT): New macro.
17862 * decl.c (duplicate_decls): Propagate it.
17863 (cp_finish_decl): Handle it.
17864 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
17865
17866 * class.c: Remove static pending_hard_virtuals.
17867 (add_virtual_function): Take pointers to pending_virtuals
17868 and pending_hard_virtuals.
17869 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
17870
17871 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
17872
17873 * decl2.c (import_export_vtable): If we support one_only but not
17874 weak symbols, mark instantiated template vtables one_only.
17875 (import_export_decl): Likewise for tinfo functions.
17876 (finish_vtable_vardecl): Also write out vtables from explicitly
17877 instantiated template classes.
17878 * pt.c (mark_class_instantiated): Revert last change.
17879
17880 * except.c (expand_throw): Call mark_used on the destructor.
17881
17882 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
17883
17884 * lex.c (lang_init): Enable flag_exceptions by default if no
17885 command line switch was specified.
17886
17887 1997-11-26 Mark Mitchell <mmitchell@usa.net>
17888
17889 * pt.c (unify): Handle `void' template parameters in
17890 specializations.
17891
17892 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
17893
17894 * rtti.c (build_dynamic_cast): Handle template case here.
17895 (build_dynamic_cast_1): Not here.
17896
17897 * typeck2.c (digest_init): Make copies where appropriate.
17898
17899 * decl2.c (delete_sanity): resolve_offset_ref.
17900
17901 * except.c: Call terminate without caching so many bits.
17902
17903 * except.c (expand_start_catch_block): Fix catching a reference
17904 to pointer.
17905
17906 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
17907
17908 * init.c (build_new): Copy size to the saveable obstack.
17909
17910 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
17911 TRY_CATCH_EXPR for now.
17912
17913 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
17914
17915 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
17916 has DECL_LANG_SPECIFIC.
17917
17918 * exception.cc (struct cp_eh_info): Add handlers field.
17919 (__cp_push_exception): Initialize it.
17920 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
17921 (__throw_bad_exception): Remove.
17922 * except.c (call_eh_info): Add handlers field.
17923 (get_eh_handlers): New fn.
17924 (push_eh_cleanup): Increment handlers.
17925
17926 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
17927
17928 * except.c (expand_start_eh_spec): Use the try/catch code.
17929 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
17930 doing everything inline.
17931 (init_exception_processing): throw_type_match now takes
17932 const void pointers.
17933 * exception.cc (__check_eh_spec): New fn.
17934 * inc/exception: Neither terminate nor unexpected return.
17935 * decl.c: Make const_ptr_type_node public.
17936 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
17937
17938 * except.c (expand_start_catch_block): We only need the rethrow
17939 region for non-sjlj exceptions.
17940 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
17941
17942 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
17943
17944 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
17945 (various.o): Likewise.
17946 * inc/new: Add placement deletes. Add throw specs for default new.
17947 * new.cc (set_new_handler): Move here from libgcc2.
17948 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
17949 (new): Move from libgcc2. Throw bad_alloc.
17950 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
17951 * decl.c (init_decl_processing): Update exception specs on new and
17952 delete.
17953
17954 * method.c (build_decl_overload_real): Don't mess with global
17955 placement delete.
17956
17957 * init.c (build_new): Check for null throw spec, not nothrow_t.
17958
17959 * decl.c (duplicate_decls): Don't complain about different exceptions
17960 from an internal declaration.
17961
17962 * call.c (build_op_delete_call): Fix check for member fns again.
17963
17964 * decl2.c (import_export_decl): Interface hackery affects
17965 virtual synthesized methods.
17966
17967 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
17968
17969 * decl.c (start_decl): Don't just complain about a mismatched
17970 scope, fix it.
17971
17972 * decl.c (make_implicit_typename): Handle case where t is not
17973 actually from context.
17974 * tree.c (get_type_decl): Lose identifier case.
17975 * spew.c (yylex): Lose useless call to identifier_typedecl_value.
17976 * parse.y (nonnested_type): Just use lookup_name.
17977 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
17978
17979 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
17980
17981 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
17982 T was built in C language context (for example, by
17983 output_func_start_profiler).
17984
17985 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
17986
17987 * decl.c (make_implicit_typename): New fn.
17988 (lookup_name_real): Use it. Use current_class_type as the context.
17989
17990 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
17991
17992 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
17993
17994 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
17995
17996 * friend.c (do_friend): Warn about non-template friends in templates.
17997
17998 * call.c (build_op_delete_call): Fix handling of inherited delete.
17999
18000 * search.c (dfs_record_inheritance): Ignore template type parms.
18001
18002 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
18003
18004 * call.c (build_new_op): Fix copy error.
18005 (build_op_new_call): New fn.
18006 (build_op_delete_call): New fn.
18007 * cp-tree.h: Declare them.
18008 * init.c (build_new): Use them. Support placement delete.
18009 (build_x_delete): Use build_op_delete_call.
18010 (build_delete): Likewise.
18011 * decl2.c (delete_sanity): Likewise.
18012 (coerce_delete_type): Don't complain about placement delete.
18013
18014 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
18015
18016 * call.c (build_new_function_call): Remove unused 'obj' parm.
18017 * cp-tree.h, typeck.c: Adjust.
18018
18019 * init.c (build_new): Make the cleanup last longer.
18020 (expand_vec_init): Call do_pending_stack_adjust.
18021
18022 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
18023
18024 * pt.c (do_type_instantiation): Fix typo.
18025 (mark_class_instantiated): If we support one_only but not weak
18026 symbols, don't mark this as known.
18027
18028 * init.c (build_new): Handle vec delete in EH cleanup.
18029
18030 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
18031
18032 * call.c (build_method_call): Call complete_type before checking
18033 for destructor.
18034
18035 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
18036
18037 * decl.c (add_block_current_level): Delete.
18038 * init.c (build_vec_delete_1): Delete build_block and
18039 add_block_current_level calls.
18040
18041 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
18042
18043 * init.c (build_new): Handle freeing allocated memory when the
18044 constructor throws.
18045
18046 * call.c (build_new_method_call): Fix flags arg.
18047
18048 * pt.c (do_type_instantiation): Don't try to instantiate
18049 member templates.
18050 (mark_decl_instantiated): If we support one_only but not
18051 weak symbols, mark this one_only.
18052 * decl2.c (import_export_vtable): Don't defer handling of vtables
18053 if MULTIPLE_SYMBOL_SPACES.
18054
18055 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
18056
18057 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
18058
18059 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
18060
18061 * except.c (do_pop_exception): Return a value.
18062
18063 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
18064
18065 * call.c (build_new_method_call): Handle getting a
18066 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
18067 if we got template parms.
18068 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
18069 not just the args.
18070 * decl2.c (build_expr_from_tree): Tweak last change.
18071 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
18072 (maybe_fold_nontype_arg): Split out from tsubst_copy.
18073 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
18074
18075 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
18076
18077 * pt.c (tsubst_copy): Handle explicit template arguments in
18078 function calls.
18079 * typeck.c (build_x_function_call): Likewise.
18080 * decl2.c (build_expr_from_tree): Lookup function name if it
18081 hasn't been done.
18082
18083 * pt.c (tsubst): Instantiate template functions properly when
18084 template parameter does not appear in function arguments and return
18085 type.
18086 (comp_template_args): Handle member templates required by tsubst.
18087
18088 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
18089
18090 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
18091 previous change.
18092
18093 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
18094
18095 * pt.c (coerce_template_parms): Tweak error message.
18096
18097 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
18098 return type defaults to `int', even if there are storage-class
18099 specifiers.
18100
18101 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
18102
18103 Complete nested exception support.
18104 * except.c (do_pop_exception): Split out...
18105 (push_eh_cleanup): From here. Handle the EH region by hand.
18106 (expand_start_catch_block): Add a new level for the catch parm.
18107 Move the rethrow region outside the two cleanup regions.
18108 Protect the initializer for the catch parm with terminate.
18109 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
18110 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
18111 popping off the middle of the stack.
18112 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
18113 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
18114 (build_cplus_new): Only wrap CALL_EXPRs.
18115 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
18116 the constructor call.
18117
18118 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18119
18120 * Make-lang.in (c++.distdir): Make inc subdirectory.
18121
18122 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
18123
18124 * decl2.c (finish_file): Put back some code.
18125
18126 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
18127
18128 * decl2.c (finish_file): Remove redundant code.
18129 * method.c (emit_thunk): Don't let the backend defer generic thunks.
18130
18131 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
18132
18133 * except.c (call_eh_info): Split out...
18134 (push_eh_info): From here.
18135 (expand_builtin_throw): Use it.
18136 (expand_start_catch_block): Move region start back.
18137
18138 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
18139
18140 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
18141 (real_yylex): Record wide strings using target endianness, not host.
18142
18143 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
18144
18145 * repo.c (rindex): Add decl unconditionally.
18146 (get_base_filename, open_repo_file): Don't cast rindex.
18147 * xref.c (rindex): Add decl unconditionally.
18148 (index): Remove unused decl.
18149 (open_xref_file): Don't cast rindex.
18150
18151 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
18152
18153 * class.c (build_vbase_path): Propagate the result type properly.
18154
18155 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
18156
18157 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
18158 remaining use of saved_throw_type with a call to get_eh_type.
18159
18160 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
18161
18162 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
18163 (file_name_nondirectory): New function, doing the same as the macro.
18164 (set_typedecl_interface_info): Use it instead of the macro.
18165 (check_newline): Likewise.
18166 (handle_cp_pragma): Likewise.
18167
18168 * repo.c (get_base_filename): Cast result of rindex to char*.
18169 (open_repo_file): Likewise.
18170 * xref.c (open_xref_file): Likewise.
18171 * error.c (dump_char): Make its arg int, not char.
18172
18173 * except.c (push_eh_info): Pass the number of fields - 1 down, not
18174 the exact number of fields.
18175
18176 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
18177
18178 Support for nested exceptions.
18179 * tinfo2.cc (__is_pointer): New fn.
18180 * exception.cc (struct cp_eh_info): Define.
18181 (__cp_exception_info, __uncatch_exception): New fns.
18182 (__cp_push_exception, __cp_pop_exception): New fns.
18183 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
18184 Lose empty_fndecl.
18185 (init_exception_processing): Likewise. __eh_pc is now external.
18186 (push_eh_info): New fn.
18187 (get_eh_{info,value,type,caught}): New fns.
18188 (push_eh_cleanup): Just call __cp_pop_exception.
18189 (expand_start_catch_block): Use push_eh_info. Start the eh region
18190 sooner.
18191 (expand_end_eh_spec): Use push_eh_info.
18192 (expand_throw): Call __cp_push_exception to set up the exception info.
18193 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
18194 when we rethrow.
18195 (expand_builtin_throw): Don't refer to empty_fndecl.
18196
18197 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
18198
18199 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
18200
18201 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
18202
18203 * method.c (build_template_parm_names, build_decl_overload_real):
18204 Add static to definitions.
18205 * pt.c (add_to_template_args, note_template_header,
18206 processing_explicit_specialization, type_unification_real): Likewise.
18207 ({determine,check}_explicit_specialization): Use a single string for
18208 error messages.
18209
18210 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
18211
18212 * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
18213 (expand_end_catch_block): Likewise.
18214 (expand_end_eh_spec): Likewise.
18215
18216 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
18217
18218 * decl.c (duplicate_decls): Handle template specializations
18219 correctly.
18220 * error.c (dump_function_name): Fix printing of specializations of
18221 member functions that are not member templates.
18222 * cp-tree.h (processing_specialization): Make global.
18223 * pt.c (processing_specialization): Likewise.
18224 * lex.c (cons_up_default_function): Save and restore
18225 processing_specialization to avoid confusion.
18226
18227 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
18228
18229 * decl.c (init_decl_processing): Give null_node unknown* type.
18230 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
18231 (common_type): Likewise.
18232 * error.c (args_as_string): Recognize null_node.
18233
18234 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18235
18236 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
18237 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
18238
18239 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
18240
18241 * Make-lang.in (g++): Include prefix.o.
18242
18243 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
18244
18245 * pt.c (determine_explicit_specialization): Initialize "dummy"
18246 to keep Purify quiet.
18247
18248 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
18249
18250 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
18251 (build_overload_int): Not here.
18252
18253 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
18254
18255 * class.c (build_type_pathname): Remove.
18256 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
18257
18258 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
18259
18260 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
18261 &&label GNU extension.
18262
18263 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
18264
18265 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
18266 so as to avoid incorrect manglings.
18267 * method.c (build_decl_overload_real): Don't mangle return types
18268 for constructors.
18269
18270 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
18271
18272 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
18273 scratch_tree_cons): Define as macros for now.
18274 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
18275 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
18276 typeck2.c: Use them and the expression_obstack variants.
18277
18278 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
18279
18280 * decl.c (store_return_init): Allow classes with explicit ctors to
18281 be used with the named return values extension.
18282
18283 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
18284
18285 * pt.c (instantiate_decl): Fix previous change.
18286
18287 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
18288
18289 * pt.c (tsubst): Fix thinko.
18290 (instantiate_decl): Really use the original template.
18291
18292 * call.c (build_new_method_call): Use simple constructor_name for
18293 error messages.
18294
18295 Wed Oct 8 22:44:42 1997 Jeffrey A Law <law@cygnus.com>
18296
18297 * method.c (build_underscore_int): Don't use ANSI specific
18298 features.
18299
18300 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
18301
18302 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
18303 for our key method; it might have been inlined by -O3.
18304
18305 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
18306
18307 * decl.c (make_typename_type): Do not try to call lookup_field for
18308 non-aggregate types.
18309
18310 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
18311
18312 * typeck.c (build_reinterpret_cast): Tweak.
18313
18314 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
18315
18316 * typeck.c (build_reinterpret_cast): Converting a void pointer
18317 to function pointer with a reinterpret_cast produces a warning
18318 if -pedantic is issued.
18319
18320 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
18321
18322 * typeck.c (c_expand_return): Don't warn about returning a
18323 reference-type variable as a reference.
18324
18325 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
18326
18327 * method.c (build_static_name): Fix typo.
18328
18329 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
18330
18331 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
18332 OLDDECL before we try to do DECL_USE_TEMPLATE.
18333
18334 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
18335
18336 * decl.c (duplicate_decls): Don't warn about template instances.
18337
18338 * typeck.c (mark_addressable): Lose ancient code that unsets
18339 DECL_EXTERNAL.
18340
18341 * pt.c (do_decl_instantiation): Lose support for instantiating
18342 non-templates.
18343
18344 * call.c (build_new_function_call): Fix handling of null explicit
18345 template args.
18346 (build_new_method_call): Likewise.
18347
18348 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
18349
18350 * method.c (build_underscore_int): Fix typo.
18351
18352 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
18353
18354 * tree.c (print_lang_statistics): #if 0 call to
18355 print_inline_obstack_statistics until its definition is checked in.
18356
18357 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
18358
18359 * decl2.c (finish_file): Move dump_tree_statistics to end.
18360
18361 * pt.c (instantiate_decl): Look for the original template.
18362 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
18363 of member templates.
18364
18365 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
18366
18367 * Makefile.in (g++FAQ.*): New rules.
18368 (CONFLICTS): Update.
18369 * g++FAQ.texi: Moved from libg++.
18370
18371 * parse.y (PFUNCNAME): Only specify the type once.
18372
18373 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
18374
18375 * lex.c (real_yylex): Clean up the code to fully behave the way
18376 the c-lex.c parser does for complex and real numbers.
18377
18378 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
18379
18380 * method.c (build_decl_overload_real): Reformat.
18381
18382 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
18383
18384 * method.c (synthesize_method): If at_eof, determine our linkage.
18385
18386 1997-09-29 Paul Eggert <eggert@twinsun.com>
18387
18388 * lex.c (real_yylex): Treat `$' just like `_', except issue a
18389 diagnostic if !dollars_in_ident or if pedantic.
18390
18391 * lang-specs.h (@c++): -ansi no longer implies -$.
18392
18393 * decl2.c (lang_decode_option):
18394 -traditional and -ansi now do not mess with
18395 dollars_in_ident.
18396
18397 Mon Sep 29 19:57:51 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
18398
18399 * Makefile.in (parse.o, decl.o): Also depend on
18400 $(srcdir)/../except.h $(srcdir)/../output.h.
18401 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
18402 $(srcdir)/../except.h $(srcdir)/../output.h.
18403 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
18404 ../insn-codes.h.
18405
18406 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
18407
18408 * expr.c (cplus_expand_expr): Make it static.
18409
18410 * decl2.c, init.c, typeck.c: Include "expr.h".
18411 (expand_expr): Use proper values when calling the function.
18412
18413 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
18414
18415 * lang-options.h: New -Wold-style-cast flag.
18416 * cp-tree.h (warn_old_style_cast): New variable.
18417 * decl2.c (warn_old_style_cast): Likewise.
18418 (lang_decode_option): Support -Wold-style-cast.
18419 (reparse_absdcl_as_casts): Produce old-style-cast warning.
18420
18421 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
18422
18423 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
18424 TREE_USED, reset value based on already_used.
18425
18426 * init.c (expand_member_init): Revert change.
18427
18428 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
18429
18430 * cp-tree.h, decl.c, decl2.c, pt.c:
18431 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
18432
18433 * decl2.c (lang_decode_option): Add missing ;.
18434
18435 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
18436
18437 * friend.c (do_friend): Disable injection for all template-derived
18438 decls.
18439 * decl2.c (lang_decode_option): Handle -fguiding-decls.
18440 * parse.y (notype_template_declarator): New nonterminal.
18441 (direct_notype_declarator): Use it.
18442 (complex_direct_notype_declarator): Likewise.
18443 (object_template_id): Accept any kind of identifier after TEMPLATE.
18444 (notype_qualified_id): Don't add template declarators here.
18445
18446 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
18447
18448 * call.c (add_template_candidate): Add explicit_targs parameter.
18449 (build_scoped_method_call): Use it.
18450 (build_overload_call_real): Likewise.
18451 (build_user_type_conversion_1): Likewise.
18452 (build_new_function_call): Likewise.
18453 (build_object_call): Likewise.
18454 (build_new_op): Likewise.
18455 (build_new_method_call): Likewise.
18456 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
18457 (build_new_method_call): Likewise.
18458
18459 * class.c (finish_struct_methods): Add specialization pass to
18460 determine which methods were specializing which other methods.
18461 (instantiate_type): Handle TEMPLATE_ID_EXPR.
18462
18463 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
18464
18465 * cp-tree.h (name_mangling_version): New variable.
18466 (flag_guiding_decls): Likewise.
18467 (build_template_decl_overload): New function.
18468 (begin_specialization): Likewise.
18469 (reset_specialization): Likewise.
18470 (end_specialization): Likewise.
18471 (determine_explicit_specialization): Likewise.
18472 (check_explicit_specialization): Likewise.
18473 (lookup_template_function): Likewise.
18474 (fn_type_unification): Add explicit_targs parameter.
18475 (type_unification): Likewise.
18476
18477 * decl.c (duplicate_decls): Add smarts for explicit
18478 specializations.
18479 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
18480 specializations.
18481 (grokfndecl): Call check_explicit_specialization.
18482
18483 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
18484 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
18485 (check_classfn): Handle specializations.
18486
18487 * error.c (dump_function_name): Print specialization arguments.
18488
18489 * friend.c (do_friend): Don't call pushdecl for template
18490 instantiations.
18491
18492 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
18493
18494 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
18495 and -fno-guiding-decls.
18496
18497 * lex.c (identifier_type): Return PFUNCNAME for template function
18498 names.
18499
18500 * method.c (build_decl_overload_real): New function.
18501 (build_template_parm_names): New function.
18502 (build_overload_identifier): Use it.
18503 (build_underscore_int): New function.
18504 (build_overload_int): Use it. Add levels for template
18505 parameters.
18506 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
18507 (build_overload_nested_names): Handle template type parameters.
18508 (build_template_decl_overload): New function.
18509
18510 * parse.y (YYSTYPE): New ntype member.
18511 (nested_name_specifier): Use it.
18512 (nested_name_specifier_1): Likewise.
18513 (PFUNCNAME): New token.
18514 (template_id, object_template_id): New non-terminals.
18515 (template_parm_list): Note specializations.
18516 (template_def): Likewise.
18517 (structsp): Likewise.
18518 (fn.def2): Handle member template specializations.
18519 (component_decl_1): Likewise.
18520 (direct_notype_declarator): Handle template-ids.
18521 (component_decl_1): Likewise.
18522 (direct_notype_declarator): Handle template-ids.
18523 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
18524
18525 * pt.c (processing_specializations): New variable.
18526 (template_header_count): Likewise.
18527 (type_unification_real): New function.
18528 (processing_explicit_specialization): Likewise.
18529 (note_template_header): Likewise.
18530 (is_member_template): Handle specializations.
18531 (end_template_decl): Call reset_specialization.
18532 (push_template_decl): Handle member template specializations.
18533 (tsubst): Likewise.
18534 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
18535 (instantiate_template): Handle specializations.
18536 (instantiate_decl): Likewise.
18537 (fn_type_unification): Handle explicit_targs.
18538 (type_unification): Likewise. Allow incomplete unification
18539 without an error message, if allow_incomplete.
18540 (get_bindings): Use new calling sequence for fn_type_unification.
18541
18542 * spew.c (yylex): Handle PFUNCNAME.
18543
18544 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
18545 (really_overloaded_fn): Likewise.
18546 (get_first_fn): Handle function templates.
18547
18548 * typeck.c (build_x_function_call): Use really_overloaded_fn.
18549 Handle TEMPLATE_ID_EXPR.
18550 (build_x_unary_op): Likewise.
18551 (build_unary_op): Likewise.
18552 (mark_addressable): Templates whose address is taken are marked
18553 as used.
18554
18555 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
18556
18557 * decl.c (init_decl_processing): Declare __builtin_constant_p as
18558 accepting any kind of type, not only int.
18559
18560 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
18561
18562 * search.c (get_matching_virtual): Notice virtual bases when sorrying
18563 about covariant returns.
18564
18565 * parse.y (member_init): Also imply typename here. Remove ancient
18566 extension for initializing base members.
18567
18568 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
18569
18570 Handle multi-level typenames and implicit typename in base list.
18571 * parse.y (typename_sub{,[0-2]}): New rules.
18572 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
18573 (nonnested_type): New rule.
18574 (complete_type_name): Use it.
18575 (base_class.1): Use typename_sub and nonnested_type.
18576 (nested_name_specifier): Don't elide std:: here.
18577 * decl.c (make_typename_type): Handle getting a type for NAME.
18578 (lookup_name_real): Turn std:: into :: here.
18579
18580 Rvalue conversions were removed in London.
18581 * call.c (is_subseq): Don't consider lvalue transformations.
18582 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
18583 (joust): Re-enable ?: kludge.
18584
18585 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
18586
18587 * decl.c (start_function): Up warning of no return type to be a
18588 pedwarn.
18589
18590 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
18591
18592 * init.c (expand_member_init): Don't set TREE_USED.
18593 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
18594 set,don't clear TREE_USED wholesale.
18595
18596 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
18597
18598 * call.c (build_over_call): Do require_complete_type before
18599 build_cplus_new.
18600
18601 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
18602
18603 * search.c (lookup_field): Call complete_type in all cases.
18604
18605 * decl.c (finish_function): Just warn about flowing off the end.
18606
18607 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
18608
18609 * decl.c (grokparms): Don't bash a permanent list node if we're
18610 in a function.
18611
18612 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
18613
18614 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
18615
18616 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
18617
18618 * call.c (build_new_op): Give better error for syntactically
18619 correct, but semantically invalid, use of undeclared template.
18620
18621 * call.c (compare_qual): Handle pmfs.
18622
18623 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
18624 after the exception spec.
18625
18626 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
18627
18628 * call.c (null_ptr_cst_p): Integer type, not integral type.
18629
18630 * call.c (joust): Disable warnings until they can be moved to the
18631 right place.
18632
18633 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
18634
18635 * Makefile.in, config-lang.in: Convert to autoconf.
18636
18637 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
18638
18639 * decl.c (lookup_name_real): Add implicit 'typename' to types from
18640 base classes.
18641
18642 * pt.c (most_specialized_class): Fix typo.
18643 (tsubst): Move constant folding to TREE_VEC case.
18644
18645 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
18646
18647 * pt.c (do_poplevel): Don't warn about unused local variables
18648 while processing_template_decl since we don't always know whether
18649 or not they will need constructing/destructing.
18650
18651 * pt.c (uses_template_parms): Check the values of an enumeration
18652 type to make sure they don't depend on template parms.
18653
18654 * decl.c (make_typename_type): Don't lookup the field if the
18655 context uses template parms, even if we're not
18656 processing_template_decl at the moment.
18657
18658 * pt.c (coerce_template_parms): Avoid looking at the
18659 TYPE_LANG_DECL portion of a typename type, since there won't be
18660 one.
18661 (tsubst): Do constant folding as necessary to make sure that
18662 arguments passed to lookup_template_class really are constants.
18663
18664 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
18665
18666 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
18667 * decl2.c (finish_file): Only register exception tables if we
18668 need to.
18669
18670 * decl.c (init_decl_processing): Add __builtin_[fs]p.
18671
18672 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
18673
18674 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
18675
18676 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
18677
18678 * error.c (dump_decl): Avoid crashing when presented with a
18679 uninitialized constant, as can occur with a template parameter.
18680 (dump_expr): Make sure that there are enough levels of
18681 current_template_parms before we start diving through them.
18682
18683 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
18684
18685 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
18686 c-typeck.c.
18687
18688 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
18689
18690 * except.c (expand_throw): Call build_delete for all
18691 exception types, not just objects with destructors.
18692
18693 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
18694
18695 * decl.c (current_local_enum): Remove static.
18696 * pt.c (tsubst_enum): Save and restore value of current_local_enum
18697 in case template is expanded in enum decl.
18698 (instantiate_class_template): Use new tsubst_enum signature.
18699 (tsubst_expr): Likewise.
18700
18701 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
18702
18703 * pt.c (begin_member_template_processing): Take a function as
18704 argument, not a set of template arguments. Use the template
18705 parameters, rather than the arguments. Handle non-type parameters
18706 correctly. Push a binding level for the parameters so that multiple
18707 member templates using the same parameter names can be declared.
18708 (end_member_template_processing): Pop the binding level.
18709 (push_template_decl): Mark member templates as static when
18710 appropriate.
18711
18712 * lex.c (do_pending_inlines): Pass the function, not its template
18713 arguments, to begin_member_template_processing.
18714 (process_next_inline): Likewise.
18715 (do_pending_defargs): Likewise.
18716
18717 * error.c (dump_expr): Obtain the correct declaration for a
18718 TEMPLATE_CONST_PARM.
18719
18720 * call.c (add_template_conv_candidate): New function.
18721 (build_object_call): Handle member templates, as done in the other
18722 build_ functions.
18723
18724 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
18725
18726 * decl.c (replace_defag): Undo previous change.
18727 * lex.c (do_pending_defargs): Deal with member templates.
18728
18729 * pt.c (is_member_template): Avoid crashing when passed a
18730 non-function argument.
18731
18732 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
18733
18734 * class.c (grow_method): Remove check for redeclaration.
18735
18736 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
18737
18738 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
18739 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
18740 (PRIMARY_TEMPLATE_P): Use it.
18741 * call.c (build_overload_call_real): Use it.
18742 * class.c (instantiate_type): Likewise.
18743 * decl.c (decls_match): Likewise.
18744 * method.c (build_overload_identifier): Likewise.
18745 * pt.c (push_template_decl): Likewise.
18746 (classtype_mangled_name): Likewise.
18747 (lookup_template_class): Likewise.
18748
18749 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
18750 DECL_NTPARMS to conform to usage elsewhere.
18751 * call.c (add_template_candidate): Likewise.
18752 * class.c (instantiate_type): Likewise.
18753 * pt.c (instantiate_template): Likewise.
18754 (get_bindings): Likewise.
18755
18756 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
18757 is_member_template.
18758
18759 * pt.c (unify): Undo changes to allow multiple levels of template
18760 parameters.
18761 (type_unification): Likewise.
18762 (fn_type_unification): Likewise.
18763 (get_class_bindings): Likewise.
18764 * cp-tree.h (Likewise).
18765
18766 * decl.c (replace_defarg): Check that the type of the default
18767 parameter does not invlove a template type before complaining
18768 about the initialization.
18769
18770 * error.c (dump_expr): Deal with template constant parameters in
18771 member templates correctly.
18772
18773 * pt.c (is_member_template): Deal with class specializations
18774 correctly.
18775 (tsubst): Handle "partial instantiation" of member templates
18776 correctly.
18777
18778 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
18779
18780 * pt.c (type_unification): Change calling sequence to allow for
18781 multiple levels of template parameters.
18782 (tsubst_expr): Likewise.
18783 (tsubst): Likewise.
18784 (tsubst_copy): Likewise.
18785 (instantiate_template): Likewise.
18786 (unify): Likewise.
18787 * call.c (build_overload_call_real): Use it.
18788 (add_builtin_candidate): Use it.
18789 (build_new_method_call): Use it.
18790 * class.c (instantiate_type): Use it.
18791 * decl.c (grokdeclarator): Use it.
18792 * decl2.c (finish_file): Use it.
18793 * method.c (build_overload_identifier): Use it.
18794
18795 * call.c (add_template_candidate): Add additional parameter for
18796 the function return type. Call fn_type_unification istead of
18797 type_unification.
18798 (build_user_type_conversion_1): Handle member templates.
18799 (build_new_function_call): Likewise.
18800 (build_new_op): Likewise.
18801 (build_new_method_call): Likewise.
18802
18803 * class.c (grow_method): Don't give an error message indicating
18804 that two member templates with the same name are ambiguous.
18805 (finish_struct): Treat member template functions just like member
18806 functions.
18807
18808 * cp-tree.h (check_member_template): Add declaration.
18809 (begin_member_template_processing): Likewise.
18810 (end_member_template_processing): Likewise.
18811 (fn_type_unification): Likewise.
18812 (is_member_template): Likewise.
18813 (tsubst): Change prototype.
18814 (tsubst_expr): Likewise.
18815 (tsubst_copy): Likewise.
18816 (instantiate_template): Likewise.
18817 (get_bindings): Likewise.
18818
18819 * decl.c (decls_match): Handle multiple levels of template
18820 parameters.
18821 (pushdecl): Handle template type params just like other type
18822 declarations.
18823 (push_class_level_binding): Return immediately if the
18824 class_binding_level is NULL.
18825 (grokfndecl): If check_classfn() returns a member_template, use
18826 the result of the template, not the template itself.
18827
18828 * decl2.c (check_member_template): New function. Check to see
18829 that the entity declared to be a member template can be one.
18830 (check_classfn): Allow redeclaration of member template functions
18831 with different types; the new functions can be specializations or
18832 explicit instantiations.
18833
18834 * error.c (dump_decl): Handle multiple levels of template
18835 parameters.
18836 (dump_function_decl): Update to handle function templates.
18837
18838 * lex.c (do_pending_inlines): Set up template parameter context
18839 for member templates.
18840 (process_next_inline): Likewise.
18841
18842 * method.c (build_overload_identifier): Adjust for multiple levels
18843 of template parameters.
18844
18845 * parse.y (fn.def2): Add member templates.
18846 (component_decl_1): Likewise.
18847
18848 * pt.c (begin_member_template_processing): New function.
18849 (end_member_template_processing): Likewise.
18850 (is_member_template): Likewise.
18851 (fn_type_unification): Likewise.
18852 (current_template_parms): Return a vector of all the template
18853 parms, not just the innermost level of parms.
18854 (push_template_decl): Deal with the possibility of member
18855 templates.
18856 (lookup_template_class): Likewise.
18857 (uses_template_parms): Likewise.
18858 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
18859 TEMPLATE_CONST_PARM to deal with multiple levels of template
18860 arguments. Add processing of TEMPLATE_DECL to produce new
18861 TEMPLATE_DECLs from old ones.
18862 (do_decl_instantiation): Handle member templates.
18863
18864 * search.c (lookup_fnfields_1): Handle member template conversion
18865 operators.
18866
18867 * tree.c (cp_tree_equal): Check the levels, as well as the
18868 indices, of TEMPLATE_CONST_PARMs.
18869
18870 * typeck.c (comptypes): Check the levels, as well as the indices,
18871 fo TEMPLATE_TYPE_PARMs.
18872 (build_x_function_call): Treat member templates like member
18873 functions.
18874
18875 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
18876
18877 * typeck.c (c_expand_return): Always convert_for_initialization
18878 before checking for returning a pointer to local.
18879
18880 * pt.c (type_unification): If strict and the function parm doesn't
18881 use template parms, just compare types.
18882
18883 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
18884
18885 * method.c (build_overloaded_value): Replace direct call
18886 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
18887
18888 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
18889
18890 * typeck.c (convert_arguments): Don't arbitrarily choose the first
18891 of a set of overloaded functions.
18892
18893 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
18894
18895 * lex.c (real_yylex): Don't elide __FUNCTION__.
18896
18897 * method.c (build_overload_value): Add in_template parm.
18898 (build_overload_int): Likewise.
18899 (build_overload_identifier): Pass it.
18900
18901 * decl.c (duplicate_decls): Don't bash a previous template
18902 definition with a redeclaration.
18903
18904 * pt.c (unify): float doesn't match double.
18905
18906 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
18907 TYPE_DECL. Handle getting non-template types.
18908 * parse.y (explicit_instantiation): Use typespec instead of
18909 aggr template_type.
18910
18911 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
18912
18913 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
18914
18915 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
18916
18917 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
18918 (compare_ics): Likewise.
18919
18920 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
18921
18922 * call.c (joust): Warn about choosing one conversion op over
18923 another because of 'this' argument when the other return type is
18924 better.
18925 (source_type): New fn.
18926
18927 * call.c (build_new_op): Strip leading REF_BIND from first operand
18928 to builtin operator.
18929
18930 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
18931 use its RTL.
18932
18933 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
18934
18935 * call.c (null_ptr_cst_p): Remove support for (void*)0.
18936
18937 Wed Aug 27 02:03:34 1997 Jeffrey A Law <law@cygnus.com>
18938
18939 * typeck.c (expand_target_expr): Make definition match declaration.
18940
18941 * class.c (get_basefndecls): Make definition match declaration.
18942
18943 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
18944
18945 * input.c (sub_getch): Eventually give up and release the input file.
18946
18947 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
18948 right place.
18949
18950 * call.c (joust): Tweak message.
18951
18952 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
18953
18954 * error.c (type_as_string): Put const/volatile on template type
18955 parameters where appropriate.
18956
18957 Sat Aug 23 17:47:22 1997 Jeffrey A Law <law@cygnus.com>
18958
18959 * call.c (strictly_better): Make arguments unsigned ints.
18960
18961 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
18962
18963 * lex.c (real_yylex): Refer to __complex instead of complex.
18964
18965 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
18966
18967 * lex.c (real_yylex): Don't use getc directly.
18968
18969 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
18970
18971 * call.c (is_subseq): Don't try to be clever.
18972
18973 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
18974
18975 * parse.y, pt.c: Include "except.h".
18976 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
18977 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
18978 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
18979 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
18980 prototyping.
18981
18982 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
18983
18984 * decl2.c (mark_vtable_entries): Instead of replacing pure
18985 virtuals with a reference to __pure_virtual, copy the decl and
18986 change the RTL.
18987
18988 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
18989
18990 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
18991
18992 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
18993
18994 * pt.c (instantiate_class_template): Call repo_template_used
18995 before finish_prevtable_vardecl.
18996
18997 * call.c (is_subseq): New fn.
18998 (compare_ics): Use it.
18999
19000 * repo.c (finish_repo): Don't crash on no args.
19001
19002 * parse.y (named_complex_class_head_sans_basetype): Handle
19003 explicit global scope.
19004 * decl2.c (handle_class_head): New fn.
19005
19006 * pt.c (unify): Add CONST_DECL case.
19007
19008 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19009
19010 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
19011
19012 * cp-tree.h (report_type_mismatch): Add prototype.
19013 * call.c (build_overload_call_real): Remove erroneous fourth
19014 argument to report_type_mismatch.
19015 (build_user_type_conversion_1): Remove erroneous second arg to
19016 tourney.
19017 (build_new_function_call): Likewise.
19018 (build_object_call): Likewise.
19019 (build_new_op): Likewise.
19020 (build_new_method_call): Likewise.
19021
19022 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
19023
19024 * error.c (dump_decl): Don't bother processing a function with no
19025 DECL_LANG_SPECIFIC.
19026
19027 * method.c (emit_thunk): Call init_function_start in the macro case.
19028
19029 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
19030
19031 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
19032 defined and used to set flag_vtable_thunks.
19033
19034 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
19035
19036 * parse.y: Don't clear the inlines from their obstack until they've
19037 all been processed.
19038
19039 * decl.c (duplicate_decls): Don't complain about exception
19040 specification mismatch if flag_exceptions is off.
19041
19042 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
19043
19044 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
19045
19046 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
19047
19048 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
19049 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
19050 Include <stdio.h> before include files that formerly used STDIO_PROTO.
19051
19052 * decl.c, g++spec.c, lex.c, method.c, repo.c:
19053 Include "config.h" first, as per autoconf manual.
19054
19055 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
19056
19057 * decl.c (duplicate_decls): Tweak wording.
19058 * lex.c (do_pending_defargs): Don't die if we see a default arg
19059 that isn't a DEFAULT_ARG.
19060 * error.c (dump_expr): Handle DEFAULT_ARG.
19061
19062 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
19063 * lang-options.h: Add -fhandle-exceptions.
19064
19065 * class.c (build_vtable): Vtables are artificial.
19066 (prepare_fresh_vtable): Likewise.
19067
19068 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
19069
19070 * cvt.c (ocp_convert): After converting to the target type, set
19071 LOOKUP_NO_CONVERSION.
19072
19073 * call.c (joust): Warn about potentially confusing promotion rules
19074 with -Wsign-promo.
19075 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
19076
19077 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
19078
19079 * exception.cc: Declare __terminate_func with noreturn attribute.
19080
19081 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
19082
19083 * parse.y: Break out eat_saved_input, handle errors.
19084 (function_try_block): Use compstmt instead of compstmt_or_error.
19085
19086 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
19087
19088 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
19089
19090 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
19091
19092 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
19093 existence of cc1plus check whether $(LANGUAGES) contains C++.
19094
19095 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
19096
19097 * method.c (do_build_copy_constructor): When copying an anonymous
19098 union member loop around to handle nested anonymous unions. Use
19099 the offset of the member relative to the outer structure, not the
19100 union.
19101
19102 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
19103
19104 * call.c (resolve_args): New fn.
19105 (build_new_function_call): Use it.
19106 (build_object_call): Likewise.
19107 (build_new_method_call): Likewise.
19108
19109 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
19110
19111 * call.c (build_over_call): tsubst all default parms from templates.
19112
19113 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
19114
19115 * decl.c (struct cp_function): Add static_labelno.
19116 (push_cp_function_context): Save it.
19117 (pop_cp_function_context): Restore it.
19118
19119 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
19120
19121 * typeck.c (build_component_ref_1): Convert from reference.
19122
19123 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19124
19125 * parse.y (current_declspecs, prefix_attributes): Initialize to
19126 NULL_TREE.
19127
19128 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
19129 before we try to force it to be a TREE_LIST.
19130 (decl): Make sure $1.t is non-nil.
19131
19132 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
19133
19134 * pt.c (uses_template_parms): Handle template first-parse codes.
19135
19136 * decl.c (cp_finish_decl): Only warn about user-defined statics.
19137
19138 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
19139
19140 * pt.c (unify): Handle BOOLEAN_TYPE.
19141
19142 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
19143 * pt.c (tsubst): Don't set it.
19144 * call.c (build_over_call): Use uses_template_parms.
19145
19146 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
19147
19148 * method.c (build_overload_nested_name): Use static_labelno
19149 instead of var_labelno.
19150 (build_qualified_name): New fn.
19151 (build_overload_name): Split out from here.
19152 (build_static_name): Use build_qualified_name.
19153 * decl.c (cp_finish_decl): Statics in extern inline functions
19154 have comdat linkage.
19155 (start_function): Initialize static_labelno.
19156
19157 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
19158
19159 * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
19160 before "all member functions in class [] are private".
19161
19162 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
19163
19164 * lex.c (do_scoped_id): convert_from_reference.
19165 * init.c (build_offset_ref): Likewise.
19166
19167 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
19168
19169 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
19170
19171 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
19172
19173 * typeck.c (get_member_function_from_ptrfunc): Promote index
19174 before saving it.
19175
19176 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
19177
19178 * tree.c (layout_basetypes): Move non-virtual destructor warning.
19179 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
19180
19181 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
19182
19183 * decl.c (grokdeclarator): Call add_defarg_fn for the function
19184 type, too.
19185 * lex.c (add_defarg_fn): Adjust.
19186 (do_pending_defargs): Adjust. Don't skip the first parm.
19187
19188 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
19189
19190 * decl.c (build_enumerator): Global enumerators are also readonly.
19191
19192 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
19193 (build_dynamic_cast): Call it and convert_from_reference.
19194
19195 * lex.c (add_defarg_fn): New fn.
19196 (snarf_defarg): Don't add to defarg_types.
19197 (do_pending_defargs): Lose defarg_types. All fns we process now
19198 have defargs.
19199 * decl.c (grokfndecl): Call add_defarg_fn.
19200
19201 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
19202 * cp-tree.def: Add DEFAULT_ARG.
19203 * spew.c (yylex): Call snarf_defarg as appropriate.
19204 * parse.y: New tokens DEFARG and DEFARG_MARKER.
19205 (defarg_again, pending_defargs, defarg, defarg1): New rules.
19206 (structsp): Use pending_defargs.
19207 (parms, full_parm): Use defarg.
19208 * lex.c (init_lex): Initialize inline_text_firstobj.
19209 (do_pending_inlines): Never pass the obstack to feed_input.
19210 (process_next_inline): Call end_input instead of restore_pending_input.
19211 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
19212 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
19213 * input.c (end_input): New fn.
19214 (sub_getch): At the end of some fed input, just keep returning EOF
19215 until someone calls end_input.
19216 Remove 'obstack' field from struct input_source.
19217 * decl.c (grokparms): Handle DEFAULT_ARG.
19218 (replace_defarg): New fn.
19219 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
19220
19221 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
19222
19223 * call.c (implicit_conversion): If nothing else works, try binding
19224 an rvalue to a reference.
19225
19226 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
19227
19228 * decl.c (init_decl_processing): Fix Jun 30 patch -- move
19229 ifndef for Cygwin32 to include SIGSEGV.
19230
19231 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
19232
19233 * class.c (finish_struct_1): Only complain about pointers without
19234 copy stuff if there are any constructors.
19235
19236 * rtti.c (build_dynamic_cast): Call complete_type on the types.
19237
19238 * decl.c (grokfndecl): If the function we chose doesn't actually
19239 match, die.
19240
19241 * decl2.c (grokclassfn): Don't specify 'const int' for the
19242 artificial destructor parm.
19243
19244 * pt.c (type_unification): If we are called recursively, nothing
19245 decays.
19246
19247 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
19248
19249 * decl.c (init_decl_processing): Stop trying to catch signals
19250 other than SIGABRT since the Cygwin32 library doesn't support
19251 them correctly yet. This fixes a situation in which g++ causes
19252 a hang on SIGSEGVs and other such signals in our Win32-hosted
19253 tools.
19254
19255 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
19256
19257 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
19258
19259 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
19260
19261 * typeck2.c (store_init_value): Always return the value if our
19262 type needs constructing.
19263
19264 * method.c (hack_identifier): Convert class statics from
19265 reference, too.
19266
19267 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
19268
19269 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
19270
19271 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
19272
19273 * typeck.c (c_expand_return): Make sure we clean up temporaries at
19274 the end of return x;
19275
19276 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19277
19278 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
19279
19280 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
19281
19282 * except.c (expand_builtin_throw): Add support
19283 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
19284
19285 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
19286
19287 * repo.c (extract_string): Null-terminate.
19288
19289 * cp-tree.h (TI_SPEC_INFO): New macro.
19290 (CLASSTYPE_TI_SPEC_INFO): New macro.
19291 * pt.c (push_template_decl): Correctly determine # of template parms
19292 for partial specs.
19293
19294 * call.c (compare_ics): Really fix 'this' conversions.
19295
19296 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
19297 non-template fn.
19298
19299 * pt.c (push_template_decl): Complain about mismatch in # of
19300 template parms between a class template and a member template.
19301
19302 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
19303
19304 * method.c (synthesize_method): You can't call
19305 function_cannot_inline_p after finish_function.
19306 * decl.c (finish_function): Turn on flag_inline_functions and turn
19307 off DECL_INLINE before handing a synthesized method to the
19308 backend.
19309
19310 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
19311
19312 * method.c (synthesize_method): Remove July 30 change to never set
19313 DECL_INLINE if at_eof.
19314
19315 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
19316
19317 * xref.c (GNU_xref_member): Ensure that the node has a
19318 decl_lang_specific part before checking DECL_FRIEND_P.
19319
19320 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
19321
19322 * pt.c (instantiate_class_template): Diagnose non-class types used
19323 as bases.
19324
19325 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
19326
19327 * typeck.c (build_conditional_expr): Use convert_for_initialization
19328 instead of convert_and_check.
19329
19330 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19331
19332 * parse.y (typespec): Don't pedwarn for typeof.
19333
19334 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
19335
19336 * repo.c (finish_repo): Only check changes if we would write a
19337 repo file.
19338
19339 * call.c (compare_ics): Fix handling of 'this' conversions.
19340
19341 * pt.c (do_decl_instantiation): Support static data too. Rename
19342 from do_function_instantiation.
19343 * cp-tree.h: Adjust.
19344 * parse.y: Adjust.
19345
19346 * repo.c (extract_string): New fn.
19347 (get_base_filename): Use it.
19348 (init_repo): Compare old args with current args.
19349
19350 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
19351
19352 * Makefile.in, Make-lang.in: Protect C-ls with a comment
19353 character, idea from Paul Eggert <eggert@twinsun.com>.
19354
19355 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
19356
19357 * typeck.c (c_expand_return): Be more persistent in looking for
19358 returned temps.
19359
19360 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
19361 pointer to reference.
19362
19363 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
19364
19365 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
19366
19367 * init.c (build_member_call, build_offset_ref):
19368 Use do_scoped_id instead of do_identifier.
19369
19370 * cvt.c (convert): Remove bogosity.
19371
19372 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19373
19374 * cvt.c (build_up_reference): Do checks of ARGTYPE and
19375 TARGET_TYPE before trying to use get_binfo.
19376
19377 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
19378
19379 * cvt.c (build_up_reference): Call get_binfo to get access control.
19380
19381 * decl2.c (import_export_decl): If we don't support weaks, leave
19382 statics undefined.
19383
19384 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
19385
19386 * except.c (expand_builtin_throw): Add support for machines that
19387 cannot access globals after throw's epilogue when
19388 -fno-sjlj-exceptions is used.
19389
19390 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
19391
19392 * parse.y: 'std::' becomes '::'.
19393 * lex.c (real_yylex): Remove 'namespace' warning.
19394 * init.c (build_member_call): Ignore 'std::'.
19395 (build_offset_ref): Likewise.
19396 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
19397 (do_toplevel_using_decl): Ignore 'using std::whatever'.
19398 * decl.c (push_namespace): Just sorry.
19399 (pop_namespace): Nop.
19400 (init_decl_processing): Declare std namespace.
19401
19402 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
19403
19404 * search.c (push_class_decls): A name which ambiguously refers to
19405 several instantiations of the same template just refers to the
19406 template.
19407
19408 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
19409
19410 * decl.c (build_enumerator): Fix problem with unsigned long
19411 enumerated values being smashed to ints, causing overflow
19412 when computing next enumerated value (for enum values around
19413 MAX_VAL).
19414
19415 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
19416
19417 * typeck.c (build_component_ref): Only call mark_used on a decl.
19418
19419 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19420
19421 * typeck.c (build_c_cast): Make the check for a ptr to function
19422 more specific before possible default_conversion call.
19423
19424 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
19425
19426 * except.c (expand_exception_blocks): Simplify and fix and make
19427 sure we don't end a region in a sequence, as expand_end_bindings
19428 doesn't like it.
19429
19430 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
19431
19432 * except.c (init_exception_processing): Mark terminate as not
19433 returning so that the optimizer can optimize better.
19434
19435 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
19436
19437 * cvt.c (convert): Don't do any extra work, if we can avoid it
19438 easily.
19439
19440 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
19441
19442 * *.[chy]: Change cp_convert to ocp_convert, change convert to
19443 cp_convert. convert is now reserved for the backend, and doesn't
19444 have the semantics a frontend person should ever want.
19445
19446 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
19447
19448 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
19449 Lose -traditional support.
19450
19451 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
19452
19453 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
19454
19455 * parse.y (self_reference): Do it for templates, too.
19456 * class.c (pushclass): Don't overload_template_name; the alias
19457 generated by build_self_reference serves the same purpose.
19458
19459 * tree.c (list_hash): Make static, take more args.
19460 (list_hash_lookup): Likewise.
19461 (list_hash_add): Make static.
19462 (list_hash_canon): Lose.
19463 (hash_tree_cons): Only build a new node if one isn't already in the
19464 hashtable.
19465 (hash_tree_chain): Use hash_tree_cons.
19466 * cp-tree.h: Adjust.
19467 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
19468 of calling lookup_name.
19469
19470 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
19471
19472 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
19473 doesn't refer to the CONST_DECLs.
19474
19475 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
19476
19477 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
19478 is bigger.
19479 (expand_class_desc): Convert the last argument to a sizetype.
19480
19481 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19482
19483 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
19484 __real__): Add reswords.
19485 * hash.h: Regenerate.
19486 * lex.h (rid): Add RID_COMPLEX.
19487 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
19488 * lex.c (init_lex): Add building of RID_COMPLEX.
19489 (real_yylex): General cleanup in line with what c-lex.c also has,
19490 sans the cruft for traditional; add handling of SPEC_IMAG, complex
19491 types, and imaginary numeric constants.
19492 * parse.y (REALPART, IMAGPART): Add tokens.
19493 (unary_expr): Add REALPART and IMAGPART rules.
19494 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
19495 * decl.c (complex_{integer,float,double,long}_type_node): Define
19496 types.
19497 (init_decl_processing): Set up the types.
19498 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
19499 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
19500 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
19501 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
19502 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
19503 COMPLEX_TYPE case.
19504 * method.c (build_overload_name): Add handling of the different
19505 COMPLEX_TYPEs, prefixing them with `J'.
19506 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
19507 as a template parm.
19508 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
19509 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
19510 (mapcar): Handle COMPLEX_CST.
19511 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
19512 (common_type): Add code for complex types.
19513 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
19514 (convert_for_assignment): Likewise.
19515 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
19516
19517 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
19518
19519 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
19520 tsubst_expr, as it might try to do overload resolution.
19521
19522 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
19523
19524 * pt.c (instantiate_class_template): Oops.
19525
19526 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
19527
19528 * cp-tree.def: Add TAG_DEFN.
19529 * pt.c (tsubst_enum): New fn.
19530 (instantiate_class_template): Use it.
19531 (tsubst_expr): Support TAG_DEFN.
19532 (tsubst): Support local enums.
19533 (tsubst_copy): Likewise.
19534 * decl.c (finish_enum): Likewise.
19535 (start_enum): If this is a local enum, switch to permanent_obstack.
19536
19537 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
19538
19539 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
19540 (finish_function): Put the base init code for constructors just
19541 after the parm cleanup insns.
19542 (struct cp_function): Add last_parm_cleanup_insn.
19543 (push_cp_function_context): Likewise.
19544 (pop_cp_function_context): Likewise.
19545
19546 Tue May 13 15:51:20 1997 Jason Merrill <jason@yorick.cygnus.com>
19547
19548 * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
19549
19550 Wed May 7 11:17:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19551
19552 * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
19553 for THUNK_FNDECL before we switch to temporary allocation.
19554
19555 Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
19556
19557 * call.c (build_new_op): Handle null arg2 for ?:.
19558
19559 Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
19560
19561 * except.c (expand_exception_blocks): Ensure that we flow through
19562 the end of the exception region for the exception specification.
19563 Move exception region for the exception specification in, so that
19564 it doesn't protect the parm cleanup. Remove some obsolete code.
19565 * decl.c (store_parm_decls): Likewise.
19566 (finish_function): Likewise.
19567
19568 Tue Apr 29 15:38:54 1997 Jason Merrill <jason@yorick.cygnus.com>
19569
19570 * init.c (build_new): Fix nothrow handling.
19571
19572 Tue Apr 29 14:29:50 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19573
19574 * init.c (emit_base_init): Don't warn about the initialization
19575 list for an artificial member.
19576
19577 Fri Apr 25 17:47:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19578
19579 * expr.c (do_case): Handle !START case for the error msg.
19580
19581 Fri Apr 25 11:55:23 1997 Jason Merrill <jason@yorick.cygnus.com>
19582
19583 * decl2.c, lang-options.h: New option -Weffc++.
19584 * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
19585 to -Weffc++.
19586
19587 * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
19588 to MULTIPLE_SYMBOL_SPACES.
19589
19590 Wed Apr 23 18:06:50 1997 Jason Merrill <jason@yorick.cygnus.com>
19591
19592 * method.c (emit_thunk, generic case): Set current_function_is_thunk.
19593
19594 * method.c (emit_thunk, macro case): Set up DECL_RESULT.
19595
19596 * typeck.c (c_expand_return): Don't complain about returning void
19597 to void in an artificial function.
19598 * method.c (make_thunk): Change settings of READONLY/VOLATILE,
19599 don't set DECL_RESULT, set DECL_ARTIFICIAL.
19600 (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
19601
19602 Wed Apr 23 14:43:06 1997 Mike Stump <mrs@cygnus.com>
19603
19604 * init.c (init_decl_processing): Add support for setjmp/longjmp based
19605 exception handling.
19606 * except.c (init_exception_processing): Likewise.
19607 (expand_end_catch_block): Likewise.
19608 (expand_exception_blocks): Likewise.
19609 (expand_throw): Likewise.
19610 * exception.cc (__default_terminate): Likewise.
19611
19612 * init.c (perform_member_init): Use new method of expr level
19613 cleanups, instead of cleanups_this_call and friends.
19614 (emit_base_init): Likewise.
19615 (expand_aggr_vbase_init_1): Likewise.
19616 (expand_vec_init): Likewise.
19617 * decl.c (cp_finish_decl): Likewise.
19618 (expand_static_init): Likewise.
19619 (store_parm_decls): Likewise.
19620 (cplus_expand_expr_stmt): Likewise.
19621 * decl2.c (finish_file): Likewise.
19622
19623 * Make-lang.in (exception.o): Ok to compile with -O now.
19624
19625 * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
19626 we know it will be done later by the backend.
19627
19628 * decl2.c (lang_f_options): Remove support for short temps.
19629 * lang-options.h: Likewise.
19630
19631 Wed Apr 23 04:12:06 1997 Jason Merrill <jason@yorick.cygnus.com>
19632
19633 * tree.c (varargs_function_p): New fn.
19634 * method.c (emit_thunk): Replace broken generic code with code to
19635 generate a heavyweight thunk function.
19636
19637 Tue Apr 22 02:45:18 1997 Jason Merrill <jason@yorick.cygnus.com>
19638
19639 * pt.c (process_template_parm): pedwarn about floating-point parms.
19640
19641 * decl.c (grokdeclarator): inline no longer implies static.
19642
19643 * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
19644
19645 Mon Apr 21 15:42:27 1997 Jason Merrill <jason@yorick.cygnus.com>
19646
19647 * class.c (check_for_override): The signature of an overriding
19648 function is not changed.
19649
19650 * call.c (build_over_call): Move setting of conv into the loop.
19651 Note: this change, along with the related changes of the 18th thru
19652 the 20th of April, fix an infinite loop problem in conversions.
19653
19654 Sun Apr 20 16:24:29 1997 Jason Merrill <jason@yorick.cygnus.com>
19655
19656 * call.c (build_user_type_conversion_1): Really ignore rvalue
19657 conversions when looking for a REFERENCE_TYPE.
19658
19659 * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
19660 * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
19661 * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
19662 (build_unary_op): Likewise.
19663 * call.c (build_over_call): See through a CONVERT_EXPR around the
19664 ADDR_EXPR for on a temporary.
19665 * typeck.c (c_expand_return): See through a CONVERT_EXPR around
19666 the ADDR_EXPR for a local variable.
19667
19668 Fri Apr 18 12:11:33 1997 Jason Merrill <jason@yorick.cygnus.com>
19669
19670 * call.c (build_user_type_conversion_1): If we're trying to
19671 convert to a REFERENCE_TYPE, only consider lvalue conversions.
19672 (build_new_function_call): Print candidates.
19673 (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
19674 (reference_binding): Binding a temporary of a reference-related type
19675 is BAD.
19676
19677 Thu Apr 17 14:37:22 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19678
19679 * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
19680 * tinfo2.cc (type_info::before): Likewise.
19681
19682 Mon Apr 14 12:38:17 1997 Jason Merrill <jason@yorick.cygnus.com>
19683
19684 * call.c (implicit_conversion): Oops.
19685
19686 Fri Apr 11 02:18:30 1997 Jason Merrill <jason@yorick.cygnus.com>
19687
19688 * call.c (implicit_conversion): Try to find a reference conversion
19689 before binding a const reference to a temporary.
19690
19691 Wed Apr 2 12:51:36 1997 Mike Stump <mrs@cygnus.com>
19692
19693 * exception.cc (__default_unexpected): Call terminate by default,
19694 so that if the user overrides terminate, the correct function will
19695 be called.
19696
19697 Wed Mar 19 14:14:45 1997 Mike Stump <mrs@cygnus.com>
19698
19699 * parse.y (left_curly): Avoid trying to use any fields of
19700 error_mark_node, as there aren't any.
19701
19702 Thu Mar 13 16:33:22 1997 Jason Merrill <jason@yorick.cygnus.com>
19703
19704 * lex.c (do_identifier): Avoid breaking on overloaded methods
19705 as default arguments.
19706
19707 Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se>
19708
19709 * call.c (add_template_candidate): Initialize the variable "dummy".
19710
19711 Mon Mar 10 15:13:14 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
19712
19713 * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
19714 before we try to use TYPE_SIZE and TREE_CONSTANT on it.
19715
19716 Fri Mar 7 13:19:36 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19717
19718 * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
19719 (debug_binfo): Delete decl, not needed.
19720
19721 * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
19722 promotes_to_aggr_type): Delete fns.
19723 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
19724 SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
19725 PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
19726
19727 * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
19728
19729 * friend.c (is_friend_type): Delete fn.
19730 * cp-tree.h (is_friend_type): Delete decl.
19731
19732 * decl.c (original_result_rtx, double_ftype_double,
19733 double_ftype_double_double, int_ftype_int, long_ftype_long,
19734 float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
19735 * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
19736
19737 * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
19738 fwd decls.
19739 * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
19740
19741 * decl.c (pushdecl_nonclass_level): #if 0, unused.
19742 * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
19743
19744 * lex.c (reinit_lang_specific): #if 0, unused.
19745 * cp-tree.h (reinit_lang_specific): #if 0 decl.
19746
19747 * decl.c (revert_static_member_fn): Make static, adding fwd decl.
19748 * cp-tree.h (revert_static_member_fn): Delete decl.
19749
19750 * class.c (root_lang_context_p): Delete fn.
19751 * cp-tree.h (root_lang_context_p): Delete decl.
19752
19753 * decl.c (set_current_level_tags_transparency): #if 0, unused.
19754 * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
19755
19756 * lex.c (set_vardecl_interface_info): Make static.
19757 * cp-tree.h (set_vardecl_interface_info): Delete decl.
19758
19759 * call.c (find_scoped_type): Make static.
19760 * cp-tree.h (find_scoped_type): Delete decl.
19761
19762 * search.c (convert_pointer_to_vbase): Make static.
19763 * cp-tree.h (convert_pointer_to_vbase): Delete decl.
19764
19765 * decl.c (const_ptr_type_node): Likewise.
19766 * cp-tree.h (const_ptr_type_node): Delete decl.
19767
19768 * typeck.c (common_base_type): Make static.
19769 * cp-tree.h (common_base_types): Delete erroneous decl.
19770
19771 * pt.c (classtype_mangled_name): Make static.
19772 * cp-tree.h (classtype_mangled_name): Delete decl.
19773
19774 * lex.c (check_newline): Make static.
19775 * cp-tree.h (check_newline): Delete decl.
19776
19777 * typeck.c (build_x_array_ref): Delete fn, same idea as
19778 grok_array_decl.
19779 * cp-tree.h (build_x_array_ref): Delete decl.
19780
19781 * lex.c (copy_decl_lang_specific): Delete fn, same idea as
19782 copy_lang_decl.
19783 * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
19784
19785 * class.c (build_vtable_entry): Make static.
19786 * cp-tree.h (build_vtable_entry): Delete decl.
19787
19788 * class.c (build_vbase_pointer): Make static.
19789 * cp-tree.h (build_vbase_pointer): Delete decl.
19790
19791 * sig.c (build_sptr_ref): Add forward decl and make static.
19792 * cp-tree.h (build_sptr_ref): Delete decl.
19793
19794 * call.c (build_new_method_call): Add forward decl and make static.
19795 * cp-tree.h (build_new_method_call): Delete decl.
19796
19797 * call.c (build_object_call): Make static.
19798 * class.c (check_for_override, complete_type_p, mark_overriders):
19799 Likewise.
19800 * decl.c (cp_function_chain): Likewise.
19801 * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
19802 Likewise.
19803 * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
19804 Likewise.
19805 * tree.c (build_cplus_array_type_1): Likewise.
19806 * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
19807 (comp_target_parms): Likewise.
19808
19809 * init.c (build_builtin_call): Make static.
19810 * cp-tree.h (build_builtin_call): Delete decl.
19811
19812 * typeck.c (binary_op_error): Delete decl.
19813 * cp-tree.h (binary_op_error): Likewise.
19814
19815 Thu Mar 6 16:13:52 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19816
19817 * call.c (build_method_call): Compare against error_mark_node
19818 directly, rather than the ERROR_MARK tree code.
19819 * cvt.c (cp_convert): Likewise.
19820 * decl.c (print_binding_level): Likewise.
19821 (duplicate_decls): Likewise.
19822 (grokdeclarator): Likewise.
19823 (grokdeclarator): Likewise.
19824 * init.c (expand_aggr_init_1): Likewise.
19825 (decl_constant_value): Likewise.
19826 * method.c (build_opfncall): Likewise.
19827 (hack_identifier): Likewise.
19828 * typeck.c (build_modify_expr): Likewise.
19829
19830 * typeck.c (build_c_cast): Don't decl TYPE as register tree.
19831
19832 Sun Mar 2 02:54:36 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
19833
19834 * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
19835
19836 * pt.c (coerce_template_parms): Add new error message.
19837
19838 * method.c (build_overload_value): Implement name mangling for
19839 floating-point template arguments.
19840
19841 * method.c (build_overload_int, icat, dicat): Fix mangling of template
19842 arguments whose absolute value doesn't fit in a signed word.
19843
19844 Mon Mar 3 12:14:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19845
19846 * friend.c: New file; put all of the friend stuff in here.
19847 * init.c: Instead of here.
19848 * Makefile.in (CXX_OBJS): Add friend.o.
19849 (friend.o): Add dependencies.
19850 * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
19851
19852 Sun Mar 2 11:04:43 1997 Jason Merrill <jason@yorick.cygnus.com>
19853
19854 * call.c (build_scoped_method_call): Complain if the scope isn't a
19855 base.
19856
19857 Wed Feb 26 11:31:06 1997 Jason Merrill <jason@yorick.cygnus.com>
19858
19859 * parse.y (left_curly): Don't crash on erroneous type.
19860
19861 * init.c (build_delete): Fix type of ref.
19862
19863 Tue Feb 25 12:41:48 1997 Jason Merrill <jason@yorick.cygnus.com>
19864
19865 * search.c (get_vbase_1): Renamed from get_vbase.
19866 (get_vbase): Wrapper, now non-static.
19867 (convert_pointer_to_vbase): Now static.
19868
19869 * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
19870 * init.c (build_delete): Pass one.
19871 (build_partial_cleanup_for): Use build_scoped_method_call.
19872 * decl.c (finish_function): Pass a binfo.
19873
19874 Mon Feb 24 15:00:12 1997 Jason Merrill <jason@yorick.cygnus.com>
19875
19876 * call.c (build_over_call): Only synthesize non-trivial copy ctors.
19877
19878 * typeck.c (build_c_cast): Lose other reference to flag.
19879
19880 * call.c (build_field_call): Don't look for [cd]tor_identifier.
19881 * decl2.c (delete_sanity): Remove meaningless use of
19882 LOOKUP_HAS_IN_CHARGE.
19883 * decl.c (finish_function): Use build_scoped_method_call instead
19884 of build_delete for running vbase dtors.
19885 * init.c (build_delete): Call overload resolution code instead of
19886 duplicating it badly.
19887
19888 Thu Feb 20 15:12:15 1997 Jason Merrill <jason@yorick.cygnus.com>
19889
19890 * call.c (build_over_call): Call mark_used before trying to elide
19891 the call.
19892
19893 * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
19894
19895 Wed Feb 19 11:18:53 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19896
19897 * typeck.c (build_modify_expr): Always pedwarn for a cast to
19898 non-reference used as an lvalue.
19899
19900 Wed Feb 19 10:35:37 1997 Jason Merrill <jason@yorick.cygnus.com>
19901
19902 * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
19903
19904 Tue Feb 18 15:40:57 1997 Jason Merrill <jason@yorick.cygnus.com>
19905
19906 * parse.y (handler): Fix template typo.
19907
19908 Sun Feb 16 02:12:28 1997 Jason Merrill <jason@yorick.cygnus.com>
19909
19910 * error.c (lang_decl_name): New fn.
19911 * tree.c (lang_printable_name): Use it.
19912
19913 Fri Feb 14 16:57:05 1997 Mike Stump <mrs@cygnus.com>
19914
19915 * g++spec.c: Include config.h so that we can catch bzero #defines
19916 from the config file.
19917
19918 Tue Feb 11 13:50:48 1997 Mike Stump <mrs@cygnus.com>
19919
19920 * new1.cc: Include a declaration for malloc, to avoid warning, and
19921 avoid lossing on systems that require one (ones that define malloc
19922 in xm.h).
19923
19924 Mon Feb 10 22:51:13 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
19925
19926 * decl2.c (max_tinst_depth): New variable.
19927 (lang_decode_option): Parse "-ftemplate-depth-NN" command line
19928 option.
19929 * pt.c (max_tinst_depth): Variable moved.
19930 * lang-options.h: Declare "-ftemplate-depth-NN" command line option
19931 as legal.
19932
19933 Fri Feb 7 15:43:34 1997 Jason Merrill <jason@yorick.cygnus.com>
19934
19935 * decl.c (xref_basetypes): Allow a base class that depends on
19936 template parms to be incomplete.
19937
19938 * decl2.c (build_expr_from_tree): Support typeid(type).
19939 * rtti.c (get_typeid): Support templates.
19940 (expand_si_desc, expand_class_desc): Fix string length.
19941 (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
19942
19943 Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
19944
19945 * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
19946
19947 * pt.c (tsubst): Put it back for -fno-ansi-overloading.
19948
19949 Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
19950
19951 * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
19952 smashes together template and non-template decls of the same
19953 signature.
19954
19955 Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
19956
19957 * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
19958
19959 Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19960
19961 * decl.c (duplicate_decls): Next route, pedwarn about different
19962 exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
19963
19964 Tue Jan 28 20:43:29 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19965
19966 * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
19967 (struct lang_type): Delete has_default_implementation member.
19968 Increase dummy to 21.
19969 * decl.c (start_method): Delete usage.
19970
19971 * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
19972 store_after_parms, start_decl_1, auto_function): Add decls.
19973 (get_arglist_len_in_bytes, declare_implicit_exception,
19974 have_exceptions_p, make_type_decl, typedecl_for_tag,
19975 store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
19976 build_component_type_expr, cplus_exception_name,
19977 {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
19978 * call.c (build_this): Make static.
19979 (is_complete): Likewise.
19980 (implicit_conversion): Likewise.
19981 (reference_binding): Likewise.
19982 (standard_conversion): Likewise.
19983 (strip_top_quals): Likewise.
19984 (non_reference): Likewise.
19985 (build_conv): Likewise.
19986 (user_harshness): Likewise.
19987 (rank_for_ideal): Likewise.
19988 * decl.c (start_decl_1): Delete forward decl.
19989 (push_decl_level): Make static.
19990 (resume_binding_level): Make static.
19991 (namespace_bindings_p): Make static.
19992 (declare_namespace_level): Make static.
19993 (lookup_name_real): Make static.
19994 (duplicate_decls): Make static. Take register off NEWDECL and
19995 OLDDECL parm decls.
19996 * decl2.c (get_sentry): Make static.
19997 (temp_name_p): Delete fn.
19998 * except.c (auto_function): Delete decl.
19999 * lex.c (handle_{cp,sysv}_pragma): Make static.
20000 (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
20001 * method.c (do_build_{copy_constructor,assign_ref}): Make static.
20002 * pt.c (tsubst_expr_values): Make static.
20003 * rtti.c (combine_strings): Delete decl.
20004
20005 Tue Jan 28 16:40:40 1997 Jason Merrill <jason@yorick.cygnus.com>
20006
20007 * pt.c (push_template_decl): Handle getting a typedef.
20008
20009 * call.c (build_new_function_call): Complain about void arg.
20010
20011 Tue Jan 28 15:25:09 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20012
20013 * decl.c (duplicate_decls): Give pedwarn of different exceptions
20014 if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
20015
20016 Mon Jan 27 19:21:29 1997 Mike Stump <mrs@cygnus.com>
20017
20018 * except.c (expand_throw): Don't expand the cleanup tree here,
20019 since we are not going to write the rtl out. Fixes problem with
20020 -g -O on SPARC.
20021
20022 Mon Jan 27 16:24:35 1997 Sean McNeil <sean@mcneil.com>
20023
20024 * Make-lang.in: Add $(exeext) as necessary.
20025
20026 Mon Jan 27 13:20:39 1997 Mike Stump <mrs@cygnus.com>
20027
20028 * parse.y (handler_seq): Must have at least one catch clause.
20029
20030 Sat Jan 25 12:00:05 1997 Jason Merrill <jason@yorick.cygnus.com>
20031
20032 * call.c (add_builtin_candidate): Restore ?: hack.
20033
20034 * decl.c (grok_op_properties): More warnings.
20035
20036 Sat Jan 25 08:50:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20037
20038 * decl.c (duplicate_decls): On second thought, do it as a pedwarn
20039 still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
20040
20041 * decl.c (duplicate_decls): Scale back to a warning, and only do
20042 'em if -pedantic.
20043
20044 Fri Jan 24 17:52:54 1997 Mike Stump <mrs@cygnus.com>
20045
20046 * decl.c (duplicate_decls): pedwarn mismatched exception
20047 specifications.
20048
20049 Thu Jan 23 18:18:54 1997 Mike Stump <mrs@cygnus.com>
20050
20051 * call.c (build_new_method_call): Don't display the invisible
20052 argument for controlling virtual bases.
20053
20054 Thu Jan 23 16:48:10 1997 Mike Stump <mrs@cygnus.com>
20055
20056 * new: Add nothrow new and delete, bad_alloc and throw specifications
20057 for delete.
20058 * decl.c (init_decl_processing): Add throw specification for delete.
20059 * new.cc (nothrow): Define.
20060 * lex.c (real_yylex): Removing warning that throw and friends are
20061 keywords.
20062 * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
20063 * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
20064 * Make-lang.in: Add new{1,2}.{cc,o}.
20065
20066 Thu Jan 23 16:39:06 1997 Jason Merrill <jason@yorick.cygnus.com>
20067
20068 * lex.c (cons_up_default_function): Fix return type of synth op=.
20069
20070 * init.c (emit_base_init): Add warnings for uninitialized members
20071 and bases.
20072
20073 * decl.c (xref_basetypes): Add warning for non-polymorphic type
20074 with destructor used as base type.
20075
20076 * decl.c (grok_op_properties): Add warning for op= returning void.
20077 * typeck.c (c_expand_return): Add warning for op= returning anything
20078 other than *this.
20079
20080 * class.c (finish_struct_1): Add warning for class with pointers
20081 but not copy ctor or copy op=.
20082
20083 * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
20084 * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
20085 (instantiate_template): If -fexternal-templates, add this
20086 instantiation to pending_templates.
20087
20088 * decl2.c (copy_assignment_arg_p): Disable old hack to support
20089 Booch components.
20090
20091 Tue Jan 21 18:32:04 1997 Mike Stump <mrs@cygnus.com>
20092
20093 * cvt.c (cp_convert): pedwarn enum to pointer conversions.
20094
20095 Mon Jan 20 17:59:51 1997 Jason Merrill <jason@yorick.cygnus.com>
20096
20097 * call.c (standard_conversion): Handle getting references. Tack
20098 on RVALUE_CONV here. Do it for non-class types, too.
20099 (reference_binding): Pass references to standard_conversion.
20100 (implicit_conversion): Likewise.
20101 (add_builtin_candidate): Disable one ?: kludge.
20102 (convert_like): Handle RVALUE_CONVs for non-class types.
20103 (joust): Disable the other ?: kludge.
20104
20105 Mon Jan 20 14:53:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20106
20107 * decl.c (init_decl_processing): Add code to build up common
20108 function types beforehand, to avoid creation then removal of
20109 things already in the hash table.
20110
20111 Mon Jan 20 14:43:49 1997 Jason Merrill <jason@yorick.cygnus.com>
20112
20113 * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
20114 the arguments.
20115
20116 * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
20117 current_template_parms.
20118
20119 Fri Jan 17 10:25:42 1997 Jason Merrill <jason@yorick.cygnus.com>
20120
20121 * search.c (lookup_field): Don't return a function, check want_type.
20122
20123 Thu Jan 16 18:14:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20124
20125 * init.c (build_new): Make sure PLACEMENT has a type.
20126
20127 Thu Jan 16 17:40:28 1997 Jason Merrill <jason@yorick.cygnus.com>
20128
20129 * init.c (build_new): Support new (nothrow).
20130
20131 Wed Jan 15 12:38:14 1997 Jason Merrill <jason@yorick.cygnus.com>
20132
20133 * pt.c (instantiate_decl): Also do push_to_top_level before setting
20134 up DECL_INITIAL.
20135
20136 * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
20137 * pt.c (tsubst): Defer instantiation of default args.
20138 * call.c (build_over_call): Until here.
20139
20140 Wed Jan 15 10:08:10 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20141
20142 * search.c (lookup_field): Make sure we have an
20143 IDENTIFIER_CLASS_VALUE before we try to return it.
20144
20145 Thu Jan 9 07:19:01 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20146
20147 * call.c (build_method_call): Delete unused var PARM.
20148 (build_overload_call_real): Likewise.
20149 (build_object_call): Delete unused var P.
20150 (build_new_op): Likewise.
20151 * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
20152 var definitions, which are never used.
20153 (shadow_tag): Delete unused var FN.
20154 * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
20155 * init.c (build_new): Delete unused var ALLOC_TEMP.
20156 * method.c (hack_identifier): Delete unused var CONTEXT.
20157 (do_build_copy_constructor): Delete unused var NAME.
20158 (synthesize_method): Delete unused var BASE.
20159 * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
20160 * rtti.c (build_headof): Delete unused var VPTR.
20161 (get_typeid): Delete unused var T.
20162 * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
20163 and ORIG_OP2.
20164 (build_ptrmemfunc): Delete unused vars U and NINDEX.
20165 * typeck2.c (build_functional_cast): Delete unused var BINFO.
20166
20167 Wed Jan 8 13:09:54 1997 Jason Merrill <jason@yorick.cygnus.com>
20168
20169 * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
20170 things in a type being defined.
20171 * decl.c (finish_enum): Reverse the values so that they are in
20172 the correct order.
20173
20174 * pt.c (instantiate_class_template): Don't initialize
20175 BINFO_BASETYPES until the vector is filled out.
20176 (unify): Don't abort on conflicting bindings, just fail.
20177 (instantiate_decl): Do push_tinst_level before any tsubsting.
20178
20179 * method.c (build_overload_value): Handle getting a
20180 TEMPLATE_CONST_PARM for a pointer.
20181
20182 Tue Jan 7 14:00:58 1997 Jason Merrill <jason@yorick.cygnus.com>
20183
20184 * init.c (expand_member_init): Don't give 'not a base' error for
20185 templates.
20186
20187 * pt.c (instantiate_decl): Call import_export_decl later.
20188
20189 * pt.c (instantiate_class_template): Return a value.
20190
20191 * parse.y (extension): New rule for __extension__.
20192 (extdef, unary_expr, decl, component_decl): Use it.
20193
20194 Tue Jan 7 09:20:28 1997 Mike Stump <mrs@cygnus.com>
20195
20196 * class.c (base_binfo): Remove unused base_has_virtual member.
20197 (finish_base_struct): Likewise.
20198 (finish_struct_1): Likewise.
20199
20200 Tue Dec 31 20:25:50 1996 Mike Stump <mrs@cygnus.com>
20201
20202 * search.c (expand_upcast_fixups): Fix bogus code generation
20203 problem where the generated code uses the wrong index into the
20204 runtime built vtable on the stack. Old code could clobber random
20205 stack values.
20206
20207 Tue Dec 31 15:16:56 1996 Mike Stump <mrs@cygnus.com>
20208
20209 * init.c (perform_member_init): Make sure the partial EH cleanups
20210 live on the function_obstack.
20211
20212 Fri Dec 27 10:31:40 1996 Paul Eggert <eggert@twinsun.com>
20213
20214 * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
20215 this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
20216
20217 Tue Dec 24 10:24:03 1996 Jeffrey A Law <law@cygnus.com>
20218
20219 * decl.c (grokvardecl): Avoid ANSI style initialization.
20220
20221 Sun Dec 22 04:22:06 1996 Jason Merrill <jason@yorick.cygnus.com>
20222
20223 * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
20224
20225 Fri Dec 20 17:09:25 1996 Jason Merrill <jason@yorick.cygnus.com>
20226
20227 * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
20228
20229 Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20230
20231 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
20232 arguments we compare against. Start the count of I at 1, not 0,
20233 since argv[0] is still the command.
20234
20235 Thu Dec 19 11:53:57 1996 Stan Shebs <shebs@andros.cygnus.com>
20236
20237 * lang-specs.h: Accept .cp as an C++ extension.
20238
20239 Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20240
20241 * cp-tree.h (ptr_reasonably_similar): Add decl.
20242
20243 Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20244
20245 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
20246 pointer. New local SPECBITS with the parm's value.
20247 (grokdeclarator): Pass &specbits down.
20248
20249 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
20250 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
20251
20252 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
20253 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
20254
20255 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
20256 not an error_mark_node.
20257
20258 Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
20259
20260 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
20261 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
20262
20263 Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
20264
20265 * decl.c (grokdeclarator): When giving an anonymous struct a name,
20266 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
20267 not affected).
20268
20269 * typeck2.c (build_m_component_ref): If component is a pointer
20270 to data member, resolve the OFFSET_REF now.
20271
20272 * call.c (convert_like): Don't go into infinite recursion.
20273
20274 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
20275
20276 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
20277 * tree.c (layout_basetypes): And on the vbase ptr.
20278
20279 Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
20280
20281 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
20282 CHAR_TYPE_SIZE so bool is always the same size as another type.
20283
20284 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
20285
20286 Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
20287
20288 * decl2.c (grok_x_components): Remove synthesized methods from
20289 TYPE_METHODS of an anonymous union, complain about member
20290 functions.
20291 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
20292 anonymous unions.
20293 (finish_function): Just clear the DECL_RTL of our arguments.
20294
20295 Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
20296
20297 * decl2.c (finish_file): Emit DWARF debugging info for static data
20298 members.
20299
20300 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
20301
20302 Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
20303
20304 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
20305 IDENTIFIER_NODE.
20306
20307 Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
20308
20309 * Make-lang.in (g++-cross$(exeext)): Fix typo.
20310
20311 Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20312
20313 Make the g++ driver now be a standalone program, rather than one
20314 that tries to run the gcc driver after munging up the options.
20315 * Make-lang.in (g++.c, g++spec.o): New rules.
20316 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
20317 added.
20318 (g++$(exeext)): New rule, based on xgcc rule.
20319 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
20320 * g++spec.c: New file.
20321 * g++.c: Removed file.
20322
20323 Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
20324
20325 * cvt.c (build_up_reference): Arrange for any temporary values
20326 that have been keep in registers until now to be put into memory.
20327
20328 Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20329
20330 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
20331 that make -j3 bootstrap works better.
20332
20333 Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
20334
20335 * decl.c (pushtag): Do pushdecl for anon tags.
20336
20337 Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
20338
20339 * typeck.c (c_expand_return): Fix logic.
20340 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
20341
20342 Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
20343
20344 * g++.c (main): Make sure arglist has a final NULL entry. Add
20345 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
20346 stdin/stdout of the invoked program are redirected to
20347 nowheresville.
20348
20349 Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
20350
20351 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
20352
20353 Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
20354
20355 * init.c (resolve_offset_ref): Handle obj.vfn better.
20356 * typeck.c (build_component_ref): Set TREE_TYPE on result from
20357 build_vfn_ref.
20358
20359 Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
20360
20361 * typeck.c (convert_for_assignment): Also handle anachronistic
20362 implicit conversions from (::*)() to cv void*.
20363 * cvt.c (cp_convert_to_pointer): Likewise.
20364
20365 Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
20366
20367 * lex.c (handle_cp_pragma): Fix bogus warning.
20368
20369 Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
20370
20371 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
20372 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
20373
20374 Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
20375
20376 * class.c (finish_struct_1): Support DWARF2_DEBUG.
20377 * search.c (dfs_debug_mark): Likewise.
20378 * decl2.c (finish_vtable_vardecl): Likewise.
20379 * decl.c (pushtag, finish_enum): Likewise.
20380 * lex.c (check_newline): Use debug_* instead of calling *out
20381 functions directly.
20382
20383 Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20384
20385 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
20386 on some picky hosts.
20387
20388 Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
20389
20390 * class.c (finish_struct_1): A class has a non-trivial copy
20391 constructor if it has virtual functions.
20392
20393 * cvt.c (cp_convert): Always call a constructor.
20394
20395 * call.c (reference_binding): Still tack on a REF_BIND
20396 for bad conversions.
20397 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
20398
20399 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
20400 (c_expand_return): Likewise.
20401 * typeck2.c (digest_init): Likewise for { }.
20402 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
20403 * cvt.c (cp_convert): Handle failure better.
20404
20405 Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20406
20407 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
20408 of GCC be path-relative.
20409
20410 Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
20411
20412 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
20413 it does need choose-temp.o and pexecute.o.
20414
20415 Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20416
20417 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
20418 that we still use it.
20419 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
20420
20421 Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
20422
20423 * init.c (expand_default_init): Avoid calling constructors to
20424 initialize reference temps.
20425
20426 * cvt.c (convert_to_reference): Fix.
20427
20428 Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
20429
20430 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
20431 (convert_to_reference): Likewise.
20432 * typeck.c (convert_for_initialization): Likewise.
20433 * init.c (expand_default_init): Likewise.
20434 (expand_aggr_init_1): Likewise.
20435 * cp-tree.h (CONV_NONCONVERTING): Lose.
20436 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
20437 * *.c: Adjust.
20438 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
20439
20440 Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
20441
20442 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
20443
20444 Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
20445
20446 * init.c (expand_aggr_init_1): Don't crash on non-constructor
20447 TARGET_EXPR.
20448
20449 Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20450
20451 * g++.c: Include gansidecl.h.
20452 (VPROTO, PVPROTO, VA_START): Delete.
20453 (choose_temp_base_try, choose_temp_base, perror_exec,
20454 run_dos) [__MSDOS__]: Delete fns.
20455 (pfatal_with_name): Delete fn.
20456 (temp_filename): Declare like in gcc.c.
20457 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
20458 (error_count, signal_count): Define.
20459 (error): Delete both definitions.
20460 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
20461 (pfatal_pexecute): Add fn from gcc.c.
20462 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
20463 code to use the pexecute stuff also used by gcc.c.
20464 (MIN_FATAL_STATUS): Define.
20465 * Make-lang.in (g++): Add dependency on and linking with
20466 choose-temp.o and pexecute.o.
20467
20468 * cp-tree.h: Include gansidecl.h.
20469 (STDIO_PROTO): Delete #undef/#define.
20470 * cvt.c (NULL): Delete #undef/#define.
20471 * expr.c (NULL): Likewise.
20472 * init.c (NULL): Likewise.
20473 * rtti.c (NULL): Likewise.
20474 * xref.c (NULL): Likewise.
20475
20476 * cp-tree.h (build_user_type_conversion): Add prototype.
20477 * call.c (build_user_type_conversion): Delete prototype. Correct
20478 decl of FLAGS arg to be an int.
20479 * cvt.c (build_user_type_conversion): Likewise.
20480
20481 Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
20482
20483 * cp-tree.def: Add TRY_BLOCK and HANDLER.
20484 * except.c (expand_start_catch_block): Support templates.
20485 * parse.y (try_block, handler_seq): Likewise.
20486 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
20487
20488 Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
20489
20490 * pt.c (current_template_args): New fn.
20491 (push_template_decl): Use it.
20492 * decl.c (grokdeclarator): Use it.
20493
20494 * decl2.c (build_expr_from_tree): Dereference ref vars.
20495
20496 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
20497 the decl-specifier-seq.
20498
20499 * decl.c (grok_op_properties): Don't force the type of a conversion
20500 op to be complete. Don't warn about converting to the same type
20501 for template instantiations.
20502
20503 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
20504 methods.
20505
20506 Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
20507
20508 * typeck.c (get_delta_difference): Remove previous bogusness.
20509 Don't give errors if force is set.
20510
20511 Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
20512
20513 * decl2.c (finish_file): Don't emit debug info.
20514 * decl.c (pushdecl): Lose obsolete code.
20515 (grokdeclarator): Still do the long long thing after complaining.
20516 * search.c (note_debug_info_needed): Don't do anything if we're in a
20517 template.
20518 * method.c (synthesize_method): For non-local classes,
20519 push_to_top_level first.
20520
20521 Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
20522
20523 * typeck.c (get_delta_difference): Add no_error parameter.
20524 (build_ptrmemfunc): Call get_delta_difference with no_error set;
20525 we don't want error messages when converting unrelated
20526 pointer-to-member functions.
20527
20528 Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
20529
20530 * error.c (dump_expr): Improve the wording on error messages that
20531 involve pointer to member functions.
20532
20533 Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
20534
20535 * cvt.c (cp_convert_to_pointer): Move code for conversions from
20536 (::*)() to void* or (*)() up a bit, so that we can convert from
20537 METHOD_TYPEs as well.
20538
20539 Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
20540
20541 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
20542 There are no 'member' types.
20543 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
20544 (build_x_typeid): Handle errors.
20545
20546 Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
20547
20548 * typeck.c (convert_for_assignment): Handle anachronistic implicit
20549 conversions from (::*)() to void* or (*)().
20550 * cvt.c (cp_convert_to_pointer): Likewise.
20551 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
20552 conversions from here.
20553 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
20554 * lang-options.h: Likewise.
20555 * decl2.c (warn_pmf2ptr): Define.
20556 * cp-tree.h: Declare it.
20557 * typeck2.c (digest_init): Allow pmfs down into
20558 convert_for_initialization.
20559
20560 Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
20561
20562 * typeck.c (c_expand_return): Fix for returning overloaded fn.
20563
20564 Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
20565
20566 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
20567 * decl.c (grok_reference_init): Pass DIRECT_BIND.
20568 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
20569 DIRECT_BIND.
20570 * call.c (convert_like): Don't pass INDIRECT_BIND.
20571 * typeck.c (convert_arguments): Likewise.
20572 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
20573
20574 Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
20575
20576 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
20577 similar code in build_up_ref.
20578 * cvt.c (build_up_reference): Drastically simplify.
20579
20580 Mon Oct 28 12:45:05 1996 Jeffrey A Law <law@cygnus.com>
20581
20582 * typeck.c (signed_or_unsigned_type): If the given type already
20583 as the correct signedness, then just return it.
20584
20585 * typeck.c ({un,}signed_type): If can't do anything, call
20586 signed_or_unsigned_type.
20587
20588 Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
20589
20590 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
20591 current_class_type is NULL.
20592
20593 Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
20594
20595 * class.c (finish_struct_1): Avoid empty structs by adding a field
20596 so layout_type gets the mode right.
20597
20598 * typeck.c (c_expand_return): Drastically simplify.
20599
20600 Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
20601
20602 * typeck.c (decay_conversion): Handle overloaded methods.
20603
20604 Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
20605
20606 * call.c (build_over_call): A TARGET_EXPR has side-effects.
20607
20608 Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
20609
20610 * cvt.c (convert_to_pointer_force): Add code to support pointer to
20611 member function to pointer to function conversions.
20612 * init.c (resolve_offset_ref): Add code to allow faked up objects,
20613 ignoring them if they are not used, and giving an error, if they
20614 are needed.
20615 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
20616 code, and so that we can give an error, if we needed an object,
20617 and one was not provided.
20618 (build_c_cast): Don't call default_conversion when we want to
20619 convert to pointer to function from a METHOD_TYPE.
20620
20621 Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
20622
20623 * Make-lang.in (cplib2.ready): Fix logic.
20624
20625 * decl.c (shadow_tag): Only complain about non-artificial function
20626 members.
20627
20628 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
20629
20630 Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
20631
20632 * expr.c (cplus_expand_expr): Pre-tweak call_target like
20633 expand_inline_function would.
20634
20635 * pt.c (mark_decl_instantiated): If extern_p, call
20636 mark_inline_for_output.
20637
20638 Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
20639
20640 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
20641 pmd conversions.
20642
20643 * typeck.c (get_delta_difference): Fix wording, as we can be used
20644 for pointer to data members.
20645
20646 Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
20647
20648 * pt.c (tsubst): If the function decl isn't a member of this
20649 template, return a copy of the decl (including copying the
20650 lang-specific part) so we don't hose ourselves later.
20651
20652 Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
20653
20654 * class.c (finish_struct): Remove DWARF-specific tag handling.
20655 * decl.c (pushtag): Likewise.
20656 (finish_function): Always clear DECL_ARGUMENTS on function decls with
20657 no saved RTX.
20658 * decl2.c (finish_file): Emit DWARF debugging info for static data
20659 members.
20660
20661 Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
20662
20663 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
20664 isn't the same as the new one before we whack it.
20665
20666 Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
20667
20668 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
20669 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
20670 warn_traditional and warn_strict_prototypes; remove ancient
20671 'overload' code; remove references to flag_traditional.
20672
20673 Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
20674
20675 * input.c (sub_getch): Handle 8-bit characters in string literals.
20676
20677 Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
20678
20679 * tree.c (mapcar): Handle CONSTRUCTORs.
20680 (copy_to_permanent): Handle expression_obstack properly.
20681
20682 * Make-lang.in (cplib2.txt): Also depend on the headers.
20683
20684 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
20685 INT_TYPE_SIZE.
20686 (expand_class_desc): Use USItype for offset field.
20687 * tinfo.h (struct __class_type_info): Likewise.
20688
20689 * method.c (build_overload_int): TYPE_PRECISION should be applied
20690 to types.
20691
20692 Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
20693
20694 * call.c (build_new_op): A COND_EXPR involving void must be a
20695 builtin.
20696
20697 Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
20698
20699 * typeck.c (build_x_component_ref): New fn.
20700 (build_object_ref): Use it.
20701 * parse.y (primary): Use it.
20702 * decl2.c (build_expr_from_tree): Use it.
20703 * cp-tree.h: Declare it.
20704
20705 * decl.c (start_decl): Variable-sized arrays cannot be initialized.
20706 * error.c (dump_type_suffix): Handle variable arrays.
20707
20708 Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20709
20710 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
20711
20712 Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
20713
20714 * decl.c (lookup_name_real): Don't try to look up anything in a
20715 TYPENAME_TYPE.
20716
20717 * tinfo2.cc (__throw_type_match_rtti): Oops.
20718
20719 Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20720
20721 * Make-lang.in (exception.o): Use -fno-PIC for now.
20722
20723 Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
20724
20725 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
20726 calling them.
20727 (get_tinfo_fn_dynamic): Extracted from build_typeid.
20728 * tinfo2.cc (__dynamic_cast): Adjust.
20729
20730 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
20731 (build_x_typeid): Likewise.
20732
20733 * parse.y: Call build_x_typeid instead of build_typeid.
20734 * cp-tree.def: Add TYPEID_EXPR.
20735 * pt.c (tsubst_copy): Handle typeid.
20736 * decl2.c (build_expr_from_tree): Likewise.
20737 * rtti.c (build_x_typeid): Throw bad_typeid from here.
20738 (build_typeid): Not here.
20739 * cp-tree.h: Declare build_x_typeid.
20740
20741 Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
20742
20743 * call.c (convert_like): Pull out constant values.
20744
20745 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
20746
20747 Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
20748
20749 * decl.c (init_decl_processing): Create short int types before
20750 creating size_t in case a machine description needs to use
20751 unsigned short for size_t.
20752
20753 Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
20754
20755 * Make-lang.in (exception.o): Turn off pic.
20756
20757 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
20758 type, multi-level ptr conversions.
20759
20760 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
20761 (throw_bad_cast): Use it.
20762 (throw_bad_typeid): New fn.
20763 (build_typeid): Throw bad_typeid as needed.
20764 Use build_call.
20765 (synthesize_tinfo_fn): Handle functions and arrays before checking
20766 for cv-quals.
20767
20768 * Remove .h from standard C++ headers, add new.h, move into inc
20769 subdirectory.
20770
20771 * exception*: Remove pointer from object, constructors. Add
20772 default exception::what that uses type_info::name. Add
20773 __throw_bad_typeid.
20774
20775 * init.c (build_new): Don't add a cookie to new (void *) T[2].
20776
20777 Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
20778
20779 * Make-lang.in: Building C++ code depends on cc1plus.
20780
20781 Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20782
20783 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
20784 a HOST_WIDE_INT, not a tree.
20785
20786 Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
20787
20788 * exception.cc: Don't include <stdlib.h>.
20789
20790 * Make-lang.in (c++.clean): Remove cplib2.*.
20791
20792 Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
20793
20794 * parse.y (component_decl_1, component_costructor_declarator case):
20795 Pass attributes/prefix_attributes in tree list.
20796
20797 Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
20798
20799 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
20800
20801 Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
20802
20803 * lex.c (do_identifier): Don't do deferred lookup in a template
20804 header.
20805
20806 * typeck2.c (store_init_value): Oops.
20807
20808 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
20809 New files for C++ lang-support library.
20810 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
20811 (CXX_LIB2FUNCS): Define.
20812 And rules for building the C++ lang-support code.
20813 * config-lang.in (headers): Define.
20814 (lib2funcs): Define.
20815
20816 Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
20817
20818 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
20819 digest_init.
20820 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
20821 * typeck2.c (store_init_value): Check for initializing pmf with { }
20822 here.
20823 (process_init_constructor): Not here.
20824
20825 Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
20826
20827 * pt.c (begin_template_parm_list): Increment
20828 processing_template_decl here.
20829 (end_template_parm_list): Not here.
20830 (process_template_parm): No need to add 1 to it now.
20831 * *.c: Use processing_template_decl instead of current_template_parms
20832 to check for being in a template.
20833
20834 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
20835 (tsubst_copy): Handle CONSTRUCTOR.
20836 (instantiate_decl): Set up context properly for variables.
20837 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
20838 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
20839
20840 Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20841
20842 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
20843
20844 Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
20845
20846 * method.c (make_thunk): Call comdat_linkage before setting the
20847 TREE_CODE.
20848
20849 * decl2.c (comdat_linkage): Use make_decl_one_only.
20850 (import_export_decl): Likewise.
20851 * decl.c (init_decl_processing): Check supports_one_only instead of
20852 SUPPORTS_WEAK.
20853
20854 Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
20855
20856 * decl2.c (grokfield): Tighten checking for access decls.
20857
20858 * decl.c (make_typename_type): Resolve references to
20859 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
20860 (lookup_name_real): Types that depend on a template parameter get
20861 an implicit 'typename' unless they're in the current scope.
20862 (start_decl_1): We don't care about incomplete types that depend
20863 on a template parm.
20864 (grokdeclarator): Resolve 'typename's in the type specifier that
20865 refer to members of the current scope.
20866
20867 * call.c (build_over_call): Remove 'inline called before
20868 definition' diagnostic.
20869 (build_method_call): Likewise.
20870 * decl.c (duplicate_decls): Downgrade 'used before declared
20871 inline' to a warning, only with -Winline.
20872
20873 Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
20874
20875 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
20876
20877 Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
20878
20879 * call.c (build_method_call): When calling a signature
20880 default implementation, as in other cases, let instance_ptr simply
20881 be instance.
20882
20883 Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
20884
20885 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
20886
20887 Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
20888
20889 * except.c (expand_start_catch_block): Add a pushlevel so that -g
20890 works on hppa and SPARC.
20891
20892 Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20893
20894 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
20895
20896 Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
20897
20898 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
20899 before testing whether it's a signature.
20900
20901 Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
20902
20903 * call.c (build_new_method_call): Don't complain about signature
20904 pointers and references not being an aggr type.
20905 (build_this): If a signature pointer or reference was passed in,
20906 just return it.
20907 (build_new_method_call): If instance is a signature pointer, set
20908 basetype to the signature type of instance.
20909 * sig.c (build_signature_method_call): Deleted basetype and
20910 instance parameters, they can be found as the DECL_CONTEXT of
20911 function and as the first argument passed in.
20912 * cp-tree.h: Changed declaration of build_signature_method_call.
20913 * call.c (build_method_call): Deleted first two arguments in call
20914 of build_signature_method_call.
20915 (build_over_call): Added call to build_signature_method_call.
20916
20917 Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
20918
20919 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
20920 target_expr.
20921
20922 Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20923
20924 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
20925
20926 Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
20927
20928 * except.c (expand_start_try_stmts): Move to except.c in the backend.
20929 (expand_end_try_stmts): Remove.
20930
20931 * init.c (perform_member_init): Use add_partial_entry () instead
20932 of directly manipulating lists.
20933 (emit_base_init): Likewise.
20934
20935 Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
20936
20937 * except.c (expand_exception_blocks): Always make sure USE and
20938 CLOBBER insns that came at the end still do, the backend relies
20939 upon this.
20940
20941 Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
20942
20943 * call.c (build_over_call): We can only use a TARGET_EXPR of the
20944 right type.
20945
20946 Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
20947
20948 * cvt.c (convert_to_reference): Revert last change, don't complain
20949 about temp without target decl.
20950
20951 Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
20952
20953 * decl.c (grokdeclarator): Don't core dump when void() is given.
20954
20955 Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
20956
20957 * decl.c (copy_args_p): Don't crash.
20958
20959 Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
20960
20961 * pt.c (tsubst): And support template args inside the exception
20962 specification.
20963
20964 * pt.c (tsubst): Add support for exception specifications in
20965 template functions.
20966
20967 Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
20968
20969 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
20970 fields now.
20971 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
20972 (start_function): Likewise.
20973 (start_method): Likewise.
20974 (grokfield): Likewise.
20975 (make_call_declarator): Add throw spec parameter.
20976 (set_quals_and_spec): Add routine.
20977 * lex.c (set_quals_and_spec): Likewise.
20978 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
20979 * decl.c (shadow_tag): Eliminate the throw spec parameter to
20980 grokdeclarator.
20981 (groktypename): Likewise.
20982 (start_decl): Eliminate the throw spec parameter. Eliminate the
20983 throw spec parameter to grokdeclarator. Eliminate the throw spec
20984 field in DECL_STMT.
20985 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
20986 (grokfndecl): Remove useless set of raises.
20987 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
20988 the throw spec parameter to start_decl. Pull the throw spec out
20989 of the call declarator.
20990 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
20991 (start_function): Eliminate the throw spec parameter. Eliminate
20992 the throw spec parameter to grokdeclarator.
20993 (start_method): Likewise.
20994 * decl2.c (grokfield): Likewise.
20995 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
20996 (grokoptypename): Likewise.
20997 (finish_file): Eliminate the throw spec parameter to
20998 start_function. Add throw spec to make_call_declarator.
20999 * except.c (init_exception_processing): Add throw spec to
21000 make_call_declarator. Eliminate the throw spec parameter to
21001 start_decl.
21002 (expand_start_catch_block): Eliminate the throw spec parameter to
21003 grokdeclarator.
21004 (expand_builtin_throw): Add throw spec to make_call_declarator.
21005 Eliminate the throw spec parameter to start_function.
21006 (start_anon_func): Likewise.
21007 * lex.c (make_call_declarator): Add throw spec parameter.
21008 (set_quals_and_spec): New routine.
21009 (cons_up_default_function): Add throw spec to make_call_declarator.
21010 Eliminate the throw spec parameter to grokfield.
21011 * method.c (synthesize_method): Eliminate the throw spec parameter
21012 to start_function.
21013 * pt.c (process_template_parm): Eliminate the throw spec parameter
21014 to grokdeclarator.
21015 (tsubst): Add throw spec to make_call_declarator.
21016 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
21017 (do_function_instantiation): Eliminate the throw spec parameter to
21018 grokdeclarator. Eliminate the throw spec parameter to
21019 start_function.
21020 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
21021 to start_function.
21022 * parse.y (datadef): Remove non-winning optimization.
21023 (decl): Likewise.
21024 (fndef): Remove ambiguous error productions uncovered by grammar
21025 fixing.
21026 (constructor_declarator): Add exception_specification_opt here.
21027 (component_constructor_declarator): Likewise.
21028 (direct_after_type_declarator): Likewise.
21029 (complex_direct_notype_declarator): Likewise.
21030 (direct_abstract_declarator): Likewise.
21031 (fn.def1): Remove exception_specification_opt.
21032 (fn.def2): Likewise.
21033 (condition): Likewise.
21034 (initdcl0): Likewise.
21035 (initdcl): Likewise.
21036 (notype_initdcl0): Likewise.
21037 (nomods_initdcl0): Likewise.
21038 (component_decl_1): Likewise.
21039 (component_declarator): Likewise.
21040 (after_type_component_declarator0): Likewise.
21041 (after_type_component_declarator): Likewise.
21042 (notype_component_declarator): Likewise.
21043
21044 Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
21045
21046 * call.c (build_over_call): Also use an INIT_EXPR when
21047 initializing anything from an rvalue.
21048
21049 * call.c (build_over_call): Call stabilize_reference when building
21050 an INIT_EXPR instead of calling the copy ctor.
21051
21052 * call.c (joust): Extend the previous change to all comparisons.
21053
21054 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
21055 NO_LINKAGE_HEURISTICS.
21056
21057 * decl2.c (finish_file): Emit any statics that weren't already.
21058
21059 * typeck.c (build_static_cast): Implement.
21060 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
21061 * decl.c (grokparms): Use can_convert_arg instead of
21062 implicit_conversion directly.
21063 (copy_args_p): New fn.
21064 * cvt.c (convert_to_reference): Don't complain about temp with
21065 static_cast.
21066 (build_up_reference): Handle TARGET_EXPRs.
21067 * call.c (build_over_call): Elide unnecessary temps.
21068 (can_convert*): Use new overloading code.
21069
21070 Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
21071
21072 * call.c: Move TYPE_PTR*_MACROS ...
21073 * cp-tree.h: To here.
21074 * typeck.c (build_reinterpret_cast): Implement.
21075
21076 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
21077 ptr_complete_ob.
21078 (joust): If we're comparing a function to a builtin and the worst
21079 conversion for the builtin is worse than the worst conversion for the
21080 function, take the function.
21081
21082 * typeck.c (build_const_cast): Implement.
21083 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
21084 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
21085
21086 Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
21087
21088 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
21089 too early. Make sure we explode if exprtype turns out to be a
21090 NULL_TREE when it shouldn't be.
21091
21092 Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
21093
21094 * cp-tree.h: New routine make_call_declarator.
21095 * lex.c (make_call_declarator): Define it.
21096 * except.c (init_exception_processing): Use it.
21097 (expand_builtin_throw): Likewise.
21098 (start_anon_func): Likewise.
21099 * decl2.c (finish_file): Likewise.
21100 * lex.c (cons_up_default_function): Likewise.
21101 * parse.y: Likewise.
21102 * pt.c (tsubst): Likewise.
21103
21104 Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
21105
21106 * decl2.c (groktypefield): Remove unused code.
21107
21108 Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
21109
21110 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
21111 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
21112 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
21113 nonempty_cv_qualifiers.
21114 * hash.h: Rebuild.
21115
21116 * lex.c (make_pointer_declarator): Change type_quals into
21117 cv_qualifiers.
21118 (make_reference_declarator): Likewise.
21119
21120 Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
21121
21122 * decl.c (start_function): Only check interface_* for templates
21123 with flag_alt_external_templates.
21124
21125 * call.c (build_new_op): Check for comparison of different enum types.
21126 (build_over_call): Fix arg # output.
21127
21128 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
21129
21130 Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
21131
21132 * call.c (build_new_op): Check for erroneous args.
21133
21134 * call.c (build_new_method_call): Add missing args to cp_error.
21135
21136 * tree.c (error_type): Don't print reference-to-array.
21137
21138 * typeck.c (convert_for_assignment): Don't say contravariance for
21139 removing const.
21140
21141 Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
21142
21143 * call.c (build_over_call): Diagnose bad convs for `this'.
21144
21145 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
21146 on _ctor_arg.
21147
21148 * call.c (convert_like): Handle bad convs.
21149 (build_over_call): Handle bad convs better.
21150
21151 * decl2.c: -fansi-overloading is now the default.
21152
21153 * call.c (build_new_method_call): Check for erroneous args.
21154
21155 * pt.c (instantiate_class_template): Propagate
21156 TYPE_USES_MULTIPLE_INHERITANCE.
21157
21158 Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
21159
21160 * call.c (enforce_access): Add static to routine.
21161
21162 Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
21163
21164 * call.c (build_user_type_conversion_1): Fix bad handling.
21165 (compare_ics): Likewise.
21166
21167 Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
21168
21169 * call.c (standard_conversion): Oops.
21170
21171 Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
21172
21173 * g++.c: Update test for win32 (&& ! cygwin32).
21174
21175 Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
21176
21177 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
21178 (ptr_reasonably_similar): New fn.
21179 * call.c (BAD_RANK): New rank.
21180 (ICS_BAD_FLAG): New macro.
21181 (standard_conversion): Handle almost-right pointer conversions.
21182 (reference_binding): Handle bad rvalue bindings.
21183 (add_*_candidate): Stuff.
21184 (build_over_call): Pass bad conversions to convert_for_initialization.
21185 (compare_ics): Handle bad convs.
21186 (joust): Likewise.
21187
21188 Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
21189
21190 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
21191 integer_type_node when computing pointer offsets.
21192
21193 Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
21194
21195 * tree.c (lvalue_type): New fn.
21196 (error_type): New fn.
21197 * call.c (op_error): Use error_type.
21198 (add_conv_candidate): Use lvalue_type.
21199 (add_builtin_candidates): Likewise.
21200 * error.c (args_as_string): Use error_type.
21201
21202 Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
21203
21204 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
21205 (tsubst): Not here.
21206
21207 * decl.c (init_decl_processing): With -ansi, __null's type is the
21208 signed integral type with the same number of bits as a pointer.
21209 Introduce a new variable null_node for it.
21210 * cp-tree.h: Adjust.
21211 * call.c (null_ptr_cst_p): Adjust.
21212
21213 Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
21214
21215 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
21216 optimize.
21217
21218 Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
21219
21220 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
21221 fns of classes without virtual functions.
21222
21223 * call.c (add_function_candidate): Handle `this' specially.
21224 (compare_ics): Likewise.
21225
21226 Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
21227
21228 * typeck.c (build_conditional_expr): Fix handling of __null.
21229
21230 * decl2.c (comdat_linkage): New fn.
21231 (import_export_vtable): Use it.
21232 (import_export_decl): Use it.
21233 * method.c (make_thunk): Use it.
21234
21235 Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
21236
21237 * pt.c (end_template_decl): If we don't actually have parms, return.
21238 * parse.y (template_header): Accept 'template <>'.
21239
21240 * errfn.c: Allow 5 args.
21241
21242 Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
21243
21244 * tree.c (make_temp_vec): New fn.
21245 * pt.c (push_template_decl): Handle partial specs.
21246 (instantiate_class_template): Likewise.
21247 (more_specialized): Use get_bindings.
21248 (more_specialized_class): New fn.
21249 (get_class_bindings): New fn.
21250 (most_specialized_class): New fn.
21251 (do_function_instantiation): List candidates for ambiguous case.
21252 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
21253 (shadow_tag): Call push_template_decl for partial specializations.
21254 * parse.y: Likewise.
21255 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
21256 DECL_TEMPLATE_MEMBERS.
21257 * call.c (print_z_candidates): Reduce duplication.
21258
21259 Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
21260
21261 * decl2.c (lang_decode_option): Allow -fansi-overloading.
21262
21263 Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
21264
21265 * pt.c (get_bindings): New fn.
21266 (most_specialized): Likewise.
21267 (do_function_instantiation): Use them.
21268 (add_maybe_template): New fn.
21269 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
21270 * call.c (build_new_op): Handle guiding decls.
21271 (build_new_function_call): Likewise.
21272 * decl2.c (finish_file): Likewise.
21273
21274 * decl2.c (mark_used): Do synthesis here.
21275 * call.c (build_method_call): Not here.
21276 (build_over_call): Or here.
21277 * typeck.c (build_function_call_real): Or here.
21278 * tree.c (bot_manip): Call mark_used on functions used in default
21279 args.
21280
21281 Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
21282
21283 * decl2.c (import_export_vtable): Delete code that disabled vtable
21284 heuristic on systems with ASM_OUTPUT_EXTERNAL.
21285
21286 Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
21287
21288 * typeck.c (build_x_function_call): Handle static call context
21289 better.
21290
21291 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
21292 the function, not its outer block.
21293
21294 * call.c (build_field_call): Pass fields on to build_opfncall
21295 regardless of TYPE_OVERLOADS_CALL_EXPR.
21296 (build_method_call): Pass on to build_new_method_call sooner.
21297
21298 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
21299 gives us.
21300 * class.c (instantiate_type): Don't put a POINTER_TYPE to
21301 METHOD_TYPE on an expression. Also make a copy of rhs instead of
21302 modifying it.
21303
21304 Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
21305
21306 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
21307 (add_builtin_candidate): Don't take enums for ++.
21308 (build_new_method_call): Handle non-aggregates and field calls.
21309 Move new overloading code from...
21310 * cvt.c: Here.
21311
21312 * decl.c (grokparms): Don't check default args in templates.
21313
21314 Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
21315
21316 * cvt.c (build_new_op): Fix args to build_unary_op.
21317 (add_builtin_candidates): Don't call type_promotes_to on float.
21318
21319 * decl.c (grokparms): Check the type of the default arg.
21320
21321 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
21322 returning NULL_TREE.
21323
21324 * typeck.c (build_x_binary_op): Avoid doing extra work.
21325 (build_x_unary_op): Likewise.
21326 (build_x_conditional_expr): Likewise.
21327 * cvt.c (build_over_call): Return.
21328 (add_builtin_candidate): Fix MEMBER_REF.
21329 (build_new_op): Likewise.
21330
21331 Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
21332
21333 * method.c (build_overload_name): Put bug fix into code but leave
21334 disabled for now so we can be bug compatible with older releases
21335 that do repeats incorrectly. In the future, we can enable it.
21336
21337 Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
21338
21339 * cvt.c (convert_like): Don't call build_cplus_new twice.
21340
21341 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
21342 Control new overloading code with -fansi-overloading.
21343
21344 Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
21345
21346 * cvt.c (build_over_call): Call build_cplus_new.
21347 * call.c (build_method_call): Likewise.
21348 * typeck.c (build_function_call_real): Likewise.
21349 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
21350 the COND_EXPR in a TARGET_EXPR so they use the same slot.
21351
21352 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
21353 recursive calls.
21354 * typeck.c (complete_type): Propagate
21355 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
21356
21357 Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
21358
21359 * cvt.c (joust): More ?: kludging. Sigh.
21360 (build_over_call): Don't try to synthesize global fns.
21361
21362 * search.c (lookup_conversions): Use binfo marking.
21363
21364 Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
21365
21366 * search.c (build_mi_matrix): Use the correct value of cid
21367 when determining the new mi_size.
21368
21369 Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
21370
21371 * cvt.c (add_builtin_candidates): Do consider type conversion ops
21372 for the first parms of += et al.
21373 (strip_top_quals): New fn.
21374 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
21375 (implicit_conversion): Likewise.
21376 (add_builtin_candidates): Be careful about arrays.
21377 (build_new_method_call): Handle vtable optimization.
21378
21379 Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
21380
21381 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
21382 * cvt.c (reference_binding): Use it.
21383 (implicit_conversion): Use it.
21384 (add_builtin_candidate, COND_EXPR): Use it.
21385
21386 * cvt.c (build_new_function_call): Check for error args.
21387
21388 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
21389
21390 * gxx.gperf: Add __null.
21391 * hash.h: Regenerate.
21392 * lex.h: Add RID_NULL.
21393 * lex.c (init_lex): Create null_pointer_node here, stick it in
21394 RID_NULL.
21395 * decl.c (init_decl_processing): Still set its type here.
21396 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
21397 (convert_to_pointer_force): Likewise.
21398 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
21399 if (! pedantic).
21400 * call.c (convert_harshness): Use null_ptr_cst_p.
21401 * typeck.c (convert_for_assignment): Likewise. Don't produce
21402 null_pointer_node.
21403
21404 * error.c (args_as_string): Handle lists of actual args, too.
21405 * cvt.c (null_ptr_cst): Support (void*)0 for now.
21406 (build_user_type_conversion_1): Improve diagnostics.
21407 (build_new_function_call): Likewise.
21408 (build_object_call): Likewise.
21409 (build_new_method_call): Likewise. Move call before def diagnostic...
21410 (build_over_call): Here.
21411
21412 * cvt.c (build_new_method_call): Don't complain about no match if
21413 LOOKUP_SPECULATIVELY.
21414 (build_over_call): Fix 'this' for virtual fn.
21415 (build_new_method_call): Add diagnostic.
21416
21417 Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
21418
21419 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
21420 constructors to be passed in.
21421 (build_over_call): Likewise.
21422 (build_user_type_conversion_1): Pass them in.
21423 (convert_like): Likewise.
21424 (build_object_call): Handle overloaded conversions.
21425 (build_over_call): Pass the right args to build_vfn_ref.
21426 (standard_conversion): Fix pmf convs.
21427 (joust): Handle comparing statics and non-statics.
21428 (build_new_method_call): New fn.
21429 * call.c (build_method_call): Call it if NEW_OVER.
21430
21431 Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
21432
21433 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
21434 %D instead.
21435
21436 Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
21437
21438 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
21439 instead of just maybe_build_cleanup so that we deallocate the
21440 thrown object.
21441
21442 Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21443
21444 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
21445 * cp-tree.h (finish_prevtable_vardecl): Add decl.
21446
21447 Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
21448
21449 * pt.c (instantiate_class_template): Call complete_type. Also, if
21450 we're at the end of the file and we just instantiated a template
21451 class with a vtable, call finish_prevtable_vardecl.
21452
21453 * error.c (dump_decl): Don't explode (or explode more gracefully
21454 as appropriate) if the object being dumped has a null type.
21455 (dump_expr): Likewise.
21456
21457 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
21458 by counting the number of nodes that we'll need before allocating
21459 the array.
21460 (lookup_fnfields): Fix comment.
21461 (breadth_first_search): Fix comment.
21462
21463 Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
21464
21465 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
21466 TYPE_ALIGN.
21467 * class.c (finish_struct): Call cplus_decl_attributes here.
21468 (finish_struct_1): Not here.
21469 * cp-tree.h: Adjust.
21470
21471 * pt.c (type_unification): New parameter STRICT.
21472 (unify): If STRICT, don't allow cv addition or base deduction.
21473 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
21474
21475 Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
21476
21477 * search.c (get_template_base{_recursive}): New fns.
21478 * pt.c (more_specialized): New fn.
21479 (do_function_instantiation): Use it.
21480 (unify): Handle base deduction.
21481 * cvt.c (joust): Use more_specialized.
21482 Don't arbitrarily choose between non-builtin candidates.
21483 (build_over_call): Call require_complete_type.
21484
21485 * decl.c (start_function): Statics are static even in a #pragma
21486 interface file.
21487
21488 * decl2.c (import_export_vtable): Disable vtable heuristic on
21489 systems with ASM_OUTPUT_EXTERNAL.
21490
21491 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
21492 (standard_conversion): No std conv to enum type.
21493
21494 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
21495 for ptm's.
21496
21497 * cvt.c (reference_binding): Bind directly to a base subobject of
21498 a class rvalue.
21499
21500 * cvt.c (build_new_op): Enforce access control.
21501
21502 Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
21503
21504 * typeck2.c (process_init_constructor): When scanning the
21505 union for a named field, skip things that aren't FIELD_DECLs.
21506
21507 * method.c (synthesize_method): Don't scan fndecl's rtl if
21508 we're at the end of the file; just assume the function can't
21509 be inlined.
21510
21511 Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
21512
21513 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
21514 it failed.
21515
21516 * cvt.c (build_user_type_conversion_1): Handle overloaded
21517 conversion ops.
21518
21519 * cvt.c (add_builtin_candidates): Don't consider type conversion
21520 operators for the first parameter of operator=.
21521
21522 Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
21523
21524 * typeck.c (complete_type): Only call layout_type if we're not
21525 expanding a template.
21526
21527 Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
21528
21529 * cvt.c (compare_ics): Oops.
21530
21531 * cvt.c (op_error): Oops.
21532
21533 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
21534 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
21535 (build_conv): Use them.
21536 (implicit_conversion): Use them.
21537 (convert_like): Handle them.
21538 (build_new_op): Handle builtin COND_EXPR again.
21539 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
21540 in lists of types for COND_EXPR.
21541 (add_builtin_candidate): Add enum candidates for COND_EXPR.
21542
21543 Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
21544
21545 * typeck.c (build_modify_expr): Always attempt to build a call to
21546 the assignment operator, even if we're using a default one.
21547 (convert_for_initialization): Call complete_type.
21548
21549 Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
21550
21551 * cvt.c (reference_binding): A REF_BIND gets the reference type.
21552 (implicit_conversion): Likewise.
21553 (convert_like): Likewise.
21554 (compare_ics): Likewise.
21555 (compare_qual): Likewise.
21556 (print_z_candidates): Handle no candidates.
21557 (build_new_op): Don't handle builtin COND_EXPR for now.
21558
21559 Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
21560
21561 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
21562
21563 Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
21564
21565 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
21566
21567 * cvt.c (build_builtin_candidate): Oops.
21568 (build_new_op): Oops.
21569
21570 * method.c (build_opfncall): Pass COND_EXPR on.
21571 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
21572 (add_builtin_candidate{,s}): Likewise.
21573 (add_builtin_candidates): Likewise.
21574 (print_z_candidates, op_error, build_new_op): Likewise.
21575 (type_decays_to): New fn.
21576 * lex.c (init_lex): Just say ?: for COND_EXPR.
21577
21578 Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
21579
21580 * typeck.c (complete_type): Call layout_type rather than building
21581 a new array type.
21582
21583 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
21584 only use ptrdiff_t.
21585
21586 Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
21587
21588 * cvt.c: Always compile the new overloading code (but don't use it).
21589 (implicit_conversion): Add a BASE_CONV when converting to
21590 the same class type.
21591 (convert_like): Handle BASE_CONV.
21592
21593 Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
21594
21595 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
21596 (add_builtin_candidate): Likewise.
21597
21598 NEW_OVER changes:
21599 * typeck.c (build_x_function_call): Try an operator function
21600 whenever we call an object of class type.
21601 * method.c (build_opfncall): Pass CALL_EXPRs through.
21602 * cvt.c (implicit_conversion): Do const-ref case first.
21603 (add_conv_candidate, build_object_call, op_error): New fns.
21604 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
21605 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
21606 builtin candidates.
21607 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
21608 Fall back on preincrement handling. Use op_error.
21609 Handle warn_synth.
21610 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
21611 an error_mark_node.
21612 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
21613 properly.
21614
21615 Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
21616
21617 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
21618
21619 Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
21620
21621 * typeck.c (build_component_ref_1): Use build_component_ref
21622 instead of open coding it here.
21623
21624 Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
21625
21626 * g++.c (main): Don't link with -lg++.
21627
21628 NEW_OVER changes:
21629 * cvt.c (convert_to_reference): Don't use convert_from_reference on
21630 result of build_type_conversion.
21631 (cp_convert): Only call build_method_call for ctors if
21632 build_type_conversion failed.
21633 (ptr_complete_ob): New function.
21634 (TYPE_PTR{,OB,MEM}_P): New macros.
21635 ({add,build}_builtin_candidate{,s}): New functions.
21636 (print_z_candidates): Handle builtins.
21637 (build_user_type_conversion_1): Don't use conversion fns for
21638 converting to a base type.
21639 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
21640 (build_user_type_conversion): Use convert_from_reference.
21641 (build_new_op): New function.
21642 (build_over_call): Fix handling of methods.
21643 (compare_ics): Handle AMBIG_CONV properly.
21644 * typeck2.c: Increment abort count.
21645 * method.c (build_opfncall): Forward most requests to build_new_op.
21646 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
21647
21648 Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21649
21650 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
21651 invalid second argument to dump_expr_list.
21652
21653 Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
21654
21655 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
21656
21657 Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
21658
21659 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
21660 ASSEMBLE_EXTERNAL.
21661
21662 Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
21663
21664 * typeck2.c (process_init_constructor): New pedwarn for using { }
21665 to initialize a pointer to member function.
21666 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
21667 we can avoid the new error.
21668
21669 Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
21670
21671 * typeck.c (build_ptrmemfunc1): New function to hide details of
21672 pointer to member functions better.
21673
21674 Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
21675
21676 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
21677 methods into the actual method, as we know the implied object is
21678 not used.
21679
21680 Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21681
21682 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
21683 inside a system header.
21684
21685 Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
21686
21687 * call.c (build_method_call): Call complete_type on the
21688 instance type.
21689
21690 Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
21691
21692 * typeck.c (build_component_ref): Always build up an OFFSET_REF
21693 for obj_ptr->func so that we can know which object to use in a
21694 method call.
21695
21696 Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
21697
21698 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
21699 around things. Also improve maintainability.
21700
21701 Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
21702
21703 * decl.c (grokdeclarator): Check for overflow when evaluating an
21704 array dimension.
21705
21706 Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
21707
21708 * cvt.c (cp_convert): Don't check for ambiguity with constructor
21709 if NEW_OVER.
21710
21711 * typeck.c (build_x_function_call): Pass function overload
21712 questions to new overloading code if NEW_OVER.
21713 * init.c (expand_aggr_init_1): Only check for type conversion ops
21714 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
21715 Don't check for ambiguity with constructor if NEW_OVER.
21716 * cvt.c (convert_to_reference): Dereference the result of a type
21717 conversion operator.
21718 (build_conv): Propagate ICS_USER_FLAG.
21719 (implicit_conversion): Call instantiate_type.
21720 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
21721 (add_function_candidate): Fix cv-quals on argtype.
21722 (print_z_candidates): New function.
21723 (build_new_function_call): Call it.
21724 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
21725 consider non-converting constructors.
21726 Call print_z_candidates.
21727 Return an AMBIG_CONV for an ambiguous conversion.
21728 (build_user_type_conversion): Handle AMBIG_CONV.
21729 (convert_like): Fix test for building TARGET_EXPR.
21730 Call instantiate_type.
21731 Handle AMBIG_CONV and LVALUE_CONV.
21732 (build_over_call): Handle 0 args and ellipsis.
21733 * cp-tree.def: Add AMBIG_CONV.
21734
21735 Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
21736
21737 * decl.c (lookup_name_real): If we find mem in obj when parsing
21738 `obj->mem', make sure we return the right value.
21739
21740 Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
21741
21742 * search.c (get_base_distance): Call complete_type.
21743
21744 Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
21745
21746 * decl.c (store_bindings): Make static.
21747
21748 Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
21749
21750 * init.c (expand_aggr_init_1): Don't check type conversions if
21751 NEW_OVER.
21752
21753 * cvt.c (z_candidate): Put back template field.
21754 (add_function_candidate): Set it.
21755 (add_template_candidate): Likewise.
21756 (joust): Use it.
21757 (compare_qual): Handle references and pointers to members.
21758 (compare_ics): Handle reference bindings.
21759
21760 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
21761
21762 Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
21763
21764 * call.c (compute_conversion_costs): Call complete_type.
21765
21766 * tree.c (vec_binfo_member): Use comptypes instead of comparing
21767 pointers, so we can handle template parameters.
21768
21769 Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
21770
21771 * cvt.c (cp_convert_to_pointer): We have to call complete_type
21772 here; let's make it explicit instead of a side effect of an
21773 error check.
21774
21775 Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
21776
21777 * cvt.c (z_candidate): Remove template field.
21778 (reference_binding): Handle binding to temporary.
21779 (implicit_conversion): Likewise.
21780 (add_function_candidate): Handle artificial constructor parms.
21781 Handle functions with too few parms.
21782 (add_template_candidate): New function.
21783 (build_user_type_conversion_1): Handle constructors.
21784 (convert_like): Likewise.
21785 (build_over_call): Likewise.
21786 (build_new_function_call): Support templates.
21787 (compare_ics): Fix reference, inheritance handling.
21788
21789 Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
21790
21791 * decl.c: Add signed_size_zero_node.
21792 (init_decl_processing): Build it.
21793 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
21794 when we're trying to make a negative delta.
21795
21796 Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21797
21798 Stop doing this damn index==strchr variable name confusion.
21799 * class.c (add_virtual_function): Change local var INDEX to be
21800 named IDX.
21801 (add_method): Likewise.
21802 * lex.c (print_parse_statistics): Likewise.
21803 * search.c (make_memoized_table_entry): Likewise.
21804 (lookup_fnfields_here): Likewise.
21805 (lookup_field): Likewise.
21806 (lookup_fnfields): Likewise.
21807 (get_baselinks): Likewise.
21808 * sig.c (build_signature_table_constructor): Likewise.
21809 (build_signature_method_call): Likewise.
21810 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
21811 (get_member_function_from_ptrfunc): Likewise.
21812 (build_ptrmemfunc): Change local var INDEX to be IDX.
21813 (c_expand_start_case): Likewise.
21814
21815 Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
21816
21817 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
21818 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
21819 (convert_to_reference): Use build_type_conversion to convert to
21820 the reference type directly.
21821 (standard_conversion): Fix void* case, non-conversions.
21822 (reference_binding): Fix expr == 0 case, non-conversions.
21823 (convert_like): Support REF_BIND.
21824 (compare_qual): Split out from compare_ics.
21825 (compare_ics): Use it, handle icses with only a qual_conv.
21826
21827 * init.c (expand_vec_init): Don't crash if decl is NULL.
21828
21829 Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
21830
21831 * mpw-config.in: New file, configury for Mac MPW.
21832 * mpw-make.sed: New file, makefile editing for MPW.
21833
21834 Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
21835
21836 * pt.c (instantiate_class_template): Call repo_template_used.
21837
21838 * search.c (lookup_conversions): Only lookup conversions in
21839 complete types.
21840
21841 Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21842
21843 * cp-tree.def: Renamed from tree.def, to avoid confusion with
21844 gcc's tree.def.
21845 * cp-tree.h, lex.c: Include cp-tree.def.
21846 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
21847
21848 Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
21849
21850 * init.c (build_vec_delete_1): Call complete_type.
21851
21852 Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
21853
21854 * except.c (start_anon_func): Make sure anonymous functions are
21855 never external.
21856
21857 Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
21858
21859 * decl.c (finish_function): If function_depth > 1, set nested.
21860
21861 * decl2.c (grokbitfield): Revert Bob's change.
21862 * class.c (finish_struct_1): Fix handling of named bitfield widths.
21863
21864 Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
21865
21866 * pt.c (add_pending_template): Handle types.
21867 (lookup_template_class): With -fexternal-templates, just add the class
21868 to pending_templates instead of instantiating it now.
21869 * decl2.c (finish_file): Handle types in pending_templates.
21870
21871 Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
21872
21873 * decl2.c (grokbitfield): Handle constant decls appropriately.
21874 Give an appropriate error message now instead of spewing core
21875 later.
21876
21877 Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
21878
21879 * decl2.c: Don't turn on thunks by default for now.
21880
21881 Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
21882
21883 * typeck.c (complete_type): Handle error_mark_node.
21884 (common_type, OFFSET_TYPE): Handle template_type_parms.
21885
21886 Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
21887
21888 * pt.c (instantiate_decl): If at_eof, call import_export_decl
21889 regardless of DECL_INLINE.
21890
21891 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
21892
21893 * class.c (finish_struct_bits): Copy TYPE_SIZE.
21894
21895 * rtti.c (build_dynamic_cast): Support templates.
21896 * tree.def: Support DYNAMIC_CAST_EXPR.
21897 * pt.c (tsubst_copy): Likewise.
21898 * decl2.c (build_expr_from_tree): Likewise.
21899
21900 Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
21901
21902 * typeck.c (build_static_cast): Support templates.
21903 (build_const_cast): Likewise.
21904 * tree.def: Support CONST/STATIC_CAST_EXPR.
21905 * pt.c (tsubst_copy): Likewise.
21906 * decl2.c (build_expr_from_tree): Likewise.
21907
21908 Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
21909
21910 * decl2.c (finish_vtable_vardecl): Don't trust
21911 TREE_SYMBOL_REFERENCED for vtables of local classes.
21912
21913 Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
21914
21915 * pt.c (tsubst_copy): Handle operator T.
21916
21917 Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21918
21919 * init.c (build_delete): Move creation of PARMS inside test of
21920 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
21921
21922 Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
21923
21924 * typeck.c (build_conditional_expr): Don't assume that
21925 the arguments to ?: are always pointers or records.
21926
21927 Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
21928
21929 * decl2.c (import_export_decl): Still emit static/weak/comdat
21930 copies of inline template functions with -fno-implicit-templates.
21931
21932 Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
21933
21934 * init.c (build_delete): Determine the complete basetype
21935 path to the destructor we're calling.
21936
21937 Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
21938
21939 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
21940 initialize the enum, because we really and truly don't know where
21941 it came from.
21942 (start_enum): Don't copy integer_zero_node because
21943 build_enumerator will do it.
21944
21945 Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
21946
21947 * decl.c (finish_function): Do access control on base destructors.
21948
21949 * pt.c (tsubst, case FUNCTION_DECL): Set up
21950 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
21951 hose us.
21952
21953 Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
21954
21955 * cvt.c (build_up_reference): If we have already extended the
21956 lifetime of the temporary, don't try it again.
21957 * typeck.c (c_expand_return): Don't try and convert the return
21958 value twice when we want a reference, once is enough.
21959
21960 Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
21961
21962 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
21963 LOOKUP_ONLYCONVERTING at all for now.
21964
21965 * search.c (add_conversions): Put the conversion function in
21966 TREE_VALUE, the basetype in TREE_PURPOSE.
21967 * cvt.c (build_type_conversion): Adjust.
21968 * cvt.c (build_expr_type_conversion): Adjust.
21969 * call.c (user_harshness): Adjust.
21970
21971 Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
21972
21973 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
21974 backend's benefit.
21975
21976 Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
21977
21978 * except.c (expand_start_catch_block): Add a dummy region, if we
21979 get an error, so that we can avoid core dumping later.
21980
21981 Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
21982
21983 * cp-tree.h (OFFSET_REF): Remove.
21984 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
21985 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
21986 * init.c (expand_aggr_init_1): Likewise.
21987 (build_new): Likewise.
21988 * typeck.c (expand_target_expr): Likewise.
21989
21990 Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
21991
21992 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
21993 TARGET_EXPR.
21994
21995 Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
21996
21997 * cvt.c (build_up_reference): Redo how and when temporaries are
21998 created.
21999 * decl.c (grok_reference_init): Don't try and be smart about
22000 running cleanups.
22001
22002 Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
22003
22004 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
22005 (TARGET_EXPR...), now that it has 4 arguments.
22006 * tree.c (build_cplus_new): Likewise.
22007
22008 Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
22009
22010 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
22011
22012 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
22013 * decl.c (struct saved_scope): Remove named_labels,
22014 {base,member}_init_list.
22015 (maybe_push_to_top_level): Don't set them. Call
22016 push_cp_function_context if appropriate.
22017 (pop_from_top_level): Likewise.
22018
22019 * method.c (do_build_assign_ref): Remove obsolete check of
22020 TYPE_HAS_ASSIGN_REF (basetype).
22021
22022 * decl.c (grokfndecl): Diagnose user definition of
22023 implicitly-declared methods.
22024
22025 Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
22026
22027 * method.c (do_build_copy_constructor): Add code to give
22028 meaningful error messages instead of crashing.
22029 (do_build_assign_ref): Don't synthesize assignment operators for
22030 classes containing reference or const members.
22031
22032 * class.c (struct base_info): Remove cant_synth_copy_ctor
22033 and cant_synth_asn_ref.
22034 (finish_base_struct): Remove the code that tries to conditionalize
22035 synthesis of copy constructors & assignment operators based on
22036 access permissions. Instead, let it fail when it tries to
22037 synthesize the copy constructor. This will give meaningful error
22038 messages instead of silently generating code to perform a bitcopy.
22039
22040 Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
22041
22042 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
22043 determining types for constant values.
22044
22045 * decl.c (struct named_label_list): Use instead of stuffing
22046 random items into a TREE_LIST node.
22047 (named_label_uses): Use the new struct.
22048 (poplevel): Likewise.
22049 (lookup_label): Likewise.
22050 (define_label): Add an error message to tell the user the line
22051 where the goto is located in addition to the destination of the
22052 goto.
22053 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
22054 named_label_uses.
22055 (finish_function): Likewise.
22056
22057 (start_decl): Complain about defining a static data member
22058 in a different type from which it was declared.
22059
22060 Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
22061
22062 * cvt.c (build_expr_type_conversion): Adjust.
22063
22064 Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
22065
22066 * call.c (build_method_call): Always convert 'this' to the
22067 appropriate type.
22068
22069 * search.c (add_conversions): Put the conversion function in
22070 TREE_VALUE, the type in TREE_PURPOSE.
22071 * cvt.c (build_type_conversion): Adjust.
22072 * call.c (user_harshness): Adjust.
22073
22074 * method.c (emit_thunk): Call temporary_allocation and
22075 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
22076
22077 * tree.c (build_cplus_array_type): Handle tweaking of
22078 TYPE_MAIN_VARIANT here.
22079 * typeck.c (common_type): Not here.
22080
22081 * typeck.c (complete_type): Only try to complete an array type if
22082 it has a domain.
22083
22084 Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
22085
22086 * decl.c (grokvardecl): Call complete_type.
22087 (grokdeclarator): Call complete_type for PARM_DECLs.
22088
22089 Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
22090
22091 * pt.c (instantiate_class_template): Re-set
22092 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
22093
22094 Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
22095
22096 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
22097 smart enough to do it right.
22098 * tree.c (cp_expand_decl_cleanup): Likewise.
22099 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
22100 cp_expand_decl_cleanup.
22101 (store_parm_decls): Likewise.
22102 (hack_incomplete_structures): Likewise.
22103 * except.c (push_eh_cleanup): Likewise.
22104
22105 Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
22106
22107 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
22108 frontend to the backend where it belongs.
22109 * tree.c (unsave_expr): Likewise.
22110 (unsave_expr_now): Likewise.
22111 * tree.def (UNSAVE_EXPR): Likewise.
22112 * cp-tree.h (unsave_expr): Likewise.
22113 (unsave_expr_now): Likewise.
22114
22115 Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
22116
22117 * init.c (emit_base_init): Make sure the partial EH cleanups live
22118 on the function_obstack.
22119
22120 Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
22121
22122 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
22123 when checking for pointer types.
22124
22125 Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
22126
22127 * pt.c (instantiate_class_template): Remove obsolete check for
22128 access declarations.
22129
22130 Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
22131
22132 * call.c (build_overload_call): Simplify calls to
22133 build_overload_call by removing last parameter.
22134 (build_method_call): Likewise.
22135 * cp-tree.h: Likewise.
22136 * method.c (build_opfncall): Likewise.
22137 * typeck.c (build_x_function_call): Likewise.
22138
22139 Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
22140
22141 * call.c (default_parm_conversions): Factor out common code.
22142 (build_method_call): Use it.
22143 (build_overload_call_real): Use it.
22144
22145 Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
22146
22147 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
22148 but pedwarn as the code is bogus.
22149 * typeck.c (decay_conversion): Likewise.
22150 (build_function_call_real): Use build_addr_func instead of
22151 default_conversion. Don't allow pointer-to-method functions down
22152 here.
22153 (build_unary_op): Use real pointer-to-member functions instead of
22154 fake ones.
22155 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
22156 (convert_for_assignment): Removed some obsolete code.
22157 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
22158 build_x_function_call instead of current_class_ptr. Only call
22159 digest_init once on an initializer, we do this just checking
22160 TREE_TYPE.
22161 (build_expr_from_tree): Pass current_class_ref to
22162 build_x_function_call instead of current_class_ptr.
22163 * init.c (build_member_call): Likewise.
22164 * pase.y: Likewise.
22165 * error.c (dump_expr): Handle OFFSET_REFs better.
22166 * pt.c (unify): Handle pointer-to-member functions better.
22167 * decl.c (finish_function): Clear out current_class_ref just like
22168 we do for current_class_ptr.
22169
22170 * typeck.c (get_delta_difference): Handle virtual bases better.
22171
22172 Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
22173
22174 * sig.c (build_signature_table_constructor): Use the delta for
22175 the original basetype for this virtual function with thunks.
22176 (build_signature_method_call): We still need to adjust 'this'
22177 with thunks.
22178
22179 Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
22180
22181 * call.c (build_addr_func): New routine. Used to get the `real'
22182 address of a function or a method. Needed to avoid getting a
22183 pointer-to-member function.
22184 (build_call): New routine to build CALL_EXPRs.
22185 (build_method_call): Use it.
22186 * cvt.c (convert_to_aggr): Likewise.
22187 * typeck.c (build_function_call_real): Likewise.
22188 * sig.c (build_signature_table_constructor): Use build_addr_func.
22189 * cp-tree.h (build_call, build_addr_func): Declare them.
22190
22191 Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
22192
22193 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
22194 * parse.y: Remove uses of LOOKUP_AGGR.
22195
22196 Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
22197
22198 * *.[chy]: Rename current_class_decl to current_class_ptr, and
22199 C_C_D to current_class_ref.
22200
22201 Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
22202
22203 * call.c (convert_harshness): Tighten up pointer conversions.
22204
22205 Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
22206
22207 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
22208 (finish_file): Likewise.
22209
22210 Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
22211
22212 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
22213
22214 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
22215 code.
22216
22217 Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
22218
22219 * decl2.c: Turn on thunks by default where supported.
22220
22221 Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
22222
22223 * cp-tree.h (build_overload_call_maybe): Removed.
22224 * call.c (build_overload_call_real): Invert meaning of last arg to
22225 be require_complete.
22226 (build_overload_call): Likewise.
22227 * typeck.c (build_x_function_call): Use build_overload_call_real
22228 instead of build_overload_call_maybe.
22229
22230 Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
22231
22232 * decl2.c (finish_file): Don't try to emit functions that haven't
22233 been compiled.
22234
22235 Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
22236
22237 * decl2.c (finish_vtable_vardecl): Oops.
22238
22239 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
22240 Also store the bindings from previous_class_values.
22241 (pop_from_top_level): Restore them.
22242
22243 Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
22244
22245 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
22246 symbol has been referenced.
22247 (finish_file): Re-join synthesis/vtable loop with inline emission
22248 loop, disable inlining when an inline is output.
22249
22250 Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
22251
22252 * except.c (init_exception_processing): Setup saved_in_catch.
22253 (push_eh_cleanup): Reset __eh_in_catch.
22254 (expand_start_catch_block): Set __eh_in_catch.
22255
22256 Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
22257
22258 * except.c (push_eh_cleanup): Add tracking for whether or not we
22259 have an active exception object.
22260 (expand_builtin_throw): Use it to make sure a rethrow without an
22261 exception object is caught.
22262
22263 Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
22264
22265 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
22266 cache.
22267
22268 Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
22269
22270 * decl2.c (finish_file): Also use sentries for vars with
22271 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
22272 created).
22273
22274 * lex.c (handle_cp_pragma): Disable #pragma
22275 interface/implementation if SUPPORTS_ONE_ONLY > 1.
22276
22277 Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
22278
22279 * method.c (emit_thunk): Wrap default case in
22280 temporary/permanent_allocation.
22281
22282 * method.c (make_thunk): Use DECL_ONE_ONLY.
22283 (emit_thunk): Call assemble_end_function.
22284
22285 Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
22286
22287 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
22288 (import_export_decl): Likewise.
22289 (finish_prevtable_vardecl): Disable vtable hack if
22290 SUPPORTS_ONE_ONLY > 1.
22291
22292 Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
22293
22294 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
22295 PREDECREMENT_EXPRs take two arguments, not one.
22296
22297 Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
22298
22299 * class.c (build_vtable_entry): Don't build thunks for abstract
22300 virtuals.
22301
22302 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
22303 frontend.
22304
22305 Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
22306
22307 * class.c (set_rtti_entry): Use size_zero_node.
22308 (build_vtable): Likewise.
22309
22310 Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
22311
22312 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
22313 (prepare_fresh_vtable): Likewise.
22314
22315 Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
22316
22317 * method.c (emit_thunk): Call mark_used on the target function.
22318
22319 * call.c (build_method_call): Don't warn about pending templates.
22320
22321 Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
22322
22323 * decl2.c (finish_file): Fix list walking logic.
22324
22325 * typeck2.c (check_for_new_type): Only warn if -pedantic.
22326
22327 Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
22328
22329 * class.c (finish_struct_1): Remove old code for
22330 dont_allow_type_definitions.
22331 * cp-tree.h: Likewise.
22332 * spew.c: Make sure cp-tree.h is included before parse.h, so the
22333 definition of flagged_type_tree is found before it is used.
22334 * lex.c: Likewise.
22335 * parse.y: Added the ftype member to the type union, and changed a
22336 number of rules to use it instead of ttype. Added calls to
22337 check_for_new_type() as appropriate.
22338 * typeck2.c (check_for_new_type): New function for checking
22339 if a newly defined type appears in the specified tree.
22340 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
22341 for check_for_new_type().
22342
22343 Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
22344
22345 * decl2.c (finish_file): Only use a sentry if the decl is public.
22346
22347 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
22348 don't pass LOOKUP_ONLYCONVERTING.
22349
22350 Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
22351
22352 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
22353 properly keeps track of const and volatile type modifiers.
22354
22355 Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
22356
22357 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
22358 * pt.c (comp_template_args): Use it.
22359
22360 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
22361 assemble_external for artificial function decls.
22362
22363 * decl.c (cp_finish_decl): Oops.
22364
22365 Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
22366
22367 * decl2.c (import_export_decl): Put static data member templates
22368 into common storage, or make them weak, depending on whether they
22369 are dynamically or statically initialized.
22370 (get_sentry): New function.
22371 (finish_file): Do import_export_decl for static data members before
22372 building the init/fini functions. Don't init/fini a variable that's
22373 EXTERNAL. Use a sentry for variables in common. Fix mismatching
22374 push/pop_temp_slots.
22375 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
22376 expand_static_init thang.
22377 * method.c (get_id_2): New function.
22378
22379 Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
22380
22381 * parse.y (empty_parms): Make sure we use C++-style prototypes
22382 when we're declaring member functions.
22383
22384 Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
22385
22386 * Makefile.in (CONFLICTS): 16 s/r conflicts.
22387 * parse.y (self_template_type): New nonterminal.
22388
22389 Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
22390
22391 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
22392 name.
22393 * parse.y (base_class.1): Allow 'typename foo::bar'.
22394
22395 * lex.c (check_newline): Remove #pragma code that plays with the
22396 input stream, since we now deal with tokens. Clear nextchar when
22397 we're done.
22398 (handle_cp_pragma): Use real_yylex.
22399 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
22400 in one place.
22401
22402 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
22403
22404 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
22405
22406 Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
22407
22408 * parse.y: New token SELFNAME for potential constructor.
22409 * spew.c (yylex): Handle it.
22410 * lex.c (identifier_type): Produce it.
22411
22412 * parse.y (complete_type_name): In :: case, don't push class binding.
22413 (complex_type_name): Likewise.
22414
22415 Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
22416
22417 * typeck.c (build_reinterpret_cast): Handle pointer to member
22418 functions.
22419
22420 Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22421
22422 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
22423 pragmas.
22424 (check_newline): Put the vtable/unit/implementation/interface pragma
22425 code into handle_cp_pragma, replacing it with a call.
22426 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
22427 args. Get the next token after handling the pragma token.
22428
22429 Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
22430
22431 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
22432 (convert_to_pointer_force): Likewise.
22433
22434 * init.c (build_new): Fix array new without -fcheck-new.
22435
22436 Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
22437
22438 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
22439 tree.c: Lose TYPE_NESTED_NAME.
22440
22441 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
22442 as identifiers.
22443
22444 * tree.def: Add VEC_INIT_EXPR.
22445 * expr.c (cplus_expand_expr): Handle it.
22446 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
22447 the extra file-scope symbol nastiness.
22448
22449 Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
22450
22451 * method.c (make_thunk): Thunks are static.
22452 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
22453
22454 * decl2.c (mark_vtable_entries): Emit thunks as needed.
22455 (finish_file): Don't emit them here.
22456
22457 Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
22458
22459 * rtti.c (build_dynamic_cast): Handle null pointers.
22460 (ifnonnull): New function.
22461
22462 Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
22463
22464 * call.c (build_method_call): Remember the original basetype we
22465 were called with. Give an error message instead of trying
22466 (incorrectly) to call a non-static member function through a
22467 non-inherited class.
22468
22469 * search.c (expand_upcast_fixups): Mark the new fixup as
22470 DECL_ARTIFICIAL.
22471
22472 Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
22473
22474 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
22475
22476 * class.c (set_rtti_entry): Fix for thunks.
22477
22478 * decl2.c (import_export_decl): Still emit typeinfo fns for
22479 cv-variants of builtin types.
22480
22481 * rtti.c (expand_class_desc): Set up base_info_type_node here.
22482 (init_rtti_processing): Instead of here.
22483
22484 Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
22485
22486 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
22487 (build_typeid): Only complain about taking dynamic typeid without
22488 -frtti.
22489
22490 * decl2.c: flag_rtti defaults to 1.
22491
22492 * rtti.c (get_tinfo_var): The general class case is now smaller.
22493 (init_rtti_processing): Pack the latter three fields of base_info
22494 into 32 bits.
22495
22496 Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
22497
22498 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
22499
22500 Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
22501
22502 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
22503 (push_memoized_context): Split out code to undefer pop_type_level to
22504 (clear_memoized_cache): here.
22505 (pop_memoized_context): We can only handle one layer of deferral of
22506 pop_type_level so clear the cache, if there was a previous level.
22507
22508 Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
22509
22510 * rtti.c (init_rtti_processing): Build up base_info_type_node.
22511 (expand_class_desc): Use one pointer to an array of base_info
22512 structs, passed using a CONSTRUCTOR.
22513
22514 Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
22515
22516 * class.c (build_vbase_path): Remove block extern for
22517 flag_assume_nonnull_objects here.
22518 (build_vfn_ref): Split out functionality into build_vtbl_ref.
22519 (build_vtbl_ref): New routine.
22520 (build_vtable): Set up rtti info here.
22521 (add_virtual_function): Note in CLASSTYPE_RTTI the best
22522 place where we can get the rtti pointers from to avoid having to
22523 search around for a place.
22524 (finish_base_struct): Likewise.
22525 (finish_struct_1): Likewise. Never create totally new vtables
22526 with totally new vtable pointers for rtti. Disable code to layout
22527 vtable pointers better until we want to break binary
22528 compatibility.
22529 * rtti.c (build_headof_sub): New routine to convert down to a
22530 sub-object that has an rtti pointer in the vtable.
22531 (build_headof): Use it. Also, use build_vtbl_ref now to be more
22532 maintainable.
22533 (build_dynamic_cast): Make sure we have saved it, if we need to.
22534 * search.c (dfs_init_vbase_pointers): Disable code that deals with
22535 a more efficient vtable layout, enable later.
22536 * call.c (flag_assume_nonnull_objects): Moved declaration to
22537 * cp-tree.h: here. Declare build_vtbl_ref.
22538 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
22539 function calls that want a tree.
22540
22541 Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
22542
22543 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
22544 other X subobjects in the most derived type. Ack.
22545
22546 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
22547 get_typeid will do it for us.
22548 (get_typeid_1): Break out call-building for expand_*_desc to use.
22549 (get_typeid): Call it.
22550 (expand_*_desc): Likewise.
22551 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
22552 and void *.
22553 (init_decl_processing): Lose builtin_type_tdescs lossage.
22554 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
22555
22556 Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
22557
22558 * pt.c (tsubst): When calling set_nested_typename, use
22559 TYPE_NESTED_NAME (current_class_type) instead of
22560 current_class_name.
22561
22562 * decl.c (pushdecl): Likewise.
22563 (pushdecl_class_level): Likewise.
22564 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
22565 set_nested_typename.
22566
22567 Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
22568
22569 * rtti.c (synthesize_tinfo_fn): Handle arrays.
22570
22571 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
22572
22573 Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
22574
22575 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
22576 (init_rtti_processing): Lose bad_cast_type.
22577 (build_dynamic_cast): Use throw_bad_cast.
22578
22579 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
22580
22581 * decl2.c (finish_file): Don't synthesize artificial functions
22582 that are external and not inline.
22583
22584 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
22585
22586 * decl2.c (finish_file): Handle having new inlines added to
22587 saved_inlines by synthesis.
22588
22589 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
22590
22591 Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
22592
22593 RTTI rewrite to initialize nodes as needed, not require that
22594 users #include <typeinfo>, complete functionality and reduce wasted
22595 space.
22596 * rtti.c (init_rtti_processing): New fn.
22597 (build_typeid): The vtable entry is now a function.
22598 (get_tinfo_var): New fn.
22599 (get_tinfo_fn): Likewise.
22600 (get_typeid): Use it.
22601 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
22602 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
22603 points __rtti_*.
22604 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
22605 (synthesize_tinfo_fn): New fn.
22606 * method.c (build_t_desc_overload): Lose.
22607 (build_overload_with_type): More generic.
22608 * decl.c (init_decl_processing): Call init_rtti_processing.
22609 * class.c (set_rtti_entry): Use get_tinfo_fn.
22610 * decl2.c (mark_vtable_entries): Mark the rtti function.
22611 (finish_prevtable_vardecl): Don't build_t_desc.
22612 (import_export_decl): Handle tinfo functions.
22613 (finish_file): Likewise.
22614 * typeck.c (inline_conversion): New fn.
22615 (build_function_call_real): Use it.
22616 * cp-tree.h: Add decls.
22617
22618 * method.c (hack_identifier): Also convert component_refs from
22619 references.
22620
22621 * lex.c (cons_up_default_function): Use the type, not the name, in
22622 declspecs.
22623
22624 * decl2.c (import_export_vtable): Fix weak vtables.
22625
22626 Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
22627
22628 * search.c (get_base_distance_recursive): Fix access checks for
22629 protected bases.
22630
22631 Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22632
22633 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
22634 cp-tree.h.
22635 (convert_harshness): Add prototypes wrapped by PROTO.
22636 * decl2.c (grok_function_init): Likewise.
22637 (do_toplevel_using_decl): Change to void return type.
22638 * class.c (build_vtable_entry): Remove decl of make_thunk.
22639 (merge_overrides): Fix order of arg definitions.
22640 (finish_vtbls): Likewise.
22641 (fixup_vtable_deltas): Likewise.
22642 (modify_all_direct_vtables): Likewise.
22643 (modify_all_indirect_vtables): Likewise.
22644 * search.c (get_base_distance_recursive): Likewise.
22645 (get_abstract_virtuals_1): Likewise.
22646 (fixup_virtual_upcast_offsets): Likewise.
22647 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
22648 * init.c (perform_member_init): Fix order of arg definitions.
22649 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
22650 * cp-tree.h (make_thunk): Add decl.
22651 (overload_template_name, push_template_decl): Add decls.
22652 (do_toplevel_using_decl): Change to void return type.
22653 (vec_binfo_member): Add decl.
22654
22655 Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22656
22657 * typeck.c (mark_addressable, convert_for_assignment,
22658 convert_for_initialization, pointer_int_sum, pointer_diff,
22659 unary_complex_lvalue): Add prototypes wrapped by PROTO.
22660 (convert_sequence): #if 0 fn decl, since definition also is.
22661
22662 Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
22663
22664 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
22665 cast to pointer types for type searching.
22666
22667 Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22668
22669 * typeck.c (get_delta_difference): Use cp_error, not error, in the
22670 case where BINFO == 0.
22671
22672 Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
22673
22674 * call.c (build_method_call): Fix wording of error messages so
22675 constructors come out right.
22676
22677 Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
22678
22679 * decl.c (push_overloaded_decl): Don't warn about hidden
22680 constructors when both the type and the function are declared
22681 in a system header file.
22682
22683 Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
22684
22685 * class.c (finish_struct_1): Propagate the TYPE_PACKED
22686 flag for the type to the type's fields.
22687
22688 Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22689
22690 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
22691
22692 Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
22693
22694 * class.c (base_info, finish_base_struct): Replace
22695 needs_virtual_dtor with base_has_virtual.
22696
22697 (finish_struct_1): Remove the old code that tried to make default
22698 destructors virtual. Use base_has_virtual when checking if we need
22699 to add a vtable entry for the rtti code.
22700
22701 Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
22702
22703 * pt.c (push_template_decl): Complain about template decl with
22704 inappropriate declaration.
22705
22706 Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
22707
22708 * typeck.c (build_x_unary_op): Remove bogus check for taking
22709 the address of a member function.
22710
22711 Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
22712
22713 * parse.y (constructor_declarator): Only push the class if
22714 we are not already in the class.
22715
22716 Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
22717
22718 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
22719 Add additional argument to INIT_CUMULATIVE_ARGS.
22720
22721 Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
22722
22723 * decl.c (shadow_tag): Fix error about anon union with methods.
22724
22725 * parse.y (self_reference): Only generate a self-reference if this
22726 is a non-template class.
22727 (opt.component_decl_list): Only use it if it was generated.
22728
22729 * parse.y (component_decl_1): Use constructor_declarator.
22730 (fn.def2): Likewise.
22731 (notype_component_declarator0): Likewise.
22732
22733 Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
22734
22735 * typeck.c (build_x_unary_op): Add checks for taking the address
22736 of a TARGET_EXPR or of a member function, and give appropriate
22737 warnings.
22738
22739 Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
22740
22741 * pt.c (process_template_parm): Allow template type parms to be
22742 used as types for template const parms.
22743
22744 Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
22745
22746 * init.c (expand_vec_init): Ensure the eh cleanups are on the
22747 function_obstack.
22748
22749 Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
22750
22751 * decl.c (lookup_name_real): Be even more picky about the
22752 ambiguous lookup warning.
22753 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
22754 * parse.y (constructor_declarator): Rather than here.
22755
22756 * parse.y (constructor_declarator): New nonterminal.
22757 (fn.def1): Use it.
22758 (explicit_instantiation): Likewise.
22759
22760 Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
22761
22762 Add implicit declaration of class name at class scope.
22763 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
22764 * parse.y (self_reference): New nonterminal.
22765 (opt.component_decl_list): Use it.
22766 (fn.def1): Add nested_name_specifier type_name cases.
22767 * class.c (build_self_reference): New function.
22768 (finish_struct): Handle access_default later, move self-reference
22769 decl to the end.
22770 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
22771 * cp-tree.h: Adjust.
22772
22773 * pt.c (do_function_instantiation): Separate handling of member
22774 functions and non-member functions properly.
22775
22776 Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
22777
22778 * pt.c (process_template_parm): Improve error for 'volatile class K'.
22779
22780 * class.c (finish_struct_1): Check the right slot for destructors.
22781
22782 * decl.c (start_enum): Complain about enum templates.
22783
22784 Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
22785
22786 * init.c (resolve_offset_ref): Offset pointers to member data by one.
22787 * typeck.c (unary_complex_lvalue): Likewise.
22788
22789 Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
22790
22791 * typeck.c (c_expand_return): Check for a returned local
22792 array name, similar to the check for an ADDR_EXPR.
22793
22794 Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
22795
22796 * decl.c (cp_finish_decl): Don't build cleanups for static
22797 variables here.
22798
22799 Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
22800
22801 * typeck.c (build_modify_expr): Fix error messages to be more
22802 accurate.
22803 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
22804 assignment operators.
22805 * error.c (assop_as_string): Likewise. Add support for `%Q' for
22806 assignment operators.
22807
22808 Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
22809
22810 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
22811 give an error if initialized. pedwarn about nested type with the
22812 same name as its enclosing class.
22813
22814 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
22815
22816 * typeck.c (require_complete_type): Be sure to instantiate the
22817 MAIN_VARIANT of the type.
22818
22819 * decl2.c (finish_file): Instantiate pending templates before
22820 processing static constructors and destructors.
22821
22822 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
22823 unless at_eof.
22824
22825 Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
22826
22827 * decl2.c (delete_sanity): If error_mark_node is passed
22828 in as an expression, quit while we're ahead.
22829
22830 * decl.c (grokdeclarator): Give an error message if `friend'
22831 is combined with any storage class specifiers.
22832
22833 Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
22834
22835 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
22836 definition of nonexistent nested type.
22837
22838 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
22839 not to say 'typedef'.
22840
22841 Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22842
22843 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
22844 * search.c (dfs_walk, dfs_init_vbase_pointers,
22845 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
22846 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
22847
22848 Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
22849
22850 * except.c (build_throw): Support minimal parse.
22851 * pt.c (tsubst_copy): Support THROW_EXPR.
22852 * decl2.c (build_expr_from_tree): Likewise.
22853
22854 * pt.c (mangle_class_name_for_template): Always allocate
22855 scratch_firstobj.
22856
22857 Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
22858
22859 * cvt.c (cp_convert_to_pointer): Give an appropriate error
22860 when trying to cast from an incomplete type.
22861
22862 Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
22863
22864 * pt.c (instantiate_class_template): Don't bother setting up
22865 CLASSTYPE_TAGS explicitly, as the nested types will add
22866 themselves.
22867
22868 Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
22869
22870 * decl.c (shadow_tag): Remove old error check for usage of
22871 an enum without a previous declaration.
22872 (xref_tag): Add error message about usage of enums without a
22873 previous declaration.
22874
22875 Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
22876
22877 * lex.c (do_identifier): Only do name consistency check if we're
22878 parsing.
22879
22880 * pt.c (push_template_decl): Don't crash if we get a member defn
22881 that doesn't match.
22882
22883 * decl.c (xref_tag_from_type): New function to do an xref without
22884 always having to figure out code_type_node.
22885 * cp-tree.h: Declare it.
22886 * pt.c (instantiate_class_template): Use it for friend classes.
22887 (lookup_template_class): Use it.
22888
22889 * typeck2.c (build_functional_cast): Pull out a single parm before
22890 passing it to build_c_cast.
22891
22892 Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
22893
22894 * expr.c (do_case): Give an error message if a pointer is
22895 given as a case value.
22896
22897 Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
22898
22899 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
22900 an overload list.
22901
22902 * lex.c (cons_up_default_function): Really, now, interface hackery
22903 does not apply to synthesized methods.
22904
22905 Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
22906
22907 * call.c (build_method_call): Ctors and dtors now have special names
22908 with respect to lookups.
22909 * class.c (add_method): Likewise.
22910 (grow_method): Likewise.
22911 (finish_struct_methods): Likewise.
22912 (warn_hidden): Likewise.
22913 (finish_struct_1): Likewise.
22914 * cvt.c (convert_to_reference): Likewise.
22915 (convert_to_aggr): Likewise.
22916 (cp_convert): Likewise.
22917 * decl2.c (check_classfn): Likewise.
22918 * init.c (expand_member_init): Likewise.
22919 (expand_default_init): Likewise.
22920 (expand_aggr_init_1): Likewise.
22921 (build_offset_ref): Likewise.
22922 (build_new): Likewise.
22923 (build_delete): Likewise.
22924 * lex.c (do_inline_function_hair): Likewise.
22925 * search.c (lookup_field_1): Likewise.
22926 (lookup_fnfields_here): Likewise.
22927 (lookup_field): Likewise.
22928 (lookup_fnfields): Likewise.
22929 (get_virtual_destructor): Likewise.
22930 (dfs_debug_mark): Likewise.
22931 (dfs_pushdecls): Likewise.
22932 (dfs_compress_decls): Likewise.
22933 * tree.c (layout_basetypes): Likewise.
22934 * typeck.c (build_component_ref): Likewise.
22935 (build_x_function_call): Likewise.
22936 (build_modify_expr): Likewise.
22937 (convert_for_initialization): Likewise.
22938 (build_functional_cast): Likewise.
22939 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
22940 (CTOR_NAME): New.
22941 (DTOR_NAME): New.
22942 * decl.c (ctor_identifier): New.
22943 (dtor_identifier): New.
22944 (init_decl_processing): Set them.
22945
22946 Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
22947
22948 * typeck.c (build_component_ref): Don't get confused by fields whose
22949 context has no type name, like pointer to member functions.
22950
22951 Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
22952
22953 * decl.c (grokdeclarator): Handle typedef without declarator.
22954
22955 * pt.c (tsubst): Handle SCOPE_REF in declarator.
22956
22957 * parse.y (bad_parm): Catch another case of missing `typename'.
22958
22959 * lex.c (yyprint): Handle TYPE_DECLs.
22960
22961 * decl.c (start_function): Don't try to be clever.
22962
22963 * lex.c: Lose compiler_error_with_decl.
22964 * typeck2.c: Lose error_with_aggr_type.
22965 (incomplete_type_error): Use cp_* instead of old functions.
22966 (readonly_error): Likewise.
22967 * typeck.c (convert_arguments): Likewise.
22968 * search.c (lookup_nested_field): Likewise.
22969 * method.c (make_thunk): Likewise.
22970 * decl.c (grokparms): Likewise.
22971 * cp-tree.h: Update.
22972
22973 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
22974 and value.
22975
22976 Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
22977
22978 * method.c (build_opfncall): When deleting a pointer to an
22979 array, build a new pointer to the tree past any ARRAY_TYPE
22980 nodes.
22981
22982 Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22983
22984 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
22985
22986 Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
22987
22988 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
22989 and ! DECL_INLINE.
22990
22991 * decl.c (finish_function): Don't set nested based on
22992 hack_decl_function_context.
22993 * parse.y (function_try_block): Check for nested function.
22994 (pending_inlines): Likewise.
22995
22996 * decl2.c (build_expr_from_tree): If a unary op already has a
22997 type, just return it.
22998
22999 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
23000
23001 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
23002 (finish_file): Check the return value of walk_vtables.
23003 (finish_prevtable_vardecl): Return int.
23004 (finish_vtable_vardecl): Likewise.
23005 (prune_vtable_vardecl): Likewise.
23006 * lex.c (set_vardecl_interface_info): Likewise.
23007 * cp-tree.h: Adjust return types.
23008
23009 * class.c (delete_duplicate_fields_1): Don't complain about
23010 duplicate nested types if they're the same type.
23011 (finish_struct): Remove check for duplicate.
23012 * decl2.c (grokfield): Don't check for typedef of anonymous type.
23013
23014 Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
23015
23016 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
23017
23018 * decl.c (grokdeclarator): Lose special handling of class-level
23019 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
23020 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
23021
23022 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
23023
23024 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
23025
23026 * search.c (compute_access): Fix handling of anonymous union
23027 members.
23028 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
23029 from anonymous unions to their members.
23030
23031 * typeck.c (build_x_function_call): For static member functions,
23032 hand off to build_member_call.
23033
23034 Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
23035
23036 * typeck.c (build_component_ref): Handle OFFSET_REFs.
23037
23038 * init.c (expand_vec_init): Fix init == 0 case.
23039
23040 Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
23041
23042 * init.c (build_new): pedwarn about init and array new.
23043 (expand_vec_init): Handle lists, use convert_for_initialization.
23044
23045 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
23046 when converting to an aggregate type.
23047 * cvt.c (cp_convert): Pass it through.
23048
23049 * typeck.c (build_conditional_expr): Handle user-defined
23050 conversions to slightly different types.
23051
23052 * decl.c (grokdeclarator): Force an array type in a parm to be
23053 permanent.
23054
23055 * decl2.c (do_using_directive): Sorry.
23056 (do_namespace_alias): Likewise.
23057 * lex.c (real_yylex): Warn about using the `namespace' keyword.
23058
23059 Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
23060
23061 * parse.y (datadef): Move call to note_list_got_semicolon up.
23062
23063 Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
23064
23065 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
23066
23067 Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
23068
23069 * decl.c (cp_finish_decl): The exception regions have to be
23070 nested, not overlapping. We start the exception region for a
23071 decl, after it has been fully built, and all temporaries for it
23072 have been cleaned up.
23073
23074 Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
23075
23076 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
23077
23078 Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
23079
23080 * tree.def: Add RETURN_INIT.
23081 * pt.c (instantiate_decl): Handle RETURN_INIT.
23082 * decl.c (store_return_init): Handle minimal_parse_mode.
23083
23084 * tree.c (cp_build_type_variant): Just return an error_mark_node.
23085 * decl.c (make_typename_type): Don't try to get the file and line
23086 of an identifier.
23087 * typeck.c (comptypes): Handle TYPENAME_TYPE.
23088
23089 Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
23090
23091 * decl.c (poplevel): Make sure we clear out and restore old local
23092 non-VAR_DECL values by default when they go out of scope.
23093
23094 Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
23095
23096 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
23097 referring to addresses of variables and functions.
23098
23099 * error.c (dump_expr): Support SIZEOF_EXPR.
23100
23101 * init.c (do_friend): Use the return value of check_classfn.
23102
23103 * typeck.c (convert_arguments): Call complete_type.
23104
23105 * method.c (hack_identifier): After giving an error, set value to
23106 error_mark_node.
23107
23108 Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
23109
23110 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
23111 lossage for local classes.
23112 * cp-tree.h: Declare it.
23113 * decl.c (lookup_name_real): Evil, painful hack for local classes.
23114 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
23115 Use hack_decl_function_context.
23116 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
23117 (start_function): Use hack_decl_function_context.
23118 (finish_function): Likewise.
23119 * method.c (synthesize_method): Likewise.
23120 * lex.c (process_next_inline): Likewise.
23121 (do_pending_inlines): Likewise.
23122 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
23123 done with it.
23124
23125 Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
23126
23127 * sig.c (build_signature_pointer_or_reference_type): Align
23128 signature pointers/references on 8-byte boundaries so they can be
23129 grabbed 2 words at a time on a Sparc.
23130
23131 Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
23132
23133 * method.c (hack_identifier): Requiring a static chain is now a
23134 hard error.
23135 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
23136 functions.
23137
23138 Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
23139
23140 * init.c (build_offset_ref): Call complete_type.
23141
23142 * decl.c (pop_from_top_level): Always pop previous_class_type.
23143
23144 * parse.y: Handle multiple decls in a for-init-statement.
23145 * pt.c (tsubst_expr): Likewise.
23146
23147 * pt.c (tsubst): Use tsubst_expr for the second operand of an
23148 ARRAY_REF.
23149
23150 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
23151 (poplevel_class): Set it here.
23152 (pop_from_top_level): Pop it here if we're returning to class scope.
23153 * class.c (pushclass): Don't set it here.
23154
23155 * decl.c (maybe_push_to_top_level): Save current_template_parms,
23156 and clear it if !pseudo.
23157 (pop_from_top_level): Restore it.
23158
23159 * decl2.c (finish_file): Push the dummy each time we walk the list
23160 of vtables.
23161
23162 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
23163 something for CAST_EXPR.
23164
23165 Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
23166
23167 * cvt.c (cp_convert): Warn about implicit conversion of the
23168 address of a function to bool, as it is always true.
23169
23170 Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
23171
23172 * typeck.c (c_expand_return): Fix warning for local externs returned.
23173
23174 Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
23175
23176 * tree.c (mapcar): Propagate const and volatile properly.
23177
23178 * typeck.c (complete_type): Be sure to instantiate the
23179 MAIN_VARIANT of the type.
23180
23181 * method.c (synthesize_method): Class interface hackery does not
23182 apply to synthesized methods.
23183
23184 Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
23185
23186 * pt.c (comp_template_args): Use comptypes rather than just
23187 checking for TEMPLATE_TYPE_PARM equivalence.
23188
23189 * typeck.c (build_x_function_call): Call complete_type before
23190 checking TYPE_OVERLOADS_CALL_EXPR.
23191
23192 Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
23193
23194 * g++.c (main): Check also for new define ALT_LIBM.
23195
23196 Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
23197
23198 * pt.c (instantiate_class_template): If we don't have a pattern
23199 yet, that's OK.
23200 (coerce_template_parms): If we see a local class, bail.
23201
23202 * decl.c (grok_reference_init): Make sure there's a type before
23203 checking its code.
23204
23205 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
23206 (push_template_decl): Likewise.
23207
23208 * parse.y (named_class_head): Set
23209 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
23210
23211 * decl.c (xref_tag): Diagnose redeclaration of template
23212 type-parameter name.
23213
23214 * error.c (dump_type): Handle anonymous template type parms.
23215
23216 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
23217 TYPE_STUB_DECL.
23218 (coerce_template_parms): Likewise.
23219
23220 Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
23221
23222 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
23223 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
23224
23225 Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
23226
23227 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
23228 before trying to get its STUB_DECL.
23229 (coerce_template_parms): Likewise.
23230
23231 * parse.y (template_type_parm): If they didn't use 'class',
23232 pretend they did after giving an error.
23233
23234 * pt.c (coerce_template_parms): Diagnose use of local class.
23235
23236 * decl.c (grok_reference_init): Use instantiate_type.
23237
23238 * error.c (dump_expr): Handle TEMPLATE_DECLs.
23239
23240 * parse.y (named_class_head): Diagnose mismatching types and tags.
23241
23242 * decl.c (pushdecl): Type decls and class templates clash with
23243 artificial type decls, not hide them.
23244
23245 * decl.c (redeclaration_error_message): Diagnose redefinition of
23246 templates properly.
23247 (duplicate_decls): Diagnose disallowed overloads for template
23248 functions, too.
23249
23250 * decl.c (start_decl): Call complete_type before checking for a
23251 destructor.
23252
23253 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
23254
23255 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
23256
23257 Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
23258
23259 * decl.c (grok_op_properties): Don't check for operator++(int) in
23260 a template.
23261
23262 * tree.c (perm_manip): Return a copy of variable and function
23263 decls with external linkage.
23264
23265 * tree.def: Change some of the min tree codes to type "1".
23266 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
23267 * method.c (build_overload_int): Emit something arbitrary for
23268 anything but an INTEGER_CST if we're in a template.
23269
23270 * decl.c (cp_finish_decl): Call complete_type before deciding
23271 whether or not to lay out the decl.
23272
23273 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
23274
23275 Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
23276
23277 * typeck2.c (build_x_arrow): Call complete_type.
23278
23279 * pt.c (add_pending_template): Broken out.
23280 (lookup_template_class): If -fexternal-templates, call it for all
23281 the methods of implemented types.
23282 (instantiate_class_template): Instead of instantiating them here.
23283 (instantiate_decl): Handle -fexternal-templates earlier.
23284
23285 Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23286
23287 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
23288 memoized lookup stuff inside GATHER_STATISTICS.
23289
23290 Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
23291
23292 * decl.c (start_decl): Complain about array of incomplete type
23293 here.
23294 (grokdeclarator): Not here.
23295
23296 * parse.y (template_parm): Expand full_parm inline so we can set
23297 the rule's precedence.
23298
23299 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
23300 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
23301 * decl2.c (grokbitfield): Don't check for integer constant here.
23302 * class.c (finish_struct_1): Check here.
23303
23304 * decl.c (define_label): Make the min decl go on permanent_obstack.
23305
23306 * pt.c (unify): Don't handle CONST_DECLs.
23307 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
23308 (tsubst_copy): Likewise.
23309
23310 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
23311 CONST_DECL for a template parm.
23312
23313 Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
23314
23315 * decl.c (grokdeclarator): Complain about array of incomplete type
23316 here.
23317 (start_decl_1): Not here.
23318
23319 * pt.c (tsubst): Handle pointer-to-function declarators.
23320
23321 * method.c (hack_identifier): If pedantic, diagnose local class
23322 methods that require a static chain.
23323
23324 * decl.c (grok_op_properties): No longer static.
23325 * cp-tree.h: Declare it.
23326 * pt.c (tsubst): Call it for operators.
23327 Use tsubst_copy for TREE_VECs.
23328
23329 * parse.y (template_arg): The expr has precedence like '>'.
23330
23331 Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
23332
23333 * pt.c (coerce_template_parms): Don't coerce an expression using
23334 template parms.
23335 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
23336 (tsubst): Don't use build_index_2_type if the max_value uses template
23337 parms.
23338 * method.c (build_overload_int): Emit something arbitrary for an
23339 expression using template parms.
23340
23341 * parse.y (template_close_bracket): New non-terminal to catch use
23342 of '>>' instead of '> >' in template class names.
23343 (template_type): Use it.
23344 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
23345
23346 * tree.def: Add CAST_EXPR.
23347 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
23348 CONVERT_EXPR for minimal_parse_mode.
23349 * typeck.c (build_c_cast): Likewise.
23350 * pt.c (tsubst_copy): Likewise.
23351 * decl2.c (build_expr_from_tree): Likewise.
23352 * error.c (dump_expr): Likewise.
23353
23354 Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23355
23356 * except.c (SetTerminate, SetUnexpected): Put back global vars.
23357 (init_exception_processing): Put back decl/init of
23358 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
23359 fns from libstdc++.
23360
23361 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
23362 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
23363 Delete unused fns.
23364 * cp-tree.h (declare_uninstantiated_type_level,
23365 uninstantiated_type_level_p): Delete prototypes.
23366
23367 Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
23368
23369 * pt.c (tsubst_expr): Add default return.
23370
23371 Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23372
23373 * error.c (fndecl_as_string): Delete unused arg CNAME.
23374 * sig.c (build_signature_table_constructor,
23375 build_signature_method_call): Fix calls.
23376
23377 * class.c (the_null_vtable_entry): Delete var definition.
23378 (init_class_processing): Delete tree the_null_vtable_entry init.
23379 * decl.c (no_print_{functions, builtins}): Declare as static.
23380 (__tp_desc_type_node): #if 0 var definition.
23381 (init_type_desc): #if 0 init of __tp_desc_type_node.
23382 (vb_off_identifier): Move var decl into init_decl_processing.
23383 (current_function_assigns_this): Declare as static.
23384 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
23385 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
23386 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
23387 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
23388 * init.c (BI_header_type, BI_header_size): Declare as static.
23389 * pt.c (template_classes): Delete unused var.
23390 (add_pending_template): Delete decl for non-existent fn.
23391 (lookup_template_class): Delete vars CODE and TAG_CODE.
23392 (instantiate_template): Delete unused var TARGS.
23393 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
23394 Delete decls.
23395 (__tp_desc_type_node): #if 0 var decl.
23396 (fndecl_as_string): Fix prototype.
23397
23398 Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
23399
23400 * tree.def: Add GOTO_STMT.
23401 * pt.c (tsubst_expr): Support goto and labels.
23402 * decl.c (define_label): Support minimal parsing.
23403 * parse.y (simple_stmt): Likewise.
23404
23405 Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23406
23407 * xref.c (GNU_xref_member): Only define/set var I if
23408 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
23409 used.
23410 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
23411 (GNU_xref_end): Fix call.
23412 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
23413 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
23414
23415 * tree.c (build_exception_variant): Delete unused vars I, A, T,
23416 T2, and CNAME.
23417 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
23418 (mapcar): Delete unused var CODE.
23419 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
23420 (break_out_cleanups): Fix call.
23421 (bot_manip): Likewise.
23422 * call.c (build_method_call): Likewise.
23423 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
23424 Likewise.
23425 * typeck.c (unary_complex_lvalue, build_modify_expr,
23426 convert_for_initialization): Likewise.
23427 * typeck2.c (build_functional_cast): Likewise.
23428 * cp-tree.h (build_cplus_new): Fix prototype.
23429
23430 * repo.c (open_repo_file): Delete unused var Q.
23431 (repo_compile_flags, repo_template_declared,
23432 repo_template_defined, repo_class_defined, repo_inline_used,
23433 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
23434 (repo_get_id, repo_vtable_used): Declare as static.
23435 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
23436 prototypes.
23437
23438 Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
23439
23440 * parse.y (pending_inlines): Add function_try_block case.
23441
23442 * pt.c (unify): Fix for template const parms.
23443
23444 Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23445
23446 * lex.c (extract_interface_info): Delete forward decl.
23447 (default_copy_constructor_body, default_assign_ref_body): Delete
23448 decls for non-existent functions.
23449 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
23450 (init_lex): Delete setting them.
23451 (cons_up_default_function): Delete unused vars FUNC_BUF,
23452 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
23453 #if 0'd synth code.
23454 (toplevel, expression_obstack): Delete unused extern decls.
23455 (tree_node_kind): Delete unused enum.
23456 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
23457 GATHER_STATISTICS.
23458 (tree_node_kind_names): Delete unused extern decl.
23459 (synth_obstack): Delete unused var.
23460 (init_lex): Don't set it.
23461 (init_parse): Add decl before use.
23462 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
23463 (current_unit_{name, language}): Delete unused vars.
23464 (check_newline): Don't bother setting them, just accept the #pragma.
23465 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
23466 (current_unit_{name, language}): Delete decls.
23467
23468 * search.c: Wrap all of the memoized functions, macros, and
23469 variables inside #ifdef GATHER_STATISTICS.
23470 (lookup_field, lookup_fnfields): Likewise.
23471 (init_search_processing): Likewise.
23472 (reinit_search_statistics): Wrap whole function.
23473 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
23474
23475 * decl.c (finish_function): Only call pop_memoized_context if
23476 GATHER_STATISTICS is defined.
23477 (start_function): Likewise for push_memoized_context.
23478 * class.c (pushclass, popclass): Likewise.
23479
23480 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
23481 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
23482
23483 * cvt.c (cp_convert): Delete unused local var FORM.
23484 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
23485 prototypes.
23486
23487 Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
23488
23489 * pt.c (do_poplevel): Oops; really return what we get from
23490 poplevel this time.
23491
23492 Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23493
23494 * cp-tree.h (is_aggr_type): Add prototype.
23495
23496 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
23497 * method.c ({push,pop}_cp_function_context): Delete decls.
23498 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
23499 (SetUnexpected, SetTerminate): Delete unused vars.
23500 (init_exception_processing): Don't set SetUnexpected or
23501 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
23502 (output_exception_table_entry): Delete unused array LABEL.
23503 (expand_internal_throw): Delete unused var PARAMS.
23504 (expand_start_catch_block): Delete unused var CLEANUP.
23505 (emit_exception_table): Delete unused var EH_NODE_DECL.
23506 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
23507 GOTO_UNWIND_AND_THROW. Don't set them.
23508 (end_eh_unwinder): Add top decl.
23509 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
23510 (exception_section, push_rtl_perm, do_function_call,
23511 lang_interim_eh, push_eh_cleanup, eh_outer_context,
23512 expand_end_eh_spec, end_eh_unwinder): Declare as static.
23513 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
23514 throw_used): Likewise.
23515 * cp-tree.h (expand_end_eh_spec): Delete prototype.
23516
23517 * search.c (dfs_mark, dfs_mark_vtable_path,
23518 dfs_unmark_vtable_path, dfs_mark_new_vtable,
23519 dfs_unmark_new_vtable, dfs_clear_search_slot,
23520 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
23521 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
23522 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
23523 functions.
23524 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
23525 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
23526 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
23527 Only define #ifdef GATHER_STATISTICS.
23528 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
23529 is defined.
23530 (vbase_decl): Delete var definition.
23531 (init_search): Delete old decl.
23532 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
23533 never actually used.
23534 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
23535 (get_base_distance_recursive): Delete unused fourth arg
23536 BASETYPE_PATH. Fix call .
23537 (get_base_distance): Fix call.
23538 (push_class_decls): Delete unused var ID.
23539 (make_memoized_table_entry): Declare as static.
23540 (breadth_first_search): Declare as static.
23541 (tree_has_any_destructor_p): Declare as static.
23542 (pop_class_decls): Delete unused arg pop_class_decls.
23543 * class.c (popclass): Fix call to pop_class_decls.
23544 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
23545 tree_has_any_destructor_p): Delete prototypes.
23546
23547 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
23548 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
23549 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
23550 (build_user_desc): Delete unused var T.
23551 (build_class_desc): Delete unused vars T and OFF.
23552 (build_t_desc): Delete unused var NAME_STRING.
23553 (build_headof): Make static.
23554 (get_bad_cast_node): Likewise.
23555 (get_def_to_follow): Likewise.
23556 * cp-tree.h (init_type_desc): Add prototype.
23557 (build_headof): Remove prototype.
23558
23559 Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
23560
23561 * pt.c (tsubst): Only look for matching decls at file scope for
23562 non-member functions.
23563
23564 * call.c (build_scoped_method_call): Handle scoped destructor
23565 calls in templates.
23566
23567 * decl.c (*_top_level): Also save previous_class_values.
23568
23569 * pt.c (tsubst_expr): Support do {} while loops.
23570 * parse.y (simple_stmt): Likewise.
23571 * tree.def: Likewise.
23572
23573 * method.c (build_overload_identifier): For a class nested in a
23574 template class, don't mangle in the template parms from our
23575 context.
23576
23577 * lex.c, cp-tree.h: Remove support for template instantiations in
23578 the pending_inlines code.
23579 * pt.c: Remove dead functions and unused arguments.
23580 (uses_template_parms): TYPENAME_TYPEs always use template parms.
23581 * parse.y: Stop passing anything to end_template_decl.
23582 * tree.c (print_lang_statistics): Only print tinst info #ifdef
23583 GATHER_STATISTICS.
23584
23585 Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23586
23587 * init.c (expand_recursive_init{,_1}): Delete decls.
23588 (sort_member_init): Delete unused var INIT.
23589 (emit_base_init): Delete unused var X.
23590 (build_offset_ref): Delete unused var CNAME.
23591 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
23592 (emit_base_init): Delete unused local var BASE. Delete extern
23593 decl of IN_CHARGE_IDENTIFIER.
23594 (build_delete): Delete unused local var VIRTUAL_SIZE.
23595
23596 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
23597 (build_delete): Fix call.
23598 * decl2.c (delete_sanity): Likewise.
23599 * cp-tree.h (build_vec_delete): Update prototype.
23600
23601 * typeck.c (common_base_type): Delete unused var TMP.
23602 (build_binary_op): Delete local var ARGS_SAVE.
23603 (build_array_ref): Delete unused var ITYPE.
23604 (c_expand_return): Delete unused var USE_TEMP.
23605
23606 * typeck.c (compexcepttypes): Delete unused arg STRICT.
23607 (comptypes): Fix calls.
23608 * decl.c (duplicate_decls): Likewise.
23609 * cp-tree.h (compexcepttypes): Delete extra arg.
23610
23611 * decl2.c (check_classfn): Delete unused second arg CNAME.
23612 * decl.c (start_decl, grokfndecl): Fix calls.
23613 * init.c (do_friend): Likewise.
23614 * cp-tree.h (check_classfn): Update prototype.
23615
23616 * cp-tree.h (signature_error, import_export_vtable,
23617 append_signature_fields, id_in_current_class, mark_used,
23618 copy_assignment_arg_p): Add decls.
23619 * decl2.c (mark_used): Delete decl.
23620
23621 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
23622
23623 * class.c (get_vtable_entry): Disable unused function.
23624 (doing_hard_virtuals): Delete unused static global var.
23625 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
23626 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
23627 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
23628 (modify_one_vtable): Delete unused var OLD_RTTI.
23629 (finish_struct_anon): Delete unused vars OFFSET and X.
23630 (finish_struct_bits): Delete unused var METHOD_VEC.
23631 (get_basefndecls): Delete unused var PURPOSE. Delete unused
23632 for-scope local variable METHODS.
23633
23634 * call.c (user_harshness): Delete unused/unneeded arg PARM.
23635 (ideal_candidate): Delete unused args BASETYPE and PARMS.
23636 (build_method_call): Delete unused args passed into ideal_candidate.
23637 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
23638 * cp-tree.h (synthesize_method): Add decl.
23639
23640 * decl.c (note_level_for_for): Give void return type.
23641 (pushdecl_nonclass_level): Likewise.
23642 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
23643 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
23644 (suspend_binding_level): Delete unused var LEVEL.
23645 (duplicate_decls): Delete unused var CTYPE.
23646 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
23647 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
23648 PTR_ENDLINK.
23649 (grokdeclarator): Delete unused var C.
23650 (grokdeclarator): Delete unused var SIZE_VARIES.
23651 (grokparms): Delete unused var SAW_VOID.
23652 (start_function): Delete unused var OLDDECL.
23653 (cplus_expand_expr_stmt): Delete unused var
23654 REMOVE_IMPLICIT_IMMEDIATELY.
23655
23656 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
23657
23658 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
23659
23660 Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
23661
23662 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
23663 (build_min_nt): Likewise.
23664 * pt.c (do_pushlevel): Emit line note.
23665 (do_poplevel): Return what we get from poplevel.
23666 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
23667 * parse.y: Use do_pushlevel and do_poplevel.
23668 * cp-tree.h: Declare do_poplevel.
23669
23670 * cp-tree.h: Declare at_eof.
23671 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
23672 * decl2.c (import_export_decl): Renamed from import_export_inline.
23673 (finish_file): Call it to do interface handling for statics.
23674 * pt.c (tsubst_copy): Call mark_used on variables and functions
23675 used here.
23676
23677 * decl2.c (finish_file): Don't emit statics we can't generate.
23678 * pt.c (instantiate_decl): Don't set interface on instantiations
23679 we can't generate.
23680
23681 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
23682 * tree.c (print_lang_statistics): Print max template depth.
23683 * pt.c (push_tinst_level): Dump entire instantiation context.
23684 (instantiate_class_template): Use it and pop_tinst_level.
23685 (instantiate_decl): Likewise.
23686
23687 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
23688 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
23689
23690 Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
23691
23692 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
23693 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
23694 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
23695 the new template implementation.
23696
23697 Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23698
23699 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
23700
23701 Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
23702
23703 * decl.c (cp_finish_decl): Delay emitting the debug information for
23704 a typedef that has been installed as the canonical typedef, if the
23705 type has not yet been defined.
23706
23707 Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
23708
23709 * decl2.c (grokfield): Still call pop_nested_class for access decls.
23710
23711 Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23712
23713 * decl.c (lookup_label): Call label_rtx.
23714
23715 * decl.c (make_binding_level): New function.
23716 (pushlevel, pushlevel_class): Call it instead of explicit
23717 duplicate calls to xmalloc.
23718
23719 * decl.c (init_decl_processing): Delete useless build_pointer_type
23720 call.
23721
23722 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
23723 (sizet_ftype_string): Delete variable.
23724 (init_decl_processing): Add built-in functions fabsf, fabsl,
23725 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
23726 variable strlen_ftype, used for strlen.
23727
23728 Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
23729
23730 * decl.c (push_to_top_level): Start from current_binding_level
23731 again for now; the stl hacks depend on g++ being broken in this
23732 way, and it'll be fixed in the template rewrite.
23733
23734 * tree.def: Add USING_DECL.
23735 * decl2.c (do_class_using_decl): Implement.
23736 (grokfield): Pass access decls off to do_class_using_decl instead of
23737 grokdeclarator.
23738 * error.c (dump_decl): Handle USING_DECLs.
23739 * decl.c (grokdeclarator): Remove code for handling access decls.
23740 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
23741 as access decls for now.
23742 (finish_struct): Don't check USING_DECLs for other uses of the name.
23743
23744 * search.c (get_matching_virtual): Use cp_error_at.
23745
23746 Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23747
23748 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
23749 match c-typeck.c.
23750 (self_promoting_args_p): Move the check that TYPE is non-nil
23751 before trying to look at its main variant.
23752 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
23753
23754 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
23755 Delete macros.
23756 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
23757 (do_friend): Delete call to xref_friend.
23758 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
23759
23760 * typeck.c (convert_sequence): #if 0 unused function.
23761
23762 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
23763 be in decl_in_memory_p.
23764 (decl_in_memory_p): Delete decl.
23765 * expr.c (decl_in_memory_p): Delete fn.
23766 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
23767
23768 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
23769
23770 Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
23771
23772 * class.c (finish_struct_1): Check for a pure-specifier on a
23773 non-virtual function here.
23774
23775 * decl2.c (grok_function_init): Don't check whether the function
23776 is virtual here.
23777 (grokfield): Don't call check_for_override here.
23778
23779 * decl.c (push_to_top_level): Start from inner_binding_level,
23780 check class_shadowed in class levels.
23781
23782 Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
23783
23784 * decl.c (resume_level): Ignore things that don't have names, instead
23785 of core dumping.
23786
23787 Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23788
23789 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
23790
23791 Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
23792
23793 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
23794 synthesized dtor.
23795
23796 * parse.y (complete_type_name): Bind global_scope earlier.
23797 (complex_type_name): Likewise.
23798 (qualified_type_name): Remove.
23799
23800 Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
23801
23802 * decl.c (grokfndecl): Move code that looks for virtuals in base
23803 classes...
23804 * class.c (check_for_override): ... to a new function.
23805 (finish_struct_1): Call it.
23806
23807 * cp-tree.h: Declare warn_sign_compare.
23808
23809 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
23810 rather than extra_warnings to decide whether to warn about
23811 comparison of signed and unsigned.
23812
23813 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
23814 implies -Wsign-compare. -Wall doesn't imply -W.
23815
23816 Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
23817
23818 * typeck.c (build_component_ref): Fix to handle anon unions in base
23819 classes as well.
23820
23821 Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23822
23823 * class.c (resolves_to_fixed_type_p): Delete code dealing with
23824 a WITH_CLEANUP_EXPR, since we don't generate them any more.
23825 * cvt.c (build_up_reference): Likewise.
23826 * decl.c (grok_reference_init): Likewise.
23827 (cp_finish_decl): Likewise.
23828 * error.c (dump_expr): Likewise.
23829 * tree.c (real_lvalue_p): Likewise.
23830 (lvalue_p): Likewise.
23831 (build_cplus_new): Likewise.
23832 (unsave_expr_now): Likewise.
23833 * typeck.c (unary_complex_lvalue, build_modify_expr,
23834 c_expand_return): Likewise.
23835
23836 Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23837
23838 Make the C++ front-end pay attention to attributes for structures.
23839 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
23840 finish_struct_1.
23841 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
23842 Take out old round_up_size use and setting the DECL_ALIGN possibly
23843 using it. Take out setting of TYPE_ALIGN to round_up_size, which
23844 can override what the attribute set.
23845 * cp-tree.h (finish_struct): Update prototype.
23846 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
23847 attributes to finish_struct.
23848 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
23849 value down into finish_struct.
23850 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
23851
23852 Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
23853
23854 * decl.c (poplevel): Re-word dead for local handling.
23855 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
23856 (cp_finish_decl): If is_for_scope, check for duplicates so
23857 we can disable is_for_scope. Otherwise, preserve_temp_slots.
23858
23859 * lex.c (do_identifier): Use global binding in preference of
23860 dead for local variable.
23861
23862 Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
23863
23864 * init.c (initializing_context): Handle anon union changes, the
23865 context where fields of anon unions can be initialized now has to be
23866 found by walking up the TYPE_CONTEXT chain.
23867
23868 Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
23869
23870 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
23871 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
23872 (obscure_complex_init): If bss is supported, always set
23873 DECL_INITIAL to error_mark_node.
23874
23875 Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23876
23877 * init.c (is_friend): Make sure there's a context before we see if
23878 it's an aggr type.
23879
23880 Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
23881
23882 * init.c (is_friend): Classes are not friendly with nested classes.
23883
23884 Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
23885
23886 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
23887 and record its result.
23888
23889 Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
23890
23891 * class.c (finish_struct_anon): Switch around code to not move anon
23892 union elements around, nor mess up their contexts, nor offsets,
23893 instead we now build up the right number of COMPONENT_REFs for all
23894 the anon unions that may be present at build_component_ref time.
23895 * typeck.c (lookup_anon_field): New routine to handle field lookup
23896 on fields without names. We find them, based upon their unique type
23897 instead.
23898 * typeck.c (build_component_ref): Allow FIELD_DECL components.
23899 Handle finding components in anonymous unions, and ensure that a
23900 COMPONENT_REF is built for each level as necessary.
23901
23902 Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
23903
23904 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
23905 code that ensures that copy ctors are used if appropriate.
23906
23907 Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23908
23909 * init.c (build_vec_delete): Only give an error if base isn't an
23910 error_mark_node.
23911
23912 Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
23913
23914 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
23915 (yylex): If we see `new', keep slurping.
23916
23917 Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
23918
23919 * class.c (finish_struct_1): Move code for handling anon unions...
23920 (finish_struct_anon): to here. Fixup so that we do the offset
23921 calculations right, and so that the fields are physically moved to
23922 the containers's chain.
23923
23924 Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23925
23926 * decl.c (grokdeclarator): Avoid trying to get an operand off an
23927 identifier node.
23928
23929 Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
23930
23931 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
23932 POINTER_SIZE to agree with expr.c.
23933
23934 Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
23935
23936 * search.c (lookup_field): Don't report ambiguities if protect is 0,
23937 instead return NULL_TREE.
23938
23939 Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
23940
23941 * class.c (finish_struct_1): Call warn_hidden if we want warnings
23942 about overloaded virtual functions.
23943 (warn_hidden): New routine to warn of virtual functions that are
23944 hidden by other virtual functions, that are not overridden.
23945 (get_basefndecls): New routine, used by warn_hidden.
23946 (mark_overriders): New routine, used by warn_hidden.
23947 * search.c (get_matching_virtual): Remove old warning that just
23948 isn't very useful.
23949
23950 Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23951
23952 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
23953
23954 * typeck.c (null_ptr_cst_p): Delete unused fn.
23955 (build_function_call_maybe): Delete unused fn.
23956
23957 * expr.c (extract_init): #if 0 the code after unconditional return 0
23958 for now.
23959
23960 Delete old cadillac code.
23961 * edsel.c: Remove file.
23962 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
23963 * Makefile.in (CXX_OBJS): Delete edsel.o.
23964 (edsel.o): Delete rule.
23965 * cp-tree.h (flag_cadillac): Delete var decl.
23966 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
23967 * decl2.c (flag_cadillac): Delete var definition.
23968 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
23969 (grokfield): Delete code depending on flag_cadillac.
23970 (finish_anon_union): Likewise.
23971 * class.c (finish_struct_1): Likewise.
23972 (pushclass): Likewise.
23973 (popclass): Likewise.
23974 (push_lang_context): Likewise.
23975 (pop_lang_context): Likewise.
23976 * decl.c (init_decl_processing): Likewise.
23977 (start_decl): Likewise.
23978 (cp_finish_decl): Likewise.
23979 (xref_tag): Likewise.
23980 (finish_enum): Likewise.
23981 (start_function): Likewise.
23982 (finish_function): Likewise.
23983 (finish_stmt): Likewise.
23984 * lex.c (lang_init): Likewise.
23985 (check_newline): Likewise.
23986
23987 * lex.c (do_pending_inlines): Delete synthesized method kludge.
23988
23989 Delete defunct, ancient garbage collection implementation.
23990 * rtti.c: New file with the RTTI stuff from gc.c.
23991 * gc.c: Removed file (moved the remaining stuff into rtti.c).
23992 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
23993 (rtti.o): New rule, replacing gc.o.
23994 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
23995 * cp-tree.h: Delete gc-related fn decls.
23996 (DECL_GC_OFFSET): Delete macro.
23997 (flag_gc): Delete extern decl.
23998 * decl.c (current_function_obstack_index): Delete var decl.
23999 (current_function_obstack_usage): Delete var decl.
24000 (start_function): Delete clearing of current_function_obstack_index
24001 and current_function_obstack_usage.
24002 (init_decl_processing): Delete code relying on -fgc.
24003 Delete call to init_gc_processing.
24004 (cp_finish_decl): Delete calls to build_static_gc_entry and
24005 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
24006 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
24007 and to expand_expr of a __gc_main call.
24008 (maybe_gc_cleanup): Delete var decl.
24009 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
24010 * decl2.c (flag_gc): Delete var decl.
24011 (lang_f_options): Delete offering of -fgc.
24012 (lang_decode_option): Delete -fgc and -fno-gc handling.
24013 (get_temp_regvar): Delete gc code.
24014 * init.c (build_new): Delete gc code.
24015 * lex.c (init_lex): Delete checking of flag_gc.
24016
24017 * typeck.c (convert_arguments): Delete gc code.
24018 (build_component_addr): Delete -fgc warning.
24019 (build_modify_expr): Delete gc code.
24020
24021 * decl2.c (build_push_scope): Delete fn.
24022 * cp-tree.h (build_push_scope): Delete decl.
24023
24024 * search.c (clear_search_slots): Delete fn.
24025 * cp-tree.h (clear_search_slots): Delete decl.
24026
24027 * search.c (tree_needs_constructor_p): Delete fn.
24028 * cp-tree.h (tree_needs_constructor_p): Delete decl.
24029
24030 * tree.c (id_cmp): Delete fn.
24031
24032 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
24033 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
24034
24035 * tree.c (decl_value_member): Delete fn.
24036 * cp-tree.h (decl_value_member): Delete decl.
24037
24038 * tree.c (list_hash_lookup_or_cons): Delete fn.
24039 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
24040
24041 * method.c (cplus_exception_name): Delete fn.
24042 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
24043
24044 * spew.c (shift_tokens): Delete fn.
24045
24046 Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
24047
24048 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
24049 to cp_finish_decl.
24050 * parse.y: Likewise.
24051
24052 Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24053
24054 * tree.c (build_cplus_staticfn_type): Delete function definition;
24055 never used.
24056 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
24057
24058 * tree.c (virtual_member): Delete function definition; never used.
24059 * cp-tree.h (virtual_member): Delete decl.
24060
24061 Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
24062
24063 * typeck.c (build_component_ref): Handle getting vbase pointers
24064 out of complex multiple inheritance better.
24065
24066 Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
24067
24068 * typeck.c (build_object_ref): Make sure we use the real type, not
24069 any reference type.
24070
24071 Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
24072
24073 * tree.c (build_exception_variant): Don't create new types if we
24074 don't have to, also build new types on the right obstack.
24075
24076 Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
24077
24078 * decl.c (store_bindings): Split out from push_to_top_level.
24079 (push_to_top_level): Call it for b->type_shadowed on class binding
24080 levels.
24081
24082 Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
24083
24084 * search.c (expand_upcast_fixups): Fix so that offsets stored in
24085 vbase_offsets are always right. Fixes a problem where virtual base
24086 upcasting and downcasting could be wrong during conversions on this
24087 during virtual function dispatch at ctor/dtor time when dynamic
24088 vtable fixups for deltas are needed. This only sounds easier than
24089 it is. :-)
24090 (fixup_virtual_upcast_offsets): Change to reflect new calling
24091 convention for expand_upcast_fixups.
24092
24093 Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24094
24095 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
24096 check that it's usable as the bitfield width.
24097
24098 Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24099
24100 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
24101 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
24102 only ever used for functions in it.
24103
24104 Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
24105
24106 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
24107 (nested_type): Likewise.
24108 (nested_name_specifier): Use lastiddecl.
24109
24110 * decl.c (grokdeclarator): Adjust accordingly.
24111 * init.c (expand_member_init): Likewise.
24112 * parse.y (base_class): Likewise.
24113 * typeck2.c (build_functional_cast): Likewise.
24114
24115 * typeck2.c (build_functional_cast): Fill in name after we've
24116 checked for non-aggr type.
24117
24118 Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
24119
24120 * decl2.c (warn_pointer_arith): Default to on.
24121
24122 Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
24123
24124 * lex.c (is_rid): New function.
24125 * decl.c (grokdeclarator): Diagnose reserved words used as
24126 declarator-ids.
24127
24128 Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
24129
24130 * tree.c (get_decl_list): Don't lose cv-quals.
24131
24132 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
24133 typespecs used as declarator-ids.
24134
24135 Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
24136
24137 * decl.c (poplevel): When poping a level, don't give a warning for
24138 any subblocks that already exist.
24139
24140 Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
24141
24142 * typeck.c (build_object_ref): Finish what I started.
24143
24144 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
24145
24146 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
24147
24148 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
24149 scope.
24150
24151 Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
24152
24153 * decl.c (xref_tag): Handle passing a type in directly.
24154
24155 * parse.y (qualified_type_name): Pull out the type.
24156 (nested_type): Likewise.
24157 Take types directly instead of as identifiers.
24158 * call.c (build_scoped_method_call): Take types directly instead of
24159 as identifiers.
24160 * decl.c (xref_basetypes): Likewise.
24161 * init.c (expand_member_init): Likewise.
24162 (build_member_call): Likewise.
24163 (build_offset_ref): Likewise.
24164 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
24165 * method.c (do_build_assign_ref): Likewise.
24166 * decl.c (grokdeclarator): Handle a type appearing as the
24167 declarator-id for constructors.
24168 * method.c (do_build_copy_constructor): current_base_init_list now
24169 uses the types directly, not their names.
24170 * init.c (sort_base_init): Likewise.
24171 (expand_member_init): Likewise.
24172 * init.c (is_aggr_type): New function, like is_aggr_typedef.
24173
24174 Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
24175
24176 * tree.c (layout_basetypes): Call build_lang_field_decl instead
24177 of build_lang_decl if first arg is a FIELD_DECL.
24178
24179 Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24180
24181 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
24182 non-empty.
24183 * except.c (expand_start_catch_block): Set TREE_USED to avoid
24184 warnings about the catch handler.
24185
24186 Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
24187
24188 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
24189 expand_target_expr.
24190
24191 Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24192
24193 Fix access control to use trees rather than integers.
24194 * class.c (access_{default, public, protected, private,
24195 default_virtual, public_virtual, private_virtual}_node): Add
24196 definitions.
24197 (init_class_processing): Do creation of those nodes.
24198 * cp-tree.h (access_type): Delete enum decl.
24199 (access_{default, public, protected, private, default_virtual,
24200 public_virtual, private_virtual}_node): Add decls.
24201 (compute_access): Change return type.
24202 * search.c (compute_access): Have tree return type, instead of enum.
24203 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
24204 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
24205 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
24206 * parse.y (VISSPEC): Make ttype rather than itype.
24207 (base_class_access_list): Likewise.
24208 * *.[cy]: Change all refs of `access_public' to `access_public_node',
24209 etc.
24210 * call.c (build_method_call): Make ACCESS be a tree.
24211 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
24212 * cvt.c (convert_to_aggr): Likewise.
24213 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
24214 Likewise.
24215 * method.c (hack_identifier): Likewise.
24216 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
24217
24218 Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
24219
24220 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
24221 frontend, and make it more consistent with respect to
24222 warn_pointer_arith.
24223
24224 Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
24225
24226 * decl.c (pushdecl): Check for duplicate parameter names.
24227
24228 Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
24229
24230 * decl.c (expand_static_init): Call assemble_external for atexit.
24231
24232 Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
24233
24234 * except.c (do_unwind): Remove some generated dead code.
24235 (eh_outer_context): New routine, factor out some common code from
24236 expand_builtin_throw and end_eh_unwinder. Add code to do return
24237 address masking for the PA.
24238 (expand_builtin_throw): Use eh_outer_context instead of open coding
24239 it here.
24240 (end_eh_unwinder): Likewise.
24241
24242 Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
24243
24244 * except.c (expand_throw): Call assemble_external for __empty, if we
24245 use it.
24246
24247 Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
24248
24249 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
24250 NORMAL_RETURN_ADDR_OFFSET.
24251 (end_eh_unwinder): Likewise.
24252
24253 Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
24254
24255 * gc.c (build_dynamic_cast): Make sure we don't cast away const
24256 when dealing with references, and make sure we handle dynamic
24257 casting to a cv qualified reference.
24258
24259 Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
24260
24261 * except.c (struct eh_context): New structure top hold eh context
24262 information.
24263 (push_eh_context): New routine.
24264 (pop_eh_context): Likewise.
24265 * decl.c (push_cp_function_context): Use them.
24266 (pop_cp_function_context): Likewise.
24267
24268 Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
24269
24270 * decl2.c (finish_file): Also prune uninteresting functions in the
24271 inline emission loop.
24272
24273 Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
24274
24275 * sig.c (build_signature_table_constructor): Mark functions
24276 in the signature as referenced.
24277
24278 Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
24279
24280 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
24281 the inline emission stuff.
24282
24283 Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
24284
24285 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
24286 weak symbols.
24287 * lang-options.h: Add -f{no-,}weak.
24288 * decl.c (init_decl_processing): If the target does not support weak
24289 symbols, don't use them.
24290 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
24291
24292 Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
24293
24294 * init.c (expand_member_init): warning for base init after members.
24295
24296 Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
24297
24298 * cvt.c (build_expr_type_conversion): Don't convert to a reference
24299 type.
24300
24301 Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
24302
24303 * method.c (report_type_mismatch): Improve wording for volatile
24304 mismatches.
24305
24306 Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
24307
24308 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
24309 expand_assignment, as the later doesn't handle things that have
24310 copy constructors well. The compiler would do bitwise copying,
24311 instead of ctor calling in some cases.
24312
24313 Wed Dec 13 17:05:54 1995 Paul Eggert <eggert@twinsun.com>
24314
24315 * g++.c (my_strerror): Return "cannot access" if errno is 0.
24316 (pfatal_with_name, perror_exec): Don't assume that
24317 the returned value from my_strerror contains no '%'s.
24318 (concat): Remove.
24319 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
24320
24321 Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
24322
24323 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
24324 TYPE_METHODS/TREE_CHAIN mean what they used to.
24325 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
24326 instead of TYPE_METHODS.
24327 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
24328 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
24329 * cp-tree.h (CLASSTYPE_METHODS): Lose.
24330 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
24331 TYPE_METHODS.
24332 (struct lang_decl): Lose next_method field.
24333 (DECL_NEXT_METHOD): Lose.
24334 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
24335 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
24336 anymore.
24337 (finish_struct_methods): Don't mess with the TREE_CHAINs in
24338 fn_fields.
24339
24340 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
24341 vector.
24342
24343 * call.c (build_method_call): Synthesize here even when not inlining.
24344 * typeck.c (build_function_call_real): Likewise.
24345
24346 Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
24347
24348 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
24349 == DBX_DEBUG, call dbxout_start_new_source_file and
24350 dbxout_resume_previous_source_file when appropriate.
24351
24352 Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
24353
24354 * except.c (start_anon_func): Push to the top level.
24355 (end_anon_func): Pop from the top level.
24356
24357 Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
24358
24359 * cp-tree.h (build_cleanup): New routine to build cleanups.
24360 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
24361 call at ctor time and use atexit to run it later.
24362 * decl2.c (build_cleanup): New routine, taken from finish_file.
24363 (finish_file): Use build_cleanup instead, and don't put function
24364 local statics in global dtor list.
24365
24366 Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
24367
24368 * except.c (expand_throw): Ensure that we have cleanups, if we try
24369 and expand cleanups.
24370
24371 Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
24372
24373 * except.c (expand_throw): Add logic to manage dynamic cleanups for
24374 the EH object.
24375 (expand_end_catch_block): Use the magic of expand_goto, instead of
24376 emit_jump so that we get the cleanup for any catch clause parameter
24377 and the cleanup for the exception object. Update to reflect label
24378 changes.
24379 (push_eh_cleanup): New routine to register a cleanup for an
24380 exception object.
24381 (empty_fndecl): Used to default cleanup actions to
24382 nothing.
24383 (init_exception_processing): Setup empty_fndecl. Setup
24384 saved_cleanup.
24385 (expand_start_catch_block): Update to reflect label changes. Call
24386 push_eh_object to register the cleanup for the EH object.
24387 (start_anon_func): New routine to start building lambda expressions
24388 from trees.
24389 (end_anon_func): New routine to end them.
24390 (struct labelNode): Change so that we can use tree labels, or rtx
24391 labels.
24392 (saved_cleanup): Object to check for dynamic cleanups for the
24393 exception handling object.
24394 (push_label_entry): Change so that we can use tree labels, or rtx
24395 labels.
24396 (pop_label_entry): Likewise.
24397 (top_label_entry): Likewise.
24398 (expand_start_all_catch): Use tree label instead of rtx label, so
24399 that we can get the magic of expand_goto.
24400 (expand_end_all_catch): Update to reflect label changes.
24401
24402 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
24403 use UNSAVE_EXPRs.
24404 * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
24405 building_cleanup logic, as we now use UNSAVE_EXPRs.
24406 * cp-tree.h (unsave_expr): Declare it.
24407 * decl.c (building_cleanup): Remove.
24408 (maybe_build_cleanup): Remove building_cleanup logic, and use
24409 UNSAVE_EXPR instead.
24410
24411 Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
24412
24413 * gc.c (build_t_desc): Update error message to say <typeinfo>.
24414
24415 Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24416
24417 * decl.c (pushdecl): Only warn about shadowing a local variable if
24418 warn_shadow is true.
24419
24420 Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
24421
24422 * typeck.c (build_binary_op_nodefault): Added warning about
24423 comparisons between different enum types with -Wall, unless
24424 -fenum-int-equiv set.
24425
24426 Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
24427
24428 * class.c (finish_struct_1): Skip down to the inner type in
24429 multidimensional arrays. Ensures ctors will be made for types that
24430 need constructing.
24431
24432 Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
24433
24434 * decl.c (last_dtor_insn): New to track the last compiler generated
24435 insn in a dtor.
24436 (store_parm_decls): Set it.
24437 (finish_function): Use it to see if the dtor is empty. Avoid doing
24438 vtable setup all the time, if we can.
24439 (struct cp_function): Add last_dtor_insn.
24440 (push_cp_function_context): Save it.
24441 (pop_cp_function_context): Restore it.
24442
24443 Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
24444
24445 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
24446 warnings.
24447
24448 Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
24449
24450 * typeck.c (expand_target_expr): Make sure targets get put into the
24451 current temp_slot_level, so that the free_temp_slots call will reuse
24452 them.
24453
24454 Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
24455
24456 * class.c (finish_struct_1): Delay delta fixups for virtual bases
24457 until after we have done the hard virtuals, to avoid a bogus `every
24458 virtual function must have a unique final overrider' for virtual
24459 functions that are only overridden by hard virtuals.
24460
24461 Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
24462
24463 * pt.c (do_function_instantiation): Don't try to find a file-scope
24464 template for a member function.
24465
24466 Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
24467
24468 * g++.c (main): Add handling of -nodefaultlibs.
24469
24470 Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
24471
24472 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
24473 distinguish between direct bindings of reference variables, and
24474 indirect bindings of reference variables.
24475 * cvt.c (build_up_reference): Use it.
24476 * typeck.c (convert_arguments): Use it to indicate this is an
24477 indirect binding.
24478 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
24479 as they are unused.
24480 (expand_static_init): Likewise.
24481 (cplus_expand_expr_stmt): Likewise.
24482 * decl2.c (finish_file): Likewise.
24483 * init.c (perform_member_init): Likewise.
24484 (emit_base_init): Likewise.
24485 (expand_aggr_vbase_init_1): Likewise.
24486
24487 Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24488
24489 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
24490 get a DECL_LANG_SPECIFIC node.
24491 * cp-tree.h (lang_decl_flags): Add new member `level'.
24492 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
24493 decl_flags level member.
24494
24495 Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24496
24497 * call.c (build_method_call): Make sure instance has a
24498 TYPE_LANG_SPECIFIC node before we dive into it.
24499
24500 Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
24501
24502 * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
24503
24504 Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
24505
24506 * decl.c (duplicate_decls): When smashing decls, smash staticness in
24507 the usual way.
24508
24509 Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
24510
24511 * decl.c (poplevel): Handle the merging of subblocks of cleanups
24512 when finishing blocks that have already been created (usually due to
24513 the fixup goto code). Fixes bad debugging information.
24514
24515 Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
24516
24517 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
24518 that's not a list of overloaded functions.
24519
24520 Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24521
24522 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
24523 before trying to use DECL_ABSTRACT_VIRTUAL_P.
24524
24525 Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
24526
24527 * decl2.c (mark_used): New function for hooking into setting of
24528 TREE_USED on decls.
24529 * call.c (build_method_call): Use it.
24530 * class.c (instantiate_type): Likewise.
24531 * init.c (build_offset_ref): Likewise. Don't call assemble_external
24532 for all like-named functions.
24533 * method.c (hack_identifier): Likewise.
24534 (emit_thunk): Don't call assemble_external.
24535 (make_thunk): Create thunk as a FUNCTION_DECL so that it
24536 gets the right mode and ENCODE_SECTION_INFO works.
24537
24538 * parse.y: Use mark_used. Pass operator names to do_identifier.
24539 * lex.c (do_identifier): Handle operator names.
24540
24541 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
24542
24543 Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24544
24545 * errfn.c: Include stdio.h.
24546 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
24547
24548 Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
24549
24550 * typeck2.c (digest_init): Always convert initializers to the
24551 right type.
24552
24553 Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
24554
24555 * init.c (member_init_ok_or_else): Don't allow member initializers
24556 for indirect members, as it is invalid.
24557
24558 Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24559
24560 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
24561
24562 Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
24563
24564 * parse.y (for.init.statement): Catch compound statements inside for
24565 initializations, if we're being pedantic.
24566
24567 Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
24568
24569 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
24570 looking for.
24571
24572 Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
24573
24574 * error.c (dump_expr): Don't core dump when a boolean expression is
24575 used as a default argument.
24576
24577 Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
24578
24579 * class.c (finish_struct_bits): Check aggregate_value_p instead of
24580 RETURN_IN_MEMORY.
24581
24582 Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
24583
24584 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
24585 BLKmode type that would otherwise be returned in registers.
24586
24587 Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24588
24589 * g++.c (WITHLIBC): New macro.
24590 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
24591 saw_libc and pass it at the end if it was set.
24592
24593 Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24594
24595 * parse.y (fn.def1): Call split_specs_attrs in
24596 declmods notype_declarator case.